@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,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),n=require("../../components/icon/stroke/ChevronDownIcon.js"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),n=require("../../components/icon/stroke/ChevronDownIcon.js"),i=require("../../components/icon/stroke/CloseIcon.js"),o=require("../menu/menu.theme.js"),r=require("../menu/menuItem.theme.js"),p=require("../button/interactive.js");const u={defaultProps:{onPointerDown:e=>{const t=e.currentTarget.querySelector(".MuiFormControl-root");t&&!t.contains(e.target)&&t.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:e.pointerType}))},popupIcon:e.jsx(n.ChevronDownIcon,{}),clearIcon:e.jsx(i.CloseIcon,{}),noOptionsText:"No matching results",slots:{listbox:t.MenuList},slotProps:{chip:{onClick:e=>{e.currentTarget.querySelector(".MuiChip-deleteIcon")?.dispatchEvent(new MouseEvent("click",{bubbles:!0}))}}},renderOption:({key:n,...i},o,r,p)=>e.jsxs(t.MenuItem,{...i,children:[p?.multiple&&e.jsx(t.Checkbox,{checked:r.selected,tabIndex:-1}),e.jsx(t.ListItemText,{children:p.getOptionLabel(o)})]},n)},styleOverrides:{root:({theme:e})=>({"& .MuiAutocomplete-tag + .MuiAutocomplete-input":{"&::-webkit-input-placeholder":{color:"transparent"}},"& .MuiFilledInput-root":{gap:e.spacing(.5),padding:"24px 12px 8px","&.MuiInputBase-hiddenLabel":{padding:"18px 12px 14px"},"&.MuiInputBase-sizeSmall":{padding:"22px 12px 4px","&.MuiInputBase-hiddenLabel":{padding:"14px 12px 12px"}},"&, &.MuiInputBase-sizeSmall, &.MuiInputBase-hiddenLabel, &.MuiInputBase-sizeSmall.MuiInputBase-hiddenLabel":{"& .MuiFilledInput-input":{padding:"0"}}},"& .MuiOutlinedInput-root":{gap:e.spacing(.5),padding:"16.5px 14px","&.MuiInputBase-sizeSmall":{padding:"8.5px 14px"},"&, &.MuiInputBase-sizeSmall":{"& .MuiOutlinedInput-input":{padding:"0"}}},"& .MuiInput-root":{gap:e.spacing(.5),padding:"4px 0 5px","&.MuiInputBase-sizeSmall":{padding:"1px 0 5px"},"&, &.MuiInputBase-sizeSmall":{"& .MuiInput-input":{padding:"0"}}}}),popupIndicator:{transition:"none",...p.getInteractiveStyle({color:"inherit",backgroundColor:"transparent"},{color:"inherit",backgroundColor:"transparent"}),"& .MuiSvgIcon-root":{fontSize:"17px",flexShrink:"0"}},clearIndicator:{visibility:"visible",transition:"none",...p.getInteractiveStyle({color:"inherit",backgroundColor:"transparent"},{color:"inherit",backgroundColor:"transparent"}),"& .MuiSvgIcon-root":{fontSize:"17px",flexShrink:"0"},"& + .MuiAutocomplete-popupIndicator":{display:"none"}},tag:{margin:"0","&.MuiChip-root":{border:"none",color:"inherit",padding:"0","&, &:hover, &.Mui-focusVisible, &:active":{backgroundColor:"transparent"},fontSize:"inherit",lineHeight:"inherit","& .MuiChip-label":{padding:"0"},"& .MuiChip-deleteIcon":{display:"none"},"&:has(~ .MuiAutocomplete-tag):after":{content:'","'},"&:not(:has(.MuiChip-deleteIcon))":{cursor:"auto"}}},popper:{"& .MuiAutocomplete-listbox":{padding:"0",maxHeight:"240px",overflow:"auto"}},paper:o.flowMenu.styleOverrides.paper,option:r.flowMenuItem.styleOverrides.root,noOptions:[r.flowMenuItem.styleOverrides.root,{pointerEvents:"none",cursor:"auto"}]}};exports.flowAutocomplete=u;
|
|
2
2
|
//# sourceMappingURL=autocomplete.theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.theme.js","sources":["../../../../../src/materialui/autocomplete/autocomplete.theme.tsx"],"sourcesContent":["import { Components, Theme, ComponentsOverrides } from '@mui/material/styles';\nimport { Box, MenuList, MenuItem, ListItemText, Checkbox } from '@mui/material';\nimport { ChevronDownIcon } from '@/src/components/icon/stroke/ChevronDownIcon';\nimport { CloseIcon } from '@/src/components/icon/stroke/CloseIcon';\nimport { flowMenu } from '../menu/menu.theme';\nimport { flowMenuItem } from '../menu/menuItem.theme';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\n\nexport const flowAutocomplete: Components<Theme>['MuiAutocomplete'] = {\n defaultProps: {\n // ensure clicking on AutoComplete sent event to FormControl to correctly handle FocusRing\n onPointerDown: (e) => {\n const formControlEl = e.currentTarget.querySelector('.MuiFormControl-root');\n // we have formControl, and click is outside it (clicking on margin from helperText)\n if (formControlEl && !formControlEl.contains(e.target as Node)) {\n // sent pointerDown event to it\n formControlEl.dispatchEvent(\n new PointerEvent('pointerdown', {\n bubbles: true,\n cancelable: true,\n pointerType: e.pointerType,\n }),\n );\n }\n },\n popupIcon: <ChevronDownIcon />,\n clearIcon: <CloseIcon />,\n noOptionsText: 'No matching results',\n slots: {\n // we are replacing listbox to remove Autocomplete styling and match with Menu design\n listbox: MenuList,\n },\n // option matched with design of menu with Checkbox for multiple choices\n renderOption: ({ key, ...rest }, option, state, ownerState) => {\n return (\n <MenuItem key={key} {...rest}>\n {ownerState?.multiple && <Checkbox checked={state.selected} tabIndex={-1} />}\n <ListItemText>{ownerState.getOptionLabel(option)}</ListItemText>\n </MenuItem>\n );\n },\n renderValue: (value, _getCustomizedItemProps, ownerState) => {\n const values = Array.isArray(value) ? value : [value];\n return values.map((v, idx) => {\n const label = ownerState.getOptionLabel(v);\n return (\n <Box key={`${v}`} component=\"span\" className=\"FlowAutoComplete-value\">\n {`${label}${idx + 1 === values.length ? '' : ', '}`}\n </Box>\n );\n });\n },\n },\n styleOverrides: {\n root: ({ theme }) => ({\n // when value is present\n '& .FlowAutoComplete-value + .MuiAutocomplete-input': {\n // hide placeholder\n '&::-webkit-input-placeholder': {\n color: 'transparent',\n },\n },\n // overwrite autoComplete default styling and match with TextField\n '& .MuiFilledInput-root': {\n // gap between tags and input\n gap: theme.spacing(0.5),\n // field proportions matched with textfield\n padding: '24px 12px 8px',\n // hidden label for variant with placeholder\n '&.MuiInputBase-hiddenLabel': {\n padding: '18px 12px 14px',\n },\n // small\n '&.MuiInputBase-sizeSmall': {\n padding: '22px 12px 4px',\n '&.MuiInputBase-hiddenLabel': {\n padding: '14px 12px 12px',\n },\n },\n // moved padding from input to allow wrap with too many tags\n '&, &.MuiInputBase-sizeSmall, &.MuiInputBase-hiddenLabel, &.MuiInputBase-sizeSmall.MuiInputBase-hiddenLabel': {\n '& .MuiFilledInput-input': {\n padding: '0',\n },\n },\n },\n }),\n // select arrow\n popupIndicator: {\n // remove default style\n transition: 'none',\n ...getInteractiveStyle(\n { color: 'inherit', backgroundColor: 'transparent' },\n { color: 'inherit', backgroundColor: 'transparent' },\n ),\n // style icon\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n flexShrink: '0',\n },\n },\n // 'x' clear button\n clearIndicator: {\n // keep always visible once the value is selected\n visibility: 'visible',\n // remove default style\n transition: 'none',\n ...getInteractiveStyle(\n { color: 'inherit', backgroundColor: 'transparent' },\n { color: 'inherit', backgroundColor: 'transparent' },\n ),\n // style icon\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n flexShrink: '0',\n },\n // select arrow next to it\n '& + .MuiAutocomplete-popupIndicator': {\n // hide it\n display: 'none',\n },\n },\n // chip tags, no longer used as we overwrite renderTags fn\n tag: {\n // space between multiple chips and limit tags text\n margin: '0',\n '&.MuiChip-root': {\n // reduce size\n padding: '0px 8px',\n '& .MuiChip-deleteIcon': {\n '&, &:last-of-type': {\n marginLeft: '2px',\n },\n },\n },\n },\n // select popover\n popper: {\n // direct style of listBox is not used, as it is overwritten via slots property to remove default styling\n '& .MuiAutocomplete-listbox': {\n padding: '0',\n maxHeight: '240px',\n // necessary to make scroll with keyboard navigation work\n overflow: 'auto',\n },\n },\n // holder of list\n paper: flowMenu.styleOverrides.paper as ComponentsOverrides<Theme>['MuiAutocomplete'],\n // list options\n option: flowMenuItem.styleOverrides.root as ComponentsOverrides<Theme>['MuiAutocomplete'],\n // no matching result\n noOptions: [\n flowMenuItem.styleOverrides.root as ComponentsOverrides<Theme>['MuiAutocomplete'],\n {\n pointerEvents: 'none',\n cursor: 'auto',\n },\n ],\n },\n};\n"],"names":["flowAutocomplete","defaultProps","onPointerDown","e","formControlEl","currentTarget","querySelector","contains","target","dispatchEvent","PointerEvent","bubbles","cancelable","pointerType","popupIcon","_jsx","ChevronDownIcon","clearIcon","CloseIcon","noOptionsText","slots","listbox","MenuList","renderOption","key","rest","option","state","ownerState","_jsxs","MenuItem","multiple","Checkbox","checked","selected","tabIndex","ListItemText","getOptionLabel","renderValue","value","_getCustomizedItemProps","values","Array","isArray","map","v","idx","label","Box","component","className","children","length","styleOverrides","root","theme","color","gap","spacing","padding","popupIndicator","transition","getInteractiveStyle","backgroundColor","fontSize","flexShrink","clearIndicator","visibility","display","tag","margin","marginLeft","popper","maxHeight","overflow","paper","flowMenu","flowMenuItem","noOptions","pointerEvents","cursor"],"mappings":"+SAQO,MAAMA,EAAyD,CACpEC,aAAc,CAEZC,cAAgBC,IACd,MAAMC,EAAgBD,EAAEE,cAAcC,cAAc,wBAEhDF,IAAkBA,EAAcG,SAASJ,EAAEK,SAE7CJ,EAAcK,cACZ,IAAIC,aAAa,cAAe,CAC9BC,SAAS,EACTC,YAAY,EACZC,YAAaV,EAAEU,gBAKvBC,UAAWC,EAAAA,IAACC,EAAAA,gBAAe,IAC3BC,UAAWF,EAAAA,IAACG,EAAAA,UAAS,IACrBC,cAAe,sBACfC,MAAO,CAELC,QAASC,EAAAA,UAGXC,aAAc,EAAGC,SAAQC,GAAQC,EAAQC,EAAOC,IAE5CC,EAAAA,KAACC,EAAAA,SAAQ,IAAeL,YACrBG,GAAYG,UAAYhB,EAAAA,IAACiB,EAAAA,SAAQ,CAACC,QAASN,EAAMO,SAAUC,UAAU,IACtEpB,MAACqB,EAAAA,uBAAcR,EAAWS,eAAeX,OAF5BF,GAMnBc,YAAa,CAACC,EAAOC,EAAyBZ,KAC5C,MAAMa,EAASC,MAAMC,QAAQJ,GAASA,EAAQ,CAACA,GAC/C,OAAOE,EAAOG,IAAI,CAACC,EAAGC,KACpB,MAAMC,EAAQnB,EAAWS,eAAeQ,GACxC,OACE9B,EAAAA,IAACiC,MAAG,CAAcC,UAAU,OAAOC,UAAU,yBAAwBC,SAClE,GAAGJ,IAAQD,EAAM,IAAML,EAAOW,OAAS,GAAK,QADrC,GAAGP,SAOrBQ,eAAgB,CACdC,KAAM,EAAGC,YAAO,CAEd,qDAAsD,CAEpD,+BAAgC,CAC9BC,MAAO,gBAIX,yBAA0B,CAExBC,IAAKF,EAAMG,QAAQ,IAEnBC,QAAS,gBAET,6BAA8B,CAC5BA,QAAS,kBAGX,2BAA4B,CAC1BA,QAAS,gBACT,6BAA8B,CAC5BA,QAAS,mBAIb,6GAA8G,CAC5G,0BAA2B,CACzBA,QAAS,SAMjBC,eAAgB,CAEdC,WAAY,UACTC,sBACD,CAAEN,MAAO,UAAWO,gBAAiB,eACrC,CAAEP,MAAO,UAAWO,gBAAiB,gBAGvC,qBAAsB,CACpBC,SAAU,OACVC,WAAY,MAIhBC,eAAgB,CAEdC,WAAY,UAEZN,WAAY,UACTC,sBACD,CAAEN,MAAO,UAAWO,gBAAiB,eACrC,CAAEP,MAAO,UAAWO,gBAAiB,gBAGvC,qBAAsB,CACpBC,SAAU,OACVC,WAAY,KAGd,sCAAuC,CAErCG,QAAS,SAIbC,IAAK,CAEHC,OAAQ,IACR,iBAAkB,CAEhBX,QAAS,UACT,wBAAyB,CACvB,oBAAqB,CACnBY,WAAY,UAMpBC,OAAQ,CAEN,6BAA8B,CAC5Bb,QAAS,IACTc,UAAW,QAEXC,SAAU,SAIdC,MAAOC,EAAAA,SAASvB,eAAesB,MAE/BjD,OAAQmD,EAAAA,aAAaxB,eAAeC,KAEpCwB,UAAW,CACTD,EAAAA,aAAaxB,eAAeC,KAC5B,CACEyB,cAAe,OACfC,OAAQ"}
|
|
1
|
+
{"version":3,"file":"autocomplete.theme.js","sources":["../../../../../src/materialui/autocomplete/autocomplete.theme.tsx"],"sourcesContent":["import { Components, Theme, ComponentsOverrides } from '@mui/material/styles';\nimport { MenuList, MenuItem, ListItemText, Checkbox } from '@mui/material';\nimport { ChevronDownIcon } from '@/src/components/icon/stroke/ChevronDownIcon';\nimport { CloseIcon } from '@/src/components/icon/stroke/CloseIcon';\nimport { flowMenu } from '../menu/menu.theme';\nimport { flowMenuItem } from '../menu/menuItem.theme';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\n\nexport const flowAutocomplete: Components<Theme>['MuiAutocomplete'] = {\n defaultProps: {\n // ensure clicking on AutoComplete sent event to FormControl to correctly handle FocusRing\n onPointerDown: (e) => {\n const formControlEl = e.currentTarget.querySelector('.MuiFormControl-root');\n // we have formControl, and click is outside it (clicking on margin from helperText)\n if (formControlEl && !formControlEl.contains(e.target as Node)) {\n // sent pointerDown event to it\n formControlEl.dispatchEvent(\n new PointerEvent('pointerdown', {\n bubbles: true,\n cancelable: true,\n pointerType: e.pointerType,\n }),\n );\n }\n },\n popupIcon: <ChevronDownIcon />,\n clearIcon: <CloseIcon />,\n noOptionsText: 'No matching results',\n slots: {\n // we are replacing listbox to remove Autocomplete styling and match with Menu design\n listbox: MenuList,\n },\n slotProps: {\n chip: {\n // whole value removes itself with click, as its delete icon is hidden by the tag styling\n onClick: (e) => {\n // delete icon is an svg element without click(), dispatch the event manually\n e.currentTarget\n .querySelector('.MuiChip-deleteIcon')\n ?.dispatchEvent(new MouseEvent('click', { bubbles: true }));\n },\n },\n },\n // option matched with design of menu with Checkbox for multiple choices\n renderOption: ({ key, ...rest }, option, state, ownerState) => {\n return (\n <MenuItem key={key} {...rest}>\n {ownerState?.multiple && <Checkbox checked={state.selected} tabIndex={-1} />}\n <ListItemText>{ownerState.getOptionLabel(option)}</ListItemText>\n </MenuItem>\n );\n },\n },\n styleOverrides: {\n root: ({ theme }) => ({\n // when value is present\n '& .MuiAutocomplete-tag + .MuiAutocomplete-input': {\n // hide placeholder\n '&::-webkit-input-placeholder': {\n color: 'transparent',\n },\n },\n // overwrite autoComplete default styling and match with TextField\n '& .MuiFilledInput-root': {\n // gap between tags and input\n gap: theme.spacing(0.5),\n // field proportions matched with textfield\n padding: '24px 12px 8px',\n // hidden label for variant with placeholder\n '&.MuiInputBase-hiddenLabel': {\n padding: '18px 12px 14px',\n },\n // small\n '&.MuiInputBase-sizeSmall': {\n padding: '22px 12px 4px',\n '&.MuiInputBase-hiddenLabel': {\n padding: '14px 12px 12px',\n },\n },\n // moved padding from input to allow wrap with too many tags\n '&, &.MuiInputBase-sizeSmall, &.MuiInputBase-hiddenLabel, &.MuiInputBase-sizeSmall.MuiInputBase-hiddenLabel': {\n '& .MuiFilledInput-input': {\n padding: '0',\n },\n },\n },\n '& .MuiOutlinedInput-root': {\n // gap between tags and input\n gap: theme.spacing(0.5),\n // field proportions matched with textfield\n padding: '16.5px 14px',\n // small\n '&.MuiInputBase-sizeSmall': {\n padding: '8.5px 14px',\n },\n // moved padding from input to allow wrap with too many tags\n '&, &.MuiInputBase-sizeSmall': {\n '& .MuiOutlinedInput-input': {\n padding: '0',\n },\n },\n },\n '& .MuiInput-root': {\n // gap between tags and input\n gap: theme.spacing(0.5),\n // field proportions matched with textfield\n padding: '4px 0 5px',\n // small\n '&.MuiInputBase-sizeSmall': {\n padding: '1px 0 5px',\n },\n // moved padding from input to allow wrap with too many tags\n '&, &.MuiInputBase-sizeSmall': {\n '& .MuiInput-input': {\n padding: '0',\n },\n },\n },\n }),\n // select arrow\n popupIndicator: {\n // remove default style\n transition: 'none',\n ...getInteractiveStyle(\n { color: 'inherit', backgroundColor: 'transparent' },\n { color: 'inherit', backgroundColor: 'transparent' },\n ),\n // style icon\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n flexShrink: '0',\n },\n },\n // 'x' clear button\n clearIndicator: {\n // keep always visible once the value is selected\n visibility: 'visible',\n // remove default style\n transition: 'none',\n ...getInteractiveStyle(\n { color: 'inherit', backgroundColor: 'transparent' },\n { color: 'inherit', backgroundColor: 'transparent' },\n ),\n // style icon\n '& .MuiSvgIcon-root': {\n fontSize: '17px',\n flexShrink: '0',\n },\n // select arrow next to it\n '& + .MuiAutocomplete-popupIndicator': {\n // hide it\n display: 'none',\n },\n },\n // chip tags styled as plain comma-separated text to match Flow design,\n tag: {\n margin: '0',\n // higher specificity\n '&.MuiChip-root': {\n // remove chip style\n border: 'none',\n color: 'inherit',\n padding: '0',\n '&, &:hover, &.Mui-focusVisible, &:active': {\n backgroundColor: 'transparent',\n },\n // match input typography\n fontSize: 'inherit',\n lineHeight: 'inherit',\n '& .MuiChip-label': {\n padding: '0',\n },\n // hide delete icon as we use whole click\n '& .MuiChip-deleteIcon': {\n display: 'none',\n },\n // comma separator between values\n '&:has(~ .MuiAutocomplete-tag):after': {\n content: '\",\"',\n },\n // read-only values cannot be removed with click\n '&:not(:has(.MuiChip-deleteIcon))': {\n cursor: 'auto',\n },\n },\n },\n // select popover\n popper: {\n // direct style of listBox is not used, as it is overwritten via slots property to remove default styling\n '& .MuiAutocomplete-listbox': {\n padding: '0',\n maxHeight: '240px',\n // necessary to make scroll with keyboard navigation work\n overflow: 'auto',\n },\n },\n // holder of list\n paper: flowMenu.styleOverrides.paper as ComponentsOverrides<Theme>['MuiAutocomplete'],\n // list options\n option: flowMenuItem.styleOverrides.root as ComponentsOverrides<Theme>['MuiAutocomplete'],\n // no matching result\n noOptions: [\n flowMenuItem.styleOverrides.root as ComponentsOverrides<Theme>['MuiAutocomplete'],\n {\n pointerEvents: 'none',\n cursor: 'auto',\n },\n ],\n },\n};\n"],"names":["flowAutocomplete","defaultProps","onPointerDown","e","formControlEl","currentTarget","querySelector","contains","target","dispatchEvent","PointerEvent","bubbles","cancelable","pointerType","popupIcon","_jsx","ChevronDownIcon","clearIcon","CloseIcon","noOptionsText","slots","listbox","MenuList","slotProps","chip","onClick","MouseEvent","renderOption","key","rest","option","state","ownerState","_jsxs","MenuItem","multiple","Checkbox","checked","selected","tabIndex","ListItemText","getOptionLabel","styleOverrides","root","theme","color","gap","spacing","padding","popupIndicator","transition","getInteractiveStyle","backgroundColor","fontSize","flexShrink","clearIndicator","visibility","display","tag","margin","border","lineHeight","content","cursor","popper","maxHeight","overflow","paper","flowMenu","flowMenuItem","noOptions","pointerEvents"],"mappings":"+SAQO,MAAMA,EAAyD,CACpEC,aAAc,CAEZC,cAAgBC,IACd,MAAMC,EAAgBD,EAAEE,cAAcC,cAAc,wBAEhDF,IAAkBA,EAAcG,SAASJ,EAAEK,SAE7CJ,EAAcK,cACZ,IAAIC,aAAa,cAAe,CAC9BC,SAAS,EACTC,YAAY,EACZC,YAAaV,EAAEU,gBAKvBC,UAAWC,EAAAA,IAACC,EAAAA,gBAAe,IAC3BC,UAA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BAAsB,CACpBC,SAAU,OACVC,WAAY,KAGd,sCAAuC,CAErCG,QAAS,SAIbC,IAAK,CACHC,OAAQ,IAER,iBAAkB,CAEhBC,OAAQ,OACRf,MAAO,UACPG,QAAS,IACT,2CAA4C,CAC1CI,gBAAiB,eAGnBC,SAAU,UACVQ,WAAY,UACZ,mBAAoB,CAClBb,QAAS,KAGX,wBAAyB,CACvBS,QAAS,QAGX,sCAAuC,CACrCK,QAAS,OAGX,mCAAoC,CAClCC,OAAQ,UAKdC,OAAQ,CAEN,6BAA8B,CAC5BhB,QAAS,IACTiB,UAAW,QAEXC,SAAU,SAIdC,MAAOC,EAAAA,SAAS1B,eAAeyB,MAE/BrC,OAAQuC,EAAAA,aAAa3B,eAAeC,KAEpC2B,UAAW,CACTD,EAAAA,aAAa3B,eAAeC,KAC5B,CACE4B,cAAe,OACfR,OAAQ"}
|
|
@@ -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":"oGAKO,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,WAGVgB,EAAAA,kBAAkBnB,GAErB,iBAAkB,CAChBoB,QAAS,OAGbC,UAAW,EAAGpB,iBAAY,CACxBO,WAAY,IAEZc,YAAa,OACbC,WAAY,OACY,UAApBtB,EAAWa,MAAoB,CACjCQ,YAAa,UAES,UAApBrB,EAAWa,MAAoB,CACjCQ,YAAa,UAGjBE,QAAS,EAAGvB,iBAAY,CACtBO,WAAY,IAEZc,YAAa,IACbC,WAAY,UACY,U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QAAQG,UAAUkC,WAKvC,CACET,MAAO,CAAE5D,QAAS,aAAc6B,MAAO,SACvCgC,MAAO,EAAG1D,YAAO,IACZ2B,sBACD,CACED,MAAO1B,EAAM6B,QAAQW,MAAML,MAE7B,CACET,MAAO1B,EAAM6B,QAAQW,MAAMC,UAKnC,CACEgB,MAAO,CAAE5D,QAAS,YAClB6D,MAAO,EAAG1D,YAAO,CAEfkB,aAAc,MACdX,QAAS,UAET6D,UAAW,OACXL,WAAY,MACZlD,SAAU,OACVE,WAAY,OACZ+C,cAAe,SACf,KAAM,CACJO,eAAgB,YAChBC,oBAAqB,eACrBC,wBAAyB,MACzBC,oBAAqB,OAGvB,qBAAsB,CACpBvD,WAAY,8BAGXU,sBACD,CACEC,gBAAiB,cACjBF,MAAO1B,EAAM6B,QAAQoB,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,sBACD,CACED,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":"oGAKO,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,YAIM,UAApBX,EAAWa,MAAoB,CACjCP,QAAS,WACTM,SAAU,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AQlE,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,sBACD,CACED,MAAO,gBAET,CACEA,MAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var t=require("./TabsScrollButton.js"),e=require("../../components/focusring/focusring.js"),o=require("../button/interactive.js"),r=require("../typography/typography.theme.js");const a={defaultProps:{template:"underlined",scrollButtons:"auto",allowScrollButtonsMobile:!0,visibleScrollbar:!1,variant:"scrollable",slots:{scrollButtons:t.TabsScrollButton},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.updateFocusRingStyle("0px",!1),...o.getInteractiveStyle({backgroundColor:"transparent",color:t.palette.onSurface.os500},{backgroundColor:t.palette.surface.primary,color:t.palette.text.primary}),"&.Mui-selected":{...o.getInteractiveStyle({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.getTypography("subheadline","rtl"===t.direction,"small"),[t.breakpoints.up("md")]:{...r.getTypography("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}}})}]};exports.flowTabs=a;
|
|
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":"8LAMO,MAAMA,EAAyC,CACpDC,aAAc,CACZC,SAAU,aAEVC,cAAe,OACfC,0BAA0B,EAC1BC,kBAAkB,EAClBC,QAAS,aACTC,MAAO,CACLJ,cAAeK,EAAAA,kBAEjBC,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,SAG5B,WAAY,CACVP,QAAS,QACTU,QAAS,KACTC,SAAU,WACVC,KAAM,MACNC,MAAO,MACPC,IAAK,IACLC,OAAQ,IACRC,gBAAiB,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vBhB,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":"8LAMO,MAAMA,EAAyC,CACpDC,aAAc,CACZC,SAAU,aAEVC,cAAe,OACfC,0BAA0B,EAC1BC,kBAAkB,EAClBC,QAAS,aACTC,MAAO,CACLJ,cAAeK,EAAAA,kBAEjBC,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,SAAvBnB,EAAMoB,QAAQC,KAAkBrB,EAAMoB,QAAQE,MAAMC,UAAYvB,EAAMoB,QAAQE,M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ChBgB,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,EAAAA,cAAc,cAAmC,QAApBpE,EAAMqE,UAAqB,SAC3D,CAACrE,EAAMY,YAAYC,GAAG,OAAQ,IACzBuD,EAAAA,cAAc,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
|
-
"use strict";exports.flowInputLabel={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)"}}}})}};
|
|
1
|
+
"use strict";exports.flowInputLabel={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)"}}}})}};
|
|
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":["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":"oCAEkE,CAChEA,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":["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":"oCAEkE,CAChEA,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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode, ElementType } from 'react';
|
|
2
|
-
import { AppBarProps, BoxProps, DrawerProps, ToolbarProps } from '@mui/material';
|
|
2
|
+
import { AppBarProps, BoxProps, Breakpoint, DrawerProps, Theme, ToolbarProps } from '@mui/material';
|
|
3
|
+
import { SystemStyleObject } from '@mui/system';
|
|
3
4
|
import { HeaderButtonProps } from './HeaderButton';
|
|
4
5
|
export interface HeaderProps extends Omit<AppBarProps, 'color'> {
|
|
5
6
|
/**
|
|
@@ -22,9 +23,14 @@ export interface HeaderProps extends Omit<AppBarProps, 'color'> {
|
|
|
22
23
|
/**
|
|
23
24
|
* Controls if mobile version of Header should be shown, this collapses children into mobile menu
|
|
24
25
|
*
|
|
25
|
-
* @default undefined, leads to usage
|
|
26
|
+
* @default undefined, leads to usage of breakpoint media query
|
|
26
27
|
*/
|
|
27
28
|
mobile?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Breakpoint at which Header collapses into mobile menu, number is treated as px value
|
|
31
|
+
* @default 'lg'
|
|
32
|
+
*/
|
|
33
|
+
breakpoint?: Breakpoint | number;
|
|
28
34
|
/**
|
|
29
35
|
* Controls open/close state of mobile menu
|
|
30
36
|
*/
|
|
@@ -53,6 +59,10 @@ export interface HeaderProps extends Omit<AppBarProps, 'color'> {
|
|
|
53
59
|
* Properties applied to button wrapper
|
|
54
60
|
*/
|
|
55
61
|
buttonsProps?: BoxProps<ElementType>;
|
|
62
|
+
/**
|
|
63
|
+
* Properties applied to wrapper of buttons that collapse into drawer, rendered only with visibleButtons
|
|
64
|
+
*/
|
|
65
|
+
collapsibleButtonsProps?: BoxProps<ElementType>;
|
|
56
66
|
/**
|
|
57
67
|
* Properties applied to hamburger menu
|
|
58
68
|
*/
|
|
@@ -70,6 +80,10 @@ export interface HeaderProps extends Omit<AppBarProps, 'color'> {
|
|
|
70
80
|
*/
|
|
71
81
|
drawerProps?: DrawerProps;
|
|
72
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Picks desktop or mobile styles, explicit mobile value wins over breakpoint media queries
|
|
85
|
+
*/
|
|
86
|
+
export declare function variantSx(theme: Theme, mobile: boolean | undefined, breakpoint: Breakpoint | number, desktop: SystemStyleObject<Theme>, mobileStyles: SystemStyleObject<Theme>): SystemStyleObject<Theme>;
|
|
73
87
|
/**
|
|
74
88
|
* Component to render Header with navigation and action buttons at the top of the page
|
|
75
89
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import{forwardRef as r,useState as
|
|
1
|
+
import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import{forwardRef as r,useState as s,Children as n,isValidElement as i,Fragment as l}from"react";import{sxOverride as a}from"../../utils/sxOverride/sxOverride.js";import{useTheme as d,AppBar as p,Toolbar as c,Box as m,Drawer as x}from"@mui/material";import{MenuIcon as u}from"../icon/stroke/MenuIcon.js";import{CloseIcon as f}from"../icon/stroke/CloseIcon.js";import{getFocusRingStyle as b}from"../focusring/focusring.js";import{HeaderButton as h}from"./HeaderButton.js";import{HeaderContext as g,headerDesktopContext as y,headerMobileContext as v}from"./HeaderContext.js";function k(e,o,t,r,s){return void 0===o?{[e.breakpoints.down(t)]:s,[e.breakpoints.up(t)]:r}:o?s:r}function P(e){return n.toArray(e).some(e=>!i(e)||e.type!==l||P(e.props.children))}const j=r(({children:r,logo:n,buttons:i,visibleButtons:l,mobile:j,open:C,setOpen:I,inContainer:H=!1,breakpoint:w="lg",toolbarProps:B,logoProps:M,contentProps:S,mobileContentProps:F,buttonsProps:O,collapsibleButtonsProps:T,menuButtonProps:z,menuIcon:A,closeMenuIcon:G,drawerProps:D,...E},L)=>{const R=d(),{sx:V,...W}=M??{},{sx:$,...q}=S??{},{sx:J,...K}=F??{},{sx:N,...Q}=O??{},{sx:U,...X}=T??{},{sx:Y,...Z}=z??{},{sx:_,slotProps:ee,...oe}=D??{},{paper:te,backdrop:re,...se}=ee??{},{sx:ne,...ie}=te??{},{sx:le,...ae}=re??{},[de,pe]=s(!1),ce=C??de,me=I??pe,xe=P(r),ue=P(i),fe=!0!==l&&P(l),be=!!l&&ue,he=!1!==j&&(xe||be);return e(o,{children:[t(p,{ref:L,"data-testid":"Header",...E,children:t(g.Provider,{value:y,children:e(c,{disableGutters:!H,...B,children:[n&&t(m,{"data-testid":"Header.logo",sx:a({color:"dark"===R.palette.mode?"brand.secondary":"brand.tertiary",flexShrink:"0",display:"flex",alignItems:"center",justifyContent:"flex-start","& .MuiLink-root":{display:"block",position:"relative",py:1,...b(R),"&.Mui-focusVisible":{boxShadow:"none"}},"& .MuiSvgIcon-root":{display:"block"}},V),...W,children:n}),t(m,{sx:a({minWidth:"0",flexGrow:"1",alignSelf:"stretch",...k(R,j,w,{display:"flex",...n&&{pl:4}},{display:"none"}),alignItems:"stretch",justifyContent:"flex-start",gap:{xs:2,xl:4},mb:"-1px"},$),"data-testid":"Header.nav",...q,children:r}),(fe||ue||he)&&e(m,{sx:a({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,ml:"auto",...k(R,j,w,{mr:0},{mr:-1})},N),"data-testid":"Header.btns",...Q,children:[!0!==l&&l,l?ue&&t(m,{sx:a({...k(R,j,w,{display:"contents"},{display:"none"})},U),"data-testid":"Header.collapsiblebtns",...X,children:i}):i,he&&t(h,{"aria-label":"Toggle menu",extend:!1,onClick:()=>me(e=>!e),sx:a(ce?{display:"inline-flex"}:k(R,j,w,{display:"none"},{display:"inline-flex"}),Y),...Z,children:ce?G||t(f,{}):A||t(u,{})},"menu")]})]})})}),he&&t(x,{disablePortal:!0,disableEnforceFocus:!0,disableAutoFocus:!0,anchor:"top",open:ce,onClose:()=>me(!1),sx:a({zIndex:R.zIndex.appBar-10,top:R.mixins.toolbar.minHeight,bottom:"auto",height:`calc(100vh - ${R.mixins.toolbar.minHeight})`,position:"absolute"},_),slotProps:{backdrop:{sx:a({position:"absolute"},le),...ae},paper:{sx:a({position:"absolute",height:"100%",display:"grid",gridTemplateRows:"auto max-content"},ne),...ie},...se},...oe,children:e(g.Provider,{value:v,children:[t(m,{sx:a({p:2,overflow:"auto"},J),"data-testid":"Header.mobilenav",...K,children:r}),be&&t(m,{sx:{p:2,pt:0},children:t(m,{sx:{pt:.75,display:"flex",flexDirection:"column-reverse",alignItems:"stretch",justifyContent:"flex-start",borderTop:1,borderColor:"dark"===R.palette.mode?"onSurface.os700":"surface.secondary"},children:i})})]})})]})});export{j as Header,k as variantSx};
|
|
2
2
|
//# sourceMappingURL=Header.js.map
|