@alfalab/core-components 45.8.0-beta.2 → 45.8.0-beta.3
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/base-modal/Component.d.ts +0 -4
- package/base-modal/Component.js +11 -28
- package/base-modal/cssm/Component.d.ts +0 -4
- package/base-modal/cssm/Component.js +11 -28
- package/base-modal/cssm/utils.d.ts +1 -1
- package/base-modal/cssm/utils.js +2 -5
- package/base-modal/esm/Component.d.ts +0 -4
- package/base-modal/esm/Component.js +12 -29
- package/base-modal/esm/index.js +0 -1
- package/base-modal/esm/utils.d.ts +1 -1
- package/base-modal/esm/utils.js +2 -5
- package/base-modal/modern/Component.d.ts +0 -4
- package/base-modal/modern/Component.js +5 -22
- package/base-modal/modern/index.js +0 -1
- package/base-modal/modern/utils.d.ts +1 -1
- package/base-modal/modern/utils.js +2 -4
- package/base-modal/utils.d.ts +1 -1
- package/base-modal/utils.js +2 -5
- package/calendar-range/esm/Component.js +1 -1
- package/calendar-range/esm/index.js +1 -1
- package/calendar-range/esm/views/popover.js +1 -1
- package/calendar-range/esm/views/static.js +1 -1
- package/calendar-range/modern/Component.js +1 -1
- package/calendar-range/modern/index.js +1 -1
- package/calendar-range/modern/views/popover.js +1 -1
- package/calendar-range/modern/views/static.js +1 -1
- package/calendar-range/utils.js +1 -3
- package/calendar-range/views/popover.js +1 -1
- package/calendar-range/views/static.js +1 -1
- 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/dropzone/Component.d.ts +1 -1
- package/dropzone/Component.js +1 -1
- package/dropzone/cssm/Component.d.ts +1 -1
- package/dropzone/cssm/Component.js +1 -1
- package/dropzone/esm/Component.d.ts +1 -1
- package/dropzone/esm/Component.js +1 -1
- package/dropzone/modern/Component.d.ts +1 -1
- package/dropzone/modern/Component.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/cssm/index-bdb4c6b9.d.ts +2 -9
- package/international-phone-input/cssm/use-skeleton-1328ead9.d.ts +4 -0
- package/international-phone-input/esm/index-bdb4c6b9.d.ts +2 -9
- package/international-phone-input/esm/use-skeleton-1328ead9.d.ts +4 -0
- package/international-phone-input/index-bdb4c6b9.d.ts +2 -9
- package/international-phone-input/modern/index-bdb4c6b9.d.ts +2 -9
- package/international-phone-input/modern/use-skeleton-1328ead9.d.ts +4 -0
- package/international-phone-input/use-skeleton-1328ead9.d.ts +4 -0
- 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/notification/browser-a216f694.d.ts +6 -0
- package/notification/cssm/browser-a216f694.d.ts +6 -0
- package/notification/cssm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/notification/cssm/utils/getNotificationTestIds.d.ts +5 -0
- package/notification/cssm/utils/getNotificationTestIds.js +18 -0
- package/notification/esm/browser-a216f694.d.ts +6 -0
- package/notification/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/notification/esm/utils/getNotificationTestIds.d.ts +5 -0
- package/notification/esm/utils/getNotificationTestIds.js +16 -0
- package/notification/modern/browser-a216f694.d.ts +6 -0
- package/notification/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/notification/modern/utils/getNotificationTestIds.d.ts +5 -0
- package/notification/modern/utils/getNotificationTestIds.js +16 -0
- package/notification/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/notification/utils/getNotificationTestIds.d.ts +5 -0
- package/notification/utils/getNotificationTestIds.js +18 -0
- package/package.json +1 -1
- package/picker-button/{modern/index-a5b021bd.d.ts → cssm/index-307da6d7.d.ts} +2 -1
- package/picker-button/cssm/index-bdb4c6b9.d.ts +2 -9
- package/picker-button/cssm/use-skeleton-1328ead9.d.ts +4 -0
- package/picker-button/{cssm/index-a5b021bd.d.ts → esm/index-307da6d7.d.ts} +2 -1
- package/picker-button/esm/index-bdb4c6b9.d.ts +2 -9
- package/picker-button/esm/use-skeleton-1328ead9.d.ts +4 -0
- package/picker-button/{index-a5b021bd.d.ts → index-307da6d7.d.ts} +2 -1
- package/picker-button/index-bdb4c6b9.d.ts +2 -9
- package/picker-button/{esm/index-a5b021bd.d.ts → modern/index-307da6d7.d.ts} +2 -1
- package/picker-button/modern/index-bdb4c6b9.d.ts +2 -9
- package/picker-button/modern/use-skeleton-1328ead9.d.ts +4 -0
- package/picker-button/use-skeleton-1328ead9.d.ts +4 -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/shared/cssm/exhaustiveCheck.d.ts +2 -0
- package/shared/cssm/exhaustiveCheck.js +5 -0
- package/shared/cssm/index.d.ts +1 -0
- package/shared/cssm/index.js +2 -0
- package/shared/esm/exhaustiveCheck.d.ts +2 -0
- package/shared/esm/exhaustiveCheck.js +3 -0
- package/shared/esm/index.d.ts +1 -0
- package/shared/esm/index.js +1 -0
- package/shared/exhaustiveCheck.d.ts +2 -0
- package/shared/exhaustiveCheck.js +5 -0
- package/shared/index.d.ts +1 -0
- package/shared/index.js +2 -0
- package/shared/modern/exhaustiveCheck.d.ts +2 -0
- package/shared/modern/exhaustiveCheck.js +3 -0
- package/shared/modern/index.d.ts +1 -0
- package/shared/modern/index.js +1 -0
- 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/skeleton/Component.d.ts +4 -0
- package/skeleton/Component.js +6 -3
- package/skeleton/cssm/Component.d.ts +4 -0
- package/skeleton/cssm/Component.js +5 -2
- package/skeleton/cssm/index.module.css +9 -42
- package/skeleton/esm/Component.d.ts +4 -0
- package/skeleton/esm/Component.js +6 -3
- package/skeleton/esm/index.css +9 -42
- package/skeleton/index.css +9 -42
- package/skeleton/modern/Component.d.ts +4 -0
- package/skeleton/modern/Component.js +6 -3
- package/skeleton/modern/index.css +9 -42
- package/status-badge/Component.d.ts +8 -3
- package/status-badge/Component.js +3 -73
- package/status-badge/consts/iconMap.d.ts +4 -0
- package/status-badge/consts/iconMap.js +76 -0
- package/status-badge/cssm/Component.d.ts +8 -3
- package/status-badge/cssm/Component.js +3 -73
- package/status-badge/cssm/consts/iconMap.d.ts +4 -0
- package/status-badge/cssm/consts/iconMap.js +76 -0
- package/status-badge/cssm/hooks/useStatusBadgeIcon.d.ts +5 -0
- package/status-badge/cssm/hooks/useStatusBadgeIcon.js +21 -0
- package/status-badge/cssm/index.d.ts +1 -0
- package/status-badge/cssm/types/statusBadgePropTypes.d.ts +7 -0
- package/status-badge/cssm/types/statusBadgePropTypes.js +1 -0
- package/status-badge/esm/Component.d.ts +8 -3
- package/status-badge/esm/Component.js +18 -73
- package/status-badge/esm/consts/iconMap.d.ts +4 -0
- package/status-badge/esm/consts/iconMap.js +74 -0
- package/status-badge/esm/hooks/useStatusBadgeIcon.d.ts +5 -0
- package/status-badge/esm/hooks/useStatusBadgeIcon.js +32 -0
- package/status-badge/esm/index.d.ts +1 -0
- package/status-badge/esm/index.js +3 -0
- package/status-badge/esm/types/statusBadgePropTypes.d.ts +7 -0
- package/status-badge/esm/types/statusBadgePropTypes.js +1 -0
- package/status-badge/hooks/useStatusBadgeIcon.d.ts +5 -0
- package/status-badge/hooks/useStatusBadgeIcon.js +21 -0
- package/status-badge/index.d.ts +1 -0
- package/status-badge/modern/Component.d.ts +8 -3
- package/status-badge/modern/Component.js +17 -73
- package/status-badge/modern/consts/iconMap.d.ts +4 -0
- package/status-badge/modern/consts/iconMap.js +74 -0
- package/status-badge/modern/hooks/useStatusBadgeIcon.d.ts +5 -0
- package/status-badge/modern/hooks/useStatusBadgeIcon.js +34 -0
- package/status-badge/modern/index.d.ts +1 -0
- package/status-badge/modern/index.js +2 -0
- package/status-badge/modern/types/statusBadgePropTypes.d.ts +7 -0
- package/status-badge/modern/types/statusBadgePropTypes.js +1 -0
- package/status-badge/types/statusBadgePropTypes.d.ts +7 -0
- package/status-badge/types/statusBadgePropTypes.js +1 -0
- package/tab-bar/Component.js +7 -3
- package/tab-bar/components/tab/Component.js +9 -5
- package/tab-bar/components/tab/index.css +5 -2
- package/tab-bar/consts.d.ts +9 -0
- package/tab-bar/consts.js +13 -0
- package/tab-bar/cssm/Component.js +6 -2
- package/tab-bar/cssm/components/tab/Component.js +8 -4
- package/tab-bar/cssm/components/tab/index.module.css +5 -2
- package/tab-bar/cssm/consts.d.ts +9 -0
- package/tab-bar/cssm/consts.js +13 -0
- package/tab-bar/cssm/index.module.css +9 -7
- package/tab-bar/cssm/types.d.ts +11 -3
- package/tab-bar/esm/Component.js +9 -4
- package/tab-bar/esm/components/tab/Component.js +9 -5
- package/tab-bar/esm/components/tab/index.css +5 -2
- package/tab-bar/esm/components/tab/index.js +2 -1
- package/tab-bar/esm/consts.d.ts +9 -0
- package/tab-bar/esm/consts.js +10 -0
- package/tab-bar/esm/index.css +9 -7
- package/tab-bar/esm/index.js +2 -1
- package/tab-bar/esm/types.d.ts +11 -3
- package/tab-bar/index.css +9 -7
- package/tab-bar/modern/Component.js +9 -4
- package/tab-bar/modern/components/tab/Component.js +9 -5
- package/tab-bar/modern/components/tab/index.css +5 -2
- package/tab-bar/modern/components/tab/index.js +2 -1
- package/tab-bar/modern/consts.d.ts +9 -0
- package/tab-bar/modern/consts.js +10 -0
- package/tab-bar/modern/index.css +9 -7
- package/tab-bar/modern/index.js +2 -1
- package/tab-bar/modern/types.d.ts +11 -3
- package/tab-bar/types.d.ts +11 -3
- package/themes/click.css +0 -6
- package/themes/compiled/mobile-dark-bluetint.css +70 -219
- package/themes/mixins/click.css +0 -2
- package/toast-plate/browser-a216f694.d.ts +6 -0
- package/toast-plate/components/base-toast-plate/component.d.ts +9 -12
- package/toast-plate/components/base-toast-plate/component.js +16 -14
- package/toast-plate/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
- package/toast-plate/components/base-toast-plate/hooks/useCustomIcons.js +13 -0
- package/toast-plate/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
- package/toast-plate/components/base-toast-plate/hooks/useDeprecatedBadge.js +26 -0
- package/toast-plate/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
- package/toast-plate/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
- package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
- package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +14 -0
- package/toast-plate/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
- package/toast-plate/components/base-toast-plate/utils/isUnsafeBadge.js +8 -0
- package/toast-plate/cssm/browser-a216f694.d.ts +6 -0
- package/toast-plate/cssm/components/base-toast-plate/component.d.ts +9 -12
- package/toast-plate/cssm/components/base-toast-plate/component.js +16 -14
- package/toast-plate/cssm/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
- package/toast-plate/cssm/components/base-toast-plate/hooks/useCustomIcons.js +13 -0
- package/toast-plate/cssm/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
- package/toast-plate/cssm/components/base-toast-plate/hooks/useDeprecatedBadge.js +26 -0
- package/toast-plate/cssm/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
- package/toast-plate/cssm/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
- package/toast-plate/cssm/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
- package/toast-plate/cssm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +14 -0
- package/toast-plate/cssm/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
- package/toast-plate/cssm/components/base-toast-plate/utils/isUnsafeBadge.js +8 -0
- 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 +6 -4
- package/toast-plate/esm/browser-a216f694.d.ts +6 -0
- package/toast-plate/esm/components/base-toast-plate/component.d.ts +9 -12
- package/toast-plate/esm/components/base-toast-plate/component.js +16 -14
- package/toast-plate/esm/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
- package/toast-plate/esm/components/base-toast-plate/hooks/useCustomIcons.js +11 -0
- package/toast-plate/esm/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
- package/toast-plate/esm/components/base-toast-plate/hooks/useDeprecatedBadge.js +24 -0
- package/toast-plate/esm/components/base-toast-plate/index.js +6 -4
- package/toast-plate/esm/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
- package/toast-plate/esm/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
- package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
- package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +12 -0
- package/toast-plate/esm/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
- package/toast-plate/esm/components/base-toast-plate/utils/isUnsafeBadge.js +6 -0
- package/toast-plate/esm/desktop/Component.desktop.js +6 -4
- package/toast-plate/esm/desktop/index.js +6 -4
- package/toast-plate/esm/getDataTestId-b3cf0f77.d.ts +3 -0
- package/toast-plate/esm/getDataTestId-b3cf0f77.js +6 -0
- package/toast-plate/esm/index-307da6d7.d.ts +71 -0
- package/toast-plate/esm/index.js +6 -4
- package/toast-plate/esm/mobile/Component.mobile.js +6 -4
- package/toast-plate/esm/mobile/index.js +6 -4
- package/toast-plate/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/toast-plate/getDataTestId-439ac98c.d.ts +3 -0
- package/toast-plate/getDataTestId-439ac98c.js +6 -0
- package/toast-plate/index-307da6d7.d.ts +71 -0
- package/toast-plate/modern/Component.responsive.js +6 -4
- package/toast-plate/modern/browser-a216f694.d.ts +6 -0
- package/toast-plate/modern/components/base-toast-plate/component.d.ts +9 -12
- package/toast-plate/modern/components/base-toast-plate/component.js +16 -14
- package/toast-plate/modern/components/base-toast-plate/hooks/useCustomIcons.d.ts +6 -0
- package/toast-plate/modern/components/base-toast-plate/hooks/useCustomIcons.js +11 -0
- package/toast-plate/modern/components/base-toast-plate/hooks/useDeprecatedBadge.d.ts +7 -0
- package/toast-plate/modern/components/base-toast-plate/hooks/useDeprecatedBadge.js +24 -0
- package/toast-plate/modern/components/base-toast-plate/index.js +6 -4
- package/toast-plate/modern/components/base-toast-plate/types/unsafeBadgeProps.d.ts +6 -0
- package/toast-plate/modern/components/base-toast-plate/types/unsafeBadgeProps.js +1 -0
- package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.d.ts +5 -0
- package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +12 -0
- package/toast-plate/modern/components/base-toast-plate/utils/isUnsafeBadge.d.ts +5 -0
- package/toast-plate/modern/components/base-toast-plate/utils/isUnsafeBadge.js +4 -0
- package/toast-plate/modern/desktop/Component.desktop.js +6 -4
- package/toast-plate/modern/desktop/index.js +6 -4
- package/toast-plate/modern/getDataTestId-8aa8ef85.d.ts +3 -0
- package/toast-plate/modern/getDataTestId-8aa8ef85.js +6 -0
- package/toast-plate/modern/index-307da6d7.d.ts +71 -0
- package/toast-plate/modern/index.js +6 -4
- package/toast-plate/modern/mobile/Component.mobile.js +6 -4
- package/toast-plate/modern/mobile/index.js +6 -4
- package/toast-plate/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/toast-plate/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
- package/typography/esm/component.js +2 -2
- package/typography/esm/index.js +2 -2
- package/typography/esm/text/component.js +1 -1
- package/typography/esm/text/index.js +1 -1
- package/typography/esm/title/component.js +1 -1
- package/typography/esm/title/index.js +2 -2
- package/typography/esm/title-mobile/component.js +2 -2
- package/typography/esm/title-mobile/index.js +2 -2
- package/typography/esm/title-responsive/component.js +2 -2
- package/typography/esm/title-responsive/index.js +2 -2
- package/typography/modern/component.js +2 -2
- package/typography/modern/index.js +2 -2
- package/typography/modern/text/component.js +1 -1
- package/typography/modern/text/index.js +1 -1
- package/typography/modern/title/component.js +1 -1
- package/typography/modern/title/index.js +2 -2
- package/typography/modern/title-mobile/component.js +2 -2
- package/typography/modern/title-mobile/index.js +2 -2
- package/typography/modern/title-responsive/component.js +2 -2
- package/typography/modern/title-responsive/index.js +2 -2
- package/typography/text/component.js +1 -1
- package/typography/title/component.js +1 -1
- package/typography/title/index.js +1 -1
- package/typography/title-mobile/component.js +1 -1
- package/typography/title-responsive/component.js +1 -1
- package/universal-date-input/cssm/index-5712fce2.d.ts +1 -8
- package/universal-date-input/cssm/use-skeleton-1328ead9.d.ts +4 -0
- package/universal-date-input/esm/index-5712fce2.d.ts +1 -8
- package/universal-date-input/esm/use-skeleton-1328ead9.d.ts +4 -0
- package/universal-date-input/index-5712fce2.d.ts +1 -8
- package/universal-date-input/modern/index-5712fce2.d.ts +1 -8
- package/universal-date-input/modern/use-skeleton-1328ead9.d.ts +4 -0
- package/universal-date-input/use-skeleton-1328ead9.d.ts +4 -0
- package/base-modal/cssm/helpers/lockScroll.d.ts +0 -4
- package/base-modal/cssm/helpers/lockScroll.js +0 -18
- package/base-modal/esm/helpers/lockScroll.d.ts +0 -4
- package/base-modal/esm/helpers/lockScroll.js +0 -14
- package/base-modal/helpers/lockScroll.d.ts +0 -4
- package/base-modal/helpers/lockScroll.js +0 -18
- package/base-modal/modern/helpers/lockScroll.d.ts +0 -4
- package/base-modal/modern/helpers/lockScroll.js +0 -14
- package/themes/mixins/skeleton/click.css +0 -8
- package/themes/skeleton/click.css +0 -8
- /package/calendar-range/esm/{index.module-7ba85cb1.js → index.module-912e88cf.js} +0 -0
- /package/calendar-range/{index.module-c6ded4a2.js → index.module-bf0591f0.js} +0 -0
- /package/calendar-range/modern/{index.module-0604d154.js → index.module-636e08a2.js} +0 -0
- /package/confirmation/{countdown-section-9194293e.d.ts → countdown-section-b30d5212.d.ts} +0 -0
- /package/confirmation/{countdown-section-9194293e.js → countdown-section-b30d5212.js} +0 -0
- /package/confirmation/esm/{countdown-section-fc384721.d.ts → countdown-section-c4f73a77.d.ts} +0 -0
- /package/confirmation/esm/{countdown-section-fc384721.js → countdown-section-c4f73a77.js} +0 -0
- /package/confirmation/modern/{countdown-section-f33e01b7.d.ts → countdown-section-f3215ad8.d.ts} +0 -0
- /package/confirmation/modern/{countdown-section-f33e01b7.js → countdown-section-f3215ad8.js} +0 -0
- /package/gallery/{buttons-160fdb5a.d.ts → buttons-19c30d23.d.ts} +0 -0
- /package/gallery/{buttons-160fdb5a.js → buttons-19c30d23.js} +0 -0
- /package/gallery/esm/{buttons-f951e5ce.d.ts → buttons-37ed3ab5.d.ts} +0 -0
- /package/gallery/esm/{buttons-f951e5ce.js → buttons-37ed3ab5.js} +0 -0
- /package/gallery/esm/{slide-3595abb4.d.ts → slide-8d1299a5.d.ts} +0 -0
- /package/gallery/esm/{slide-3595abb4.js → slide-8d1299a5.js} +0 -0
- /package/gallery/modern/{buttons-a3ff616b.d.ts → buttons-92efe05c.d.ts} +0 -0
- /package/gallery/modern/{buttons-a3ff616b.js → buttons-92efe05c.js} +0 -0
- /package/gallery/modern/{slide-acb49e8e.d.ts → slide-57aa7661.d.ts} +0 -0
- /package/gallery/modern/{slide-acb49e8e.js → slide-57aa7661.js} +0 -0
- /package/gallery/{slide-2268997b.d.ts → slide-45ca49f1.d.ts} +0 -0
- /package/gallery/{slide-2268997b.js → slide-45ca49f1.js} +0 -0
- /package/modal/esm/{layout.module-2fe04090.js → layout.module-b635b128.js} +0 -0
- /package/modal/{layout.module-8adfa2ca.js → layout.module-34149103.js} +0 -0
- /package/modal/modern/{layout.module-5847d827.js → layout.module-41e8947b.js} +0 -0
- /package/picker-button/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
- /package/picker-button/cssm/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
- /package/picker-button/esm/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
- /package/picker-button/modern/{Component-a5b021bd.d.ts → Component-307da6d7.d.ts} +0 -0
- /package/pure-cell/{component-41907143.d.ts → component-5e8acf12.d.ts} +0 -0
- /package/pure-cell/{component-41907143.js → component-5e8acf12.js} +0 -0
- /package/pure-cell/esm/{component-e23350f5.d.ts → component-f28a5631.d.ts} +0 -0
- /package/pure-cell/esm/{component-e23350f5.js → component-f28a5631.js} +0 -0
- /package/pure-cell/modern/{component-b9194169.d.ts → component-10bc9276.d.ts} +0 -0
- /package/pure-cell/modern/{component-b9194169.js → component-10bc9276.js} +0 -0
- /package/side-panel/esm/{layout.module-a9e68775.js → layout.module-0dc6a00f.js} +0 -0
- /package/side-panel/{layout.module-df4fedc9.js → layout.module-5eeb8248.js} +0 -0
- /package/side-panel/modern/{layout.module-d348cc57.js → layout.module-6f83e451.js} +0 -0
- /package/typography/{colors.module-a11b73e9.js → colors.module-5b90a9cc.js} +0 -0
- /package/typography/{common.module-25e7ce83.js → common.module-53a00318.js} +0 -0
- /package/typography/esm/{colors.module-e5414e42.js → colors.module-f2501c6f.js} +0 -0
- /package/typography/esm/{common.module-bd07cc74.js → common.module-04c7810e.js} +0 -0
- /package/typography/modern/{colors.module-9fa7fdee.js → colors.module-83a4b747.js} +0 -0
- /package/typography/modern/{common.module-e73684d9.js → common.module-278c339a.js} +0 -0
|
@@ -134,10 +134,6 @@ type BaseModalProps = {
|
|
|
134
134
|
* Реф, который должен быть установлен компонентной области
|
|
135
135
|
*/
|
|
136
136
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
137
|
-
/**
|
|
138
|
-
* Блокирует скролл когда модальное окно открыто. Работает только на iOS.
|
|
139
|
-
*/
|
|
140
|
-
iOSLock?: boolean;
|
|
141
137
|
};
|
|
142
138
|
type BaseModalContext = {
|
|
143
139
|
parentRef: React.RefObject<HTMLDivElement>;
|
package/base-modal/Component.js
CHANGED
|
@@ -11,7 +11,6 @@ var coreComponentsBackdrop = require('../backdrop');
|
|
|
11
11
|
var coreComponentsPortal = require('../portal');
|
|
12
12
|
var coreComponentsShared = require('../shared');
|
|
13
13
|
var coreComponentsStack = require('../stack');
|
|
14
|
-
var helpers_lockScroll = require('./helpers/lockScroll.js');
|
|
15
14
|
var utils = require('./utils.js');
|
|
16
15
|
require('./matches-polyfill.js');
|
|
17
16
|
|
|
@@ -42,14 +41,14 @@ var BaseModalContext = React__default.default.createContext({
|
|
|
42
41
|
onClose: function () { return null; },
|
|
43
42
|
});
|
|
44
43
|
var BaseModal = React.forwardRef(function (_a, ref) {
|
|
45
|
-
var open = _a.open, container = _a.container, children = _a.children, _b = _a.scrollHandler, scrollHandler = _b === void 0 ? 'wrapper' : _b, _c = _a.Backdrop, Backdrop = _c === void 0 ? coreComponentsBackdrop.Backdrop : _c, _d = _a.backdropProps, backdropProps = _d === void 0 ? {} : _d, _e = _a.transitionProps, transitionProps = _e === void 0 ? {} : _e, disableBackdropClick = _a.disableBackdropClick, _f = _a.disableAutoFocus, disableAutoFocus = _f === void 0 ? false : _f, _g = _a.disableFocusLock, disableFocusLock = _g === void 0 ? false : _g, _h = _a.disableEscapeKeyDown, disableEscapeKeyDown = _h === void 0 ? false : _h, _j = _a.disableRestoreFocus, disableRestoreFocus = _j === void 0 ? false : _j, _k = _a.disableBlockingScroll, disableBlockingScroll = _k === void 0 ? false : _k, _l = _a.keepMounted, keepMounted = _l === void 0 ? false : _l, className = _a.className, contentClassName = _a.contentClassName, wrapperProps = _a.wrapperProps, contentProps = _a.contentProps, componentDivProps = _a.componentDivProps, wrapperClassName = _a.wrapperClassName, onBackdropClick = _a.onBackdropClick, onClose = _a.onClose, onEscapeKeyDown = _a.onEscapeKeyDown, onMount = _a.onMount, onUnmount = _a.onUnmount, dataTestId = _a.dataTestId, _m = _a.zIndex, zIndex = _m === void 0 ? coreComponentsStack.stackingOrder.MODAL : _m, _o = _a.componentRef, componentRef = _o === void 0 ? null : _o, _p = _a.usePortal, usePortal = _p === void 0 ? true : _p
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
44
|
+
var open = _a.open, container = _a.container, children = _a.children, _b = _a.scrollHandler, scrollHandler = _b === void 0 ? 'wrapper' : _b, _c = _a.Backdrop, Backdrop = _c === void 0 ? coreComponentsBackdrop.Backdrop : _c, _d = _a.backdropProps, backdropProps = _d === void 0 ? {} : _d, _e = _a.transitionProps, transitionProps = _e === void 0 ? {} : _e, disableBackdropClick = _a.disableBackdropClick, _f = _a.disableAutoFocus, disableAutoFocus = _f === void 0 ? false : _f, _g = _a.disableFocusLock, disableFocusLock = _g === void 0 ? false : _g, _h = _a.disableEscapeKeyDown, disableEscapeKeyDown = _h === void 0 ? false : _h, _j = _a.disableRestoreFocus, disableRestoreFocus = _j === void 0 ? false : _j, _k = _a.disableBlockingScroll, disableBlockingScroll = _k === void 0 ? false : _k, _l = _a.keepMounted, keepMounted = _l === void 0 ? false : _l, className = _a.className, contentClassName = _a.contentClassName, wrapperProps = _a.wrapperProps, contentProps = _a.contentProps, componentDivProps = _a.componentDivProps, wrapperClassName = _a.wrapperClassName, onBackdropClick = _a.onBackdropClick, onClose = _a.onClose, onEscapeKeyDown = _a.onEscapeKeyDown, onMount = _a.onMount, onUnmount = _a.onUnmount, dataTestId = _a.dataTestId, _m = _a.zIndex, zIndex = _m === void 0 ? coreComponentsStack.stackingOrder.MODAL : _m, _o = _a.componentRef, componentRef = _o === void 0 ? null : _o, _p = _a.usePortal, usePortal = _p === void 0 ? true : _p;
|
|
45
|
+
var _q = React.useState(null), exited = _q[0], setExited = _q[1];
|
|
46
|
+
var _r = React.useState(false), hasScroll = _r[0], setHasScroll = _r[1];
|
|
47
|
+
var _s = React.useState(false), hasHeader = _s[0], setHasHeader = _s[1];
|
|
48
|
+
var _t = React.useState(false), hasFooter = _t[0], setHasFooter = _t[1];
|
|
49
|
+
var _u = React.useState(false), headerHighlighted = _u[0], setHeaderHighlighted = _u[1];
|
|
50
|
+
var _v = React.useState(false), footerHighlighted = _v[0], setFooterHighlighted = _v[1];
|
|
51
|
+
var _w = React.useState(0), headerOffset = _w[0], setHeaderOffset = _w[1];
|
|
53
52
|
var componentNodeRef = React.useRef(null);
|
|
54
53
|
var wrapperRef = React.useRef(null);
|
|
55
54
|
var scrollableNodeRef = React.useRef(null);
|
|
@@ -101,9 +100,6 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
101
100
|
}
|
|
102
101
|
}, [hasFooter, hasHeader, headerOffset]);
|
|
103
102
|
var handleClose = React.useCallback(function (event, reason) {
|
|
104
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
105
|
-
helpers_lockScroll.unlockScroll();
|
|
106
|
-
}
|
|
107
103
|
if (onClose) {
|
|
108
104
|
onClose(event, reason);
|
|
109
105
|
}
|
|
@@ -114,7 +110,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
114
110
|
onEscapeKeyDown(event);
|
|
115
111
|
}
|
|
116
112
|
return null;
|
|
117
|
-
}, [onBackdropClick, onClose, onEscapeKeyDown
|
|
113
|
+
}, [onBackdropClick, onClose, onEscapeKeyDown]);
|
|
118
114
|
var handleBackdropMouseDown = function (event) {
|
|
119
115
|
var _a;
|
|
120
116
|
var clickedOnScrollbar = false;
|
|
@@ -189,10 +185,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
189
185
|
if (open && isExited) {
|
|
190
186
|
if (!disableBlockingScroll) {
|
|
191
187
|
var el_1 = getContainer();
|
|
192
|
-
utils.handleContainer(el_1
|
|
193
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
194
|
-
helpers_lockScroll.lockScroll();
|
|
195
|
-
}
|
|
188
|
+
utils.handleContainer(el_1);
|
|
196
189
|
restoreContainerStylesRef.current = function () {
|
|
197
190
|
restoreContainerStylesRef.current = null;
|
|
198
191
|
utils.restoreContainerStyles(el_1);
|
|
@@ -200,7 +193,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
200
193
|
}
|
|
201
194
|
setExited(false);
|
|
202
195
|
}
|
|
203
|
-
}, [getContainer, open, disableBlockingScroll, isExited
|
|
196
|
+
}, [getContainer, open, disableBlockingScroll, isExited]);
|
|
204
197
|
React.useEffect(function () {
|
|
205
198
|
var ResizeObserver = window.ResizeObserver || resizeObserver.ResizeObserver;
|
|
206
199
|
resizeObserverRef.current = new ResizeObserver(checkToHasScrollBar);
|
|
@@ -213,16 +206,6 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
213
206
|
}
|
|
214
207
|
};
|
|
215
208
|
}, []);
|
|
216
|
-
React.useEffect(function () {
|
|
217
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
218
|
-
window.addEventListener('resize', helpers_lockScroll.syncHeight);
|
|
219
|
-
}
|
|
220
|
-
return function () {
|
|
221
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
222
|
-
window.removeEventListener('resize', helpers_lockScroll.syncHeight);
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
}, [iOSLock]);
|
|
226
209
|
var contextValue = React.useMemo(function () { return ({
|
|
227
210
|
parentRef: wrapperRef,
|
|
228
211
|
componentRef: componentNodeRef,
|
|
@@ -134,10 +134,6 @@ type BaseModalProps = {
|
|
|
134
134
|
* Реф, который должен быть установлен компонентной области
|
|
135
135
|
*/
|
|
136
136
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
137
|
-
/**
|
|
138
|
-
* Блокирует скролл когда модальное окно открыто. Работает только на iOS.
|
|
139
|
-
*/
|
|
140
|
-
iOSLock?: boolean;
|
|
141
137
|
};
|
|
142
138
|
type BaseModalContext = {
|
|
143
139
|
parentRef: React.RefObject<HTMLDivElement>;
|
|
@@ -11,7 +11,6 @@ var coreComponentsBackdrop = require('../../backdrop/cssm');
|
|
|
11
11
|
var coreComponentsPortal = require('../../portal/cssm');
|
|
12
12
|
var coreComponentsShared = require('../../shared/cssm');
|
|
13
13
|
var coreComponentsStack = require('../../stack/cssm');
|
|
14
|
-
var helpers_lockScroll = require('./helpers/lockScroll.js');
|
|
15
14
|
var utils = require('./utils.js');
|
|
16
15
|
var styles = require('./index.module.css');
|
|
17
16
|
require('./matches-polyfill.js');
|
|
@@ -41,14 +40,14 @@ var BaseModalContext = React__default.default.createContext({
|
|
|
41
40
|
onClose: function () { return null; },
|
|
42
41
|
});
|
|
43
42
|
var BaseModal = React.forwardRef(function (_a, ref) {
|
|
44
|
-
var open = _a.open, container = _a.container, children = _a.children, _b = _a.scrollHandler, scrollHandler = _b === void 0 ? 'wrapper' : _b, _c = _a.Backdrop, Backdrop = _c === void 0 ? coreComponentsBackdrop.Backdrop : _c, _d = _a.backdropProps, backdropProps = _d === void 0 ? {} : _d, _e = _a.transitionProps, transitionProps = _e === void 0 ? {} : _e, disableBackdropClick = _a.disableBackdropClick, _f = _a.disableAutoFocus, disableAutoFocus = _f === void 0 ? false : _f, _g = _a.disableFocusLock, disableFocusLock = _g === void 0 ? false : _g, _h = _a.disableEscapeKeyDown, disableEscapeKeyDown = _h === void 0 ? false : _h, _j = _a.disableRestoreFocus, disableRestoreFocus = _j === void 0 ? false : _j, _k = _a.disableBlockingScroll, disableBlockingScroll = _k === void 0 ? false : _k, _l = _a.keepMounted, keepMounted = _l === void 0 ? false : _l, className = _a.className, contentClassName = _a.contentClassName, wrapperProps = _a.wrapperProps, contentProps = _a.contentProps, componentDivProps = _a.componentDivProps, wrapperClassName = _a.wrapperClassName, onBackdropClick = _a.onBackdropClick, onClose = _a.onClose, onEscapeKeyDown = _a.onEscapeKeyDown, onMount = _a.onMount, onUnmount = _a.onUnmount, dataTestId = _a.dataTestId, _m = _a.zIndex, zIndex = _m === void 0 ? coreComponentsStack.stackingOrder.MODAL : _m, _o = _a.componentRef, componentRef = _o === void 0 ? null : _o, _p = _a.usePortal, usePortal = _p === void 0 ? true : _p
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
43
|
+
var open = _a.open, container = _a.container, children = _a.children, _b = _a.scrollHandler, scrollHandler = _b === void 0 ? 'wrapper' : _b, _c = _a.Backdrop, Backdrop = _c === void 0 ? coreComponentsBackdrop.Backdrop : _c, _d = _a.backdropProps, backdropProps = _d === void 0 ? {} : _d, _e = _a.transitionProps, transitionProps = _e === void 0 ? {} : _e, disableBackdropClick = _a.disableBackdropClick, _f = _a.disableAutoFocus, disableAutoFocus = _f === void 0 ? false : _f, _g = _a.disableFocusLock, disableFocusLock = _g === void 0 ? false : _g, _h = _a.disableEscapeKeyDown, disableEscapeKeyDown = _h === void 0 ? false : _h, _j = _a.disableRestoreFocus, disableRestoreFocus = _j === void 0 ? false : _j, _k = _a.disableBlockingScroll, disableBlockingScroll = _k === void 0 ? false : _k, _l = _a.keepMounted, keepMounted = _l === void 0 ? false : _l, className = _a.className, contentClassName = _a.contentClassName, wrapperProps = _a.wrapperProps, contentProps = _a.contentProps, componentDivProps = _a.componentDivProps, wrapperClassName = _a.wrapperClassName, onBackdropClick = _a.onBackdropClick, onClose = _a.onClose, onEscapeKeyDown = _a.onEscapeKeyDown, onMount = _a.onMount, onUnmount = _a.onUnmount, dataTestId = _a.dataTestId, _m = _a.zIndex, zIndex = _m === void 0 ? coreComponentsStack.stackingOrder.MODAL : _m, _o = _a.componentRef, componentRef = _o === void 0 ? null : _o, _p = _a.usePortal, usePortal = _p === void 0 ? true : _p;
|
|
44
|
+
var _q = React.useState(null), exited = _q[0], setExited = _q[1];
|
|
45
|
+
var _r = React.useState(false), hasScroll = _r[0], setHasScroll = _r[1];
|
|
46
|
+
var _s = React.useState(false), hasHeader = _s[0], setHasHeader = _s[1];
|
|
47
|
+
var _t = React.useState(false), hasFooter = _t[0], setHasFooter = _t[1];
|
|
48
|
+
var _u = React.useState(false), headerHighlighted = _u[0], setHeaderHighlighted = _u[1];
|
|
49
|
+
var _v = React.useState(false), footerHighlighted = _v[0], setFooterHighlighted = _v[1];
|
|
50
|
+
var _w = React.useState(0), headerOffset = _w[0], setHeaderOffset = _w[1];
|
|
52
51
|
var componentNodeRef = React.useRef(null);
|
|
53
52
|
var wrapperRef = React.useRef(null);
|
|
54
53
|
var scrollableNodeRef = React.useRef(null);
|
|
@@ -100,9 +99,6 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
100
99
|
}
|
|
101
100
|
}, [hasFooter, hasHeader, headerOffset]);
|
|
102
101
|
var handleClose = React.useCallback(function (event, reason) {
|
|
103
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
104
|
-
helpers_lockScroll.unlockScroll();
|
|
105
|
-
}
|
|
106
102
|
if (onClose) {
|
|
107
103
|
onClose(event, reason);
|
|
108
104
|
}
|
|
@@ -113,7 +109,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
113
109
|
onEscapeKeyDown(event);
|
|
114
110
|
}
|
|
115
111
|
return null;
|
|
116
|
-
}, [onBackdropClick, onClose, onEscapeKeyDown
|
|
112
|
+
}, [onBackdropClick, onClose, onEscapeKeyDown]);
|
|
117
113
|
var handleBackdropMouseDown = function (event) {
|
|
118
114
|
var _a;
|
|
119
115
|
var clickedOnScrollbar = false;
|
|
@@ -188,10 +184,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
188
184
|
if (open && isExited) {
|
|
189
185
|
if (!disableBlockingScroll) {
|
|
190
186
|
var el_1 = getContainer();
|
|
191
|
-
utils.handleContainer(el_1
|
|
192
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
193
|
-
helpers_lockScroll.lockScroll();
|
|
194
|
-
}
|
|
187
|
+
utils.handleContainer(el_1);
|
|
195
188
|
restoreContainerStylesRef.current = function () {
|
|
196
189
|
restoreContainerStylesRef.current = null;
|
|
197
190
|
utils.restoreContainerStyles(el_1);
|
|
@@ -199,7 +192,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
199
192
|
}
|
|
200
193
|
setExited(false);
|
|
201
194
|
}
|
|
202
|
-
}, [getContainer, open, disableBlockingScroll, isExited
|
|
195
|
+
}, [getContainer, open, disableBlockingScroll, isExited]);
|
|
203
196
|
React.useEffect(function () {
|
|
204
197
|
var ResizeObserver = window.ResizeObserver || resizeObserver.ResizeObserver;
|
|
205
198
|
resizeObserverRef.current = new ResizeObserver(checkToHasScrollBar);
|
|
@@ -212,16 +205,6 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
212
205
|
}
|
|
213
206
|
};
|
|
214
207
|
}, []);
|
|
215
|
-
React.useEffect(function () {
|
|
216
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
217
|
-
window.addEventListener('resize', helpers_lockScroll.syncHeight);
|
|
218
|
-
}
|
|
219
|
-
return function () {
|
|
220
|
-
if (iOSLock && coreComponentsShared.os.isIOS()) {
|
|
221
|
-
window.removeEventListener('resize', helpers_lockScroll.syncHeight);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
}, [iOSLock]);
|
|
225
208
|
var contextValue = React.useMemo(function () { return ({
|
|
226
209
|
parentRef: wrapperRef,
|
|
227
210
|
componentRef: componentNodeRef,
|
|
@@ -2,5 +2,5 @@ declare function isScrolledToTop(target: HTMLElement): boolean;
|
|
|
2
2
|
declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
3
3
|
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
4
4
|
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
5
|
-
declare const handleContainer: (container?: HTMLElement
|
|
5
|
+
declare const handleContainer: (container?: HTMLElement) => void;
|
|
6
6
|
export { isScrolledToTop, isScrolledToBottom, hasScrollbar, restoreContainerStyles, handleContainer };
|
package/base-modal/cssm/utils.js
CHANGED
|
@@ -41,8 +41,7 @@ var restoreContainerStyles = function (container) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
var handleContainer = function (container
|
|
45
|
-
if (isIOS === void 0) { isIOS = false; }
|
|
44
|
+
var handleContainer = function (container) {
|
|
46
45
|
if (!container)
|
|
47
46
|
return;
|
|
48
47
|
var modalRestoreStyles = coreComponentsGlobalStore.getModalStore().getRestoreStyles();
|
|
@@ -80,9 +79,7 @@ var handleContainer = function (container, isIOS) {
|
|
|
80
79
|
el: scrollContainer,
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
|
-
|
|
84
|
-
scrollContainer.style.overflow = 'hidden';
|
|
85
|
-
}
|
|
82
|
+
scrollContainer.style.overflow = 'hidden';
|
|
86
83
|
modalRestoreStyles.push({
|
|
87
84
|
container: container,
|
|
88
85
|
modals: 1,
|
|
@@ -134,10 +134,6 @@ type BaseModalProps = {
|
|
|
134
134
|
* Реф, который должен быть установлен компонентной области
|
|
135
135
|
*/
|
|
136
136
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
137
|
-
/**
|
|
138
|
-
* Блокирует скролл когда модальное окно открыто. Работает только на iOS.
|
|
139
|
-
*/
|
|
140
|
-
iOSLock?: boolean;
|
|
141
137
|
};
|
|
142
138
|
type BaseModalContext = {
|
|
143
139
|
parentRef: React.RefObject<HTMLDivElement>;
|
|
@@ -7,9 +7,8 @@ import { ResizeObserver } from '@juggle/resize-observer';
|
|
|
7
7
|
import cn from 'classnames';
|
|
8
8
|
import { Backdrop } from '../../backdrop/esm';
|
|
9
9
|
import { Portal } from '../../portal/esm';
|
|
10
|
-
import {
|
|
10
|
+
import { browser } from '../../shared/esm';
|
|
11
11
|
import { stackingOrder, Stack } from '../../stack/esm';
|
|
12
|
-
import { unlockScroll, lockScroll, syncHeight } from './helpers/lockScroll.js';
|
|
13
12
|
import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerStyles, hasScrollbar } from './utils.js';
|
|
14
13
|
import './matches-polyfill.js';
|
|
15
14
|
import '../../global-store/esm';
|
|
@@ -34,14 +33,14 @@ var BaseModalContext = React.createContext({
|
|
|
34
33
|
onClose: function () { return null; },
|
|
35
34
|
});
|
|
36
35
|
var BaseModal = forwardRef(function (_a, ref) {
|
|
37
|
-
var open = _a.open, container = _a.container, children = _a.children, _b = _a.scrollHandler, scrollHandler = _b === void 0 ? 'wrapper' : _b, _c = _a.Backdrop, Backdrop$1 = _c === void 0 ? Backdrop : _c, _d = _a.backdropProps, backdropProps = _d === void 0 ? {} : _d, _e = _a.transitionProps, transitionProps = _e === void 0 ? {} : _e, disableBackdropClick = _a.disableBackdropClick, _f = _a.disableAutoFocus, disableAutoFocus = _f === void 0 ? false : _f, _g = _a.disableFocusLock, disableFocusLock = _g === void 0 ? false : _g, _h = _a.disableEscapeKeyDown, disableEscapeKeyDown = _h === void 0 ? false : _h, _j = _a.disableRestoreFocus, disableRestoreFocus = _j === void 0 ? false : _j, _k = _a.disableBlockingScroll, disableBlockingScroll = _k === void 0 ? false : _k, _l = _a.keepMounted, keepMounted = _l === void 0 ? false : _l, className = _a.className, contentClassName = _a.contentClassName, wrapperProps = _a.wrapperProps, contentProps = _a.contentProps, componentDivProps = _a.componentDivProps, wrapperClassName = _a.wrapperClassName, onBackdropClick = _a.onBackdropClick, onClose = _a.onClose, onEscapeKeyDown = _a.onEscapeKeyDown, onMount = _a.onMount, onUnmount = _a.onUnmount, dataTestId = _a.dataTestId, _m = _a.zIndex, zIndex = _m === void 0 ? stackingOrder.MODAL : _m, _o = _a.componentRef, componentRef = _o === void 0 ? null : _o, _p = _a.usePortal, usePortal = _p === void 0 ? true : _p
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
36
|
+
var open = _a.open, container = _a.container, children = _a.children, _b = _a.scrollHandler, scrollHandler = _b === void 0 ? 'wrapper' : _b, _c = _a.Backdrop, Backdrop$1 = _c === void 0 ? Backdrop : _c, _d = _a.backdropProps, backdropProps = _d === void 0 ? {} : _d, _e = _a.transitionProps, transitionProps = _e === void 0 ? {} : _e, disableBackdropClick = _a.disableBackdropClick, _f = _a.disableAutoFocus, disableAutoFocus = _f === void 0 ? false : _f, _g = _a.disableFocusLock, disableFocusLock = _g === void 0 ? false : _g, _h = _a.disableEscapeKeyDown, disableEscapeKeyDown = _h === void 0 ? false : _h, _j = _a.disableRestoreFocus, disableRestoreFocus = _j === void 0 ? false : _j, _k = _a.disableBlockingScroll, disableBlockingScroll = _k === void 0 ? false : _k, _l = _a.keepMounted, keepMounted = _l === void 0 ? false : _l, className = _a.className, contentClassName = _a.contentClassName, wrapperProps = _a.wrapperProps, contentProps = _a.contentProps, componentDivProps = _a.componentDivProps, wrapperClassName = _a.wrapperClassName, onBackdropClick = _a.onBackdropClick, onClose = _a.onClose, onEscapeKeyDown = _a.onEscapeKeyDown, onMount = _a.onMount, onUnmount = _a.onUnmount, dataTestId = _a.dataTestId, _m = _a.zIndex, zIndex = _m === void 0 ? stackingOrder.MODAL : _m, _o = _a.componentRef, componentRef = _o === void 0 ? null : _o, _p = _a.usePortal, usePortal = _p === void 0 ? true : _p;
|
|
37
|
+
var _q = useState(null), exited = _q[0], setExited = _q[1];
|
|
38
|
+
var _r = useState(false), hasScroll = _r[0], setHasScroll = _r[1];
|
|
39
|
+
var _s = useState(false), hasHeader = _s[0], setHasHeader = _s[1];
|
|
40
|
+
var _t = useState(false), hasFooter = _t[0], setHasFooter = _t[1];
|
|
41
|
+
var _u = useState(false), headerHighlighted = _u[0], setHeaderHighlighted = _u[1];
|
|
42
|
+
var _v = useState(false), footerHighlighted = _v[0], setFooterHighlighted = _v[1];
|
|
43
|
+
var _w = useState(0), headerOffset = _w[0], setHeaderOffset = _w[1];
|
|
45
44
|
var componentNodeRef = useRef(null);
|
|
46
45
|
var wrapperRef = useRef(null);
|
|
47
46
|
var scrollableNodeRef = useRef(null);
|
|
@@ -93,9 +92,6 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
93
92
|
}
|
|
94
93
|
}, [hasFooter, hasHeader, headerOffset]);
|
|
95
94
|
var handleClose = useCallback(function (event, reason) {
|
|
96
|
-
if (iOSLock && os.isIOS()) {
|
|
97
|
-
unlockScroll();
|
|
98
|
-
}
|
|
99
95
|
if (onClose) {
|
|
100
96
|
onClose(event, reason);
|
|
101
97
|
}
|
|
@@ -106,7 +102,7 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
106
102
|
onEscapeKeyDown(event);
|
|
107
103
|
}
|
|
108
104
|
return null;
|
|
109
|
-
}, [onBackdropClick, onClose, onEscapeKeyDown
|
|
105
|
+
}, [onBackdropClick, onClose, onEscapeKeyDown]);
|
|
110
106
|
var handleBackdropMouseDown = function (event) {
|
|
111
107
|
var _a;
|
|
112
108
|
var clickedOnScrollbar = false;
|
|
@@ -181,10 +177,7 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
181
177
|
if (open && isExited) {
|
|
182
178
|
if (!disableBlockingScroll) {
|
|
183
179
|
var el_1 = getContainer();
|
|
184
|
-
handleContainer(el_1
|
|
185
|
-
if (iOSLock && os.isIOS()) {
|
|
186
|
-
lockScroll();
|
|
187
|
-
}
|
|
180
|
+
handleContainer(el_1);
|
|
188
181
|
restoreContainerStylesRef.current = function () {
|
|
189
182
|
restoreContainerStylesRef.current = null;
|
|
190
183
|
restoreContainerStyles(el_1);
|
|
@@ -192,7 +185,7 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
192
185
|
}
|
|
193
186
|
setExited(false);
|
|
194
187
|
}
|
|
195
|
-
}, [getContainer, open, disableBlockingScroll, isExited
|
|
188
|
+
}, [getContainer, open, disableBlockingScroll, isExited]);
|
|
196
189
|
useEffect(function () {
|
|
197
190
|
var ResizeObserver$1 = window.ResizeObserver || ResizeObserver;
|
|
198
191
|
resizeObserverRef.current = new ResizeObserver$1(checkToHasScrollBar);
|
|
@@ -205,16 +198,6 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
205
198
|
}
|
|
206
199
|
};
|
|
207
200
|
}, []);
|
|
208
|
-
useEffect(function () {
|
|
209
|
-
if (iOSLock && os.isIOS()) {
|
|
210
|
-
window.addEventListener('resize', syncHeight);
|
|
211
|
-
}
|
|
212
|
-
return function () {
|
|
213
|
-
if (iOSLock && os.isIOS()) {
|
|
214
|
-
window.removeEventListener('resize', syncHeight);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
}, [iOSLock]);
|
|
218
201
|
var contextValue = useMemo(function () { return ({
|
|
219
202
|
parentRef: wrapperRef,
|
|
220
203
|
componentRef: componentNodeRef,
|
package/base-modal/esm/index.js
CHANGED
|
@@ -2,5 +2,5 @@ declare function isScrolledToTop(target: HTMLElement): boolean;
|
|
|
2
2
|
declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
3
3
|
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
4
4
|
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
5
|
-
declare const handleContainer: (container?: HTMLElement
|
|
5
|
+
declare const handleContainer: (container?: HTMLElement) => void;
|
|
6
6
|
export { isScrolledToTop, isScrolledToBottom, hasScrollbar, restoreContainerStyles, handleContainer };
|
package/base-modal/esm/utils.js
CHANGED
|
@@ -39,8 +39,7 @@ var restoreContainerStyles = function (container) {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
var handleContainer = function (container
|
|
43
|
-
if (isIOS === void 0) { isIOS = false; }
|
|
42
|
+
var handleContainer = function (container) {
|
|
44
43
|
if (!container)
|
|
45
44
|
return;
|
|
46
45
|
var modalRestoreStyles = getModalStore().getRestoreStyles();
|
|
@@ -78,9 +77,7 @@ var handleContainer = function (container, isIOS) {
|
|
|
78
77
|
el: scrollContainer,
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
|
-
|
|
82
|
-
scrollContainer.style.overflow = 'hidden';
|
|
83
|
-
}
|
|
80
|
+
scrollContainer.style.overflow = 'hidden';
|
|
84
81
|
modalRestoreStyles.push({
|
|
85
82
|
container: container,
|
|
86
83
|
modals: 1,
|
|
@@ -134,10 +134,6 @@ type BaseModalProps = {
|
|
|
134
134
|
* Реф, который должен быть установлен компонентной области
|
|
135
135
|
*/
|
|
136
136
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
137
|
-
/**
|
|
138
|
-
* Блокирует скролл когда модальное окно открыто. Работает только на iOS.
|
|
139
|
-
*/
|
|
140
|
-
iOSLock?: boolean;
|
|
141
137
|
};
|
|
142
138
|
type BaseModalContext = {
|
|
143
139
|
parentRef: React.RefObject<HTMLDivElement>;
|
|
@@ -6,9 +6,8 @@ import { ResizeObserver } from '@juggle/resize-observer';
|
|
|
6
6
|
import cn from 'classnames';
|
|
7
7
|
import { Backdrop } from '../../backdrop/modern';
|
|
8
8
|
import { Portal } from '../../portal/modern';
|
|
9
|
-
import {
|
|
9
|
+
import { browser } from '../../shared/modern';
|
|
10
10
|
import { stackingOrder, Stack } from '../../stack/modern';
|
|
11
|
-
import { unlockScroll, lockScroll, syncHeight } from './helpers/lockScroll.js';
|
|
12
11
|
import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerStyles, hasScrollbar } from './utils.js';
|
|
13
12
|
import './matches-polyfill.js';
|
|
14
13
|
import '../../global-store/modern';
|
|
@@ -33,7 +32,7 @@ const BaseModalContext = React.createContext({
|
|
|
33
32
|
setHasFooter: () => null,
|
|
34
33
|
onClose: () => null,
|
|
35
34
|
});
|
|
36
|
-
const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrapper', Backdrop: Backdrop$1 = Backdrop, backdropProps = {}, transitionProps = {}, disableBackdropClick, disableAutoFocus = false, disableFocusLock = false, disableEscapeKeyDown = false, disableRestoreFocus = false, disableBlockingScroll = false, keepMounted = false, className, contentClassName, wrapperProps, contentProps, componentDivProps, wrapperClassName, onBackdropClick, onClose, onEscapeKeyDown, onMount, onUnmount, dataTestId, zIndex = stackingOrder.MODAL, componentRef = null, usePortal = true,
|
|
35
|
+
const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrapper', Backdrop: Backdrop$1 = Backdrop, backdropProps = {}, transitionProps = {}, disableBackdropClick, disableAutoFocus = false, disableFocusLock = false, disableEscapeKeyDown = false, disableRestoreFocus = false, disableBlockingScroll = false, keepMounted = false, className, contentClassName, wrapperProps, contentProps, componentDivProps, wrapperClassName, onBackdropClick, onClose, onEscapeKeyDown, onMount, onUnmount, dataTestId, zIndex = stackingOrder.MODAL, componentRef = null, usePortal = true, }, ref) => {
|
|
37
36
|
const [exited, setExited] = useState(null);
|
|
38
37
|
const [hasScroll, setHasScroll] = useState(false);
|
|
39
38
|
const [hasHeader, setHasHeader] = useState(false);
|
|
@@ -92,9 +91,6 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
92
91
|
}
|
|
93
92
|
}, [hasFooter, hasHeader, headerOffset]);
|
|
94
93
|
const handleClose = useCallback((event, reason) => {
|
|
95
|
-
if (iOSLock && os.isIOS()) {
|
|
96
|
-
unlockScroll();
|
|
97
|
-
}
|
|
98
94
|
if (onClose) {
|
|
99
95
|
onClose(event, reason);
|
|
100
96
|
}
|
|
@@ -105,7 +101,7 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
105
101
|
onEscapeKeyDown(event);
|
|
106
102
|
}
|
|
107
103
|
return null;
|
|
108
|
-
}, [onBackdropClick, onClose, onEscapeKeyDown
|
|
104
|
+
}, [onBackdropClick, onClose, onEscapeKeyDown]);
|
|
109
105
|
const handleBackdropMouseDown = (event) => {
|
|
110
106
|
let clickedOnScrollbar = false;
|
|
111
107
|
const clientWidth = event.target?.clientWidth;
|
|
@@ -179,10 +175,7 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
179
175
|
if (open && isExited) {
|
|
180
176
|
if (!disableBlockingScroll) {
|
|
181
177
|
const el = getContainer();
|
|
182
|
-
handleContainer(el
|
|
183
|
-
if (iOSLock && os.isIOS()) {
|
|
184
|
-
lockScroll();
|
|
185
|
-
}
|
|
178
|
+
handleContainer(el);
|
|
186
179
|
restoreContainerStylesRef.current = () => {
|
|
187
180
|
restoreContainerStylesRef.current = null;
|
|
188
181
|
restoreContainerStyles(el);
|
|
@@ -190,7 +183,7 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
190
183
|
}
|
|
191
184
|
setExited(false);
|
|
192
185
|
}
|
|
193
|
-
}, [getContainer, open, disableBlockingScroll, isExited
|
|
186
|
+
}, [getContainer, open, disableBlockingScroll, isExited]);
|
|
194
187
|
useEffect(() => {
|
|
195
188
|
const ResizeObserver$1 = window.ResizeObserver || ResizeObserver;
|
|
196
189
|
resizeObserverRef.current = new ResizeObserver$1(checkToHasScrollBar);
|
|
@@ -203,16 +196,6 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
203
196
|
}
|
|
204
197
|
};
|
|
205
198
|
}, []);
|
|
206
|
-
useEffect(() => {
|
|
207
|
-
if (iOSLock && os.isIOS()) {
|
|
208
|
-
window.addEventListener('resize', syncHeight);
|
|
209
|
-
}
|
|
210
|
-
return () => {
|
|
211
|
-
if (iOSLock && os.isIOS()) {
|
|
212
|
-
window.removeEventListener('resize', syncHeight);
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
}, [iOSLock]);
|
|
216
199
|
const contextValue = useMemo(() => ({
|
|
217
200
|
parentRef: wrapperRef,
|
|
218
201
|
componentRef: componentNodeRef,
|
|
@@ -2,5 +2,5 @@ declare function isScrolledToTop(target: HTMLElement): boolean;
|
|
|
2
2
|
declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
3
3
|
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
4
4
|
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
5
|
-
declare const handleContainer: (container?: HTMLElement
|
|
5
|
+
declare const handleContainer: (container?: HTMLElement) => void;
|
|
6
6
|
export { isScrolledToTop, isScrolledToBottom, hasScrollbar, restoreContainerStyles, handleContainer };
|
|
@@ -36,7 +36,7 @@ const restoreContainerStyles = (container) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
const handleContainer = (container
|
|
39
|
+
const handleContainer = (container) => {
|
|
40
40
|
if (!container)
|
|
41
41
|
return;
|
|
42
42
|
const modalRestoreStyles = getModalStore().getRestoreStyles();
|
|
@@ -74,9 +74,7 @@ const handleContainer = (container, isIOS = false) => {
|
|
|
74
74
|
el: scrollContainer,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
scrollContainer.style.overflow = 'hidden';
|
|
79
|
-
}
|
|
77
|
+
scrollContainer.style.overflow = 'hidden';
|
|
80
78
|
modalRestoreStyles.push({
|
|
81
79
|
container,
|
|
82
80
|
modals: 1,
|
package/base-modal/utils.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ declare function isScrolledToTop(target: HTMLElement): boolean;
|
|
|
2
2
|
declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
3
3
|
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
4
4
|
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
5
|
-
declare const handleContainer: (container?: HTMLElement
|
|
5
|
+
declare const handleContainer: (container?: HTMLElement) => void;
|
|
6
6
|
export { isScrolledToTop, isScrolledToBottom, hasScrollbar, restoreContainerStyles, handleContainer };
|
package/base-modal/utils.js
CHANGED
|
@@ -41,8 +41,7 @@ var restoreContainerStyles = function (container) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
var handleContainer = function (container
|
|
45
|
-
if (isIOS === void 0) { isIOS = false; }
|
|
44
|
+
var handleContainer = function (container) {
|
|
46
45
|
if (!container)
|
|
47
46
|
return;
|
|
48
47
|
var modalRestoreStyles = coreComponentsGlobalStore.getModalStore().getRestoreStyles();
|
|
@@ -80,9 +79,7 @@ var handleContainer = function (container, isIOS) {
|
|
|
80
79
|
el: scrollContainer,
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
|
-
|
|
84
|
-
scrollContainer.style.overflow = 'hidden';
|
|
85
|
-
}
|
|
82
|
+
scrollContainer.style.overflow = 'hidden';
|
|
86
83
|
modalRestoreStyles.push({
|
|
87
84
|
container: container,
|
|
88
85
|
modals: 1,
|
|
@@ -15,7 +15,7 @@ import 'date-fns/isEqual';
|
|
|
15
15
|
import 'date-fns/max';
|
|
16
16
|
import 'date-fns/min';
|
|
17
17
|
import 'date-fns/subMonths';
|
|
18
|
-
import './index.module-
|
|
18
|
+
import './index.module-912e88cf.js';
|
|
19
19
|
import 'date-fns/endOfMonth';
|
|
20
20
|
import 'date-fns/isSameMonth';
|
|
21
21
|
import '../../calendar/esm/desktop';
|
|
@@ -15,7 +15,7 @@ import 'date-fns/isEqual';
|
|
|
15
15
|
import 'date-fns/max';
|
|
16
16
|
import 'date-fns/min';
|
|
17
17
|
import 'date-fns/subMonths';
|
|
18
|
-
import './index.module-
|
|
18
|
+
import './index.module-912e88cf.js';
|
|
19
19
|
import './views/static.js';
|
|
20
20
|
import 'date-fns/endOfMonth';
|
|
21
21
|
import 'date-fns/isSameMonth';
|
|
@@ -8,7 +8,7 @@ import { isCompleteDateInput } from '../../../date-input/esm';
|
|
|
8
8
|
import { useDidUpdateEffect } from '@alfalab/hooks';
|
|
9
9
|
import { Divider } from '../components/divider/Component.js';
|
|
10
10
|
import { usePopoverViewMonthes } from '../hooks.js';
|
|
11
|
-
import { s as styles } from '../index.module-
|
|
11
|
+
import { s as styles } from '../index.module-912e88cf.js';
|
|
12
12
|
import 'date-fns/addMonths';
|
|
13
13
|
import 'date-fns/isEqual';
|
|
14
14
|
import 'date-fns/max';
|
|
@@ -14,7 +14,7 @@ import { isCompleteDateInput, DateInput } from '../../../date-input/esm';
|
|
|
14
14
|
import { Divider } from '../components/divider/Component.js';
|
|
15
15
|
import { useStaticViewMonthes, useSelectionProps } from '../hooks.js';
|
|
16
16
|
import { isDayButton } from '../utils.js';
|
|
17
|
-
import { s as styles } from '../index.module-
|
|
17
|
+
import { s as styles } from '../index.module-912e88cf.js';
|
|
18
18
|
import 'date-fns/isEqual';
|
|
19
19
|
import 'date-fns/min';
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ import 'date-fns/isEqual';
|
|
|
14
14
|
import 'date-fns/max';
|
|
15
15
|
import 'date-fns/min';
|
|
16
16
|
import 'date-fns/subMonths';
|
|
17
|
-
import './index.module-
|
|
17
|
+
import './index.module-636e08a2.js';
|
|
18
18
|
import 'date-fns/endOfMonth';
|
|
19
19
|
import 'date-fns/isSameMonth';
|
|
20
20
|
import '../../calendar/modern/desktop';
|
|
@@ -14,7 +14,7 @@ import 'date-fns/isEqual';
|
|
|
14
14
|
import 'date-fns/max';
|
|
15
15
|
import 'date-fns/min';
|
|
16
16
|
import 'date-fns/subMonths';
|
|
17
|
-
import './index.module-
|
|
17
|
+
import './index.module-636e08a2.js';
|
|
18
18
|
import './views/static.js';
|
|
19
19
|
import 'date-fns/endOfMonth';
|
|
20
20
|
import 'date-fns/isSameMonth';
|
|
@@ -7,7 +7,7 @@ import { isCompleteDateInput } from '../../../date-input/modern';
|
|
|
7
7
|
import { useDidUpdateEffect } from '@alfalab/hooks';
|
|
8
8
|
import { Divider } from '../components/divider/Component.js';
|
|
9
9
|
import { usePopoverViewMonthes } from '../hooks.js';
|
|
10
|
-
import { s as styles } from '../index.module-
|
|
10
|
+
import { s as styles } from '../index.module-636e08a2.js';
|
|
11
11
|
import 'date-fns/addMonths';
|
|
12
12
|
import 'date-fns/isEqual';
|
|
13
13
|
import 'date-fns/max';
|
|
@@ -13,7 +13,7 @@ import { isCompleteDateInput, DateInput } from '../../../date-input/modern';
|
|
|
13
13
|
import { Divider } from '../components/divider/Component.js';
|
|
14
14
|
import { useStaticViewMonthes, useSelectionProps } from '../hooks.js';
|
|
15
15
|
import { isDayButton } from '../utils.js';
|
|
16
|
-
import { s as styles } from '../index.module-
|
|
16
|
+
import { s as styles } from '../index.module-636e08a2.js';
|
|
17
17
|
import 'date-fns/isEqual';
|
|
18
18
|
import 'date-fns/min';
|
|
19
19
|
|
package/calendar-range/utils.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
var isDayButton = function (node) {
|
|
4
|
-
return node && node.tagName === 'BUTTON' && node.dataset.date;
|
|
5
|
-
};
|
|
3
|
+
var isDayButton = function (node) { return node && node.tagName === 'BUTTON' && node.dataset.date; };
|
|
6
4
|
|
|
7
5
|
exports.isDayButton = isDayButton;
|