@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
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { CheckmarkCompactMIcon } from '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
2
|
+
import { CheckmarkCompactSIcon } from '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
3
|
+
import { ClockHandsCompactMIcon } from '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
4
|
+
import { ClockHandsCompactSIcon } from '@alfalab/icons-glyph/ClockHandsCompactSIcon';
|
|
5
|
+
import { CrossCompactMIcon } from '@alfalab/icons-glyph/CrossCompactMIcon';
|
|
6
|
+
import { CrossCompactSIcon } from '@alfalab/icons-glyph/CrossCompactSIcon';
|
|
7
|
+
import { ExclamationCompactMIcon } from '@alfalab/icons-glyph/ExclamationCompactMIcon';
|
|
8
|
+
import { ExclamationCompactSIcon } from '@alfalab/icons-glyph/ExclamationCompactSIcon';
|
|
9
|
+
import { InformationCompactMIcon } from '@alfalab/icons-glyph/InformationCompactMIcon';
|
|
10
|
+
import { InformationCompactSIcon } from '@alfalab/icons-glyph/InformationCompactSIcon';
|
|
11
|
+
import { StopBrickCompactMIcon } from '@alfalab/icons-glyph/StopBrickCompactMIcon';
|
|
12
|
+
import { StopBrickMIcon } from '@alfalab/icons-glyph/StopBrickMIcon';
|
|
13
|
+
import { StopBrickSIcon } from '@alfalab/icons-glyph/StopBrickSIcon';
|
|
14
|
+
|
|
15
|
+
var ICON_MAP = {
|
|
16
|
+
'positive-checkmark': {
|
|
17
|
+
16: CheckmarkCompactSIcon,
|
|
18
|
+
20: CheckmarkCompactSIcon,
|
|
19
|
+
24: CheckmarkCompactMIcon,
|
|
20
|
+
32: CheckmarkCompactMIcon,
|
|
21
|
+
40: CheckmarkCompactMIcon,
|
|
22
|
+
},
|
|
23
|
+
'negative-cross': {
|
|
24
|
+
16: CrossCompactSIcon,
|
|
25
|
+
20: CrossCompactSIcon,
|
|
26
|
+
24: CrossCompactMIcon,
|
|
27
|
+
32: CrossCompactMIcon,
|
|
28
|
+
40: CrossCompactMIcon,
|
|
29
|
+
},
|
|
30
|
+
'negative-alert': {
|
|
31
|
+
16: ExclamationCompactSIcon,
|
|
32
|
+
20: ExclamationCompactSIcon,
|
|
33
|
+
24: ExclamationCompactMIcon,
|
|
34
|
+
32: ExclamationCompactMIcon,
|
|
35
|
+
40: ExclamationCompactMIcon,
|
|
36
|
+
},
|
|
37
|
+
'negative-block': {
|
|
38
|
+
16: StopBrickSIcon,
|
|
39
|
+
20: StopBrickSIcon,
|
|
40
|
+
24: StopBrickCompactMIcon,
|
|
41
|
+
32: StopBrickMIcon,
|
|
42
|
+
40: StopBrickMIcon,
|
|
43
|
+
},
|
|
44
|
+
'attention-alert': {
|
|
45
|
+
16: ExclamationCompactSIcon,
|
|
46
|
+
20: ExclamationCompactSIcon,
|
|
47
|
+
24: ExclamationCompactMIcon,
|
|
48
|
+
32: ExclamationCompactMIcon,
|
|
49
|
+
40: ExclamationCompactMIcon,
|
|
50
|
+
},
|
|
51
|
+
'neutral-information': {
|
|
52
|
+
16: InformationCompactSIcon,
|
|
53
|
+
20: InformationCompactSIcon,
|
|
54
|
+
24: InformationCompactMIcon,
|
|
55
|
+
32: InformationCompactMIcon,
|
|
56
|
+
40: InformationCompactMIcon,
|
|
57
|
+
},
|
|
58
|
+
'neutral-operation': {
|
|
59
|
+
16: ClockHandsCompactSIcon,
|
|
60
|
+
20: ClockHandsCompactSIcon,
|
|
61
|
+
24: ClockHandsCompactMIcon,
|
|
62
|
+
32: ClockHandsCompactMIcon,
|
|
63
|
+
40: ClockHandsCompactMIcon,
|
|
64
|
+
},
|
|
65
|
+
'neutral-cross': {
|
|
66
|
+
16: CrossCompactSIcon,
|
|
67
|
+
20: CrossCompactSIcon,
|
|
68
|
+
24: CrossCompactMIcon,
|
|
69
|
+
32: CrossCompactMIcon,
|
|
70
|
+
40: CrossCompactMIcon,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { ICON_MAP };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "../types/statusBadgePropTypes";
|
|
2
|
+
declare const useStatusBadgeIcon: (view: StatusBadgeViews, size: StatusBadgeSizes, customIcons?: StatusBadgeCustomIcon) => {
|
|
3
|
+
Icon: import("../types/statusBadgePropTypes").StatusBadgeIcon;
|
|
4
|
+
};
|
|
5
|
+
export { useStatusBadgeIcon };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __assign } from 'tslib';
|
|
2
|
+
import { ICON_MAP } from '../consts/iconMap.js';
|
|
3
|
+
import '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
4
|
+
import '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
5
|
+
import '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
6
|
+
import '@alfalab/icons-glyph/ClockHandsCompactSIcon';
|
|
7
|
+
import '@alfalab/icons-glyph/CrossCompactMIcon';
|
|
8
|
+
import '@alfalab/icons-glyph/CrossCompactSIcon';
|
|
9
|
+
import '@alfalab/icons-glyph/ExclamationCompactMIcon';
|
|
10
|
+
import '@alfalab/icons-glyph/ExclamationCompactSIcon';
|
|
11
|
+
import '@alfalab/icons-glyph/InformationCompactMIcon';
|
|
12
|
+
import '@alfalab/icons-glyph/InformationCompactSIcon';
|
|
13
|
+
import '@alfalab/icons-glyph/StopBrickCompactMIcon';
|
|
14
|
+
import '@alfalab/icons-glyph/StopBrickMIcon';
|
|
15
|
+
import '@alfalab/icons-glyph/StopBrickSIcon';
|
|
16
|
+
|
|
17
|
+
var useStatusBadgeIcon = function (view, size, customIcons) {
|
|
18
|
+
var iconsMap = ICON_MAP;
|
|
19
|
+
// transform initial icons map
|
|
20
|
+
if (customIcons) {
|
|
21
|
+
iconsMap = Object.keys(ICON_MAP).reduce(function (acc, current) {
|
|
22
|
+
var _a;
|
|
23
|
+
return (__assign(__assign({}, acc), (_a = {},
|
|
24
|
+
_a[current] = __assign(__assign({}, ICON_MAP[current]), customIcons[current]),
|
|
25
|
+
_a)));
|
|
26
|
+
}, {});
|
|
27
|
+
}
|
|
28
|
+
var Icon = iconsMap[view][size];
|
|
29
|
+
return { Icon: Icon };
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { useStatusBadgeIcon };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { StatusBadge } from './Component.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
+
import './hooks/useStatusBadgeIcon.js';
|
|
5
|
+
import 'tslib';
|
|
6
|
+
import './consts/iconMap.js';
|
|
4
7
|
import '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
5
8
|
import '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
6
9
|
import '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type StatusBadgeViews = 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
|
|
4
|
+
type StatusBadgeSizes = 16 | 20 | 24 | 32 | 40;
|
|
5
|
+
type StatusBadgeIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
6
|
+
type StatusBadgeCustomIcon = Partial<Record<StatusBadgeViews, Partial<Record<StatusBadgeSizes, StatusBadgeIcon>>>>;
|
|
7
|
+
export { StatusBadgeViews, StatusBadgeSizes, StatusBadgeIcon, StatusBadgeCustomIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "../types/statusBadgePropTypes";
|
|
2
|
+
declare const useStatusBadgeIcon: (view: StatusBadgeViews, size: StatusBadgeSizes, customIcons?: StatusBadgeCustomIcon) => {
|
|
3
|
+
Icon: import("../types/statusBadgePropTypes").StatusBadgeIcon;
|
|
4
|
+
};
|
|
5
|
+
export { useStatusBadgeIcon };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var consts_iconMap = require('../consts/iconMap.js');
|
|
5
|
+
|
|
6
|
+
var useStatusBadgeIcon = function (view, size, customIcons) {
|
|
7
|
+
var iconsMap = consts_iconMap.ICON_MAP;
|
|
8
|
+
// transform initial icons map
|
|
9
|
+
if (customIcons) {
|
|
10
|
+
iconsMap = Object.keys(consts_iconMap.ICON_MAP).reduce(function (acc, current) {
|
|
11
|
+
var _a;
|
|
12
|
+
return (tslib.__assign(tslib.__assign({}, acc), (_a = {},
|
|
13
|
+
_a[current] = tslib.__assign(tslib.__assign({}, consts_iconMap.ICON_MAP[current]), customIcons[current]),
|
|
14
|
+
_a)));
|
|
15
|
+
}, {});
|
|
16
|
+
}
|
|
17
|
+
var Icon = iconsMap[view][size];
|
|
18
|
+
return { Icon: Icon };
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.useStatusBadgeIcon = useStatusBadgeIcon;
|
package/status-badge/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "./types/statusBadgePropTypes";
|
|
3
4
|
type StatusBadgeProps = {
|
|
4
5
|
/**
|
|
5
6
|
* Дополнительный класс
|
|
@@ -9,7 +10,7 @@ type StatusBadgeProps = {
|
|
|
9
10
|
* Размер компонента
|
|
10
11
|
* @default 24
|
|
11
12
|
*/
|
|
12
|
-
size?:
|
|
13
|
+
size?: StatusBadgeSizes;
|
|
13
14
|
/**
|
|
14
15
|
* Набор цветов для компонента
|
|
15
16
|
*/
|
|
@@ -17,11 +18,15 @@ type StatusBadgeProps = {
|
|
|
17
18
|
/**
|
|
18
19
|
* Вид бейджа.
|
|
19
20
|
*/
|
|
20
|
-
view:
|
|
21
|
+
view: StatusBadgeViews;
|
|
21
22
|
/**
|
|
22
23
|
* Идентификатор для систем автоматизированного тестирования
|
|
23
24
|
*/
|
|
24
25
|
dataTestId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Кастомные иконки
|
|
28
|
+
*/
|
|
29
|
+
customIcons?: StatusBadgeCustomIcon;
|
|
25
30
|
};
|
|
26
|
-
declare const StatusBadge: ({ className, dataTestId, size, view, colors, }: StatusBadgeProps) => React.JSX.Element;
|
|
31
|
+
declare const StatusBadge: ({ className, dataTestId, size, view, colors, customIcons, }: StatusBadgeProps) => React.JSX.Element;
|
|
27
32
|
export { StatusBadgeProps, StatusBadge };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
3
|
+
import { useStatusBadgeIcon } from './hooks/useStatusBadgeIcon.js';
|
|
4
|
+
import './consts/iconMap.js';
|
|
5
|
+
import '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
6
|
+
import '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
7
|
+
import '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
8
|
+
import '@alfalab/icons-glyph/ClockHandsCompactSIcon';
|
|
9
|
+
import '@alfalab/icons-glyph/CrossCompactMIcon';
|
|
10
|
+
import '@alfalab/icons-glyph/CrossCompactSIcon';
|
|
11
|
+
import '@alfalab/icons-glyph/ExclamationCompactMIcon';
|
|
12
|
+
import '@alfalab/icons-glyph/ExclamationCompactSIcon';
|
|
13
|
+
import '@alfalab/icons-glyph/InformationCompactMIcon';
|
|
14
|
+
import '@alfalab/icons-glyph/InformationCompactSIcon';
|
|
15
|
+
import '@alfalab/icons-glyph/StopBrickCompactMIcon';
|
|
16
|
+
import '@alfalab/icons-glyph/StopBrickMIcon';
|
|
17
|
+
import '@alfalab/icons-glyph/StopBrickSIcon';
|
|
16
18
|
|
|
17
19
|
const defaultColors = {"positive-checkmark":"status-badge__positive-checkmark_1qjlx","negative-cross":"status-badge__negative-cross_1qjlx","negative-alert":"status-badge__negative-alert_1qjlx","negative-block":"status-badge__negative-block_1qjlx","attention-alert":"status-badge__attention-alert_1qjlx","neutral-information":"status-badge__neutral-information_1qjlx","neutral-operation":"status-badge__neutral-operation_1qjlx","neutral-cross":"status-badge__neutral-cross_1qjlx"};
|
|
18
20
|
require('./default.css');
|
|
@@ -27,66 +29,8 @@ const colorStyles = {
|
|
|
27
29
|
default: defaultColors,
|
|
28
30
|
inverted: invertedColors,
|
|
29
31
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
16: CheckmarkCompactSIcon,
|
|
33
|
-
20: CheckmarkCompactSIcon,
|
|
34
|
-
24: CheckmarkCompactMIcon,
|
|
35
|
-
32: CheckmarkCompactMIcon,
|
|
36
|
-
40: CheckmarkCompactMIcon,
|
|
37
|
-
},
|
|
38
|
-
'negative-cross': {
|
|
39
|
-
16: CrossCompactSIcon,
|
|
40
|
-
20: CrossCompactSIcon,
|
|
41
|
-
24: CrossCompactMIcon,
|
|
42
|
-
32: CrossCompactMIcon,
|
|
43
|
-
40: CrossCompactMIcon,
|
|
44
|
-
},
|
|
45
|
-
'negative-alert': {
|
|
46
|
-
16: ExclamationCompactSIcon,
|
|
47
|
-
20: ExclamationCompactSIcon,
|
|
48
|
-
24: ExclamationCompactMIcon,
|
|
49
|
-
32: ExclamationCompactMIcon,
|
|
50
|
-
40: ExclamationCompactMIcon,
|
|
51
|
-
},
|
|
52
|
-
'negative-block': {
|
|
53
|
-
16: StopBrickSIcon,
|
|
54
|
-
20: StopBrickSIcon,
|
|
55
|
-
24: StopBrickCompactMIcon,
|
|
56
|
-
32: StopBrickMIcon,
|
|
57
|
-
40: StopBrickMIcon,
|
|
58
|
-
},
|
|
59
|
-
'attention-alert': {
|
|
60
|
-
16: ExclamationCompactSIcon,
|
|
61
|
-
20: ExclamationCompactSIcon,
|
|
62
|
-
24: ExclamationCompactMIcon,
|
|
63
|
-
32: ExclamationCompactMIcon,
|
|
64
|
-
40: ExclamationCompactMIcon,
|
|
65
|
-
},
|
|
66
|
-
'neutral-information': {
|
|
67
|
-
16: InformationCompactSIcon,
|
|
68
|
-
20: InformationCompactSIcon,
|
|
69
|
-
24: InformationCompactMIcon,
|
|
70
|
-
32: InformationCompactMIcon,
|
|
71
|
-
40: InformationCompactMIcon,
|
|
72
|
-
},
|
|
73
|
-
'neutral-operation': {
|
|
74
|
-
16: ClockHandsCompactSIcon,
|
|
75
|
-
20: ClockHandsCompactSIcon,
|
|
76
|
-
24: ClockHandsCompactMIcon,
|
|
77
|
-
32: ClockHandsCompactMIcon,
|
|
78
|
-
40: ClockHandsCompactMIcon,
|
|
79
|
-
},
|
|
80
|
-
'neutral-cross': {
|
|
81
|
-
16: CrossCompactSIcon,
|
|
82
|
-
20: CrossCompactSIcon,
|
|
83
|
-
24: CrossCompactMIcon,
|
|
84
|
-
32: CrossCompactMIcon,
|
|
85
|
-
40: CrossCompactMIcon,
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
const StatusBadge = ({ className, dataTestId, size = 24, view, colors = 'default', }) => {
|
|
89
|
-
const Icon = ICON_MAP[view][size];
|
|
32
|
+
const StatusBadge = ({ className, dataTestId, size = 24, view, colors = 'default', customIcons, }) => {
|
|
33
|
+
const { Icon } = useStatusBadgeIcon(view, size, customIcons);
|
|
90
34
|
return (React.createElement("div", { className: cn(styles.component, className, styles[`size-${size}`], colorStyles[colors].component, colorStyles[colors][view]), "data-test-id": dataTestId },
|
|
91
35
|
React.createElement(Icon, null)));
|
|
92
36
|
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { CheckmarkCompactMIcon } from '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
2
|
+
import { CheckmarkCompactSIcon } from '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
3
|
+
import { ClockHandsCompactMIcon } from '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
4
|
+
import { ClockHandsCompactSIcon } from '@alfalab/icons-glyph/ClockHandsCompactSIcon';
|
|
5
|
+
import { CrossCompactMIcon } from '@alfalab/icons-glyph/CrossCompactMIcon';
|
|
6
|
+
import { CrossCompactSIcon } from '@alfalab/icons-glyph/CrossCompactSIcon';
|
|
7
|
+
import { ExclamationCompactMIcon } from '@alfalab/icons-glyph/ExclamationCompactMIcon';
|
|
8
|
+
import { ExclamationCompactSIcon } from '@alfalab/icons-glyph/ExclamationCompactSIcon';
|
|
9
|
+
import { InformationCompactMIcon } from '@alfalab/icons-glyph/InformationCompactMIcon';
|
|
10
|
+
import { InformationCompactSIcon } from '@alfalab/icons-glyph/InformationCompactSIcon';
|
|
11
|
+
import { StopBrickCompactMIcon } from '@alfalab/icons-glyph/StopBrickCompactMIcon';
|
|
12
|
+
import { StopBrickMIcon } from '@alfalab/icons-glyph/StopBrickMIcon';
|
|
13
|
+
import { StopBrickSIcon } from '@alfalab/icons-glyph/StopBrickSIcon';
|
|
14
|
+
|
|
15
|
+
const ICON_MAP = {
|
|
16
|
+
'positive-checkmark': {
|
|
17
|
+
16: CheckmarkCompactSIcon,
|
|
18
|
+
20: CheckmarkCompactSIcon,
|
|
19
|
+
24: CheckmarkCompactMIcon,
|
|
20
|
+
32: CheckmarkCompactMIcon,
|
|
21
|
+
40: CheckmarkCompactMIcon,
|
|
22
|
+
},
|
|
23
|
+
'negative-cross': {
|
|
24
|
+
16: CrossCompactSIcon,
|
|
25
|
+
20: CrossCompactSIcon,
|
|
26
|
+
24: CrossCompactMIcon,
|
|
27
|
+
32: CrossCompactMIcon,
|
|
28
|
+
40: CrossCompactMIcon,
|
|
29
|
+
},
|
|
30
|
+
'negative-alert': {
|
|
31
|
+
16: ExclamationCompactSIcon,
|
|
32
|
+
20: ExclamationCompactSIcon,
|
|
33
|
+
24: ExclamationCompactMIcon,
|
|
34
|
+
32: ExclamationCompactMIcon,
|
|
35
|
+
40: ExclamationCompactMIcon,
|
|
36
|
+
},
|
|
37
|
+
'negative-block': {
|
|
38
|
+
16: StopBrickSIcon,
|
|
39
|
+
20: StopBrickSIcon,
|
|
40
|
+
24: StopBrickCompactMIcon,
|
|
41
|
+
32: StopBrickMIcon,
|
|
42
|
+
40: StopBrickMIcon,
|
|
43
|
+
},
|
|
44
|
+
'attention-alert': {
|
|
45
|
+
16: ExclamationCompactSIcon,
|
|
46
|
+
20: ExclamationCompactSIcon,
|
|
47
|
+
24: ExclamationCompactMIcon,
|
|
48
|
+
32: ExclamationCompactMIcon,
|
|
49
|
+
40: ExclamationCompactMIcon,
|
|
50
|
+
},
|
|
51
|
+
'neutral-information': {
|
|
52
|
+
16: InformationCompactSIcon,
|
|
53
|
+
20: InformationCompactSIcon,
|
|
54
|
+
24: InformationCompactMIcon,
|
|
55
|
+
32: InformationCompactMIcon,
|
|
56
|
+
40: InformationCompactMIcon,
|
|
57
|
+
},
|
|
58
|
+
'neutral-operation': {
|
|
59
|
+
16: ClockHandsCompactSIcon,
|
|
60
|
+
20: ClockHandsCompactSIcon,
|
|
61
|
+
24: ClockHandsCompactMIcon,
|
|
62
|
+
32: ClockHandsCompactMIcon,
|
|
63
|
+
40: ClockHandsCompactMIcon,
|
|
64
|
+
},
|
|
65
|
+
'neutral-cross': {
|
|
66
|
+
16: CrossCompactSIcon,
|
|
67
|
+
20: CrossCompactSIcon,
|
|
68
|
+
24: CrossCompactMIcon,
|
|
69
|
+
32: CrossCompactMIcon,
|
|
70
|
+
40: CrossCompactMIcon,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { ICON_MAP };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StatusBadgeCustomIcon, StatusBadgeSizes, StatusBadgeViews } from "../types/statusBadgePropTypes";
|
|
2
|
+
declare const useStatusBadgeIcon: (view: StatusBadgeViews, size: StatusBadgeSizes, customIcons?: StatusBadgeCustomIcon) => {
|
|
3
|
+
Icon: import("../types/statusBadgePropTypes").StatusBadgeIcon;
|
|
4
|
+
};
|
|
5
|
+
export { useStatusBadgeIcon };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ICON_MAP } from '../consts/iconMap.js';
|
|
2
|
+
import '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
3
|
+
import '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
4
|
+
import '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
5
|
+
import '@alfalab/icons-glyph/ClockHandsCompactSIcon';
|
|
6
|
+
import '@alfalab/icons-glyph/CrossCompactMIcon';
|
|
7
|
+
import '@alfalab/icons-glyph/CrossCompactSIcon';
|
|
8
|
+
import '@alfalab/icons-glyph/ExclamationCompactMIcon';
|
|
9
|
+
import '@alfalab/icons-glyph/ExclamationCompactSIcon';
|
|
10
|
+
import '@alfalab/icons-glyph/InformationCompactMIcon';
|
|
11
|
+
import '@alfalab/icons-glyph/InformationCompactSIcon';
|
|
12
|
+
import '@alfalab/icons-glyph/StopBrickCompactMIcon';
|
|
13
|
+
import '@alfalab/icons-glyph/StopBrickMIcon';
|
|
14
|
+
import '@alfalab/icons-glyph/StopBrickSIcon';
|
|
15
|
+
|
|
16
|
+
const useStatusBadgeIcon = (view, size, customIcons) => {
|
|
17
|
+
let iconsMap = ICON_MAP;
|
|
18
|
+
// transform initial icons map
|
|
19
|
+
if (customIcons) {
|
|
20
|
+
iconsMap = Object.keys(ICON_MAP).reduce((acc, current) => ({
|
|
21
|
+
...acc,
|
|
22
|
+
...{
|
|
23
|
+
[current]: {
|
|
24
|
+
...ICON_MAP[current],
|
|
25
|
+
...customIcons[current],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}), {});
|
|
29
|
+
}
|
|
30
|
+
const Icon = iconsMap[view][size];
|
|
31
|
+
return { Icon };
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { useStatusBadgeIcon };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { StatusBadge } from './Component.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
|
+
import './hooks/useStatusBadgeIcon.js';
|
|
5
|
+
import './consts/iconMap.js';
|
|
4
6
|
import '@alfalab/icons-glyph/CheckmarkCompactMIcon';
|
|
5
7
|
import '@alfalab/icons-glyph/CheckmarkCompactSIcon';
|
|
6
8
|
import '@alfalab/icons-glyph/ClockHandsCompactMIcon';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type StatusBadgeViews = 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
|
|
4
|
+
type StatusBadgeSizes = 16 | 20 | 24 | 32 | 40;
|
|
5
|
+
type StatusBadgeIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
6
|
+
type StatusBadgeCustomIcon = Partial<Record<StatusBadgeViews, Partial<Record<StatusBadgeSizes, StatusBadgeIcon>>>>;
|
|
7
|
+
export { StatusBadgeViews, StatusBadgeSizes, StatusBadgeIcon, StatusBadgeCustomIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type StatusBadgeViews = 'positive-checkmark' | 'negative-cross' | 'negative-alert' | 'negative-block' | 'attention-alert' | 'neutral-information' | 'neutral-operation' | 'neutral-cross';
|
|
4
|
+
type StatusBadgeSizes = 16 | 20 | 24 | 32 | 40;
|
|
5
|
+
type StatusBadgeIcon = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
6
|
+
type StatusBadgeCustomIcon = Partial<Record<StatusBadgeViews, Partial<Record<StatusBadgeSizes, StatusBadgeIcon>>>>;
|
|
7
|
+
export { StatusBadgeViews, StatusBadgeSizes, StatusBadgeIcon, StatusBadgeCustomIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/tab-bar/Component.js
CHANGED
|
@@ -11,18 +11,22 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"component":"tab-bar__component_1naag","border":"tab-bar__border_1naag"};
|
|
14
|
+
var styles = {"component":"tab-bar__component_1naag","modal-bg-primary":"tab-bar__modal-bg-primary_1naag","modal-bg-alt-primary":"tab-bar__modal-bg-alt-primary_1naag","border":"tab-bar__border_1naag"};
|
|
15
15
|
require('./index.css');
|
|
16
16
|
|
|
17
17
|
var TabBarComponent = React.forwardRef(function (_a, ref) {
|
|
18
18
|
var _b;
|
|
19
|
-
var children = _a.children, className = _a.className, selectedId = _a.selectedId, border = _a.border, dataTestId = _a.dataTestId, tabClassNames = _a.tabClassNames, onChange = _a.onChange, restProps = tslib.__rest(_a, ["children", "className", "selectedId", "border", "dataTestId", "tabClassNames", "onChange"]);
|
|
19
|
+
var children = _a.children, className = _a.className, selectedId = _a.selectedId, border = _a.border, dataTestId = _a.dataTestId, tabClassNames = _a.tabClassNames, onChange = _a.onChange, _c = _a.accentColor, accentColor = _c === void 0 ? 'primary' : _c, _d = _a.bgColor, bgColor = _d === void 0 ? 'modal-bg-primary' : _d, restProps = tslib.__rest(_a, ["children", "className", "selectedId", "border", "dataTestId", "tabClassNames", "onChange", "accentColor", "bgColor"]);
|
|
20
20
|
if (React.Children.count(children) > 5) {
|
|
21
21
|
// eslint-disable-next-line no-console
|
|
22
22
|
console.error('Компонент TabBar не может содержать больше 5 табов');
|
|
23
23
|
}
|
|
24
|
-
return (React__default.default.createElement("nav", tslib.__assign({ "data-test-id": dataTestId }, restProps, { ref: ref, className: cn__default.default(styles.component, className, (_b = {},
|
|
24
|
+
return (React__default.default.createElement("nav", tslib.__assign({ "data-test-id": dataTestId }, restProps, { ref: ref, className: cn__default.default(styles.component, styles[bgColor], className, (_b = {},
|
|
25
|
+
_b[styles.border] = border,
|
|
26
|
+
_b)) }), React.Children.map(children, function (tab) {
|
|
25
27
|
return React.cloneElement(tab, {
|
|
28
|
+
bgColor: bgColor,
|
|
29
|
+
accentColor: accentColor,
|
|
26
30
|
selected: tab.props.id === selectedId,
|
|
27
31
|
onChange: onChange,
|
|
28
32
|
tabClassNames: tabClassNames,
|
|
@@ -3,34 +3,38 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
3
3
|
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
|
-
var
|
|
6
|
+
var coreComponentsIndicator = require('../../../indicator');
|
|
7
7
|
var coreComponentsTypography = require('../../../typography');
|
|
8
|
+
var consts = require('../../consts.js');
|
|
8
9
|
|
|
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);
|
|
12
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
14
|
|
|
14
|
-
var styles = {"component":"tab-bar__component_zqkzg","
|
|
15
|
+
var styles = {"component":"tab-bar__component_zqkzg","primary":"tab-bar__primary_zqkzg","secondary":"tab-bar__secondary_zqkzg","icon":"tab-bar__icon_zqkzg","label":"tab-bar__label_zqkzg","labelSelected":"tab-bar__labelSelected_zqkzg","indicator":"tab-bar__indicator_zqkzg"};
|
|
15
16
|
require('./index.css');
|
|
16
17
|
|
|
17
18
|
var TabComponent = React.forwardRef(function (_a, ref) {
|
|
18
19
|
var _b, _c;
|
|
19
|
-
var showIndicator = _a.showIndicator, indicatorProps = _a.indicatorProps, label = _a.label, icon = _a.icon, id = _a.id, selected = _a.selected, onChange = _a.onChange, onClick = _a.onClick, _d = _a.tabClassNames, tabClassNames = _d === void 0 ? {} : _d, dataTestId = _a.dataTestId, className = _a.className, labelClassName = _a.labelClassName, selectedClassName = _a.selectedClassName, iconClassName = _a.iconClassName, href = _a.href, _e = _a.Component, Component = _e === void 0 ? href ? 'a' : 'button' : _e, restProps = tslib.__rest(_a, ["showIndicator", "indicatorProps", "label", "icon", "id", "selected", "onChange", "onClick", "tabClassNames", "dataTestId", "className", "labelClassName", "selectedClassName", "iconClassName", "href", "Component"]);
|
|
20
|
+
var showIndicator = _a.showIndicator, indicatorProps = _a.indicatorProps, label = _a.label, icon = _a.icon, id = _a.id, selected = _a.selected, onChange = _a.onChange, onClick = _a.onClick, _d = _a.tabClassNames, tabClassNames = _d === void 0 ? {} : _d, dataTestId = _a.dataTestId, className = _a.className, labelClassName = _a.labelClassName, selectedClassName = _a.selectedClassName, iconClassName = _a.iconClassName, href = _a.href, _e = _a.Component, Component = _e === void 0 ? href ? 'a' : 'button' : _e, _f = _a.accentColor, accentColor = _f === void 0 ? 'primary' : _f, _g = _a.bgColor, bgColor = _g === void 0 ? 'modal-bg-primary' : _g, restProps = tslib.__rest(_a, ["showIndicator", "indicatorProps", "label", "icon", "id", "selected", "onChange", "onClick", "tabClassNames", "dataTestId", "className", "labelClassName", "selectedClassName", "iconClassName", "href", "Component", "accentColor", "bgColor"]);
|
|
20
21
|
var handleClick = function (event) {
|
|
21
22
|
onChange === null || onChange === void 0 ? void 0 : onChange(id);
|
|
22
23
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
23
24
|
};
|
|
24
25
|
var commonClassName = tabClassNames.className, commonLabelClassName = tabClassNames.labelClassName, commonSelectedClassName = tabClassNames.selectedClassName, commonIconClassName = tabClassNames.iconClassName;
|
|
25
26
|
return (React__default.default.createElement(Component, tslib.__assign({ "data-test-id": dataTestId, tabIndex: 0 }, (Component === 'button' ? { type: 'button' } : null), restProps, { href: href, id: id, ref: ref, className: cn__default.default(styles.component, commonClassName, className, selected && commonSelectedClassName, selected && selectedClassName, (_b = {},
|
|
26
|
-
_b[styles
|
|
27
|
+
_b[styles[accentColor]] = selected,
|
|
27
28
|
_b)), onClick: handleClick }),
|
|
28
29
|
React__default.default.createElement("div", { className: cn__default.default(styles.icon, commonIconClassName, iconClassName) }, React.isValidElement(icon) ? React.cloneElement(icon, { selected: selected }) : icon),
|
|
29
30
|
React__default.default.createElement(coreComponentsTypography.Typography.Text, { weight: 'medium', view: 'secondary-small', className: cn__default.default(styles.label, commonLabelClassName, labelClassName, (_c = {},
|
|
30
31
|
_c[styles.labelSelected] = selected,
|
|
31
32
|
_c)) }, React.isValidElement(label) ? React.cloneElement(label, { selected: selected }) : label),
|
|
32
33
|
showIndicator && (React__default.default.createElement("div", { className: styles.indicator },
|
|
33
|
-
React__default.default.createElement(
|
|
34
|
+
React__default.default.createElement(coreComponentsIndicator.Indicator, tslib.__assign({}, indicatorProps, { height: (indicatorProps === null || indicatorProps === void 0 ? void 0 : indicatorProps.value) ? 16 : undefined, border: {
|
|
35
|
+
width: 2,
|
|
36
|
+
color: consts.INDICATOR_BORDER_COLOR[bgColor],
|
|
37
|
+
}, backgroundColor: consts.INDICATOR_BG_COLOR[accentColor] }))))));
|
|
34
38
|
});
|
|
35
39
|
var Tab = TabComponent;
|
|
36
40
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-accent-primary: #ef3124;
|
|
5
|
+
--color-light-accent-secondary: #212124;
|
|
5
6
|
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47);
|
|
6
7
|
--color-light-text-secondary: rgba(4, 4, 19, 0.55); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
7
8
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -43,8 +44,10 @@
|
|
|
43
44
|
align-items: center;
|
|
44
45
|
padding: var(--gap-xs) 0;
|
|
45
46
|
color: var(--color-light-neutral-translucent-700);
|
|
46
|
-
} .tab-
|
|
47
|
+
} .tab-bar__primary_zqkzg {
|
|
47
48
|
color: var(--color-light-accent-primary);
|
|
49
|
+
} .tab-bar__secondary_zqkzg {
|
|
50
|
+
color: var(--color-light-accent-secondary);
|
|
48
51
|
} .tab-bar__icon_zqkzg {
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
color: inherit;
|
|
65
68
|
} .tab-bar__indicator_zqkzg {
|
|
66
69
|
position: absolute;
|
|
67
|
-
top:
|
|
70
|
+
top: 3px;
|
|
68
71
|
left: calc(50% + var(--gap-2xs));
|
|
69
72
|
height: 16px;
|
|
70
73
|
min-width: 16px;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
var INDICATOR_BORDER_COLOR = {
|
|
4
|
+
'modal-bg-primary': 'var(--color-light-base-bg-primary)',
|
|
5
|
+
'modal-bg-alt-primary': 'var(--color-light-base-bg-alt-primary)',
|
|
6
|
+
};
|
|
7
|
+
var INDICATOR_BG_COLOR = {
|
|
8
|
+
primary: 'var(--color-light-accent-primary)',
|
|
9
|
+
secondary: 'var(--color-light-accent-secondary)',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.INDICATOR_BG_COLOR = INDICATOR_BG_COLOR;
|
|
13
|
+
exports.INDICATOR_BORDER_COLOR = INDICATOR_BORDER_COLOR;
|
|
@@ -15,13 +15,17 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
15
15
|
|
|
16
16
|
var TabBarComponent = React.forwardRef(function (_a, ref) {
|
|
17
17
|
var _b;
|
|
18
|
-
var children = _a.children, className = _a.className, selectedId = _a.selectedId, border = _a.border, dataTestId = _a.dataTestId, tabClassNames = _a.tabClassNames, onChange = _a.onChange, restProps = tslib.__rest(_a, ["children", "className", "selectedId", "border", "dataTestId", "tabClassNames", "onChange"]);
|
|
18
|
+
var children = _a.children, className = _a.className, selectedId = _a.selectedId, border = _a.border, dataTestId = _a.dataTestId, tabClassNames = _a.tabClassNames, onChange = _a.onChange, _c = _a.accentColor, accentColor = _c === void 0 ? 'primary' : _c, _d = _a.bgColor, bgColor = _d === void 0 ? 'modal-bg-primary' : _d, restProps = tslib.__rest(_a, ["children", "className", "selectedId", "border", "dataTestId", "tabClassNames", "onChange", "accentColor", "bgColor"]);
|
|
19
19
|
if (React.Children.count(children) > 5) {
|
|
20
20
|
// eslint-disable-next-line no-console
|
|
21
21
|
console.error('Компонент TabBar не может содержать больше 5 табов');
|
|
22
22
|
}
|
|
23
|
-
return (React__default.default.createElement("nav", tslib.__assign({ "data-test-id": dataTestId }, restProps, { ref: ref, className: cn__default.default(styles__default.default.component,
|
|
23
|
+
return (React__default.default.createElement("nav", tslib.__assign({ "data-test-id": dataTestId }, restProps, { ref: ref, className: cn__default.default(styles__default.default.component, styles__default.default[bgColor], className, (_b = {},
|
|
24
|
+
_b[styles__default.default.border] = border,
|
|
25
|
+
_b)) }), React.Children.map(children, function (tab) {
|
|
24
26
|
return React.cloneElement(tab, {
|
|
27
|
+
bgColor: bgColor,
|
|
28
|
+
accentColor: accentColor,
|
|
25
29
|
selected: tab.props.id === selectedId,
|
|
26
30
|
onChange: onChange,
|
|
27
31
|
tabClassNames: tabClassNames,
|