@skodaflow/web-library 8.3.1 → 8.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/header/Header.d.ts +16 -2
- package/cjs/components/header/Header.js +1 -1
- package/cjs/components/header/Header.js.map +1 -1
- package/cjs/components/header/HeaderButton.d.ts +1 -0
- package/cjs/components/header/HeaderButton.js +1 -1
- package/cjs/components/header/HeaderButton.js.map +1 -1
- package/cjs/components/header/HeaderContext.d.ts +22 -0
- package/cjs/components/header/HeaderContext.js +2 -0
- package/cjs/components/header/HeaderContext.js.map +1 -0
- package/cjs/components/header/HeaderLanguageSelect.js.map +1 -1
- package/cjs/components/header/HeaderLogo.js +1 -1
- package/cjs/components/header/HeaderLogo.js.map +1 -1
- package/cjs/components/header/HeaderNavigationHero.js +1 -1
- package/cjs/components/header/HeaderNavigationHero.js.map +1 -1
- package/cjs/components/header/HeaderNavigationLink.d.ts +1 -0
- package/cjs/components/header/HeaderNavigationLink.js +1 -1
- package/cjs/components/header/HeaderNavigationLink.js.map +1 -1
- package/cjs/components/header/HeaderNavigationMenu.js +1 -1
- package/cjs/components/header/HeaderNavigationMenu.js.map +1 -1
- package/cjs/components/header/index.d.ts +1 -0
- package/cjs/components/secondaryNavigation/SecondaryNavigationCta.js +1 -1
- package/cjs/components/secondaryNavigation/SecondaryNavigationCta.js.map +1 -1
- package/cjs/index.js +1 -1
- package/cjs/materialui/autocomplete/autocomplete.theme.js +1 -1
- package/cjs/materialui/autocomplete/autocomplete.theme.js.map +1 -1
- package/cjs/materialui/button/button.theme.js.map +1 -1
- package/cjs/materialui/tabs/tabs.theme.js +1 -1
- package/cjs/materialui/tabs/tabs.theme.js.map +1 -1
- package/cjs/materialui/textfield/inputLabel.theme.js +1 -1
- package/cjs/materialui/textfield/inputLabel.theme.js.map +1 -1
- package/components/header/Header.d.ts +16 -2
- package/components/header/Header.js +1 -1
- package/components/header/Header.js.map +1 -1
- package/components/header/HeaderButton.d.ts +1 -0
- package/components/header/HeaderButton.js +1 -1
- package/components/header/HeaderButton.js.map +1 -1
- package/components/header/HeaderContext.d.ts +22 -0
- package/components/header/HeaderContext.js +2 -0
- package/components/header/HeaderContext.js.map +1 -0
- package/components/header/HeaderLanguageSelect.js.map +1 -1
- package/components/header/HeaderLogo.js +1 -1
- package/components/header/HeaderLogo.js.map +1 -1
- package/components/header/HeaderNavigationHero.js +1 -1
- package/components/header/HeaderNavigationHero.js.map +1 -1
- package/components/header/HeaderNavigationLink.d.ts +1 -0
- package/components/header/HeaderNavigationLink.js +1 -1
- package/components/header/HeaderNavigationLink.js.map +1 -1
- package/components/header/HeaderNavigationMenu.js +1 -1
- package/components/header/HeaderNavigationMenu.js.map +1 -1
- package/components/header/index.d.ts +1 -0
- package/components/secondaryNavigation/SecondaryNavigationCta.js +1 -1
- package/components/secondaryNavigation/SecondaryNavigationCta.js.map +1 -1
- package/index.js +1 -1
- package/materialui/autocomplete/autocomplete.theme.js +1 -1
- package/materialui/autocomplete/autocomplete.theme.js.map +1 -1
- package/materialui/button/button.theme.js.map +1 -1
- package/materialui/tabs/tabs.theme.js +1 -1
- package/materialui/tabs/tabs.theme.js.map +1 -1
- package/materialui/textfield/inputLabel.theme.js +1 -1
- package/materialui/textfield/inputLabel.theme.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.theme.js","sources":["../../../src/materialui/button/button.theme.ts"],"sourcesContent":["import { Components } from '@mui/material/styles';\nimport { Theme } from '@mui/material';\nimport { getFocusRingStyle, updateFocusRingStyle } from '@/src/components/focusring/focusring';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\n\nexport const flowButton: Components<Theme>['MuiButton'] = {\n defaultProps: {\n disableRipple: true,\n disableElevation: true,\n variant: 'contained',\n },\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n position: 'relative',\n boxShadow: 'none',\n textRendering: 'geometricPrecision',\n outline: 'none',\n minWidth: '44px',\n padding: '14px 24px',\n flexShrink: '0',\n // font\n ...theme.typography.button,\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // make sure not to increase size of the Button due to padding\n marginTop: '-2px',\n marginBottom: '-2px',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '20px',\n },\n // spinner inside\n '& .FlowSpinner-root': {\n marginTop: '-2px',\n marginBottom: '-2px',\n },\n },\n ...(ownerState.size === 'small' && {\n padding: '8px 14px',\n fontSize: '14px',\n lineHeight: '16px',\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // make sure not to increase size of the Button due to padding\n marginTop: '-2px',\n marginBottom: '-2px',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n },\n },\n }),\n ...(ownerState.size === 'large' && {\n padding: '15px 25px',\n fontSize: '18px',\n lineHeight: '20px',\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // make sure not to increase size of the Button due to padding\n marginTop: '-2px',\n marginBottom: '-2px',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '22px',\n },\n },\n }),\n backgroundClip: 'padding-box',\n transition:\n 'transform 0.3s ease-out, color 0.3s ease-out, background-color 0.3s ease-out, border-color 0.3s ease-out, box-shadow 0.3s ease-out, opacity 0.3s ease-out',\n // 50% border radius without skewing ratio\n borderRadius: '1000px',\n '&:hover': {\n boxShadow: 'none',\n },\n '&&:active': {\n boxShadow: 'none',\n },\n // focused style\n ...getFocusRingStyle(theme),\n // disabled style\n '&.Mui-disabled': {\n opacity: '1',\n },\n }),\n startIcon: ({ ownerState }) => ({\n flexShrink: '0',\n // space between text and icon\n marginRight: '10px',\n marginLeft: '0',\n ...(ownerState.size === 'small' && {\n marginRight: '5px',\n }),\n ...(ownerState.size === 'large' && {\n marginRight: '15px',\n }),\n }),\n endIcon: ({ ownerState }) => ({\n flexShrink: '0',\n // space between text and icon\n marginRight: '0',\n marginLeft: '10px',\n ...(ownerState.size === 'small' && {\n marginLeft: '5px',\n }),\n ...(ownerState.size === 'large' && {\n marginLeft: '15px',\n }),\n }),\n contained: ({ theme, ownerState }) => ({\n ...((ownerState.color === 'primary' || ownerState.color === 'success') && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.brand.secondary,\n color: theme.palette.onSurface.os900,\n },\n {\n backgroundColor: theme.palette.brandHover.secondary,\n color: theme.palette.onSurface.os900,\n },\n ),\n }),\n ...(ownerState.color === 'secondary' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.onSurface.os600,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'white' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.transparent.tertiary,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'error' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.error.dark,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n // deprecated semantic colors, used by Production team\n ...(ownerState.color === 'warning' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.warning.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.warning.dark,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'info' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.info.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.info.dark,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'inherit' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: 'currentColor',\n },\n {\n backgroundColor: theme.palette.surface.primary,\n },\n ),\n }),\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n backgroundColor: theme.palette.disabled.secondary,\n ...(theme.palette.mode === 'dark' && {\n backgroundColor: theme.palette.onSurface.os800,\n }),\n },\n }),\n text: ({ theme, ownerState }) => ({\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n },\n {\n backgroundColor: ['white', 'inherit'].includes(ownerState.color)\n ? theme.palette.transparent.tertiary\n : theme.palette.transparent.secondary,\n },\n ),\n ...((ownerState.color === 'primary' || ownerState.color === 'success') && {\n color: theme.palette.brand.secondary,\n }),\n ...(ownerState.color === 'secondary' && {\n color: theme.palette.text.primary,\n }),\n ...(ownerState.color === 'white' && {\n color: theme.palette.onSurface.os0,\n }),\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.primary,\n },\n }),\n outlined: ({ theme, ownerState }) => ({\n '&, &:hover, &.Mui-disabled': {\n borderWidth: '2px',\n },\n ...updateFocusRingStyle(2),\n borderStyle: 'solid',\n // remove 2px border from each side and move focusRing\n padding: '12px 22px',\n ...(ownerState.size === 'small' && {\n '&, &:hover, &.Mui-disabled': {\n borderWidth: '1px',\n },\n ...updateFocusRingStyle(1),\n padding: '7px 13px',\n }),\n ...(ownerState.size === 'large' && {\n padding: '13px 23px',\n }),\n // electric green variant\n ...((ownerState.color === 'primary' || ownerState.color === 'success') && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.brand.secondary,\n borderColor: theme.palette.brand.secondary,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.brand.secondary,\n },\n ),\n }),\n // secondary used as text color\n ...(ownerState.color === 'secondary' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.text.primary,\n borderColor: theme.palette.text.primary,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.text.primary,\n },\n ),\n }),\n ...(ownerState.color === 'white' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.onSurface.os0,\n borderColor: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.transparent.tertiary,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'error' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.error.main,\n borderColor: theme.palette.error.main,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.error.main,\n },\n ),\n }),\n // deprecated semantic colors\n ...(ownerState.color === 'warning' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.warning.main,\n borderColor: theme.palette.warning.main,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.warning.main,\n },\n ),\n }),\n ...(ownerState.color === 'info' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.info.main,\n borderColor: theme.palette.info.main,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.info.main,\n },\n ),\n }),\n ...(ownerState.color === 'inherit' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: 'currentColor',\n borderColor: 'currentColor',\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n },\n ),\n }),\n // disabled style\n '&.Mui-disabled': {\n borderColor: theme.palette.disabled.primary,\n color: theme.palette.disabled.primary,\n },\n }),\n },\n variants: [\n {\n props: { color: 'surface' },\n style: ({ theme }) => ({\n border: `1px solid ${theme.palette.mode === 'dark' ? theme.palette.transparent.quarternary : theme.palette.onSurface.os100}`,\n ...updateFocusRingStyle(1),\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.surface.primary,\n color: theme.palette.text.primary,\n },\n {\n backgroundColor: theme.palette.surface.secondary,\n color: theme.palette.text.primary,\n },\n ),\n // disabled style\n '&.Mui-disabled': {\n backgroundColor: theme.palette.surface.secondary,\n borderColor: theme.palette.surface.secondary,\n color: theme.palette.disabled.primary,\n },\n }),\n },\n {\n props: { variant: 'contained', color: 'surface' },\n style: () => ({\n // remove 1px border from each side\n padding: '13px 23px',\n }),\n },\n {\n props: { variant: 'contained', color: 'surface', size: 'small' },\n style: () => ({\n // remove 1px border from each side\n padding: '7px 13px',\n }),\n },\n {\n props: { variant: 'contained', color: 'surface', size: 'large' },\n style: () => ({\n // remove 1px border from each side\n padding: '14px 24px',\n }),\n },\n {\n props: { variant: 'outlined', color: 'surface' },\n style: () => ({\n borderWidth: 2,\n ...updateFocusRingStyle(2),\n }),\n },\n {\n props: { variant: 'text', color: 'surface' },\n style: () => ({\n borderWidth: 0,\n backgroundColor: 'transparent',\n ...updateFocusRingStyle(),\n }),\n },\n {\n props: { variant: 'navigation' },\n style: ({ theme }) => ({\n padding: '0',\n fontSize: '14px',\n borderRadius: '2px',\n letterSpacing: '0.02em',\n fontWeight: '400',\n lineHeight: '20px',\n '& .MuiButton-icon': {\n transition: 'transform 0.3s ease-out',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n },\n },\n '& .MuiButton-startIcon': {\n marginRight: '6px',\n },\n '& .MuiButton-endIcon': {\n marginLeft: '6px',\n },\n // prepare pseudo-element for focus effect\n '&::before': {\n inset: '-4px -8px',\n },\n // same style is used in the quickLink interactive effect\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os0 : theme.palette.onSurface.os900,\n '& .MuiButton-startIcon': {\n transform: 'translateX(0px)',\n },\n '& .MuiButton-endIcon': {\n transform: 'translateX(0px)',\n },\n },\n {\n backgroundColor: 'transparent',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n '& .MuiButton-startIcon': {\n transform: 'translateX(-8px)',\n },\n '& .MuiButton-endIcon': {\n transform: 'translateX(8px)',\n },\n },\n ),\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n }),\n },\n {\n props: { variant: 'navigation', color: 'primary' },\n style: ({ theme }) => ({\n ...getInteractiveStyle(\n {\n color: theme.palette.primary.main,\n },\n {\n color: theme.palette.brandHover.primary,\n },\n ),\n }),\n },\n {\n props: { variant: 'navigation', color: 'surface' },\n style: {\n border: 'none',\n '&&::before': {\n inset: '-4px -8px',\n },\n },\n },\n {\n props: { variant: 'navigation', color: 'white' },\n style: ({ theme }) => ({\n ...getInteractiveStyle(\n {\n color: theme.palette.onSurface.os0,\n },\n {\n color: theme.palette.onSurface.os300,\n },\n ),\n }),\n },\n {\n props: { variant: 'navigation', color: 'error' },\n style: ({ theme }) => ({\n ...getInteractiveStyle(\n {\n color: theme.palette.error.main,\n },\n {\n color: theme.palette.error.dark,\n },\n ),\n }),\n },\n {\n props: { variant: 'shortcut' },\n style: ({ theme }) => ({\n // adjust proportions\n borderRadius: '3px',\n padding: '2px 8px',\n // font\n textAlign: 'left',\n fontWeight: '300',\n fontSize: '16px',\n lineHeight: '24px',\n letterSpacing: '0.02em',\n '&&': {\n textDecoration: 'underline',\n textDecorationColor: 'currentColor',\n textDecorationThickness: '1px',\n textUnderlineOffset: '2px',\n },\n // startIcon / endIcon\n '&& .MuiButton-icon': {\n transition: 'transform 0.3s ease-out',\n },\n // style\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.text.primary,\n '& .MuiButton-icon': {\n transform: 'scale(1.0)',\n },\n },\n {\n backgroundColor: 'transparent',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n '& .MuiButton-icon': {\n transform: 'scale(1.1)',\n },\n },\n ),\n // responsive scale\n [theme.breakpoints.down('md')]: {\n fontSize: '14px',\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '18px',\n },\n },\n },\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n }),\n },\n {\n props: { variant: 'shortcut', fullWidth: true },\n style: {\n // move content to left side from the center\n justifyContent: 'flex-start',\n textAlign: 'left',\n },\n },\n {\n props: { variant: 'shortcut', color: 'inherit' },\n style: {\n ...getInteractiveStyle(\n {\n color: 'currentColor',\n },\n {\n color: 'currentColor',\n },\n ),\n },\n },\n ],\n};\n"],"names":["flowButton","defaultProps","disableRipple","disableElevation","variant","styleOverrides","root","theme","ownerState","position","boxShadow","textRendering","outline","minWidth","padding","flexShrink","typography","button","marginTop","marginBottom","fontSize","size","lineHeight","backgroundClip","transition","borderRadius","getFocusRingStyle","opacity","startIcon","marginRight","marginLeft","endIcon","contained","color","getInteractiveStyle","backgroundColor","palette","brand","secondary","onSurface","os900","brandHover","main","os0","os600","transparent","tertiary","error","dark","warning","info","surface","primary","disabled","mode","os800","text","includes","outlined","borderWidth","updateFocusRingStyle","borderStyle","borderColor","variants","props","style","border","quarternary","os100","letterSpacing","fontWeight","inset","transform","os300","os700","textAlign","textDecoration","textDecorationColor","textDecorationThickness","textUnderlineOffset","breakpoints","down","fullWidth","justifyContent"],"mappings":"6JAKO,MAAMA,EAA6C,CACxDC,aAAc,CACZC,eAAe,EACfC,kBAAkB,EAClBC,QAAS,aAEXC,eAAgB,CACdC,KAAM,EAAGC,QAAOC,iBAAY,CAC1BC,SAAU,WACVC,UAAW,OACXC,cAAe,qBACfC,QAAS,OACTC,SAAU,OACVC,QAAS,YACTC,WAAY,OAETR,EAAMS,WAAWC,OAEpB,oBAAqB,CAEnBC,UAAW,OACXC,aAAc,OAEd,qBAAsB,CACpBC,SAAU,QAGZ,sBAAuB,CACrBF,UAAW,OACXC,aAAc,YAGM,UAApBX,EAAWa,MAAoB,CACjCP,QAAS,WACTM,SAAU,OACVE,WAAY,OAEZ,oBAAqB,CAEnBJ,UAAW,OACXC,aAAc,OAEd,qBAAsB,CACpBC,SAAU,aAIQ,UAApBZ,EAAWa,MAAoB,CACjCP,QAAS,YACTM,SAAU,OACVE,WAAY,OAEZ,oBAAqB,CAEnBJ,UAAW,OACXC,aAAc,OAEd,qBAAsB,CACpBC,SAAU,UAIhBG,eAAgB,cAChBC,WACE,4JAEFC,aAAc,SACd,UAAW,CACTf,UAAW,QAEb,YAAa,CACXA,UAAW,W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ACED,MAAO,gBAET,CACEA,MAAO"}
|
|
1
|
+
{"version":3,"file":"button.theme.js","sources":["../../../src/materialui/button/button.theme.ts"],"sourcesContent":["import { Components } from '@mui/material/styles';\nimport { Theme } from '@mui/material';\nimport { getFocusRingStyle, updateFocusRingStyle } from '@/src/components/focusring/focusring';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\n\nexport const flowButton: Components<Theme>['MuiButton'] = {\n defaultProps: {\n disableRipple: true,\n disableElevation: true,\n variant: 'contained',\n },\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n position: 'relative',\n boxShadow: 'none',\n textRendering: 'geometricPrecision',\n outline: 'none',\n minWidth: '44px',\n padding: '14px 24px',\n flexShrink: '0',\n // font\n ...theme.typography.button,\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // make sure not to increase size of the Button due to padding\n marginTop: '-2px',\n marginBottom: '-2px',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '20px',\n },\n // spinner inside\n '& .FlowSpinner-root': {\n marginTop: '-2px',\n marginBottom: '-2px',\n },\n },\n // small size values are also copied in SecondaryNavigationCta.tsx, keep them in sync\n ...(ownerState.size === 'small' && {\n padding: '8px 14px',\n fontSize: '14px',\n lineHeight: '16px',\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // make sure not to increase size of the Button due to padding\n marginTop: '-2px',\n marginBottom: '-2px',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n },\n },\n }),\n ...(ownerState.size === 'large' && {\n padding: '15px 25px',\n fontSize: '18px',\n lineHeight: '20px',\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // make sure not to increase size of the Button due to padding\n marginTop: '-2px',\n marginBottom: '-2px',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '22px',\n },\n },\n }),\n backgroundClip: 'padding-box',\n transition:\n 'transform 0.3s ease-out, color 0.3s ease-out, background-color 0.3s ease-out, border-color 0.3s ease-out, box-shadow 0.3s ease-out, opacity 0.3s ease-out',\n // 50% border radius without skewing ratio\n borderRadius: '1000px',\n '&:hover': {\n boxShadow: 'none',\n },\n '&&:active': {\n boxShadow: 'none',\n },\n // focused style\n ...getFocusRingStyle(theme),\n // disabled style\n '&.Mui-disabled': {\n opacity: '1',\n },\n }),\n startIcon: ({ ownerState }) => ({\n flexShrink: '0',\n // space between text and icon\n marginRight: '10px',\n marginLeft: '0',\n // small size value is also copied in SecondaryNavigationCta.tsx\n ...(ownerState.size === 'small' && {\n marginRight: '5px',\n }),\n ...(ownerState.size === 'large' && {\n marginRight: '15px',\n }),\n }),\n endIcon: ({ ownerState }) => ({\n flexShrink: '0',\n // space between text and icon\n marginRight: '0',\n marginLeft: '10px',\n // small size value is also copied in SecondaryNavigationCta.tsx\n ...(ownerState.size === 'small' && {\n marginLeft: '5px',\n }),\n ...(ownerState.size === 'large' && {\n marginLeft: '15px',\n }),\n }),\n contained: ({ theme, ownerState }) => ({\n ...((ownerState.color === 'primary' || ownerState.color === 'success') && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.brand.secondary,\n color: theme.palette.onSurface.os900,\n },\n {\n backgroundColor: theme.palette.brandHover.secondary,\n color: theme.palette.onSurface.os900,\n },\n ),\n }),\n ...(ownerState.color === 'secondary' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.onSurface.os600,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'white' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.transparent.tertiary,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'error' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.error.dark,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n // deprecated semantic colors, used by Production team\n ...(ownerState.color === 'warning' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.warning.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.warning.dark,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'info' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.info.main,\n color: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.info.dark,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'inherit' && {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: 'currentColor',\n },\n {\n backgroundColor: theme.palette.surface.primary,\n },\n ),\n }),\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n backgroundColor: theme.palette.disabled.secondary,\n ...(theme.palette.mode === 'dark' && {\n backgroundColor: theme.palette.onSurface.os800,\n }),\n },\n }),\n text: ({ theme, ownerState }) => ({\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n },\n {\n backgroundColor: ['white', 'inherit'].includes(ownerState.color)\n ? theme.palette.transparent.tertiary\n : theme.palette.transparent.secondary,\n },\n ),\n ...((ownerState.color === 'primary' || ownerState.color === 'success') && {\n color: theme.palette.brand.secondary,\n }),\n ...(ownerState.color === 'secondary' && {\n color: theme.palette.text.primary,\n }),\n ...(ownerState.color === 'white' && {\n color: theme.palette.onSurface.os0,\n }),\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.primary,\n },\n }),\n outlined: ({ theme, ownerState }) => ({\n '&, &:hover, &.Mui-disabled': {\n borderWidth: '2px',\n },\n ...updateFocusRingStyle(2),\n borderStyle: 'solid',\n // remove 2px border from each side and move focusRing\n padding: '12px 22px',\n ...(ownerState.size === 'small' && {\n '&, &:hover, &.Mui-disabled': {\n borderWidth: '1px',\n },\n ...updateFocusRingStyle(1),\n padding: '7px 13px',\n }),\n ...(ownerState.size === 'large' && {\n padding: '13px 23px',\n }),\n // electric green variant\n ...((ownerState.color === 'primary' || ownerState.color === 'success') && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.brand.secondary,\n borderColor: theme.palette.brand.secondary,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.brand.secondary,\n },\n ),\n }),\n // secondary used as text color\n ...(ownerState.color === 'secondary' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.text.primary,\n borderColor: theme.palette.text.primary,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.text.primary,\n },\n ),\n }),\n ...(ownerState.color === 'white' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.onSurface.os0,\n borderColor: theme.palette.onSurface.os0,\n },\n {\n backgroundColor: theme.palette.transparent.tertiary,\n color: theme.palette.onSurface.os0,\n },\n ),\n }),\n ...(ownerState.color === 'error' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.error.main,\n borderColor: theme.palette.error.main,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.error.main,\n },\n ),\n }),\n // deprecated semantic colors\n ...(ownerState.color === 'warning' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.warning.main,\n borderColor: theme.palette.warning.main,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.warning.main,\n },\n ),\n }),\n ...(ownerState.color === 'info' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.info.main,\n borderColor: theme.palette.info.main,\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n color: theme.palette.info.main,\n },\n ),\n }),\n ...(ownerState.color === 'inherit' && {\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: 'currentColor',\n borderColor: 'currentColor',\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n },\n ),\n }),\n // disabled style\n '&.Mui-disabled': {\n borderColor: theme.palette.disabled.primary,\n color: theme.palette.disabled.primary,\n },\n }),\n },\n variants: [\n {\n props: { color: 'surface' },\n style: ({ theme }) => ({\n border: `1px solid ${theme.palette.mode === 'dark' ? theme.palette.transparent.quarternary : theme.palette.onSurface.os100}`,\n ...updateFocusRingStyle(1),\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.surface.primary,\n color: theme.palette.text.primary,\n },\n {\n backgroundColor: theme.palette.surface.secondary,\n color: theme.palette.text.primary,\n },\n ),\n // disabled style\n '&.Mui-disabled': {\n backgroundColor: theme.palette.surface.secondary,\n borderColor: theme.palette.surface.secondary,\n color: theme.palette.disabled.primary,\n },\n }),\n },\n {\n props: { variant: 'contained', color: 'surface' },\n style: () => ({\n // remove 1px border from each side\n padding: '13px 23px',\n }),\n },\n {\n props: { variant: 'contained', color: 'surface', size: 'small' },\n style: () => ({\n // remove 1px border from each side\n padding: '7px 13px',\n }),\n },\n {\n props: { variant: 'contained', color: 'surface', size: 'large' },\n style: () => ({\n // remove 1px border from each side\n padding: '14px 24px',\n }),\n },\n {\n props: { variant: 'outlined', color: 'surface' },\n style: () => ({\n borderWidth: 2,\n ...updateFocusRingStyle(2),\n }),\n },\n {\n props: { variant: 'text', color: 'surface' },\n style: () => ({\n borderWidth: 0,\n backgroundColor: 'transparent',\n ...updateFocusRingStyle(),\n }),\n },\n {\n props: { variant: 'navigation' },\n style: ({ theme }) => ({\n padding: '0',\n fontSize: '14px',\n borderRadius: '2px',\n letterSpacing: '0.02em',\n fontWeight: '400',\n lineHeight: '20px',\n '& .MuiButton-icon': {\n transition: 'transform 0.3s ease-out',\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n },\n },\n '& .MuiButton-startIcon': {\n marginRight: '6px',\n },\n '& .MuiButton-endIcon': {\n marginLeft: '6px',\n },\n // prepare pseudo-element for focus effect\n '&::before': {\n inset: '-4px -8px',\n },\n // same style is used in the quickLink interactive effect\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os0 : theme.palette.onSurface.os900,\n '& .MuiButton-startIcon': {\n transform: 'translateX(0px)',\n },\n '& .MuiButton-endIcon': {\n transform: 'translateX(0px)',\n },\n },\n {\n backgroundColor: 'transparent',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n '& .MuiButton-startIcon': {\n transform: 'translateX(-8px)',\n },\n '& .MuiButton-endIcon': {\n transform: 'translateX(8px)',\n },\n },\n ),\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n }),\n },\n {\n props: { variant: 'navigation', color: 'primary' },\n style: ({ theme }) => ({\n ...getInteractiveStyle(\n {\n color: theme.palette.primary.main,\n },\n {\n color: theme.palette.brandHover.primary,\n },\n ),\n }),\n },\n {\n props: { variant: 'navigation', color: 'surface' },\n style: {\n border: 'none',\n '&&::before': {\n inset: '-4px -8px',\n },\n },\n },\n {\n props: { variant: 'navigation', color: 'white' },\n style: ({ theme }) => ({\n ...getInteractiveStyle(\n {\n color: theme.palette.onSurface.os0,\n },\n {\n color: theme.palette.onSurface.os300,\n },\n ),\n }),\n },\n {\n props: { variant: 'navigation', color: 'error' },\n style: ({ theme }) => ({\n ...getInteractiveStyle(\n {\n color: theme.palette.error.main,\n },\n {\n color: theme.palette.error.dark,\n },\n ),\n }),\n },\n {\n props: { variant: 'shortcut' },\n style: ({ theme }) => ({\n // adjust proportions\n borderRadius: '3px',\n padding: '2px 8px',\n // font\n textAlign: 'left',\n fontWeight: '300',\n fontSize: '16px',\n lineHeight: '24px',\n letterSpacing: '0.02em',\n '&&': {\n textDecoration: 'underline',\n textDecorationColor: 'currentColor',\n textDecorationThickness: '1px',\n textUnderlineOffset: '2px',\n },\n // startIcon / endIcon\n '&& .MuiButton-icon': {\n transition: 'transform 0.3s ease-out',\n },\n // style\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.text.primary,\n '& .MuiButton-icon': {\n transform: 'scale(1.0)',\n },\n },\n {\n backgroundColor: 'transparent',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n '& .MuiButton-icon': {\n transform: 'scale(1.1)',\n },\n },\n ),\n // responsive scale\n [theme.breakpoints.down('md')]: {\n fontSize: '14px',\n // startIcon / endIcon\n '& .MuiButton-icon': {\n // icon itself\n '& .MuiSvgIcon-root': {\n fontSize: '18px',\n },\n },\n },\n // disabled style\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n }),\n },\n {\n props: { variant: 'shortcut', fullWidth: true },\n style: {\n // move content to left side from the center\n justifyContent: 'flex-start',\n textAlign: 'left',\n },\n },\n {\n props: { variant: 'shortcut', color: 'inherit' },\n style: {\n ...getInteractiveStyle(\n {\n color: 'currentColor',\n },\n {\n color: 'currentColor',\n },\n ),\n },\n },\n ],\n};\n"],"names":["flowButton","defaultProps","disableRipple","disableElevation","variant","styleOverrides","root","theme","ownerState","position","boxShadow","textRendering","outline","minWidth","padding","flexShrink","typography","button","marginTop","marginBottom","fontSize","size","lineHeight","backgroundClip","transition","borderRadius","getFocusRingStyle","opacity","startIcon","marginRight","marginLeft","endIcon","contained","color","getInteractiveStyle","backgroundColor","palette","brand","secondary","onSurface","os900","brandHover","main","os0","os600","transparent","tertiary","error","dark","warning","info","surface","primary","disabled","mode","os800","text","includes","outlined","borderWidth","updateFocusRingStyle","borderStyle","borderColor","variants","props","style","border","quarternary","os100","letterSpacing","fontWeight","inset","transform","os300","os700","textAlign","textDecoration","textDecorationColor","textDecorationThickness","textUnderlineOffset","breakpoints","down","fullWidth","justifyContent"],"mappings":"6JAKO,MAAMA,EAA6C,CACxDC,aAAc,CACZC,eAAe,EACfC,kBAAkB,EAClBC,QAAS,aAEXC,eAAgB,CACdC,KAAM,EAAGC,QAAOC,iBAAY,CAC1BC,SAAU,WACVC,UAAW,OACXC,cAAe,qBACfC,QAAS,OACTC,SAAU,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oB,KAAKJ,QAC1B,oBAAqB,CACnBoB,UAAW,eAGf,CACErC,gBAAiB,cACjBF,MAA8B,SAAvB1B,EAAM6B,QAAQkB,KAAkB/C,EAAM6B,QAAQG,UAAUkC,MAAQlE,EAAM6B,QAAQG,UAAUmC,MAC/F,oBAAqB,CACnBF,UAAW,gBAKjB,CAACjE,EAAMyE,YAAYC,KAAK,OAAQ,CAC9B7D,SAAU,OAEV,oBAAqB,CAEnB,qBAAsB,CACpBA,SAAU,UAKhB,iBAAkB,CAChBa,MAAO1B,EAAM6B,QAAQiB,SAASP,aAIpC,CACEkB,MAAO,CAAE5D,QAAS,WAAY8E,WAAW,GACzCjB,MAAO,CAELkB,eAAgB,aAChBR,UAAW,SAGf,CACEX,MAAO,CAAE5D,QAAS,WAAY6B,MAAO,WACrCgC,MAAO,IACF/B,EACD,CACED,MAAO,gBAET,CACEA,MAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{TabsScrollButton as
|
|
1
|
+
import{TabsScrollButton as t}from"./TabsScrollButton.js";import{updateFocusRingStyle as e}from"../../components/focusring/focusring.js";import{getInteractiveStyle as o}from"../button/interactive.js";import{getTypography as r}from"../typography/typography.theme.js";const a={defaultProps:{template:"underlined",scrollButtons:"auto",allowScrollButtonsMobile:!0,visibleScrollbar:!1,variant:"scrollable",slots:{scrollButtons:t},slotProps:{scroller:t=>!1===t.visibleScrollbar&&{style:{marginBottom:"0"}}}},styleOverrides:{root:({theme:t,ownerState:e})=>({minHeight:"0",alignItems:"center",gap:"0",...e.fullWidth||"fullWidth"===e.variant?{"& .MuiTab-root":{flexGrow:"1"}}:{},...e.centered?{justifyContent:"center"}:{},'&:not(:has(.MuiTab-root[aria-selected="true"]))':{"& .MuiTabs-indicator":{opacity:"0"}},"& .MuiTab-root .MuiTabs-indicator":{bottom:"-18px","&:before":{left:"0",right:"0"}},"& .MuiTabs-list, & .MuiTabs-flexContainer":{gap:"16px",[t.breakpoints.up("md")]:{gap:"28px"}}}),indicator:({theme:t,ownerState:e})=>({maxWidth:"none",background:"transparent",display:"block",height:"3px",color:"dark"===t.palette.mode?t.palette.brand.secondary:t.palette.brand.primary,..."secondary"===e.indicatorColor&&{color:t.palette.text.primary},"&:before":{display:"block",content:'""',position:"absolute",left:"8px",right:"8px",top:"0",bottom:"0",backgroundColor:"currentColor"}}),scroller:({ownerState:t})=>({flexGrow:t.fullWidth||"fullWidth"===t.variant?"1":"0","&::-webkit-scrollbar:horizontal":{height:"24px"},"&::-webkit-scrollbar-thumb:horizontal, &::-webkit-scrollbar-track:horizontal":{borderWidth:"10px"}}),scrollButtons:({theme:t})=>({color:t.palette.text.primary,"&.Mui-disabled":{opacity:"1",color:t.palette.disabled.primary}})},variants:[{props:{template:"underlined"},style:({theme:t})=>({marginLeft:"-6px",marginRight:"-6px",maxWidth:"none","& .MuiTabs-scroller":{"&::-webkit-scrollbar:horizontal":{height:"16px"},"&::-webkit-scrollbar-thumb:horizontal, &::-webkit-scrollbar-track:horizontal":{borderWidth:"6px"}},"& .MuiTabs-list, & .MuiTabs-flexContainer":{padding:"6px",gap:"0"},"& .MuiTabs-indicator":{bottom:"6px","&:before":{inset:"0"}},"& .MuiTab-root .MuiTabs-indicator":{bottom:"-12px",[t.breakpoints.down("md")]:{bottom:"-10px"},"&:before":{maxWidth:"none",left:"-24px",right:"-24px"}},"& .MuiTab-root":{margin:"0",padding:"12px 24px",[t.breakpoints.down("md")]:{paddingTop:"10px",paddingBottom:"10px"},borderRadius:"0",color:"dark"===t.palette.mode?t.palette.onSurface.os300:t.palette.onSurface.os700,...t.typography.subheadline,[t.breakpoints.up("xs")]:{fontWeight:"300"},"&:after":{content:'""',position:"absolute",left:"0",right:"0",bottom:"0",height:"1px",backgroundColor:t.palette.onSurface.os500},"&:hover, &.Mui-focusVisible":{"&:after":{height:"2px"}},"&.Mui-selected":{color:"dark"===t.palette.mode?t.palette.brand.secondary:t.palette.brand.primary,backgroundColor:"dark"===t.palette.mode?t.palette.surface.primary:t.palette.transparent.primary},"&.Mui-disabled":{color:t.palette.disabled.tertiary},"&.Mui-focusVisible":{zIndex:"10",boxShadow:`0 0 0 2px ${t.palette.background.primary}`,"&:before":{inset:"-2px",borderRadius:"4px"}}}})},{props:{template:"buttons"},style:({theme:t})=>({"& .MuiTabs-list, & .MuiTabs-flexContainer":{gap:"8px"},"& .MuiTabs-indicator":{display:"none"},"& .MuiTab-root":{border:"1px solid transparent",padding:"6px 16px",borderRadius:"1000px",transition:"all 0.3s ease-out",fontSize:"14px",fontWeight:"700",marginBottom:"2px",...e("0px",!1),...o({backgroundColor:"transparent",color:t.palette.onSurface.os500},{backgroundColor:t.palette.surface.primary,color:t.palette.text.primary}),"&.Mui-selected":{...o({backgroundColor:t.palette.brand.quarternary,color:t.palette.text.primary,borderColor:t.palette.brand.primary},{backgroundColor:t.palette.brand.quarternary,color:t.palette.brand.primary,borderColor:t.palette.brand.primary})},[t.breakpoints.down("md")]:{"&, &.Mui-selected, & .FlowTab-selectedLabel":{fontWeight:"400"}}}})},{props:{template:"navigation"},style:({theme:t})=>({"& .MuiTabs-list, & .MuiTabs-flexContainer":{gap:"4px"},paddingTop:"11px",[t.breakpoints.down("xl")]:{paddingTop:"13px"},[t.breakpoints.down("lg")]:{paddingTop:"8px"},"& .MuiTab-root":{marginBottom:"11px",[t.breakpoints.down("xl")]:{marginBottom:"13px"},[t.breakpoints.down("lg")]:{marginBottom:"8px"},...t.typography.list},"& .MuiTab-root .MuiTabs-indicator":{bottom:"-19px",[t.breakpoints.down("xl")]:{bottom:"-21px"},[t.breakpoints.down("lg")]:{bottom:"-16px"}}})},{props:{template:"segmented"},style:({theme:t})=>({color:"dark"===t.palette.mode?t.palette.surface.primary:t.palette.transparent.secondary,"& .MuiTabs-scroller":{backgroundColor:"currentColor",borderRadius:"1000px"},"& .MuiTabs-list, & .MuiTabs-flexContainer":{gap:"8px"},"& .MuiTab-root .MuiTabs-indicator":{display:"none"},"& .MuiTabs-indicator":{color:"dark"===t.palette.mode?t.palette.surface.secondary:t.palette.common.white,height:"100%",zIndex:"10",borderRadius:"1000px",overflow:"hidden","&:before":{inset:"0",borderRadius:"inherit",border:`2px solid ${"dark"===t.palette.mode?t.palette.brand.secondary:t.palette.text.primary}`}},"& .MuiTab-root":{margin:"0",borderRadius:"1000px",transition:"all 0.3s ease-out",padding:"6px 16px",gap:"10px",zIndex:"20","& .MuiSvgIcon-root":{fontSize:"20px",marginTop:"4px",marginBottom:"4px"},color:t.palette.text.primary,...r("subheadline","rtl"===t.direction,"small"),[t.breakpoints.up("md")]:{...r("subheadline","rtl"===t.direction,"large"),padding:"8px 16px"},[t.breakpoints.up("xs")]:{"&, &.Mui-selected, & .FlowTab-selectedLabel":{fontWeight:"400"}},"&:hover, &.Mui-focusVisible":{backgroundColor:t.palette.surface.primary},"&.Mui-selected":{color:"dark"===t.palette.mode?t.palette.brand.secondary:t.palette.text.primary,"&:hover, &.Mui-focusVisible":{backgroundColor:"transparent"}},"&.Mui-disabled":{color:t.palette.disabled.tertiary}}})}]};export{a as flowTabs};
|
|
2
2
|
//# sourceMappingURL=tabs.theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.theme.js","sources":["../../../src/materialui/tabs/tabs.theme.tsx"],"sourcesContent":["import { Components, Theme } from '@mui/material/styles';\nimport { TabsScrollButton } from './TabsScrollButton';\nimport { updateFocusRingStyle } from '@/src/components/focusring/focusring';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\nimport { getTypography } from '@/src/materialui/typography/typography.theme';\n\nexport const flowTabs: Components<Theme>['MuiTabs'] = {\n defaultProps: {\n template: 'underlined',\n // for the A11y reflow-4x-zoom-scroll show scrollButtons instead of scrollbar\n scrollButtons: 'auto',\n allowScrollButtonsMobile: true,\n visibleScrollbar: false,\n variant: 'scrollable',\n slots: {\n scrollButtons: TabsScrollButton,\n },\n slotProps: {\n // removes @mui marginBottom outdated method to hide scrollbar, which might cause overflow issues\n // https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Tabs/Tabs.js#L515\n scroller: (ownerState) =>\n ownerState.visibleScrollbar === false && {\n style: { marginBottom: '0' },\n },\n },\n },\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n minHeight: '0',\n alignItems: 'center',\n // space between tabs and scroll buttons (FlowScrollButton already contains 4px)\n gap: '0',\n ...(ownerState.fullWidth || ownerState.variant === 'fullWidth'\n ? {\n '& .MuiTab-root': {\n flexGrow: '1',\n },\n }\n : {}),\n // @mui omits centered property with variant scrollable,\n // therefore code bellow has no effect. In docs, we recommend utilizing sx property.\n ...(ownerState.centered ? { justifyContent: 'center' } : {}),\n // check if we don't have any tab selected\n '&:not(:has(.MuiTab-root[aria-selected=\"true\"]))': {\n // hide indicator\n '& .MuiTabs-indicator': {\n opacity: '0',\n },\n },\n // container\n // note: once we stop supporting @mui v7, can be moved directly under list: {}\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n gap: '16px',\n [theme.breakpoints.up('md')]: {\n gap: '28px',\n },\n },\n }),\n indicator: ({ theme, ownerState }) => ({\n maxWidth: 'none',\n background: 'transparent',\n display: 'block',\n height: '3px',\n color: theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.brand.primary,\n ...(ownerState.indicatorColor === 'secondary' && {\n color: theme.palette.text.primary,\n }),\n // actual indicator line\n '&:before': {\n display: 'block',\n content: '\"\"',\n position: 'absolute',\n left: '8px',\n right: '8px',\n top: '0',\n bottom: '0',\n backgroundColor: 'currentColor',\n },\n }),\n scroller: ({ ownerState }) => ({\n flexGrow: ownerState.fullWidth || ownerState.variant === 'fullWidth' ? '1' : '0',\n // restyle horizontal scrollbar\n '&::-webkit-scrollbar:horizontal': {\n height: '24px',\n },\n '&::-webkit-scrollbar-thumb:horizontal, &::-webkit-scrollbar-track:horizontal': {\n borderWidth: '10px',\n },\n }),\n scrollButtons: ({ theme }) => ({\n color: theme.palette.text.primary,\n // do not hide disabled scroll buttons\n '&.Mui-disabled': {\n opacity: '1',\n color: theme.palette.disabled.primary,\n },\n }),\n },\n variants: [\n {\n props: { template: 'underlined' },\n style: ({ theme }) => ({\n // align with rest of the page, due to extra space\n marginLeft: '-6px',\n marginRight: '-6px',\n maxWidth: 'none',\n // scroll container\n '& .MuiTabs-scroller': {\n '&::-webkit-scrollbar:horizontal': {\n height: '16px',\n },\n '&::-webkit-scrollbar-thumb:horizontal, &::-webkit-scrollbar-track:horizontal': {\n borderWidth: '6px',\n },\n },\n // container\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // extra space for the focus indicator\n padding: '6px',\n // remove gap between tabs\n gap: '0',\n },\n // indicator line\n '& .MuiTabs-indicator': {\n // move directly into tab border\n bottom: '6px',\n '&:before': {\n // make full-width\n inset: '0',\n },\n },\n // Tabs itself\n '& .MuiTab-root': {\n // remove space around tab in favor of padding\n margin: '0',\n // increase spacing\n padding: '12px 24px',\n // responsive\n [theme.breakpoints.down('md')]: {\n paddingTop: '10px',\n paddingBottom: '10px',\n },\n // style adjust\n borderRadius: '0',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n // font\n ...theme.typography.subheadline,\n [theme.breakpoints.up('xs')]: {\n fontWeight: '300',\n },\n // bottom border\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n left: '0',\n right: '0',\n bottom: '0',\n height: '1px',\n backgroundColor: theme.palette.onSurface.os500,\n },\n // hover effect\n '&:hover, &.Mui-focusVisible': {\n // increase size of the border\n '&:after': {\n height: '2px',\n },\n },\n // active\n '&.Mui-selected': {\n color: theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.brand.primary,\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.surface.primary : theme.palette.transparent.primary,\n },\n // disabled\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n // focused style\n '&.Mui-focusVisible': {\n // higher z-index than others\n zIndex: '10',\n // extra white border\n boxShadow: `0 0 0 2px ${theme.palette.background.primary}`,\n '&:before': {\n // move outside\n inset: '-2px',\n // add extra border radius\n borderRadius: '4px',\n },\n },\n },\n }),\n },\n {\n props: { template: 'buttons' },\n style: ({ theme }) => ({\n // container\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // reduce gap between tabs\n gap: '8px',\n },\n // hide bottom line\n '& .MuiTabs-indicator': {\n display: 'none',\n },\n // restyle tabs to buttons\n '& .MuiTab-root': {\n border: '1px solid transparent',\n padding: '6px 16px',\n borderRadius: '1000px',\n transition: 'all 0.3s ease-out',\n fontSize: '14px',\n fontWeight: '700',\n marginBottom: '2px',\n ...updateFocusRingStyle('0px', false),\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.onSurface.os500,\n },\n {\n backgroundColor: theme.palette.surface.primary,\n color: theme.palette.text.primary,\n },\n ),\n '&.Mui-selected': {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.brand.quarternary,\n color: theme.palette.text.primary,\n borderColor: theme.palette.brand.primary,\n },\n {\n backgroundColor: theme.palette.brand.quarternary,\n color: theme.palette.brand.primary,\n borderColor: theme.palette.brand.primary,\n },\n ),\n },\n // responsive\n [theme.breakpoints.down('md')]: {\n '&, &.Mui-selected, & .FlowTab-selectedLabel': {\n fontWeight: '400',\n },\n },\n },\n }),\n },\n {\n // variant used in the SecondaryNavigation\n props: { template: 'navigation' },\n style: ({ theme }) => ({\n // container\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // reduce gap between tabs\n gap: '4px',\n },\n // manual align\n paddingTop: '11px',\n [theme.breakpoints.down('xl')]: {\n paddingTop: '13px',\n },\n [theme.breakpoints.down('lg')]: {\n paddingTop: '8px',\n },\n // restyle tabs typography\n '& .MuiTab-root': {\n marginBottom: '11px',\n [theme.breakpoints.down('xl')]: {\n marginBottom: '13px',\n },\n [theme.breakpoints.down('lg')]: {\n marginBottom: '8px',\n },\n ...theme.typography.list,\n },\n }),\n },\n {\n props: { template: 'segmented' },\n style: ({ theme }) => ({\n // used for background\n color: theme.palette.mode === 'dark' ? theme.palette.surface.primary : theme.palette.transparent.secondary,\n // container\n '& .MuiTabs-scroller': {\n backgroundColor: 'currentColor',\n borderRadius: '1000px',\n },\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // reduce gap between tabs\n gap: '8px',\n },\n // restyle indicator to white bordered travelling background\n '& .MuiTabs-indicator': {\n color: theme.palette.mode === 'dark' ? theme.palette.surface.secondary : theme.palette.common.white,\n // proportion\n height: '100%',\n // z-index bellow <Tab />\n zIndex: '10',\n borderRadius: '1000px',\n // make sure border from :before is not visible when no tab is selected\n overflow: 'hidden',\n '&:before': {\n inset: '0',\n borderRadius: 'inherit',\n border: `2px solid ${theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.text.primary}`,\n },\n },\n // restyle tabs\n '& .MuiTab-root': {\n margin: '0',\n borderRadius: '1000px',\n transition: 'all 0.3s ease-out',\n // proportions\n padding: '6px 16px',\n // space between icon and text\n gap: '10px',\n // z-index above indicator\n zIndex: '20',\n // icon inside\n '& .MuiSvgIcon-root': {\n fontSize: '20px',\n marginTop: '4px',\n marginBottom: '4px',\n },\n // change typography\n color: theme.palette.text.primary,\n ...getTypography('subheadline', theme.direction === 'rtl', 'small'),\n [theme.breakpoints.up('md')]: {\n ...getTypography('subheadline', theme.direction === 'rtl', 'large'),\n // update proportions\n padding: '8px 16px',\n },\n [theme.breakpoints.up('xs')]: {\n '&, &.Mui-selected, & .FlowTab-selectedLabel': {\n fontWeight: '400',\n },\n },\n // hover and focus\n '&:hover, &.Mui-focusVisible': {\n backgroundColor: theme.palette.surface.primary,\n },\n // active\n '&.Mui-selected': {\n color: theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.text.primary,\n '&:hover, &.Mui-focusVisible': {\n backgroundColor: 'transparent',\n },\n },\n // disabled\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n },\n }),\n },\n ],\n};\n"],"names":["flowTabs","defaultProps","template","scrollButtons","allowScrollButtonsMobile","visibleScrollbar","variant","slots","TabsScrollButton","slotProps","scroller","ownerState","style","marginBottom","styleOverrides","root","theme","minHeight","alignItems","gap","fullWidth","flexGrow","centered","justifyContent","opacity","breakpoints","up","indicator","maxWidth","background","display","height","color","palette","mode","brand","secondary","primary","indicatorColor","text","content","position","left","right","top","bottom","backgroundColor","borderWidth","disabled","variants","props","marginLeft","marginRight","padding","inset","margin","down","paddingTop","paddingBottom","borderRadius","onSurface","os300","os700","typography","subheadline","fontWeight","os500","surface","transparent","tertiary","zIndex","boxShadow","border","transition","fontSize","updateFocusRingStyle","getInteractiveStyle","quarternary","borderColor","list","common","white","overflow","marginTop","getTypography","direction"],"mappings":"yQAMO,MAAMA,EAAyC,CACpDC,aAAc,CACZC,SAAU,aAEVC,cAAe,OACfC,0BAA0B,EAC1BC,kBAAkB,EAClBC,QAAS,aACTC,MAAO,CACLJ,cAAeK,GAEjBC,UAAW,CAGTC,SAAWC,IACuB,IAAhCA,EAAWN,kBAA8B,CACvCO,MAAO,CAAEC,aAAc,QAI/BC,eAAgB,CACdC,KAAM,EAAGC,QAAOL,iBAAY,CAC1BM,UAAW,IACXC,WAAY,SAEZC,IAAK,OACDR,EAAWS,WAAoC,cAAvBT,EAAWL,QACnC,CACE,iBAAkB,CAChBe,SAAU,MAGd,MAGAV,EAAWW,SAAW,CAAEC,eAAgB,UAAa,CAAA,EAEzD,kDAAmD,CAEjD,uBAAwB,CACtBC,QAAS,MAKb,4CAA6C,CAC3CL,IAAK,OACL,CAACH,EAAMS,YAAYC,GAAG,OAAQ,CAC5BP,IAAK,WAIXQ,UAAW,EAAGX,QAAOL,iBAAY,CAC/BiB,SAAU,OACVC,WAAY,cACZC,QAAS,QACTC,OAAQ,MACRC,MAA8B,SAAvBhB,EAAMiB,QAAQC,KAAkBlB,EAAMiB,QAAQE,MAAMC,UAAYpB,EAAMiB,QAAQE,MAAME,WACzD,cAA9B1B,EAAW2B,gBAAkC,CAC/CN,MAAOhB,EAAMiB,QAAQM,KAAKF,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BAA+B,CAC7BnB,gBAAiB9B,EAAMiB,QAAQkC,QAAQ9B,SAGzC,iBAAkB,CAChBL,MAA8B,SAAvBhB,EAAMiB,QAAQC,KAAkBlB,EAAMiB,QAAQE,MAAMC,UAAYpB,EAAMiB,QAAQM,KAAKF,QAC1F,8BAA+B,CAC7BS,gBAAiB,gBAIrB,iBAAkB,CAChBd,MAAOhB,EAAMiB,QAAQe,SAASqB"}
|
|
1
|
+
{"version":3,"file":"tabs.theme.js","sources":["../../../src/materialui/tabs/tabs.theme.tsx"],"sourcesContent":["import { Components, Theme } from '@mui/material/styles';\nimport { TabsScrollButton } from './TabsScrollButton';\nimport { updateFocusRingStyle } from '@/src/components/focusring/focusring';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\nimport { getTypography } from '@/src/materialui/typography/typography.theme';\n\nexport const flowTabs: Components<Theme>['MuiTabs'] = {\n defaultProps: {\n template: 'underlined',\n // for the A11y reflow-4x-zoom-scroll show scrollButtons instead of scrollbar\n scrollButtons: 'auto',\n allowScrollButtonsMobile: true,\n visibleScrollbar: false,\n variant: 'scrollable',\n slots: {\n scrollButtons: TabsScrollButton,\n },\n slotProps: {\n // removes @mui marginBottom outdated method to hide scrollbar, which might cause overflow issues\n // https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Tabs/Tabs.js#L515\n scroller: (ownerState) =>\n ownerState.visibleScrollbar === false && {\n style: { marginBottom: '0' },\n },\n },\n },\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n minHeight: '0',\n alignItems: 'center',\n // space between tabs and scroll buttons (FlowScrollButton already contains 4px)\n gap: '0',\n ...(ownerState.fullWidth || ownerState.variant === 'fullWidth'\n ? {\n '& .MuiTab-root': {\n flexGrow: '1',\n },\n }\n : {}),\n // @mui omits centered property with variant scrollable,\n // therefore code bellow has no effect. In docs, we recommend utilizing sx property.\n ...(ownerState.centered ? { justifyContent: 'center' } : {}),\n // check if we don't have any tab selected\n '&:not(:has(.MuiTab-root[aria-selected=\"true\"]))': {\n // hide indicator\n '& .MuiTabs-indicator': {\n opacity: '0',\n },\n },\n // before hydration @mui renders indicator inside the label of the selected tab,\n // compensate bottom margin and padding of tab from tab.theme.tsx to keep SSR output correct\n '& .MuiTab-root .MuiTabs-indicator': {\n bottom: '-18px',\n // label already excludes tab padding\n '&:before': {\n left: '0',\n right: '0',\n },\n },\n // container\n // note: once we stop supporting @mui v7, can be moved directly under list: {}\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n gap: '16px',\n [theme.breakpoints.up('md')]: {\n gap: '28px',\n },\n },\n }),\n indicator: ({ theme, ownerState }) => ({\n maxWidth: 'none',\n background: 'transparent',\n display: 'block',\n height: '3px',\n color: theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.brand.primary,\n ...(ownerState.indicatorColor === 'secondary' && {\n color: theme.palette.text.primary,\n }),\n // actual indicator line\n '&:before': {\n display: 'block',\n content: '\"\"',\n position: 'absolute',\n left: '8px',\n right: '8px',\n top: '0',\n bottom: '0',\n backgroundColor: 'currentColor',\n },\n }),\n scroller: ({ ownerState }) => ({\n flexGrow: ownerState.fullWidth || ownerState.variant === 'fullWidth' ? '1' : '0',\n // restyle horizontal scrollbar\n '&::-webkit-scrollbar:horizontal': {\n height: '24px',\n },\n '&::-webkit-scrollbar-thumb:horizontal, &::-webkit-scrollbar-track:horizontal': {\n borderWidth: '10px',\n },\n }),\n scrollButtons: ({ theme }) => ({\n color: theme.palette.text.primary,\n // do not hide disabled scroll buttons\n '&.Mui-disabled': {\n opacity: '1',\n color: theme.palette.disabled.primary,\n },\n }),\n },\n variants: [\n {\n props: { template: 'underlined' },\n style: ({ theme }) => ({\n // align with rest of the page, due to extra space\n marginLeft: '-6px',\n marginRight: '-6px',\n maxWidth: 'none',\n // scroll container\n '& .MuiTabs-scroller': {\n '&::-webkit-scrollbar:horizontal': {\n height: '16px',\n },\n '&::-webkit-scrollbar-thumb:horizontal, &::-webkit-scrollbar-track:horizontal': {\n borderWidth: '6px',\n },\n },\n // container\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // extra space for the focus indicator\n padding: '6px',\n // remove gap between tabs\n gap: '0',\n },\n // indicator line\n '& .MuiTabs-indicator': {\n // move directly into tab border\n bottom: '6px',\n '&:before': {\n // make full-width\n inset: '0',\n },\n },\n // SSR handling\n '& .MuiTab-root .MuiTabs-indicator': {\n bottom: '-12px',\n [theme.breakpoints.down('md')]: {\n bottom: '-10px',\n },\n '&:before': {\n // expand from label back to full tab width, prevent clamping by global baseline\n maxWidth: 'none',\n left: '-24px',\n right: '-24px',\n },\n },\n // Tabs itself\n '& .MuiTab-root': {\n // remove space around tab in favor of padding\n margin: '0',\n // increase spacing\n padding: '12px 24px',\n // responsive\n [theme.breakpoints.down('md')]: {\n paddingTop: '10px',\n paddingBottom: '10px',\n },\n // style adjust\n borderRadius: '0',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n // font\n ...theme.typography.subheadline,\n [theme.breakpoints.up('xs')]: {\n fontWeight: '300',\n },\n // bottom border\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n left: '0',\n right: '0',\n bottom: '0',\n height: '1px',\n backgroundColor: theme.palette.onSurface.os500,\n },\n // hover effect\n '&:hover, &.Mui-focusVisible': {\n // increase size of the border\n '&:after': {\n height: '2px',\n },\n },\n // active\n '&.Mui-selected': {\n color: theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.brand.primary,\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.surface.primary : theme.palette.transparent.primary,\n },\n // disabled\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n // focused style\n '&.Mui-focusVisible': {\n // higher z-index than others\n zIndex: '10',\n // extra white border\n boxShadow: `0 0 0 2px ${theme.palette.background.primary}`,\n '&:before': {\n // move outside\n inset: '-2px',\n // add extra border radius\n borderRadius: '4px',\n },\n },\n },\n }),\n },\n {\n props: { template: 'buttons' },\n style: ({ theme }) => ({\n // container\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // reduce gap between tabs\n gap: '8px',\n },\n // hide bottom line\n '& .MuiTabs-indicator': {\n display: 'none',\n },\n // restyle tabs to buttons\n '& .MuiTab-root': {\n border: '1px solid transparent',\n padding: '6px 16px',\n borderRadius: '1000px',\n transition: 'all 0.3s ease-out',\n fontSize: '14px',\n fontWeight: '700',\n marginBottom: '2px',\n ...updateFocusRingStyle('0px', false),\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n color: theme.palette.onSurface.os500,\n },\n {\n backgroundColor: theme.palette.surface.primary,\n color: theme.palette.text.primary,\n },\n ),\n '&.Mui-selected': {\n ...getInteractiveStyle(\n {\n backgroundColor: theme.palette.brand.quarternary,\n color: theme.palette.text.primary,\n borderColor: theme.palette.brand.primary,\n },\n {\n backgroundColor: theme.palette.brand.quarternary,\n color: theme.palette.brand.primary,\n borderColor: theme.palette.brand.primary,\n },\n ),\n },\n // responsive\n [theme.breakpoints.down('md')]: {\n '&, &.Mui-selected, & .FlowTab-selectedLabel': {\n fontWeight: '400',\n },\n },\n },\n }),\n },\n {\n // variant used in the SecondaryNavigation\n props: { template: 'navigation' },\n style: ({ theme }) => ({\n // container\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // reduce gap between tabs\n gap: '4px',\n },\n // manual align\n paddingTop: '11px',\n [theme.breakpoints.down('xl')]: {\n paddingTop: '13px',\n },\n [theme.breakpoints.down('lg')]: {\n paddingTop: '8px',\n },\n // restyle tabs typography\n '& .MuiTab-root': {\n marginBottom: '11px',\n [theme.breakpoints.down('xl')]: {\n marginBottom: '13px',\n },\n [theme.breakpoints.down('lg')]: {\n marginBottom: '8px',\n },\n ...theme.typography.list,\n },\n // SSR handling\n '& .MuiTab-root .MuiTabs-indicator': {\n bottom: '-19px',\n [theme.breakpoints.down('xl')]: {\n bottom: '-21px',\n },\n [theme.breakpoints.down('lg')]: {\n bottom: '-16px',\n },\n },\n }),\n },\n {\n props: { template: 'segmented' },\n style: ({ theme }) => ({\n // used for background\n color: theme.palette.mode === 'dark' ? theme.palette.surface.primary : theme.palette.transparent.secondary,\n // container\n '& .MuiTabs-scroller': {\n backgroundColor: 'currentColor',\n borderRadius: '1000px',\n },\n '& .MuiTabs-list, & .MuiTabs-flexContainer': {\n // reduce gap between tabs\n gap: '8px',\n },\n // SSR handling\n '& .MuiTab-root .MuiTabs-indicator': {\n display: 'none',\n },\n // restyle indicator to white bordered travelling background\n '& .MuiTabs-indicator': {\n color: theme.palette.mode === 'dark' ? theme.palette.surface.secondary : theme.palette.common.white,\n // proportion\n height: '100%',\n // z-index bellow <Tab />\n zIndex: '10',\n borderRadius: '1000px',\n // make sure border from :before is not visible when no tab is selected\n overflow: 'hidden',\n '&:before': {\n inset: '0',\n borderRadius: 'inherit',\n border: `2px solid ${theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.text.primary}`,\n },\n },\n // restyle tabs\n '& .MuiTab-root': {\n margin: '0',\n borderRadius: '1000px',\n transition: 'all 0.3s ease-out',\n // proportions\n padding: '6px 16px',\n // space between icon and text\n gap: '10px',\n // z-index above indicator\n zIndex: '20',\n // icon inside\n '& .MuiSvgIcon-root': {\n fontSize: '20px',\n marginTop: '4px',\n marginBottom: '4px',\n },\n // change typography\n color: theme.palette.text.primary,\n ...getTypography('subheadline', theme.direction === 'rtl', 'small'),\n [theme.breakpoints.up('md')]: {\n ...getTypography('subheadline', theme.direction === 'rtl', 'large'),\n // update proportions\n padding: '8px 16px',\n },\n [theme.breakpoints.up('xs')]: {\n '&, &.Mui-selected, & .FlowTab-selectedLabel': {\n fontWeight: '400',\n },\n },\n // hover and focus\n '&:hover, &.Mui-focusVisible': {\n backgroundColor: theme.palette.surface.primary,\n },\n // active\n '&.Mui-selected': {\n color: theme.palette.mode === 'dark' ? theme.palette.brand.secondary : theme.palette.text.primary,\n '&:hover, &.Mui-focusVisible': {\n backgroundColor: 'transparent',\n },\n },\n // disabled\n '&.Mui-disabled': {\n color: theme.palette.disabled.tertiary,\n },\n },\n }),\n },\n ],\n};\n"],"names":["flowTabs","defaultProps","template","scrollButtons","allowScrollButtonsMobile","visibleScrollbar","variant","slots","TabsScrollButton","slotProps","scroller","ownerState","style","marginBottom","styleOverrides","root","theme","minHeight","alignItems","gap","fullWidth","flexGrow","centered","justifyContent","opacity","bottom","left","right","breakpoints","up","indicator","maxWidth","background","display","height","color","palette","mode","brand","secondary","primary","indicatorColor","text","content","position","top","backgroundColor","borderWidth","disabled","variants","props","marginLeft","marginRight","padding","inset","down","margin","paddingTop","paddingBottom","borderRadius","onSurface","os300","os700","typography","subheadline","fontWeight","os500","surface","transparent","tertiary","zIndex","boxShadow","border","transition","fontSize","updateFocusRingStyle","getInteractiveStyle","quarternary","borderColor","list","common","white","overflow","marginTop","getTypography","direction"],"mappings":"yQAMO,MAAMA,EAAyC,CACpDC,aAAc,CACZC,SAAU,aAEVC,cAAe,OACfC,0BAA0B,EAC1BC,kBAAkB,EAClBC,QAAS,aACTC,MAAO,CACLJ,cAAeK,GAEjBC,UAAW,CAGTC,SAAWC,IACuB,IAAhCA,EAAWN,kBAA8B,CACvCO,MAAO,CAAEC,aAAc,QAI/BC,eAAgB,CACdC,KAAM,EAAGC,QAAOL,iBAAY,CAC1BM,UAAW,IACXC,WAAY,SAEZC,IAAK,OACDR,EAAWS,WAAoC,cAAvBT,EAAWL,QACnC,CACE,iBAAkB,CAChBe,SAAU,MAGd,MAGAV,EAAWW,SAAW,CAAEC,eAAgB,UAAa,CAAA,EAEzD,kDAAmD,CAEjD,uBAAwB,CACtBC,QAAS,MAKb,oCAAqC,CACnCC,OAAQ,QAER,WAAY,CACVC,KAAM,IACNC,MAAO,MAKX,4CAA6C,CAC3CR,IAAK,OACL,CAACH,EAAMY,YAAYC,GAAG,OAAQ,CAC5BV,IAAK,WAIXW,UAAW,EAAGd,QAAOL,iBAAY,CAC/BoB,SAAU,OACVC,WAAY,cACZC,QAAS,QACTC,OAAQ,MACRC,MAA8B,SAAvB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B,QAAQE,MAAMC,UAAYvB,EAAMoB,QAAQM,KAAKF,YAI5G,iBAAkB,CAChBgB,OAAQ,IACRG,aAAc,SACdc,WAAY,oBAEZpB,QAAS,WAETlC,IAAK,OAELmD,OAAQ,KAER,qBAAsB,CACpBI,SAAU,OACVS,UAAW,MACXtE,aAAc,OAGhBsB,MAAOnB,EAAMoB,QAAQM,KAAKF,WACvB4C,EAAc,cAAmC,QAApBpE,EAAMqE,UAAqB,SAC3D,CAACrE,EAAMY,YAAYC,GAAG,OAAQ,IACzBuD,EAAc,cAAmC,QAApBpE,EAAMqE,UAAqB,SAE3DhC,QAAS,YAEX,CAACrC,EAAMY,YAAYC,GAAG,OAAQ,CAC5B,8CAA+C,CAC7CoC,WAAY,QAIhB,8BAA+B,CAC7BnB,gBAAiB9B,EAAMoB,QAAQ+B,QAAQ3B,SAGzC,iBAAkB,CAChBL,MAA8B,SAAvBnB,EAAMoB,QAAQC,KAAkBrB,EAAMoB,QAAQE,MAAMC,UAAYvB,EAAMoB,QAAQM,KAAKF,QAC1F,8BAA+B,CAC7BM,gBAAiB,gBAIrB,iBAAkB,CAChBX,MAAOnB,EAAMoB,QAAQY,SAASqB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const t={defaultProps:{},styleOverrides:{root:({theme:t,ownerState:a})=>({pointerEvents:"none",transition:"inherit",color:"inherit",[t.breakpoints.up("xs")]:{fontSize:"16px",lineHeight:"24px",fontWeight:"400"},..."static"===a["data-variant"]&&{...t.typography.caption1,position:"static","&, &&.MuiInputLabel-shrink":{transform:"none"},userSelect:"text",cursor:"auto",pointerEvents:"auto",transition:"none",padding:"0 8px 4px","&:not(.Mui-disabled):not(.Mui-error)":{color:t.palette.text.primary}}}),filled:t=>({transform:"translate(12px, 18px) scale(1)","&.MuiInputLabel-shrink":{transform:"translate(12px, 7px) scale(0.75)"},"&.MuiInputLabel-sizeSmall":{transform:"translate(12px, 13px) scale(1)","&.MuiInputLabel-shrink":{transform:"translate(12px, 7px) scale(0.75)"}},..."static"!==t["data-variant"]&&{"&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)":{transform:"translate(44px, 18px) scale(1)","&.MuiInputLabel-sizeSmall":{transform:"translate(44px, 13px) scale(1);"},"&.MuiInputLabel-shrink":{transform:"translate(44px, 7px) scale(0.75)"}}}}),outlined:t=>({..."static"===t["data-variant"]?{"& + .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend":{width:"0"}}:{"&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)":{transform:"translate(44px, 16px) scale(1);","&.MuiInputLabel-sizeSmall":{transform:"translate(44px, 9px) scale(1);"},"&.MuiInputLabel-shrink":{transform:"translate(14px, -9px) scale(0.75);"}}}}),standard:({ownerState:t})=>({..."static"===t["data-variant"]?{padding:"0","& + .MuiInputBase-root":{marginTop:"0"}}:{"&:has(+ .MuiInputBase-adornedStart)":{transform:"translate(32px, 20px) scale(1);","&.MuiInputLabel-sizeSmall":{transform:"translate(32px, 18px) scale(1);"},"&.MuiInputLabel-shrink":{transform:"translate(0, -1.5px) scale(0.75)"}}}})}};export{t as flowInputLabel};
|
|
1
|
+
const t={defaultProps:{},styleOverrides:{root:({theme:t,ownerState:a})=>({pointerEvents:"none",transition:"inherit",color:"inherit",[t.breakpoints.up("xs")]:{fontSize:"16px",lineHeight:"24px",fontWeight:"400"},..."static"===a["data-variant"]&&{...t.typography.caption1,position:"static","&, &&.MuiInputLabel-shrink":{transform:"none"},userSelect:"text",cursor:"auto",pointerEvents:"auto",transition:"none",padding:"0 8px 4px","&:not(.Mui-disabled):not(.Mui-error)":{color:t.palette.text.primary}},..."static"!==a["data-variant"]&&{"&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart):not(:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)) + .MuiInputBase-root .MuiInputBase-input::-webkit-input-placeholder":{opacity:"0"}}}),filled:t=>({transform:"translate(12px, 18px) scale(1)","&.MuiInputLabel-shrink":{transform:"translate(12px, 7px) scale(0.75)"},"&.MuiInputLabel-sizeSmall":{transform:"translate(12px, 13px) scale(1)","&.MuiInputLabel-shrink":{transform:"translate(12px, 7px) scale(0.75)"}},..."static"!==t["data-variant"]&&{"&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)":{transform:"translate(44px, 18px) scale(1)","&.MuiInputLabel-sizeSmall":{transform:"translate(44px, 13px) scale(1);"},"&.MuiInputLabel-shrink:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)":{transform:"translate(44px, 7px) scale(0.75)"}}}}),outlined:t=>({..."static"===t["data-variant"]?{"& + .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend":{width:"0"}}:{"&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)":{transform:"translate(44px, 16px) scale(1);","&.MuiInputLabel-sizeSmall":{transform:"translate(44px, 9px) scale(1);"},"&.MuiInputLabel-shrink:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)":{transform:"translate(14px, -9px) scale(0.75);"},"&:not(:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)) + .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend":{maxWidth:"0.01px"}}}}),standard:({ownerState:t})=>({..."static"===t["data-variant"]?{padding:"0","& + .MuiInputBase-root":{marginTop:"0"}}:{"&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)":{transform:"translate(32px, 20px) scale(1);","&.MuiInputLabel-sizeSmall":{transform:"translate(32px, 18px) scale(1);"},"&.MuiInputLabel-shrink:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)":{transform:"translate(0, -1.5px) scale(0.75)"}}}})}};export{t as flowInputLabel};
|
|
2
2
|
//# sourceMappingURL=inputLabel.theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputLabel.theme.js","sources":["../../../src/materialui/textfield/inputLabel.theme.ts"],"sourcesContent":["import { Components, Theme } from '@mui/material/styles';\n\nexport const flowInputLabel: Components<Theme>['MuiInputLabel'] = {\n defaultProps: {},\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n // remove pointer events to prevent blur and focus formControl\n pointerEvents: 'none',\n transition: 'inherit',\n color: 'inherit',\n [theme.breakpoints.up('xs')]: {\n fontSize: '16px',\n lineHeight: '24px',\n fontWeight: '400',\n },\n ...(ownerState['data-variant'] === 'static' && {\n ...theme.typography.caption1,\n position: 'static',\n '&, &&.MuiInputLabel-shrink': {\n transform: 'none',\n },\n userSelect: 'text',\n cursor: 'auto',\n pointerEvents: 'auto',\n transition: 'none',\n padding: '0 8px 4px',\n // overwrite higher priority style from formLabel\n '&:not(.Mui-disabled):not(.Mui-error)': {\n color: theme.palette.text.primary,\n },\n }),\n }),\n filled: (ownerState) => ({\n transform: 'translate(12px, 18px) scale(1)',\n '&.MuiInputLabel-shrink': {\n transform: 'translate(12px, 7px) scale(0.75)',\n },\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(12px, 13px) scale(1)',\n '&.MuiInputLabel-shrink': {\n transform: 'translate(12px, 7px) scale(0.75)',\n },\n },\n ...(ownerState['data-variant'] !== 'static' && {\n '&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)': {\n transform: 'translate(44px, 18px) scale(1)',\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(44px, 13px) scale(1);',\n },\n '&.MuiInputLabel-shrink': {\n transform: 'translate(44px, 7px) scale(0.75)',\n },\n },\n }),\n }),\n outlined: (ownerState) => ({\n ...(ownerState['data-variant'] === 'static'\n ? {\n // do not show 'border space' created by legend where normally labels go in\n '& + .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend': {\n width: '0',\n },\n }\n : {\n '&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)': {\n transform: 'translate(44px, 16px) scale(1);',\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(44px, 9px) scale(1);',\n },\n '&.MuiInputLabel-shrink': {\n transform: 'translate(14px, -9px) scale(0.75);',\n },\n },\n }),\n }),\n standard: ({ ownerState }) => ({\n ...(ownerState['data-variant'] === 'static'\n ? {\n padding: '0',\n '& + .MuiInputBase-root': {\n marginTop: '0',\n },\n }\n : {\n '&:has(+ .MuiInputBase-adornedStart)': {\n transform: 'translate(32px, 20px) scale(1);',\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(32px, 18px) scale(1);',\n },\n '&.MuiInputLabel-shrink': {\n transform: 'translate(0, -1.5px) scale(0.75)',\n },\n },\n }),\n }),\n },\n};\n"],"names":["flowInputLabel","defaultProps","styleOverrides","root","theme","ownerState","pointerEvents","transition","color","breakpoints","up","fontSize","lineHeight","fontWeight","typography","caption1","position","transform","userSelect","cursor","padding","palette","text","primary","filled","outlined","width","standard","marginTop"],"mappings":"AAEO,MAAMA,EAAqD,CAChEC,aAAc,CAAA,EACdC,eAAgB,CACdC,KAAM,EAAGC,QAAOC,iBAAY,CAE1BC,cAAe,OACfC,WAAY,UACZC,MAAO,UACP,CAACJ,EAAMK,YAAYC,GAAG,OAAQ,CAC5BC,SAAU,OACVC,WAAY,OACZC,WAAY,UAEqB,WAA/BR,EAAW,iBAAgC,IAC1CD,EAAMU,WAAWC,SACpBC,SAAU,SACV,6BAA8B,CAC5BC,UAAW,QAEbC,WAAY,OACZC,OAAQ,OACRb,cAAe,OACfC,WAAY,OACZa,QAAS,YAET,uCAAwC,CACtCZ,MAAOJ,EAAMiB,QAAQC,KAAKC,
|
|
1
|
+
{"version":3,"file":"inputLabel.theme.js","sources":["../../../src/materialui/textfield/inputLabel.theme.ts"],"sourcesContent":["import { Components, Theme } from '@mui/material/styles';\n\nexport const flowInputLabel: Components<Theme>['MuiInputLabel'] = {\n defaultProps: {},\n styleOverrides: {\n root: ({ theme, ownerState }) => ({\n // remove pointer events to prevent blur and focus formControl\n pointerEvents: 'none',\n transition: 'inherit',\n color: 'inherit',\n [theme.breakpoints.up('xs')]: {\n fontSize: '16px',\n lineHeight: '24px',\n fontWeight: '400',\n },\n ...(ownerState['data-variant'] === 'static' && {\n ...theme.typography.caption1,\n position: 'static',\n '&, &&.MuiInputLabel-shrink': {\n transform: 'none',\n },\n userSelect: 'text',\n cursor: 'auto',\n pointerEvents: 'auto',\n transition: 'none',\n padding: '0 8px 4px',\n // overwrite higher priority style from formLabel\n '&:not(.Mui-disabled):not(.Mui-error)': {\n color: theme.palette.text.primary,\n },\n }),\n ...(ownerState['data-variant'] !== 'static' && {\n // hide placeholder in all variants while the label with startAdornment rests over the input,\n '&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart):not(:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)) + .MuiInputBase-root .MuiInputBase-input::-webkit-input-placeholder':\n {\n opacity: '0',\n },\n }),\n }),\n filled: (ownerState) => ({\n transform: 'translate(12px, 18px) scale(1)',\n '&.MuiInputLabel-shrink': {\n transform: 'translate(12px, 7px) scale(0.75)',\n },\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(12px, 13px) scale(1)',\n '&.MuiInputLabel-shrink': {\n transform: 'translate(12px, 7px) scale(0.75)',\n },\n },\n ...(ownerState['data-variant'] !== 'static' && {\n '&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)': {\n transform: 'translate(44px, 18px) scale(1)',\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(44px, 13px) scale(1);',\n },\n // float only with real focus, value or the Flow-ForceShrink opt-out class,\n // @mui otherwise forces shrink with startAdornment, see https://github.com/mui/material-ui/issues/13898\n '&.MuiInputLabel-shrink:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)': {\n transform: 'translate(44px, 7px) scale(0.75)',\n },\n },\n }),\n }),\n outlined: (ownerState) => ({\n ...(ownerState['data-variant'] === 'static'\n ? {\n // do not show 'border space' created by legend where normally labels go in\n '& + .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend': {\n width: '0',\n },\n }\n : {\n '&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)': {\n transform: 'translate(44px, 16px) scale(1);',\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(44px, 9px) scale(1);',\n },\n // float only with real focus, value or the Flow-ForceShrink opt-out class,\n // @mui otherwise forces shrink with startAdornment, see https://github.com/mui/material-ui/issues/13898\n '&.MuiInputLabel-shrink:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)': {\n transform: 'translate(14px, -9px) scale(0.75);',\n },\n // close the border notch while the label rests, 0.01px matches the @mui closed notch value\n '&:not(:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)) + .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline legend':\n {\n maxWidth: '0.01px',\n },\n },\n }),\n }),\n standard: ({ ownerState }) => ({\n ...(ownerState['data-variant'] === 'static'\n ? {\n padding: '0',\n '& + .MuiInputBase-root': {\n marginTop: '0',\n },\n }\n : {\n '&:has(+ .MuiInputBase-adornedStart .MuiInputAdornment-positionStart)': {\n transform: 'translate(32px, 20px) scale(1);',\n '&.MuiInputLabel-sizeSmall': {\n transform: 'translate(32px, 18px) scale(1);',\n },\n // float only with real focus, value or the Flow-ForceShrink opt-out class,\n // @mui otherwise forces shrink with startAdornment, see https://github.com/mui/material-ui/issues/13898\n '&.MuiInputLabel-shrink:where(.Mui-focused, .MuiFormLabel-filled, .Flow-ForceShrink)': {\n transform: 'translate(0, -1.5px) scale(0.75)',\n },\n },\n }),\n }),\n },\n};\n"],"names":["flowInputLabel","defaultProps","styleOverrides","root","theme","ownerState","pointerEvents","transition","color","breakpoints","up","fontSize","lineHeight","fontWeight","typography","caption1","position","transform","userSelect","cursor","padding","palette","text","primary","opacity","filled","outlined","width","maxWidth","standard","marginTop"],"mappings":"AAEO,MAAMA,EAAqD,CAChEC,aAAc,CAAA,EACdC,eAAgB,CACdC,KAAM,EAAGC,QAAOC,iBAAY,CAE1BC,cAAe,OACfC,WAAY,UACZC,MAAO,UACP,CAACJ,EAAMK,YAAYC,GAAG,OAAQ,CAC5BC,SAAU,OACVC,WAAY,OACZC,WAAY,UAEqB,WAA/BR,EAAW,iBAAgC,IAC1CD,EAAMU,WAAWC,SACpBC,SAAU,SACV,6BAA8B,CAC5BC,UAAW,QAEbC,WAAY,OACZC,OAAQ,OACRb,cAAe,OACfC,WAAY,OACZa,QAAS,YAET,uCAAwC,CACtCZ,MAAOJ,EAAMiB,QAAQC,KAAKC,aAGK,WAA/BlB,EAAW,iBAAgC,CAE7C,8MACE,CACEmB,QAAS,QAIjBC,OAASpB,IAAU,CACjBY,UAAW,iCACX,yBAA0B,CACxBA,UAAW,oCAEb,4BAA6B,CAC3BA,UAAW,iCACX,yBAA0B,CACxBA,UAAW,wCAGoB,WAA/BZ,EAAW,iBAAgC,CAC7C,uEAAwE,CACtEY,UAAW,iCACX,4BAA6B,CAC3BA,UAAW,mCAIb,sFAAuF,CACrFA,UAAW,wCAKnBS,SAAWrB,IAAU,IACgB,WAA/BA,EAAW,gBACX,CAEE,qEAAsE,CACpEsB,MAAO,MAGX,CACE,uEAAwE,CACtEV,UAAW,kCACX,4BAA6B,CAC3BA,UAAW,kCAIb,sFAAuF,CACrFA,UAAW,sCAGb,wIACE,CACEW,SAAU,cAKxBC,SAAU,EAAGxB,iBAAY,IACY,WAA/BA,EAAW,gBACX,CACEe,QAAS,IACT,yBAA0B,CACxBU,UAAW,MAGf,CACE,uEAAwE,CACtEb,UAAW,kCACX,4BAA6B,CAC3BA,UAAW,mCAIb,sFAAuF,CACrFA,UAAW"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@skodaflow/web-library","version":"8.3.
|
|
1
|
+
{"name":"@skodaflow/web-library","version":"8.3.2","description":"Implementation of Skoda Flow Design System with Material UI as core library.","author":"Skoda Auto","license":"SKODA AUTO Library EULA 1.1","peerDependencies":{"@emotion/cache":"^11.14.0","@emotion/react":"^11.14.0","@emotion/styled":"^11.14.1","@mui/material":"^7.3.10 || ^9.0.0","@mui/system":"^7.3.10 || ^9.0.0","@mui/x-date-pickers":"^9.0.0","country-flag-icons":"^1.6.15","react":"^18.3.1 || ^19.2.4","react-dom":"^18.3.1 || ^19.2.4","swiper":"^12.1.3"},"dependencies":{"@skodaflow/web-tokens":"3.2.0","stylis":"4.4.0","stylis-plugin-rtl":"2.1.1","tslib":"2.8.1"},"sideEffects":false,"main":"./cjs/index.js","browser":"./index.js","module":"./index.js","types":"./index.d.ts"}
|