@skodaflow/web-library 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/advancedTable/agGrid.js +1 -1
- package/cjs/components/advancedTable/agGrid.js.map +1 -1
- package/cjs/components/banner/Banner.js +1 -1
- package/cjs/components/banner/Banner.js.map +1 -1
- package/cjs/components/bottomSheet/BottomSheet.js +1 -1
- package/cjs/components/bottomSheet/BottomSheet.js.map +1 -1
- package/cjs/components/bypassBlock/BypassBlock.js +1 -1
- package/cjs/components/bypassBlock/BypassBlock.js.map +1 -1
- package/cjs/components/carousel/Autoplay.js +1 -1
- package/cjs/components/carousel/Autoplay.js.map +1 -1
- package/cjs/components/carousel/Carousel.js +1 -1
- package/cjs/components/carousel/Carousel.js.map +1 -1
- package/cjs/components/carousel/Navigation.js +1 -1
- package/cjs/components/carousel/Navigation.js.map +1 -1
- package/cjs/components/carousel/Pagination.d.ts +6 -6
- package/cjs/components/carousel/Pagination.js +1 -1
- package/cjs/components/carousel/Pagination.js.map +1 -1
- package/cjs/components/carousel/Slide.js +1 -1
- package/cjs/components/carousel/Slide.js.map +1 -1
- package/cjs/components/errorContent/ErrorContent.js +1 -1
- package/cjs/components/errorContent/ErrorContent.js.map +1 -1
- package/cjs/components/flag/FlowFlag.js +1 -1
- package/cjs/components/flag/FlowFlag.js.map +1 -1
- package/cjs/components/footer/Footer.js +1 -1
- package/cjs/components/footer/Footer.js.map +1 -1
- package/cjs/components/footer/FooterAccordion.js +1 -1
- package/cjs/components/footer/FooterAccordion.js.map +1 -1
- package/cjs/components/footer/FooterLink.js +1 -1
- package/cjs/components/footer/FooterLink.js.map +1 -1
- package/cjs/components/footer/FooterMenu.js +1 -1
- package/cjs/components/footer/FooterMenu.js.map +1 -1
- package/cjs/components/footer/FooterSectionContact.js +1 -1
- package/cjs/components/footer/FooterSectionContact.js.map +1 -1
- package/cjs/components/footer/FooterSectionLinks.js +1 -1
- package/cjs/components/footer/FooterSectionLinks.js.map +1 -1
- package/cjs/components/footer/FooterSectionMenu.js +1 -1
- package/cjs/components/footer/FooterSectionMenu.js.map +1 -1
- package/cjs/components/formMessage/FormMessage.js +1 -1
- package/cjs/components/formMessage/FormMessage.js.map +1 -1
- package/cjs/components/header/Header.js +1 -1
- package/cjs/components/header/Header.js.map +1 -1
- package/cjs/components/header/HeaderButton.js +1 -1
- package/cjs/components/header/HeaderButton.js.map +1 -1
- package/cjs/components/header/HeaderLanguageSelect.d.ts +6 -6
- package/cjs/components/header/HeaderLanguageSelect.js +1 -1
- package/cjs/components/header/HeaderLanguageSelect.js.map +1 -1
- package/cjs/components/header/HeaderLogo.d.ts +2 -2
- package/cjs/components/header/HeaderLogo.js +1 -1
- package/cjs/components/header/HeaderLogo.js.map +1 -1
- package/cjs/components/header/HeaderNavigationHero.js +1 -1
- package/cjs/components/header/HeaderNavigationHero.js.map +1 -1
- package/cjs/components/header/HeaderNavigationLink.js +1 -1
- package/cjs/components/header/HeaderNavigationLink.js.map +1 -1
- package/cjs/components/header/HeaderNavigationMenu.js +1 -1
- package/cjs/components/header/HeaderNavigationMenu.js.map +1 -1
- package/cjs/components/hotspotCard/HotspotCard.js +1 -1
- package/cjs/components/hotspotCard/HotspotCard.js.map +1 -1
- package/cjs/components/icon/stroke/SoundwaveIcon.js +1 -1
- package/cjs/components/icon/stroke/SoundwaveIcon.js.map +1 -1
- package/cjs/components/image/Image.d.ts +5 -1
- package/cjs/components/image/Image.js +1 -1
- package/cjs/components/image/Image.js.map +1 -1
- package/cjs/components/index.d.ts +1 -0
- package/cjs/components/label/Label.js +1 -1
- package/cjs/components/label/Label.js.map +1 -1
- package/cjs/components/logo/Logo.js +1 -1
- package/cjs/components/logo/Logo.js.map +1 -1
- package/cjs/components/notification/Notification.d.ts +2 -2
- package/cjs/components/notification/Notification.js +1 -1
- package/cjs/components/notification/Notification.js.map +1 -1
- package/cjs/components/notification/NotificationCenter.js +1 -1
- package/cjs/components/notification/NotificationCenter.js.map +1 -1
- package/cjs/components/notification/NotificationCenterCategory.js +1 -1
- package/cjs/components/notification/NotificationCenterCategory.js.map +1 -1
- package/cjs/components/notification/NotificationCenterHeaderButton.js +1 -1
- package/cjs/components/notification/NotificationCenterHeaderButton.js.map +1 -1
- package/cjs/components/overlay/Overlay.js +1 -1
- package/cjs/components/overlay/Overlay.js.map +1 -1
- package/cjs/components/pageLayout/PageLayout.js +1 -1
- package/cjs/components/pageLayout/PageLayout.js.map +1 -1
- package/cjs/components/playPauseButton/PlayPauseButton.js +1 -1
- package/cjs/components/playPauseButton/PlayPauseButton.js.map +1 -1
- package/cjs/components/progress/Loader.js +1 -1
- package/cjs/components/progress/Loader.js.map +1 -1
- package/cjs/components/progress/LoadingText.js +1 -1
- package/cjs/components/progress/LoadingText.js.map +1 -1
- package/cjs/components/progress/ProgressState.js +1 -1
- package/cjs/components/progress/ProgressState.js.map +1 -1
- package/cjs/components/progress/Spinner.js +1 -1
- package/cjs/components/progress/Spinner.js.map +1 -1
- package/cjs/components/promptBar/PromptAttachments.d.ts +58 -0
- package/cjs/components/promptBar/PromptAttachments.js +2 -0
- package/cjs/components/promptBar/PromptAttachments.js.map +1 -0
- package/cjs/components/promptBar/PromptBar.d.ts +71 -0
- package/cjs/components/promptBar/PromptBar.js +2 -0
- package/cjs/components/promptBar/PromptBar.js.map +1 -0
- package/cjs/components/promptBar/PromptSubmitIconButton.d.ts +54 -0
- package/cjs/components/promptBar/PromptSubmitIconButton.js +2 -0
- package/cjs/components/promptBar/PromptSubmitIconButton.js.map +1 -0
- package/cjs/components/promptBar/index.d.ts +3 -0
- package/cjs/components/quickLink/QuickLink.d.ts +3 -3
- package/cjs/components/quickLink/QuickLink.js +1 -1
- package/cjs/components/quickLink/QuickLink.js.map +1 -1
- package/cjs/components/search/CollapsableSearch.js +1 -1
- package/cjs/components/search/CollapsableSearch.js.map +1 -1
- package/cjs/components/search/Search.d.ts +9 -1
- package/cjs/components/search/Search.js +1 -1
- package/cjs/components/search/Search.js.map +1 -1
- package/cjs/components/secondaryNavigation/SecondaryNavigation.js +1 -1
- package/cjs/components/secondaryNavigation/SecondaryNavigation.js.map +1 -1
- package/cjs/components/shortcut/Shortcut.js +1 -1
- package/cjs/components/shortcut/Shortcut.js.map +1 -1
- package/cjs/components/skodaThemeProvider/SkodaThemeProvider.js +1 -1
- package/cjs/components/skodaThemeProvider/SkodaThemeProvider.js.map +1 -1
- package/cjs/components/spacing/Spacing.js +1 -1
- package/cjs/components/spacing/Spacing.js.map +1 -1
- package/cjs/components/textAndCta/AppStoreButton.js +1 -1
- package/cjs/components/textAndCta/AppStoreButton.js.map +1 -1
- package/cjs/components/textAndCta/TextAndCta.js +1 -1
- package/cjs/components/textAndCta/TextAndCta.js.map +1 -1
- package/cjs/components/tooltipHeader/TooltipHeader.js +1 -1
- package/cjs/components/tooltipHeader/TooltipHeader.js.map +1 -1
- package/cjs/components/upload/components/uploadList/UploadList.js +1 -1
- package/cjs/components/upload/components/uploadList/UploadList.js.map +1 -1
- package/cjs/components/upload/components/uploadList/UploadListItem.js +1 -1
- package/cjs/components/upload/components/uploadList/UploadListItem.js.map +1 -1
- package/cjs/components/upload/components/uploadPreview/UploadPreview.js +1 -1
- package/cjs/components/upload/components/uploadPreview/UploadPreview.js.map +1 -1
- package/cjs/components/upload/components/uploadPreview/UploadPreviewImage.js +1 -1
- package/cjs/components/upload/components/uploadPreview/UploadPreviewImage.js.map +1 -1
- package/cjs/components/upload/components/uploadWrapper/UploadContent.js +1 -1
- package/cjs/components/upload/components/uploadWrapper/UploadContent.js.map +1 -1
- package/cjs/components/upload/components/uploadWrapper/UploadWrapper.js +1 -1
- package/cjs/components/upload/components/uploadWrapper/UploadWrapper.js.map +1 -1
- package/cjs/components/video/Video.js +1 -1
- package/cjs/components/video/Video.js.map +1 -1
- package/cjs/index.js +1 -1
- package/cjs/materialui/accordion/AccordionSummaryExpandWrapper.js +1 -1
- package/cjs/materialui/accordion/AccordionSummaryExpandWrapper.js.map +1 -1
- package/cjs/materialui/autocomplete/autocomplete.theme.js +1 -1
- package/cjs/materialui/autocomplete/autocomplete.theme.js.map +1 -1
- package/cjs/materialui/card/Card.js +1 -1
- package/cjs/materialui/card/Card.js.map +1 -1
- package/cjs/materialui/datepicker/datecalendar.theme.d.ts +150 -150
- package/cjs/materialui/datepicker/digitalclock.theme.d.ts +149 -149
- package/cjs/materialui/datepicker/pickersday.theme.d.ts +1 -1
- package/cjs/materialui/datepicker/pickersday.theme.js +1 -1
- package/cjs/materialui/datepicker/pickersday.theme.js.map +1 -1
- package/cjs/materialui/dialog/DialogTitle.js +1 -1
- package/cjs/materialui/dialog/DialogTitle.js.map +1 -1
- package/cjs/materialui/dialog/dialogTitle.theme.js +1 -1
- package/cjs/materialui/dialog/dialogTitle.theme.js.map +1 -1
- package/cjs/materialui/drawer/DrawerContent.d.ts +39 -0
- package/cjs/materialui/drawer/DrawerContent.js +2 -0
- package/cjs/materialui/drawer/DrawerContent.js.map +1 -0
- package/cjs/materialui/drawer/drawer.theme.js +1 -1
- package/cjs/materialui/drawer/drawer.theme.js.map +1 -1
- package/cjs/materialui/drawer/index.d.ts +2 -0
- package/cjs/materialui/iconButton/iconButton.theme.js +1 -1
- package/cjs/materialui/iconButton/iconButton.theme.js.map +1 -1
- package/cjs/materialui/list/listItemText.theme.js +1 -1
- package/cjs/materialui/list/listItemText.theme.js.map +1 -1
- package/cjs/materialui/slider/SliderContainer.js +1 -1
- package/cjs/materialui/slider/SliderContainer.js.map +1 -1
- package/cjs/materialui/slider/SliderValues.js +1 -1
- package/cjs/materialui/slider/SliderValues.js.map +1 -1
- package/cjs/materialui/stepper/stepConnector.theme.js +1 -1
- package/cjs/materialui/stepper/stepConnector.theme.js.map +1 -1
- package/cjs/materialui/stepper/stepper.theme.js +1 -1
- package/cjs/materialui/stepper/stepper.theme.js.map +1 -1
- package/cjs/materialui/tabs/tabs.theme.js +1 -1
- package/cjs/materialui/tabs/tabs.theme.js.map +1 -1
- package/cjs/materialui/textfield/FormHelperText.js +1 -1
- package/cjs/materialui/textfield/FormHelperText.js.map +1 -1
- package/cjs/materialui/textfield/HelperTextContent.js +1 -1
- package/cjs/materialui/textfield/HelperTextContent.js.map +1 -1
- package/cjs/materialui/textfield/filledInput.theme.js +1 -1
- package/cjs/materialui/textfield/filledInput.theme.js.map +1 -1
- package/cjs/materialui/textfield/inputAdornment.theme.js +1 -1
- package/cjs/materialui/textfield/inputAdornment.theme.js.map +1 -1
- package/cjs/materialui/textfield/inputBase.theme.js +1 -1
- package/cjs/materialui/textfield/inputBase.theme.js.map +1 -1
- package/cjs/materialui/textfield/inputLabel.theme.js +1 -1
- package/cjs/materialui/textfield/inputLabel.theme.js.map +1 -1
- package/cjs/materialui/textfield/textField.theme.js +1 -1
- package/cjs/materialui/textfield/textField.theme.js.map +1 -1
- package/cjs/materialui/theme/sxConfig.d.ts +2 -0
- package/cjs/materialui/theme/sxConfig.js +2 -0
- package/cjs/materialui/theme/sxConfig.js.map +1 -0
- package/cjs/materialui/theme/theme.extensions.d.ts +9 -0
- package/cjs/materialui/theme/theme.js +1 -1
- package/cjs/materialui/theme/theme.js.map +1 -1
- package/cjs/node_modules/swiper/shared/swiper-core.js +1 -1
- package/cjs/node_modules/swiper/shared/swiper-core.js.map +1 -1
- package/cjs/node_modules/swiper/swiper-react.js.map +1 -1
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/sxOverride/index.d.ts +1 -0
- package/cjs/utils/sxOverride/sxOverride.d.ts +10 -0
- package/cjs/utils/sxOverride/sxOverride.js +2 -0
- package/cjs/utils/sxOverride/sxOverride.js.map +1 -0
- package/components/advancedTable/agGrid.js +1 -1
- package/components/advancedTable/agGrid.js.map +1 -1
- package/components/banner/Banner.js +1 -1
- package/components/banner/Banner.js.map +1 -1
- package/components/bottomSheet/BottomSheet.js +1 -1
- package/components/bottomSheet/BottomSheet.js.map +1 -1
- package/components/bypassBlock/BypassBlock.js +1 -1
- package/components/bypassBlock/BypassBlock.js.map +1 -1
- package/components/carousel/Autoplay.js +1 -1
- package/components/carousel/Autoplay.js.map +1 -1
- package/components/carousel/Carousel.js +1 -1
- package/components/carousel/Carousel.js.map +1 -1
- package/components/carousel/Navigation.js +1 -1
- package/components/carousel/Navigation.js.map +1 -1
- package/components/carousel/Pagination.d.ts +6 -6
- package/components/carousel/Pagination.js +1 -1
- package/components/carousel/Pagination.js.map +1 -1
- package/components/carousel/Slide.js +1 -1
- package/components/carousel/Slide.js.map +1 -1
- package/components/errorContent/ErrorContent.js +1 -1
- package/components/errorContent/ErrorContent.js.map +1 -1
- package/components/flag/FlowFlag.js +1 -1
- package/components/flag/FlowFlag.js.map +1 -1
- package/components/footer/Footer.js +1 -1
- package/components/footer/Footer.js.map +1 -1
- package/components/footer/FooterAccordion.js +1 -1
- package/components/footer/FooterAccordion.js.map +1 -1
- package/components/footer/FooterLink.js +1 -1
- package/components/footer/FooterLink.js.map +1 -1
- package/components/footer/FooterMenu.js +1 -1
- package/components/footer/FooterMenu.js.map +1 -1
- package/components/footer/FooterSectionContact.js +1 -1
- package/components/footer/FooterSectionContact.js.map +1 -1
- package/components/footer/FooterSectionLinks.js +1 -1
- package/components/footer/FooterSectionLinks.js.map +1 -1
- package/components/footer/FooterSectionMenu.js +1 -1
- package/components/footer/FooterSectionMenu.js.map +1 -1
- package/components/formMessage/FormMessage.js +1 -1
- package/components/formMessage/FormMessage.js.map +1 -1
- package/components/header/Header.js +1 -1
- package/components/header/Header.js.map +1 -1
- package/components/header/HeaderButton.js +1 -1
- package/components/header/HeaderButton.js.map +1 -1
- package/components/header/HeaderLanguageSelect.d.ts +6 -6
- package/components/header/HeaderLanguageSelect.js +1 -1
- package/components/header/HeaderLanguageSelect.js.map +1 -1
- package/components/header/HeaderLogo.d.ts +2 -2
- package/components/header/HeaderLogo.js +1 -1
- package/components/header/HeaderLogo.js.map +1 -1
- package/components/header/HeaderNavigationHero.js +1 -1
- package/components/header/HeaderNavigationHero.js.map +1 -1
- package/components/header/HeaderNavigationLink.js +1 -1
- package/components/header/HeaderNavigationLink.js.map +1 -1
- package/components/header/HeaderNavigationMenu.js +1 -1
- package/components/header/HeaderNavigationMenu.js.map +1 -1
- package/components/hotspotCard/HotspotCard.js +1 -1
- package/components/hotspotCard/HotspotCard.js.map +1 -1
- package/components/icon/stroke/SoundwaveIcon.js +1 -1
- package/components/icon/stroke/SoundwaveIcon.js.map +1 -1
- package/components/image/Image.d.ts +5 -1
- package/components/image/Image.js +1 -1
- package/components/image/Image.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/label/Label.js +1 -1
- package/components/label/Label.js.map +1 -1
- package/components/logo/Logo.js +1 -1
- package/components/logo/Logo.js.map +1 -1
- package/components/notification/Notification.d.ts +2 -2
- package/components/notification/Notification.js +1 -1
- package/components/notification/Notification.js.map +1 -1
- package/components/notification/NotificationCenter.js +1 -1
- package/components/notification/NotificationCenter.js.map +1 -1
- package/components/notification/NotificationCenterCategory.js +1 -1
- package/components/notification/NotificationCenterCategory.js.map +1 -1
- package/components/notification/NotificationCenterHeaderButton.js +1 -1
- package/components/notification/NotificationCenterHeaderButton.js.map +1 -1
- package/components/overlay/Overlay.js +1 -1
- package/components/overlay/Overlay.js.map +1 -1
- package/components/pageLayout/PageLayout.js +1 -1
- package/components/pageLayout/PageLayout.js.map +1 -1
- package/components/playPauseButton/PlayPauseButton.js +1 -1
- package/components/playPauseButton/PlayPauseButton.js.map +1 -1
- package/components/progress/Loader.js +1 -1
- package/components/progress/Loader.js.map +1 -1
- package/components/progress/LoadingText.js +1 -1
- package/components/progress/LoadingText.js.map +1 -1
- package/components/progress/ProgressState.js +1 -1
- package/components/progress/ProgressState.js.map +1 -1
- package/components/progress/Spinner.js +1 -1
- package/components/progress/Spinner.js.map +1 -1
- package/components/promptBar/PromptAttachments.d.ts +58 -0
- package/components/promptBar/PromptAttachments.js +2 -0
- package/components/promptBar/PromptAttachments.js.map +1 -0
- package/components/promptBar/PromptBar.d.ts +71 -0
- package/components/promptBar/PromptBar.js +2 -0
- package/components/promptBar/PromptBar.js.map +1 -0
- package/components/promptBar/PromptSubmitIconButton.d.ts +54 -0
- package/components/promptBar/PromptSubmitIconButton.js +2 -0
- package/components/promptBar/PromptSubmitIconButton.js.map +1 -0
- package/components/promptBar/index.d.ts +3 -0
- package/components/quickLink/QuickLink.d.ts +3 -3
- package/components/quickLink/QuickLink.js +1 -1
- package/components/quickLink/QuickLink.js.map +1 -1
- package/components/search/CollapsableSearch.js +1 -1
- package/components/search/CollapsableSearch.js.map +1 -1
- package/components/search/Search.d.ts +9 -1
- package/components/search/Search.js +1 -1
- package/components/search/Search.js.map +1 -1
- package/components/secondaryNavigation/SecondaryNavigation.js +1 -1
- package/components/secondaryNavigation/SecondaryNavigation.js.map +1 -1
- package/components/shortcut/Shortcut.js +1 -1
- package/components/shortcut/Shortcut.js.map +1 -1
- package/components/skodaThemeProvider/SkodaThemeProvider.js +1 -1
- package/components/skodaThemeProvider/SkodaThemeProvider.js.map +1 -1
- package/components/spacing/Spacing.js +1 -1
- package/components/spacing/Spacing.js.map +1 -1
- package/components/textAndCta/AppStoreButton.js +1 -1
- package/components/textAndCta/AppStoreButton.js.map +1 -1
- package/components/textAndCta/TextAndCta.js +1 -1
- package/components/textAndCta/TextAndCta.js.map +1 -1
- package/components/tooltipHeader/TooltipHeader.js +1 -1
- package/components/tooltipHeader/TooltipHeader.js.map +1 -1
- package/components/upload/components/uploadList/UploadList.js +1 -1
- package/components/upload/components/uploadList/UploadList.js.map +1 -1
- package/components/upload/components/uploadList/UploadListItem.js +1 -1
- package/components/upload/components/uploadList/UploadListItem.js.map +1 -1
- package/components/upload/components/uploadPreview/UploadPreview.js +1 -1
- package/components/upload/components/uploadPreview/UploadPreview.js.map +1 -1
- package/components/upload/components/uploadPreview/UploadPreviewImage.js +1 -1
- package/components/upload/components/uploadPreview/UploadPreviewImage.js.map +1 -1
- package/components/upload/components/uploadWrapper/UploadContent.js +1 -1
- package/components/upload/components/uploadWrapper/UploadContent.js.map +1 -1
- package/components/upload/components/uploadWrapper/UploadWrapper.js +1 -1
- package/components/upload/components/uploadWrapper/UploadWrapper.js.map +1 -1
- package/components/video/Video.js +1 -1
- package/components/video/Video.js.map +1 -1
- package/index.js +1 -1
- package/materialui/accordion/AccordionSummaryExpandWrapper.js +1 -1
- package/materialui/accordion/AccordionSummaryExpandWrapper.js.map +1 -1
- package/materialui/autocomplete/autocomplete.theme.js +1 -1
- package/materialui/autocomplete/autocomplete.theme.js.map +1 -1
- package/materialui/card/Card.js +1 -1
- package/materialui/card/Card.js.map +1 -1
- package/materialui/datepicker/datecalendar.theme.d.ts +150 -150
- package/materialui/datepicker/digitalclock.theme.d.ts +149 -149
- package/materialui/datepicker/pickersday.theme.d.ts +1 -1
- package/materialui/datepicker/pickersday.theme.js +1 -1
- package/materialui/datepicker/pickersday.theme.js.map +1 -1
- package/materialui/dialog/DialogTitle.js +1 -1
- package/materialui/dialog/DialogTitle.js.map +1 -1
- package/materialui/dialog/dialogTitle.theme.js +1 -1
- package/materialui/dialog/dialogTitle.theme.js.map +1 -1
- package/materialui/drawer/DrawerContent.d.ts +39 -0
- package/materialui/drawer/DrawerContent.js +2 -0
- package/materialui/drawer/DrawerContent.js.map +1 -0
- package/materialui/drawer/drawer.theme.js +1 -1
- package/materialui/drawer/drawer.theme.js.map +1 -1
- package/materialui/drawer/index.d.ts +2 -0
- package/materialui/iconButton/iconButton.theme.js +1 -1
- package/materialui/iconButton/iconButton.theme.js.map +1 -1
- package/materialui/list/listItemText.theme.js +1 -1
- package/materialui/list/listItemText.theme.js.map +1 -1
- package/materialui/slider/SliderContainer.js +1 -1
- package/materialui/slider/SliderContainer.js.map +1 -1
- package/materialui/slider/SliderValues.js +1 -1
- package/materialui/slider/SliderValues.js.map +1 -1
- package/materialui/stepper/stepConnector.theme.js +1 -1
- package/materialui/stepper/stepConnector.theme.js.map +1 -1
- package/materialui/stepper/stepper.theme.js +1 -1
- package/materialui/stepper/stepper.theme.js.map +1 -1
- package/materialui/tabs/tabs.theme.js +1 -1
- package/materialui/tabs/tabs.theme.js.map +1 -1
- package/materialui/textfield/FormHelperText.js +1 -1
- package/materialui/textfield/FormHelperText.js.map +1 -1
- package/materialui/textfield/HelperTextContent.js +1 -1
- package/materialui/textfield/HelperTextContent.js.map +1 -1
- package/materialui/textfield/filledInput.theme.js +1 -1
- package/materialui/textfield/filledInput.theme.js.map +1 -1
- package/materialui/textfield/inputAdornment.theme.js +1 -1
- package/materialui/textfield/inputAdornment.theme.js.map +1 -1
- package/materialui/textfield/inputBase.theme.js +1 -1
- package/materialui/textfield/inputBase.theme.js.map +1 -1
- package/materialui/textfield/inputLabel.theme.js +1 -1
- package/materialui/textfield/inputLabel.theme.js.map +1 -1
- package/materialui/textfield/textField.theme.js +1 -1
- package/materialui/textfield/textField.theme.js.map +1 -1
- package/materialui/theme/sxConfig.d.ts +2 -0
- package/materialui/theme/sxConfig.js +2 -0
- package/materialui/theme/sxConfig.js.map +1 -0
- package/materialui/theme/theme.extensions.d.ts +9 -0
- package/materialui/theme/theme.js +1 -1
- package/materialui/theme/theme.js.map +1 -1
- package/package.json +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/sxOverride/index.d.ts +1 -0
- package/utils/sxOverride/sxOverride.d.ts +10 -0
- package/utils/sxOverride/sxOverride.js +2 -0
- package/utils/sxOverride/sxOverride.js.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swiper-react.js","sources":["../../../../node_modules/swiper/swiper-react.mjs"],"sourcesContent":["/**\n * Swiper React 12.1.2\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: February 18, 2026\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: child.props.virtualIndex || child.key || `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(({\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n} = {}, externalElRef) => {\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper && !swiperRef.current.destroyed) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(({\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n} = {}, externalRef) => {\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n"],"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","isChildSwiperSlide","child","type","displayName","includes","processChildren","c","slides","React","Children","toArray","forEach","push","props","children","slide","getChildren","slots","slot","foundSlides","useIsomorphicLayoutEffect","callback","deps","window","useEffect","useLayoutEffect","SwiperSlideContext","createContext","SwiperContext","Swiper","forwardRef","className","tag","Tag","wrapperTag","WrapperTag","onSwiper","rest","externalElRef","eventsAssigned","containerClasses","setContainerClasses","useState","virtualData","setVirtualData","breakpointChanged","setBreakpointChanged","initializedRef","useRef","swiperElRef","swiperRef","oldPassedParamsRef","oldSlides","nextElRef","prevElRef","paginationElRef","scrollbarElRef","params","swiperParams","passedParams","restProps","events","getParams","onBeforeBreakpoint","on","_containerClasses","swiper","classes","initSwiper","passParams","wrapperClass","current","Swiper$1","virtual","enabled","extendWith","cache","renderExternal","renderExternalUpdate","extend","originalParams","off","emitSlidesClasses","destroyed","mountSwiper","el","nextEl","prevEl","paginationEl","scrollbarEl","destroy","keys","eventName","changedParams","getChangedParams","updateSwiper","updateOnVirtualData","createElement","ref","uniqueClasses","Provider","value","getSlideIndex","index","slideIndex","style","isHorizontal","rtlTranslate","offset","top","from","to","loopFrom","loop","loopTo","slidesToRender","map","cloneElement","virtualIndex","renderVirtual","swiperSlideIndex","needsNavigation","Fragment","needsScrollbar","needsPagination","SwiperSlide","zoom","lazy","externalRef","slideElRef","slideClasses","setSlideClasses","lazyLoaded","setLazyLoaded","updateClasses","_s","classNames","getSlideClasses","slideData","isActive","indexOf","isVisible","isPrev","isNext","renderChildren","onL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MAAO,CAClFlE,UAAW,wBACXmE,IAAKiD,IACCA,IAAMA,EAAKC,sBAAuB,UAI5CvB,EAAY1H,YAAc,uEA9QR,IACTkJ,EAAAA,WAAWzH","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"swiper-react.js","sources":["../../../../node_modules/swiper/swiper-react.mjs"],"sourcesContent":["/**\n * Swiper React 12.1.3\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: March 24, 2026\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: child.props.virtualIndex || child.key || `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(({\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n} = {}, externalElRef) => {\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper && !swiperRef.current.destroyed) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(({\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n} = {}, externalRef) => {\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n"],"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","isChildSwiperSlide","child","type","displayName","includes","processChildren","c","slides","React","Children","toArray","forEach","push","props","children","slide","getChildren","slots","slot","foundSlides","useIsomorphicLayoutEffect","callback","deps","window","useEffect","useLayoutEffect","SwiperSlideContext","createContext","SwiperContext","Swiper","forwardRef","className","tag","Tag","wrapperTag","WrapperTag","onSwiper","rest","externalElRef","eventsAssigned","containerClasses","setContainerClasses","useState","virtualData","setVirtualData","breakpointChanged","setBreakpointChanged","initializedRef","useRef","swiperElRef","swiperRef","oldPassedParamsRef","oldSlides","nextElRef","prevElRef","paginationElRef","scrollbarElRef","params","swiperParams","passedParams","restProps","events","getParams","onBeforeBreakpoint","on","_containerClasses","swiper","classes","initSwiper","passParams","wrapperClass","current","Swiper$1","virtual","enabled","extendWith","cache","renderExternal","renderExternalUpdate","extend","originalParams","off","emitSlidesClasses","destroyed","mountSwiper","el","nextEl","prevEl","paginationEl","scrollbarEl","destroy","keys","eventName","changedParams","getChangedParams","updateSwiper","updateOnVirtualData","createElement","ref","uniqueClasses","Provider","value","getSlideIndex","index","slideIndex","style","isHorizontal","rtlTranslate","offset","top","from","to","loopFrom","loop","loopTo","slidesToRender","map","cloneElement","virtualIndex","renderVirtual","swiperSlideIndex","needsNavigation","Fragment","needsScrollbar","needsPagination","SwiperSlide","zoom","lazy","externalRef","slideElRef","slideClasses","setSlideClasses","lazyLoaded","setLazyLoaded","updateClasses","_s","classNames","getSlideClasses","slideData","isActive","indexOf","isVisible","isPrev","isNext","renderChildren","onLoad","undefined","node","lazyPreloaderManaged","useContext"],"mappings":"8NAiBA,SAASA,IAYP,OAXAA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAC1D,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GACvB,IAAK,IAAII,KAAOD,EACVP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,GAG3B,CACA,OAAOL,CACT,EACOJ,EAASa,MAAMC,KAAMR,UAC9B,CAEA,SAASS,EAAmBC,GAC1B,OAAOA,EAAMC,MAAQD,EAAMC,KAAKC,aAAeF,EAAMC,KAAKC,YAAYC,SAAS,cACjF,CACA,SAASC,EAAgBC,GACvB,MAAMC,EAAS,GAQf,OAPAC,EAAAA,QAAMC,SAASC,QAAQJ,GAAGK,QAAQV,IAC5BD,EAAmBC,GACrBM,EAAOK,KAAKX,GACHA,EAAMY,OAASZ,EAAMY,MAAMC,UACpCT,EAAgBJ,EAAMY,MAAMC,UAAUH,QAAQI,GAASR,EAAOK,KAAKG,MAGhER,CACT,C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AWoE,EAAAA,EAAc,GAAG+B,IAAenG,EAAY,IAAIA,IAAc,MACzE,0BAA2BuF,EAC3B2B,OAPa,KACbZ,GAAc,KAObhG,GAAOyF,GAAqBtH,EAAAA,QAAMyF,cAAcvE,EAAmB0E,SAAU,CAC9EC,MAAOqC,GACOlI,EAAAA,QAAMyF,cAAc,MAAO,CACzClE,UAAW,wBACX,mBAAoC,iBAAT+F,EAAoBA,OAAOoB,GACrDF,IAAkBjB,IAASK,GAA2B5H,EAAAA,QAAMyF,cAAc,MAAO,CAClFlE,UAAW,wBACXmE,IAAKiD,IACCA,IAAMA,EAAKC,sBAAuB,SAEnCtB,GAAqBtH,EAAAA,QAAMyF,cAAcvE,EAAmB0E,SAAU,CAC3EC,MAAOqC,GACNM,IAAkBjB,IAASK,GAA2B5H,EAAAA,QAAMyF,cAAc,MAAO,CAClFlE,UAAW,wBACXmE,IAAKiD,IACCA,IAAMA,EAAKC,sBAAuB,UAI5CvB,EAAY1H,YAAc,uEA9QR,IACTkJ,EAAAA,WAAWzH","x_google_ignoreList":[0]}
|
package/cjs/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sxOverride';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
/**
|
|
3
|
+
* Merges a base sx object with an sx override prop.
|
|
4
|
+
* Handles all valid MUI sx prop forms: object, function `(theme) => ({...})`, or array.
|
|
5
|
+
*
|
|
6
|
+
* @param base - Base sx styles object
|
|
7
|
+
* @param override - sx prop to merge on top (object, function, or array)
|
|
8
|
+
* @returns Merged sx array compatible with MUI's sx prop
|
|
9
|
+
*/
|
|
10
|
+
export declare function sxOverride(base: SxProps<Theme>, override?: SxProps<Theme>): SxProps<Theme>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sxOverride.js","sources":["../../../../../src/utils/sxOverride/sxOverride.ts"],"sourcesContent":["import { SxProps, Theme } from '@mui/material';\n\n/**\n * Merges a base sx object with an sx override prop.\n * Handles all valid MUI sx prop forms: object, function `(theme) => ({...})`, or array.\n *\n * @param base - Base sx styles object\n * @param override - sx prop to merge on top (object, function, or array)\n * @returns Merged sx array compatible with MUI's sx prop\n */\nexport function sxOverride(base: SxProps<Theme>, override?: SxProps<Theme>): SxProps<Theme> {\n return [base, ...(Array.isArray(override) ? override : [override])];\n}\n"],"names":["base","override","Array","isArray"],"mappings":"gCAUM,SAAqBA,EAAsBC,GAC/C,MAAO,CAACD,KAAUE,MAAMC,QAAQF,GAAYA,EAAW,CAACA,GAC1D"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as a}from"react/jsx-runtime";import{Box as e}from"@mui/material";import{forwardRef as o}from"react";import{agGridVariables as i}from"./agGridVariables.js";import{skodaAgThemeParams as n}from"./agGridSkodaTheme.js";import{agGridCssIcons as r,agGridIconsDefinition as t}from"./agGridIcons.js";const
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{Box as e}from"@mui/material";import{forwardRef as o}from"react";import{agGridVariables as i}from"./agGridVariables.js";import{skodaAgThemeParams as n}from"./agGridSkodaTheme.js";import{agGridCssIcons as r,agGridIconsDefinition as t}from"./agGridIcons.js";import{sxOverride as g}from"../../utils/sxOverride/sxOverride.js";const p=a=>{const e=n(a);return{width:"100%","*":{maxWidth:"none"},'&:not(:has([class*="ag-theme-params-"])),&.ag-theme-material':{...i(a)},".ag-row-last":{borderBottom:"none"},".ag-column-last .ag-header-cell-resize":{display:"none"},".ag-center-cols-container":{minWidth:"100%"},".ag-center-cols-viewport":{minHeight:"56px"},"& .ag-header-cell .ag-header-cell-text":{fontWeight:`${e.headerFontWeight}`},"& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"block !important",cursor:"initial"},"& .ag-body-horizontal-scroll":{alignItems:"center",px:"22px",borderTop:"1px solid",borderTopColor:a.palette.surface.secondary,maxHeight:"none !important",height:"auto !important"},"& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport":{mt:"16px",mb:"23px"},"& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport":{my:0},"& .ag-paging-panel":{justifyContent:"center",px:"24px"},"& .ag-paging-panel .ag-paging-page-size":{position:"absolute"},"& .ag-paging-panel .ag-paging-page-summary-panel":{marginLeft:"auto"},"& .ag-paging-row-summary-panel":{display:"none"},"& .ag-paging-description":{fontSize:"18px",px:"18px"},"& .ag-paging-panel .ag-paging-description span":{color:"text.primary",px:"2px"},"& .ag-paging-panel .ag-paging-description .ag-paging-number":{fontWeight:"700"},"& .ag-paging-panel .ag-paging-description span:last-child":{fontWeight:"300"},"& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last":{display:"none"},"& .ag-paging-panel .ag-picker-field-wrapper":{border:"none",px:"0",cursor:"pointer",minWidth:"auto"},"& .ag-paging-panel .ag-picker-field-display":{minWidth:"28px",width:"auto",pr:"6px",fontSize:"18px",fontWeight:"700",textAlign:"center"},"& .ag-paging-panel .ag-label":{mr:"6px",fontSize:"18px"},"& .ag-popup > *":{backgroundColor:"onSurface.os0",cursor:"pointer",borderRadius:"0px"},"& .skoda-ag-row-pointer .ag-row:hover":{cursor:"pointer"},...r,"& .ag-icon-asc, & .ag-icon-desc":{color:a.palette.onSurface.os600},"& .ag-icon-asc:hover, & .ag-icon-desc:hover":{color:a.palette.text.primary},"& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)":{display:"inline-block !important"},"& .ag-header-cell-sortable .ag-hidden .ag-icon-asc::before":{content:'""',display:"flex",width:"17px",height:"17px",maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",verticalAlign:"middle",maskImage:`url(data:image/svg+xml;utf8,${encodeURIComponent(t.ascHover.svg)})`},"& .ag-header-cell-sortable .ag-hidden .ag-icon-asc:hover::before":{maskImage:`url(data:image/svg+xml;utf8,${encodeURIComponent(t.asc.svg)})`},fontFamily:e.fontFamily}},l=o(({sx:o,children:i,...n},r)=>a(e,{sx:g(a=>({...p(a)}),o),ref:r,...n,children:i}));export{l as SkodaAgGridProvider,p as agGridStyles};
|
|
2
2
|
//# sourceMappingURL=agGrid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agGrid.js","sources":["../../../src/components/advancedTable/agGrid.tsx"],"sourcesContent":["import { Box, BoxProps, CSSObject, Theme } from '@mui/material';\nimport React, { forwardRef } from 'react';\nimport { agGridVariables } from './agGridVariables';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons, agGridIconsDefinition } from './agGridIcons';\n\nexport const agGridStyles = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n width: '100%',\n // support applying global style on all elements maxWidth: '100%'\n '*': {\n maxWidth: 'none',\n },\n // Apply CSS variables only for non-themed tables of the old versions of ag grid (old versions of ag-grid, <v33, themes does not have ag-theme-params-* class)\n '&:not(:has([class*=\"ag-theme-params-\"])),&.ag-theme-material': {\n ...agGridVariables(theme),\n },\n\n '.ag-row-last': { borderBottom: 'none' },\n '.ag-column-last .ag-header-cell-resize': { display: 'none' },\n\n // Row lines full width\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n\n '.ag-center-cols-viewport': {\n // reduce to 1 row from default 150px\n minHeight: '56px',\n },\n\n // # Header styles\n '& .ag-header-cell .ag-header-cell-text': {\n fontWeight: `${agTheme.headerFontWeight}`,\n },\n\n // # Header Separators (only when column resizing is not activated and not for the last column)\n '& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden': {\n display: 'block !important',\n cursor: 'initial',\n },\n\n // # Horizontal Scrollbar\n '& .ag-body-horizontal-scroll': {\n alignItems: 'center',\n px: '22px',\n borderTop: '1px solid',\n borderTopColor: theme.palette.surface.secondary,\n maxHeight: 'none !important',\n height: 'auto !important',\n },\n '& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport': {\n mt: '16px',\n mb: '23px',\n },\n '& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport': {\n my: 0,\n },\n\n // # Pagination styles\n '& .ag-paging-panel': {\n justifyContent: 'center',\n px: '24px',\n },\n\n // Pagination layout - rows per page centered, arrows right-aligned\n '& .ag-paging-panel .ag-paging-page-size': {\n position: 'absolute',\n },\n '& .ag-paging-panel .ag-paging-page-summary-panel': {\n marginLeft: 'auto',\n },\n\n // Disable pagination summary\n '& .ag-paging-row-summary-panel': {\n display: 'none',\n },\n\n // Text styling within pagination arrows\n '& .ag-paging-description': {\n fontSize: '18px',\n px: '18px',\n },\n '& .ag-paging-panel .ag-paging-description span': {\n color: 'text.primary',\n px: '2px',\n },\n '& .ag-paging-panel .ag-paging-description .ag-paging-number': {\n fontWeight: '700',\n },\n '& .ag-paging-panel .ag-paging-description span:last-child': {\n fontWeight: '300',\n },\n\n // Disable AG-grid pagination icons - start, end\n '& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last': {\n display: 'none',\n },\n\n // Pagination - rows per page\n '& .ag-paging-panel .ag-picker-field-wrapper': {\n border: 'none',\n px: '0',\n cursor: 'pointer',\n minWidth: 'auto',\n },\n '& .ag-paging-panel .ag-picker-field-display': {\n minWidth: '28px',\n width: 'auto',\n pr: '6px',\n fontSize: '18px',\n fontWeight: '700',\n textAlign: 'center',\n },\n '& .ag-paging-panel .ag-label': {\n mr: '6px',\n fontSize: '18px',\n },\n\n '& .ag-popup > *': {\n backgroundColor: 'onSurface.os0',\n cursor: 'pointer',\n borderRadius: '0px',\n },\n\n // # Opt-in className=\"skoda-ag-pointer\"\n '& .skoda-ag-row-pointer .ag-row:hover': {\n cursor: 'pointer',\n },\n\n // Additional icons\n ...agGridCssIcons,\n\n // Show icons according to the SkodaFlow design\n '& .ag-icon-asc, & .ag-icon-desc': {\n color: theme.palette.onSurface.os600,\n },\n '& .ag-icon-asc:hover, & .ag-icon-desc:hover': {\n color: theme.palette.text.primary,\n },\n '& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)':\n {\n display: 'inline-block !important', // Ag grid also uses !important so we have to override it\n },\n\n '& .ag-header-cell-sortable .ag-hidden .ag-icon-asc::before': {\n content: '\"\"',\n display: 'flex',\n width: '17px',\n height: '17px',\n maskSize: 'contain',\n maskRepeat: 'no-repeat',\n maskPosition: 'center',\n verticalAlign: 'middle',\n maskImage: `url(data:image/svg+xml;utf8,${encodeURIComponent(agGridIconsDefinition.ascHover.svg)})`,\n },\n '& .ag-header-cell-sortable .ag-hidden .ag-icon-asc:hover::before': {\n maskImage: `url(data:image/svg+xml;utf8,${encodeURIComponent(agGridIconsDefinition.asc.svg)})`,\n },\n\n // Legacy class approach, no theme\n fontFamily: agTheme.fontFamily,\n };\n};\n\ninterface SkodaAgGridProviderProps extends BoxProps {}\n\n/**\n * A provider wrapper that applies Skoda AG Grid theming via sx.\n */\nexport const SkodaAgGridProvider: React.FC<SkodaAgGridProviderProps> = forwardRef(({ sx, children, ...rest }, ref) => {\n return (\n <Box\n sx={(theme) => ({\n
|
|
1
|
+
{"version":3,"file":"agGrid.js","sources":["../../../src/components/advancedTable/agGrid.tsx"],"sourcesContent":["import { Box, BoxProps, CSSObject, Theme } from '@mui/material';\nimport React, { forwardRef } from 'react';\nimport { agGridVariables } from './agGridVariables';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons, agGridIconsDefinition } from './agGridIcons';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport const agGridStyles = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n width: '100%',\n // support applying global style on all elements maxWidth: '100%'\n '*': {\n maxWidth: 'none',\n },\n // Apply CSS variables only for non-themed tables of the old versions of ag grid (old versions of ag-grid, <v33, themes does not have ag-theme-params-* class)\n '&:not(:has([class*=\"ag-theme-params-\"])),&.ag-theme-material': {\n ...agGridVariables(theme),\n },\n\n '.ag-row-last': { borderBottom: 'none' },\n '.ag-column-last .ag-header-cell-resize': { display: 'none' },\n\n // Row lines full width\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n\n '.ag-center-cols-viewport': {\n // reduce to 1 row from default 150px\n minHeight: '56px',\n },\n\n // # Header styles\n '& .ag-header-cell .ag-header-cell-text': {\n fontWeight: `${agTheme.headerFontWeight}`,\n },\n\n // # Header Separators (only when column resizing is not activated and not for the last column)\n '& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden': {\n display: 'block !important',\n cursor: 'initial',\n },\n\n // # Horizontal Scrollbar\n '& .ag-body-horizontal-scroll': {\n alignItems: 'center',\n px: '22px',\n borderTop: '1px solid',\n borderTopColor: theme.palette.surface.secondary,\n maxHeight: 'none !important',\n height: 'auto !important',\n },\n '& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport': {\n mt: '16px',\n mb: '23px',\n },\n '& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport': {\n my: 0,\n },\n\n // # Pagination styles\n '& .ag-paging-panel': {\n justifyContent: 'center',\n px: '24px',\n },\n\n // Pagination layout - rows per page centered, arrows right-aligned\n '& .ag-paging-panel .ag-paging-page-size': {\n position: 'absolute',\n },\n '& .ag-paging-panel .ag-paging-page-summary-panel': {\n marginLeft: 'auto',\n },\n\n // Disable pagination summary\n '& .ag-paging-row-summary-panel': {\n display: 'none',\n },\n\n // Text styling within pagination arrows\n '& .ag-paging-description': {\n fontSize: '18px',\n px: '18px',\n },\n '& .ag-paging-panel .ag-paging-description span': {\n color: 'text.primary',\n px: '2px',\n },\n '& .ag-paging-panel .ag-paging-description .ag-paging-number': {\n fontWeight: '700',\n },\n '& .ag-paging-panel .ag-paging-description span:last-child': {\n fontWeight: '300',\n },\n\n // Disable AG-grid pagination icons - start, end\n '& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last': {\n display: 'none',\n },\n\n // Pagination - rows per page\n '& .ag-paging-panel .ag-picker-field-wrapper': {\n border: 'none',\n px: '0',\n cursor: 'pointer',\n minWidth: 'auto',\n },\n '& .ag-paging-panel .ag-picker-field-display': {\n minWidth: '28px',\n width: 'auto',\n pr: '6px',\n fontSize: '18px',\n fontWeight: '700',\n textAlign: 'center',\n },\n '& .ag-paging-panel .ag-label': {\n mr: '6px',\n fontSize: '18px',\n },\n\n '& .ag-popup > *': {\n backgroundColor: 'onSurface.os0',\n cursor: 'pointer',\n borderRadius: '0px',\n },\n\n // # Opt-in className=\"skoda-ag-pointer\"\n '& .skoda-ag-row-pointer .ag-row:hover': {\n cursor: 'pointer',\n },\n\n // Additional icons\n ...agGridCssIcons,\n\n // Show icons according to the SkodaFlow design\n '& .ag-icon-asc, & .ag-icon-desc': {\n color: theme.palette.onSurface.os600,\n },\n '& .ag-icon-asc:hover, & .ag-icon-desc:hover': {\n color: theme.palette.text.primary,\n },\n '& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)':\n {\n display: 'inline-block !important', // Ag grid also uses !important so we have to override it\n },\n\n '& .ag-header-cell-sortable .ag-hidden .ag-icon-asc::before': {\n content: '\"\"',\n display: 'flex',\n width: '17px',\n height: '17px',\n maskSize: 'contain',\n maskRepeat: 'no-repeat',\n maskPosition: 'center',\n verticalAlign: 'middle',\n maskImage: `url(data:image/svg+xml;utf8,${encodeURIComponent(agGridIconsDefinition.ascHover.svg)})`,\n },\n '& .ag-header-cell-sortable .ag-hidden .ag-icon-asc:hover::before': {\n maskImage: `url(data:image/svg+xml;utf8,${encodeURIComponent(agGridIconsDefinition.asc.svg)})`,\n },\n\n // Legacy class approach, no theme\n fontFamily: agTheme.fontFamily,\n };\n};\n\ninterface SkodaAgGridProviderProps extends BoxProps {}\n\n/**\n * A provider wrapper that applies Skoda AG Grid theming via sx.\n */\nexport const SkodaAgGridProvider: React.FC<SkodaAgGridProviderProps> = forwardRef(({ sx, children, ...rest }, ref) => {\n return (\n <Box\n sx={sxOverride(\n (theme) => ({\n ...agGridStyles(theme),\n }),\n sx,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Box>\n );\n});\n"],"names":["agGridStyles","theme","agTheme","skodaAgThemeParams","width","maxWidth","agGridVariables","borderBottom","display","minWidth","minHeight","fontWeight","headerFontWeight","cursor","alignItems","px","borderTop","borderTopColor","palette","surface","secondary","maxHeight","height","mt","mb","my","justifyContent","position","marginLeft","fontSize","color","border","pr","textAlign","mr","backgroundColor","borderRadius","agGridCssIcons","onSurface","os600","text","primary","content","maskSize","maskRepeat","maskPosition","verticalAlign","maskImage","encodeURIComponent","agGridIconsDefinition","ascHover","svg","asc","fontFamily","SkodaAgGridProvider","forwardRef","sx","children","rest","ref","_jsx","Box","sxOverride"],"mappings":"gXAOO,MAAMA,EAAgBC,IAC3B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACLG,MAAO,OAEP,IAAK,CACHC,SAAU,QAGZ,+DAAgE,IAC3DC,EAAgBL,IAGrB,eAAgB,CAAEM,aAAc,QAChC,yCAA0C,CAAEC,QAAS,QAGrD,4BAA6B,CAC3BC,SAAU,QAGZ,2BAA4B,CAE1BC,UAAW,QAIb,yCAA0C,CACxCC,WAAY,GAAGT,EAAQU,oBAIzB,4EAA6E,CAC3EJ,QAAS,mBACTK,OAAQ,WAIV,+BAAgC,CAC9BC,WAAY,SACZC,GAAI,OACJC,UAAW,YACXC,eAAgBhB,EAAMiB,QAAQC,QAAQC,UACtCC,UAAW,kBACXC,OAAQ,mBAEV,mEAAoE,CAClEC,GAAI,OACJC,GAAI,QAEN,gFAAiF,CAC/EC,GAAI,GAIN,qBAAsB,CACpBC,eAAgB,SAChBX,GAAI,QAIN,0CAA2C,CACzCY,SAAU,YAEZ,mDAAoD,CAClDC,WAAY,QAId,iCAAkC,CAChCpB,QAAS,QAIX,2BAA4B,CAC1BqB,SAAU,OACVd,GAAI,QAEN,iDAAkD,CAChDe,MAAO,eACPf,GAAI,OAEN,8DAA+D,CAC7DJ,WAAY,OAEd,4DAA6D,CAC3DA,WAAY,OAId,sEAAuE,CACrEH,QAAS,QAIX,8CAA+C,CAC7CuB,OAAQ,OACRhB,GAAI,IACJF,OAAQ,UACRJ,SAAU,QAEZ,8CAA+C,CAC7CA,SAAU,OACVL,MAAO,OACP4B,GAAI,MACJH,SAAU,OACVlB,WAAY,MACZsB,UAAW,UAEb,+BAAgC,CAC9BC,GAAI,MACJL,SAAU,QAGZ,kBAAmB,CACjBM,gBAAiB,gBACjBtB,OAAQ,UACRuB,aAAc,OAIhB,wCAAyC,CACvCvB,OAAQ,cAIPwB,EAGH,kCAAmC,CACjCP,MAAO7B,EAAMiB,QAAQoB,UAAUC,OAEjC,8CAA+C,CAC7CT,MAAO7B,EAAMiB,QAAQsB,KAAKC,SAE5B,+HACE,CACEjC,QAAS,2BAGb,6DAA8D,CAC5DkC,QAAS,KACTlC,QAAS,OACTJ,MAAO,OACPkB,OAAQ,OACRqB,SAAU,UACVC,WAAY,YACZC,aAAc,SACdC,cAAe,SACfC,UAAW,+BAA+BC,mBAAmBC,EAAsBC,SAASC,SAE9F,mEAAoE,CAClEJ,UAAW,+BAA+BC,mBAAmBC,EAAsBG,IAAID,SAIzFE,WAAYnD,EAAQmD,aASXC,EAA0DC,EAAW,EAAGC,KAAIC,cAAaC,GAAQC,IAE1GC,EAACC,EAAG,CACFL,GAAIM,EACD7D,IAAK,IACDD,EAAaC,KAElBuD,GAEFG,IAAKA,KACDD,EAAID,SAEPA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{CircleExclamationFilledIcon as t}from"../icon/filled/CircleExclamationFilledIcon.js";import{CircleInformationFilledIcon as i}from"../icon/filled/CircleInformationFilledIcon.js";import{WarningFilledIcon as n}from"../icon/filled/WarningFilledIcon.js";import{useTheme as o,Box as a,Typography as l}from"@mui/material";import{forwardRef as s,useMemo as c}from"react";import{
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{CircleExclamationFilledIcon as t}from"../icon/filled/CircleExclamationFilledIcon.js";import{CircleInformationFilledIcon as i}from"../icon/filled/CircleInformationFilledIcon.js";import{WarningFilledIcon as n}from"../icon/filled/WarningFilledIcon.js";import{useTheme as o,Box as a,Typography as l}from"@mui/material";import{forwardRef as s,useMemo as c}from"react";import{sxOverride as p}from"../../utils/sxOverride/sxOverride.js";import{getFocusRingStyle as x}from"../focusring/focusring.js";const d=s(({children:s,variant:d="info",size:f="large",sx:m,iconProps:g,IconComponent:u,typographyProps:h,wrapperProps:w,buttons:y,buttonsWrapperProps:C,onClick:j,...b},I)=>{const v=o(),{sx:k,...B}=g??{},{sx:P,...S}=h??{},{sx:F,...z}=w??{},{sx:G,...O}=C??{},[W,A,D]=c(()=>{switch(d){case"error":return["error.main","error.light",n];case"warning":return["warning.main","warning.light",t];default:return["info.main","info.light",i]}},[d]),E=u??D;return r(a,{"data-testid":"Banner",role:"alert","aria-atomic":"true","aria-live":"assertive",onClick:j,sx:p({display:"flex",width:"100%",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",px:2,py:"small"===f?1:{xs:2,md:1},gap:1,borderLeft:6,borderColor:W,backgroundColor:"dark"===v.palette.mode?"onSurface.os900":A,textAlign:"left",...j&&{position:"relative",cursor:"pointer",...x(v,!0,"2px")}},m),ref:I,...b,children:[r(a,{"data-testid":"Banner.wrapper",sx:p({flexGrow:"1",display:"flex",alignItems:"flex-start",justifyContent:"flex-start",gap:1,py:.5},F),...z,children:[e(E,{"data-testid":"Banner.icon",sx:p({color:W},k),...B}),e(l,{"data-testid":"Banner.text",sx:p({color:"text.primary",flexGrow:"1",fontSize:{xl:"16px"},lineHeight:{xl:"24px"}},P),...S,children:s})]}),y&&e(a,{"data-testid":"Banner.buttons",sx:p({display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flexShrink:"0",ml:{xs:4,md:0},alignSelf:"flex-end"},G),...O,children:y})]})});export{d as Banner};
|
|
2
2
|
//# sourceMappingURL=Banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sources":["../../../src/components/banner/Banner.tsx"],"sourcesContent":["import { CircleExclamationFilledIcon } from '@/src/components/icon/filled/CircleExclamationFilledIcon';\nimport { CircleInformationFilledIcon } from '@/src/components/icon/filled/CircleInformationFilledIcon';\nimport { WarningFilledIcon } from '@/src/components/icon/filled/WarningFilledIcon';\nimport { Box, BoxProps, SvgIconProps, Typography, TypographyProps, useTheme } from '@mui/material';\nimport React, { ElementType, ComponentType, forwardRef, ReactNode, useMemo } from 'react';\nimport { getFocusRingStyle } from '@/src/components/focusring/focusring';\n\nexport interface BannerProps extends BoxProps<ElementType> {\n /**\n * Defines which variant of Banner component should be rendered\n * @default info\n */\n variant?: 'info' | 'warning' | 'error';\n /**\n * Set the proportions\n * @default large\n */\n size?: 'large' | 'small';\n /**\n * Properties passed to indicator icon\n */\n iconProps?: SvgIconProps;\n /**\n * Icon node to be used\n */\n IconComponent?: ComponentType<SvgIconProps>;\n /**\n * Properties passed to wrapper of children\n */\n typographyProps?: TypographyProps<ElementType>;\n /**\n * Properties applied to wrapper of content (Icon and Typography)\n */\n wrapperProps?: BoxProps<ElementType>;\n /**\n * ReactNode that renders buttons. If multiple buttons are needed, wrap them in React.Fragment\n */\n buttons?: ReactNode;\n /**\n * Properties applied to wrapper element of buttons\n */\n buttonsWrapperProps?: BoxProps<ElementType>;\n}\n\n/**\n * Alert notification banner\n */\nexport const Banner: React.FC<BannerProps> = forwardRef(\n (\n {\n children,\n variant = 'info',\n size = 'large',\n sx,\n iconProps,\n IconComponent,\n typographyProps,\n wrapperProps,\n buttons,\n buttonsWrapperProps,\n onClick,\n ...rest\n },\n ref,\n ) => {\n const theme = useTheme();\n const { sx: iconSx, ...restIcon } = iconProps ?? {};\n const { sx: typographySx, ...restTypography } = typographyProps ?? {};\n const { sx: wrapperSx, ...restWrapper } = wrapperProps ?? {};\n const { sx: buttonsWrapperSx, ...restButtonsWrapper } = buttonsWrapperProps ?? {};\n\n const [borderColor, backgroundColor, IconVariantComponent] = useMemo(() => {\n switch (variant) {\n case 'error':\n return ['error.main', 'error.light', WarningFilledIcon];\n case 'warning':\n return ['warning.main', 'warning.light', CircleExclamationFilledIcon];\n case 'info':\n default:\n return ['info.main', 'info.light', CircleInformationFilledIcon];\n }\n }, [variant]);\n const BannerIcon = IconComponent ?? IconVariantComponent;\n\n return (\n <Box\n data-testid=\"Banner\"\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live=\"assertive\"\n onClick={onClick}\n sx={{\n
|
|
1
|
+
{"version":3,"file":"Banner.js","sources":["../../../src/components/banner/Banner.tsx"],"sourcesContent":["import { CircleExclamationFilledIcon } from '@/src/components/icon/filled/CircleExclamationFilledIcon';\nimport { CircleInformationFilledIcon } from '@/src/components/icon/filled/CircleInformationFilledIcon';\nimport { WarningFilledIcon } from '@/src/components/icon/filled/WarningFilledIcon';\nimport { Box, BoxProps, SvgIconProps, Typography, TypographyProps, useTheme } from '@mui/material';\nimport React, { ElementType, ComponentType, forwardRef, ReactNode, useMemo } from 'react';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { getFocusRingStyle } from '@/src/components/focusring/focusring';\n\nexport interface BannerProps extends BoxProps<ElementType> {\n /**\n * Defines which variant of Banner component should be rendered\n * @default info\n */\n variant?: 'info' | 'warning' | 'error';\n /**\n * Set the proportions\n * @default large\n */\n size?: 'large' | 'small';\n /**\n * Properties passed to indicator icon\n */\n iconProps?: SvgIconProps;\n /**\n * Icon node to be used\n */\n IconComponent?: ComponentType<SvgIconProps>;\n /**\n * Properties passed to wrapper of children\n */\n typographyProps?: TypographyProps<ElementType>;\n /**\n * Properties applied to wrapper of content (Icon and Typography)\n */\n wrapperProps?: BoxProps<ElementType>;\n /**\n * ReactNode that renders buttons. If multiple buttons are needed, wrap them in React.Fragment\n */\n buttons?: ReactNode;\n /**\n * Properties applied to wrapper element of buttons\n */\n buttonsWrapperProps?: BoxProps<ElementType>;\n}\n\n/**\n * Alert notification banner\n */\nexport const Banner: React.FC<BannerProps> = forwardRef(\n (\n {\n children,\n variant = 'info',\n size = 'large',\n sx,\n iconProps,\n IconComponent,\n typographyProps,\n wrapperProps,\n buttons,\n buttonsWrapperProps,\n onClick,\n ...rest\n },\n ref,\n ) => {\n const theme = useTheme();\n const { sx: iconSx, ...restIcon } = iconProps ?? {};\n const { sx: typographySx, ...restTypography } = typographyProps ?? {};\n const { sx: wrapperSx, ...restWrapper } = wrapperProps ?? {};\n const { sx: buttonsWrapperSx, ...restButtonsWrapper } = buttonsWrapperProps ?? {};\n\n const [borderColor, backgroundColor, IconVariantComponent] = useMemo(() => {\n switch (variant) {\n case 'error':\n return ['error.main', 'error.light', WarningFilledIcon];\n case 'warning':\n return ['warning.main', 'warning.light', CircleExclamationFilledIcon];\n case 'info':\n default:\n return ['info.main', 'info.light', CircleInformationFilledIcon];\n }\n }, [variant]);\n const BannerIcon = IconComponent ?? IconVariantComponent;\n\n return (\n <Box\n data-testid=\"Banner\"\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live=\"assertive\"\n onClick={onClick}\n sx={sxOverride(\n {\n display: 'flex',\n width: '100%',\n // on mobile content and button bellow each other\n flexDirection: { xs: 'column', md: 'row' },\n alignItems: { xs: 'flex-start', md: 'center' },\n justifyContent: 'space-between',\n // proportions\n px: 2,\n py: size === 'small' ? 1 : { xs: 2, md: 1 },\n gap: 1,\n // style\n borderLeft: 6,\n borderColor: borderColor,\n backgroundColor: theme.palette.mode === 'dark' ? 'onSurface.os900' : backgroundColor,\n textAlign: 'left',\n // clickable style\n ...(onClick && {\n position: 'relative',\n cursor: 'pointer',\n // focused style\n ...getFocusRingStyle(theme, true, '2px'),\n }),\n },\n sx,\n )}\n ref={ref}\n {...rest}\n >\n <Box\n data-testid=\"Banner.wrapper\"\n sx={sxOverride(\n {\n // align icon and content\n flexGrow: '1',\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'flex-start',\n gap: 1,\n py: 0.5,\n },\n wrapperSx,\n )}\n {...restWrapper}\n >\n <BannerIcon\n data-testid=\"Banner.icon\"\n sx={sxOverride(\n {\n color: borderColor,\n },\n iconSx,\n )}\n {...restIcon}\n />\n <Typography\n data-testid=\"Banner.text\"\n sx={sxOverride(\n {\n color: 'text.primary',\n flexGrow: '1',\n // custom font according to Figma\n fontSize: { xl: '16px' },\n lineHeight: { xl: '24px' },\n },\n typographySx,\n )}\n {...restTypography}\n >\n {children}\n </Typography>\n </Box>\n {buttons && (\n <Box\n data-testid=\"Banner.buttons\"\n sx={sxOverride(\n {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 1,\n // always show buttons next to each other\n flexShrink: '0',\n // on mobile align with text\n ml: { xs: 4, md: 0 },\n // on mobile move to the right side\n alignSelf: 'flex-end',\n },\n buttonsWrapperSx,\n )}\n {...restButtonsWrapper}\n >\n {buttons}\n </Box>\n )}\n </Box>\n );\n },\n);\n"],"names":["Banner","forwardRef","children","variant","size","sx","iconProps","IconComponent","typographyProps","wrapperProps","buttons","buttonsWrapperProps","onClick","rest","ref","theme","useTheme","iconSx","restIcon","typographySx","restTypography","wrapperSx","restWrapper","buttonsWrapperSx","restButtonsWrapper","borderColor","backgroundColor","IconVariantComponent","useMemo","WarningFilledIcon","CircleExclamationFilledIcon","CircleInformationFilledIcon","BannerIcon","_jsxs","Box","role","sxOverride","display","width","flexDirection","xs","md","alignItems","justifyContent","px","py","gap","borderLeft","palette","mode","textAlign","position","cursor","getFocusRingStyle","flexGrow","_jsx","color","Typography","fontSize","xl","lineHeight","flexShrink","ml","alignSelf"],"mappings":"oiBAgDO,MAAMA,EAAgCC,EAC3C,EAEIC,WACAC,UAAU,OACVC,OAAO,QACPC,KACAC,YACAC,gBACAC,kBACAC,eACAC,UACAC,sBACAC,aACGC,GAELC,KAEA,MAAMC,EAAQC,KACNX,GAAIY,KAAWC,GAAaZ,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AChBC,WAAY,CAAED,GAAI,SAEpBxC,MAEEC,WAEHlB,OAGJQ,GACC6C,EAACrB,EAAG,CAAA,cACU,iBACZ7B,GAAI+B,EACF,CACEC,QAAS,OACTK,WAAY,SACZC,eAAgB,gBAChBG,IAAK,EAELe,WAAY,IAEZC,GAAI,CAAEtB,GAAI,EAAGC,GAAI,GAEjBsB,UAAW,YAEbxC,MAEEC,EAAkBtB,SAErBQ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{useTheme as r,SwipeableDrawer as s,Box as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{useTheme as r,SwipeableDrawer as s,Box as i,Typography as l,IconButton as n}from"@mui/material";import{CloseIcon as p}from"../icon/stroke/CloseIcon.js";import{useElementScrollable as a}from"../../utils/useElementScrollable/useElementScrollable.js";import{getFocusRingBoxShadow as d}from"../focusring/focusring.js";import{sxOverride as m}from"../../utils/sxOverride/sxOverride.js";const c=o(({children:o,open:c,setOpen:x,slotProps:u,puller:f,pullerWrapperProps:h,pullerProps:b,closeButton:S,closeButtonProps:B,closeButtonIconProps:g,CloseButtonIconComponent:C,footerSlot:y,title:j,titleProps:w={},headerWrapper:P,titleWrapper:v,contentWrapper:I,footerWrapper:O,maxHeight:R=60,...W},k)=>{const{sx:T,...D}=P??{},{sx:E,...H}=v??{},{sx:M,...z}=w??{},{sx:L,...$}=h??{},{sx:q,...A}=b??{},{sx:F,...G}=B??{},{sx:J,...K}=I??{},{sx:N,...Q}=O??{},U=r(),V=C||p,{isScrollable:X,elementRef:Y}=a("y");return e(s,{dir:U.direction,anchor:"bottom",open:c,onClose:()=>x(!1),onOpen:()=>x(!0),disableSwipeToOpen:!0,ModalProps:{keepMounted:!0},"data-testid":"BottomSheet",slotProps:{...u,paper:{...u?.paper,sx:{boxShadow:"none",borderTopLeftRadius:"16px",borderTopRightRadius:"16px",maxHeight:`${R}%`,...u?.paper?.sx}}},ref:k,...W,children:[(j||S||f)&&e(i,{sx:m({px:2},T),"data-testid":"BottomSheet-header",...D,children:[f&&t(i,{sx:m({position:"relative",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},L),...$,children:t(i,{"data-testid":"BottomSheet-puller",sx:m({width:"28px",height:"4px",backgroundColor:"onSurface.os500",mt:1,mb:1.5,borderRadius:"8px"},q),...A})}),(j||S&&!f)&&e(i,{sx:m({display:"flex",justifyContent:j?"space-between":"flex-end",alignItems:"flex-start",gap:1,pt:X&&f?1:0},E),...H,children:[j&&t(l,{"data-testid":"BottomSheet-title",variant:"h4",component:"h2",sx:m({mt:f?0:2,mb:X?2:0,overflow:"hidden"},M),...z,children:j}),S&&!f&&t(n,{"data-testid":"BottomSheet-closeButton",size:"medium",onClick:()=>x(!1),"aria-label":"Close bottom sheet",sx:m({my:"4px",mr:"-6px"},F),...G,children:t(V,{...g})})]})]}),t(i,{"data-testid":"BottomSheet-content",ref:Y,sx:m({overflow:"auto",borderTop:X?1:0,borderBottom:X&&y?1:0,borderColor:"surface.secondary",p:2,"&:focus-visible":{outline:"none",boxShadow:d(U,!0)}},J),...K,children:o}),y&&t(i,{"data-testid":"BottomSheet-footer",sx:m({px:2,pt:3,pb:2,display:"flex",justifyContent:"flex-start",alignItems:"stretch",flexDirection:"column",gap:"16px"},N),...Q,children:y})]})});export{c as BottomSheet};
|
|
2
2
|
//# sourceMappingURL=BottomSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.js","sources":["../../../src/components/bottomSheet/BottomSheet.tsx"],"sourcesContent":["import React, { ComponentType, ElementType, forwardRef } from 'react';\nimport {\n Box,\n BoxProps,\n IconButtonProps,\n SwipeableDrawer,\n SwipeableDrawerProps,\n IconButton,\n Typography,\n TypographyProps,\n useTheme,\n SvgIconProps,\n PaperProps,\n} from '@mui/material';\nimport { CloseIcon } from '@/src/components/icon/stroke/CloseIcon';\nimport { useElementScrollable } from '@/src/utils/useElementScrollable';\nimport { getFocusRingBoxShadow } from '@/src/components/focusring/focusring';\n\nexport interface BottomSheetProps extends Omit<SwipeableDrawerProps, 'onClose' | 'onOpen' | 'title'> {\n /**\n * Open state component flag\n */\n open: boolean;\n /**\n * Open state component function\n */\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n /**\n * Flag for displaying close button\n */\n closeButton?: boolean;\n /**\n * Props applied to closeButton IconButton\n */\n closeButtonProps?: Partial<IconButtonProps>;\n /**\n * Props applied to Icon in closeButton\n */\n closeButtonIconProps?: SvgIconProps;\n /**\n * Icon node to be used\n */\n CloseButtonIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Flag for displaying bar that visualizes pulling function\n */\n puller?: boolean;\n /**\n * Props applied to wrapper of puller\n */\n pullerWrapperProps?: BoxProps<ElementType>;\n /**\n * Props applied to puller\n */\n pullerProps?: BoxProps<ElementType>;\n /**\n * Footer children slot\n */\n footerSlot?: React.ReactNode;\n /**\n * Text in header\n */\n title?: React.ReactNode;\n /**\n * Text props\n */\n titleProps?: TypographyProps<ElementType>;\n /**\n * Max height of whole component in percentages\n * @default 60\n */\n maxHeight?: number;\n /**\n * Wrapper of header\n */\n headerWrapper?: BoxProps<ElementType>;\n /**\n * Wrapper of title and close button\n */\n titleWrapper?: BoxProps<ElementType>;\n /**\n * Wrapper of content\n */\n contentWrapper?: BoxProps<ElementType>;\n /**\n * Wrapper of footer\n */\n footerWrapper?: BoxProps<ElementType>;\n}\n\nexport const BottomSheet: React.FC<BottomSheetProps> = forwardRef(\n (\n {\n children,\n open,\n setOpen,\n slotProps,\n puller,\n pullerWrapperProps,\n pullerProps,\n closeButton,\n closeButtonProps,\n closeButtonIconProps,\n CloseButtonIconComponent,\n footerSlot,\n title,\n titleProps = {},\n headerWrapper,\n titleWrapper,\n contentWrapper,\n footerWrapper,\n maxHeight = 60,\n ...rest\n },\n ref,\n ) => {\n const { sx: headerSx, ...restHeader } = headerWrapper ?? {};\n const { sx: titleWrapperSx, ...restTitleWrapper } = titleWrapper ?? {};\n const { sx: titleSx, ...restTitle } = titleProps ?? {};\n const { sx: pullerWrapperSx, ...restPullerWrapper } = pullerWrapperProps ?? {};\n const { sx: pullerSx, ...restPuller } = pullerProps ?? {};\n const { sx: closeButtonSx, ...restCloseButton } = closeButtonProps ?? {};\n const { sx: contentSx, ...restContent } = contentWrapper ?? {};\n const { sx: footerSx, ...restFooter } = footerWrapper ?? {};\n const theme = useTheme();\n const BottomSheetCloseButtonIcon = CloseButtonIconComponent || CloseIcon;\n\n const { isScrollable, elementRef } = useElementScrollable('y');\n\n return (\n <SwipeableDrawer\n dir={theme.direction}\n anchor=\"bottom\"\n open={open}\n onClose={() => setOpen(false)}\n onOpen={() => setOpen(true)}\n disableSwipeToOpen\n ModalProps={{\n keepMounted: true,\n }}\n data-testid=\"BottomSheet\"\n slotProps={{\n ...slotProps,\n paper: {\n ...slotProps?.paper,\n sx: {\n boxShadow: 'none',\n borderTopLeftRadius: '16px',\n borderTopRightRadius: '16px',\n maxHeight: `${maxHeight}%`,\n ...(slotProps?.paper as PaperProps)?.sx,\n },\n },\n }}\n ref={ref}\n {...rest}\n >\n {(title || closeButton || puller) && (\n <Box sx={{ px: 2, ...headerSx }} data-testid=\"BottomSheet-header\" {...restHeader}>\n {puller && (\n <Box\n sx={{\n position: 'relative',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n ...pullerWrapperSx,\n }}\n {...restPullerWrapper}\n >\n <Box\n data-testid=\"BottomSheet-puller\"\n sx={{\n width: '28px',\n height: '4px',\n backgroundColor: 'onSurface.os500',\n mt: 1,\n mb: 1.5,\n borderRadius: '8px',\n ...pullerSx,\n }}\n {...restPuller}\n />\n </Box>\n )}\n {(title || (closeButton && !puller)) && (\n <Box\n sx={{\n display: 'flex',\n justifyContent: title ? 'space-between' : 'flex-end',\n alignItems: 'flex-start',\n gap: 1,\n pt: isScrollable && puller ? 1 : 0,\n ...titleWrapperSx,\n }}\n {...restTitleWrapper}\n >\n {title && (\n <Typography\n data-testid=\"BottomSheet-title\"\n variant=\"h4\"\n component=\"h2\"\n sx={{\n mt: puller ? 0 : 2,\n mb: isScrollable ? 2 : 0,\n ...titleSx,\n }}\n {...restTitle}\n >\n {title}\n </Typography>\n )}\n {closeButton && !puller && (\n <IconButton\n data-testid=\"BottomSheet-closeButton\"\n size=\"medium\"\n onClick={() => setOpen(false)}\n aria-label=\"Close bottom sheet\"\n sx={{\n my: '4px',\n mr: '-6px',\n ...closeButtonSx,\n }}\n {...restCloseButton}\n >\n <BottomSheetCloseButtonIcon {...closeButtonIconProps} />\n </IconButton>\n )}\n </Box>\n )}\n </Box>\n )}\n <Box\n data-testid=\"BottomSheet-content\"\n ref={elementRef}\n sx={{\n overflow: 'auto',\n borderTop: isScrollable ? 1 : 0,\n borderBottom: isScrollable && footerSlot ? 1 : 0,\n borderColor: 'surface.secondary',\n p: 2,\n // can be focused since scrollable\n '&:focus-visible': {\n outline: 'none',\n boxShadow: getFocusRingBoxShadow(theme, true),\n },\n ...contentSx,\n }}\n {...restContent}\n >\n {children}\n </Box>\n {footerSlot && (\n <Box\n data-testid=\"BottomSheet-footer\"\n sx={{\n px: 2,\n pt: 3,\n pb: 2,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'stretch',\n flexDirection: 'column',\n gap: '16px',\n ...footerSx,\n }}\n {...restFooter}\n >\n {footerSlot}\n </Box>\n )}\n </SwipeableDrawer>\n );\n },\n);\n"],"names":["BottomSheet","forwardRef","children","open","setOpen","slotProps","puller","pullerWrapperProps","pullerProps","closeButton","closeButtonProps","closeButtonIconProps","CloseButtonIconComponent","footerSlot","title","titleProps","headerWrapper","titleWrapper","contentWrapper","footerWrapper","maxHeight","rest","ref","sx","headerSx","restHeader","titleWrapperSx","restTitleWrapper","titleSx","restTitle","pullerWrapperSx","restPullerWrapper","pullerSx","restPuller","closeButtonSx","restCloseButton","contentSx","restContent","footerSx","restFooter","theme","useTheme","BottomSheetCloseButtonIcon","CloseIcon","isScrollable","elementRef","useElementScrollable","_jsxs","SwipeableDrawer","dir","direction","anchor","onClose","onOpen","disableSwipeToOpen","ModalProps","keepMounted","paper","boxShadow","borderTopLeftRadius","borderTopRightRadius","Box","px","_jsx","position","display","flexDirection","justifyContent","alignItems","width","height","backgroundColor","mt","mb","borderRadius","gap","pt","Typography","variant","component","IconButton","size","onClick","my","mr","overflow","borderTop","borderBottom","borderColor","p","outline","getFocusRingBoxShadow","pb"],"mappings":"sZA0FO,MAAMA,EAA0CC,EACrD,EAEIC,WACAC,OACAC,UACAC,YACAC,SACAC,qBACAC,cACAC,cACAC,mBACAC,uBACAC,2BACAC,aACAC,QACAC,aAAa,CAAA,EACbC,gBACAC,eACAC,iBACAC,gBACAC,YAAY,MACTC,GAELC,KAEA,MAAQC,GAAIC,KAAaC,GAAeT,GAAiB,CAAA,GACjDO,GAAIG,KAAmBC,GAAqBV,GAAgB,CAAA,GAC5DM,GAAIK,KAAYC,GAAcd,GAAc,CAAA,GAC5CQ,GAAIO,KAAoBC,GAAsBxB,GAAsB,CAAA,GACpEgB,GAAIS,KAAaC,GAAezB,GAAe,CAAA,GAC/Ce,GAAIW,KAAkBC,GAAoBzB,GAAoB,CAAA,GAC9Da,GAAIa,KAAcC,GAAgBnB,GAAkB,CAAA,GACpDK,GAAIe,KAAaC,GAAepB,GAAiB,CAAA,EACnDqB,EAAQC,IACRC,EAA6B9B,GAA4B+B,GAEzDC,aAAEA,EAAYC,WAAEA,GAAeC,EAAqB,KAE1D,OACEC,EAACC,GACCC,IAAKT,EAAMU,UACXC,OAAO,SACPhD,KAAMA,EACNiD,QAAS,IAAMhD,GAAQ,GACvBiD,OAAQ,IAAMjD,GAAQ,GACtBkD,oBAAkB,EAClBC,WAAY,CACVC,aAAa,GACd,cACW,cACZnD,UAAW,IACNA,EACHoD,MAAO,IACFpD,GAAWoD,MACdlC,GAAI,CACFmC,UAAW,OACXC,oBAAqB,OACrBC,qBAAs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C,SAEdA,IAEFW,GACCkD,EAACF,EAAG,CAAA,cACU,qBACZtC,GAAI,CACFuC,GAAI,EACJc,GAAI,EACJgB,GAAI,EACJ3B,QAAS,OACTE,eAAgB,aAChBC,WAAY,UACZF,cAAe,SACfS,IAAK,UACFrC,MAEDC,EAAUrC,SAEbW"}
|
|
1
|
+
{"version":3,"file":"BottomSheet.js","sources":["../../../src/components/bottomSheet/BottomSheet.tsx"],"sourcesContent":["import React, { ComponentType, ElementType, forwardRef } from 'react';\nimport {\n Box,\n BoxProps,\n IconButtonProps,\n SwipeableDrawer,\n SwipeableDrawerProps,\n IconButton,\n Typography,\n TypographyProps,\n useTheme,\n SvgIconProps,\n PaperProps,\n} from '@mui/material';\nimport { CloseIcon } from '@/src/components/icon/stroke/CloseIcon';\nimport { useElementScrollable } from '@/src/utils/useElementScrollable';\nimport { getFocusRingBoxShadow } from '@/src/components/focusring/focusring';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport interface BottomSheetProps extends Omit<SwipeableDrawerProps, 'onClose' | 'onOpen' | 'title'> {\n /**\n * Open state component flag\n */\n open: boolean;\n /**\n * Open state component function\n */\n setOpen: React.Dispatch<React.SetStateAction<boolean>>;\n /**\n * Flag for displaying close button\n */\n closeButton?: boolean;\n /**\n * Props applied to closeButton IconButton\n */\n closeButtonProps?: Partial<IconButtonProps>;\n /**\n * Props applied to Icon in closeButton\n */\n closeButtonIconProps?: SvgIconProps;\n /**\n * Icon node to be used\n */\n CloseButtonIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Flag for displaying bar that visualizes pulling function\n */\n puller?: boolean;\n /**\n * Props applied to wrapper of puller\n */\n pullerWrapperProps?: BoxProps<ElementType>;\n /**\n * Props applied to puller\n */\n pullerProps?: BoxProps<ElementType>;\n /**\n * Footer children slot\n */\n footerSlot?: React.ReactNode;\n /**\n * Text in header\n */\n title?: React.ReactNode;\n /**\n * Text props\n */\n titleProps?: TypographyProps<ElementType>;\n /**\n * Max height of whole component in percentages\n * @default 60\n */\n maxHeight?: number;\n /**\n * Wrapper of header\n */\n headerWrapper?: BoxProps<ElementType>;\n /**\n * Wrapper of title and close button\n */\n titleWrapper?: BoxProps<ElementType>;\n /**\n * Wrapper of content\n */\n contentWrapper?: BoxProps<ElementType>;\n /**\n * Wrapper of footer\n */\n footerWrapper?: BoxProps<ElementType>;\n}\n\nexport const BottomSheet: React.FC<BottomSheetProps> = forwardRef(\n (\n {\n children,\n open,\n setOpen,\n slotProps,\n puller,\n pullerWrapperProps,\n pullerProps,\n closeButton,\n closeButtonProps,\n closeButtonIconProps,\n CloseButtonIconComponent,\n footerSlot,\n title,\n titleProps = {},\n headerWrapper,\n titleWrapper,\n contentWrapper,\n footerWrapper,\n maxHeight = 60,\n ...rest\n },\n ref,\n ) => {\n const { sx: headerSx, ...restHeader } = headerWrapper ?? {};\n const { sx: titleWrapperSx, ...restTitleWrapper } = titleWrapper ?? {};\n const { sx: titleSx, ...restTitle } = titleProps ?? {};\n const { sx: pullerWrapperSx, ...restPullerWrapper } = pullerWrapperProps ?? {};\n const { sx: pullerSx, ...restPuller } = pullerProps ?? {};\n const { sx: closeButtonSx, ...restCloseButton } = closeButtonProps ?? {};\n const { sx: contentSx, ...restContent } = contentWrapper ?? {};\n const { sx: footerSx, ...restFooter } = footerWrapper ?? {};\n const theme = useTheme();\n const BottomSheetCloseButtonIcon = CloseButtonIconComponent || CloseIcon;\n\n const { isScrollable, elementRef } = useElementScrollable('y');\n\n return (\n <SwipeableDrawer\n dir={theme.direction}\n anchor=\"bottom\"\n open={open}\n onClose={() => setOpen(false)}\n onOpen={() => setOpen(true)}\n disableSwipeToOpen\n ModalProps={{\n keepMounted: true,\n }}\n data-testid=\"BottomSheet\"\n slotProps={{\n ...slotProps,\n paper: {\n ...slotProps?.paper,\n sx: {\n boxShadow: 'none',\n borderTopLeftRadius: '16px',\n borderTopRightRadius: '16px',\n maxHeight: `${maxHeight}%`,\n ...(slotProps?.paper as PaperProps)?.sx,\n },\n },\n }}\n ref={ref}\n {...rest}\n >\n {(title || closeButton || puller) && (\n <Box sx={sxOverride({ px: 2 }, headerSx)} data-testid=\"BottomSheet-header\" {...restHeader}>\n {puller && (\n <Box\n sx={sxOverride(\n {\n position: 'relative',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n },\n pullerWrapperSx,\n )}\n {...restPullerWrapper}\n >\n <Box\n data-testid=\"BottomSheet-puller\"\n sx={sxOverride(\n {\n width: '28px',\n height: '4px',\n backgroundColor: 'onSurface.os500',\n mt: 1,\n mb: 1.5,\n borderRadius: '8px',\n },\n pullerSx,\n )}\n {...restPuller}\n />\n </Box>\n )}\n {(title || (closeButton && !puller)) && (\n <Box\n sx={sxOverride(\n {\n display: 'flex',\n justifyContent: title ? 'space-between' : 'flex-end',\n alignItems: 'flex-start',\n gap: 1,\n pt: isScrollable && puller ? 1 : 0,\n },\n titleWrapperSx,\n )}\n {...restTitleWrapper}\n >\n {title && (\n <Typography\n data-testid=\"BottomSheet-title\"\n variant=\"h4\"\n component=\"h2\"\n sx={sxOverride(\n {\n mt: puller ? 0 : 2,\n mb: isScrollable ? 2 : 0,\n overflow: 'hidden',\n },\n titleSx,\n )}\n {...restTitle}\n >\n {title}\n </Typography>\n )}\n {closeButton && !puller && (\n <IconButton\n data-testid=\"BottomSheet-closeButton\"\n size=\"medium\"\n onClick={() => setOpen(false)}\n aria-label=\"Close bottom sheet\"\n sx={sxOverride(\n {\n my: '4px',\n mr: '-6px',\n },\n closeButtonSx,\n )}\n {...restCloseButton}\n >\n <BottomSheetCloseButtonIcon {...closeButtonIconProps} />\n </IconButton>\n )}\n </Box>\n )}\n </Box>\n )}\n <Box\n data-testid=\"BottomSheet-content\"\n ref={elementRef}\n sx={sxOverride(\n {\n overflow: 'auto',\n borderTop: isScrollable ? 1 : 0,\n borderBottom: isScrollable && footerSlot ? 1 : 0,\n borderColor: 'surface.secondary',\n p: 2,\n // can be focused since scrollable\n '&:focus-visible': {\n outline: 'none',\n boxShadow: getFocusRingBoxShadow(theme, true),\n },\n },\n contentSx,\n )}\n {...restContent}\n >\n {children}\n </Box>\n {footerSlot && (\n <Box\n data-testid=\"BottomSheet-footer\"\n sx={sxOverride(\n {\n px: 2,\n pt: 3,\n pb: 2,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'stretch',\n flexDirection: 'column',\n gap: '16px',\n },\n footerSx,\n )}\n {...restFooter}\n >\n {footerSlot}\n </Box>\n )}\n </SwipeableDrawer>\n );\n },\n);\n"],"names":["BottomSheet","forwardRef","children","open","setOpen","slotProps","puller","pullerWrapperProps","pullerProps","closeButton","closeButtonProps","closeButtonIconProps","CloseButtonIconComponent","footerSlot","title","titleProps","headerWrapper","titleWrapper","contentWrapper","footerWrapper","maxHeight","rest","ref","sx","headerSx","restHeader","titleWrapperSx","restTitleWrapper","titleSx","restTitle","pullerWrapperSx","restPullerWrapper","pullerSx","restPuller","closeButtonSx","restCloseButton","contentSx","restContent","footerSx","restFooter","theme","useTheme","BottomSheetCloseButtonIcon","CloseIcon","isScrollable","elementRef","useElementScrollable","_jsxs","SwipeableDrawer","dir","direction","anchor","onClose","onOpen","disableSwipeToOpen","ModalProps","keepMounted","paper","boxShadow","borderTopLeftRadius","borderTopRightRadius","Box","sxOverride","px","_jsx","position","display","flexDirection","justifyContent","alignItems","width","height","backgroundColor","mt","mb","borderRadius","gap","pt","Typography","variant","component","overflow","IconButton","size","onClick","my","mr","borderTop","borderBottom","borderColor","p","outline","getFocusRingBoxShadow","pb"],"mappings":"wdA2FO,MAAMA,EAA0CC,EACrD,EAEIC,WACAC,OACAC,UACAC,YACAC,SACAC,qBACAC,cACAC,cACAC,mBACAC,uBACAC,2BACAC,aACAC,QACAC,aAAa,CAAA,EACbC,gBACAC,eACAC,iBACAC,gBACAC,YAAY,MACTC,GAELC,KAEA,MAAQC,GAAIC,KAAaC,GAAeT,GAAiB,CAAA,GACjDO,GAAIG,KAAmBC,GAAqBV,GAAgB,CAAA,GAC5DM,GA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,GAAIjC,GAAgBtC,EAAS,EAAI,GAEnCoB,MAEEC,EAAgBzB,SAAA,CAEnBY,GACCkD,EAACc,EAAU,CAAA,cACG,oBACZC,QAAQ,KACRC,UAAU,KACVzD,GAAIuC,EACF,CACEW,GAAInE,EAAS,EAAI,EACjBoE,GAAI9B,EAAe,EAAI,EACvBqC,SAAU,UAEZrD,MAEEC,EAAS3B,SAEZY,IAGJL,IAAgBH,GACf0D,EAACkB,EAAU,CAAA,cACG,0BACZC,KAAK,SACLC,QAAS,IAAMhF,GAAQ,GAAM,aAClB,qBACXmB,GAAIuC,EACF,CACEuB,GAAI,MACJC,GAAI,QAENpD,MAEEC,EAAejC,SAEnB8D,EAACtB,EAA0B,IAAK/B,YAO5CqD,EAACH,EAAG,CAAA,cACU,sBACZvC,IAAKuB,EACLtB,GAAIuC,EACF,CACEmB,SAAU,OACVM,UAAW3C,EAAe,EAAI,EAC9B4C,aAAc5C,GAAgB/B,EAAa,EAAI,EAC/C4E,YAAa,oBACbC,EAAG,EAEH,kBAAmB,CACjBC,QAAS,OACTjC,UAAWkC,EAAsBpD,GAAO,KAG5CJ,MAEEC,EAAWnC,SAEdA,IAEFW,GACCmD,EAACH,EAAG,CAAA,cACU,qBACZtC,GAAIuC,EACF,CACEC,GAAI,EACJc,GAAI,EACJgB,GAAI,EACJ3B,QAAS,OACTE,eAAgB,aAChBC,WAAY,UACZF,cAAe,SACfS,IAAK,QAEPtC,MAEEC,EAAUrC,SAEbW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{forwardRef as o,useState as r,useEffect as t}from"react";import{createPortal as i}from"react-dom";import{useTheme as n,ButtonBase as c}from"@mui/material";import{getFocusRingStyle as a}from"../focusring/focusring.js";const
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as o,useState as r,useEffect as t}from"react";import{createPortal as i}from"react-dom";import{useTheme as n,ButtonBase as c}from"@mui/material";import{getFocusRingStyle as a}from"../focusring/focusring.js";import{sxOverride as l}from"../../utils/sxOverride/sxOverride.js";const p=o(({children:o,className:r,href:t="#",sx:i,replace:p=!1,active:d=!1,onClick:m,portalProps:u,...f},x)=>{const h=n();return e(s,{disablePortal:!0,...u,children:e(c,{tabIndex:0,component:"a",href:t,onClick:e=>{m?.(e),p&&(e.preventDefault(),document?.getElementById(t?.replace("#",""))?.scrollIntoView(!0))},className:d?["Mui-focusVisible",r].filter(Boolean).join(" "):r,sx:l({position:"absolute",zIndex:`${h.zIndex.tooltip+100}`,top:"10px",width:"1px",height:"1px",margin:"-1px",clip:"rect(0 0 0 0)",overflow:"hidden",padding:"0",border:"none",whiteSpace:"nowrap",backgroundColor:"onSurface.os900",color:"onSurface.os0",borderRadius:"4px",...h.typography.body,"&.Mui-focusVisible":{...a(h,!1),padding:"8px 24px",width:"auto",height:"auto",overflow:"visible",clip:"unset",margin:"0",left:"10px"}},i),ref:x,...f,children:o})})});function s({children:e,container:o,disablePortal:n}){const[c]=r(()=>document?.createElement("div"));return t(()=>{const e=("function"==typeof o?o():o)||document?.body;return e&&c&&!n&&e.prepend(c),()=>{c&&!n&&c.remove()}},[]),c&&!n?i(e,c):e}export{p as BypassBlock};
|
|
2
2
|
//# sourceMappingURL=BypassBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BypassBlock.js","sources":["../../../src/components/bypassBlock/BypassBlock.tsx"],"sourcesContent":["import React, { useState, useEffect, forwardRef, ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ButtonBase, ButtonBaseProps, PortalProps, useTheme } from '@mui/material';\nimport { getFocusRingStyle } from '@/src/components/focusring/focusring';\n\nexport interface BypassBlockProps extends ButtonBaseProps<'a'> {\n /**\n * Button label, e.g. 'Skip to content'\n */\n children: ReactNode;\n /**\n * ID of content section, e.g. '#content'\n * @default '#'\n */\n href: string;\n /**\n * Prevent push of new link into history stack\n * @default false\n */\n replace?: boolean;\n /**\n * Programmatically control if button should be visible\n * @default false\n */\n active?: boolean;\n /**\n * props applied to portal moving the button at the top\n */\n portalProps?: PortalProps;\n}\n\n/**\n * Accessibility button to quickly scroll into the content area.\n * - first focusable element on the page\n * - only visible when focused\n */\nexport const BypassBlock: React.FC<BypassBlockProps> = forwardRef(\n ({ children, className, href = '#', sx, replace = false, active = false, onClick, portalProps, ...rest }, ref) => {\n const theme = useTheme();\n\n return (\n <PrependPortal disablePortal={true} {...portalProps}>\n <ButtonBase\n tabIndex={0}\n component=\"a\"\n href={href}\n onClick={(e) => {\n onClick?.(e);\n if (replace) {\n // prevent push of # into url\n e.preventDefault();\n // use js to scroll into element\n document?.getElementById(href?.replace('#', ''))?.scrollIntoView(true);\n }\n }}\n className={active ? [`Mui-focusVisible`, className].filter(Boolean).join(' ') : className}\n sx={{\n
|
|
1
|
+
{"version":3,"file":"BypassBlock.js","sources":["../../../src/components/bypassBlock/BypassBlock.tsx"],"sourcesContent":["import React, { useState, useEffect, forwardRef, ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { ButtonBase, ButtonBaseProps, PortalProps, useTheme } from '@mui/material';\nimport { getFocusRingStyle } from '@/src/components/focusring/focusring';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport interface BypassBlockProps extends ButtonBaseProps<'a'> {\n /**\n * Button label, e.g. 'Skip to content'\n */\n children: ReactNode;\n /**\n * ID of content section, e.g. '#content'\n * @default '#'\n */\n href: string;\n /**\n * Prevent push of new link into history stack\n * @default false\n */\n replace?: boolean;\n /**\n * Programmatically control if button should be visible\n * @default false\n */\n active?: boolean;\n /**\n * props applied to portal moving the button at the top\n */\n portalProps?: PortalProps;\n}\n\n/**\n * Accessibility button to quickly scroll into the content area.\n * - first focusable element on the page\n * - only visible when focused\n */\nexport const BypassBlock: React.FC<BypassBlockProps> = forwardRef(\n ({ children, className, href = '#', sx, replace = false, active = false, onClick, portalProps, ...rest }, ref) => {\n const theme = useTheme();\n\n return (\n <PrependPortal disablePortal={true} {...portalProps}>\n <ButtonBase\n tabIndex={0}\n component=\"a\"\n href={href}\n onClick={(e) => {\n onClick?.(e);\n if (replace) {\n // prevent push of # into url\n e.preventDefault();\n // use js to scroll into element\n document?.getElementById(href?.replace('#', ''))?.scrollIntoView(true);\n }\n }}\n className={active ? [`Mui-focusVisible`, className].filter(Boolean).join(' ') : className}\n sx={sxOverride(\n {\n position: 'absolute',\n zIndex: `${theme.zIndex.tooltip + 100}`,\n top: '10px',\n // hidden by default, still have to be at least 1px for the Safari focus\n width: '1px',\n height: '1px',\n margin: '-1px',\n clip: 'rect(0 0 0 0)',\n overflow: 'hidden',\n padding: '0',\n border: 'none',\n whiteSpace: 'nowrap',\n // style\n backgroundColor: 'onSurface.os900',\n color: 'onSurface.os0',\n borderRadius: '4px',\n ...theme.typography.body,\n // focus\n '&.Mui-focusVisible': {\n ...getFocusRingStyle(theme, false),\n padding: '8px 24px',\n width: 'auto',\n height: 'auto',\n overflow: 'visible',\n clip: 'unset',\n margin: '0',\n left: '10px',\n },\n },\n sx,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </ButtonBase>\n </PrependPortal>\n );\n },\n);\n\n/**\n * Portal component that create extra div prepended instead of appended to the container.\n * This way element can be placed at the begging of container instead of at the end.\n */\nfunction PrependPortal({ children, container, disablePortal }: PortalProps) {\n const [portalContainer] = useState(() => document?.createElement('div'));\n\n useEffect(() => {\n // obtain proper container for placement (default body tag)\n const body = (typeof container === 'function' ? container() : container) || document?.body;\n\n // prepend (add into begging) extra div into body\n body && portalContainer && !disablePortal && body.prepend(portalContainer);\n return () => {\n // remove div with unmount\n portalContainer && !disablePortal && portalContainer.remove();\n };\n }, []);\n\n // utilize createPortal to place children into container at the begging of body\n return portalContainer && !disablePortal ? createPortal(children, portalContainer) : children;\n}\n"],"names":["BypassBlock","forwardRef","children","className","href","sx","replace","active","onClick","portalProps","rest","ref","theme","useTheme","_jsx","PrependPortal","disablePortal","ButtonBase","tabIndex","component","e","preventDefault","document","getElementById","scrollIntoView","filter","Boolean","join","sxOverride","position","zIndex","tooltip","top","width","height","margin","clip","overflow","padding","border","whiteSpace","backgroundColor","color","borderRadius","typography","body","getFocusRingStyle","left","container","portalContainer","useState","createElement","useEffect","prepend","remove","createPortal"],"mappings":"0UAqCO,MAAMA,EAA0CC,EACrD,EAAGC,WAAUC,YAAWC,OAAO,IAAKC,KAAIC,WAAU,EAAOC,UAAS,EAAOC,UAASC,iBAAgBC,GAAQC,KACxG,MAAMC,EAAQC,IAEd,OACEC,EAACC,EAAa,CAACC,eAAe,KAAUP,EAAWP,SACjDY,EAACG,GACCC,SAAU,EACVC,UAAU,IACVf,KAAMA,EACNI,QAAUY,IACRZ,IAAUY,GACNd,IAEFc,EAAEC,iBAEFC,UAAUC,eAAenB,GAAME,QAAQ,IAAK,MAAMkB,gBAAe,KAGrErB,UAAWI,EAAS,CAAC,mBAAoBJ,GAAWsB,OAAOC,SAASC,KAAK,KAAOxB,EAChFE,GAAIuB,EACF,CACEC,SAAU,WACVC,OAAQ,GAAGlB,EAAMkB,OAAOC,QAAU,MAClCC,IAAK,OAELC,MAAO,MACPC,OAAQ,MACRC,OAAQ,OACRC,KAAM,gBACNC,SAAU,SACVC,QAAS,IACTC,OAAQ,OACRC,WAAY,SAEZC,gBAAiB,kBACjBC,MAAO,gBACPC,aAAc,SACX/B,EAAMgC,WAAWC,KAEpB,qBAAsB,IACjBC,EAAkBlC,GAAO,GAC5B0B,QAAS,WACTL,MAAO,OACPC,OAAQ,OACRG,SAAU,UACVD,KAAM,QACND,OAAQ,IACRY,KAAM,SAGV1C,GAEFM,IAAKA,KACDD,EAAIR,SAEPA,QAWX,SAASa,GAAcb,SAAEA,EAAQ8C,UAAEA,EAAShC,cAAEA,IAC5C,MAAOiC,GAAmBC,EAAS,IAAM5B,UAAU6B,cAAc,QAejE,OAbAC,EAAU,KAER,MAAMP,GAA6B,mBAAdG,EAA2BA,IAAcA,IAAc1B,UAAUuB,KAItF,OADAA,GAAQI,IAAoBjC,GAAiB6B,EAAKQ,QAAQJ,GACnD,KAELA,IAAoBjC,GAAiBiC,EAAgBK,WAEtD,IAGIL,IAAoBjC,EAAgBuC,EAAarD,EAAU+C,GAAmB/C,CACvF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Box as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Box as t}from"@mui/material";import{sxOverride as a}from"../../utils/sxOverride/sxOverride.js";import{useCarousel as r}from"./hooks.js";import{useSwiper as e}from"swiper/react";import{useState as s,useEffect as i}from"react";import{PlayPauseButton as u}from"../playPauseButton/PlayPauseButton.js";import{Spinner as p}from"../progress/Spinner.js";const n=({carousel:r,sx:u,spinnerProps:n,position:l="outside",...m})=>{const[y,c]=s(0),d=e(),f=r||d;return i(()=>{f?.autoplay&&f.on("autoplayTimeLeft",(o,t,a)=>{c(o.autoplay.paused?0:Math.round(100-100*a))})},[!!f]),o(t,{sx:a({position:"relative",display:"flex",m:2,..."inside"===l&&{position:"absolute",zIndex:"90",bottom:"0",left:"0",right:"0",m:2}},u),"data-testid":"CarouselAutoplayProgress",...m,children:o(p,{value:y,...n})})};function l({carousel:t,...a}){const e=r(),p=t||e,[n,l]=s(0);return i(()=>{p?.autoplay&&p.on("autoplayTimeLeft",(o,t,a)=>{l(o.autoplay.paused?0:Math.round(100-100*a))})},[!!p]),o(u,{"aria-label":p?.autoplay?.running?"Pause carousel autoplay":"Play carousel autoplay",isPlaying:!!p?.autoplay?.running,progress:n,onClick:()=>{p?.autoplay?.[p?.autoplay?.running?"stop":"start"]()},...a})}export{l as CarouselAutoplayIconButton,n as CarouselAutoplayProgress};
|
|
2
2
|
//# sourceMappingURL=Autoplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autoplay.js","sources":["../../../src/components/carousel/Autoplay.tsx"],"sourcesContent":["import { Box, BoxProps } from '@mui/material';\nimport { useCarousel } from './hooks';\nimport { Swiper as CarouselInstance } from 'swiper';\nimport { useSwiper } from 'swiper/react';\nimport { useEffect, useState } from 'react';\nimport { PlayPauseButton, PlayPauseButtonProps } from '@/src/components/playPauseButton/PlayPauseButton';\nimport { Spinner, SpinnerProps } from '@/src/components/progress/Spinner';\n\nexport interface CarouselAutoplayProgressProps extends Omit<BoxProps, 'children' | 'position'> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Progress Props\n */\n spinnerProps?: Omit<SpinnerProps, 'value'>;\n /**\n * Append style to wrapper box to change position of component\n */\n position?: 'outside' | 'inside';\n}\n\n/**\n * Spinner with autoplay progress value\n */\nexport const CarouselAutoplayProgress = ({\n carousel: carouselProp,\n sx,\n spinnerProps,\n position = 'outside',\n ...rest\n}: CarouselAutoplayProgressProps) => {\n const [value, setValue] = useState<number>(0);\n const carouselHook = useSwiper();\n const carousel = carouselProp || carouselHook;\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <Box\n sx={{\n
|
|
1
|
+
{"version":3,"file":"Autoplay.js","sources":["../../../src/components/carousel/Autoplay.tsx"],"sourcesContent":["import { Box, BoxProps } from '@mui/material';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { useCarousel } from './hooks';\nimport { Swiper as CarouselInstance } from 'swiper';\nimport { useSwiper } from 'swiper/react';\nimport { useEffect, useState } from 'react';\nimport { PlayPauseButton, PlayPauseButtonProps } from '@/src/components/playPauseButton/PlayPauseButton';\nimport { Spinner, SpinnerProps } from '@/src/components/progress/Spinner';\n\nexport interface CarouselAutoplayProgressProps extends Omit<BoxProps, 'children' | 'position'> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n /**\n * Progress Props\n */\n spinnerProps?: Omit<SpinnerProps, 'value'>;\n /**\n * Append style to wrapper box to change position of component\n */\n position?: 'outside' | 'inside';\n}\n\n/**\n * Spinner with autoplay progress value\n */\nexport const CarouselAutoplayProgress = ({\n carousel: carouselProp,\n sx,\n spinnerProps,\n position = 'outside',\n ...rest\n}: CarouselAutoplayProgressProps) => {\n const [value, setValue] = useState<number>(0);\n const carouselHook = useSwiper();\n const carousel = carouselProp || carouselHook;\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <Box\n sx={sxOverride(\n {\n position: 'relative',\n display: 'flex',\n m: 2,\n ...(position === 'inside' && {\n position: 'absolute',\n zIndex: '90',\n bottom: '0',\n left: '0',\n right: '0',\n m: 2,\n }),\n },\n sx,\n )}\n data-testid=\"CarouselAutoplayProgress\"\n {...rest}\n >\n <Spinner value={value} {...spinnerProps} />\n </Box>\n );\n};\n\nexport interface CarouselAutoplayIconButtonProps extends Partial<PlayPauseButtonProps> {\n /**\n * Optional Carousel instance from useCarouselInstance hook\n */\n carousel?: CarouselInstance;\n}\n\n/**\n * IconButton controlling play/paused state of the autoplay\n */\nexport function CarouselAutoplayIconButton({ carousel: carouselProp, ...rest }: CarouselAutoplayIconButtonProps) {\n const carouselHook = useCarousel();\n const carousel = carouselProp || carouselHook;\n const [value, setValue] = useState<number>(0);\n\n useEffect(() => {\n // attach listener that controls progress value based on swiper special event\n if (carousel?.autoplay) {\n carousel.on('autoplayTimeLeft', (instance, _timeLeft, percentage) => {\n setValue(instance.autoplay.paused ? 0 : Math.round(100 - percentage * 100));\n });\n }\n }, [!!carousel]);\n\n return (\n <PlayPauseButton\n aria-label={carousel?.autoplay?.running ? 'Pause carousel autoplay' : 'Play carousel autoplay'}\n isPlaying={!!carousel?.autoplay?.running}\n progress={value}\n onClick={() => {\n carousel?.autoplay?.[carousel?.autoplay?.running ? 'stop' : 'start']();\n }}\n {...rest}\n />\n );\n}\n"],"names":["CarouselAutoplayProgress","carousel","carouselProp","sx","spinnerProps","position","rest","value","setValue","useState","carouselHook","useSwiper","useEffect","autoplay","on","instance","_timeLeft","percentage","paused","Math","round","_jsx","Box","sxOverride","display","m","zIndex","bottom","left","right","Spinner","CarouselAutoplayIconButton","useCarousel","PlayPauseButton","running","isPlaying","progress","onClick"],"mappings":"+YA2BaA,EAA2B,EACtCC,SAAUC,EACVC,KACAC,eACAC,WAAW,aACRC,MAEH,MAAOC,EAAOC,GAAYC,EAAiB,GACrCC,EAAeC,IACfV,EAAWC,GAAgBQ,EAWjC,OATAE,EAAU,KAEJX,GAAUY,UACZZ,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDT,EAASO,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAACC,GACCnB,GAAIoB,EACF,CACElB,SAAU,WACVmB,QAAS,OACTC,EAAG,KACc,WAAbpB,GAAyB,CAC3BA,SAAU,WACVqB,OAAQ,KACRC,OAAQ,IACRC,KAAM,IACNC,MAAO,IACPJ,EAAG,IAGPtB,GACD,cACW,8BACRG,WAEJe,EAACS,EAAO,CAACvB,MAAOA,KAAWH,OAe3B,SAAU2B,GAA6B9B,SAAUC,KAAiBI,IACtE,MAAMI,EAAesB,IACf/B,EAAWC,GAAgBQ,GAC1BH,EAAOC,GAAYC,EAAiB,GAW3C,OATAG,EAAU,KAEJX,GAAUY,UACZZ,EAASa,GAAG,mBAAoB,CAACC,EAAUC,EAAWC,KACpDT,EAASO,EAASF,SAASK,OAAS,EAAIC,KAAKC,MAAM,IAAmB,IAAbH,OAG5D,GAAGhB,IAGJoB,EAACY,EAAe,CAAA,aACFhC,GAAUY,UAAUqB,QAAU,0BAA4B,yBACtEC,YAAalC,GAAUY,UAAUqB,QACjCE,SAAU7B,EACV8B,QAAS,KACPpC,GAAUY,WAAWZ,GAAUY,UAAUqB,QAAU,OAAS,eAE1D5B,GAGV"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Box as r}from"@mui/material";import{
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Box as r}from"@mui/material";import{sxOverride as t}from"../../utils/sxOverride/sxOverride.js";import{Swiper as a}from"swiper/react";import{Keyboard as n,EffectFade as o,Autoplay as p,Parallax as s}from"swiper/modules";const l=e(({children:e,sx:l,onInit:d,effect:m,autoplay:c,parallax:w,peekDistance:f=100,peekSpeed:x=150,...u},h)=>i(r,{component:a,spaceBetween:0,autoHeight:!0,loop:!0,keyboard:{enabled:!0},modules:[n,..."fade"===m?[o]:[],...c?[p]:[],...w?[s]:[]],parallax:w,effect:m,autoplay:c,ref:h,...u,onSwiper:d,"data-peekspeed":x,sx:t({display:"block",ml:"auto",mr:"auto",p:"0",maxWidth:"100%",position:"relative",zIndex:i=>i.zIndex.carousel,overflow:"hidden",listStyle:"none","&.swiper-horizontal":{touchAction:"pan-y"},"&.swiper-vertical":{touchAction:"pan-x","& > .swiper-wrapper":{flexDirection:"column"}},"&.swiper-autoheight":{height:"auto","& > .swiper-wrapper":{alignItems:"flex-start",transitionProperty:"transform, height"}},"& .swiper-wrapper":{position:"relative",width:"100%",height:"100%",zIndex:i=>i.zIndex.carousel,display:"flex",transitionProperty:"transform",transitionTimingFunction:"var(--swiper-wrapper-transition-timing-function, initial)",boxSizing:"content-box",transform:"translate3d(0px, 0, 0)"},..."fade"!==m&&{"&.peeking .swiper-wrapper > .swiper-slide":{transitionProperty:"transform",transitionDuration:`${x}ms`,transitionTimingFunction:"var(--swiper-wrapper-transition-timing-function, initial)"},"&.peek-next .swiper-wrapper > .swiper-slide":{transform:i=>`translate3D(${"rtl"===i.direction?"":"-"}${f}px, 0, 0)`},"&.peek-prev .swiper-wrapper > .swiper-slide":{transform:i=>`translate3D(${"rtl"===i.direction?"-":""}${f}px, 0, 0)`}},".swiper-slide-invisible-blank":{visibility:"hidden"},".swiper-backface-hidden .swiper-slide":{transform:"translateZ(0)",WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden"}},l),children:e}));export{l as Carousel};
|
|
2
2
|
//# sourceMappingURL=Carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sources":["../../../src/components/carousel/Carousel.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { Box, BoxProps } from '@mui/material';\nimport { Swiper, SwiperProps } from 'swiper/react';\nimport { Keyboard, EffectFade, Autoplay, Parallax } from 'swiper/modules';\n\nexport interface CarouselProps\n // `cssMode` not supported\n // instead of `navigation` use <CarouselNavigation />\n // instead of `pagination` use <CarouselPagination />\n // instead of `onSwiper` use `onInit`\n extends\n Omit<SwiperProps, 'children' | 'cssMode' | 'navigation' | 'pagination' | 'onSwiper'>,\n Omit<BoxProps, keyof Omit<SwiperProps, 'children'> | 'component'> {\n /**\n * Callback that receives Swiper instance\n */\n onInit?: SwiperProps['onSwiper'];\n /**\n * Travelled distance in px for peek effect\n * @default 100\n */\n peekDistance?: number;\n /**\n * Speed of peek effect\n * @default 150 (half of default Carousel's speed)\n */\n peekSpeed?: number;\n}\n\n/**\n * Modern mobile friendly carousel for slideshows, built with Swiper\n */\nexport const Carousel: React.FC<CarouselProps> = forwardRef(\n ({ children, sx, onInit, effect, autoplay, parallax, peekDistance = 100, peekSpeed = 150, ...rest }, ref) => {\n return (\n <Box\n component={Swiper}\n spaceBetween={0}\n autoHeight\n loop\n keyboard={{\n enabled: true,\n }}\n modules={[\n Keyboard,\n ...(effect === 'fade' ? [EffectFade] : []),\n ...(autoplay ? [Autoplay] : []),\n ...(parallax ? [Parallax] : []),\n ]}\n parallax={parallax}\n effect={effect}\n autoplay={autoplay}\n ref={ref}\n {...rest}\n onSwiper={onInit}\n data-peekspeed={peekSpeed}\n sx={{\n
|
|
1
|
+
{"version":3,"file":"Carousel.js","sources":["../../../src/components/carousel/Carousel.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { Box, BoxProps } from '@mui/material';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { Swiper, SwiperProps } from 'swiper/react';\nimport { Keyboard, EffectFade, Autoplay, Parallax } from 'swiper/modules';\n\nexport interface CarouselProps\n // `cssMode` not supported\n // instead of `navigation` use <CarouselNavigation />\n // instead of `pagination` use <CarouselPagination />\n // instead of `onSwiper` use `onInit`\n extends\n Omit<SwiperProps, 'children' | 'cssMode' | 'navigation' | 'pagination' | 'onSwiper'>,\n Omit<BoxProps, keyof Omit<SwiperProps, 'children'> | 'component'> {\n /**\n * Callback that receives Swiper instance\n */\n onInit?: SwiperProps['onSwiper'];\n /**\n * Travelled distance in px for peek effect\n * @default 100\n */\n peekDistance?: number;\n /**\n * Speed of peek effect\n * @default 150 (half of default Carousel's speed)\n */\n peekSpeed?: number;\n}\n\n/**\n * Modern mobile friendly carousel for slideshows, built with Swiper\n */\nexport const Carousel: React.FC<CarouselProps> = forwardRef(\n ({ children, sx, onInit, effect, autoplay, parallax, peekDistance = 100, peekSpeed = 150, ...rest }, ref) => {\n return (\n <Box\n component={Swiper}\n spaceBetween={0}\n autoHeight\n loop\n keyboard={{\n enabled: true,\n }}\n modules={[\n Keyboard,\n ...(effect === 'fade' ? [EffectFade] : []),\n ...(autoplay ? [Autoplay] : []),\n ...(parallax ? [Parallax] : []),\n ]}\n parallax={parallax}\n effect={effect}\n autoplay={autoplay}\n ref={ref}\n {...rest}\n onSwiper={onInit}\n data-peekspeed={peekSpeed}\n sx={sxOverride(\n {\n // generic root styling, based on the `import 'swiper/css'`\n display: 'block',\n ml: 'auto',\n mr: 'auto',\n p: '0',\n maxWidth: '100%',\n // ensure correct position\n position: 'relative',\n zIndex: (theme) => theme.zIndex.carousel,\n overflow: 'hidden',\n // support for ul-type\n listStyle: 'none',\n // variants\n '&.swiper-horizontal': {\n touchAction: 'pan-y',\n },\n '&.swiper-vertical': {\n touchAction: 'pan-x',\n '& > .swiper-wrapper': {\n flexDirection: 'column',\n },\n },\n '&.swiper-autoheight': {\n height: 'auto',\n '& > .swiper-wrapper': {\n alignItems: 'flex-start',\n transitionProperty: 'transform, height',\n },\n },\n // wrapper of all slides\n '& .swiper-wrapper': {\n position: 'relative',\n width: '100%',\n height: '100%',\n zIndex: (theme) => theme.zIndex.carousel,\n display: 'flex',\n transitionProperty: 'transform',\n transitionTimingFunction: 'var(--swiper-wrapper-transition-timing-function, initial)',\n boxSizing: 'content-box',\n transform: 'translate3d(0px, 0, 0)',\n },\n // peek effect\n ...(effect !== 'fade' && {\n '&.peeking .swiper-wrapper > .swiper-slide': {\n transitionProperty: 'transform',\n transitionDuration: `${peekSpeed}ms`,\n transitionTimingFunction: 'var(--swiper-wrapper-transition-timing-function, initial)',\n },\n '&.peek-next .swiper-wrapper > .swiper-slide': {\n transform: (theme) => `translate3D(${theme.direction === 'rtl' ? '' : '-'}${peekDistance}px, 0, 0)`,\n },\n '&.peek-prev .swiper-wrapper > .swiper-slide': {\n transform: (theme) => `translate3D(${theme.direction === 'rtl' ? '-' : ''}${peekDistance}px, 0, 0)`,\n },\n }),\n // swiper internal\n '.swiper-slide-invisible-blank': {\n visibility: 'hidden',\n },\n '.swiper-backface-hidden .swiper-slide': {\n transform: 'translateZ(0)',\n WebkitBackfaceVisibility: 'hidden',\n backfaceVisibility: 'hidden',\n },\n // does not include CSS Mode, 3D Shadows, lazy loading\n },\n sx,\n )}\n >\n {children}\n </Box>\n );\n },\n);\n"],"names":["Carousel","forwardRef","children","sx","onInit","effect","autoplay","parallax","peekDistance","peekSpeed","rest","ref","_jsx","Box","component","Swiper","spaceBetween","autoHeight","loop","keyboard","enabled","modules","Keyboard","EffectFade","Autoplay","Parallax","onSwiper","sxOverride","display","ml","mr","p","maxWidth","position","zIndex","theme","carousel","overflow","listStyle","touchAction","flexDirection","height","alignItems","transitionProperty","width","transitionTimingFunction","boxSizing","transform","transitionDuration","direction","visib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BACXI,yBAA0B,SAC1BC,mBAAoB,WAIxBjD,GACDD,SAEAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as r,Fragment as o,jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{useCarousel as n,useCarouselPeekEffect as s}from"./hooks.js";import{useTheme as
|
|
1
|
+
import{jsxs as r,Fragment as o,jsx as e}from"react/jsx-runtime";import{useMemo as t}from"react";import{useCarousel as n,useCarouselPeekEffect as s}from"./hooks.js";import{useTheme as i,useMediaQuery as a,IconButton as p}from"@mui/material";import{ChevronLeftIcon as c}from"../icon/stroke/ChevronLeftIcon.js";import{ChevronRightIcon as l}from"../icon/stroke/ChevronRightIcon.js";import{ArrowLeftIcon as d}from"../icon/stroke/ArrowLeftIcon.js";import{ArrowRightIcon as m}from"../icon/stroke/ArrowRightIcon.js";import{getInteractiveStyle as x}from"../../materialui/button/interactive.js";import{sxOverride as u}from"../../utils/sxOverride/sxOverride.js";function f({carousel:f,peekEffect:b=!1,prevButtonProps:v,prevIconProps:k,PrevIconComponent:I,nextButtonProps:g,nextIconProps:h,NextIconComponent:C,arrows:j=!0,onBackground:P=!1,autoHideNavigation:y=!1}){const M=n(),E=f||M,L="fade"!==E?.params?.effect&&b,w=i(),B=a(w.breakpoints.up("md")),{sx:N,...S}=v||{},{sx:z,...A}=g||{},[O,R]=s(E),H=I||(j?d:c),q=C||(j?m:l),D=t(()=>({position:"absolute",zIndex:"100",top:"50%",width:{xs:"32px",md:"40px",xl:"44px"},height:{xs:"32px",md:"40px",xl:"44px"},mt:{xs:"-16px",md:"-20px",xl:"-22px"},"& .MuiSvgIcon-root":{fontSize:{xs:"17px",xl:"20px"}},...x({color:"text.primary",borderColor:P?"transparent.transparent":"onSurface.os100",backgroundColor:P?"transparent.transparent":"surface.primary"},{backgroundColor:"surface.secondary"}),"&.Mui-disabled":{color:"disabled.tertiary",borderColor:P?"transparent.transparent":"disabled.secondary",backgroundColor:P?"transparent.transparent":"disabled.secondary"}}),[]);return y&&E?.isLocked?null:r(o,{children:[e(p,{disabled:E&&!E.params?.loop&&E.isBeginning,onClick:()=>{E?.slidePrev(),L&&O&&R("reset")},onMouseEnter:()=>B&&L&&R("prev"),onMouseLeave:()=>L&&O&&R("reset"),sx:u({...D,insetInlineStart:"16px"},N),"aria-label":"Previous slide","aria-controls":"carousel",color:"surface",size:"medium",...S,children:"rtl"===w.direction?e(q,{...k}):e(H,{...k})}),e(p,{disabled:E&&!E.params?.loop&&E.isEnd,onClick:()=>{E?.slideNext(),L&&O&&R("reset")},onMouseEnter:()=>B&&L&&R("next"),onMouseLeave:()=>L&&O&&R("reset"),sx:u({...D,insetInlineEnd:"16px"},z),"aria-label":"Next slide","aria-controls":"carousel",color:"surface",...A,children:"rtl"===w.direction?e(H,{...h}):e(q,{...h})})]})}export{f as CarouselNavigation};
|
|
2
2
|
//# sourceMappingURL=Navigation.js.map
|