@alfalab/core-components 46.0.0-beta.7 → 46.0.0-beta.8
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/amount-input/Component.js +1 -2
- package/amount-input/cssm/Component.js +1 -2
- package/amount-input/esm/Component.js +1 -2
- package/amount-input/esm/index.js +0 -1
- package/amount-input/modern/Component.js +1 -2
- package/amount-input/modern/index.js +0 -1
- package/button/Component.responsive.js +1 -2
- package/button/cssm/Component.responsive.js +1 -2
- package/button/esm/Component.responsive.js +2 -2
- package/button/esm/index.js +1 -1
- package/button/modern/Component.responsive.js +2 -2
- package/button/modern/index.js +1 -1
- package/calendar/Component.responsive.js +1 -2
- package/calendar/cssm/Component.responsive.js +1 -2
- package/calendar/esm/Component.responsive.js +2 -2
- package/calendar/esm/index.js +1 -1
- package/calendar/modern/Component.responsive.js +2 -2
- package/calendar/modern/index.js +1 -1
- package/calendar-input/Component.responsive.js +1 -2
- package/calendar-input/cssm/Component.responsive.js +1 -2
- package/calendar-input/esm/Component.responsive.js +1 -2
- package/calendar-input/esm/index.js +0 -1
- package/calendar-input/modern/Component.responsive.js +1 -2
- package/calendar-input/modern/index.js +0 -1
- package/checkbox-group/Component.responsive.js +1 -2
- package/checkbox-group/cssm/Component.responsive.js +1 -2
- package/checkbox-group/esm/Component.responsive.js +1 -2
- package/checkbox-group/esm/index.js +0 -1
- package/checkbox-group/modern/Component.responsive.js +1 -2
- package/checkbox-group/modern/index.js +0 -1
- package/code-input/Component.responsive.js +1 -2
- package/code-input/cssm/Component.responsive.js +1 -2
- package/code-input/esm/Component.responsive.js +1 -2
- package/code-input/esm/index.js +0 -1
- package/code-input/modern/Component.responsive.js +1 -2
- package/code-input/modern/index.js +0 -1
- package/confirmation/component.responsive.js +1 -2
- package/confirmation/components/base-confirmation/component.js +1 -2
- package/confirmation/cssm/component.responsive.js +1 -2
- package/confirmation/cssm/components/base-confirmation/component.js +1 -2
- package/confirmation/esm/component.responsive.js +1 -2
- package/confirmation/esm/components/base-confirmation/component.js +1 -2
- package/confirmation/esm/components/base-confirmation/index.js +0 -1
- package/confirmation/esm/desktop/component.desktop.js +0 -1
- package/confirmation/esm/desktop/index.js +0 -1
- package/confirmation/esm/index.js +0 -1
- package/confirmation/esm/mobile/component.mobile.js +0 -1
- package/confirmation/esm/mobile/index.js +0 -1
- package/confirmation/modern/component.responsive.js +1 -2
- package/confirmation/modern/components/base-confirmation/component.js +1 -2
- package/confirmation/modern/components/base-confirmation/index.js +0 -1
- package/confirmation/modern/desktop/component.desktop.js +0 -1
- package/confirmation/modern/desktop/index.js +0 -1
- package/confirmation/modern/index.js +0 -1
- package/confirmation/modern/mobile/component.mobile.js +0 -1
- package/confirmation/modern/mobile/index.js +0 -1
- package/custom-picker-button/Component.responsive.js +1 -2
- package/custom-picker-button/cssm/Component.responsive.js +1 -2
- package/custom-picker-button/esm/Component.responsive.js +1 -2
- package/custom-picker-button/esm/index.js +0 -1
- package/custom-picker-button/modern/Component.responsive.js +1 -2
- package/custom-picker-button/modern/index.js +0 -1
- package/date-range-input/Component.responsive.js +1 -2
- package/date-range-input/cssm/Component.responsive.js +1 -2
- package/date-range-input/esm/Component.responsive.js +1 -2
- package/date-range-input/esm/index.js +0 -1
- package/date-range-input/modern/Component.responsive.js +1 -2
- package/date-range-input/modern/index.js +0 -1
- package/date-time-input/Component.responsive.js +1 -2
- package/date-time-input/cssm/Component.responsive.js +1 -2
- package/date-time-input/esm/Component.responsive.js +1 -2
- package/date-time-input/esm/index.js +0 -1
- package/date-time-input/modern/Component.responsive.js +1 -2
- package/date-time-input/modern/index.js +0 -1
- package/filter-tag/Component.responsive.js +1 -2
- package/filter-tag/cssm/Component.responsive.js +1 -2
- package/filter-tag/esm/Component.responsive.js +1 -2
- package/filter-tag/esm/index.js +0 -1
- package/filter-tag/modern/Component.responsive.js +1 -2
- package/filter-tag/modern/index.js +0 -1
- package/form-control/Component.responsive.js +1 -2
- package/form-control/cssm/Component.responsive.js +1 -2
- package/form-control/esm/Component.responsive.js +2 -2
- package/form-control/esm/index.js +1 -1
- package/form-control/modern/Component.responsive.js +2 -2
- package/form-control/modern/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/icon-button/Component.d.ts +0 -10
- package/icon-button/Component.js +3 -4
- package/icon-button/cssm/Component.d.ts +0 -10
- package/icon-button/cssm/Component.js +1 -2
- package/icon-button/cssm/default.module.css +3 -35
- package/icon-button/cssm/inverted.module.css +3 -35
- package/icon-button/default.css +3 -35
- package/icon-button/esm/Component.d.ts +0 -10
- package/icon-button/esm/Component.js +3 -4
- package/icon-button/esm/default.css +3 -35
- package/icon-button/esm/inverted.css +3 -35
- package/icon-button/inverted.css +3 -35
- package/icon-button/modern/Component.d.ts +0 -10
- package/icon-button/modern/Component.js +3 -4
- package/icon-button/modern/default.css +3 -35
- package/icon-button/modern/inverted.css +3 -35
- package/input/Component.responsive.js +1 -2
- package/input/cssm/Component.responsive.js +1 -2
- package/input/esm/Component.responsive.js +2 -2
- package/input/esm/index.js +1 -1
- package/input/modern/Component.responsive.js +2 -2
- package/input/modern/index.js +1 -1
- package/input-autocomplete/Component.responsive.js +1 -2
- package/input-autocomplete/cssm/Component.responsive.js +1 -2
- package/input-autocomplete/esm/Component.responsive.js +2 -2
- package/input-autocomplete/esm/index.js +1 -1
- package/input-autocomplete/modern/Component.responsive.js +2 -2
- package/input-autocomplete/modern/index.js +1 -1
- package/international-phone-input/Component.responsive.js +1 -2
- package/international-phone-input/cssm/Component.responsive.js +1 -2
- package/international-phone-input/cssm/typings-1fe708ea.d.ts +0 -6
- package/international-phone-input/esm/Component.responsive.js +2 -2
- package/international-phone-input/esm/index.js +1 -1
- package/international-phone-input/esm/typings-1fe708ea.d.ts +0 -6
- package/international-phone-input/modern/Component.responsive.js +2 -2
- package/international-phone-input/modern/index.js +1 -1
- package/international-phone-input/modern/typings-1fe708ea.d.ts +0 -6
- package/international-phone-input/typings-1fe708ea.d.ts +0 -6
- package/markdown/Component.responsive.js +1 -1
- package/markdown/cssm/Component.responsive.js +1 -1
- package/markdown/esm/Component.responsive.js +2 -2
- package/markdown/modern/Component.responsive.js +2 -2
- package/modal/Component.responsive.js +1 -2
- package/modal/cssm/Component.responsive.js +1 -2
- package/modal/esm/Component.responsive.js +2 -2
- package/modal/esm/index.js +1 -1
- package/modal/modern/Component.responsive.js +2 -2
- package/modal/modern/index.js +1 -1
- package/number-input/Component.responsive.js +1 -2
- package/number-input/cssm/Component.responsive.js +1 -2
- package/number-input/esm/Component.responsive.js +2 -2
- package/number-input/esm/index.js +1 -1
- package/number-input/modern/Component.responsive.js +2 -2
- package/number-input/modern/index.js +1 -1
- package/package.json +3 -1
- package/pattern-lock/Component.responsive.js +1 -2
- package/pattern-lock/cssm/Component.responsive.js +1 -2
- package/pattern-lock/esm/Component.responsive.js +2 -2
- package/pattern-lock/esm/index.js +1 -1
- package/pattern-lock/modern/Component.responsive.js +2 -2
- package/pattern-lock/modern/index.js +1 -1
- package/picker-button/Component-307da6d7.d.ts +168 -0
- package/picker-button/Component.responsive.js +1 -2
- package/picker-button/Context-c2e6f1b2.d.ts +4 -0
- package/picker-button/cssm/Component-307da6d7.d.ts +168 -0
- package/picker-button/cssm/Component.responsive.js +1 -2
- package/picker-button/cssm/Context-c2e6f1b2.d.ts +4 -0
- package/picker-button/cssm/index-064acd29.d.ts +13 -0
- package/picker-button/cssm/index-307da6d7.d.ts +67 -0
- package/picker-button/cssm/mobile/Component.mobile.js +1 -2
- package/picker-button/cssm/types-a870d1f8.d.ts +117 -0
- package/picker-button/cssm/typings-1fe708ea.d.ts +10 -415
- package/picker-button/esm/Component-307da6d7.d.ts +168 -0
- package/picker-button/esm/Component.responsive.js +1 -2
- package/picker-button/esm/Context-c2e6f1b2.d.ts +4 -0
- package/picker-button/esm/index-064acd29.d.ts +13 -0
- package/picker-button/esm/index-307da6d7.d.ts +67 -0
- package/picker-button/esm/index.js +0 -1
- package/picker-button/esm/mobile/Component.mobile.js +1 -2
- package/picker-button/esm/mobile/index.js +0 -1
- package/picker-button/esm/types-a870d1f8.d.ts +117 -0
- package/picker-button/esm/typings-1fe708ea.d.ts +10 -415
- package/picker-button/index-064acd29.d.ts +13 -0
- package/picker-button/index-307da6d7.d.ts +67 -0
- package/picker-button/mobile/Component.mobile.js +1 -2
- package/picker-button/modern/Component-307da6d7.d.ts +168 -0
- package/picker-button/modern/Component.responsive.js +1 -2
- package/picker-button/modern/Context-c2e6f1b2.d.ts +4 -0
- package/picker-button/modern/index-064acd29.d.ts +13 -0
- package/picker-button/modern/index-307da6d7.d.ts +67 -0
- package/picker-button/modern/index.js +0 -1
- package/picker-button/modern/mobile/Component.mobile.js +1 -2
- package/picker-button/modern/mobile/index.js +0 -1
- package/picker-button/modern/types-a870d1f8.d.ts +117 -0
- package/picker-button/modern/typings-1fe708ea.d.ts +10 -415
- package/picker-button/types-a870d1f8.d.ts +117 -0
- package/picker-button/typings-1fe708ea.d.ts +10 -415
- package/plate/Component.responsive.js +1 -17
- package/plate/cssm/Component.responsive.js +1 -17
- package/plate/esm/Component.responsive.js +2 -17
- package/plate/esm/index.js +1 -1
- package/plate/modern/Component.responsive.js +2 -18
- package/plate/modern/index.js +1 -1
- package/radio-group/Component.responsive.js +1 -2
- package/radio-group/cssm/Component.responsive.js +1 -2
- package/radio-group/esm/Component.responsive.js +1 -2
- package/radio-group/esm/index.js +0 -1
- package/radio-group/modern/Component.responsive.js +1 -2
- package/radio-group/modern/index.js +0 -1
- package/select/Component.responsive.js +1 -2
- package/select/cssm/Component.responsive.js +1 -2
- package/select/cssm/{hook-aae7b381.js → hook-941ed97f.js} +6 -1
- package/select/{modern/hook-d4f77aed.d.ts → cssm/hook-bdd14a05.d.ts} +5 -2
- 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 +2 -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 +1 -1
- package/select/cssm/typings.d.ts +1 -1
- package/select/esm/Component.responsive.js +4 -3
- package/select/esm/{hook-cdd6fd77.js → hook-b1acbe62.js} +5 -1
- package/select/{hook-d4f77aed.d.ts → esm/hook-bdd14a05.d.ts} +5 -2
- package/select/esm/index.js +3 -2
- package/select/esm/mobile/Component.mobile.js +2 -1
- package/select/esm/mobile/Component.modal.mobile.js +2 -1
- package/select/esm/mobile/index.js +2 -1
- package/select/esm/presets/index.d.ts +1 -1
- package/select/esm/presets/index.js +2 -1
- package/select/esm/presets/useSelectWithApply/hook.js +2 -1
- package/select/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +2 -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 +2 -1
- package/select/esm/shared/index.js +2 -1
- package/select/esm/typings.d.ts +1 -1
- package/select/{hook-504cecce.js → hook-1e1150ba.js} +6 -1
- package/select/{esm/hook-d4f77aed.d.ts → hook-bdd14a05.d.ts} +5 -2
- package/select/mobile/Component.mobile.js +1 -1
- package/select/modern/Component.responsive.js +4 -3
- package/select/{cssm/hook-d4f77aed.d.ts → modern/hook-bdd14a05.d.ts} +5 -2
- package/select/modern/{hook-f45c958e.js → hook-c88964f0.js} +5 -1
- package/select/modern/index.js +3 -2
- package/select/modern/mobile/Component.mobile.js +2 -1
- package/select/modern/mobile/Component.modal.mobile.js +2 -1
- package/select/modern/mobile/index.js +2 -1
- package/select/modern/presets/index.d.ts +1 -1
- package/select/modern/presets/index.js +2 -1
- package/select/modern/presets/useSelectWithApply/hook.js +2 -1
- package/select/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +2 -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 +2 -1
- package/select/modern/shared/index.js +2 -1
- package/select/modern/typings.d.ts +1 -1
- package/select/presets/index.d.ts +1 -1
- package/select/presets/index.js +1 -1
- package/select/presets/useSelectWithApply/hook.js +2 -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 +1 -1
- package/select/typings.d.ts +1 -1
- package/select-with-tags/Component.responsive.js +1 -2
- package/select-with-tags/cssm/Component.responsive.js +1 -2
- package/select-with-tags/esm/Component.responsive.js +1 -2
- package/select-with-tags/esm/index.js +0 -1
- package/select-with-tags/modern/Component.responsive.js +1 -2
- package/select-with-tags/modern/index.js +0 -1
- package/shared/cssm/index.d.ts +0 -1
- package/shared/cssm/index.js +0 -2
- package/shared/esm/index.d.ts +0 -1
- package/shared/esm/index.js +0 -1
- package/shared/index.d.ts +0 -1
- package/shared/index.js +0 -2
- package/shared/modern/index.d.ts +0 -1
- package/shared/modern/index.js +0 -1
- package/side-panel/Component.responsive.js +1 -1
- package/side-panel/components/controls/Component.js +1 -1
- package/side-panel/components/footer/Component.js +1 -1
- package/side-panel/cssm/Component.responsive.js +1 -1
- package/side-panel/esm/Component.responsive.js +3 -3
- 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 +3 -3
- 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/status/Component.d.ts +1 -2
- package/status/Component.js +2 -2
- package/status/cssm/Component.d.ts +1 -2
- package/status/cssm/Component.js +1 -1
- package/status/cssm/index.module.css +29 -74
- package/status/esm/Component.d.ts +1 -2
- package/status/esm/Component.js +2 -2
- package/status/esm/index.css +27 -55
- package/status/index.css +27 -55
- package/status/modern/Component.d.ts +1 -2
- package/status/modern/Component.js +2 -2
- package/status/modern/index.css +27 -55
- package/system-message/Components.responsive.js +1 -1
- package/system-message/cssm/Components.responsive.js +1 -1
- package/system-message/esm/Components.responsive.js +2 -2
- package/system-message/modern/Components.responsive.js +2 -2
- package/tabs/components/primary-tablist/Component.collapsible.js +1 -2
- package/tabs/components/primary-tablist/Component.responsive.js +1 -2
- package/tabs/components/secondary-tablist/Component.responsive.js +1 -2
- package/tabs/components/tabs/Component.js +1 -2
- package/tabs/cssm/components/primary-tablist/Component.collapsible.js +1 -2
- package/tabs/cssm/components/primary-tablist/Component.responsive.js +1 -2
- package/tabs/cssm/components/secondary-tablist/Component.responsive.js +1 -2
- package/tabs/cssm/components/tabs/Component.js +1 -2
- package/tabs/esm/collapsible/index.js +1 -1
- package/tabs/esm/components/primary-tablist/Component.collapsible.js +2 -2
- package/tabs/esm/components/primary-tablist/Component.responsive.js +2 -2
- package/tabs/esm/components/secondary-tablist/Component.responsive.js +2 -2
- package/tabs/esm/components/tabs/Component.collapsible.js +1 -1
- package/tabs/esm/components/tabs/Component.js +1 -2
- package/tabs/esm/components/tabs/Component.responsive.js +1 -1
- package/tabs/esm/index.js +1 -1
- package/tabs/modern/collapsible/index.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.collapsible.js +2 -2
- package/tabs/modern/components/primary-tablist/Component.responsive.js +2 -2
- package/tabs/modern/components/secondary-tablist/Component.responsive.js +2 -2
- package/tabs/modern/components/tabs/Component.collapsible.js +1 -1
- package/tabs/modern/components/tabs/Component.js +1 -2
- package/tabs/modern/components/tabs/Component.responsive.js +1 -1
- package/tabs/modern/index.js +1 -1
- package/tag/Component.responsive.js +1 -2
- package/tag/components/base-tag/Component.d.ts +1 -1
- package/tag/cssm/Component.responsive.js +1 -2
- package/tag/cssm/components/base-tag/Component.d.ts +1 -1
- package/tag/esm/Component.responsive.js +1 -2
- package/tag/esm/components/base-tag/Component.d.ts +1 -1
- package/tag/esm/index.js +0 -1
- package/tag/modern/Component.responsive.js +1 -2
- package/tag/modern/components/base-tag/Component.d.ts +1 -1
- package/tag/modern/index.js +0 -1
- package/themes/compiled/mobile-dark-bluetint.css +51 -72
- package/toast/Component.responsive.js +1 -2
- package/toast/cssm/Component.responsive.js +1 -2
- package/toast/esm/Component.responsive.js +1 -2
- package/toast/esm/index.js +0 -1
- package/toast/modern/Component.responsive.js +1 -2
- package/toast/modern/index.js +0 -1
- package/toast-plate/Component.responsive.js +1 -2
- package/toast-plate/browser-a216f694.d.ts +6 -0
- package/toast-plate/components/base-toast-plate/component.js +4 -3
- package/toast-plate/components/base-toast-plate/hooks/useDeprecatedBadge.js +5 -2
- package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +5 -3
- package/toast-plate/cssm/Component.responsive.js +1 -2
- package/toast-plate/cssm/browser-a216f694.d.ts +6 -0
- package/toast-plate/cssm/components/base-toast-plate/component.js +4 -3
- package/toast-plate/cssm/components/base-toast-plate/hooks/useDeprecatedBadge.js +5 -2
- package/toast-plate/cssm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +5 -3
- package/toast-plate/cssm/getDataTestId-73ea38f8.d.ts +3 -0
- package/toast-plate/cssm/getDataTestId-73ea38f8.js +6 -0
- package/toast-plate/cssm/index-307da6d7.d.ts +71 -0
- package/toast-plate/cssm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/toast-plate/esm/Component.responsive.js +3 -2
- package/toast-plate/esm/browser-a216f694.d.ts +6 -0
- package/toast-plate/esm/components/base-toast-plate/component.js +2 -1
- package/toast-plate/esm/components/base-toast-plate/hooks/useDeprecatedBadge.js +4 -1
- package/toast-plate/esm/components/base-toast-plate/index.js +2 -1
- package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +3 -1
- package/toast-plate/esm/desktop/Component.desktop.js +2 -1
- package/toast-plate/esm/desktop/index.js +2 -1
- package/toast-plate/esm/getDataTestId-32d52205.d.ts +3 -0
- package/toast-plate/esm/getDataTestId-32d52205.js +6 -0
- package/toast-plate/esm/index-307da6d7.d.ts +71 -0
- package/toast-plate/esm/index.js +2 -1
- package/toast-plate/esm/mobile/Component.mobile.js +2 -1
- package/toast-plate/esm/mobile/index.js +2 -1
- package/toast-plate/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/toast-plate/getDataTestId-1de39d74.d.ts +3 -0
- package/toast-plate/getDataTestId-1de39d74.js +6 -0
- package/toast-plate/index-307da6d7.d.ts +71 -0
- package/toast-plate/modern/Component.responsive.js +3 -2
- package/toast-plate/modern/browser-a216f694.d.ts +6 -0
- package/toast-plate/modern/components/base-toast-plate/component.js +2 -1
- package/toast-plate/modern/components/base-toast-plate/hooks/useDeprecatedBadge.js +4 -1
- package/toast-plate/modern/components/base-toast-plate/index.js +2 -1
- package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +3 -1
- package/toast-plate/modern/desktop/Component.desktop.js +2 -1
- package/toast-plate/modern/desktop/index.js +2 -1
- package/toast-plate/modern/getDataTestId-dd00ab19.d.ts +3 -0
- package/toast-plate/modern/getDataTestId-dd00ab19.js +6 -0
- package/toast-plate/modern/index-307da6d7.d.ts +71 -0
- package/toast-plate/modern/index.js +2 -1
- package/toast-plate/modern/mobile/Component.mobile.js +2 -1
- package/toast-plate/modern/mobile/index.js +2 -1
- package/toast-plate/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/toast-plate/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/tooltip/Component.responsive.js +1 -2
- package/tooltip/cssm/Component.responsive.js +1 -2
- package/tooltip/esm/Component.responsive.js +1 -2
- package/tooltip/esm/index.js +0 -1
- package/tooltip/modern/Component.responsive.js +1 -2
- package/tooltip/modern/index.js +0 -1
- package/universal-date-input/Component.responsive.js +1 -2
- package/universal-date-input/cssm/Component.responsive.js +1 -2
- package/universal-date-input/esm/Component.responsive.js +2 -2
- package/universal-date-input/esm/index.js +1 -1
- package/universal-date-input/modern/Component.responsive.js +2 -2
- package/universal-date-input/modern/index.js +1 -1
- package/amount-input/@alfalab/core-components-shared/package.json +0 -23
- package/calendar-input/@alfalab/core-components-shared/package.json +0 -23
- package/checkbox-group/@alfalab/core-components-shared/package.json +0 -23
- package/code-input/@alfalab/core-components-shared/package.json +0 -23
- package/confirmation/@alfalab/core-components-shared/package.json +0 -23
- package/custom-picker-button/@alfalab/core-components-shared/package.json +0 -23
- package/date-range-input/@alfalab/core-components-shared/package.json +0 -23
- package/date-time-input/@alfalab/core-components-shared/package.json +0 -23
- package/filter-tag/@alfalab/core-components-shared/package.json +0 -23
- package/picker-button/@alfalab/core-components-shared/package.json +0 -23
- package/radio-group/@alfalab/core-components-shared/package.json +0 -23
- package/select-with-tags/@alfalab/core-components-shared/package.json +0 -23
- package/shared/cssm/getComponentBreakpoint/getComponentBreakpoint.d.ts +0 -2
- package/shared/cssm/getComponentBreakpoint/getComponentBreakpoint.js +0 -18
- package/shared/cssm/getComponentBreakpoint/index.d.ts +0 -1
- package/shared/cssm/getComponentBreakpoint/index.js +0 -7
- package/shared/esm/getComponentBreakpoint/getComponentBreakpoint.d.ts +0 -2
- package/shared/esm/getComponentBreakpoint/getComponentBreakpoint.js +0 -16
- package/shared/esm/getComponentBreakpoint/index.d.ts +0 -1
- package/shared/esm/getComponentBreakpoint/index.js +0 -1
- package/shared/getComponentBreakpoint/getComponentBreakpoint.d.ts +0 -2
- package/shared/getComponentBreakpoint/getComponentBreakpoint.js +0 -18
- package/shared/getComponentBreakpoint/index.d.ts +0 -1
- package/shared/getComponentBreakpoint/index.js +0 -7
- package/shared/modern/getComponentBreakpoint/getComponentBreakpoint.d.ts +0 -2
- package/shared/modern/getComponentBreakpoint/getComponentBreakpoint.js +0 -17
- package/shared/modern/getComponentBreakpoint/index.d.ts +0 -1
- package/shared/modern/getComponentBreakpoint/index.js +0 -1
- package/tag/@alfalab/core-components-shared/package.json +0 -23
- package/themes/breakpoints/breakpoint-768.css +0 -3
- package/toast/@alfalab/core-components-shared/package.json +0 -23
- package/toast-plate/@alfalab/core-components-shared/package.json +0 -23
- package/tooltip/@alfalab/core-components-shared/package.json +0 -23
- /package/gallery/{buttons-0e0683d9.d.ts → buttons-c6aed03c.d.ts} +0 -0
- /package/gallery/{buttons-0e0683d9.js → buttons-c6aed03c.js} +0 -0
- /package/gallery/esm/{buttons-eabdb51b.d.ts → buttons-62670d03.d.ts} +0 -0
- /package/gallery/esm/{buttons-eabdb51b.js → buttons-62670d03.js} +0 -0
- /package/gallery/esm/{slide-a8f6ccc1.d.ts → slide-049da652.d.ts} +0 -0
- /package/gallery/esm/{slide-a8f6ccc1.js → slide-049da652.js} +0 -0
- /package/gallery/modern/{buttons-062ff167.d.ts → buttons-c1152f47.d.ts} +0 -0
- /package/gallery/modern/{buttons-062ff167.js → buttons-c1152f47.js} +0 -0
- /package/gallery/modern/{slide-b5566e19.d.ts → slide-eb235226.d.ts} +0 -0
- /package/gallery/modern/{slide-b5566e19.js → slide-eb235226.js} +0 -0
- /package/gallery/{slide-3d8ed06b.d.ts → slide-89e87125.d.ts} +0 -0
- /package/gallery/{slide-3d8ed06b.js → slide-89e87125.js} +0 -0
- /package/{plate → picker-button}/browser-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/cssm/browser-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/cssm/useCustomWebkitScrollbar-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/esm/browser-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/esm/useCustomWebkitScrollbar-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/modern/browser-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/modern/useCustomWebkitScrollbar-a216f694.d.ts +0 -0
- /package/{plate → picker-button}/useCustomWebkitScrollbar-a216f694.d.ts +0 -0
- /package/select/cssm/{hook-aae7b381.d.ts → hook-941ed97f.d.ts} +0 -0
- /package/select/esm/{hook-cdd6fd77.d.ts → hook-b1acbe62.d.ts} +0 -0
- /package/select/{hook-504cecce.d.ts → hook-1e1150ba.d.ts} +0 -0
- /package/select/modern/{hook-f45c958e.d.ts → hook-c88964f0.d.ts} +0 -0
- /package/side-panel/esm/{layout.module-85dc8854.js → layout.module-72cc1a7a.js} +0 -0
- /package/side-panel/{layout.module-7feda991.js → layout.module-cfb65ab1.js} +0 -0
- /package/side-panel/modern/{layout.module-3ff83598.js → layout.module-3503b091.js} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { useMatchMedia } from '../../mq/esm';
|
|
4
|
-
import { getComponentBreakpoint } from '../../shared/esm';
|
|
5
4
|
import { RadioGroupDesktop } from './desktop/Component.desktop.js';
|
|
6
5
|
import { RadioGroupMobile } from './mobile/Component.mobile.js';
|
|
7
6
|
import './components/base-radio-group/Component.js';
|
|
@@ -9,7 +8,7 @@ import 'classnames';
|
|
|
9
8
|
import '@alfalab/hooks';
|
|
10
9
|
|
|
11
10
|
var RadioGroup = forwardRef(function (_a, ref) {
|
|
12
|
-
var _b = _a.breakpoint, breakpoint = _b === void 0 ?
|
|
11
|
+
var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = __rest(_a, ["breakpoint"]);
|
|
13
12
|
var query = "(min-width: ".concat(breakpoint, "px)");
|
|
14
13
|
var isDesktop = useMatchMedia(query)[0];
|
|
15
14
|
var Component = isDesktop ? RadioGroupDesktop : RadioGroupMobile;
|
package/radio-group/esm/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { useMatchMedia } from '../../mq/modern';
|
|
3
|
-
import { getComponentBreakpoint } from '../../shared/modern';
|
|
4
3
|
import { RadioGroupDesktop } from './desktop/Component.desktop.js';
|
|
5
4
|
import { RadioGroupMobile } from './mobile/Component.mobile.js';
|
|
6
5
|
import './components/base-radio-group/Component.js';
|
|
7
6
|
import 'classnames';
|
|
8
7
|
import '@alfalab/hooks';
|
|
9
8
|
|
|
10
|
-
const RadioGroup = forwardRef(({ breakpoint =
|
|
9
|
+
const RadioGroup = forwardRef(({ breakpoint = 1024, ...restProps }, ref) => {
|
|
11
10
|
const query = `(min-width: ${breakpoint}px)`;
|
|
12
11
|
const [isDesktop] = useMatchMedia(query);
|
|
13
12
|
const Component = isDesktop ? RadioGroupDesktop : RadioGroupMobile;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var coreComponentsMq = require('../mq');
|
|
6
|
-
var coreComponentsShared = require('../shared');
|
|
7
6
|
var desktop_Component_desktop = require('./desktop/Component.desktop.js');
|
|
8
7
|
var mobile_Component_mobile = require('./mobile/Component.mobile.js');
|
|
9
8
|
require('./mobile/Component.modal.mobile.js');
|
|
@@ -13,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
13
|
|
|
15
14
|
var SelectResponsive = React.forwardRef(function (_a, ref) {
|
|
16
|
-
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ?
|
|
15
|
+
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, defaultMatchMediaValue = _a.defaultMatchMediaValue, restProps = tslib.__rest(_a, ["onScroll", "fieldProps", "breakpoint", "defaultMatchMediaValue"]);
|
|
17
16
|
var isDesktop = coreComponentsMq.useMatchMedia("(min-width: ".concat(breakpoint, "px)"), defaultMatchMediaValue)[0];
|
|
18
17
|
if (isDesktop) {
|
|
19
18
|
return (React__default.default.createElement(desktop_Component_desktop.SelectDesktop, tslib.__assign({ onScroll: onScroll }, restProps, { ref: ref, fieldProps: fieldProps })));
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var coreComponentsMq = require('../../mq/cssm');
|
|
6
|
-
var coreComponentsShared = require('../../shared/cssm');
|
|
7
6
|
var desktop_Component_desktop = require('./desktop/Component.desktop.js');
|
|
8
7
|
var mobile_Component_mobile = require('./mobile/Component.mobile.js');
|
|
9
8
|
require('./mobile/Component.modal.mobile.js');
|
|
@@ -13,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
13
|
|
|
15
14
|
var SelectResponsive = React.forwardRef(function (_a, ref) {
|
|
16
|
-
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ?
|
|
15
|
+
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, defaultMatchMediaValue = _a.defaultMatchMediaValue, restProps = tslib.__rest(_a, ["onScroll", "fieldProps", "breakpoint", "defaultMatchMediaValue"]);
|
|
17
16
|
var isDesktop = coreComponentsMq.useMatchMedia("(min-width: ".concat(breakpoint, "px)"), defaultMatchMediaValue)[0];
|
|
18
17
|
if (isDesktop) {
|
|
19
18
|
return (React__default.default.createElement(desktop_Component_desktop.SelectDesktop, tslib.__assign({ onScroll: onScroll }, restProps, { ref: ref, fieldProps: fieldProps })));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var tslib = require('tslib');
|
|
2
2
|
var React = require('react');
|
|
3
|
+
var deepEqual = require('deep-equal');
|
|
3
4
|
var utils = require('./utils.js');
|
|
4
5
|
var components_optionsList_Component = require('./components/options-list/Component.js');
|
|
5
6
|
var consts = require('./consts.js');
|
|
@@ -9,6 +10,7 @@ var presets_useSelectWithApply_optionsListWithApply_header_Component = require('
|
|
|
9
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
11
|
|
|
11
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
var deepEqual__default = /*#__PURE__*/_interopDefaultCompat(deepEqual);
|
|
12
14
|
|
|
13
15
|
var OptionsListWithApply = React.forwardRef(function (_a, ref) {
|
|
14
16
|
var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, _l = _a.Header, Header = _l === void 0 ? presets_useSelectWithApply_optionsListWithApply_header_Component.Header : _l, header = _a.header, headerProps = _a.headerProps, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "showHeaderWithSelectAll", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer", "Header", "header", "headerProps"]);
|
|
@@ -102,7 +104,10 @@ function useSelectWithApply(_a) {
|
|
|
102
104
|
};
|
|
103
105
|
var handleClose = function () { return setSelectedDraft(selectedOptionsRef.current); };
|
|
104
106
|
React.useEffect(function () {
|
|
105
|
-
|
|
107
|
+
// устанавливать selectedDraft если selectedOptions изменились
|
|
108
|
+
if (!deepEqual__default.default(selectedOptionsRef.current, selectedOptions)) {
|
|
109
|
+
setSelectedDraft(selectedOptions);
|
|
110
|
+
}
|
|
106
111
|
selectedOptionsRef.current = selectedOptions;
|
|
107
112
|
}, [selectedOptions]);
|
|
108
113
|
var memoizedOptions = React.useMemo(function () { return (showSelectAll ? tslib.__spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
|
|
@@ -45,11 +45,14 @@ 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
|
+
*/
|
|
48
51
|
showClear?: boolean | undefined;
|
|
49
|
-
onClose?: (() => void) | undefined;
|
|
52
|
+
onClose?: (() => void) | undefined;
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined; /**
|
|
50
54
|
* Компонент выпадающего меню
|
|
51
55
|
*/
|
|
52
|
-
selectedDraft?: OptionShape[] | undefined;
|
|
53
56
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
57
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
55
58
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
@@ -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-941ed97f.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 }; }
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2
2
|
|
|
3
3
|
var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
|
|
4
4
|
var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
|
|
5
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
5
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-941ed97f.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -2,8 +2,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2
2
|
|
|
3
3
|
require('tslib');
|
|
4
4
|
require('react');
|
|
5
|
+
require('deep-equal');
|
|
5
6
|
require('../../utils.js');
|
|
6
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-941ed97f.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -4,7 +4,7 @@ require('tslib');
|
|
|
4
4
|
require('react');
|
|
5
5
|
require('../../../components/options-list/Component.js');
|
|
6
6
|
require('../../../consts.js');
|
|
7
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-941ed97f.js');
|
|
8
8
|
require('./footer/Component.js');
|
|
9
9
|
require('./header/Component.js');
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-941ed97f";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-
|
|
3
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-941ed97f.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
2
2
|
|
|
3
3
|
var presets_useSelectWithLoading_hook = require('../presets/useSelectWithLoading/hook.js');
|
|
4
4
|
var presets_useLazyLoading_hook = require('../presets/useLazyLoading/hook.js');
|
|
5
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
5
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-941ed97f.js');
|
|
6
6
|
var utils = require('../utils.js');
|
|
7
7
|
var components_option_Component = require('../components/option/Component.js');
|
|
8
8
|
var components_baseOption_Component = require('../components/base-option/Component.js');
|
package/select/cssm/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-bdd14a05";
|
|
9
9
|
type AnyObject = Record<string, any>;
|
|
10
10
|
type OptionShape = {
|
|
11
11
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { useMatchMedia } from '../../mq/esm';
|
|
4
|
-
import { getComponentBreakpoint } from '../../shared/esm';
|
|
5
4
|
import { SelectDesktop } from './desktop/Component.desktop.js';
|
|
6
5
|
import { SelectMobile } from './mobile/Component.mobile.js';
|
|
7
6
|
import './mobile/Component.modal.mobile.js';
|
|
@@ -15,6 +14,7 @@ import 'react-merge-refs';
|
|
|
15
14
|
import '@juggle/resize-observer';
|
|
16
15
|
import 'compute-scroll-into-view';
|
|
17
16
|
import 'downshift';
|
|
17
|
+
import '../../shared/esm';
|
|
18
18
|
import '@alfalab/hooks';
|
|
19
19
|
import './utils.js';
|
|
20
20
|
import './components/native-select/Component.js';
|
|
@@ -41,13 +41,14 @@ 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-b1acbe62.js';
|
|
45
|
+
import 'deep-equal';
|
|
45
46
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
46
47
|
import '../../button/esm/desktop';
|
|
47
48
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
48
49
|
|
|
49
50
|
var SelectResponsive = forwardRef(function (_a, ref) {
|
|
50
|
-
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ?
|
|
51
|
+
var onScroll = _a.onScroll, fieldProps = _a.fieldProps, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, defaultMatchMediaValue = _a.defaultMatchMediaValue, restProps = __rest(_a, ["onScroll", "fieldProps", "breakpoint", "defaultMatchMediaValue"]);
|
|
51
52
|
var isDesktop = useMatchMedia("(min-width: ".concat(breakpoint, "px)"), defaultMatchMediaValue)[0];
|
|
52
53
|
if (isDesktop) {
|
|
53
54
|
return (React.createElement(SelectDesktop, __assign({ onScroll: onScroll }, restProps, { ref: ref, fieldProps: fieldProps })));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign, __spreadArray } from 'tslib';
|
|
2
2
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
3
|
+
import deepEqual from 'deep-equal';
|
|
3
4
|
import { defaultAccessor, defaultFilterFn, processOptions } from './utils.js';
|
|
4
5
|
import { OptionsList } from './components/options-list/Component.js';
|
|
5
6
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
@@ -106,7 +107,10 @@ function useSelectWithApply(_a) {
|
|
|
106
107
|
};
|
|
107
108
|
var handleClose = function () { return setSelectedDraft(selectedOptionsRef.current); };
|
|
108
109
|
useEffect(function () {
|
|
109
|
-
|
|
110
|
+
// устанавливать selectedDraft если selectedOptions изменились
|
|
111
|
+
if (!deepEqual(selectedOptionsRef.current, selectedOptions)) {
|
|
112
|
+
setSelectedDraft(selectedOptions);
|
|
113
|
+
}
|
|
110
114
|
selectedOptionsRef.current = selectedOptions;
|
|
111
115
|
}, [selectedOptions]);
|
|
112
116
|
var memoizedOptions = useMemo(function () { return (showSelectAll ? __spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
|
|
@@ -45,11 +45,14 @@ 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
|
+
*/
|
|
48
51
|
showClear?: boolean | undefined;
|
|
49
|
-
onClose?: (() => void) | undefined;
|
|
52
|
+
onClose?: (() => void) | undefined;
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined; /**
|
|
50
54
|
* Компонент выпадающего меню
|
|
51
55
|
*/
|
|
52
|
-
selectedDraft?: OptionShape[] | undefined;
|
|
53
56
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
57
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
55
58
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
package/select/esm/index.js
CHANGED
|
@@ -2,7 +2,6 @@ export { SelectResponsive as Select } from './Component.responsive.js';
|
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../../mq/esm';
|
|
5
|
-
import '../../shared/esm';
|
|
6
5
|
import './desktop/Component.desktop.js';
|
|
7
6
|
import '../../form-control/esm/desktop';
|
|
8
7
|
import '../../popover/esm';
|
|
@@ -14,6 +13,7 @@ import 'react-merge-refs';
|
|
|
14
13
|
import '@juggle/resize-observer';
|
|
15
14
|
import 'compute-scroll-into-view';
|
|
16
15
|
import 'downshift';
|
|
16
|
+
import '../../shared/esm';
|
|
17
17
|
import '@alfalab/hooks';
|
|
18
18
|
import './utils.js';
|
|
19
19
|
import './components/native-select/Component.js';
|
|
@@ -41,7 +41,8 @@ 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-b1acbe62.js';
|
|
45
|
+
import 'deep-equal';
|
|
45
46
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
46
47
|
import '../../button/esm/desktop';
|
|
47
48
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -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-b1acbe62.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';
|
|
@@ -38,6 +38,7 @@ import '../../../scrollbar/esm';
|
|
|
38
38
|
import '../../../input/esm';
|
|
39
39
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
40
40
|
import 'react-virtual';
|
|
41
|
+
import 'deep-equal';
|
|
41
42
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
42
43
|
import '../../../button/esm/desktop';
|
|
43
44
|
|
|
@@ -37,7 +37,8 @@ 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-b1acbe62.js';
|
|
41
|
+
import 'deep-equal';
|
|
41
42
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
42
43
|
import '../../../button/esm/desktop';
|
|
43
44
|
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -38,7 +38,8 @@ 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-b1acbe62.js';
|
|
42
|
+
import 'deep-equal';
|
|
42
43
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
43
44
|
import '../../../button/esm/desktop';
|
|
44
45
|
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -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-b1acbe62.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../../skeleton/esm';
|
|
@@ -14,6 +14,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
14
14
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
15
15
|
import '../components/checkmark-mobile/Component.js';
|
|
16
16
|
import 'intersection-observer';
|
|
17
|
+
import 'deep-equal';
|
|
17
18
|
import '../utils.js';
|
|
18
19
|
import '../../../shared/esm';
|
|
19
20
|
import '../components/options-list/Component.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import 'tslib';
|
|
2
2
|
import 'react';
|
|
3
|
+
import 'deep-equal';
|
|
3
4
|
import '../../../../shared/esm';
|
|
4
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
5
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-b1acbe62.js';
|
|
5
6
|
import '../../utils.js';
|
|
6
7
|
import '../../components/options-list/Component.js';
|
|
7
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-b1acbe62.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
7
7
|
import 'react-merge-refs';
|
|
@@ -12,5 +12,6 @@ import '../../../../../shared/esm';
|
|
|
12
12
|
import '../../../consts.js';
|
|
13
13
|
import '../../../utils.js';
|
|
14
14
|
import '../../../components/optgroup/Component.js';
|
|
15
|
+
import 'deep-equal';
|
|
15
16
|
import '../../../../../button/esm/desktop';
|
|
16
17
|
import '../../../../../checkbox/esm';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-b1acbe62";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
1
|
+
export { O as OptionsListWithApply } from '../../../hook-b1acbe62.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import 'react';
|
|
4
|
+
import 'deep-equal';
|
|
4
5
|
import '../../../utils.js';
|
|
5
6
|
import '../../../../../shared/esm';
|
|
6
7
|
import '../../../components/options-list/Component.js';
|
|
@@ -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-b1acbe62.js';
|
|
4
4
|
export { defaultAccessor, defaultFilterFn, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
5
5
|
export { Option } from '../components/option/Component.js';
|
|
6
6
|
export { BaseOption } from '../components/base-option/Component.js';
|
|
@@ -24,6 +24,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
24
24
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
25
25
|
import '../components/checkmark-mobile/Component.js';
|
|
26
26
|
import 'intersection-observer';
|
|
27
|
+
import 'deep-equal';
|
|
27
28
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
28
29
|
import '../../../button/esm/desktop';
|
|
29
30
|
import '../../../shared/esm';
|
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-bdd14a05";
|
|
9
9
|
type AnyObject = Record<string, any>;
|
|
10
10
|
type OptionShape = {
|
|
11
11
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var tslib = require('tslib');
|
|
2
2
|
var React = require('react');
|
|
3
|
+
var deepEqual = require('deep-equal');
|
|
3
4
|
var utils = require('./utils.js');
|
|
4
5
|
var components_optionsList_Component = require('./components/options-list/Component.js');
|
|
5
6
|
var consts = require('./consts.js');
|
|
@@ -9,6 +10,7 @@ var presets_useSelectWithApply_optionsListWithApply_header_Component = require('
|
|
|
9
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
11
|
|
|
11
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
var deepEqual__default = /*#__PURE__*/_interopDefaultCompat(deepEqual);
|
|
12
14
|
|
|
13
15
|
var OptionsListWithApply = React.forwardRef(function (_a, ref) {
|
|
14
16
|
var toggleMenu = _a.toggleMenu, defaultGetOptionProps = _a.getOptionProps, _b = _a.showClear, showClear = _b === void 0 ? true : _b, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _c = _a.selectedDraft, selectedDraft = _c === void 0 ? [] : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.OptionsList, OptionsList = _e === void 0 ? components_optionsList_Component.OptionsList : _e, _f = _a.onApply, onApply = _f === void 0 ? function () { return null; } : _f, _g = _a.onClear, onClear = _g === void 0 ? function () { return null; } : _g, _h = _a.onClose, onClose = _h === void 0 ? function () { return null; } : _h, _j = _a.visibleOptions, visibleOptions = _j === void 0 ? consts.DEFAULT_VISIBLE_OPTIONS : _j, _k = _a.Footer, Footer = _k === void 0 ? presets_useSelectWithApply_optionsListWithApply_footer_Component.Footer : _k, _l = _a.Header, Header = _l === void 0 ? presets_useSelectWithApply_optionsListWithApply_header_Component.Header : _l, header = _a.header, headerProps = _a.headerProps, restProps = tslib.__rest(_a, ["toggleMenu", "getOptionProps", "showClear", "showHeaderWithSelectAll", "selectedDraft", "flatOptions", "OptionsList", "onApply", "onClear", "onClose", "visibleOptions", "Footer", "Header", "header", "headerProps"]);
|
|
@@ -102,7 +104,10 @@ function useSelectWithApply(_a) {
|
|
|
102
104
|
};
|
|
103
105
|
var handleClose = function () { return setSelectedDraft(selectedOptionsRef.current); };
|
|
104
106
|
React.useEffect(function () {
|
|
105
|
-
|
|
107
|
+
// устанавливать selectedDraft если selectedOptions изменились
|
|
108
|
+
if (!deepEqual__default.default(selectedOptionsRef.current, selectedOptions)) {
|
|
109
|
+
setSelectedDraft(selectedOptions);
|
|
110
|
+
}
|
|
106
111
|
selectedOptionsRef.current = selectedOptions;
|
|
107
112
|
}, [selectedOptions]);
|
|
108
113
|
var memoizedOptions = React.useMemo(function () { return (showSelectAll ? tslib.__spreadArray([selectAllOption], options, true) : options); }, [options, showSelectAll]);
|
|
@@ -45,11 +45,14 @@ 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
|
+
*/
|
|
48
51
|
showClear?: boolean | undefined;
|
|
49
|
-
onClose?: (() => void) | undefined;
|
|
52
|
+
onClose?: (() => void) | undefined;
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined; /**
|
|
50
54
|
* Компонент выпадающего меню
|
|
51
55
|
*/
|
|
52
|
-
selectedDraft?: OptionShape[] | undefined;
|
|
53
56
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
57
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
55
58
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
@@ -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-1e1150ba.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 }; }
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { useMatchMedia } from '../../mq/modern';
|
|
3
|
-
import { getComponentBreakpoint } from '../../shared/modern';
|
|
4
3
|
import { SelectDesktop } from './desktop/Component.desktop.js';
|
|
5
4
|
import { SelectMobile } from './mobile/Component.mobile.js';
|
|
6
5
|
import './mobile/Component.modal.mobile.js';
|
|
@@ -14,6 +13,7 @@ import 'react-merge-refs';
|
|
|
14
13
|
import '@juggle/resize-observer';
|
|
15
14
|
import 'compute-scroll-into-view';
|
|
16
15
|
import 'downshift';
|
|
16
|
+
import '../../shared/modern';
|
|
17
17
|
import '@alfalab/hooks';
|
|
18
18
|
import './utils.js';
|
|
19
19
|
import './components/native-select/Component.js';
|
|
@@ -40,12 +40,13 @@ 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-c88964f0.js';
|
|
44
|
+
import 'deep-equal';
|
|
44
45
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
45
46
|
import '../../button/modern/desktop';
|
|
46
47
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
47
48
|
|
|
48
|
-
const SelectResponsive = forwardRef(({ onScroll, fieldProps, breakpoint =
|
|
49
|
+
const SelectResponsive = forwardRef(({ onScroll, fieldProps, breakpoint = 1024, defaultMatchMediaValue, ...restProps }, ref) => {
|
|
49
50
|
const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
|
|
50
51
|
if (isDesktop) {
|
|
51
52
|
return (React.createElement(SelectDesktop, { onScroll: onScroll, ...restProps, ref: ref, fieldProps: fieldProps }));
|
|
@@ -45,11 +45,14 @@ 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
|
+
*/
|
|
48
51
|
showClear?: boolean | undefined;
|
|
49
|
-
onClose?: (() => void) | undefined;
|
|
52
|
+
onClose?: (() => void) | undefined;
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined; /**
|
|
50
54
|
* Компонент выпадающего меню
|
|
51
55
|
*/
|
|
52
|
-
selectedDraft?: OptionShape[] | undefined;
|
|
53
56
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
57
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
55
58
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
2
|
+
import deepEqual from 'deep-equal';
|
|
2
3
|
import { defaultAccessor, defaultFilterFn, processOptions } from './utils.js';
|
|
3
4
|
import { OptionsList } from './components/options-list/Component.js';
|
|
4
5
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
@@ -103,7 +104,10 @@ function useSelectWithApply({ options, selected, onChange = () => null, OptionsL
|
|
|
103
104
|
};
|
|
104
105
|
const handleClose = () => setSelectedDraft(selectedOptionsRef.current);
|
|
105
106
|
useEffect(() => {
|
|
106
|
-
|
|
107
|
+
// устанавливать selectedDraft если selectedOptions изменились
|
|
108
|
+
if (!deepEqual(selectedOptionsRef.current, selectedOptions)) {
|
|
109
|
+
setSelectedDraft(selectedOptions);
|
|
110
|
+
}
|
|
107
111
|
selectedOptionsRef.current = selectedOptions;
|
|
108
112
|
}, [selectedOptions]);
|
|
109
113
|
const memoizedOptions = useMemo(() => (showSelectAll ? [selectAllOption, ...options] : options), [options, showSelectAll]);
|
package/select/modern/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { SelectResponsive as Select } from './Component.responsive.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../mq/modern';
|
|
4
|
-
import '../../shared/modern';
|
|
5
4
|
import './desktop/Component.desktop.js';
|
|
6
5
|
import '../../form-control/modern/desktop';
|
|
7
6
|
import '../../popover/modern';
|
|
@@ -13,6 +12,7 @@ import 'react-merge-refs';
|
|
|
13
12
|
import '@juggle/resize-observer';
|
|
14
13
|
import 'compute-scroll-into-view';
|
|
15
14
|
import 'downshift';
|
|
15
|
+
import '../../shared/modern';
|
|
16
16
|
import '@alfalab/hooks';
|
|
17
17
|
import './utils.js';
|
|
18
18
|
import './components/native-select/Component.js';
|
|
@@ -40,7 +40,8 @@ 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-c88964f0.js';
|
|
44
|
+
import 'deep-equal';
|
|
44
45
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
45
46
|
import '../../button/modern/desktop';
|
|
46
47
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|