@skodaflow/web-library 7.0.2 → 7.1.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/README.md +16 -16
- package/cjs/components/alert/Alert.d.ts +3 -0
- package/cjs/components/alert/Alert.js +1 -1
- package/cjs/components/alert/Alert.js.map +1 -1
- package/cjs/components/banner/banner.js +1 -1
- package/cjs/components/banner/banner.js.map +1 -1
- package/cjs/components/box/box.component.d.ts +3 -0
- package/cjs/components/box/index.d.ts +1 -0
- package/cjs/components/index.d.ts +1 -0
- package/cjs/components/label/label.js.map +1 -1
- package/cjs/components/labelFeature/labelFeature.js.map +1 -1
- package/cjs/components/labelStatus/labelStatus.js.map +1 -1
- package/cjs/components/menu/menu.js +1 -1
- package/cjs/components/menu/menu.js.map +1 -1
- package/cjs/components/modal/modal.js +1 -1
- package/cjs/components/modal/modal.js.map +1 -1
- package/cjs/design/skoda/SkodaThemeProvider.d.ts +8 -2
- package/cjs/design/skoda/SkodaThemeProvider.js +1 -1
- package/cjs/design/skoda/SkodaThemeProvider.js.map +1 -1
- package/cjs/design/skoda/SkodaThemeWidgetProvider.d.ts +20 -1
- package/cjs/design/skoda/SkodaThemeWidgetProvider.js +1 -1
- package/cjs/design/skoda/SkodaThemeWidgetProvider.js.map +1 -1
- package/cjs/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
- package/cjs/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
- package/cjs/design/skoda/components/autocomplete.theme.js +1 -1
- package/cjs/design/skoda/components/autocomplete.theme.js.map +1 -1
- package/cjs/design/skoda/components/baseline.theme.js.map +1 -1
- package/cjs/design/skoda/components/dialog/dialogContentText.theme.d.ts +2 -0
- package/cjs/design/skoda/components/dialog/dialogContentText.theme.js +2 -0
- package/cjs/design/skoda/components/dialog/dialogContentText.theme.js.map +1 -0
- package/cjs/design/skoda/components/form/select.theme.js +1 -1
- package/cjs/design/skoda/components/form/select.theme.js.map +1 -1
- package/cjs/design/skoda/components/modal.theme.js +1 -1
- package/cjs/design/skoda/components/modal.theme.js.map +1 -1
- package/cjs/design/skoda/components/popover.theme.js +1 -1
- package/cjs/design/skoda/components/popover.theme.js.map +1 -1
- package/cjs/design/skoda/components/tabs/tabs.theme.js +1 -1
- package/cjs/design/skoda/components/tabs/tabs.theme.js.map +1 -1
- package/cjs/design/skoda/index.d.ts +1 -1
- package/cjs/design/skoda/theme.d.ts +5 -2
- package/cjs/design/skoda/theme.js +1 -1
- package/cjs/design/skoda/theme.js.map +1 -1
- package/cjs/index.js +1 -1
- package/cjs/layout/Error/ErrorContent.js +1 -1
- package/cjs/layout/Error/ErrorContent.js.map +1 -1
- package/cjs/layout/Footer/FooterIconButton.d.ts +10 -4
- package/cjs/layout/Footer/FooterIconButton.js +1 -1
- package/cjs/layout/Footer/FooterIconButton.js.map +1 -1
- package/cjs/layout/Footer/FooterMenu.d.ts +7 -3
- package/cjs/layout/Footer/FooterMenu.js +1 -1
- package/cjs/layout/Footer/FooterMenu.js.map +1 -1
- package/cjs/layout/Footer/FooterSectionContact.d.ts +9 -3
- package/cjs/layout/Footer/FooterSectionContact.js +1 -1
- package/cjs/layout/Footer/FooterSectionContact.js.map +1 -1
- package/cjs/layout/Footer/PredefinedFooterIconButtons.d.ts +2 -2
- package/cjs/layout/Footer/PredefinedFooterIconButtons.js +1 -1
- package/cjs/layout/Footer/PredefinedFooterIconButtons.js.map +1 -1
- package/cjs/layout/Footer/assets/FacebookIcon.d.ts +1 -0
- package/cjs/layout/Footer/assets/FacebookIcon.js +2 -0
- package/cjs/layout/Footer/assets/FacebookIcon.js.map +1 -0
- package/cjs/layout/Footer/assets/InstagramIcon.d.ts +1 -0
- package/cjs/layout/Footer/assets/InstagramIcon.js +2 -0
- package/cjs/layout/Footer/assets/InstagramIcon.js.map +1 -0
- package/cjs/layout/Footer/assets/TwitterIcon.d.ts +1 -0
- package/cjs/layout/Footer/assets/{twitter_icon.svg.js.map → TwitterIcon.js} +2 -1
- package/cjs/layout/Footer/assets/TwitterIcon.js.map +1 -0
- package/cjs/layout/Footer/assets/YoutubeIcon.d.ts +1 -0
- package/cjs/layout/Footer/assets/{youtube_icon.svg.js.map → YoutubeIcon.js} +2 -1
- package/cjs/layout/Footer/assets/YoutubeIcon.js.map +1 -0
- package/cjs/layout/Footer/assets/index.d.ts +4 -0
- package/cjs/layout/Header/HeaderButton.js +1 -1
- package/cjs/layout/Header/HeaderButton.js.map +1 -1
- package/cjs/layout/SideMenu/SideMenu.d.ts +3 -3
- package/cjs/layout/SideMenu/SideMenu.js +1 -1
- package/cjs/layout/SideMenu/SideMenu.js.map +1 -1
- package/cjs/organisms/cardPhotoAdjustable/cardPhotoAdjustable.js.map +1 -1
- package/cjs/organisms/cardPhotoFixed/cardPhotoFixed.js.map +1 -1
- package/cjs/organisms/cardTypeOnly/cardTypeOnly.js.map +1 -1
- package/cjs/organisms/carousel2/components/NavButton.js +1 -1
- package/cjs/organisms/carousel2/components/NavButton.js.map +1 -1
- package/cjs/organisms/gallery/Gallery.js +1 -1
- package/cjs/organisms/gallery/Gallery.js.map +1 -1
- package/cjs/organisms/gallery/GalleryTrigger.js +1 -1
- package/cjs/organisms/gallery/GalleryTrigger.js.map +1 -1
- package/cjs/organisms/heroImageCard/heroImageCard.js.map +1 -1
- package/cjs/organisms/index.d.ts +1 -0
- package/cjs/organisms/maps/mapComponents/infoWindowConfig.js.map +1 -1
- package/cjs/organisms/notification/Notification.js +1 -1
- package/cjs/organisms/notification/Notification.js.map +1 -1
- package/cjs/production/Button/Button.js.map +1 -1
- package/cjs/utils/useFeatureFlag/useFeatureFlag.js +1 -1
- package/cjs/utils/useFeatureFlag/useFeatureFlag.js.map +1 -1
- package/components/alert/Alert.d.ts +3 -0
- package/components/alert/Alert.js +1 -1
- package/components/alert/Alert.js.map +1 -1
- package/components/banner/banner.js +1 -1
- package/components/banner/banner.js.map +1 -1
- package/components/box/box.component.d.ts +3 -0
- package/components/box/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/label/label.js.map +1 -1
- package/components/labelFeature/labelFeature.js.map +1 -1
- package/components/labelStatus/labelStatus.js.map +1 -1
- package/components/menu/menu.js +1 -1
- package/components/menu/menu.js.map +1 -1
- package/components/modal/modal.js +1 -1
- package/components/modal/modal.js.map +1 -1
- package/design/skoda/SkodaThemeProvider.d.ts +8 -2
- package/design/skoda/SkodaThemeProvider.js +1 -1
- package/design/skoda/SkodaThemeProvider.js.map +1 -1
- package/design/skoda/SkodaThemeWidgetProvider.d.ts +20 -1
- package/design/skoda/SkodaThemeWidgetProvider.js +1 -1
- package/design/skoda/SkodaThemeWidgetProvider.js.map +1 -1
- package/design/skoda/components/accordion/accordionSummary.theme.js +1 -1
- package/design/skoda/components/accordion/accordionSummary.theme.js.map +1 -1
- package/design/skoda/components/autocomplete.theme.js +1 -1
- package/design/skoda/components/autocomplete.theme.js.map +1 -1
- package/design/skoda/components/baseline.theme.js.map +1 -1
- package/design/skoda/components/dialog/dialogContentText.theme.d.ts +2 -0
- package/design/skoda/components/dialog/dialogContentText.theme.js +2 -0
- package/design/skoda/components/dialog/dialogContentText.theme.js.map +1 -0
- package/design/skoda/components/form/select.theme.js +1 -1
- package/design/skoda/components/form/select.theme.js.map +1 -1
- package/design/skoda/components/modal.theme.js +1 -1
- package/design/skoda/components/modal.theme.js.map +1 -1
- package/design/skoda/components/popover.theme.js +1 -1
- package/design/skoda/components/popover.theme.js.map +1 -1
- package/design/skoda/components/tabs/tabs.theme.js +1 -1
- package/design/skoda/components/tabs/tabs.theme.js.map +1 -1
- package/design/skoda/index.d.ts +1 -1
- package/design/skoda/theme.d.ts +5 -2
- package/design/skoda/theme.js +1 -1
- package/design/skoda/theme.js.map +1 -1
- package/eula.txt +40 -40
- package/index.js +1 -1
- package/layout/Error/ErrorContent.js +1 -1
- package/layout/Error/ErrorContent.js.map +1 -1
- package/layout/Footer/FooterIconButton.d.ts +10 -4
- package/layout/Footer/FooterIconButton.js +1 -1
- package/layout/Footer/FooterIconButton.js.map +1 -1
- package/layout/Footer/FooterMenu.d.ts +7 -3
- package/layout/Footer/FooterMenu.js +1 -1
- package/layout/Footer/FooterMenu.js.map +1 -1
- package/layout/Footer/FooterSectionContact.d.ts +9 -3
- package/layout/Footer/FooterSectionContact.js +1 -1
- package/layout/Footer/FooterSectionContact.js.map +1 -1
- package/layout/Footer/PredefinedFooterIconButtons.d.ts +2 -2
- package/layout/Footer/PredefinedFooterIconButtons.js +1 -1
- package/layout/Footer/PredefinedFooterIconButtons.js.map +1 -1
- package/layout/Footer/assets/FacebookIcon.d.ts +1 -0
- package/layout/Footer/assets/FacebookIcon.js +2 -0
- package/layout/Footer/assets/FacebookIcon.js.map +1 -0
- package/layout/Footer/assets/InstagramIcon.d.ts +1 -0
- package/layout/Footer/assets/InstagramIcon.js +2 -0
- package/layout/Footer/assets/InstagramIcon.js.map +1 -0
- package/layout/Footer/assets/TwitterIcon.d.ts +1 -0
- package/layout/Footer/assets/TwitterIcon.js +2 -0
- package/layout/Footer/assets/TwitterIcon.js.map +1 -0
- package/layout/Footer/assets/YoutubeIcon.d.ts +1 -0
- package/layout/Footer/assets/YoutubeIcon.js +2 -0
- package/layout/Footer/assets/YoutubeIcon.js.map +1 -0
- package/layout/Footer/assets/index.d.ts +4 -0
- package/layout/Header/HeaderButton.js +1 -1
- package/layout/Header/HeaderButton.js.map +1 -1
- package/layout/SideMenu/SideMenu.d.ts +3 -3
- package/layout/SideMenu/SideMenu.js +1 -1
- package/layout/SideMenu/SideMenu.js.map +1 -1
- package/organisms/cardPhotoAdjustable/cardPhotoAdjustable.js.map +1 -1
- package/organisms/cardPhotoFixed/cardPhotoFixed.js.map +1 -1
- package/organisms/cardTypeOnly/cardTypeOnly.js.map +1 -1
- package/organisms/carousel2/components/NavButton.js +1 -1
- package/organisms/carousel2/components/NavButton.js.map +1 -1
- package/organisms/gallery/Gallery.js +1 -1
- package/organisms/gallery/Gallery.js.map +1 -1
- package/organisms/gallery/GalleryTrigger.js +1 -1
- package/organisms/gallery/GalleryTrigger.js.map +1 -1
- package/organisms/heroImageCard/heroImageCard.js.map +1 -1
- package/organisms/index.d.ts +1 -0
- package/organisms/maps/mapComponents/infoWindowConfig.js.map +1 -1
- package/organisms/notification/Notification.js +1 -1
- package/organisms/notification/Notification.js.map +1 -1
- package/package.json +1 -1
- package/production/Button/Button.js.map +1 -1
- package/utils/useFeatureFlag/useFeatureFlag.js +1 -1
- package/utils/useFeatureFlag/useFeatureFlag.js.map +1 -1
- package/cjs/layout/Footer/assets/facebook_icon.svg.js +0 -2
- package/cjs/layout/Footer/assets/facebook_icon.svg.js.map +0 -1
- package/cjs/layout/Footer/assets/instagram_icon.svg.js +0 -2
- package/cjs/layout/Footer/assets/instagram_icon.svg.js.map +0 -1
- package/cjs/layout/Footer/assets/twitter_icon.svg.js +0 -2
- package/cjs/layout/Footer/assets/youtube_icon.svg.js +0 -2
- package/layout/Footer/assets/facebook_icon.svg.js +0 -2
- package/layout/Footer/assets/facebook_icon.svg.js.map +0 -1
- package/layout/Footer/assets/instagram_icon.svg.js +0 -2
- package/layout/Footer/assets/instagram_icon.svg.js.map +0 -1
- package/layout/Footer/assets/twitter_icon.svg.js +0 -2
- package/layout/Footer/assets/twitter_icon.svg.js.map +0 -1
- package/layout/Footer/assets/youtube_icon.svg.js +0 -2
- package/layout/Footer/assets/youtube_icon.svg.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as t,jsx as r}from"react/jsx-runtime";import"tslib";import{useMemo as o}from"react";import{useTheme as i,lighten as e,Stack as a,Box as s,Typography as m}from"@mui/material";import"@emotion/react";import"@emotion/cache";import"stylis";import"stylis-plugin-rtl";import"../../design/skoda/theme.js";import"../../design/skoda/theme.breakpoints.js";import"@mui/material/styles";import"@mui/system";import"../accordion/accordion.js";import"../backdrop/backdrop.js";import"../button/button.js";import"../cardContainer/cardContainer.js";import"../cardMenu/cardMenu.js";import"../checkbox/checkbox.js";import"../chip/chipImage/chipImage.js";import"../chip/regular/chip.js";import"../chip/chipMultiselect/multiSelectChip.js";import"../chip/chipDropdownChildren/chipDropdownChildren.js";import"../controls/controls.js";import"../divider/divider.js";import"../drawer/drawer.js";import"../flag/flag.js";import"@mui/material/Grid";import{Icon as n}from"../icon/icon.js";import"../icon/icon.definitions.js";import"../indicator/indicator.js";import"../label/label.js";import"../labelCO2/labelCO2.js";import"../labelFeature/labelFeature.js";import"../labelPromotional/labelPromotional.js";import"../labelStatus/labelStatus.js";import"../menu/menu.js";import"@mui/material/MenuItem";import"@mui/material/MobileStepper";import"../mobileStepper/mobileStepperButton.js";import"../modal/modal.js";import"../modal/modalTitle.js";import"../numbering/numbering.js";import"../pagination/pagination.js";import"../progressBar/progressBar.js";import"../radioButton/radioButton.js";import"../selectInput/selectInput.js";import"../slider/slider.js";import"../snackbar/snackbar.js";import"../stepper/stepper.js";import"../textArea/textArea.js";import"../common/styled/textFieldStyled.js";import"../helperTextContent/index.js";import"../toggleSwitch/toggleSwitch.js";import"../avatar/Avatar.js";import"../iconButton/index.js";import"../alert/AlertButton.js";import"../../organisms/gallery/Gallery.js";import"../../organisms/gallery/GalleryItem.js";import"minimatch";import"../../utils/enum.js";import"../../organisms/cardOwnedVehicle/cardOwnedVehicle.js";import"../../organisms/cardPhotoAdjustable/cardPhotoAdjustable.js";import"../../organisms/cardPhotoFixed/cardPhotoFixed.js";import"../../organisms/cardPromoVehicle/cardPromoVehicleComponent.js";import"../../organisms/common/styled/cardStandardWrapperStyled.js";import"../../organisms/cardTypeOnly/cardTypeOnly.js";import"embla-carousel-react";import"embla-carousel-class-names";import"embla-carousel-autoplay";import"../../organisms/carousel/styledComponents/styledCarouselHorizontal.js";import"../../organisms/carousel/styledComponents/styledCarouselVertical.js";import"../../organisms/heroImageCard/heroImageCard.js";import"@googlemaps/react-wrapper";import"@googlemaps/markerclusterer";import"../../organisms/maps/utils/mapIcons.js";import"../../organisms/maps/mapComponents/mapStyled.js";import"../../organisms/shortcutLink/shortcutLink.js";import"../../organisms/textCta/textCta.js";import"../../organisms/tile/tile.js";import"../../organisms/carousel2/galleryCarousel/galleryContext.js";import"../../organisms/carousel2/galleryCarousel/galleryItemContext.js";import"../../organisms/carousel2/heroCarousel/heroCarouselContext.js";import"../../organisms/notification/Notification.js";import"../../organisms/notification/NotificationCenter.js";import"../../layout/Header/HeaderContext.js";import"../../layout/Header/HeaderButton.js";import"../../layout/Header/HeaderNavigationHero.js";import"../../layout/Header/HeaderNavigationLink.js";import"../../layout/Header/HeaderNavigationMenu.js";import"../../layout/Header/PredefinedHeaderButtons.js";import"../../layout/Header/HeaderOverheadItem.js";import"../../layout/SideMenu/SideMenuItem.js";import"../../layout/Footer/PredefinedFooterIconButtons.js";import"../../layout/SecondaryNavigation/SecondaryNavigationCta.js";import"../../layout/SecondaryNavigation/SecondaryNavigationItem.js";import"@mui/material/Container";import"../../production/Button/Button.js";const p=({children:p,variant:l="info",buttons:c})=>{const d=i(),[u,j]=o((()=>{switch(l){case"error":return[d.palette.error.main,e(d.palette.error.light,.9)];case"warning":return[d.palette.warning.main,e(d.palette.warning.light,.9)];default:return[d.palette.info.main,e(d.palette.info.light,.9)]}}),[l,d]);return t(a,{direction:{md:"row",sm:"column"},spacing:0,sx:{borderLeft:"6px solid",alignItems:"flex-start",borderColor:u,backgroundColor:j},"data-testid":"Banner",children:[t(a,{direction:"row",spacing:2,sx:{padding:{md:"12px 16px",sm:"16px",xs:"11px 16px"},flexGrow:1,alignItems:"center"},children:[r(n,{name:"info"===l?"circle-info":"circle-exclamation",iconStyle:"filled",color:l,sx:{alignSelf:"flex-start",color:u,marginTop:{lg:"2px !important",md:"1px !important",sm:"-2px !important"}}}),r(s,{children:"string"==typeof p?r(m,{children:p}):p})]}),c&&r(a,{direction:"row",spacing:1,useFlexGap:!0,sx:{padding:"8px 16px",textWrap:"nowrap",flexWrap:"wrap",alignSelf:"center",marginRight:"auto"},"data-testid":"Banner.buttons",children:c})]})};export{p as Banner};
|
|
2
2
|
//# sourceMappingURL=banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.js","sources":["../../../src/components/banner/banner.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Icon } from '@/src';\nimport { Box, Stack, Typography, lighten, useTheme } from '@mui/material';\nimport { useMemo } from 'react';\n/**\n * Alert notification banner\n */\nexport const Banner = ({ children, variant = 'info', buttons }) => {\n const theme = useTheme();\n const [borderColor, backgroundColor] = useMemo(() => {\n switch (variant) {\n case 'error':\n return [theme.palette.error.main, lighten(theme.palette.error.light, 0.9)];\n case 'warning':\n return [theme.palette.warning.main, lighten(theme.palette.warning.light, 0.9)];\n case 'info':\n default:\n return [theme.palette.info.main, lighten(theme.palette.info.light, 0.9)];\n }\n }, [variant, theme]);\n return (_jsxs(Stack, { direction: { md: 'row', sm: 'column' }, spacing: 0, sx: {\n borderLeft: '6px solid',\n alignItems: 'flex-start',\n borderColor,\n backgroundColor,\n }, \"data-testid\": \"Banner\", children: [_jsxs(Stack, { direction: \"row\", spacing: 2, sx: { padding: { md: '12px 16px', sm: '16px', xs: '11px 16px' }, flexGrow: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: variant === 'info' ? 'circle-info' : 'circle-exclamation', iconStyle: \"filled\", color: variant, sx: {\n alignSelf: 'flex-start',\n color: borderColor,\n marginTop: { lg: '2px !important', md: '1px !important', sm: '-2px !important' },\n } }), _jsx(Box, { children: typeof children === 'string' ? _jsx(Typography, { children: children }) : children })] }), buttons && (_jsx(Stack, { direction: \"row\", spacing: 1, useFlexGap: true, sx: { padding: '8px 16px', textWrap: 'nowrap', flexWrap: 'wrap', alignSelf: 'center', marginRight: 'auto' }, \"data-testid\": \"Banner.buttons\", children: buttons }))] }));\n};\n//# sourceMappingURL=banner.js.map"],"names":["Banner","children","variant","buttons","theme","useTheme","borderColor","backgroundColor","useMemo","palette","error","main","lighten","light","warning","info","_jsxs","Stack","direction","md","sm","spacing","sx","borderLeft","alignItems","padding","xs","flexGrow","_jsx","Icon","name","iconStyle","color","alignSelf","marginTop","lg","Box","Typography","useFlexGap","textWrap","flexWrap","marginRight"],"mappings":"
|
|
1
|
+
{"version":3,"file":"banner.js","sources":["../../../src/components/banner/banner.tsx"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Icon } from '@/src';\nimport { Box, Stack, Typography, lighten, useTheme } from '@mui/material';\nimport { useMemo } from 'react';\n/**\n * Alert notification banner\n */\nexport const Banner = ({ children, variant = 'info', buttons }) => {\n const theme = useTheme();\n const [borderColor, backgroundColor] = useMemo(() => {\n switch (variant) {\n case 'error':\n return [theme.palette.error.main, lighten(theme.palette.error.light, 0.9)];\n case 'warning':\n return [theme.palette.warning.main, lighten(theme.palette.warning.light, 0.9)];\n case 'info':\n default:\n return [theme.palette.info.main, lighten(theme.palette.info.light, 0.9)];\n }\n }, [variant, theme]);\n return (_jsxs(Stack, { direction: { md: 'row', sm: 'column' }, spacing: 0, sx: {\n borderLeft: '6px solid',\n alignItems: 'flex-start',\n borderColor,\n backgroundColor,\n }, \"data-testid\": \"Banner\", children: [_jsxs(Stack, { direction: \"row\", spacing: 2, sx: { padding: { md: '12px 16px', sm: '16px', xs: '11px 16px' }, flexGrow: 1, alignItems: 'center' }, children: [_jsx(Icon, { name: variant === 'info' ? 'circle-info' : 'circle-exclamation', iconStyle: \"filled\", color: variant, sx: {\n alignSelf: 'flex-start',\n color: borderColor,\n marginTop: { lg: '2px !important', md: '1px !important', sm: '-2px !important' },\n } }), _jsx(Box, { children: typeof children === 'string' ? _jsx(Typography, { children: children }) : children })] }), buttons && (_jsx(Stack, { direction: \"row\", spacing: 1, useFlexGap: true, sx: { padding: '8px 16px', textWrap: 'nowrap', flexWrap: 'wrap', alignSelf: 'center', marginRight: 'auto' }, \"data-testid\": \"Banner.buttons\", children: buttons }))] }));\n};\n//# sourceMappingURL=banner.js.map"],"names":["Banner","children","variant","buttons","theme","useTheme","borderColor","backgroundColor","useMemo","palette","error","main","lighten","light","warning","info","_jsxs","Stack","direction","md","sm","spacing","sx","borderLeft","alignItems","padding","xs","flexGrow","_jsx","Icon","name","iconStyle","color","alignSelf","marginTop","lg","Box","Typography","useFlexGap","textWrap","flexWrap","marginRight"],"mappings":"88HAOY,MAACA,EAAS,EAAGC,WAAUC,UAAU,OAAQC,cACjD,MAAMC,EAAQC,KACPC,EAAaC,GAAmBC,GAAQ,KAC3C,OAAQN,GACJ,IAAK,QACD,MAAO,CAACE,EAAMK,QAAQC,MAAMC,KAAMC,EAAQR,EAAMK,QAAQC,MAAMG,MAAO,KACzE,IAAK,UACD,MAAO,CAACT,EAAMK,QAAQK,QAAQH,KAAMC,EAAQR,EAAMK,QAAQK,QAAQD,MAAO,KAE7E,QACI,MAAO,CAACT,EAAMK,QAAQM,KAAKJ,KAAMC,EAAQR,EAAMK,QAAQM,KAAKF,MAAO,KAC1E,GACF,CAACX,EAASE,IACb,OAAQY,EAAMC,EAAO,CAAEC,UAAW,CAAEC,GAAI,MAAOC,GAAI,UAAYC,QAAS,EAAGC,GAAI,CACvEC,WAAY,YACZC,WAAY,aACZlB,cACAC,mBACD,cAAe,SAAUN,SAAU,CAACe,EAAMC,EAAO,CAAEC,UAAW,MAAOG,QAAS,EAAGC,GAAI,CAAEG,QAAS,CAAEN,GAAI,YAAaC,GAAI,OAAQM,GAAI,aAAeC,SAAU,EAAGH,WAAY,UAAYvB,SAAU,CAAC2B,EAAKC,EAAM,CAAEC,KAAkB,SAAZ5B,EAAqB,cAAgB,qBAAsB6B,UAAW,SAAUC,MAAO9B,EAASoB,GAAI,CACxSW,UAAW,aACXD,MAAO1B,EACP4B,UAAW,CAAEC,GAAI,iBAAkBhB,GAAI,iBAAkBC,GAAI,sBAC3DQ,EAAKQ,EAAK,CAAEnC,SAA8B,iBAAbA,EAAwB2B,EAAKS,EAAY,CAAEpC,SAAUA,IAAcA,OAAiBE,GAAYyB,EAAKX,EAAO,CAAEC,UAAW,MAAOG,QAAS,EAAGiB,YAAY,EAAMhB,GAAI,CAAEG,QAAS,WAAYc,SAAU,SAAUC,SAAU,OAAQP,UAAW,SAAUQ,YAAa,QAAU,cAAe,iBAAkBxC,SAAUE,MAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Box } from '@mui/material';
|
package/components/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport styled from '@emotion/styled';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\nimport { forwardRef, useEffect } from 'react';\n/**\n * @description SkodaFlow Label component.\n * @param props LabelProps\n * @returns React Functional component\n */\nexport const Label = forwardRef((_a, ref) => {\n var { label, children } = _a, props = __rest(_a, [\"label\", \"children\"]);\n const text = label ? label : children;\n useEffect(() => { }, [props]);\n return (_jsx(LabelStyled, Object.assign({}, props, { ref: ref, \"data-testid\": \"Label\", children: text })));\n});\n/**\n * @description Label styling definition\n */\nconst LabelStyled = styled.span `\
|
|
1
|
+
{"version":3,"file":"label.js","sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport styled from '@emotion/styled';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\nimport { forwardRef, useEffect } from 'react';\n/**\n * @description SkodaFlow Label component.\n * @param props LabelProps\n * @returns React Functional component\n */\nexport const Label = forwardRef((_a, ref) => {\n var { label, children } = _a, props = __rest(_a, [\"label\", \"children\"]);\n const text = label ? label : children;\n useEffect(() => { }, [props]);\n return (_jsx(LabelStyled, Object.assign({}, props, { ref: ref, \"data-testid\": \"Label\", children: text })));\n});\n/**\n * @description Label styling definition\n */\nconst LabelStyled = styled.span `\n font-size: 11px;\n line-height: 12px;\n letter-spacing: 3px;\n text-transform: uppercase;\n font-weight: 900;\n margin: 0px 15px;\n white-space: nowrap;\n text-rendering: geometricPrecision;\n color: ${flowColors.onSurface.os500};\n`;\n//# sourceMappingURL=label.js.map"],"names":["Label","forwardRef","_a","ref","label","children","props","__rest","text","useEffect","_jsx","LabelStyled","Object","assign","styled","span","flowColors","onSurface","os500"],"mappings":"gOAUY,MAACA,EAAQC,GAAW,CAACC,EAAIC,KACjC,IAAIC,MAAEA,EAAKC,SAAEA,GAAaH,EAAII,EAAQC,EAAOL,EAAI,CAAC,QAAS,aAC3D,MAAMM,EAAOJ,GAAgBC,EAE7B,OADAI,GAAU,QAAW,CAACH,IACdI,EAAKC,EAAaC,OAAOC,OAAO,CAAA,EAAIP,EAAO,CAAEH,IAAKA,EAAK,cAAe,QAASE,SAAUG,IAAU,IAKzGG,EAAcG,EAAOC,IAAK;;;;;;;;;WASrBC,EAAWC,UAAUC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelFeature.js","sources":["../../../src/components/labelFeature/labelFeature.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\nimport { VariantType } from '../../utils/enum';\n/**\n * @description Styled SkodaFlow LabelFeature component.\n * @param props LabelFeatureProps\n * @returns React Function Component\n */\nexport const LabelFeature = forwardRef((_a, ref) => {\n var { children, label, variant = 'primary' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelFeatureStyled, Object.assign({}, props, { ref: ref, variant: variant, label: label, children: children })));\n});\n/**\n * @description LabelFeature styling defintion\n */\nconst LabelFeatureStyled = styled(Label) `\
|
|
1
|
+
{"version":3,"file":"labelFeature.js","sources":["../../../src/components/labelFeature/labelFeature.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\nimport { VariantType } from '../../utils/enum';\n/**\n * @description Styled SkodaFlow LabelFeature component.\n * @param props LabelFeatureProps\n * @returns React Function Component\n */\nexport const LabelFeature = forwardRef((_a, ref) => {\n var { children, label, variant = 'primary' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelFeatureStyled, Object.assign({}, props, { ref: ref, variant: variant, label: label, children: children })));\n});\n/**\n * @description LabelFeature styling defintion\n */\nconst LabelFeatureStyled = styled(Label) `\n --flow-label-color: ${(props) => {\n switch (props.variant) {\n case VariantType.PRIMARY:\n return flowColors.brand.tertiary;\n case VariantType.NEUTRAL:\n return flowColors.onSurface.os500;\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : flowColors.brand.secondary;\n }\n}};\n color: ${flowColors.onSurface.os0};\n background-color: var(--flow-label-color);\n padding: 4px 8px 4px 10px;\n border-radius: 2px;\n display: inline;\n`;\n//# sourceMappingURL=labelFeature.js.map"],"names":["LabelFeature","forwardRef","_a","ref","children","label","variant","props","__rest","_jsx","LabelFeatureStyled","Object","assign","styled","Label","VariantType","PRIMARY","flowColors","brand","tertiary","NEUTRAL","onSurface","os500","secondary","os0"],"mappings":"6SAYY,MAACA,EAAeC,GAAW,CAACC,EAAIC,KACxC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,WAAcJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC5F,OAAQO,EAAKC,EAAoBC,OAAOC,OAAO,CAAE,EAAEL,EAAO,CAAEJ,IAAKA,EAAKG,QAASA,EAASD,MAAOA,EAAOD,SAAUA,IAAc,IAK5HM,EAAqBG,EAAOC,EAAO;wBAChBP,IACrB,OAAQA,EAAMD,SACV,KAAKS,EAAYC,QACb,OAAOC,EAAWC,MAAMC,SAC5B,KAAKJ,EAAYK,QACb,OAAOH,EAAWI,UAAUC,MAChC,QACI,OAAOL,EAAWV,EAAMD,SAAWW,EAAWV,EAAMD,SAAWW,EAAWC,MAAMK,UACvF;WAEMN,EAAWI,UAAUG;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelStatus.js","sources":["../../../src/components/labelStatus/labelStatus.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\n/**\n * @description Styled SkodaFlow LabelStatus component\n * @param props LabelStatusProps\n * @returns React Functional Component\n * @deprecated Use Indicator component instead\n */\nexport const LabelStatus = forwardRef((_a, ref) => {\n var { children, label, variant = 'positive' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelStatusStyled, Object.assign({ className: 'labelStatus' }, props, { ref: ref, variant: variant, label: label, \"data-testid\": \"LabelStatus\", children: children })));\n});\n/**\n * LabelStatus styling defintion\n */\nconst LabelStatusStyled = styled(Label) `\
|
|
1
|
+
{"version":3,"file":"labelStatus.js","sources":["../../../src/components/labelStatus/labelStatus.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport styled from '@emotion/styled';\nimport { Label } from '../label';\nimport { paletteLight as flowColors } from '../../design/skoda/paletteLight.theme';\n/**\n * @description Styled SkodaFlow LabelStatus component\n * @param props LabelStatusProps\n * @returns React Functional Component\n * @deprecated Use Indicator component instead\n */\nexport const LabelStatus = forwardRef((_a, ref) => {\n var { children, label, variant = 'positive' } = _a, props = __rest(_a, [\"children\", \"label\", \"variant\"]);\n return (_jsx(LabelStatusStyled, Object.assign({ className: 'labelStatus' }, props, { ref: ref, variant: variant, label: label, \"data-testid\": \"LabelStatus\", children: children })));\n});\n/**\n * LabelStatus styling defintion\n */\nconst LabelStatusStyled = styled(Label) `\n --flow-label-color: ${(props) => {\n switch (props.variant) {\n case 'alert':\n return flowColors.alert['main'];\n case 'warning':\n return flowColors.warning['main'];\n case 'positive':\n return flowColors.positive['main'];\n default:\n return flowColors[props.variant] ? flowColors[props.variant] : props.variant;\n }\n}};\n color: ${flowColors.text.primary};\n &::before {\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 50%;\n margin-right: 8px;\n margin-top: -2px;\n display: inline-block;\n vertical-align: middle;\n background-color: var(--flow-label-color);\n }\n`;\n//# sourceMappingURL=labelStatus.js.map"],"names":["LabelStatus","forwardRef","_a","ref","children","label","variant","props","__rest","_jsx","LabelStatusStyled","Object","assign","className","styled","Label","flowColors","alert","warning","positive","text","primary"],"mappings":"2PAYY,MAACA,EAAcC,GAAW,CAACC,EAAIC,KACvC,IAAIC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,EAAU,YAAeJ,EAAIK,EAAQC,EAAON,EAAI,CAAC,WAAY,QAAS,YAC7F,OAAQO,EAAKC,EAAmBC,OAAOC,OAAO,CAAEC,UAAW,eAAiBN,EAAO,CAAEJ,IAAKA,EAAKG,QAASA,EAASD,MAAOA,EAAO,cAAe,cAAeD,SAAUA,IAAc,IAKnLM,EAAoBI,EAAOC,EAAO;wBACfR,IACrB,OAAQA,EAAMD,SACV,IAAK,QACD,OAAOU,EAAWC,MAAY,KAClC,IAAK,UACD,OAAOD,EAAWE,QAAc,KACpC,IAAK,WACD,OAAOF,EAAWG,SAAe,KACrC,QACI,OAAOH,EAAWT,EAAMD,SAAWU,EAAWT,EAAMD,SAAWC,EAAMD,QAC5E;WAEMU,EAAWI,KAAKC;;;;;;;;;;;;"}
|
package/components/menu/menu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e}from"tslib";import{jsxs as t,jsx as o,Fragment as i}from"react/jsx-runtime";import{forwardRef as r,useState as l,useCallback as n,useEffect as a}from"react";import{styled as p}from"@mui/material/styles";import c from"@mui/material/MenuItem";import m from"@mui/material/MenuList";import g from"@mui/material/Paper";import s from"@mui/material/ListItemText";import u from"@mui/material/ListItemIcon";import{Checkbox as d}from"../checkbox/checkbox.js";import{ToggleSwitch as h}from"../toggleSwitch/toggleSwitch.js";import{Icon as f}from"../icon/icon.js";import"../icon/icon.definitions.js";import x from"@mui/material/Divider";import{Typography as b}from"@mui/material";import{Flag as S}from"../flag/flag.js";const v=r(((r,p)=>{var{setIsOpen:g,reactHook:v,items:
|
|
1
|
+
import{__rest as e}from"tslib";import{jsxs as t,jsx as o,Fragment as i}from"react/jsx-runtime";import{forwardRef as r,useState as l,useCallback as n,useEffect as a}from"react";import{styled as p}from"@mui/material/styles";import c from"@mui/material/MenuItem";import m from"@mui/material/MenuList";import g from"@mui/material/Paper";import s from"@mui/material/ListItemText";import u from"@mui/material/ListItemIcon";import{Checkbox as d}from"../checkbox/checkbox.js";import{ToggleSwitch as h}from"../toggleSwitch/toggleSwitch.js";import{Icon as f}from"../icon/icon.js";import"../icon/icon.definitions.js";import x from"@mui/material/Divider";import{Typography as b}from"@mui/material";import{Flag as S}from"../flag/flag.js";const v=r(((r,p)=>{var{setIsOpen:g,reactHook:v,items:I,hasIcon:L,multipleSelection:j,groupToggleSelection:k,groupLabel:y="",toggleLabel:T}=r,O=e(r,["setIsOpen","reactHook","items","hasIcon","multipleSelection","groupToggleSelection","groupLabel","toggleLabel"]);const{state:w,setState:R}=v,[C,W]=l(!1),H=n((()=>{((e,t,o,i)=>{const r=!e;o((()=>r?[...t]:[])),i(r)})(C,I,R,W)}),[I,R,C]),D=n(((e,t)=>{((e,t,o,i,r,l)=>{const n=e?i.includes(o):i.find((e=>e.value.toString()===o)),a=e?[o]:l.filter((e=>e.value.toString()===o));r(t?n?i.filter((t=>e?t!==o:t.value.toString()!==o)):e=>[...a,...e]:n?[]:a)})(t,j,e.currentTarget.id,w,R,I)}),[I,w,j,R]),F=n(((e,i)=>{const r=e?w.includes(i):w.some((e=>e.value===i.value)),l=e?i:i.title,n=e?i:i.value;return t(c,{id:n,selected:r,onClick:t=>D(t,e),children:[L&&!e&&o(u,{children:o(S,{flag:i.flag,title:i.title})}),o(s,{children:o(b,{noWrap:!0,children:l})}),j&&o(d,{checked:r})]},n)}),[w,L,j,D]);return a((()=>{((e,t,o,i,r)=>{e&&t&&(i.length===o.length&&r(!0),i.length<o.length&&r(!1))})(j,k,I,w,W)}),[k,I,w,j]),t(M,Object.assign({},O,{ref:p,groupLabel:y,groupToggleSelection:k,multipleSelection:j.toString(),sx:y||k&&j?{paddingTop:"0px"}:{},children:[y.length>0&&t(i,{children:[t(c,{children:[o(s,{children:o(b,{noWrap:!0,children:y})}),o(u,{onClick:()=>g(!1),children:o(f,{name:"close"})})]}),o(x,{variant:"middle"})]}),j&&k&&o(i,{children:t(c,{className:"menu-select-all",children:[o(s,{children:T||"Select all"}),o(h,{onClick:H,checked:C})]})}),o(m,{children:I.map((e=>F("string"==typeof e,e)))})]}))})),M=p(g,{shouldForwardProp:e=>"multipleSelection"!==e&&"groupLabel"!==e&&"groupToggleSelection"!==e})((t=>{var{theme:o}=t;const i=e(t,["theme"]);let r={};const l={height:"48px",padding:"0px 24px"};return"true"===i.multipleSelection&&(l.paddingRight="16px"),r=Object.assign(Object.assign({},r),{boxShadow:"0px 3px 8px rgba(0, 0, 0, 0.15)","& .MuiList-root":{maxHeight:"240px",overflow:"overlay",padding:"0px",borderRadius:"4px"},"& .MuiTypography-root":{fontSize:"16px",lineHeight:"24px",color:o.palette.onSurface.os900,fontWeight:"500",paddingRight:0},"& li > .MuiListItemIcon-root":{minWidth:"0px",marginRight:"16px"},"& .MuiDivider-root":{marginTop:"0px",marginBottom:"0px"},"& li.menu-select-all":{"& .MuiTypography-root":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"&:hover":{backgroundColor:o.palette.onSurface.os0}},"& .MuiMenuItem-root":l,"& .MuiFormControlLabel-root":{marginLeft:"16px",marginRight:0}}),i.groupLabel&&i.groupLabel.length>0?r=Object.assign(Object.assign({},r),{"& > .MuiMenuItem-root:first-of-type":{borderRadius:"4px",paddingRight:"21px","& .MuiTypography-root":{fontWeight:"700"},"& .MuiListItemIcon-root":{marginRight:"0px",color:o.palette.onSurface.os900,"& .MuiIcon-root:before":{position:"relative",top:"-3px"}},"&:hover":{backgroundColor:`${o.palette.background.primary}`}}}):i.multipleSelection&&i.groupToggleSelection&&(r=Object.assign(Object.assign({},r),{"& > .MuiMenuItem-root:first-of-type":{borderRadius:"4px"}})),r}));export{v as Menu};
|
|
2
2
|
//# sourceMappingURL=menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sources":["../../../src/components/menu/menu.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { styled } from '@mui/material/styles';\nimport MenuItem from '@mui/material/MenuItem';\nimport MenuList from '@mui/material/MenuList';\nimport MuiPaper from '@mui/material/Paper';\nimport ListItemText from '@mui/material/ListItemText';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport { Checkbox } from '../checkbox';\nimport { ToggleSwitch } from '../toggleSwitch';\nimport { Icon } from '../icon';\nimport Divider from '@mui/material/Divider';\nimport { Typography } from '@mui/material';\nimport { Flag } from '../flag';\n/**\n * @description SkodaFlow Menu component.\n * Properties are inherited from HTML Div element.\n * @param props PaperProps\n * @returns React Functional Component\n */\n/**\n * @function onToggleClickHandler\n * @description Set itemsstate and toggle checked on toggle click.\n */\nconst onToggleClickHandler = (currToggleChecked, initItems, setItems, setToggle) => {\n const expectedFutureToggleCheckedState = !currToggleChecked;\n setItems(() => (expectedFutureToggleCheckedState ? [...initItems] : []));\n setToggle(expectedFutureToggleCheckedState);\n};\n/**\n * @function onMenuItemClickHandler\n * @description Set itemsstate on menu item click.\n */\nconst onMenuItemClickHandler = (isString, multipleSelection, id, itemsState, setItemsState, initItems) => {\n const itemExist = isString ? itemsState.includes(id) : itemsState.find((item) => item.value.toString() === id);\n const newItem = isString\n ? [id]\n : initItems.filter((item) => item.value.toString() === id);\n //if the menu is not multiple selection\n if (!multipleSelection) {\n //if the item is already selected (itemExist === true): return an empty array (deselect item)\n //else return the new item selected (object or string depending on the array of items passed)\n if (itemExist) {\n setItemsState([]);\n }\n else {\n setItemsState(newItem);\n }\n }\n //if the menu is multiple selection\n else {\n if (itemExist) {\n const listWithoutItem = itemsState.filter((item) => (isString ? item !== id : item.value.toString() !== id));\n setItemsState(listWithoutItem);\n }\n else {\n setItemsState((prevArr) => [...newItem, ...prevArr]);\n }\n }\n};\n/**\n * @function setToggle\n * @description Set toggle based on menu items change.\n */\nconst setToggle = (multipleSelection, groupToggleSelection, initItems, itemsState, setToggleChecked) => {\n if (multipleSelection && groupToggleSelection) {\n if (itemsState.length === initItems.length)\n setToggleChecked(true);\n if (itemsState.length < initItems.length)\n setToggleChecked(false);\n }\n};\nexport const Menu = forwardRef((_a, ref) => {\n var { setIsOpen, reactHook, items, hasIcon, multipleSelection, groupToggleSelection, groupLabel = '', toggleLabel } = _a, props = __rest(_a, [\"setIsOpen\", \"reactHook\", \"items\", \"hasIcon\", \"multipleSelection\", \"groupToggleSelection\", \"groupLabel\", \"toggleLabel\"]);\n const { state: itemsState, setState: setItemsState } = reactHook;\n const [toggleChecked, setToggleChecked] = useState(false);\n const onToggleClickHandlerWithUseCallback = useCallback(() => {\n onToggleClickHandler(toggleChecked, items, setItemsState, setToggleChecked);\n }, [items, setItemsState, toggleChecked]);\n //callback fired when an item in the menu list is clicked\n const onMenuItemClickHandlerWithUseCallback = useCallback((e, isString) => {\n onMenuItemClickHandler(isString, multipleSelection, e.currentTarget.id, itemsState, setItemsState, items);\n }, [items, itemsState, multipleSelection, setItemsState]);\n //Return the menuItem depending on the type of the item (string or MenuItemObject)\n const handleTypeItem = useCallback((isString, item) => {\n const selected = isString\n ? itemsState.includes(item)\n : itemsState.some((itemState) => itemState.value === item.value);\n const title = isString ? item : item.title;\n const id = isString ? item : item.value;\n return (_jsxs(MenuItem, { id: id, selected: selected, onClick: (e) => onMenuItemClickHandlerWithUseCallback(e, isString), children: [hasIcon && !isString && (_jsx(ListItemIcon, { children: _jsx(Flag, { flag: item.flag, title: item.title }) })), _jsx(ListItemText, { children: _jsx(Typography, { noWrap: true, children: title }) }), multipleSelection && _jsx(Checkbox, { checked: selected })] }, id));\n }, [itemsState, hasIcon, multipleSelection, onMenuItemClickHandlerWithUseCallback]);\n useEffect(() => {\n setToggle(multipleSelection, groupToggleSelection, items, itemsState, setToggleChecked);\n }, [groupToggleSelection, items, itemsState, multipleSelection]);\n return (_jsxs(PaperStyled, Object.assign({}, props, { ref: ref, groupLabel: groupLabel, groupToggleSelection: groupToggleSelection, multipleSelection: multipleSelection.toString(), sx: groupLabel || (groupToggleSelection && multipleSelection) ? { paddingTop: '0px' } : {}, children: [groupLabel.length > 0 && (_jsxs(_Fragment, { children: [_jsxs(MenuItem, { children: [_jsx(ListItemText, { children: _jsx(Typography, { noWrap: true, children: groupLabel }) }), _jsx(ListItemIcon, { onClick: () => setIsOpen(false), children: _jsx(Icon, { name: \"close\" }) })] }), _jsx(Divider, { variant: \"middle\" })] })), multipleSelection && groupToggleSelection && (_jsx(_Fragment, { children: _jsxs(MenuItem, { className: \"menu-select-all\", children: [_jsx(ListItemText, { children: toggleLabel ? toggleLabel : 'Select all' }), _jsx(ToggleSwitch, { onClick: onToggleClickHandlerWithUseCallback, checked: toggleChecked })] }) })), _jsx(MenuList, { children: items.map((item) => {\n const isString = typeof item === 'string';\n return handleTypeItem(isString, item);\n }) })] })));\n});\n/**\n * @description Menu styling defintion based on props\n */\nconst PaperStyled = styled(MuiPaper, {\n shouldForwardProp: (prop) => prop !== 'multipleSelection' && prop !== 'groupLabel' && prop !== 'groupToggleSelection',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const props = args;\n let styles = {};\n const hasmultipleSelection = props.multipleSelection === 'true';\n const itemStyles = {\n height: '48px',\n padding: '0px 24px',\n };\n if (hasmultipleSelection)\n itemStyles.paddingRight = '16px';\n styles = Object.assign(Object.assign({}, styles), { boxShadow: '0px 3px 8px rgba(0, 0, 0, 0.15)', '& .MuiList-root': {\n maxHeight: '240px',\n overflow: 'overlay',\n padding: '0px',\n borderRadius: '4px',\n }, '& .MuiTypography-root': {\n fontSize: '16px',\n lineHeight: '24px',\n color: theme.palette.onSurface.os900,\n fontWeight: '500',\n paddingRight: '16px',\n }, '& li > .MuiListItemIcon-root': {\n minWidth: '0px',\n marginRight: '16px',\n }, '& .MuiDivider-root': {\n marginTop: '0px',\n marginBottom: '0px',\n }, '& li.menu-select-all': {\n '& .MuiTypography-root': {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n '&:hover': {\n backgroundColor: theme.palette.onSurface.os0,\n },\n }, '& .MuiMenuItem-root': itemStyles });\n if (props.groupLabel && props.groupLabel.length > 0) {\n styles = Object.assign(Object.assign({}, styles), { '& > .MuiMenuItem-root:first-of-type': {\n borderRadius: '4px',\n paddingRight: '21px',\n '& .MuiTypography-root': {\n fontWeight: '700',\n },\n '& .MuiListItemIcon-root': {\n marginRight: '0px',\n color: theme.palette.onSurface.os900,\n '& .MuiIcon-root:before': {\n position: 'relative',\n top: '-3px',\n },\n },\n '&:hover': {\n backgroundColor: `${theme.palette.background.primary}`,\n },\n } });\n }\n else if (props.multipleSelection && props.groupToggleSelection) {\n styles = Object.assign(Object.assign({}, styles), { '& > .MuiMenuItem-root:first-of-type': {\n borderRadius: '4px',\n } });\n }\n return styles;\n});\n//# sourceMappingURL=menu.js.map"],"names":["Menu","forwardRef","_a","ref","setIsOpen","reactHook","items","hasIcon","multipleSelection","groupToggleSelection","groupLabel","toggleLabel","props","__rest","state","itemsState","setState","setItemsState","toggleChecked","setToggleChecked","useState","onToggleClickHandlerWithUseCallback","useCallback","currToggleChecked","initItems","setItems","setToggle","expectedFutureToggleCheckedState","onToggleClickHandler","onMenuItemClickHandlerWithUseCallback","e","isString","id","itemExist","includes","find","item","value","toString","newItem","filter","prevArr","onMenuItemClickHandler","currentTarget","handleTypeItem","selected","some","itemState","title","_jsxs","MenuItem","onClick","children","_jsx","ListItemIcon","Flag","flag","ListItemText","Typography","noWrap","Checkbox","checked","useEffect","length","PaperStyled","Object","assign","sx","paddingTop","_Fragment","Icon","name","Divider","variant","className","ToggleSwitch","MenuList","map","styled","MuiPaper","shouldForwardProp","prop","theme","styles","itemStyles","height","padding","paddingRight","boxShadow","maxHeight","overflow","borderRadius","fontSize","lineHeight","color","palette","onSurface","os900","fontWeight","minWidth","marginRight","marginTop","marginBottom","textOverflow","whiteSpace","backgroundColor","os0","position","top","background","primary"],"mappings":"qtBAyBA,MAgDaA,EAAOC,GAAW,CAACC,EAAIC,KAChC,IAAIC,UAAEA,EAASC,UAAEA,EAASC,MAAEA,EAAKC,QAAEA,EAAOC,kBAAEA,EAAiBC,qBAAEA,EAAoBC,WAAEA,EAAa,GAAEC,YAAEA,GAAgBT,EAAIU,EAAQC,EAAOX,EAAI,CAAC,YAAa,YAAa,QAAS,UAAW,oBAAqB,uBAAwB,aAAc,gBACvP,MAAQY,MAAOC,EAAYC,SAAUC,GAAkBZ,GAChDa,EAAeC,GAAoBC,GAAS,GAC7CC,EAAsCC,GAAY,KApD/B,EAACC,EAAmBC,EAAWC,EAAUC,KAClE,MAAMC,GAAoCJ,EAC1CE,GAAS,IAAOE,EAAmC,IAAIH,GAAa,KACpEE,EAAUC,EAAiC,EAkDvCC,CAAqBV,EAAeZ,EAAOW,EAAeE,EAAiB,GAC5E,CAACb,EAAOW,EAAeC,IAEpBW,EAAwCP,GAAY,CAACQ,EAAGC,KA/CnC,EAACA,EAAUvB,EAAmBwB,EAAIjB,EAAYE,EAAeO,KACxF,MAAMS,EAAYF,EAAWhB,EAAWmB,SAASF,GAAMjB,EAAWoB,MAAMC,GAASA,EAAKC,MAA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,UACVJ,QAAS,MACTK,aAAc,OACf,wBAAyB,CACxBC,SAAU,OACVC,WAAY,OACZC,MAAOZ,EAAMa,QAAQC,UAAUC,MAC/BC,WAAY,MACZX,aAAc,QACf,+BAAgC,CAC/BY,SAAU,MACVC,YAAa,QACd,qBAAsB,CACrBC,UAAW,MACXC,aAAc,OACf,uBAAwB,CACvB,wBAAyB,CACrBC,aAAc,WACdb,SAAU,SACVc,WAAY,UAEhB,UAAW,CACPC,gBAAiBvB,EAAMa,QAAQC,UAAUU,MAE9C,sBAAuBtB,IAC1BxE,EAAMF,YAAcE,EAAMF,WAAWqD,OAAS,EAC9CoB,EAASlB,OAAOC,OAAOD,OAAOC,OAAO,GAAIiB,GAAS,CAAE,sCAAuC,CACnFQ,aAAc,MACdJ,aAAc,OACd,wBAAyB,CACrBW,WAAY,OAEhB,0BAA2B,CACvBE,YAAa,MACbN,MAAOZ,EAAMa,QAAQC,UAAUC,MAC/B,yBAA0B,CACtBU,SAAU,WACVC,IAAK,SAGb,UAAW,CACPH,gBAAiB,GAAGvB,EAAMa,QAAQc,WAAWC,cAIpDlG,EAAMJ,mBAAqBI,EAAMH,uBACtC0E,EAASlB,OAAOC,OAAOD,OAAOC,OAAO,GAAIiB,GAAS,CAAE,sCAAuC,CACnFQ,aAAc,UAGnBR,CAAM"}
|
|
1
|
+
{"version":3,"file":"menu.js","sources":["../../../src/components/menu/menu.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { styled } from '@mui/material/styles';\nimport MenuItem from '@mui/material/MenuItem';\nimport MenuList from '@mui/material/MenuList';\nimport MuiPaper from '@mui/material/Paper';\nimport ListItemText from '@mui/material/ListItemText';\nimport ListItemIcon from '@mui/material/ListItemIcon';\nimport { Checkbox } from '../checkbox';\nimport { ToggleSwitch } from '../toggleSwitch';\nimport { Icon } from '../icon';\nimport Divider from '@mui/material/Divider';\nimport { Typography } from '@mui/material';\nimport { Flag } from '../flag';\n/**\n * @description SkodaFlow Menu component.\n * Properties are inherited from HTML Div element.\n * @param props PaperProps\n * @returns React Functional Component\n */\n/**\n * @function onToggleClickHandler\n * @description Set itemsstate and toggle checked on toggle click.\n */\nconst onToggleClickHandler = (currToggleChecked, initItems, setItems, setToggle) => {\n const expectedFutureToggleCheckedState = !currToggleChecked;\n setItems(() => (expectedFutureToggleCheckedState ? [...initItems] : []));\n setToggle(expectedFutureToggleCheckedState);\n};\n/**\n * @function onMenuItemClickHandler\n * @description Set itemsstate on menu item click.\n */\nconst onMenuItemClickHandler = (isString, multipleSelection, id, itemsState, setItemsState, initItems) => {\n const itemExist = isString ? itemsState.includes(id) : itemsState.find((item) => item.value.toString() === id);\n const newItem = isString\n ? [id]\n : initItems.filter((item) => item.value.toString() === id);\n //if the menu is not multiple selection\n if (!multipleSelection) {\n //if the item is already selected (itemExist === true): return an empty array (deselect item)\n //else return the new item selected (object or string depending on the array of items passed)\n if (itemExist) {\n setItemsState([]);\n }\n else {\n setItemsState(newItem);\n }\n }\n //if the menu is multiple selection\n else {\n if (itemExist) {\n const listWithoutItem = itemsState.filter((item) => (isString ? item !== id : item.value.toString() !== id));\n setItemsState(listWithoutItem);\n }\n else {\n setItemsState((prevArr) => [...newItem, ...prevArr]);\n }\n }\n};\n/**\n * @function setToggle\n * @description Set toggle based on menu items change.\n */\nconst setToggle = (multipleSelection, groupToggleSelection, initItems, itemsState, setToggleChecked) => {\n if (multipleSelection && groupToggleSelection) {\n if (itemsState.length === initItems.length)\n setToggleChecked(true);\n if (itemsState.length < initItems.length)\n setToggleChecked(false);\n }\n};\nexport const Menu = forwardRef((_a, ref) => {\n var { setIsOpen, reactHook, items, hasIcon, multipleSelection, groupToggleSelection, groupLabel = '', toggleLabel } = _a, props = __rest(_a, [\"setIsOpen\", \"reactHook\", \"items\", \"hasIcon\", \"multipleSelection\", \"groupToggleSelection\", \"groupLabel\", \"toggleLabel\"]);\n const { state: itemsState, setState: setItemsState } = reactHook;\n const [toggleChecked, setToggleChecked] = useState(false);\n const onToggleClickHandlerWithUseCallback = useCallback(() => {\n onToggleClickHandler(toggleChecked, items, setItemsState, setToggleChecked);\n }, [items, setItemsState, toggleChecked]);\n //callback fired when an item in the menu list is clicked\n const onMenuItemClickHandlerWithUseCallback = useCallback((e, isString) => {\n onMenuItemClickHandler(isString, multipleSelection, e.currentTarget.id, itemsState, setItemsState, items);\n }, [items, itemsState, multipleSelection, setItemsState]);\n //Return the menuItem depending on the type of the item (string or MenuItemObject)\n const handleTypeItem = useCallback((isString, item) => {\n const selected = isString\n ? itemsState.includes(item)\n : itemsState.some((itemState) => itemState.value === item.value);\n const title = isString ? item : item.title;\n const id = isString ? item : item.value;\n return (_jsxs(MenuItem, { id: id, selected: selected, onClick: (e) => onMenuItemClickHandlerWithUseCallback(e, isString), children: [hasIcon && !isString && (_jsx(ListItemIcon, { children: _jsx(Flag, { flag: item.flag, title: item.title }) })), _jsx(ListItemText, { children: _jsx(Typography, { noWrap: true, children: title }) }), multipleSelection && _jsx(Checkbox, { checked: selected })] }, id));\n }, [itemsState, hasIcon, multipleSelection, onMenuItemClickHandlerWithUseCallback]);\n useEffect(() => {\n setToggle(multipleSelection, groupToggleSelection, items, itemsState, setToggleChecked);\n }, [groupToggleSelection, items, itemsState, multipleSelection]);\n return (_jsxs(PaperStyled, Object.assign({}, props, { ref: ref, groupLabel: groupLabel, groupToggleSelection: groupToggleSelection, multipleSelection: multipleSelection.toString(), sx: groupLabel || (groupToggleSelection && multipleSelection) ? { paddingTop: '0px' } : {}, children: [groupLabel.length > 0 && (_jsxs(_Fragment, { children: [_jsxs(MenuItem, { children: [_jsx(ListItemText, { children: _jsx(Typography, { noWrap: true, children: groupLabel }) }), _jsx(ListItemIcon, { onClick: () => setIsOpen(false), children: _jsx(Icon, { name: \"close\" }) })] }), _jsx(Divider, { variant: \"middle\" })] })), multipleSelection && groupToggleSelection && (_jsx(_Fragment, { children: _jsxs(MenuItem, { className: \"menu-select-all\", children: [_jsx(ListItemText, { children: toggleLabel ? toggleLabel : 'Select all' }), _jsx(ToggleSwitch, { onClick: onToggleClickHandlerWithUseCallback, checked: toggleChecked })] }) })), _jsx(MenuList, { children: items.map((item) => {\n const isString = typeof item === 'string';\n return handleTypeItem(isString, item);\n }) })] })));\n});\n/**\n * @description Menu styling defintion based on props\n */\nconst PaperStyled = styled(MuiPaper, {\n shouldForwardProp: (prop) => prop !== 'multipleSelection' && prop !== 'groupLabel' && prop !== 'groupToggleSelection',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const props = args;\n let styles = {};\n const hasmultipleSelection = props.multipleSelection === 'true';\n const itemStyles = {\n height: '48px',\n padding: '0px 24px',\n };\n if (hasmultipleSelection)\n itemStyles.paddingRight = '16px';\n styles = Object.assign(Object.assign({}, styles), { boxShadow: '0px 3px 8px rgba(0, 0, 0, 0.15)', '& .MuiList-root': {\n maxHeight: '240px',\n overflow: 'overlay',\n padding: '0px',\n borderRadius: '4px',\n }, '& .MuiTypography-root': {\n fontSize: '16px',\n lineHeight: '24px',\n color: theme.palette.onSurface.os900,\n fontWeight: '500',\n paddingRight: 0,\n }, '& li > .MuiListItemIcon-root': {\n minWidth: '0px',\n marginRight: '16px',\n }, '& .MuiDivider-root': {\n marginTop: '0px',\n marginBottom: '0px',\n }, '& li.menu-select-all': {\n '& .MuiTypography-root': {\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n '&:hover': {\n backgroundColor: theme.palette.onSurface.os0,\n },\n }, '& .MuiMenuItem-root': itemStyles, '& .MuiFormControlLabel-root': {\n marginLeft: '16px',\n marginRight: 0,\n } });\n if (props.groupLabel && props.groupLabel.length > 0) {\n styles = Object.assign(Object.assign({}, styles), { '& > .MuiMenuItem-root:first-of-type': {\n borderRadius: '4px',\n paddingRight: '21px',\n '& .MuiTypography-root': {\n fontWeight: '700',\n },\n '& .MuiListItemIcon-root': {\n marginRight: '0px',\n color: theme.palette.onSurface.os900,\n '& .MuiIcon-root:before': {\n position: 'relative',\n top: '-3px',\n },\n },\n '&:hover': {\n backgroundColor: `${theme.palette.background.primary}`,\n },\n } });\n }\n else if (props.multipleSelection && props.groupToggleSelection) {\n styles = Object.assign(Object.assign({}, styles), { '& > .MuiMenuItem-root:first-of-type': {\n borderRadius: '4px',\n } });\n }\n return styles;\n});\n//# sourceMappingURL=menu.js.map"],"names":["Menu","forwardRef","_a","ref","setIsOpen","reactHook","items","hasIcon","multipleSelection","groupToggleSelection","groupLabel","toggleLabel","props","__rest","state","itemsState","setState","setItemsState","toggleChecked","setToggleChecked","useState","onToggleClickHandlerWithUseCallback","useCallback","currToggleChecked","initItems","setItems","setToggle","expectedFutureToggleCheckedState","onToggleClickHandler","onMenuItemClickHandlerWithUseCallback","e","isString","id","itemExist","includes","find","item","value","toString","newItem","filter","prevArr","onMenuItemClickHandler","currentTarget","handleTypeItem","selected","some","itemState","title","_jsxs","MenuItem","onClick","children","_jsx","ListItemIcon","Flag","flag","ListItemText","Typography","noWrap","Checkbox","checked","useEffect","length","PaperStyled","Object","assign","sx","paddingTop","_Fragment","Icon","name","Divider","variant","className","ToggleSwitch","MenuList","map","styled","MuiPaper","shouldForwardProp","prop","theme","styles","itemStyles","height","padding","paddingRight","boxShadow","maxHeight","overflow","borderRadius","fontSize","lineHeight","color","palette","onSurface","os900","fontWeight","minWidth","marginRight","marginTop","marginBottom","textOverflow","whiteSpace","backgroundColor","os0","marginLeft","position","top","background","primary"],"mappings":"qtBAyBA,MAgDaA,EAAOC,GAAW,CAACC,EAAIC,KAChC,IAAIC,UAAEA,EAASC,UAAEA,EAASC,MAAEA,EAAKC,QAAEA,EAAOC,kBAAEA,EAAiBC,qBAAEA,EAAoBC,WAAEA,EAAa,GAAEC,YAAEA,GAAgBT,EAAIU,EAAQC,EAAOX,EAAI,CAAC,YAAa,YAAa,QAAS,UAAW,oBAAqB,uBAAwB,aAAc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C0E,EAASlB,OAAOC,OAAOD,OAAOC,OAAO,GAAIiB,GAAS,CAAE,sCAAuC,CACnFQ,aAAc,UAGnBR,CAAM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as t}from"tslib";import{jsx as o,jsxs as a}from"react/jsx-runtime";import{forwardRef as i,useState as n,useEffect as e,useCallback as d}from"react";import{styled as l}from"@mui/material/styles";import r from"@mui/material/Modal";import{Button as s}from"../button/button.js";import{Icon as c}from"../icon/icon.js";import"../icon/icon.definitions.js";import{ContentDiv as m}from"./contentDiv.js";import{useTheme as p}from"@mui/material";const u=i(((i,l)=>{var{children:r,open:u,handleClose:b,onClickTopButton:h,onClickBottomButton:f,ariaLabelledby:g,ariaDescribedBy:B,firstButton:v,secondButton:C,hasCloseButton:k,size:w,firstButtonVariant:W,secondButtonVariant:F,secondButtonVisible:y,defaultButtonSection:M=!0,maxWidth:T,modalLoadedCallback:z,disableAutoFocus:j,disableEnforceFocus:V}=i,L=t(i,["children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback","disableAutoFocus","disableEnforceFocus"]);const[O,D]=n(!1),[S,A]=n(!1),E=p();e((()=>{const t=window.matchMedia(`(min-width: ${E.breakpoints.values.md}px)`);A(t.matches)}),[E.breakpoints.values.md]);const H=d((()=>{if(S&&"large"===(w||"large"))return!1}),[S,w]);return o(x,Object.assign({},L,{ref:l,open:u,size:w,onClose:b,isOverFlowing:O,"aria-labelledby":g,"aria-describedby":B,compactButtons:H(),maxWidth:T,"data-testid":"Modal",disableEnforceFocus:V,disableAutoFocus:j,children:a("div",{className:"modal-container","data-testid":"Modal.container",children:[k&&o("button",{onClick:b,"data-testid":"Modal.close",children:o(c,{name:"close",fontSize:"medium"})}),o(m,{setIsOverFlowing:D,className:"modal-container--content",modalLoadedCallback:z,"data-testid":"Modal.content",children:r}),M&&a("div",{className:"modal-container--action-buttons","data-testid":"Modal.buttons",children:[o(s,{label:v,onClick:h,fullWidth:!0,variant:W,compact:H(),"data-testid":"Modal.button1","data-variant":W}),y&&o(s,{label:C,onClick:f,fullWidth:!0,variant:F,compact:H(),"data-testid":"Modal.button2","data-variant":F})]})]})}))})),x=l(r,{shouldForwardProp:t=>"compactButtons"!==t&&"isOverFlowing"!==t&&"maxWidth"!==t})((o=>{var{theme:a}=o,i=t(o,["theme"]);const n=i.compactButtons?"16px":"24px",e=i.maxWidth?i.maxWidth:"calc(100% - 40px)",d="large"===(i.size||"large"),l=i.size&&"full-width"===i.size,r=d?{maxWidth:"624px",marginTop:"40px",padding:"40px"}:l?{maxWidth:e,marginTop:"40px",padding:"40px"}:{maxWidth:"408px",marginTop:"48px",padding:"24px 40px 40px 40px"};return{"& .modal-container":{maxHeight:"calc(100vh - 64px)",minHeight:"300px",display:"flex",flexDirection:"column","&--content":{overflowX:"hidden",overflowY:"
|
|
1
|
+
import{__rest as t}from"tslib";import{jsx as o,jsxs as a}from"react/jsx-runtime";import{forwardRef as i,useState as n,useEffect as e,useCallback as d}from"react";import{styled as l}from"@mui/material/styles";import r from"@mui/material/Modal";import{Button as s}from"../button/button.js";import{Icon as c}from"../icon/icon.js";import"../icon/icon.definitions.js";import{ContentDiv as m}from"./contentDiv.js";import{useTheme as p}from"@mui/material";const u=i(((i,l)=>{var{children:r,open:u,handleClose:b,onClickTopButton:h,onClickBottomButton:f,ariaLabelledby:g,ariaDescribedBy:B,firstButton:v,secondButton:C,hasCloseButton:k,size:w,firstButtonVariant:W,secondButtonVariant:F,secondButtonVisible:y,defaultButtonSection:M=!0,maxWidth:T,modalLoadedCallback:z,disableAutoFocus:j,disableEnforceFocus:V}=i,L=t(i,["children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback","disableAutoFocus","disableEnforceFocus"]);const[O,D]=n(!1),[S,A]=n(!1),E=p();e((()=>{const t=window.matchMedia(`(min-width: ${E.breakpoints.values.md}px)`);A(t.matches)}),[E.breakpoints.values.md]);const H=d((()=>{if(S&&"large"===(w||"large"))return!1}),[S,w]);return o(x,Object.assign({},L,{ref:l,open:u,size:w,onClose:b,isOverFlowing:O,"aria-labelledby":g,"aria-describedby":B,compactButtons:H(),maxWidth:T,"data-testid":"Modal",disableEnforceFocus:V,disableAutoFocus:j,dir:E.direction,children:a("div",{className:"modal-container","data-testid":"Modal.container",children:[k&&o("button",{onClick:b,"data-testid":"Modal.close",children:o(c,{name:"close",fontSize:"medium"})}),o(m,{setIsOverFlowing:D,className:"modal-container--content",modalLoadedCallback:z,"data-testid":"Modal.content",children:r}),M&&a("div",{className:"modal-container--action-buttons","data-testid":"Modal.buttons",children:[o(s,{label:v,onClick:h,fullWidth:!0,variant:W,compact:H(),"data-testid":"Modal.button1","data-variant":W}),y&&o(s,{label:C,onClick:f,fullWidth:!0,variant:F,compact:H(),"data-testid":"Modal.button2","data-variant":F})]})]})}))})),x=l(r,{shouldForwardProp:t=>"compactButtons"!==t&&"isOverFlowing"!==t&&"maxWidth"!==t})((o=>{var{theme:a}=o,i=t(o,["theme"]);const n=i.compactButtons?"16px":"24px",e=i.maxWidth?i.maxWidth:"calc(100% - 40px)",d="large"===(i.size||"large"),l=i.size&&"full-width"===i.size,r=d?{maxWidth:"624px",marginTop:"40px",padding:"40px"}:l?{maxWidth:e,marginTop:"40px",padding:"40px"}:{maxWidth:"408px",marginTop:"48px",padding:"24px 40px 40px 40px"};return{"& .modal-container":{maxHeight:"calc(100vh - 64px)",minHeight:"300px",display:"flex",flexDirection:"column","&--content":{overflowX:"hidden",overflowY:"auto",marginTop:"48px",padding:"0px 24px"},"&--action-buttons":{padding:"32px 24px",paddingBottom:n,boxShadow:i.isOverFlowing?"0px 0px 32px rgba(0, 0, 0, 0.15)":null,"div:first-of-type":{marginBottom:"15px"}}},[a.breakpoints.up("md")]:{"& .modal-container":{maxHeight:"calc(100vh - 160px)",margin:"0px",width:"100%",maxWidth:r.maxWidth,"&--content":{marginTop:r.marginTop,padding:"0px 40px"},"&--action-buttons":{padding:r.padding,paddingBottom:n}}}}}));export{u as Modal};
|
|
2
2
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useState, forwardRef } from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiModal from '@mui/material/Modal';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { ContentDiv } from './contentDiv';\nimport { useTheme } from '@mui/material';\n/**\n * @description Styled SkodaFlow Modal component\n * @param props ModalProps\n * @returns React Functional Component\n */\nexport const Modal = forwardRef((_a, ref) => {\n var { children, open, handleClose, onClickTopButton, onClickBottomButton, ariaLabelledby, ariaDescribedBy, firstButton, secondButton, hasCloseButton, size, firstButtonVariant, secondButtonVariant, secondButtonVisible, defaultButtonSection = true, maxWidth, modalLoadedCallback, disableAutoFocus, disableEnforceFocus } = _a, props = __rest(_a, [\"children\", \"open\", \"handleClose\", \"onClickTopButton\", \"onClickBottomButton\", \"ariaLabelledby\", \"ariaDescribedBy\", \"firstButton\", \"secondButton\", \"hasCloseButton\", \"size\", \"firstButtonVariant\", \"secondButtonVariant\", \"secondButtonVisible\", \"defaultButtonSection\", \"maxWidth\", \"modalLoadedCallback\", \"disableAutoFocus\", \"disableEnforceFocus\"]);\n const [isOverFlowing, setIsOverFlowing] = useState(false);\n const [desktopView, setDesktopView] = useState(false);\n const theme = useTheme();\n useEffect(() => {\n const mq = window.matchMedia(`(min-width: ${theme.breakpoints.values.md}px)`);\n setDesktopView(mq.matches);\n }, [theme.breakpoints.values.md]);\n const isCompactButton = useCallback(() => {\n const isModalLarge = (size || 'large') === 'large';\n if (desktopView && isModalLarge)\n return false;\n }, [desktopView, size]);\n return (_jsx(ModalStyled, Object.assign({}, props, { ref: ref, open: open, size: size, onClose: handleClose, isOverFlowing: isOverFlowing, \"aria-labelledby\": ariaLabelledby, \"aria-describedby\": ariaDescribedBy, compactButtons: isCompactButton(), maxWidth: maxWidth, \"data-testid\": \"Modal\", disableEnforceFocus: disableEnforceFocus, disableAutoFocus: disableAutoFocus, children: _jsxs(\"div\", { className: \"modal-container\", \"data-testid\": \"Modal.container\", children: [hasCloseButton && (_jsx(\"button\", { onClick: handleClose, \"data-testid\": \"Modal.close\", children: _jsx(Icon, { name: \"close\", fontSize: \"medium\" }) })), _jsx(ContentDiv, { setIsOverFlowing: setIsOverFlowing, className: \"modal-container--content\", modalLoadedCallback: modalLoadedCallback, \"data-testid\": \"Modal.content\", children: children }), defaultButtonSection && (_jsxs(\"div\", { className: \"modal-container--action-buttons\", \"data-testid\": \"Modal.buttons\", children: [_jsx(Button, { label: firstButton, onClick: onClickTopButton, fullWidth: true, variant: firstButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button1\", \"data-variant\": firstButtonVariant }), secondButtonVisible && (_jsx(Button, { label: secondButton, onClick: onClickBottomButton, fullWidth: true, variant: secondButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button2\", \"data-variant\": secondButtonVariant }))] }))] }) })));\n});\n/**\n * @description Modal styling definition\n */\nconst ModalStyled = styled(MuiModal, {\n shouldForwardProp: (prop) => prop !== 'compactButtons' && prop !== 'isOverFlowing' && prop !== 'maxWidth',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const bottomButtonPadding = args.compactButtons ? '16px' : '24px';\n const smallModalWidth = '408px';\n const largeModalWidth = '624px';\n const fullWidthModal = args.maxWidth ? args.maxWidth : 'calc(100% - 40px)';\n const isModalLarge = (args.size || 'large') === 'large';\n const isModalFullWidth = args.size && args.size === 'full-width';\n const sizeBasedStyles = isModalLarge\n ? { maxWidth: largeModalWidth, marginTop: '40px', padding: '40px' }\n : isModalFullWidth\n ? { maxWidth: fullWidthModal, marginTop: '40px', padding: '40px' }\n : {\n maxWidth: smallModalWidth,\n marginTop: '48px',\n padding: '24px 40px 40px 40px',\n };\n return {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 64px)',\n minHeight: '300px',\n display: 'flex',\n flexDirection: 'column',\n '&--content': {\n overflowX: 'hidden',\n overflowY: '
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../../src/components/modal/modal.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useCallback, useEffect, useState, forwardRef } from 'react';\nimport { styled } from '@mui/material/styles';\nimport MuiModal from '@mui/material/Modal';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport { ContentDiv } from './contentDiv';\nimport { useTheme } from '@mui/material';\n/**\n * @description Styled SkodaFlow Modal component\n * @param props ModalProps\n * @returns React Functional Component\n */\nexport const Modal = forwardRef((_a, ref) => {\n var { children, open, handleClose, onClickTopButton, onClickBottomButton, ariaLabelledby, ariaDescribedBy, firstButton, secondButton, hasCloseButton, size, firstButtonVariant, secondButtonVariant, secondButtonVisible, defaultButtonSection = true, maxWidth, modalLoadedCallback, disableAutoFocus, disableEnforceFocus } = _a, props = __rest(_a, [\"children\", \"open\", \"handleClose\", \"onClickTopButton\", \"onClickBottomButton\", \"ariaLabelledby\", \"ariaDescribedBy\", \"firstButton\", \"secondButton\", \"hasCloseButton\", \"size\", \"firstButtonVariant\", \"secondButtonVariant\", \"secondButtonVisible\", \"defaultButtonSection\", \"maxWidth\", \"modalLoadedCallback\", \"disableAutoFocus\", \"disableEnforceFocus\"]);\n const [isOverFlowing, setIsOverFlowing] = useState(false);\n const [desktopView, setDesktopView] = useState(false);\n const theme = useTheme();\n useEffect(() => {\n const mq = window.matchMedia(`(min-width: ${theme.breakpoints.values.md}px)`);\n setDesktopView(mq.matches);\n }, [theme.breakpoints.values.md]);\n const isCompactButton = useCallback(() => {\n const isModalLarge = (size || 'large') === 'large';\n if (desktopView && isModalLarge)\n return false;\n }, [desktopView, size]);\n return (_jsx(ModalStyled, Object.assign({}, props, { ref: ref, open: open, size: size, onClose: handleClose, isOverFlowing: isOverFlowing, \"aria-labelledby\": ariaLabelledby, \"aria-describedby\": ariaDescribedBy, compactButtons: isCompactButton(), maxWidth: maxWidth, \"data-testid\": \"Modal\", disableEnforceFocus: disableEnforceFocus, disableAutoFocus: disableAutoFocus, dir: theme.direction, children: _jsxs(\"div\", { className: \"modal-container\", \"data-testid\": \"Modal.container\", children: [hasCloseButton && (_jsx(\"button\", { onClick: handleClose, \"data-testid\": \"Modal.close\", children: _jsx(Icon, { name: \"close\", fontSize: \"medium\" }) })), _jsx(ContentDiv, { setIsOverFlowing: setIsOverFlowing, className: \"modal-container--content\", modalLoadedCallback: modalLoadedCallback, \"data-testid\": \"Modal.content\", children: children }), defaultButtonSection && (_jsxs(\"div\", { className: \"modal-container--action-buttons\", \"data-testid\": \"Modal.buttons\", children: [_jsx(Button, { label: firstButton, onClick: onClickTopButton, fullWidth: true, variant: firstButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button1\", \"data-variant\": firstButtonVariant }), secondButtonVisible && (_jsx(Button, { label: secondButton, onClick: onClickBottomButton, fullWidth: true, variant: secondButtonVariant, compact: isCompactButton(), \"data-testid\": \"Modal.button2\", \"data-variant\": secondButtonVariant }))] }))] }) })));\n});\n/**\n * @description Modal styling definition\n */\nconst ModalStyled = styled(MuiModal, {\n shouldForwardProp: (prop) => prop !== 'compactButtons' && prop !== 'isOverFlowing' && prop !== 'maxWidth',\n})((_a) => {\n var { theme } = _a, args = __rest(_a, [\"theme\"]);\n const bottomButtonPadding = args.compactButtons ? '16px' : '24px';\n const smallModalWidth = '408px';\n const largeModalWidth = '624px';\n const fullWidthModal = args.maxWidth ? args.maxWidth : 'calc(100% - 40px)';\n const isModalLarge = (args.size || 'large') === 'large';\n const isModalFullWidth = args.size && args.size === 'full-width';\n const sizeBasedStyles = isModalLarge\n ? { maxWidth: largeModalWidth, marginTop: '40px', padding: '40px' }\n : isModalFullWidth\n ? { maxWidth: fullWidthModal, marginTop: '40px', padding: '40px' }\n : {\n maxWidth: smallModalWidth,\n marginTop: '48px',\n padding: '24px 40px 40px 40px',\n };\n return {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 64px)',\n minHeight: '300px',\n display: 'flex',\n flexDirection: 'column',\n '&--content': {\n overflowX: 'hidden',\n overflowY: 'auto',\n marginTop: '48px',\n padding: '0px 24px',\n },\n '&--action-buttons': {\n padding: '32px 24px',\n paddingBottom: bottomButtonPadding,\n boxShadow: args.isOverFlowing ? '0px 0px 32px rgba(0, 0, 0, 0.15)' : null,\n 'div:first-of-type': {\n marginBottom: '15px',\n },\n },\n },\n [theme.breakpoints.up('md')]: {\n '& .modal-container': {\n maxHeight: 'calc(100vh - 160px)',\n margin: '0px',\n width: '100%',\n maxWidth: sizeBasedStyles.maxWidth,\n '&--content': {\n marginTop: sizeBasedStyles.marginTop,\n padding: '0px 40px',\n },\n '&--action-buttons': {\n padding: sizeBasedStyles.padding,\n paddingBottom: bottomButtonPadding,\n },\n },\n },\n };\n});\n//# sourceMappingURL=modal.js.map"],"names":["Modal","forwardRef","_a","ref","children","open","handleClose","onClickTopButton","onClickBottomButton","ariaLabelledby","ariaDescribedBy","firstButton","secondButton","hasCloseButton","size","firstButtonVariant","secondButtonVariant","secondButtonVisible","defaultButtonSection","maxWidth","modalLoadedCallback","disableAutoFocus","disableEnforceFocus","props","__rest","isOverFlowing","setIsOverFlowing","useState","desktopView","setDesktopView","theme","useTheme","useEffect","mq","window","matchMedia","breakpoints","values","md","matches","isCompactButton","useCallback","_jsx","ModalStyled","Object","assign","onClose","compactButtons","dir","direction","_jsxs","className","onClick","Icon","name","fontSize","ContentDiv","Button","label","fullWidth","variant","compact","styled","MuiModal","shouldForwardProp","prop","args","bottomButtonPadding","fullWidthModal","isModalLarge","isModalFullWidth","sizeBasedStyles","marginTop","padding","maxHeight","minHeight","display","flexDirection","overflowX","overflowY","paddingBottom","boxShadow","marginBottom","up","margin","width"],"mappings":"icAcY,MAACA,EAAQC,GAAW,CAACC,EAAIC,KACjC,IAAIC,SAAEA,EAAQC,KAAEA,EAAIC,YAAEA,EAAWC,iBAAEA,EAAgBC,oBAAEA,EAAmBC,eAAEA,EAAcC,gBAAEA,EAAeC,YAAEA,EAAWC,aAAEA,EAAYC,eAAEA,EAAcC,KAAEA,EAAIC,mBAAEA,EAAkBC,oBAAEA,EAAmBC,oBAAEA,EAAmBC,qBAAEA,GAAuB,EAAIC,SAAEA,EAAQC,oBAAEA,EAAmBC,iBAAEA,EAAgBC,oBAAEA,GAAwBpB,EAAIqB,EAAQC,EAAOtB,EAAI,CAAC,WAAY,OAAQ,cAAe,mBAAoB,sBAAuB,iBAAkB,kBAAmB,cAAe,eAAgB,iBAAkB,OAAQ,qBAAsB,sBAAuB,sBAAuB,uBAAwB,WAAY,sBAAuB,mBAAoB,wBACvpB,MAAOuB,EAAeC,GAAoBC,GAAS,IAC5CC,EAAaC,GAAkBF,GAAS,GACzCG,EAAQC,IACdC,GAAU,KACN,MAAMC,EAAKC,OAAOC,WAAW,eAAeL,EAAMM,YAAYC,OAAOC,SACrET,EAAeI,EAAGM,QAAQ,GAC3B,CAACT,EAAMM,YAAYC,OAAOC,KAC7B,MAAME,EAAkBC,GAAY,KAEhC,GAAIb,GADuC,WAArBd,GAAQ,SAE1B,OAAO,CAAK,GACjB,CAACc,EAAad,IACjB,OAAQ4B,EAAKC,EAAaC,OAAOC,OAAO,CAAE,EAAEtB,EAAO,CAAEpB,IAAKA,EAAKE,KAAMA,EAAMS,KAAMA,EAAMgC,QAASxC,EAAamB,cAAeA,EAAe,kBAAmBhB,EAAgB,mBAAoBC,EAAiBqC,eAAgBP,IAAmBrB,SAAUA,EAAU,cAAe,QAASG,oBAAqBA,EAAqBD,iB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ClBC,UAAW,qBACXC,UAAW,QACXC,QAAS,OACTC,cAAe,SACf,aAAc,CACVC,UAAW,SACXC,UAAW,OACXP,UAAW,OACXC,QAAS,YAEb,oBAAqB,CACjBA,QAAS,YACTO,cAAeb,EACfc,UAAWf,EAAKzC,cAAgB,mCAAqC,KACrE,oBAAqB,CACjByD,aAAc,UAI1B,CAACpD,EAAMM,YAAY+C,GAAG,OAAQ,CAC1B,qBAAsB,CAClBT,UAAW,sBACXU,OAAQ,MACRC,MAAO,OACPlE,SAAUoD,EAAgBpD,SAC1B,aAAc,CACVqD,UAAWD,EAAgBC,UAC3BC,QAAS,YAEb,oBAAqB,CACjBA,QAASF,EAAgBE,QACzBO,cAAeb,KAI9B"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ScopedCssBaselineProps } from '@mui/material';
|
|
3
|
-
import {
|
|
3
|
+
import { Theme } from '@mui/material/styles';
|
|
4
4
|
import './theme.extensions';
|
|
5
5
|
export type SkodaThemeProviderProps = {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Theme to be used
|
|
9
|
+
*/
|
|
10
|
+
theme?: Partial<Theme>;
|
|
11
|
+
/**
|
|
12
|
+
* Disable adding extra ScopedCssBaseline as CssBaseline is being used
|
|
13
|
+
*/
|
|
8
14
|
globalBaseline?: boolean;
|
|
9
15
|
} & ScopedCssBaselineProps;
|
|
10
16
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useMemo as i}from"react";import{ThemeProvider as e,ScopedCssBaseline as o}from"@mui/material";import{CacheProvider as m}from"@emotion/react";import l from"@emotion/cache";import{prefixer as n}from"stylis";import s from"stylis-plugin-rtl";import{theme as c}from"./theme.js";const a=a=>{var{children:p,theme:d=c,globalBaseline:h=!1}=a,f=r(a,["children","theme","globalBaseline"]);const g=i((()=>l(Object.assign({prepend:!0,key:"rtl"===d.direction?"rtl":"css"},"rtl"===d.direction?{stylisPlugins:[n,s]}:{}))),[d.direction]);return t(m,{value:g,children:t(e,{theme:d,children:h?p:t(o,Object.assign({},f,"rtl"===d.direction?{dir:"rtl"}:{},{children:p}))})})};export{a as SkodaThemeProvider};
|
|
2
2
|
//# sourceMappingURL=SkodaThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkodaThemeProvider.js","sources":["../../../src/design/skoda/SkodaThemeProvider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { ScopedCssBaseline,
|
|
1
|
+
{"version":3,"file":"SkodaThemeProvider.js","sources":["../../../src/design/skoda/SkodaThemeProvider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { ScopedCssBaseline, ThemeProvider } from '@mui/material';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport { prefixer } from 'stylis';\nimport rtlPlugin from 'stylis-plugin-rtl';\nimport { theme as skodaTheme } from './theme';\nimport './theme.extensions';\n/**\n * Wrapper of ThemeProvider that additionally provide Scoped CssBaseline\n */\nexport const SkodaThemeProvider = (_a) => {\n var { children, theme = skodaTheme, globalBaseline = false } = _a, rest = __rest(_a, [\"children\", \"theme\", \"globalBaseline\"]);\n const cache = useMemo(() => {\n return createCache(Object.assign({ \n // inject first\n prepend: true, \n // rtl/ltr cache\n key: theme.direction === 'rtl' ? 'rtl' : 'css' }, (theme.direction === 'rtl' ? { stylisPlugins: [prefixer, rtlPlugin] } : {})));\n }, [theme.direction]);\n return (_jsx(CacheProvider, { value: cache, children: _jsx(ThemeProvider, { theme: theme, children: globalBaseline ? (children) : (_jsx(ScopedCssBaseline, Object.assign({}, rest, (theme.direction === 'rtl' ? { dir: 'rtl' } : {}), { children: children }))) }) }));\n};\n//# sourceMappingURL=SkodaThemeProvider.js.map"],"names":["SkodaThemeProvider","_a","children","theme","skodaTheme","globalBaseline","rest","__rest","cache","useMemo","createCache","Object","assign","prepend","key","direction","stylisPlugins","prefixer","rtlPlugin","_jsx","CacheProvider","value","ThemeProvider","ScopedCssBaseline","dir"],"mappings":"+VAaY,MAACA,EAAsBC,IAC/B,IAAIC,SAAEA,EAAQC,MAAEA,EAAQC,EAAUC,eAAEA,GAAiB,GAAUJ,EAAIK,EAAOC,EAAON,EAAI,CAAC,WAAY,QAAS,mBAC3G,MAAMO,EAAQC,GAAQ,IACXC,EAAYC,OAAOC,OAAO,CAE7BC,SAAS,EAETC,IAAyB,QAApBX,EAAMY,UAAsB,MAAQ,OAA8B,QAApBZ,EAAMY,UAAsB,CAAEC,cAAe,CAACC,EAAUC,IAAe,CAAE,KACjI,CAACf,EAAMY,YACV,OAAQI,EAAKC,EAAe,CAAEC,MAAOb,EAAON,SAAUiB,EAAKG,EAAe,CAAEnB,MAAOA,EAAOD,SAAUG,EAAc,EAAiBc,EAAKI,EAAmBZ,OAAOC,OAAO,CAAA,EAAIN,EAA2B,QAApBH,EAAMY,UAAsB,CAAES,IAAK,OAAU,CAAE,EAAG,CAAEtB,SAAUA,QAAqB"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { SkodaThemeProviderProps } from './SkodaThemeProvider';
|
|
2
|
+
import { BoxProps, PaletteMode } from '@mui/material';
|
|
3
|
+
import { Direction } from '@mui/material/styles';
|
|
4
|
+
export type SkodaThemeWidgetProviderProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Theme overrides
|
|
7
|
+
*/
|
|
8
|
+
theme?: object;
|
|
9
|
+
/**
|
|
10
|
+
* Props passed to container
|
|
11
|
+
*/
|
|
12
|
+
containerProps?: BoxProps;
|
|
13
|
+
/**
|
|
14
|
+
* Options for Škoda theme generation
|
|
15
|
+
*/
|
|
16
|
+
skodaThemeOptions?: {
|
|
17
|
+
mode?: PaletteMode;
|
|
18
|
+
direction?: Direction;
|
|
19
|
+
};
|
|
20
|
+
} & Omit<SkodaThemeProviderProps, 'theme'>;
|
|
2
21
|
/**
|
|
3
22
|
* Alternative theme provider when the responsive style should be applied based on the container and not window
|
|
4
23
|
*/
|
|
5
|
-
export declare const SkodaThemeWidgetProvider: ({ theme, ...rest }:
|
|
24
|
+
export declare const SkodaThemeWidgetProvider: ({ theme, containerProps, skodaThemeOptions, ...rest }: SkodaThemeWidgetProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as e}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useMemo as n,useState as r,useEffect as i,useRef as o,useLayoutEffect as s,useCallback as m}from"react";import{SkodaThemeProvider as c}from"./SkodaThemeProvider.js";import{createSkodaTheme as a}from"./theme.js";import{flowBreakpoints as d}from"./theme.breakpoints.js";import{Box as p,debounce as u}from"@mui/material";import{createTheme as l}from"@mui/material/styles";import{createBreakpoints as h}from"@mui/system";const v=r=>{var{theme:i,containerProps:o,skodaThemeOptions:s}=r,m=e(r,["theme","containerProps","skodaThemeOptions"]);const d=o||{},{sx:u}=d,h=e(d,["sx"]),{containerBreakpoints:v,containerRef:f}=w(),b=n((()=>{const e=a({widget:!0,breakpointsOptions:v,mode:null==s?void 0:s.mode,direction:null==s?void 0:s.direction});return i?l(e,i):e}),[i,v]);return t(p,Object.assign({sx:Object.assign({containerType:"inline-size"},u||{}),ref:f},h,{children:t(c,Object.assign({},m,{theme:b}))}))},w=()=>{const e=n((()=>h(d)),[]),[t,c]=r(d),[a,p]=r(window.innerWidth);i((()=>{const e=()=>{p(window.innerWidth)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const l=o(null),[v,w]=r(0),f=n((()=>new window.ResizeObserver((e=>{w(e[0].contentRect.width||0)}))),[]);s((()=>((null==l?void 0:l.current)&&f.observe(l.current),()=>{f.disconnect()})),[null==l?void 0:l.current]);const b=m(((t,n)=>{const r=t-n,i=e.keys.reduce(((t,n)=>Object.assign(Object.assign({},t),{[n]:Math.round(100*(e.values[n]+r))/100})),{});c({values:i})}),[e]),j=n((()=>u(b,250)),[b]);return s((()=>{j(a,v)}),[a,v]),{containerBreakpoints:t,containerRef:l}};export{v as SkodaThemeWidgetProvider};
|
|
2
2
|
//# sourceMappingURL=SkodaThemeWidgetProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkodaThemeWidgetProvider.js","sources":["../../../src/design/skoda/SkodaThemeWidgetProvider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMemo } from 'react';\nimport { SkodaThemeProvider } from './SkodaThemeProvider';\nimport { createSkodaTheme } from './theme';\nimport { Box } from '@mui/material';\nimport { createTheme } from '@mui/material/styles';\n/**\n * Alternative theme provider when the responsive style should be applied based on the container and not window\n */\nexport const SkodaThemeWidgetProvider = (_a) => {\n var { theme } = _a, rest = __rest(_a, [\"theme\"]);\n const composedTheme = useMemo(() => {\n const containerTheme = createSkodaTheme({
|
|
1
|
+
{"version":3,"file":"SkodaThemeWidgetProvider.js","sources":["../../../src/design/skoda/SkodaThemeWidgetProvider.tsx"],"sourcesContent":["import { __rest } from \"tslib\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useMemo, useLayoutEffect, useCallback, useState, useEffect, useRef } from 'react';\nimport { SkodaThemeProvider } from './SkodaThemeProvider';\nimport { createSkodaTheme } from './theme';\nimport { flowBreakpoints } from './theme.breakpoints';\nimport { debounce, Box } from '@mui/material';\nimport { createTheme } from '@mui/material/styles';\nimport { createBreakpoints } from '@mui/system';\n/**\n * Alternative theme provider when the responsive style should be applied based on the container and not window\n */\nexport const SkodaThemeWidgetProvider = (_a) => {\n var { theme, containerProps, skodaThemeOptions } = _a, rest = __rest(_a, [\"theme\", \"containerProps\", \"skodaThemeOptions\"]);\n const _b = containerProps || {}, { sx: containerSx } = _b, rest_container = __rest(_b, [\"sx\"]);\n const { containerBreakpoints, containerRef } = useContainerBreakpoints();\n const composedTheme = useMemo(() => {\n const containerTheme = createSkodaTheme({\n widget: true,\n breakpointsOptions: containerBreakpoints,\n mode: skodaThemeOptions === null || skodaThemeOptions === void 0 ? void 0 : skodaThemeOptions.mode,\n direction: skodaThemeOptions === null || skodaThemeOptions === void 0 ? void 0 : skodaThemeOptions.direction,\n });\n // in case theme is provided, make composition\n if (theme) {\n return createTheme(containerTheme, theme);\n }\n return containerTheme;\n }, [theme, containerBreakpoints]);\n return (_jsx(Box, Object.assign({ sx: Object.assign({ containerType: 'inline-size' }, (containerSx || {})), ref: containerRef }, rest_container, { children: _jsx(SkodaThemeProvider, Object.assign({}, rest, { theme: composedTheme })) })));\n};\nconst useContainerBreakpoints = () => {\n const windowBreakpoints = useMemo(() => createBreakpoints(flowBreakpoints), []);\n const [containerBreakpoints, setContainerBreakpoints] = useState(flowBreakpoints);\n // monitor window width\n const [windowWidth, setWindowWidth] = useState(window.innerWidth);\n useEffect(() => {\n const windowResizeFn = () => {\n setWindowWidth(window.innerWidth);\n };\n window.addEventListener('resize', windowResizeFn);\n return () => {\n window.removeEventListener('resize', windowResizeFn);\n };\n }, []);\n // measure container size\n const containerRef = useRef(null);\n const [containerWidth, setContainerWidth] = useState(0);\n const observer = useMemo(() => new window.ResizeObserver((entries) => {\n setContainerWidth(entries[0].contentRect.width || 0);\n }), []);\n useLayoutEffect(() => {\n (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) && observer.observe(containerRef.current);\n return () => {\n observer.disconnect();\n };\n }, [containerRef === null || containerRef === void 0 ? void 0 : containerRef.current]);\n // generate container breakpoints\n const handleResize = useCallback((window, container) => {\n const difference = window - container;\n const newContainerBreakpoints = windowBreakpoints.keys.reduce((prev, curr) => (Object.assign(Object.assign({}, prev), { \n // round to two decimal places\n [curr]: Math.round((windowBreakpoints.values[curr] + difference) * 100) / 100 })), {});\n setContainerBreakpoints({ values: newContainerBreakpoints });\n }, [windowBreakpoints]);\n const debounceHandleResize = useMemo(() => debounce(handleResize, 250), [handleResize]);\n useLayoutEffect(() => {\n debounceHandleResize(windowWidth, containerWidth);\n }, [windowWidth, containerWidth]);\n return { containerBreakpoints, containerRef };\n};\n//# sourceMappingURL=SkodaThemeWidgetProvider.js.map"],"names":["SkodaThemeWidgetProvider","_a","theme","containerProps","skodaThemeOptions","rest","__rest","_b","sx","containerSx","rest_container","containerBreakpoints","containerRef","useContainerBreakpoints","composedTheme","useMemo","containerTheme","createSkodaTheme","widget","breakpointsOptions","mode","direction","createTheme","_jsx","Box","Object","assign","containerType","ref","children","SkodaThemeProvider","windowBreakpoints","createBreakpoints","flowBreakpoints","setContainerBreakpoints","useState","windowWidth","setWindowWidth","window","innerWidth","useEffect","windowResizeFn","addEventListener","removeEventListener","useRef","containerWidth","setContainerWidth","observer","ResizeObserver","entries","contentRect","width","useLayoutEffect","current","observe","disconnect","handleResize","useCallback","container","difference","newContainerBreakpoints","keys","reduce","prev","curr","Math","round","values","debounceHandleResize","debounce"],"mappings":"+eAYY,MAACA,EAA4BC,IACrC,IAAIC,MAAEA,EAAKC,eAAEA,EAAcC,kBAAEA,GAAsBH,EAAII,EAAOC,EAAOL,EAAI,CAAC,QAAS,iBAAkB,sBACrG,MAAMM,EAAKJ,GAAkB,IAAMK,GAAIC,GAAgBF,EAAIG,EAAiBJ,EAAOC,EAAI,CAAC,QAClFI,qBAAEA,EAAoBC,aAAEA,GAAiBC,IACzCC,EAAgBC,GAAQ,KAC1B,MAAMC,EAAiBC,EAAiB,CACpCC,QAAQ,EACRC,mBAAoBR,EACpBS,KAAMhB,aAA6D,EAASA,EAAkBgB,KAC9FC,UAAWjB,aAA6D,EAASA,EAAkBiB,YAGvG,OAAInB,EACOoB,EAAYN,EAAgBd,GAEhCc,CAAc,GACtB,CAACd,EAAOS,IACX,OAAQY,EAAKC,EAAKC,OAAOC,OAAO,CAAElB,GAAIiB,OAAOC,OA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|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import"../../../../components/accordion/accordion.js";import"../../../../components/backdrop/backdrop.js";import"../../../../components/button/button.js";import"tslib";import"@mui/material";import"../../theme.js";import"
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import"../../../../components/accordion/accordion.js";import"../../../../components/backdrop/backdrop.js";import"../../../../components/button/button.js";import"tslib";import"react";import"@mui/material";import"@emotion/react";import"@emotion/cache";import"stylis";import"stylis-plugin-rtl";import"../../theme.js";import"../../theme.breakpoints.js";import"@mui/material/styles";import"@mui/system";import"../../../../organisms/cardOwnedVehicle/cardOwnedVehicle.js";import"../../../../organisms/cardPhotoAdjustable/cardPhotoAdjustable.js";import"../../../../organisms/cardPhotoFixed/cardPhotoFixed.js";import"../../../../organisms/cardPromoVehicle/cardPromoVehicleComponent.js";import"../../../../organisms/common/styled/cardStandardWrapperStyled.js";import"../../../../organisms/cardTypeOnly/cardTypeOnly.js";import"embla-carousel-react";import"embla-carousel-class-names";import"embla-carousel-autoplay";import"../../../../organisms/carousel/styledComponents/styledCarouselHorizontal.js";import"../../../../organisms/carousel/styledComponents/styledCarouselVertical.js";import{Controller as t}from"../../../../components/controls/controls.js";import"../../../../components/numbering/numbering.js";import"../../../../utils/enum.js";import"../../../../organisms/heroImageCard/heroImageCard.js";import"@googlemaps/react-wrapper";import"@googlemaps/markerclusterer";import"../../../../organisms/maps/utils/mapIcons.js";import"../../../../organisms/maps/mapComponents/mapStyled.js";import"../../../../organisms/shortcutLink/shortcutLink.js";import"../../../../organisms/textCta/textCta.js";import"../../../../organisms/tile/tile.js";import"../../../../organisms/carousel2/galleryCarousel/galleryContext.js";import"../../../../organisms/carousel2/galleryCarousel/galleryItemContext.js";import"../../../../organisms/carousel2/heroCarousel/heroCarouselContext.js";import"../../../../organisms/notification/Notification.js";import"../../../../organisms/notification/NotificationCenter.js";import"../../../../layout/Header/HeaderContext.js";import"../../../../layout/Header/HeaderButton.js";import"../../../../layout/Header/HeaderNavigationHero.js";import"../../../../layout/Header/HeaderNavigationLink.js";import"../../../../layout/Header/HeaderNavigationMenu.js";import"../../../../layout/Header/PredefinedHeaderButtons.js";import"../../../../layout/Header/HeaderOverheadItem.js";import"../../../../organisms/gallery/Gallery.js";import"../../../../organisms/gallery/GalleryItem.js";import"../../../../components/icon/icon.definitions.js";import"../../../../layout/SideMenu/SideMenuItem.js";import"../../../../layout/Footer/PredefinedFooterIconButtons.js";import"../../../../layout/SecondaryNavigation/SecondaryNavigationCta.js";import"../../../../layout/SecondaryNavigation/SecondaryNavigationItem.js";import"@mui/material/Container";import"../../../../production/Button/Button.js";import"../../../../components/cardContainer/cardContainer.js";import"../../../../components/cardMenu/cardMenu.js";import"../../../../components/checkbox/checkbox.js";import"../../../../components/chip/chipImage/chipImage.js";import"../../../../components/chip/regular/chip.js";import"../../../../components/chip/chipMultiselect/multiSelectChip.js";import"../../../../components/chip/chipDropdownChildren/chipDropdownChildren.js";import"../../../../components/divider/divider.js";import"../../../../components/drawer/drawer.js";import"../../../../components/flag/flag.js";import"@mui/material/Grid";import"../../../../components/indicator/indicator.js";import"../../../../components/label/label.js";import"../../../../components/labelCO2/labelCO2.js";import"../../../../components/labelFeature/labelFeature.js";import"../../../../components/labelPromotional/labelPromotional.js";import"../../../../components/labelStatus/labelStatus.js";import"../../../../components/menu/menu.js";import"@mui/material/MenuItem";import"@mui/material/MobileStepper";import"../../../../components/mobileStepper/mobileStepperButton.js";import"../../../../components/modal/modal.js";import"../../../../components/modal/modalTitle.js";import"../../../../components/pagination/pagination.js";import"../../../../components/progressBar/progressBar.js";import"../../../../components/radioButton/radioButton.js";import"../../../../components/selectInput/selectInput.js";import"../../../../components/slider/slider.js";import"../../../../components/snackbar/snackbar.js";import"../../../../components/stepper/stepper.js";import"../../../../components/textArea/textArea.js";import"../../../../components/common/styled/textFieldStyled.js";import"../../../../components/helperTextContent/index.js";import"../../../../components/toggleSwitch/toggleSwitch.js";import"../../../../components/avatar/Avatar.js";import"../../../../components/iconButton/index.js";import"../../../../components/alert/AlertButton.js";import"minimatch";const e={defaultProps:{expandIcon:o(t,{controlType:"plus"})},styleOverrides:{}};export{e as flowAccordionSummary};
|
|
2
2
|
//# sourceMappingURL=accordionSummary.theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordionSummary.theme.js","sources":["../../../../../src/design/skoda/components/accordion/accordionSummary.theme.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Controller } from '@/src/components';\nexport const flowAccordionSummary = {\n defaultProps: {\n expandIcon: _jsx(Controller, { controlType: \"plus\" }),\n },\n styleOverrides: {},\n};\n//# sourceMappingURL=accordionSummary.theme.js.map"],"names":["flowAccordionSummary","defaultProps","expandIcon","_jsx","Controller","controlType","styleOverrides"],"mappings":"
|
|
1
|
+
{"version":3,"file":"accordionSummary.theme.js","sources":["../../../../../src/design/skoda/components/accordion/accordionSummary.theme.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Controller } from '@/src/components';\nexport const flowAccordionSummary = {\n defaultProps: {\n expandIcon: _jsx(Controller, { controlType: \"plus\" }),\n },\n styleOverrides: {},\n};\n//# sourceMappingURL=accordionSummary.theme.js.map"],"names":["flowAccordionSummary","defaultProps","expandIcon","_jsx","Controller","controlType","styleOverrides"],"mappings":"8yJAEY,MAACA,EAAuB,CAChCC,aAAc,CACVC,WAAYC,EAAKC,EAAY,CAAEC,YAAa,UAEhDC,eAAgB,CAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import"../../../components/accordion/accordion.js";import"../../../components/backdrop/backdrop.js";import"../../../components/button/button.js";import"tslib";import"@mui/material";import"../theme.js";import"
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import"../../../components/accordion/accordion.js";import"../../../components/backdrop/backdrop.js";import"../../../components/button/button.js";import"tslib";import"react";import"@mui/material";import"@emotion/react";import"@emotion/cache";import"stylis";import"stylis-plugin-rtl";import"../theme.js";import"../theme.breakpoints.js";import"@mui/material/styles";import"@mui/system";import"../../../organisms/cardOwnedVehicle/cardOwnedVehicle.js";import"../../../organisms/cardPhotoAdjustable/cardPhotoAdjustable.js";import"../../../organisms/cardPhotoFixed/cardPhotoFixed.js";import"../../../organisms/cardPromoVehicle/cardPromoVehicleComponent.js";import"../../../organisms/common/styled/cardStandardWrapperStyled.js";import"../../../organisms/cardTypeOnly/cardTypeOnly.js";import"embla-carousel-react";import"embla-carousel-class-names";import"embla-carousel-autoplay";import"../../../organisms/carousel/styledComponents/styledCarouselHorizontal.js";import"../../../organisms/carousel/styledComponents/styledCarouselVertical.js";import"../../../components/controls/controls.js";import"../../../components/numbering/numbering.js";import"../../../utils/enum.js";import"../../../organisms/heroImageCard/heroImageCard.js";import"@googlemaps/react-wrapper";import"@googlemaps/markerclusterer";import"../../../organisms/maps/utils/mapIcons.js";import"../../../organisms/maps/mapComponents/mapStyled.js";import"../../../organisms/shortcutLink/shortcutLink.js";import"../../../organisms/textCta/textCta.js";import"../../../organisms/tile/tile.js";import"../../../organisms/carousel2/galleryCarousel/galleryContext.js";import"../../../organisms/carousel2/galleryCarousel/galleryItemContext.js";import"../../../organisms/carousel2/heroCarousel/heroCarouselContext.js";import"../../../organisms/notification/Notification.js";import"../../../organisms/notification/NotificationCenter.js";import"../../../layout/Header/HeaderContext.js";import"../../../layout/Header/HeaderButton.js";import"../../../layout/Header/HeaderNavigationHero.js";import"../../../layout/Header/HeaderNavigationLink.js";import"../../../layout/Header/HeaderNavigationMenu.js";import"../../../layout/Header/PredefinedHeaderButtons.js";import"../../../layout/Header/HeaderOverheadItem.js";import"../../../organisms/gallery/Gallery.js";import"../../../organisms/gallery/GalleryItem.js";import{Icon as t}from"../../../components/icon/icon.js";import"../../../components/icon/icon.definitions.js";import"../../../layout/SideMenu/SideMenuItem.js";import"../../../layout/Footer/PredefinedFooterIconButtons.js";import"../../../layout/SecondaryNavigation/SecondaryNavigationCta.js";import"../../../layout/SecondaryNavigation/SecondaryNavigationItem.js";import"@mui/material/Container";import"../../../production/Button/Button.js";import"../../../components/cardContainer/cardContainer.js";import"../../../components/cardMenu/cardMenu.js";import"../../../components/checkbox/checkbox.js";import"../../../components/chip/chipImage/chipImage.js";import"../../../components/chip/regular/chip.js";import"../../../components/chip/chipMultiselect/multiSelectChip.js";import"../../../components/chip/chipDropdownChildren/chipDropdownChildren.js";import"../../../components/divider/divider.js";import"../../../components/drawer/drawer.js";import"../../../components/flag/flag.js";import"@mui/material/Grid";import"../../../components/indicator/indicator.js";import"../../../components/label/label.js";import"../../../components/labelCO2/labelCO2.js";import"../../../components/labelFeature/labelFeature.js";import"../../../components/labelPromotional/labelPromotional.js";import"../../../components/labelStatus/labelStatus.js";import"../../../components/menu/menu.js";import"@mui/material/MenuItem";import"@mui/material/MobileStepper";import"../../../components/mobileStepper/mobileStepperButton.js";import"../../../components/modal/modal.js";import"../../../components/modal/modalTitle.js";import"../../../components/pagination/pagination.js";import"../../../components/progressBar/progressBar.js";import"../../../components/radioButton/radioButton.js";import"../../../components/selectInput/selectInput.js";import"../../../components/slider/slider.js";import"../../../components/snackbar/snackbar.js";import"../../../components/stepper/stepper.js";import"../../../components/textArea/textArea.js";import"../../../components/common/styled/textFieldStyled.js";import"../../../components/helperTextContent/index.js";import"../../../components/toggleSwitch/toggleSwitch.js";import"../../../components/avatar/Avatar.js";import"../../../components/iconButton/index.js";import"../../../components/alert/AlertButton.js";import"minimatch";const e={defaultProps:{popupIcon:o(t,{name:"chevron-down"}),clearIcon:o(t,{name:"close"}),disableClearable:!0,componentsProps:{popupIndicator:{disableRipple:!0,disableFocusRipple:!0,size:"small"},clearIndicator:{disableRipple:!0,disableFocusRipple:!0,size:"small"}}},styleOverrides:{root:()=>({"& .MuiFilledInput-root":{paddingBottom:7,paddingTop:23},"& .MuiFilledInput-root .MuiFilledInput-input":{paddingTop:0,paddingBottom:0,height:26,boxSizing:"border-box"},"& .MuiFilledInput-root.MuiInputBase-sizeSmall":{paddingBottom:3,paddingTop:23},"& .MuiFilledInput-root.MuiInputBase-sizeSmall .MuiFilledInput-input":{paddingTop:0,paddingBottom:0},"& .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall":{paddingTop:12,paddingBottom:14},"& .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall .MuiAutocomplete-input":{paddingTop:0,paddingBottom:0},"& .MuiFilledInput-root.MuiInputBase-hiddenLabel":{paddingTop:17,paddingBottom:13},"& .MuiFilledInput-root.MuiInputBase-hiddenLabel .MuiAutocomplete-input":{paddingTop:0,paddingBottom:0}}),endAdornment:{top:"50%",transform:"translateY(-50%)"},popupIndicator:{padding:0,marginRight:0},clearIndicator:{padding:0,marginRight:0},listbox:({theme:o})=>({maxHeight:240,overflow:"overlay",padding:0,"& .MuiAutocomplete-option":{minHeight:"48px"},'& .MuiAutocomplete-option[aria-selected="true"]':{background:"unset","&:hover":{background:o.palette.surface.primary}},'& .MuiAutocomplete-option[aria-selected="true"].Mui-focused':{background:"unset","&:hover":{background:o.palette.surface.primary}},"& .MuiAutocomplete-option.Mui-focused":{background:"unset","&:hover":{background:o.palette.surface.primary}}}),option:({theme:o})=>({fontSize:"16px",lineHeight:"24px",color:o.palette.onSurface.os900,fontWeight:"500",paddingRight:"16px",minHeight:"48px",backgroundColor:"unset","&:hover":{background:o.palette.surface.primary}}),tag:{marginTop:0,marginBottom:0,height:26,display:"inline-flex",alignItems:"center","&.MuiChip-colorDefault":{background:"transparent"},"& .MuiChip-label":{display:"inline",paddingLeft:0,paddingRight:7},"& .MuiChip-deleteIcon":{marginRight:2}}}};export{e as flowAutocomplete};
|
|
2
2
|
//# sourceMappingURL=autocomplete.theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.theme.js","sources":["../../../../src/design/skoda/components/autocomplete.theme.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Icon } from '../../../components';\nexport const flowAutocomplete = {\n defaultProps: {\n popupIcon: _jsx(Icon, { name: \"chevron-down\" }),\n clearIcon: _jsx(Icon, { name: \"close\" }),\n disableClearable: true,\n componentsProps: {\n popupIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n size: 'small',\n },\n clearIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n size: 'small',\n },\n },\n },\n styleOverrides: {\n root: () => ({\n '& .MuiFilledInput-root': {\n paddingBottom: 7,\n paddingTop: 23,\n },\n '& .MuiFilledInput-root .MuiFilledInput-input': {\n paddingTop: 0,\n paddingBottom: 0,\n height: 26,\n boxSizing: 'border-box',\n },\n '& .MuiFilledInput-root.MuiInputBase-sizeSmall': {\n paddingBottom: 3,\n paddingTop: 23,\n },\n '& .MuiFilledInput-root.MuiInputBase-sizeSmall .MuiFilledInput-input': {\n paddingTop: 0,\n paddingBottom: 0,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall': {\n paddingTop: 12,\n paddingBottom: 14,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall .MuiAutocomplete-input': {\n paddingTop: 0,\n paddingBottom: 0,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel': {\n paddingTop: 17,\n paddingBottom: 13,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel .MuiAutocomplete-input': {\n paddingTop: 0,\n paddingBottom: 0,\n },\n }),\n endAdornment: {\n top: '50%',\n transform: 'translateY(-50%)',\n },\n popupIndicator: {\n padding: 0,\n marginRight: 0,\n },\n clearIndicator: {\n padding: 0,\n marginRight: 0,\n },\n listbox: ({ theme }) => ({\n maxHeight: 240,\n overflow: 'overlay',\n padding: 0,\n '& .MuiAutocomplete-option': {\n minHeight: '48px',\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n background: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"].Mui-focused': {\n background: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n },\n '& .MuiAutocomplete-option.Mui-focused': {\n background: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n },\n }),\n option: ({ theme }) => ({\n fontSize: '16px',\n lineHeight: '24px',\n color: theme.palette.onSurface.os900,\n fontWeight: '500',\n paddingRight: '16px',\n minHeight: '48px',\n backgroundColor: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n }),\n tag: {\n marginTop: 0,\n marginBottom: 0,\n height: 26,\n display: 'inline-flex',\n alignItems: 'center',\n '&.MuiChip-colorDefault': {\n background: 'transparent',\n },\n '& .MuiChip-label': {\n display: 'inline',\n paddingLeft: 0,\n paddingRight: 7,\n },\n '& .MuiChip-deleteIcon': {\n marginRight: 2,\n },\n },\n },\n};\n//# sourceMappingURL=autocomplete.theme.js.map"],"names":["flowAutocomplete","defaultProps","popupIcon","_jsx","Icon","name","clearIcon","disableClearable","componentsProps","popupIndicator","disableRipple","disableFocusRipple","size","clearIndicator","styleOverrides","root","paddingBottom","paddingTop","height","boxSizing","endAdornment","top","transform","padding","marginRight","listbox","theme","maxHeight","overflow","minHeight","background","palette","surface","primary","option","fontSize","lineHeight","color","onSurface","os900","fontWeight","paddingRight","backgroundColor","tag","marginTop","marginBottom","display","alignItems","paddingLeft"],"mappings":"
|
|
1
|
+
{"version":3,"file":"autocomplete.theme.js","sources":["../../../../src/design/skoda/components/autocomplete.theme.tsx"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { Icon } from '../../../components';\nexport const flowAutocomplete = {\n defaultProps: {\n popupIcon: _jsx(Icon, { name: \"chevron-down\" }),\n clearIcon: _jsx(Icon, { name: \"close\" }),\n disableClearable: true,\n componentsProps: {\n popupIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n size: 'small',\n },\n clearIndicator: {\n disableRipple: true,\n disableFocusRipple: true,\n size: 'small',\n },\n },\n },\n styleOverrides: {\n root: () => ({\n '& .MuiFilledInput-root': {\n paddingBottom: 7,\n paddingTop: 23,\n },\n '& .MuiFilledInput-root .MuiFilledInput-input': {\n paddingTop: 0,\n paddingBottom: 0,\n height: 26,\n boxSizing: 'border-box',\n },\n '& .MuiFilledInput-root.MuiInputBase-sizeSmall': {\n paddingBottom: 3,\n paddingTop: 23,\n },\n '& .MuiFilledInput-root.MuiInputBase-sizeSmall .MuiFilledInput-input': {\n paddingTop: 0,\n paddingBottom: 0,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall': {\n paddingTop: 12,\n paddingBottom: 14,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel.MuiInputBase-sizeSmall .MuiAutocomplete-input': {\n paddingTop: 0,\n paddingBottom: 0,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel': {\n paddingTop: 17,\n paddingBottom: 13,\n },\n '& .MuiFilledInput-root.MuiInputBase-hiddenLabel .MuiAutocomplete-input': {\n paddingTop: 0,\n paddingBottom: 0,\n },\n }),\n endAdornment: {\n top: '50%',\n transform: 'translateY(-50%)',\n },\n popupIndicator: {\n padding: 0,\n marginRight: 0,\n },\n clearIndicator: {\n padding: 0,\n marginRight: 0,\n },\n listbox: ({ theme }) => ({\n maxHeight: 240,\n overflow: 'overlay',\n padding: 0,\n '& .MuiAutocomplete-option': {\n minHeight: '48px',\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n background: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"].Mui-focused': {\n background: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n },\n '& .MuiAutocomplete-option.Mui-focused': {\n background: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n },\n }),\n option: ({ theme }) => ({\n fontSize: '16px',\n lineHeight: '24px',\n color: theme.palette.onSurface.os900,\n fontWeight: '500',\n paddingRight: '16px',\n minHeight: '48px',\n backgroundColor: 'unset',\n '&:hover': {\n background: theme.palette.surface.primary,\n },\n }),\n tag: {\n marginTop: 0,\n marginBottom: 0,\n height: 26,\n display: 'inline-flex',\n alignItems: 'center',\n '&.MuiChip-colorDefault': {\n background: 'transparent',\n },\n '& .MuiChip-label': {\n display: 'inline',\n paddingLeft: 0,\n paddingRight: 7,\n },\n '& .MuiChip-deleteIcon': {\n marginRight: 2,\n },\n },\n },\n};\n//# sourceMappingURL=autocomplete.theme.js.map"],"names":["flowAutocomplete","defaultProps","popupIcon","_jsx","Icon","name","clearIcon","disableClearable","componentsProps","popupIndicator","disableRipple","disableFocusRipple","size","clearIndicator","styleOverrides","root","paddingBottom","paddingTop","height","boxSizing","endAdornment","top","transform","padding","marginRight","listbox","theme","maxHeight","overflow","minHeight","background","palette","surface","primary","option","fontSize","lineHeight","color","onSurface","os900","fontWeight","paddingRight","backgroundColor","tag","marginTop","marginBottom","display","alignItems","paddingLeft"],"mappings":"6mJAEY,MAACA,EAAmB,CAC5BC,aAAc,CACVC,UAAWC,EAAKC,EAAM,CAAEC,KAAM,iBAC9BC,UAAWH,EAAKC,EAAM,CAAEC,KAAM,UAC9BE,kBAAkB,EAClBC,gBAAiB,CACbC,eAAgB,CACZC,eAAe,EACfC,oBAAoB,EACpBC,KAAM,SAEVC,eAAgB,CACZH,eAAe,EACfC,oBAAoB,EACpBC,KAAM,WAIlBE,eAAgB,CACZC,KAAM,KAAO,CACT,yBAA0B,CACtBC,cAAe,EACfC,WAAY,IAEhB,+CAAgD,CAC5CA,WAAY,EACZD,cAAe,EACfE,OAAQ,GACRC,UAAW,cAEf,gDAAiD,CAC7CH,cAAe,EACfC,WAAY,IAEhB,sEAAuE,CACnEA,WAAY,EACZD,cAAe,GAEnB,yEAA0E,CACtEC,WAAY,GACZD,cAAe,IAEnB,gGAAiG,CAC7FC,WAAY,EACZD,cAAe,GAEnB,kDAAmD,CAC/CC,WAAY,GACZD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