@flipdish/portal-library 4.2.5 → 4.2.6

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.
Files changed (45) hide show
  1. package/dist/components/atoms/Select/index.cjs.js +1 -1
  2. package/dist/components/atoms/Select/index.cjs.js.map +1 -1
  3. package/dist/components/atoms/Select/index.d.ts +19 -2
  4. package/dist/components/atoms/Select/index.js +1 -1
  5. package/dist/components/atoms/Select/index.js.map +1 -1
  6. package/dist/components/atoms/TextField/index.cjs.js +1 -1
  7. package/dist/components/atoms/TextField/index.cjs.js.map +1 -1
  8. package/dist/components/atoms/TextField/index.d.ts +21 -2
  9. package/dist/components/atoms/TextField/index.js +1 -1
  10. package/dist/components/atoms/TextField/index.js.map +1 -1
  11. package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
  12. package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
  13. package/dist/themes/flipdishPublicTheme.js +1 -1
  14. package/dist/themes/flipdishPublicTheme.js.map +1 -1
  15. package/dist/themes/overrides/formHelperTextOverrides.cjs.js +2 -0
  16. package/dist/themes/overrides/formHelperTextOverrides.cjs.js.map +1 -0
  17. package/dist/themes/overrides/formHelperTextOverrides.d.ts +5 -0
  18. package/dist/themes/overrides/formHelperTextOverrides.js +2 -0
  19. package/dist/themes/overrides/formHelperTextOverrides.js.map +1 -0
  20. package/dist/themes/overrides/inputBaseOverrides.cjs.js +2 -0
  21. package/dist/themes/overrides/inputBaseOverrides.cjs.js.map +1 -0
  22. package/dist/themes/overrides/inputBaseOverrides.d.ts +5 -0
  23. package/dist/themes/overrides/inputBaseOverrides.js +2 -0
  24. package/dist/themes/overrides/inputBaseOverrides.js.map +1 -0
  25. package/dist/themes/overrides/inputLabelOverrides.cjs.js +2 -0
  26. package/dist/themes/overrides/inputLabelOverrides.cjs.js.map +1 -0
  27. package/dist/themes/overrides/inputLabelOverrides.d.ts +5 -0
  28. package/dist/themes/overrides/inputLabelOverrides.js +2 -0
  29. package/dist/themes/overrides/inputLabelOverrides.js.map +1 -0
  30. package/dist/themes/overrides/menuItemOverrides.cjs.js +2 -0
  31. package/dist/themes/overrides/menuItemOverrides.cjs.js.map +1 -0
  32. package/dist/themes/overrides/menuItemOverrides.d.ts +5 -0
  33. package/dist/themes/overrides/menuItemOverrides.js +2 -0
  34. package/dist/themes/overrides/menuItemOverrides.js.map +1 -0
  35. package/dist/themes/overrides/selectOverrides.cjs.js +2 -0
  36. package/dist/themes/overrides/selectOverrides.cjs.js.map +1 -0
  37. package/dist/themes/overrides/selectOverrides.d.ts +5 -0
  38. package/dist/themes/overrides/selectOverrides.js +2 -0
  39. package/dist/themes/overrides/selectOverrides.js.map +1 -0
  40. package/dist/themes/overrides/textFieldOverrides.cjs.js +2 -0
  41. package/dist/themes/overrides/textFieldOverrides.cjs.js.map +1 -0
  42. package/dist/themes/overrides/textFieldOverrides.d.ts +5 -0
  43. package/dist/themes/overrides/textFieldOverrides.js +2 -0
  44. package/dist/themes/overrides/textFieldOverrides.js.map +1 -0
  45. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@mui/material/Select");module.exports=e;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/Box"),l=require("@mui/material/FormHelperText"),t=require("@mui/material/InputLabel"),s=require("@mui/material/MenuItem"),d=require("@mui/material/Select"),a=require("@mui/material/styles"),o=require("../../../icons/ArrowDown01/index.cjs.js"),n=require("../../../icons/ArrowUp01/index.cjs.js"),u=require("../../../icons/CancelCircle/index.cjs.js");const c=a.styled(i,{shouldForwardProp:e=>"fullWidth"!==e})((({theme:e,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),h=a.styled(d,{shouldForwardProp:e=>!["fullWidth","showPlaceholder"].includes(e)})((({theme:e,fullWidth:r=!1,showPlaceholder:i=!1})=>({display:"flex",width:r?"100%":"auto","& .MuiSelect-select":{color:i?e.palette.semantic.text["text-weak"]:e.palette.semantic.text["text-strong"]}}))),p=a.styled(i,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:r=!1})=>({alignItems:"center",cursor:r?"not-allowed":"pointer",display:"flex",justifyContent:"center",pointerEvents:"auto","& svg":{color:r?e.palette.semantic.icon["icon-disabled"]:e.palette.semantic.icon["icon-strong"]}})));module.exports=({children:i,disabled:d=!1,errorText:a,fdKey:m,fullWidth:x=!1,helperText:j,label:b,onChange:f,options:q=[],placeholder:v,required:w=!1,value:g,...y})=>{const[C,P]=r.useState(!1),W=j?`${m}-helper-text`:void 0,F=a?`${m}-error-message`:void 0,I=[W,F].filter(Boolean).join(" ")||void 0,S=!!a&&!d,k=!(!v||g&&""!==g),M=()=>{d||P((e=>!e))},T=r.useMemo((()=>q.map((r=>e.jsx(s,{disabled:r.disabled,value:r.value,children:r.label},r.value)))),[q]);return e.jsxs(c,{fullWidth:x,children:[b&&e.jsx(t,{disabled:d,htmlFor:m,required:w,children:b}),j&&e.jsx(l,{disabled:d,id:W,children:j}),S&&e.jsxs(l,{error:!0,id:F,children:[e.jsx(u,{}),a]}),e.jsx(h,{"data-fd":m,disabled:d,error:S,fullWidth:x,IconComponent:()=>e.jsx(p,{disabled:d,onClick:e=>{d||(e.stopPropagation(),M())},children:C?e.jsx(n,{}):e.jsx(o,{})}),id:m,inputProps:{"aria-describedby":I},label:"",onChange:(e,r)=>{const i=r?.props?.disabled;i||f&&f(e,r)},onClick:M,open:C,required:w,showPlaceholder:k,value:k?v:String(g),variant:"outlined",...y,children:(()=>{const r=[];return k&&r.push(e.jsx(s,{disabled:!0,"aria-hidden":"true",sx:{display:"none"},value:v,children:v},"placeholder")),q?.length>0?r.push(...T):r.push(i),r})()})]})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Select/index.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport MuiMenuItem from '@mui/material/MenuItem';\nimport MuiSelect, { type SelectChangeEvent, type SelectProps as MuiSelectProps } from '@mui/material/Select';\nimport { styled } from '@mui/material/styles';\n\nimport ArrowDown01Icon from '@fd/icons/ArrowDown01';\nimport ArrowUp01Icon from '@fd/icons/ArrowUp01';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\n\nexport interface SelectOption {\n value: number | string;\n label: string;\n disabled?: boolean;\n}\n\nexport type SelectProps = Omit<MuiSelectProps, 'error' | 'id' | 'value' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n helperText?: string;\n options?: SelectOption[];\n placeholder?: string;\n value?: number | string;\n};\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain minWidth to a maximum of 100% of the container width\n}));\n\nconst StyledSelect = styled(MuiSelect, {\n shouldForwardProp: (prop) => !['fullWidth', 'showPlaceholder'].includes(prop as string),\n})<{ fullWidth?: boolean; showPlaceholder?: boolean }>(\n ({ theme, fullWidth = false, showPlaceholder = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n\n '& .MuiSelect-select': {\n color: showPlaceholder\n ? theme.palette.semantic.text['text-weak']\n : theme.palette.semantic.text['text-strong'],\n },\n }),\n);\n\nconst StyledIconContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n alignItems: 'center',\n cursor: disabled ? 'not-allowed' : 'pointer',\n display: 'flex',\n justifyContent: 'center',\n pointerEvents: 'auto',\n\n '& svg': {\n color: disabled\n ? theme.palette.semantic.icon['icon-disabled']\n : theme.palette.semantic.icon['icon-strong'],\n },\n}));\n\nconst Select = ({\n children,\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n label,\n onChange,\n options = [],\n placeholder,\n required = false,\n value,\n ...props\n}: SelectProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const showPlaceholder = !!placeholder && (!value || value === '');\n\n const handleOpen = (): void => {\n if (disabled) {\n return;\n }\n\n setIsOpen((open) => !open);\n };\n\n const handleChange = (event: SelectChangeEvent<unknown>, child?: React.ReactNode): void => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const isMenuItemDisabled = (child as React.ReactElement)?.props?.disabled;\n if (isMenuItemDisabled) {\n return;\n }\n\n // Call the original onChange handler if provided\n if (onChange) {\n onChange(event, child);\n }\n };\n\n const getDisplayValue = (): string => {\n if (showPlaceholder) {\n return placeholder;\n }\n\n return String(value);\n };\n\n const renderIcon = (): JSX.Element => {\n const handleIconClick = (event: React.MouseEvent): void => {\n if (disabled) {\n return;\n }\n\n event.stopPropagation();\n handleOpen();\n };\n\n return (\n <StyledIconContainer disabled={disabled} onClick={handleIconClick}>\n {isOpen ? <ArrowUp01Icon /> : <ArrowDown01Icon />}\n </StyledIconContainer>\n );\n };\n\n const optionsMenuItems = useMemo((): React.ReactNode[] => {\n return options.map((option) => (\n <MuiMenuItem key={option.value} disabled={option.disabled} value={option.value}>\n {option.label}\n </MuiMenuItem>\n ));\n }, [options]);\n\n const renderMenuItems = (): React.ReactNode => {\n const menuItems = [];\n\n // Workaround to get the placeholder to show up when no value is selected\n // Placeholder must be a menu item to be displayed\n if (showPlaceholder) {\n menuItems.push(\n <MuiMenuItem\n key=\"placeholder\"\n disabled\n aria-hidden=\"true\"\n sx={{ display: 'none' }}\n value={placeholder}\n >\n {placeholder}\n </MuiMenuItem>,\n );\n }\n\n // Add either options or children\n if (options?.length > 0) {\n menuItems.push(...optionsMenuItems);\n } else {\n // If no options are provided, use the children\n menuItems.push(children);\n }\n\n return menuItems;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledSelect\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n IconComponent={renderIcon}\n id={fdKey}\n inputProps={{\n 'aria-describedby': ariaDescribedBy,\n }}\n label=\"\" // Remove label from Select since we're rendering it separately\n onChange={handleChange}\n onClick={handleOpen}\n open={isOpen}\n required={required}\n showPlaceholder={showPlaceholder}\n value={getDisplayValue()}\n variant=\"outlined\"\n {...props}\n >\n {renderMenuItems()}\n </StyledSelect>\n </StyledContainer>\n );\n};\n\nexport default Select;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledSelect","MuiSelect","includes","showPlaceholder","color","palette","semantic","text","StyledIconContainer","disabled","alignItems","cursor","justifyContent","pointerEvents","icon","children","errorText","fdKey","helperText","label","onChange","options","placeholder","required","value","props","isOpen","setIsOpen","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","handleOpen","open","optionsMenuItems","useMemo","map","option","_jsx","MuiMenuItem","_jsxs","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","CancelCircleIcon","IconComponent","onClick","event","stopPropagation","ArrowUp01Icon","ArrowDown01Icon","inputProps","child","isMenuItemDisabled","String","variant","menuItems","push","sx","length","renderMenuItems"],"mappings":"wbA4BA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAeX,EAAAA,OAAOY,EAAW,CACrCV,kBAAoBC,IAAU,CAAC,YAAa,mBAAmBU,SAASV,IADrDH,EAGnB,EAAGI,QAAOC,aAAY,EAAOS,mBAAkB,MAAO,CACpDR,QAAS,OACTI,MAAOL,EAAY,OAAS,OAE5B,sBAAuB,CACrBU,MAAOD,EACHV,EAAMY,QAAQC,SAASC,KAAK,aAC5Bd,EAAMY,QAAQC,SAASC,KAAK,oBAKhCC,EAAsBnB,EAAAA,OAAOC,EAAK,CACtCC,kBAAoBC,GAAkB,aAATA,GADHH,EAED,EAAGI,QAAOgB,YAAW,MAAO,CACrDC,WAAY,SACZC,OAAQF,EAAW,cAAgB,UACnCd,QAAS,OACTiB,eAAgB,SAChBC,cAAe,OAEf,QAAS,CACPT,MAAOK,EACHhB,EAAMY,QAAQC,SAASQ,KAAK,iBAC5BrB,EAAMY,QAAQC,SAASQ,KAAK,mCAIrB,EACbC,WACAN,YAAW,EACXO,YACAC,QACAvB,aAAY,EACZwB,aACAC,QACAC,WACAC,UAAU,GACVC,cACAC,YAAW,EACXC,WACGC,MAEH,MAAOC,EAAQC,GAAaC,EAAAA,UAAkB,GAExCC,EAAeX,EAAa,GAAGD,qBAAsBa,EACrDC,EAAiBf,EAAY,GAAGC,uBAAwBa,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAE9EM,IAAYpB,IAAcP,EAC1BN,KAAoBmB,GAAiBE,GAAmB,KAAVA,GAE9Ca,EAAa,KACb5B,GAIJkB,GAAWW,IAAUA,KAyCjBC,EAAmBC,EAAAA,SAAQ,IACxBnB,EAAQoB,KAAKC,GAClBC,EAAAA,IAACC,EAAW,CAAoBnC,SAAUiC,EAAOjC,SAAUe,MAAOkB,EAAOlB,eACtEkB,EAAOvB,OADQuB,EAAOlB,UAI1B,CAACH,IAgCJ,OACEwB,EAAAA,KAACzD,EAAe,CAACM,UAAWA,YACzByB,GACCwB,EAAAA,IAACG,GAAcrC,SAAUA,EAAUsC,QAAS9B,EAAOM,SAAUA,WAC1DJ,IAIJD,GACCyB,EAAAA,IAACK,EAAiB,CAACvC,SAAUA,EAAUwC,GAAIpB,EAAYd,SACpDG,IAIJkB,GACCS,EAAAA,KAACG,GAAkBE,OAAK,EAACD,GAAIlB,YAC3BY,EAAAA,IAACQ,MAEAnC,KAIL2B,EAAAA,IAAC3C,EAAY,CAAA,UACFiB,EACTR,SAAUA,EACVyC,MAAOd,EACP1C,UAAWA,EACX0D,cAlFa,IAWfT,EAAAA,IAACnC,EAAmB,CAACC,SAAUA,EAAU4C,QAVlBC,IACnB7C,IAIJ6C,EAAMC,kBACNlB,MAIiEtB,SAC9DW,EAASiB,EAAAA,IAACa,EAAa,IAAMb,EAAAA,IAACc,EAAe,CAAA,KAuE9CR,GAAIhC,EACJyC,WAAY,CACV,mBAAoB1B,GAEtBb,MAAM,GACNC,SA7Ge,CAACkC,EAAmCK,KAEvD,MAAMC,EAAsBD,GAA8BlC,OAAOhB,SAC7DmD,GAKAxC,GACFA,EAASkC,EAAOK,IAqGdN,QAAShB,EACTC,KAAMZ,EACNH,SAAUA,EACVpB,gBAAiBA,EACjBqB,MApGArB,EACKmB,EAGFuC,OAAOrC,GAiGVsC,QAAQ,cACJrC,WAtEc,MACtB,MAAMsC,EAAY,GA0BlB,OAtBI5D,GACF4D,EAAUC,KACRrB,EAAAA,IAACC,EAAW,CAEVnC,UAAQ,EAAA,cACI,OACZwD,GAAI,CAAEtE,QAAS,QACf6B,MAAOF,EAAWP,SAEjBO,GANG,gBAYND,GAAS6C,OAAS,EACpBH,EAAUC,QAAQzB,GAGlBwB,EAAUC,KAAKjD,GAGVgD,GA6CFI"}
@@ -1,2 +1,19 @@
1
- import Select from '@mui/material/Select';
2
- export { default } from '@mui/material/Select';
1
+ import { SelectProps as SelectProps$1 } from '@mui/material/Select';
2
+
3
+ interface SelectOption {
4
+ value: number | string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ type SelectProps = Omit<SelectProps$1, 'error' | 'id' | 'value' | 'variant'> & {
9
+ errorText?: string;
10
+ fdKey: string;
11
+ helperText?: string;
12
+ options?: SelectOption[];
13
+ placeholder?: string;
14
+ value?: number | string;
15
+ };
16
+ declare const Select: ({ children, disabled, errorText, fdKey, fullWidth, helperText, label, onChange, options, placeholder, required, value, ...props }: SelectProps) => JSX.Element;
17
+
18
+ export { Select as default };
19
+ export type { SelectOption, SelectProps };
@@ -1,2 +1,2 @@
1
- import e from"@mui/material/Select";export{default}from"@mui/material/Select";
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useState as i,useMemo as l}from"react";import o from"@mui/material/Box";import t from"@mui/material/FormHelperText";import a from"@mui/material/InputLabel";import d from"@mui/material/MenuItem";import n from"@mui/material/Select";import{styled as s}from"@mui/material/styles";import m from"../../../icons/ArrowDown01/index.js";import c from"../../../icons/ArrowUp01/index.js";import p from"../../../icons/CancelCircle/index.js";const u=s(o,{shouldForwardProp:e=>"fullWidth"!==e})((({theme:e,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),h=s(n,{shouldForwardProp:e=>!["fullWidth","showPlaceholder"].includes(e)})((({theme:e,fullWidth:r=!1,showPlaceholder:i=!1})=>({display:"flex",width:r?"100%":"auto","& .MuiSelect-select":{color:i?e.palette.semantic.text["text-weak"]:e.palette.semantic.text["text-strong"]}}))),f=s(o,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:r=!1})=>({alignItems:"center",cursor:r?"not-allowed":"pointer",display:"flex",justifyContent:"center",pointerEvents:"auto","& svg":{color:r?e.palette.semantic.icon["icon-disabled"]:e.palette.semantic.icon["icon-strong"]}}))),x=({children:o,disabled:n=!1,errorText:s,fdKey:x,fullWidth:b=!1,helperText:w,label:g,onChange:v,options:y=[],placeholder:C,required:P=!1,value:W,...j})=>{const[F,I]=i(!1),k=w?`${x}-helper-text`:void 0,q=s?`${x}-error-message`:void 0,S=[k,q].filter(Boolean).join(" ")||void 0,T=!!s&&!n,A=!(!C||W&&""!==W),B=()=>{n||I((e=>!e))},D=l((()=>y.map((r=>e(d,{disabled:r.disabled,value:r.value,children:r.label},r.value)))),[y]);return r(u,{fullWidth:b,children:[g&&e(a,{disabled:n,htmlFor:x,required:P,children:g}),w&&e(t,{disabled:n,id:k,children:w}),T&&r(t,{error:!0,id:q,children:[e(p,{}),s]}),e(h,{"data-fd":x,disabled:n,error:T,fullWidth:b,IconComponent:()=>e(f,{disabled:n,onClick:e=>{n||(e.stopPropagation(),B())},children:e(F?c:m,{})}),id:x,inputProps:{"aria-describedby":S},label:"",onChange:(e,r)=>{const i=r?.props?.disabled;i||v&&v(e,r)},onClick:B,open:F,required:P,showPlaceholder:A,value:A?C:String(W),variant:"outlined",...j,children:(()=>{const r=[];return A&&r.push(e(d,{disabled:!0,"aria-hidden":"true",sx:{display:"none"},value:C,children:C},"placeholder")),y?.length>0?r.push(...D):r.push(o),r})()})]})};export{x as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Select/index.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport MuiMenuItem from '@mui/material/MenuItem';\nimport MuiSelect, { type SelectChangeEvent, type SelectProps as MuiSelectProps } from '@mui/material/Select';\nimport { styled } from '@mui/material/styles';\n\nimport ArrowDown01Icon from '@fd/icons/ArrowDown01';\nimport ArrowUp01Icon from '@fd/icons/ArrowUp01';\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\n\nexport interface SelectOption {\n value: number | string;\n label: string;\n disabled?: boolean;\n}\n\nexport type SelectProps = Omit<MuiSelectProps, 'error' | 'id' | 'value' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n helperText?: string;\n options?: SelectOption[];\n placeholder?: string;\n value?: number | string;\n};\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain minWidth to a maximum of 100% of the container width\n}));\n\nconst StyledSelect = styled(MuiSelect, {\n shouldForwardProp: (prop) => !['fullWidth', 'showPlaceholder'].includes(prop as string),\n})<{ fullWidth?: boolean; showPlaceholder?: boolean }>(\n ({ theme, fullWidth = false, showPlaceholder = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n\n '& .MuiSelect-select': {\n color: showPlaceholder\n ? theme.palette.semantic.text['text-weak']\n : theme.palette.semantic.text['text-strong'],\n },\n }),\n);\n\nconst StyledIconContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n alignItems: 'center',\n cursor: disabled ? 'not-allowed' : 'pointer',\n display: 'flex',\n justifyContent: 'center',\n pointerEvents: 'auto',\n\n '& svg': {\n color: disabled\n ? theme.palette.semantic.icon['icon-disabled']\n : theme.palette.semantic.icon['icon-strong'],\n },\n}));\n\nconst Select = ({\n children,\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n label,\n onChange,\n options = [],\n placeholder,\n required = false,\n value,\n ...props\n}: SelectProps): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const showPlaceholder = !!placeholder && (!value || value === '');\n\n const handleOpen = (): void => {\n if (disabled) {\n return;\n }\n\n setIsOpen((open) => !open);\n };\n\n const handleChange = (event: SelectChangeEvent<unknown>, child?: React.ReactNode): void => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const isMenuItemDisabled = (child as React.ReactElement)?.props?.disabled;\n if (isMenuItemDisabled) {\n return;\n }\n\n // Call the original onChange handler if provided\n if (onChange) {\n onChange(event, child);\n }\n };\n\n const getDisplayValue = (): string => {\n if (showPlaceholder) {\n return placeholder;\n }\n\n return String(value);\n };\n\n const renderIcon = (): JSX.Element => {\n const handleIconClick = (event: React.MouseEvent): void => {\n if (disabled) {\n return;\n }\n\n event.stopPropagation();\n handleOpen();\n };\n\n return (\n <StyledIconContainer disabled={disabled} onClick={handleIconClick}>\n {isOpen ? <ArrowUp01Icon /> : <ArrowDown01Icon />}\n </StyledIconContainer>\n );\n };\n\n const optionsMenuItems = useMemo((): React.ReactNode[] => {\n return options.map((option) => (\n <MuiMenuItem key={option.value} disabled={option.disabled} value={option.value}>\n {option.label}\n </MuiMenuItem>\n ));\n }, [options]);\n\n const renderMenuItems = (): React.ReactNode => {\n const menuItems = [];\n\n // Workaround to get the placeholder to show up when no value is selected\n // Placeholder must be a menu item to be displayed\n if (showPlaceholder) {\n menuItems.push(\n <MuiMenuItem\n key=\"placeholder\"\n disabled\n aria-hidden=\"true\"\n sx={{ display: 'none' }}\n value={placeholder}\n >\n {placeholder}\n </MuiMenuItem>,\n );\n }\n\n // Add either options or children\n if (options?.length > 0) {\n menuItems.push(...optionsMenuItems);\n } else {\n // If no options are provided, use the children\n menuItems.push(children);\n }\n\n return menuItems;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledSelect\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n IconComponent={renderIcon}\n id={fdKey}\n inputProps={{\n 'aria-describedby': ariaDescribedBy,\n }}\n label=\"\" // Remove label from Select since we're rendering it separately\n onChange={handleChange}\n onClick={handleOpen}\n open={isOpen}\n required={required}\n showPlaceholder={showPlaceholder}\n value={getDisplayValue()}\n variant=\"outlined\"\n {...props}\n >\n {renderMenuItems()}\n </StyledSelect>\n </StyledContainer>\n );\n};\n\nexport default Select;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledSelect","MuiSelect","includes","showPlaceholder","color","palette","semantic","text","StyledIconContainer","disabled","alignItems","cursor","justifyContent","pointerEvents","icon","Select","children","errorText","fdKey","helperText","label","onChange","options","placeholder","required","value","props","isOpen","setIsOpen","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","handleOpen","open","optionsMenuItems","useMemo","map","option","_jsx","MuiMenuItem","_jsxs","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","CancelCircleIcon","IconComponent","onClick","event","stopPropagation","ArrowUp01Icon","ArrowDown01Icon","inputProps","child","isMenuItemDisabled","String","variant","menuItems","push","sx","length","renderMenuItems"],"mappings":"qeA4BA,MAAMA,EAAkBC,EAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAeX,EAAOY,EAAW,CACrCV,kBAAoBC,IAAU,CAAC,YAAa,mBAAmBU,SAASV,IADrDH,EAGnB,EAAGI,QAAOC,aAAY,EAAOS,mBAAkB,MAAO,CACpDR,QAAS,OACTI,MAAOL,EAAY,OAAS,OAE5B,sBAAuB,CACrBU,MAAOD,EACHV,EAAMY,QAAQC,SAASC,KAAK,aAC5Bd,EAAMY,QAAQC,SAASC,KAAK,oBAKhCC,EAAsBnB,EAAOC,EAAK,CACtCC,kBAAoBC,GAAkB,aAATA,GADHH,EAED,EAAGI,QAAOgB,YAAW,MAAO,CACrDC,WAAY,SACZC,OAAQF,EAAW,cAAgB,UACnCd,QAAS,OACTiB,eAAgB,SAChBC,cAAe,OAEf,QAAS,CACPT,MAAOK,EACHhB,EAAMY,QAAQC,SAASQ,KAAK,iBAC5BrB,EAAMY,QAAQC,SAASQ,KAAK,oBAI9BC,EAAS,EACbC,WACAP,YAAW,EACXQ,YACAC,QACAxB,aAAY,EACZyB,aACAC,QACAC,WACAC,UAAU,GACVC,cACAC,YAAW,EACXC,WACGC,MAEH,MAAOC,EAAQC,GAAaC,GAAkB,GAExCC,EAAeX,EAAa,GAAGD,qBAAsBa,EACrDC,EAAiBf,EAAY,GAAGC,uBAAwBa,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAE9EM,IAAYpB,IAAcR,EAC1BN,KAAoBoB,GAAiBE,GAAmB,KAAVA,GAE9Ca,EAAa,KACb7B,GAIJmB,GAAWW,IAAUA,KAyCjBC,EAAmBC,GAAQ,IACxBnB,EAAQoB,KAAKC,GAClBC,EAACC,EAAW,CAAoBpC,SAAUkC,EAAOlC,SAAUgB,MAAOkB,EAAOlB,eACtEkB,EAAOvB,OADQuB,EAAOlB,UAI1B,CAACH,IAgCJ,OACEwB,EAAC1D,EAAe,CAACM,UAAWA,YACzB0B,GACCwB,EAACG,GAActC,SAAUA,EAAUuC,QAAS9B,EAAOM,SAAUA,WAC1DJ,IAIJD,GACCyB,EAACK,EAAiB,CAACxC,SAAUA,EAAUyC,GAAIpB,EAAYd,SACpDG,IAIJkB,GACCS,EAACG,GAAkBE,OAAK,EAACD,GAAIlB,YAC3BY,EAACQ,MAEAnC,KAIL2B,EAAC5C,EAAY,CAAA,UACFkB,EACTT,SAAUA,EACV0C,MAAOd,EACP3C,UAAWA,EACX2D,cAlFa,IAWfT,EAACpC,EAAmB,CAACC,SAAUA,EAAU6C,QAVlBC,IACnB9C,IAIJ8C,EAAMC,kBACNlB,MAIiEtB,SACrD4B,EAATjB,EAAU8B,EAAoBC,EAAP,MAuExBR,GAAIhC,EACJyC,WAAY,CACV,mBAAoB1B,GAEtBb,MAAM,GACNC,SA7Ge,CAACkC,EAAmCK,KAEvD,MAAMC,EAAsBD,GAA8BlC,OAAOjB,SAC7DoD,GAKAxC,GACFA,EAASkC,EAAOK,IAqGdN,QAAShB,EACTC,KAAMZ,EACNH,SAAUA,EACVrB,gBAAiBA,EACjBsB,MApGAtB,EACKoB,EAGFuC,OAAOrC,GAiGVsC,QAAQ,cACJrC,WAtEc,MACtB,MAAMsC,EAAY,GA0BlB,OAtBI7D,GACF6D,EAAUC,KACRrB,EAACC,EAAW,CAEVpC,UAAQ,EAAA,cACI,OACZyD,GAAI,CAAEvE,QAAS,QACf8B,MAAOF,EAAWP,SAEjBO,GANG,gBAYND,GAAS6C,OAAS,EACpBH,EAAUC,QAAQzB,GAGlBwB,EAAUC,KAAKjD,GAGVgD,GA6CFI"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@mui/material/TextField");module.exports=e;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("@mui/material/Box"),l=require("@mui/material/FormHelperText"),t=require("@mui/material/InputAdornment"),d=require("@mui/material/InputLabel"),s=require("@mui/material/styles"),a=require("@mui/material/TextField"),n=require("../../../icons/CancelCircle/index.cjs.js"),u=require("../../../icons/View/index.cjs.js"),o=require("../../../icons/ViewOff/index.cjs.js"),x=require("../IconButton/index.cjs.js");const c=s.styled(i,{shouldForwardProp:e=>"fullWidth"!==e})((({theme:e,fullWidth:r=!1})=>({display:"flex",flexDirection:"column",gap:e.spacing(.5),width:r?"100%":"min(364px, 100%)"}))),m=s.styled(a,{shouldForwardProp:e=>"fullWidth"!==e})((({fullWidth:e=!1})=>({display:"flex",width:e?"100%":"auto"})));module.exports=({disabled:i=!1,errorText:s,fdKey:a,fullWidth:h=!1,helperText:p,hidePasswordAriaLabel:j,label:f,multiline:q=!1,required:b=!1,showPasswordAriaLabel:w,type:y="text",...W})=>{const[v,F]=r.useState(!1),I=p?`${a}-helper-text`:void 0,P=s?`${a}-error-message`:void 0,A=[I,P].filter(Boolean).join(" ")||void 0,B=!!s&&!i,T="password"===y,g=()=>F((e=>!e));return e.jsxs(c,{fullWidth:h,children:[f&&e.jsx(d,{disabled:i,htmlFor:a,required:b,children:f}),p&&e.jsx(l,{disabled:i,id:I,children:p}),B&&e.jsxs(l,{error:!0,id:P,children:[e.jsx(n,{}),s]}),e.jsx(m,{"data-fd":a,disabled:i,error:B,fullWidth:h,id:a,label:"",multiline:q,required:b,slotProps:{input:{endAdornment:(()=>{if(T){if(!w||!j)return;return e.jsx(t,{position:"end",children:e.jsx(x.IconButton,{"aria-label":v?j:w,disabled:i,onClick:g,size:"small",tone:"neutral",variant:"tertiary",children:v?e.jsx(o,{}):e.jsx(u,{})})})}})()},htmlInput:{"aria-describedby":A}},type:T?v?"text":"password":y,variant:"outlined",...W})]})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n type: 'password';\n showPasswordAriaLabel: string;\n hidePasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n showPasswordAriaLabel?: never;\n hidePasswordAriaLabel?: never;\n};\n\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain minWidth to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst TextField = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <MuiInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </MuiInputAdornment>\n );\n }\n\n return undefined;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n endAdornment: renderEndAdornment(),\n },\n htmlInput: {\n 'aria-describedby': ariaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n {...props}\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","disabled","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","isPassword","handleClickShowPassword","show","_jsxs","_jsx","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","children","CancelCircleIcon","slotProps","input","endAdornment","MuiInputAdornment","position","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","htmlInput"],"mappings":"geAqCA,MAAMA,EAAkBC,EAAAA,OAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAAA,OAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,0BAGZ,EAChBQ,YAAW,EACXC,YACAC,QACAV,aAAY,EACZW,aACAC,wBACAC,QACAC,aAAY,EACZC,YAAW,EACXC,wBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,EAAAA,UAAkB,GAEpDC,EAAeX,EAAa,GAAGD,qBAAsBa,EACrDC,EAAiBf,EAAY,GAAGC,uBAAwBa,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAE9EM,IAAYpB,IAAcD,EAC1BsB,EAAsB,aAATb,EAEbc,EAA0B,IAAYX,GAAiBY,IAAUA,IAmCvE,OACEC,EAAAA,KAACvC,EAAe,CAACM,UAAWA,YACzBa,GACCqB,EAAAA,IAACC,GAAc3B,SAAUA,EAAU4B,QAAS1B,EAAOK,SAAUA,WAC1DF,IAIJF,GACCuB,EAAAA,IAACG,EAAiB,CAAC7B,SAAUA,EAAU8B,GAAIhB,WACxCX,IAIJkB,GACCI,EAAAA,KAACI,EAAiB,CAACE,SAAMD,GAAId,EAAcgB,SAAA,CACzCN,EAAAA,IAACO,EAAgB,CAAA,GAEhBhC,KAILyB,EAAAA,IAAC5B,aACUI,EACTF,SAAUA,EACV+B,MAAOV,EACP7B,UAAWA,EACXsC,GAAI5B,EACJG,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACV2B,UAAW,CACTC,MAAO,CACLC,aA1DiB,MACzB,GAAId,EAAY,CACd,IAAKd,IAA0BJ,EAC7B,OAGF,OACEsB,EAAAA,IAACW,EAAiB,CAACC,SAAS,MAAKN,SAC/BN,MAACa,EAAAA,WAAU,CAAA,aACG5B,EAAeP,EAAwBI,EACnDR,SAAUA,EACVwC,QAASjB,EACTkB,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUX,SAEjBrB,EAAee,EAAAA,IAACkB,EAAW,CAAA,GAAMlB,EAAAA,IAACmB,EAAQ,CAAA,MAInD,GAsCsBC,IAEhBC,UAAW,CACT,mBAAoB9B,IAGxBR,KAvEAa,EACKX,EAAe,OAAS,WAG1BF,EAoEHkC,QAAQ,cACJjC"}
@@ -1,2 +1,21 @@
1
- import TextField from '@mui/material/TextField';
2
- export { default } from '@mui/material/TextField';
1
+ import { TextFieldProps as TextFieldProps$1 } from '@mui/material/TextField';
2
+
3
+ type BaseTextFieldProps = Omit<TextFieldProps$1, 'error' | 'id' | 'type' | 'variant'> & {
4
+ errorText?: string;
5
+ fdKey: string;
6
+ };
7
+ type PasswordTextFieldProps = BaseTextFieldProps & {
8
+ type: 'password';
9
+ showPasswordAriaLabel: string;
10
+ hidePasswordAriaLabel: string;
11
+ };
12
+ type GenericTextFieldProps = BaseTextFieldProps & {
13
+ type?: Exclude<TextFieldProps$1['type'], 'password'>;
14
+ showPasswordAriaLabel?: never;
15
+ hidePasswordAriaLabel?: never;
16
+ };
17
+ type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;
18
+ declare const TextField: ({ disabled, errorText, fdKey, fullWidth, helperText, hidePasswordAriaLabel, label, multiline, required, showPasswordAriaLabel, type, ...props }: TextFieldProps) => JSX.Element;
19
+
20
+ export { TextField as default };
21
+ export type { TextFieldProps };
@@ -1,2 +1,2 @@
1
- import e from"@mui/material/TextField";export{default}from"@mui/material/TextField";
1
+ import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as e}from"react";import t from"@mui/material/Box";import l from"@mui/material/FormHelperText";import o from"@mui/material/InputAdornment";import d from"@mui/material/InputLabel";import{styled as a}from"@mui/material/styles";import m from"@mui/material/TextField";import n from"../../../icons/CancelCircle/index.js";import s from"../../../icons/View/index.js";import u from"../../../icons/ViewOff/index.js";import{IconButton as p}from"../IconButton/index.js";const f=a(t,{shouldForwardProp:r=>"fullWidth"!==r})((({theme:r,fullWidth:i=!1})=>({display:"flex",flexDirection:"column",gap:r.spacing(.5),width:i?"100%":"min(364px, 100%)"}))),h=a(m,{shouldForwardProp:r=>"fullWidth"!==r})((({fullWidth:r=!1})=>({display:"flex",width:r?"100%":"auto"}))),c=({disabled:t=!1,errorText:a,fdKey:m,fullWidth:c=!1,helperText:x,hidePasswordAriaLabel:b,label:w,multiline:y=!1,required:W=!1,showPasswordAriaLabel:j,type:v="text",...F})=>{const[P,A]=e(!1),I=x?`${m}-helper-text`:void 0,T=a?`${m}-error-message`:void 0,g=[I,T].filter(Boolean).join(" ")||void 0,q=!!a&&!t,B="password"===v,C=()=>A((r=>!r));return r(f,{fullWidth:c,children:[w&&i(d,{disabled:t,htmlFor:m,required:W,children:w}),x&&i(l,{disabled:t,id:I,children:x}),q&&r(l,{error:!0,id:T,children:[i(n,{}),a]}),i(h,{"data-fd":m,disabled:t,error:q,fullWidth:c,id:m,label:"",multiline:y,required:W,slotProps:{input:{endAdornment:(()=>{if(B){if(!j||!b)return;return i(o,{position:"end",children:i(p,{"aria-label":P?b:j,disabled:t,onClick:C,size:"small",tone:"neutral",variant:"tertiary",children:i(P?u:s,{})})})}})()},htmlInput:{"aria-describedby":g}},type:B?P?"text":"password":v,variant:"outlined",...F})]})};export{c as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/TextField/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport Box from '@mui/material/Box';\nimport MuiFormHelperText from '@mui/material/FormHelperText';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport MuiInputLabel from '@mui/material/InputLabel';\nimport { styled } from '@mui/material/styles';\nimport MuiTextField, { type TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';\n\nimport CancelCircleIcon from '@fd/icons/CancelCircle';\nimport ViewIcon from '@fd/icons/View';\nimport ViewOffIcon from '@fd/icons/ViewOff';\n\nimport IconButton from '../IconButton';\n\n// Common props for all TextField variants\ntype BaseTextFieldProps = Omit<MuiTextFieldProps, 'error' | 'id' | 'type' | 'variant'> & {\n errorText?: string;\n fdKey: string;\n};\n\n// Password TextField variant - requires aria labels\ntype PasswordTextFieldProps = BaseTextFieldProps & {\n type: 'password';\n showPasswordAriaLabel: string;\n hidePasswordAriaLabel: string;\n};\n\n// Generic TextField variant - for all other input types\ntype GenericTextFieldProps = BaseTextFieldProps & {\n type?: Exclude<MuiTextFieldProps['type'], 'password'>;\n showPasswordAriaLabel?: never;\n hidePasswordAriaLabel?: never;\n};\n\nexport type TextFieldProps = GenericTextFieldProps | PasswordTextFieldProps;\n\nconst StyledContainer = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ theme, fullWidth = false }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(0.5),\n width: fullWidth ? '100%' : 'min(364px, 100%)', // Constrain minWidth to a maximum of 100% of the container width\n}));\n\nconst StyledTextField = styled(MuiTextField, {\n shouldForwardProp: (prop) => prop !== 'fullWidth',\n})<{ fullWidth?: boolean }>(({ fullWidth = false }) => ({\n display: 'flex',\n width: fullWidth ? '100%' : 'auto',\n}));\n\nconst TextField = ({\n disabled = false,\n errorText,\n fdKey,\n fullWidth = false,\n helperText,\n hidePasswordAriaLabel,\n label,\n multiline = false,\n required = false,\n showPasswordAriaLabel,\n type = 'text',\n ...props\n}: TextFieldProps): JSX.Element => {\n const [showPassword, setShowPassword] = useState<boolean>(false);\n\n const helperTextId = helperText ? `${fdKey}-helper-text` : undefined;\n const errorMessageId = errorText ? `${fdKey}-error-message` : undefined;\n\n // Combine helper text and error message IDs for aria-describedby\n const ariaDescribedBy = [helperTextId, errorMessageId].filter(Boolean).join(' ') || undefined;\n\n const isError = !!errorText && !disabled;\n const isPassword = type === 'password';\n\n const handleClickShowPassword = (): void => setShowPassword((show) => !show);\n\n const getFieldType = (): MuiTextFieldProps['type'] => {\n if (isPassword) {\n return showPassword ? 'text' : 'password';\n }\n\n return type;\n };\n\n const renderEndAdornment = (): React.ReactNode => {\n if (isPassword) {\n if (!showPasswordAriaLabel || !hidePasswordAriaLabel) {\n return undefined;\n }\n\n return (\n <MuiInputAdornment position=\"end\">\n <IconButton\n aria-label={showPassword ? hidePasswordAriaLabel : showPasswordAriaLabel}\n disabled={disabled}\n onClick={handleClickShowPassword}\n size=\"small\"\n tone=\"neutral\"\n variant=\"tertiary\"\n >\n {showPassword ? <ViewOffIcon /> : <ViewIcon />}\n </IconButton>\n </MuiInputAdornment>\n );\n }\n\n return undefined;\n };\n\n return (\n <StyledContainer fullWidth={fullWidth}>\n {label && (\n <MuiInputLabel disabled={disabled} htmlFor={fdKey} required={required}>\n {label}\n </MuiInputLabel>\n )}\n\n {helperText && (\n <MuiFormHelperText disabled={disabled} id={helperTextId}>\n {helperText}\n </MuiFormHelperText>\n )}\n\n {isError && (\n <MuiFormHelperText error id={errorMessageId}>\n <CancelCircleIcon />\n\n {errorText}\n </MuiFormHelperText>\n )}\n\n <StyledTextField\n data-fd={fdKey}\n disabled={disabled}\n error={isError}\n fullWidth={fullWidth}\n id={fdKey}\n label=\"\" // Remove label from TextField since we're rendering it separately\n multiline={multiline}\n required={required}\n slotProps={{\n input: {\n endAdornment: renderEndAdornment(),\n },\n htmlInput: {\n 'aria-describedby': ariaDescribedBy,\n },\n }}\n type={getFieldType()}\n variant=\"outlined\"\n {...props}\n />\n </StyledContainer>\n );\n};\n\nexport default TextField;\n"],"names":["StyledContainer","styled","Box","shouldForwardProp","prop","theme","fullWidth","display","flexDirection","gap","spacing","width","StyledTextField","MuiTextField","TextField","disabled","errorText","fdKey","helperText","hidePasswordAriaLabel","label","multiline","required","showPasswordAriaLabel","type","props","showPassword","setShowPassword","useState","helperTextId","undefined","errorMessageId","ariaDescribedBy","filter","Boolean","join","isError","isPassword","handleClickShowPassword","show","_jsxs","_jsx","MuiInputLabel","htmlFor","MuiFormHelperText","id","error","children","CancelCircleIcon","slotProps","input","endAdornment","MuiInputAdornment","position","IconButton","onClick","size","tone","variant","ViewOffIcon","ViewIcon","renderEndAdornment","htmlInput"],"mappings":"4gBAqCA,MAAMA,EAAkBC,EAAOC,EAAK,CAClCC,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGI,QAAOC,aAAY,MAAO,CACvDC,QAAS,OACTC,cAAe,SACfC,IAAKJ,EAAMK,QAAQ,IACnBC,MAAOL,EAAY,OAAS,uBAGxBM,EAAkBX,EAAOY,EAAc,CAC3CV,kBAAoBC,GAAkB,cAATA,GADPH,EAEI,EAAGK,aAAY,MAAO,CAChDC,QAAS,OACTI,MAAOL,EAAY,OAAS,WAGxBQ,EAAY,EAChBC,YAAW,EACXC,YACAC,QACAX,aAAY,EACZY,aACAC,wBACAC,QACAC,aAAY,EACZC,YAAW,EACXC,wBACAC,OAAO,UACJC,MAEH,MAAOC,EAAcC,GAAmBC,GAAkB,GAEpDC,EAAeX,EAAa,GAAGD,qBAAsBa,EACrDC,EAAiBf,EAAY,GAAGC,uBAAwBa,EAGxDE,EAAkB,CAACH,EAAcE,GAAgBE,OAAOC,SAASC,KAAK,WAAQL,EAE9EM,IAAYpB,IAAcD,EAC1BsB,EAAsB,aAATb,EAEbc,EAA0B,IAAYX,GAAiBY,IAAUA,IAmCvE,OACEC,EAACxC,EAAe,CAACM,UAAWA,YACzBc,GACCqB,EAACC,GAAc3B,SAAUA,EAAU4B,QAAS1B,EAAOK,SAAUA,WAC1DF,IAIJF,GACCuB,EAACG,EAAiB,CAAC7B,SAAUA,EAAU8B,GAAIhB,WACxCX,IAIJkB,GACCI,EAACI,EAAiB,CAACE,SAAMD,GAAId,EAAcgB,SAAA,CACzCN,EAACO,EAAgB,CAAA,GAEhBhC,KAILyB,EAAC7B,aACUK,EACTF,SAAUA,EACV+B,MAAOV,EACP9B,UAAWA,EACXuC,GAAI5B,EACJG,MAAM,GACNC,UAAWA,EACXC,SAAUA,EACV2B,UAAW,CACTC,MAAO,CACLC,aA1DiB,MACzB,GAAId,EAAY,CACd,IAAKd,IAA0BJ,EAC7B,OAGF,OACEsB,EAACW,EAAiB,CAACC,SAAS,MAAKN,SAC/BN,EAACa,EAAU,CAAA,aACG5B,EAAeP,EAAwBI,EACnDR,SAAUA,EACVwC,QAASjB,EACTkB,KAAK,QACLC,KAAK,UACLC,QAAQ,WAAUX,SAEFN,EAAff,EAAgBiC,EAAkBC,EAAP,CAAA,MAIpC,GAsCsBC,IAEhBC,UAAW,CACT,mBAAoB9B,IAGxBR,KAvEAa,EACKX,EAAe,OAAS,WAG1BF,EAoEHkC,QAAQ,cACJjC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@mui/material/styles/createTheme"),t=require("../components/atoms/Button/buttonThemeOverrides.cjs.js"),o=require("../components/atoms/IconButton/iconButtonThemeOverrides.cjs.js"),r=require("../icons/Cancel/index.cjs.js"),s=require("./tokens/breakpoints/breakpoints.cjs.js"),i=require("./tokens/colours/semantic.cjs.js"),a=require("./tokens/radius/radius.cjs.js"),n=require("./tokens/shadows/shadows.cjs.js"),p=require("./tokens/typography/variant-mapping.cjs.js"),d=require("./typography.cjs.js");const l=l=>{const u={typography:d.typography,palette:"light"===l?i.lightColours:i.darkColours,radius:a.radius,breakpoints:{values:s.breakpointValues}},c=e(u);return Object.keys(d.typography).forEach((e=>{const t=e.split(/(?=[A-Z])/)[0],o=e;c.typography[o]={...c.typography[o],[c.breakpoints.down("tablet")]:{...d.getMobileTextStyle(t)}}})),e({...u,typography:c.typography,shape:{borderRadius:4},customShadows:{...n.shadows},components:{MuiAlert:{defaultProps:{components:{CloseIcon:r}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:t.buttonStyleOverrides(c),MuiIconButton:o.iconButtonStyleOverrides(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:c.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:c.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${c.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:c.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:p.typographyVariantMapping}}}})},u=l("light"),c=l("dark");exports.darkTheme=c,exports.lightTheme=u;
1
+ "use strict";var e=require("@mui/material/styles/createTheme"),r=require("../components/atoms/Button/buttonThemeOverrides.cjs.js"),t=require("../components/atoms/IconButton/iconButtonThemeOverrides.cjs.js"),s=require("../icons/Cancel/index.cjs.js"),i=require("./overrides/formHelperTextOverrides.cjs.js"),o=require("./overrides/inputBaseOverrides.cjs.js"),a=require("./overrides/inputLabelOverrides.cjs.js"),n=require("./overrides/menuItemOverrides.cjs.js"),d=require("./overrides/selectOverrides.cjs.js"),p=require("./overrides/textFieldOverrides.cjs.js"),u=require("./tokens/breakpoints/breakpoints.cjs.js"),l=require("./tokens/colours/semantic.cjs.js"),c=require("./tokens/radius/radius.cjs.js"),h=require("./tokens/shadows/shadows.cjs.js"),v=require("./tokens/typography/variant-mapping.cjs.js"),y=require("./typography.cjs.js");const g=g=>{const m={typography:y.typography,palette:"light"===g?l.lightColours:l.darkColours,radius:c.radius,breakpoints:{values:u.breakpointValues}},j=e(m);return Object.keys(y.typography).forEach((e=>{const r=e.split(/(?=[A-Z])/)[0],t=e;j.typography[t]={...j.typography[t],[j.breakpoints.down("tablet")]:{...y.getMobileTextStyle(r)}}})),e({...m,typography:j.typography,shape:{borderRadius:4},customShadows:{...h.shadows},components:{MuiAlert:{defaultProps:{components:{CloseIcon:s}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:r.buttonStyleOverrides(j),MuiIconButton:t.iconButtonStyleOverrides(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:j.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:j.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${j.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:j.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:v.typographyVariantMapping}},MuiFormHelperText:i.formHelperTextOverrides(j),MuiInputBase:o.inputBaseOverrides(j),MuiInputLabel:a.inputLabelOverrides(j),MuiMenuItem:n.menuItemOverrides(j),MuiSelect:d.selectOverrides(j),MuiTextField:p.textFieldOverrides()}})},m=g("light"),j=g("dark");exports.darkTheme=j,exports.lightTheme=m;
2
2
  //# sourceMappingURL=flipdishPublicTheme.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: {\n ...shadows,\n },\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","themeOptions","typography","palette","lightColours","darkColours","radius","breakpoints","values","breakpointValues","baseTheme","createTheme","Object","keys","forEach","key","keyWithoutVariantSuffix","split","typographyKey","down","getMobileTextStyle","shape","borderRadius","customShadows","shadows","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","buttonStyleOverrides","MuiIconButton","iconButtonStyleOverrides","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","lightTheme","darkTheme"],"mappings":"6gBAaA,MAAMA,EAA8BC,IAClC,MAAMC,EAA6B,YACjCC,EAAAA,WACAC,QAAkB,UAATH,EAAmBI,EAAAA,aAAeC,EAAAA,mBAC3CC,EAAAA,OACAC,YAAa,CACXC,OAAQC,EAAAA,mBAGNC,EAAYC,EAAYV,GAoB9B,OAbAW,OAAOC,KAAKX,EAAAA,YAAYY,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACjDC,EAAgBH,EACtBL,EAAUR,WAAWgB,GAAiB,IACjCR,EAAUR,WAAWgB,GACxB,CAACR,EAAUH,YAAYY,KAAK,WAAY,IACnCC,EAAAA,mBAAmBJ,QAMrBL,EAAY,IACdV,EACHC,WAAYQ,EAAUR,WACtBmB,MAAO,CACLC,aAAc,GAEhBC,cAAe,IACVC,EAAAA,SAELC,WAAY,CACVC,SAAU,CACRC,aAAc,CACZF,WAAY,CACVG,UAAWC,IAGfC,eAAgB,CACdC,KAAM,CAEJT,aAAc,MAEdU,QAAS,QAEXC,KAAM,CAEJC,YAAa,OACbF,QAAS,GAEXG,OAAQ,CACNH,QAAS,EACT,WAAY,CACVI,UAAW,SAGfC,QAAS,CACPL,QAAS,KAIfM,UAAWC,EAAAA,qBAAqB7B,GAChC8B,cAAeC,EAAAA,2BACfC,QAAS,CACPZ,eAAgB,CACdC,KAAM,CACJY,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAapC,EAAUP,QAAQ4C,WAIrCC,QAAS,CACPlB,eAAgB,CACdC,KAAM,CACJkB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBtB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACTsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa9C,EAAUP,QAAQmD,SAASG,OAAO,qBAKrEC,YAAa,CACX5B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACbjC,aAAc,CACZkC,eAAgBC,EAAAA,+BAObC,EAAahE,EAA2B,SACxCiE,EAAYjE,EAA2B"}
1
+ {"version":3,"file":"flipdishPublicTheme.cjs.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { formHelperTextOverrides } from './overrides/formHelperTextOverrides';\nimport { inputBaseOverrides } from './overrides/inputBaseOverrides';\nimport { inputLabelOverrides } from './overrides/inputLabelOverrides';\nimport { menuItemOverrides } from './overrides/menuItemOverrides';\nimport { selectOverrides } from './overrides/selectOverrides';\nimport { textFieldOverrides } from './overrides/textFieldOverrides';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: {\n ...shadows,\n },\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n MuiFormHelperText: formHelperTextOverrides(baseTheme),\n MuiInputBase: inputBaseOverrides(baseTheme),\n MuiInputLabel: inputLabelOverrides(baseTheme),\n MuiMenuItem: menuItemOverrides(baseTheme),\n MuiSelect: selectOverrides(baseTheme),\n MuiTextField: textFieldOverrides(),\n },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","themeOptions","typography","palette","lightColours","darkColours","radius","breakpoints","values","breakpointValues","baseTheme","createTheme","Object","keys","forEach","key","keyWithoutVariantSuffix","split","typographyKey","down","getMobileTextStyle","shape","borderRadius","customShadows","shadows","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","buttonStyleOverrides","MuiIconButton","iconButtonStyleOverrides","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","MuiFormHelperText","formHelperTextOverrides","MuiInputBase","inputBaseOverrides","MuiInputLabel","inputLabelOverrides","MuiMenuItem","menuItemOverrides","MuiSelect","selectOverrides","MuiTextField","textFieldOverrides","lightTheme","darkTheme"],"mappings":"i0BAmBA,MAAMA,EAA8BC,IAClC,MAAMC,EAA6B,YACjCC,EAAAA,WACAC,QAAkB,UAATH,EAAmBI,EAAAA,aAAeC,EAAAA,mBAC3CC,EAAAA,OACAC,YAAa,CACXC,OAAQC,EAAAA,mBAGNC,EAAYC,EAAYV,GAoB9B,OAbAW,OAAOC,KAAKX,EAAAA,YAAYY,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACjDC,EAAgBH,EACtBL,EAAUR,WAAWgB,GAAiB,IACjCR,EAAUR,WAAWgB,GACxB,CAACR,EAAUH,YAAYY,KAAK,WAAY,IACnCC,EAAAA,mBAAmBJ,QAMrBL,EAAY,IACdV,EACHC,WAAYQ,EAAUR,WACtBmB,MAAO,CACLC,aAAc,GAEhBC,cAAe,IACVC,EAAAA,SAELC,WAAY,CACVC,SAAU,CACRC,aAAc,CACZF,WAAY,CACVG,UAAWC,IAGfC,eAAgB,CACdC,KAAM,CAEJT,aAAc,MAEdU,QAAS,QAEXC,KAAM,CAEJC,YAAa,OACbF,QAAS,GAEXG,OAAQ,CACNH,QAAS,EACT,WAAY,CACVI,UAAW,SAGfC,QAAS,CACPL,QAAS,KAIfM,UAAWC,EAAAA,qBAAqB7B,GAChC8B,cAAeC,EAAAA,2BACfC,QAAS,CACPZ,eAAgB,CACdC,KAAM,CACJY,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAapC,EAAUP,QAAQ4C,WAIrCC,QAAS,CACPlB,eAAgB,CACdC,KAAM,CACJkB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBtB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACTsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa9C,EAAUP,QAAQmD,SAASG,OAAO,qBAKrEC,YAAa,CACX5B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACbjC,aAAc,CACZkC,eAAgBC,EAAAA,2BAGpBC,kBAAmBC,EAAAA,wBAAwBtD,GAC3CuD,aAAcC,EAAAA,mBAAmBxD,GACjCyD,cAAeC,EAAAA,oBAAoB1D,GACnC2D,YAAaC,EAAAA,kBAAkB5D,GAC/B6D,UAAWC,EAAAA,gBAAgB9D,GAC3B+D,aAAcC,EAAAA,yBAKPC,EAAa5E,EAA2B,SACxC6E,EAAY7E,EAA2B"}
@@ -1,2 +1,2 @@
1
- import o from"@mui/material/styles/createTheme";import{buttonStyleOverrides as t}from"../components/atoms/Button/buttonThemeOverrides.js";import{iconButtonStyleOverrides as r}from"../components/atoms/IconButton/iconButtonThemeOverrides.js";import e from"../icons/Cancel/index.js";import{breakpointValues as i}from"./tokens/breakpoints/breakpoints.js";import{lightColours as s,darkColours as a}from"./tokens/colours/semantic.js";import{radius as p}from"./tokens/radius/radius.js";import{shadows as n}from"./tokens/shadows/shadows.js";import{typographyVariantMapping as d}from"./tokens/typography/variant-mapping.js";import{typography as m,getMobileTextStyle as l}from"./typography.js";const u=u=>{const c={typography:m,palette:"light"===u?s:a,radius:p,breakpoints:{values:i}},h=o(c);return Object.keys(m).forEach((o=>{const t=o.split(/(?=[A-Z])/)[0],r=o;h.typography[r]={...h.typography[r],[h.breakpoints.down("tablet")]:{...l(t)}}})),o({...c,typography:h.typography,shape:{borderRadius:4},customShadows:{...n},components:{MuiAlert:{defaultProps:{components:{CloseIcon:e}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:t(h),MuiIconButton:r(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:h.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:h.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${h.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:h.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:d}}}})},c=u("light"),h=u("dark");export{h as darkTheme,c as lightTheme};
1
+ import o from"@mui/material/styles/createTheme";import{buttonStyleOverrides as e}from"../components/atoms/Button/buttonThemeOverrides.js";import{iconButtonStyleOverrides as r}from"../components/atoms/IconButton/iconButtonThemeOverrides.js";import t from"../icons/Cancel/index.js";import{formHelperTextOverrides as i}from"./overrides/formHelperTextOverrides.js";import{inputBaseOverrides as s}from"./overrides/inputBaseOverrides.js";import{inputLabelOverrides as p}from"./overrides/inputLabelOverrides.js";import{menuItemOverrides as a}from"./overrides/menuItemOverrides.js";import{selectOverrides as n}from"./overrides/selectOverrides.js";import{textFieldOverrides as d}from"./overrides/textFieldOverrides.js";import{breakpointValues as m}from"./tokens/breakpoints/breakpoints.js";import{lightColours as l,darkColours as u}from"./tokens/colours/semantic.js";import{radius as c}from"./tokens/radius/radius.js";import{shadows as h}from"./tokens/shadows/shadows.js";import{typographyVariantMapping as f}from"./tokens/typography/variant-mapping.js";import{typography as g,getMobileTextStyle as v}from"./typography.js";const y=y=>{const b={typography:g,palette:"light"===y?l:u,radius:c,breakpoints:{values:m}},k=o(b);return Object.keys(g).forEach((o=>{const e=o.split(/(?=[A-Z])/)[0],r=o;k.typography[r]={...k.typography[r],[k.breakpoints.down("tablet")]:{...v(e)}}})),o({...b,typography:k.typography,shape:{borderRadius:4},customShadows:{...h},components:{MuiAlert:{defaultProps:{components:{CloseIcon:t}},styleOverrides:{root:{borderRadius:"8px",padding:"24px"},icon:{marginRight:"12px",padding:0},action:{padding:0,"& button":{marginTop:"-5px"}},message:{padding:0}}},MuiButton:e(k),MuiIconButton:r(),MuiCard:{styleOverrides:{root:{boxShadow:"none",borderWidth:"1px",borderStyle:"solid",borderColor:k.palette.divider}}},MuiChip:{styleOverrides:{root:{fontWeight:"bold",paddingLeft:"6px",paddingRight:"6px"}}},MuiListItemButton:{styleOverrides:{root:{"&:hover":{backgroundColor:k.palette.semantic.fill["fill-primary-weak"]},"&:not(:last-child)":{borderBottom:`1px solid ${k.palette.semantic.stroke["stroke-weak"]}`}}}},MuiTableRow:{styleOverrides:{root:{"&.MuiTableRow-hover:hover":{backgroundColor:k.palette.semantic.fill["fill-secondary"],cursor:"pointer"}}}},MuiTypography:{defaultProps:{variantMapping:f}},MuiFormHelperText:i(k),MuiInputBase:s(k),MuiInputLabel:p(k),MuiMenuItem:a(k),MuiSelect:n(k),MuiTextField:d()}})},b=y("light"),k=y("dark");export{k as darkTheme,b as lightTheme};
2
2
  //# sourceMappingURL=flipdishPublicTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flipdishPublicTheme.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: {\n ...shadows,\n },\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","themeOptions","typography","palette","lightColours","darkColours","radius","breakpoints","values","breakpointValues","baseTheme","createTheme","Object","keys","forEach","key","keyWithoutVariantSuffix","split","typographyKey","down","getMobileTextStyle","shape","borderRadius","customShadows","shadows","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","buttonStyleOverrides","MuiIconButton","iconButtonStyleOverrides","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","lightTheme","darkTheme"],"mappings":"4qBAaA,MAAMA,EAA8BC,IAClC,MAAMC,EAA6B,CACjCC,aACAC,QAAkB,UAATH,EAAmBI,EAAeC,EAC3CC,SACAC,YAAa,CACXC,OAAQC,IAGNC,EAAYC,EAAYV,GAoB9B,OAbAW,OAAOC,KAAKX,GAAYY,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACjDC,EAAgBH,EACtBL,EAAUR,WAAWgB,GAAiB,IACjCR,EAAUR,WAAWgB,GACxB,CAACR,EAAUH,YAAYY,KAAK,WAAY,IACnCC,EAAmBJ,QAMrBL,EAAY,IACdV,EACHC,WAAYQ,EAAUR,WACtBmB,MAAO,CACLC,aAAc,GAEhBC,cAAe,IACVC,GAELC,WAAY,CACVC,SAAU,CACRC,aAAc,CACZF,WAAY,CACVG,UAAWC,IAGfC,eAAgB,CACdC,KAAM,CAEJT,aAAc,MAEdU,QAAS,QAEXC,KAAM,CAEJC,YAAa,OACbF,QAAS,GAEXG,OAAQ,CACNH,QAAS,EACT,WAAY,CACVI,UAAW,SAGfC,QAAS,CACPL,QAAS,KAIfM,UAAWC,EAAqB7B,GAChC8B,cAAeC,IACfC,QAAS,CACPZ,eAAgB,CACdC,KAAM,CACJY,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAapC,EAAUP,QAAQ4C,WAIrCC,QAAS,CACPlB,eAAgB,CACdC,KAAM,CACJkB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBtB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACTsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa9C,EAAUP,QAAQmD,SAASG,OAAO,qBAKrEC,YAAa,CACX5B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACbjC,aAAc,CACZkC,eAAgBC,QAObC,EAAahE,EAA2B,SACxCiE,EAAYjE,EAA2B"}
1
+ {"version":3,"file":"flipdishPublicTheme.js","sources":["../../src/themes/flipdishPublicTheme.ts"],"sourcesContent":["import createTheme, { type Theme, type ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { buttonStyleOverrides } from '../components/atoms/Button/buttonThemeOverrides';\nimport { iconButtonStyleOverrides } from '../components/atoms/IconButton/iconButtonThemeOverrides';\nimport CancelIcon from '../icons/Cancel';\nimport { formHelperTextOverrides } from './overrides/formHelperTextOverrides';\nimport { inputBaseOverrides } from './overrides/inputBaseOverrides';\nimport { inputLabelOverrides } from './overrides/inputLabelOverrides';\nimport { menuItemOverrides } from './overrides/menuItemOverrides';\nimport { selectOverrides } from './overrides/selectOverrides';\nimport { textFieldOverrides } from './overrides/textFieldOverrides';\nimport { breakpointValues } from './tokens/breakpoints/breakpoints';\nimport { darkColours, lightColours } from './tokens/colours/semantic';\nimport { radius } from './tokens/radius/radius';\nimport { shadows } from './tokens/shadows/shadows';\nimport { fontSize } from './tokens/typography/font-size';\nimport { typographyVariantMapping } from './tokens/typography/variant-mapping';\nimport { getMobileTextStyle, typography } from './typography';\n\nconst createFlipdishThemeFactory = (mode: 'dark' | 'light'): Theme => {\n const themeOptions: ThemeOptions = {\n typography,\n palette: mode === 'light' ? lightColours : darkColours,\n radius,\n breakpoints: {\n values: breakpointValues,\n },\n };\n const baseTheme = createTheme(themeOptions);\n\n /*\n Add mobile text styles to typography\n Has to be done using media queries, otherwise it isn't responsive :(\n https://mui.com/material-ui/customization/typography/#responsive-font-sizes\n */\n Object.keys(typography).forEach((key) => {\n // only key before the suffix split by capital letter (h1Strong -> h1)\n const keyWithoutVariantSuffix = key.split(/(?=[A-Z])/)[0];\n const typographyKey = key as keyof typeof typography;\n baseTheme.typography[typographyKey] = {\n ...baseTheme.typography[typographyKey],\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(keyWithoutVariantSuffix as keyof (typeof fontSize)['mobile']),\n },\n };\n });\n\n // Create final theme with component overrides and additional configurations\n return createTheme({\n ...themeOptions,\n typography: baseTheme.typography,\n shape: {\n borderRadius: 4,\n },\n customShadows: {\n ...shadows,\n },\n components: {\n MuiAlert: {\n defaultProps: {\n components: {\n CloseIcon: CancelIcon,\n },\n },\n styleOverrides: {\n root: {\n // TODO: Replace with borderRadius from tokens when implemented\n borderRadius: '8px',\n // TODO: Replace with spacing from tokens when implemented\n padding: '24px',\n },\n icon: {\n // TODO: Replace with spacing from tokens when implemented\n marginRight: '12px',\n padding: 0,\n },\n action: {\n padding: 0,\n '& button': {\n marginTop: '-5px',\n },\n },\n message: {\n padding: 0,\n },\n },\n },\n MuiButton: buttonStyleOverrides(baseTheme),\n MuiIconButton: iconButtonStyleOverrides(),\n MuiCard: {\n styleOverrides: {\n root: {\n boxShadow: 'none',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: baseTheme.palette.divider,\n },\n },\n },\n MuiChip: {\n styleOverrides: {\n root: {\n fontWeight: 'bold',\n paddingLeft: '6px',\n paddingRight: '6px',\n },\n },\n },\n MuiListItemButton: {\n styleOverrides: {\n root: {\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-primary-weak'],\n },\n '&:not(:last-child)': {\n borderBottom: `1px solid ${baseTheme.palette.semantic.stroke['stroke-weak']}`,\n },\n },\n },\n },\n MuiTableRow: {\n styleOverrides: {\n root: {\n '&.MuiTableRow-hover:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-secondary'],\n cursor: 'pointer',\n },\n },\n },\n },\n MuiTypography: {\n defaultProps: {\n variantMapping: typographyVariantMapping,\n },\n },\n MuiFormHelperText: formHelperTextOverrides(baseTheme),\n MuiInputBase: inputBaseOverrides(baseTheme),\n MuiInputLabel: inputLabelOverrides(baseTheme),\n MuiMenuItem: menuItemOverrides(baseTheme),\n MuiSelect: selectOverrides(baseTheme),\n MuiTextField: textFieldOverrides(),\n },\n });\n};\n\nexport const lightTheme = createFlipdishThemeFactory('light');\nexport const darkTheme = createFlipdishThemeFactory('dark');\n"],"names":["createFlipdishThemeFactory","mode","themeOptions","typography","palette","lightColours","darkColours","radius","breakpoints","values","breakpointValues","baseTheme","createTheme","Object","keys","forEach","key","keyWithoutVariantSuffix","split","typographyKey","down","getMobileTextStyle","shape","borderRadius","customShadows","shadows","components","MuiAlert","defaultProps","CloseIcon","CancelIcon","styleOverrides","root","padding","icon","marginRight","action","marginTop","message","MuiButton","buttonStyleOverrides","MuiIconButton","iconButtonStyleOverrides","MuiCard","boxShadow","borderWidth","borderStyle","borderColor","divider","MuiChip","fontWeight","paddingLeft","paddingRight","MuiListItemButton","backgroundColor","semantic","fill","borderBottom","stroke","MuiTableRow","cursor","MuiTypography","variantMapping","typographyVariantMapping","MuiFormHelperText","formHelperTextOverrides","MuiInputBase","inputBaseOverrides","MuiInputLabel","inputLabelOverrides","MuiMenuItem","menuItemOverrides","MuiSelect","selectOverrides","MuiTextField","textFieldOverrides","lightTheme","darkTheme"],"mappings":"0lCAmBA,MAAMA,EAA8BC,IAClC,MAAMC,EAA6B,CACjCC,aACAC,QAAkB,UAATH,EAAmBI,EAAeC,EAC3CC,SACAC,YAAa,CACXC,OAAQC,IAGNC,EAAYC,EAAYV,GAoB9B,OAbAW,OAAOC,KAAKX,GAAYY,SAASC,IAE/B,MAAMC,EAA0BD,EAAIE,MAAM,aAAa,GACjDC,EAAgBH,EACtBL,EAAUR,WAAWgB,GAAiB,IACjCR,EAAUR,WAAWgB,GACxB,CAACR,EAAUH,YAAYY,KAAK,WAAY,IACnCC,EAAmBJ,QAMrBL,EAAY,IACdV,EACHC,WAAYQ,EAAUR,WACtBmB,MAAO,CACLC,aAAc,GAEhBC,cAAe,IACVC,GAELC,WAAY,CACVC,SAAU,CACRC,aAAc,CACZF,WAAY,CACVG,UAAWC,IAGfC,eAAgB,CACdC,KAAM,CAEJT,aAAc,MAEdU,QAAS,QAEXC,KAAM,CAEJC,YAAa,OACbF,QAAS,GAEXG,OAAQ,CACNH,QAAS,EACT,WAAY,CACVI,UAAW,SAGfC,QAAS,CACPL,QAAS,KAIfM,UAAWC,EAAqB7B,GAChC8B,cAAeC,IACfC,QAAS,CACPZ,eAAgB,CACdC,KAAM,CACJY,UAAW,OACXC,YAAa,MACbC,YAAa,QACbC,YAAapC,EAAUP,QAAQ4C,WAIrCC,QAAS,CACPlB,eAAgB,CACdC,KAAM,CACJkB,WAAY,OACZC,YAAa,MACbC,aAAc,SAIpBC,kBAAmB,CACjBtB,eAAgB,CACdC,KAAM,CACJ,UAAW,CACTsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,sBAEnD,qBAAsB,CACpBC,aAAc,aAAa9C,EAAUP,QAAQmD,SAASG,OAAO,qBAKrEC,YAAa,CACX5B,eAAgB,CACdC,KAAM,CACJ,4BAA6B,CAC3BsB,gBAAiB3C,EAAUP,QAAQmD,SAASC,KAAK,kBACjDI,OAAQ,cAKhBC,cAAe,CACbjC,aAAc,CACZkC,eAAgBC,IAGpBC,kBAAmBC,EAAwBtD,GAC3CuD,aAAcC,EAAmBxD,GACjCyD,cAAeC,EAAoB1D,GACnC2D,YAAaC,EAAkB5D,GAC/B6D,UAAWC,EAAgB9D,GAC3B+D,aAAcC,QAKPC,EAAa5E,EAA2B,SACxC6E,EAAY7E,EAA2B"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{...e.typography.captionWeak,alignItems:"center",color:t.palette.semantic.text["text-weak"],display:"flex",gap:t.spacing(.5),margin:0,"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],"& svg":{color:t.palette.semantic.icon["icon-disabled"]}},"&.Mui-error":{color:t.palette.semantic.text["text-error"],fontWeight:600,"& svg":{color:t.palette.semantic.icon["icon-error"]}},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("caption")}}}});exports.default=t,exports.formHelperTextOverrides=t;
2
+ //# sourceMappingURL=formHelperTextOverrides.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formHelperTextOverrides.cjs.js","sources":["../../../src/themes/overrides/formHelperTextOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const formHelperTextOverrides = (baseTheme: Theme): Components<Theme>['MuiFormHelperText'] => ({\n styleOverrides: {\n root: {\n ...typography.captionWeak,\n alignItems: 'center',\n color: baseTheme.palette.semantic.text['text-weak'],\n display: 'flex',\n gap: baseTheme.spacing(0.5),\n margin: 0,\n\n '&.Mui-disabled': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n\n '& svg': {\n color: baseTheme.palette.semantic.icon['icon-disabled'],\n },\n },\n '&.Mui-error': {\n color: baseTheme.palette.semantic.text['text-error'],\n fontWeight: 600,\n\n '& svg': {\n color: baseTheme.palette.semantic.icon['icon-error'],\n },\n },\n\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('caption'),\n },\n },\n },\n});\n\nexport default formHelperTextOverrides;\n"],"names":["formHelperTextOverrides","baseTheme","styleOverrides","root","typography","captionWeak","alignItems","color","palette","semantic","text","display","gap","spacing","margin","icon","fontWeight","breakpoints","down","getMobileTextStyle"],"mappings":"gJAIaA,EAA2BC,IAAgB,CACtDC,eAAgB,CACdC,KAAM,IACDC,EAAAA,WAAWC,YACdC,WAAY,SACZC,MAAON,EAAUO,QAAQC,SAASC,KAAK,aACvCC,QAAS,OACTC,IAAKX,EAAUY,QAAQ,IACvBC,OAAQ,EAER,iBAAkB,CAChBP,MAAON,EAAUO,QAAQC,SAASC,KAAK,iBAEvC,QAAS,CACPH,MAAON,EAAUO,QAAQC,SAASM,KAAK,mBAG3C,cAAe,CACbR,MAAON,EAAUO,QAAQC,SAASC,KAAK,cACvCM,WAAY,IAEZ,QAAS,CACPT,MAAON,EAAUO,QAAQC,SAASM,KAAK,gBAI3C,CAACd,EAAUgB,YAAYC,KAAK,WAAY,IACnCC,EAAAA,mBAAmB"}
@@ -0,0 +1,5 @@
1
+ import { Theme, Components } from '@mui/material/styles';
2
+
3
+ declare const formHelperTextOverrides: (baseTheme: Theme) => Components<Theme>['MuiFormHelperText'];
4
+
5
+ export { formHelperTextOverrides as default, formHelperTextOverrides };
@@ -0,0 +1,2 @@
1
+ import"@mui/material/styles";import{getMobileTextStyle as t,typography as e}from"../typography.js";const o=o=>({styleOverrides:{root:{...e.captionWeak,alignItems:"center",color:o.palette.semantic.text["text-weak"],display:"flex",gap:o.spacing(.5),margin:0,"&.Mui-disabled":{color:o.palette.semantic.text["text-disabled"],"& svg":{color:o.palette.semantic.icon["icon-disabled"]}},"&.Mui-error":{color:o.palette.semantic.text["text-error"],fontWeight:600,"& svg":{color:o.palette.semantic.icon["icon-error"]}},[o.breakpoints.down("tablet")]:{...t("caption")}}}});export{o as default,o as formHelperTextOverrides};
2
+ //# sourceMappingURL=formHelperTextOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formHelperTextOverrides.js","sources":["../../../src/themes/overrides/formHelperTextOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const formHelperTextOverrides = (baseTheme: Theme): Components<Theme>['MuiFormHelperText'] => ({\n styleOverrides: {\n root: {\n ...typography.captionWeak,\n alignItems: 'center',\n color: baseTheme.palette.semantic.text['text-weak'],\n display: 'flex',\n gap: baseTheme.spacing(0.5),\n margin: 0,\n\n '&.Mui-disabled': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n\n '& svg': {\n color: baseTheme.palette.semantic.icon['icon-disabled'],\n },\n },\n '&.Mui-error': {\n color: baseTheme.palette.semantic.text['text-error'],\n fontWeight: 600,\n\n '& svg': {\n color: baseTheme.palette.semantic.icon['icon-error'],\n },\n },\n\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('caption'),\n },\n },\n },\n});\n\nexport default formHelperTextOverrides;\n"],"names":["formHelperTextOverrides","baseTheme","styleOverrides","root","typography","captionWeak","alignItems","color","palette","semantic","text","display","gap","spacing","margin","icon","fontWeight","breakpoints","down","getMobileTextStyle"],"mappings":"yGAIaA,EAA2BC,IAAgB,CACtDC,eAAgB,CACdC,KAAM,IACDC,EAAWC,YACdC,WAAY,SACZC,MAAON,EAAUO,QAAQC,SAASC,KAAK,aACvCC,QAAS,OACTC,IAAKX,EAAUY,QAAQ,IACvBC,OAAQ,EAER,iBAAkB,CAChBP,MAAON,EAAUO,QAAQC,SAASC,KAAK,iBAEvC,QAAS,CACPH,MAAON,EAAUO,QAAQC,SAASM,KAAK,mBAG3C,cAAe,CACbR,MAAON,EAAUO,QAAQC,SAASC,KAAK,cACvCM,WAAY,IAEZ,QAAS,CACPT,MAAON,EAAUO,QAAQC,SAASM,KAAK,gBAI3C,CAACd,EAAUgB,YAAYC,KAAK,WAAY,IACnCC,EAAmB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{backgroundColor:t.palette.semantic.fill["fill-inverse-strong"],backgroundImage:"none",border:"1px solid",borderColor:t.palette.semantic.stroke["stroke-strong"],borderRadius:t.radius["radius-8"],minHeight:50,padding:t.spacing(0,2),"&.Mui-disabled":{borderColor:t.palette.semantic.stroke["stroke-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto"},"&.Mui-focused:not(.Mui-disabled)":{outline:`2px solid ${t.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"},"&:hover:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${t.palette.semantic.fill["fill-hover"]}, ${t.palette.semantic.fill["fill-hover"]})`},"&:active:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${t.palette.semantic.fill["fill-press"]}, ${t.palette.semantic.fill["fill-press"]})`},"&.Mui-error":{backgroundColor:t.palette.semantic.fill["fill-error-weak"],border:"2px solid",borderColor:t.palette.semantic.stroke["stroke-error-strong"]}},input:{...e.typography.b1Weak,color:t.palette.semantic.text["text-strong"],"&.MuiOutlinedInput-input":{padding:0},"&::placeholder":{...e.typography.b1Weak,color:t.palette.semantic.text["text-weak"],opacity:1},"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],cursor:"not-allowed",pointerEvents:"auto","-webkit-text-fill-color":t.palette.semantic.text["text-disabled"],"&::placeholder":{color:t.palette.semantic.text["text-disabled"],"-webkit-text-fill-color":t.palette.semantic.text["text-disabled"]}},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1"),"&::placeholder":{...e.getMobileTextStyle("b1")}}},inputMultiline:{padding:t.spacing(1.5,2),"&.MuiOutlinedInput-input":{padding:0}}}});exports.default=t,exports.inputBaseOverrides=t;
2
+ //# sourceMappingURL=inputBaseOverrides.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputBaseOverrides.cjs.js","sources":["../../../src/themes/overrides/inputBaseOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputBaseOverrides = (theme: Theme): Components<Theme>['MuiInputBase'] => ({\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n backgroundImage: 'none',\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-strong'],\n borderRadius: theme.radius['radius-8'],\n minHeight: 50,\n padding: theme.spacing(0, 2),\n\n '&.Mui-disabled': {\n borderColor: theme.palette.semantic.stroke['stroke-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n },\n '&.Mui-focused:not(.Mui-disabled)': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-hover']}, ${theme.palette.semantic.fill['fill-hover']})`,\n },\n '&:active:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-press']}, ${theme.palette.semantic.fill['fill-press']})`,\n },\n '&.Mui-error': {\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n border: '2px solid',\n borderColor: theme.palette.semantic.stroke['stroke-error-strong'],\n },\n },\n input: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-strong'],\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n '&::placeholder': {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n opacity: 1,\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n '-webkit-text-fill-color': theme.palette.semantic.text['text-disabled'],\n\n '&::placeholder': {\n color: theme.palette.semantic.text['text-disabled'],\n '-webkit-text-fill-color': theme.palette.semantic.text['text-disabled'],\n },\n },\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n\n '&::placeholder': {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n inputMultiline: {\n padding: theme.spacing(1.5, 2),\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n },\n },\n});\n\nexport default inputBaseOverrides;\n"],"names":["inputBaseOverrides","theme","styleOverrides","root","backgroundColor","palette","semantic","fill","backgroundImage","border","borderColor","stroke","borderRadius","radius","minHeight","padding","spacing","cursor","opacity","pointerEvents","outline","outlineOffset","input","typography","b1Weak","color","text","breakpoints","down","getMobileTextStyle","inputMultiline"],"mappings":"gJAIaA,EAAsBC,IAAY,CAC7CC,eAAgB,CACdC,KAAM,CACJC,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,uBAC7CC,gBAAiB,OACjBC,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,iBAC3CC,aAAcX,EAAMY,OAAO,YAC3BC,UAAW,GACXC,QAASd,EAAMe,QAAQ,EAAG,GAE1B,iBAAkB,CAChBN,YAAaT,EAAMI,QAAQC,SAASK,OAAO,mBAC3CM,OAAQ,cACRC,QAAS,EACTC,cAAe,QAEjB,mCAAoC,CAClCC,QAAS,aAAanB,EAAMI,QAAQC,SAASK,OAAO,kBACpDU,cAAe,OAEjB,6BAA8B,CAC5Bb,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,kBAEhH,8BAA+B,CAC7BC,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,kBAEhH,cAAe,CACbH,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,mBAC7CE,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,yBAG/CW,MAAO,IACFC,EAAAA,WAAWC,OACdC,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,eAEnC,2BAA4B,CAC1BX,QAAS,GAEX,iBAAkB,IACbQ,EAAAA,WAAWC,OACdC,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,aACnCR,QAAS,GAEX,iBAAkB,CAChBO,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,iBACnCT,OAAQ,cACRE,cAAe,OACf,0BAA2BlB,EAAMI,QAAQC,SAASoB,KAAK,iBAEvD,iBAAkB,CAChBD,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,iBACnC,0BAA2BzB,EAAMI,QAAQC,SAASoB,KAAK,mBAI3D,CAACzB,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBAAmB,MAEtB,iBAAkB,IACbA,EAAAA,mBAAmB,SAI5BC,eAAgB,CACdf,QAASd,EAAMe,QAAQ,IAAK,GAE5B,2BAA4B,CAC1BD,QAAS"}
@@ -0,0 +1,5 @@
1
+ import { Theme, Components } from '@mui/material/styles';
2
+
3
+ declare const inputBaseOverrides: (theme: Theme) => Components<Theme>['MuiInputBase'];
4
+
5
+ export { inputBaseOverrides as default, inputBaseOverrides };
@@ -0,0 +1,2 @@
1
+ import"@mui/material/styles";import{getMobileTextStyle as e,typography as t}from"../typography.js";const i=i=>({styleOverrides:{root:{backgroundColor:i.palette.semantic.fill["fill-inverse-strong"],backgroundImage:"none",border:"1px solid",borderColor:i.palette.semantic.stroke["stroke-strong"],borderRadius:i.radius["radius-8"],minHeight:50,padding:i.spacing(0,2),"&.Mui-disabled":{borderColor:i.palette.semantic.stroke["stroke-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto"},"&.Mui-focused:not(.Mui-disabled)":{outline:`2px solid ${i.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"},"&:hover:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${i.palette.semantic.fill["fill-hover"]}, ${i.palette.semantic.fill["fill-hover"]})`},"&:active:not(.Mui-disabled)":{backgroundImage:`linear-gradient(${i.palette.semantic.fill["fill-press"]}, ${i.palette.semantic.fill["fill-press"]})`},"&.Mui-error":{backgroundColor:i.palette.semantic.fill["fill-error-weak"],border:"2px solid",borderColor:i.palette.semantic.stroke["stroke-error-strong"]}},input:{...t.b1Weak,color:i.palette.semantic.text["text-strong"],"&.MuiOutlinedInput-input":{padding:0},"&::placeholder":{...t.b1Weak,color:i.palette.semantic.text["text-weak"],opacity:1},"&.Mui-disabled":{color:i.palette.semantic.text["text-disabled"],cursor:"not-allowed",pointerEvents:"auto","-webkit-text-fill-color":i.palette.semantic.text["text-disabled"],"&::placeholder":{color:i.palette.semantic.text["text-disabled"],"-webkit-text-fill-color":i.palette.semantic.text["text-disabled"]}},[i.breakpoints.down("tablet")]:{...e("b1"),"&::placeholder":{...e("b1")}}},inputMultiline:{padding:i.spacing(1.5,2),"&.MuiOutlinedInput-input":{padding:0}}}});export{i as default,i as inputBaseOverrides};
2
+ //# sourceMappingURL=inputBaseOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputBaseOverrides.js","sources":["../../../src/themes/overrides/inputBaseOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputBaseOverrides = (theme: Theme): Components<Theme>['MuiInputBase'] => ({\n styleOverrides: {\n root: {\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n backgroundImage: 'none',\n border: '1px solid',\n borderColor: theme.palette.semantic.stroke['stroke-strong'],\n borderRadius: theme.radius['radius-8'],\n minHeight: 50,\n padding: theme.spacing(0, 2),\n\n '&.Mui-disabled': {\n borderColor: theme.palette.semantic.stroke['stroke-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n },\n '&.Mui-focused:not(.Mui-disabled)': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n '&:hover:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-hover']}, ${theme.palette.semantic.fill['fill-hover']})`,\n },\n '&:active:not(.Mui-disabled)': {\n backgroundImage: `linear-gradient(${theme.palette.semantic.fill['fill-press']}, ${theme.palette.semantic.fill['fill-press']})`,\n },\n '&.Mui-error': {\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n border: '2px solid',\n borderColor: theme.palette.semantic.stroke['stroke-error-strong'],\n },\n },\n input: {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-strong'],\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n '&::placeholder': {\n ...typography.b1Weak,\n color: theme.palette.semantic.text['text-weak'],\n opacity: 1,\n },\n '&.Mui-disabled': {\n color: theme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n pointerEvents: 'auto',\n '-webkit-text-fill-color': theme.palette.semantic.text['text-disabled'],\n\n '&::placeholder': {\n color: theme.palette.semantic.text['text-disabled'],\n '-webkit-text-fill-color': theme.palette.semantic.text['text-disabled'],\n },\n },\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n\n '&::placeholder': {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n inputMultiline: {\n padding: theme.spacing(1.5, 2),\n\n '&.MuiOutlinedInput-input': {\n padding: 0,\n },\n },\n },\n});\n\nexport default inputBaseOverrides;\n"],"names":["inputBaseOverrides","theme","styleOverrides","root","backgroundColor","palette","semantic","fill","backgroundImage","border","borderColor","stroke","borderRadius","radius","minHeight","padding","spacing","cursor","opacity","pointerEvents","outline","outlineOffset","input","typography","b1Weak","color","text","breakpoints","down","getMobileTextStyle","inputMultiline"],"mappings":"yGAIaA,EAAsBC,IAAY,CAC7CC,eAAgB,CACdC,KAAM,CACJC,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,uBAC7CC,gBAAiB,OACjBC,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,iBAC3CC,aAAcX,EAAMY,OAAO,YAC3BC,UAAW,GACXC,QAASd,EAAMe,QAAQ,EAAG,GAE1B,iBAAkB,CAChBN,YAAaT,EAAMI,QAAQC,SAASK,OAAO,mBAC3CM,OAAQ,cACRC,QAAS,EACTC,cAAe,QAEjB,mCAAoC,CAClCC,QAAS,aAAanB,EAAMI,QAAQC,SAASK,OAAO,kBACpDU,cAAe,OAEjB,6BAA8B,CAC5Bb,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,kBAEhH,8BAA+B,CAC7BC,gBAAiB,mBAAmBP,EAAMI,QAAQC,SAASC,KAAK,kBAAkBN,EAAMI,QAAQC,SAASC,KAAK,kBAEhH,cAAe,CACbH,gBAAiBH,EAAMI,QAAQC,SAASC,KAAK,mBAC7CE,OAAQ,YACRC,YAAaT,EAAMI,QAAQC,SAASK,OAAO,yBAG/CW,MAAO,IACFC,EAAWC,OACdC,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,eAEnC,2BAA4B,CAC1BX,QAAS,GAEX,iBAAkB,IACbQ,EAAWC,OACdC,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,aACnCR,QAAS,GAEX,iBAAkB,CAChBO,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,iBACnCT,OAAQ,cACRE,cAAe,OACf,0BAA2BlB,EAAMI,QAAQC,SAASoB,KAAK,iBAEvD,iBAAkB,CAChBD,MAAOxB,EAAMI,QAAQC,SAASoB,KAAK,iBACnC,0BAA2BzB,EAAMI,QAAQC,SAASoB,KAAK,mBAI3D,CAACzB,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EAAmB,MAEtB,iBAAkB,IACbA,EAAmB,SAI5BC,eAAgB,CACdf,QAASd,EAAMe,QAAQ,IAAK,GAE5B,2BAA4B,CAC1BD,QAAS"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{...e.typography.b1Weak,color:t.palette.semantic.text["text-strong"],"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],"& .MuiInputLabel-asterisk":{color:t.palette.semantic.text["text-disabled"]}},"&.Mui-error":{color:t.palette.semantic.text["text-error"],"& .MuiInputLabel-asterisk":{color:t.palette.semantic.text["text-error"]}},"& .MuiInputLabel-asterisk":{color:t.palette.semantic.text["text-weak"]},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1")}}}});exports.default=t,exports.inputLabelOverrides=t;
2
+ //# sourceMappingURL=inputLabelOverrides.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputLabelOverrides.cjs.js","sources":["../../../src/themes/overrides/inputLabelOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputLabelOverrides = (baseTheme: Theme): Components<Theme>['MuiInputLabel'] => ({\n styleOverrides: {\n root: {\n ...typography.b1Weak,\n color: baseTheme.palette.semantic.text['text-strong'],\n\n '&.Mui-disabled': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n\n '& .MuiInputLabel-asterisk': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n },\n },\n '&.Mui-error': {\n color: baseTheme.palette.semantic.text['text-error'],\n\n '& .MuiInputLabel-asterisk': {\n color: baseTheme.palette.semantic.text['text-error'],\n },\n },\n '& .MuiInputLabel-asterisk': {\n color: baseTheme.palette.semantic.text['text-weak'],\n },\n\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default inputLabelOverrides;\n"],"names":["inputLabelOverrides","baseTheme","styleOverrides","root","typography","b1Weak","color","palette","semantic","text","breakpoints","down","getMobileTextStyle"],"mappings":"gJAIaA,EAAuBC,IAAgB,CAClDC,eAAgB,CACdC,KAAM,IACDC,EAAAA,WAAWC,OACdC,MAAOL,EAAUM,QAAQC,SAASC,KAAK,eAEvC,iBAAkB,CAChBH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,iBAEvC,4BAA6B,CAC3BH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,mBAG3C,cAAe,CACbH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,cAEvC,4BAA6B,CAC3BH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,gBAG3C,4BAA6B,CAC3BH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,cAGzC,CAACR,EAAUS,YAAYC,KAAK,WAAY,IACnCC,EAAAA,mBAAmB"}
@@ -0,0 +1,5 @@
1
+ import { Theme, Components } from '@mui/material/styles';
2
+
3
+ declare const inputLabelOverrides: (baseTheme: Theme) => Components<Theme>['MuiInputLabel'];
4
+
5
+ export { inputLabelOverrides as default, inputLabelOverrides };
@@ -0,0 +1,2 @@
1
+ import"@mui/material/styles";import{getMobileTextStyle as t,typography as e}from"../typography.js";const a=a=>({styleOverrides:{root:{...e.b1Weak,color:a.palette.semantic.text["text-strong"],"&.Mui-disabled":{color:a.palette.semantic.text["text-disabled"],"& .MuiInputLabel-asterisk":{color:a.palette.semantic.text["text-disabled"]}},"&.Mui-error":{color:a.palette.semantic.text["text-error"],"& .MuiInputLabel-asterisk":{color:a.palette.semantic.text["text-error"]}},"& .MuiInputLabel-asterisk":{color:a.palette.semantic.text["text-weak"]},[a.breakpoints.down("tablet")]:{...t("b1")}}}});export{a as default,a as inputLabelOverrides};
2
+ //# sourceMappingURL=inputLabelOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputLabelOverrides.js","sources":["../../../src/themes/overrides/inputLabelOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const inputLabelOverrides = (baseTheme: Theme): Components<Theme>['MuiInputLabel'] => ({\n styleOverrides: {\n root: {\n ...typography.b1Weak,\n color: baseTheme.palette.semantic.text['text-strong'],\n\n '&.Mui-disabled': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n\n '& .MuiInputLabel-asterisk': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n },\n },\n '&.Mui-error': {\n color: baseTheme.palette.semantic.text['text-error'],\n\n '& .MuiInputLabel-asterisk': {\n color: baseTheme.palette.semantic.text['text-error'],\n },\n },\n '& .MuiInputLabel-asterisk': {\n color: baseTheme.palette.semantic.text['text-weak'],\n },\n\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default inputLabelOverrides;\n"],"names":["inputLabelOverrides","baseTheme","styleOverrides","root","typography","b1Weak","color","palette","semantic","text","breakpoints","down","getMobileTextStyle"],"mappings":"yGAIaA,EAAuBC,IAAgB,CAClDC,eAAgB,CACdC,KAAM,IACDC,EAAWC,OACdC,MAAOL,EAAUM,QAAQC,SAASC,KAAK,eAEvC,iBAAkB,CAChBH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,iBAEvC,4BAA6B,CAC3BH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,mBAG3C,cAAe,CACbH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,cAEvC,4BAA6B,CAC3BH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,gBAG3C,4BAA6B,CAC3BH,MAAOL,EAAUM,QAAQC,SAASC,KAAK,cAGzC,CAACR,EAAUS,YAAYC,KAAK,WAAY,IACnCC,EAAmB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");var e=require("../typography.cjs.js");const t=t=>({styleOverrides:{root:{...e.typography.b1Weak,backgroundColor:t.palette.semantic.fill["fill-inverse-strong"],color:t.palette.semantic.text["text-strong"],padding:t.spacing(1.5,2),"&.Mui-disabled":{color:t.palette.semantic.text["text-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto","&:hover":{backgroundColor:t.palette.semantic.fill["fill-inverse-strong"],color:t.palette.semantic.text["text-disabled"]}},"&.Mui-selected":{backgroundColor:t.palette.semantic.fill["fill-weak"],color:t.palette.semantic.text["text-primary"],"&:hover":{backgroundColor:t.palette.semantic.fill["fill-weak"],color:t.palette.semantic.text["text-primary"]}},"&:hover:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:t.palette.semantic.fill["fill-hover"],color:t.palette.semantic.text["text-strong"]},"&:active:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:t.palette.semantic.fill["fill-press"],color:t.palette.semantic.text["text-strong"]},[t.breakpoints.down("tablet")]:{...e.getMobileTextStyle("b1")}}}});exports.default=t,exports.menuItemOverrides=t;
2
+ //# sourceMappingURL=menuItemOverrides.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menuItemOverrides.cjs.js","sources":["../../../src/themes/overrides/menuItemOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const menuItemOverrides = (baseTheme: Theme): Components<Theme>['MuiMenuItem'] => ({\n styleOverrides: {\n root: {\n ...typography.b1Weak,\n backgroundColor: baseTheme.palette.semantic.fill['fill-inverse-strong'],\n color: baseTheme.palette.semantic.text['text-strong'],\n padding: baseTheme.spacing(1.5, 2),\n\n '&.Mui-disabled': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-inverse-strong'],\n color: baseTheme.palette.semantic.text['text-disabled'],\n },\n },\n '&.Mui-selected': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-weak'],\n color: baseTheme.palette.semantic.text['text-primary'],\n\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-weak'],\n color: baseTheme.palette.semantic.text['text-primary'],\n },\n },\n '&:hover:not(.Mui-disabled):not(.Mui-selected)': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-hover'],\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n '&:active:not(.Mui-disabled):not(.Mui-selected)': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-press'],\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default menuItemOverrides;\n"],"names":["menuItemOverrides","baseTheme","styleOverrides","root","typography","b1Weak","backgroundColor","palette","semantic","fill","color","text","padding","spacing","cursor","opacity","pointerEvents","breakpoints","down","getMobileTextStyle"],"mappings":"gJAIaA,EAAqBC,IAAgB,CAChDC,eAAgB,CACdC,KAAM,IACDC,EAAAA,WAAWC,OACdC,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,uBACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,eACvCC,QAASX,EAAUY,QAAQ,IAAK,GAEhC,iBAAkB,CAChBH,MAAOT,EAAUM,QAAQC,SAASG,KAAK,iBACvCG,OAAQ,cACRC,QAAS,EACTC,cAAe,OAEf,UAAW,CACTV,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,uBACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,mBAG3C,iBAAkB,CAChBL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,aACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,gBAEvC,UAAW,CACTL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,aACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,kBAG3C,gDAAiD,CAC/CL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,cACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,gBAEzC,iDAAkD,CAChDL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,cACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,gBAGzC,CAACV,EAAUgB,YAAYC,KAAK,WAAY,IACnCC,EAAAA,mBAAmB"}
@@ -0,0 +1,5 @@
1
+ import { Theme, Components } from '@mui/material/styles';
2
+
3
+ declare const menuItemOverrides: (baseTheme: Theme) => Components<Theme>['MuiMenuItem'];
4
+
5
+ export { menuItemOverrides as default, menuItemOverrides };
@@ -0,0 +1,2 @@
1
+ import"@mui/material/styles";import{getMobileTextStyle as t,typography as e}from"../typography.js";const l=l=>({styleOverrides:{root:{...e.b1Weak,backgroundColor:l.palette.semantic.fill["fill-inverse-strong"],color:l.palette.semantic.text["text-strong"],padding:l.spacing(1.5,2),"&.Mui-disabled":{color:l.palette.semantic.text["text-disabled"],cursor:"not-allowed",opacity:1,pointerEvents:"auto","&:hover":{backgroundColor:l.palette.semantic.fill["fill-inverse-strong"],color:l.palette.semantic.text["text-disabled"]}},"&.Mui-selected":{backgroundColor:l.palette.semantic.fill["fill-weak"],color:l.palette.semantic.text["text-primary"],"&:hover":{backgroundColor:l.palette.semantic.fill["fill-weak"],color:l.palette.semantic.text["text-primary"]}},"&:hover:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:l.palette.semantic.fill["fill-hover"],color:l.palette.semantic.text["text-strong"]},"&:active:not(.Mui-disabled):not(.Mui-selected)":{backgroundColor:l.palette.semantic.fill["fill-press"],color:l.palette.semantic.text["text-strong"]},[l.breakpoints.down("tablet")]:{...t("b1")}}}});export{l as default,l as menuItemOverrides};
2
+ //# sourceMappingURL=menuItemOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menuItemOverrides.js","sources":["../../../src/themes/overrides/menuItemOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\nexport const menuItemOverrides = (baseTheme: Theme): Components<Theme>['MuiMenuItem'] => ({\n styleOverrides: {\n root: {\n ...typography.b1Weak,\n backgroundColor: baseTheme.palette.semantic.fill['fill-inverse-strong'],\n color: baseTheme.palette.semantic.text['text-strong'],\n padding: baseTheme.spacing(1.5, 2),\n\n '&.Mui-disabled': {\n color: baseTheme.palette.semantic.text['text-disabled'],\n cursor: 'not-allowed',\n opacity: 1, // Override default MUI opacity\n pointerEvents: 'auto',\n\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-inverse-strong'],\n color: baseTheme.palette.semantic.text['text-disabled'],\n },\n },\n '&.Mui-selected': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-weak'],\n color: baseTheme.palette.semantic.text['text-primary'],\n\n '&:hover': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-weak'],\n color: baseTheme.palette.semantic.text['text-primary'],\n },\n },\n '&:hover:not(.Mui-disabled):not(.Mui-selected)': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-hover'],\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n '&:active:not(.Mui-disabled):not(.Mui-selected)': {\n backgroundColor: baseTheme.palette.semantic.fill['fill-press'],\n color: baseTheme.palette.semantic.text['text-strong'],\n },\n\n [baseTheme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle('b1'),\n },\n },\n },\n});\n\nexport default menuItemOverrides;\n"],"names":["menuItemOverrides","baseTheme","styleOverrides","root","typography","b1Weak","backgroundColor","palette","semantic","fill","color","text","padding","spacing","cursor","opacity","pointerEvents","breakpoints","down","getMobileTextStyle"],"mappings":"yGAIaA,EAAqBC,IAAgB,CAChDC,eAAgB,CACdC,KAAM,IACDC,EAAWC,OACdC,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,uBACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,eACvCC,QAASX,EAAUY,QAAQ,IAAK,GAEhC,iBAAkB,CAChBH,MAAOT,EAAUM,QAAQC,SAASG,KAAK,iBACvCG,OAAQ,cACRC,QAAS,EACTC,cAAe,OAEf,UAAW,CACTV,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,uBACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,mBAG3C,iBAAkB,CAChBL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,aACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,gBAEvC,UAAW,CACTL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,aACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,kBAG3C,gDAAiD,CAC/CL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,cACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,gBAEzC,iDAAkD,CAChDL,gBAAiBL,EAAUM,QAAQC,SAASC,KAAK,cACjDC,MAAOT,EAAUM,QAAQC,SAASG,KAAK,gBAGzC,CAACV,EAAUgB,YAAYC,KAAK,WAAY,IACnCC,EAAmB"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");const e=e=>({defaultProps:{MenuProps:{PaperProps:{style:{boxShadow:e.customShadows?.overlay,marginBottom:e.spacing(.5),marginTop:e.spacing(.5)}}}},styleOverrides:{root:{"& .MuiSelect-select":{paddingRight:`${e.spacing(1)} !important`},"&.MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});exports.default=e,exports.selectOverrides=e;
2
+ //# sourceMappingURL=selectOverrides.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectOverrides.cjs.js","sources":["../../../src/themes/overrides/selectOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const selectOverrides = (theme: Theme): Components<Theme>['MuiSelect'] => ({\n defaultProps: {\n MenuProps: {\n PaperProps: {\n style: {\n boxShadow: theme.customShadows?.overlay,\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiSelect-select': {\n paddingRight: `${theme.spacing(1)} !important`, // Override the default 32px padding-right\n },\n '&.MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default selectOverrides;\n"],"names":["selectOverrides","theme","defaultProps","MenuProps","PaperProps","style","boxShadow","customShadows","overlay","marginBottom","spacing","marginTop","styleOverrides","root","paddingRight","border"],"mappings":"0GAEaA,EAAmBC,IAAY,CAC1CC,aAAc,CACZC,UAAW,CACTC,WAAY,CACVC,MAAO,CACLC,UAAWL,EAAMM,eAAeC,QAChCC,aAAcR,EAAMS,QAAQ,IAC5BC,UAAWV,EAAMS,QAAQ,QAKjCE,eAAgB,CACdC,KAAM,CACJ,sBAAuB,CACrBC,aAAc,GAAGb,EAAMS,QAAQ,iBAEjC,0BAA2B,CACzB,aAAc,CACZK,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
@@ -0,0 +1,5 @@
1
+ import { Theme, Components } from '@mui/material/styles';
2
+
3
+ declare const selectOverrides: (theme: Theme) => Components<Theme>['MuiSelect'];
4
+
5
+ export { selectOverrides as default, selectOverrides };
@@ -0,0 +1,2 @@
1
+ import"@mui/material/styles";const e=e=>({defaultProps:{MenuProps:{PaperProps:{style:{boxShadow:e.customShadows?.overlay,marginBottom:e.spacing(.5),marginTop:e.spacing(.5)}}}},styleOverrides:{root:{"& .MuiSelect-select":{paddingRight:`${e.spacing(1)} !important`},"&.MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});export{e as default,e as selectOverrides};
2
+ //# sourceMappingURL=selectOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectOverrides.js","sources":["../../../src/themes/overrides/selectOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const selectOverrides = (theme: Theme): Components<Theme>['MuiSelect'] => ({\n defaultProps: {\n MenuProps: {\n PaperProps: {\n style: {\n boxShadow: theme.customShadows?.overlay,\n marginBottom: theme.spacing(0.5),\n marginTop: theme.spacing(0.5),\n },\n },\n },\n },\n styleOverrides: {\n root: {\n '& .MuiSelect-select': {\n paddingRight: `${theme.spacing(1)} !important`, // Override the default 32px padding-right\n },\n '&.MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default selectOverrides;\n"],"names":["selectOverrides","theme","defaultProps","MenuProps","PaperProps","style","boxShadow","customShadows","overlay","marginBottom","spacing","marginTop","styleOverrides","root","paddingRight","border"],"mappings":"mCAEaA,EAAmBC,IAAY,CAC1CC,aAAc,CACZC,UAAW,CACTC,WAAY,CACVC,MAAO,CACLC,UAAWL,EAAMM,eAAeC,QAChCC,aAAcR,EAAMS,QAAQ,IAC5BC,UAAWV,EAAMS,QAAQ,QAKjCE,eAAgB,CACdC,KAAM,CACJ,sBAAuB,CACrBC,aAAc,GAAGb,EAAMS,QAAQ,iBAEjC,0BAA2B,CACzB,aAAc,CACZK,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("@mui/material/styles");const e=()=>({styleOverrides:{root:{"& .MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});exports.default=e,exports.textFieldOverrides=e;
2
+ //# sourceMappingURL=textFieldOverrides.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textFieldOverrides.cjs.js","sources":["../../../src/themes/overrides/textFieldOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const textFieldOverrides = (): Components<Theme>['MuiTextField'] => ({\n styleOverrides: {\n root: {\n '& .MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default textFieldOverrides;\n"],"names":["textFieldOverrides","styleOverrides","root","border"],"mappings":"oGAEO,MAAMA,EAAqB,KAAA,CAChCC,eAAgB,CACdC,KAAM,CACJ,2BAA4B,CAC1B,aAAc,CACZC,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
@@ -0,0 +1,5 @@
1
+ import { Components, Theme } from '@mui/material/styles';
2
+
3
+ declare const textFieldOverrides: () => Components<Theme>['MuiTextField'];
4
+
5
+ export { textFieldOverrides as default, textFieldOverrides };
@@ -0,0 +1,2 @@
1
+ import"@mui/material/styles";const e=()=>({styleOverrides:{root:{"& .MuiOutlinedInput-root":{"& fieldset":{border:"none"},"&.Mui-disabled fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"},"&:hover fieldset":{border:"none"}}}}});export{e as default,e as textFieldOverrides};
2
+ //# sourceMappingURL=textFieldOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textFieldOverrides.js","sources":["../../../src/themes/overrides/textFieldOverrides.ts"],"sourcesContent":["import { type Components, type Theme } from '@mui/material/styles';\n\nexport const textFieldOverrides = (): Components<Theme>['MuiTextField'] => ({\n styleOverrides: {\n root: {\n '& .MuiOutlinedInput-root': {\n '& fieldset': {\n border: 'none',\n },\n '&.Mui-disabled fieldset': {\n border: 'none',\n },\n '&.Mui-focused fieldset': {\n border: 'none',\n },\n '&:hover fieldset': {\n border: 'none',\n },\n },\n },\n },\n});\n\nexport default textFieldOverrides;\n"],"names":["textFieldOverrides","styleOverrides","root","border"],"mappings":"6BAEO,MAAMA,EAAqB,KAAA,CAChCC,eAAgB,CACdC,KAAM,CACJ,2BAA4B,CAC1B,aAAc,CACZC,OAAQ,QAEV,0BAA2B,CACzBA,OAAQ,QAEV,yBAA0B,CACxBA,OAAQ,QAEV,mBAAoB,CAClBA,OAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/portal-library",
3
- "version": "4.2.5",
3
+ "version": "4.2.6",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -88,7 +88,7 @@
88
88
  "@types/react-imgix": "^9.5.4",
89
89
  "@typescript-eslint/eslint-plugin": "7.18.0",
90
90
  "@typescript-eslint/parser": "7.18.0",
91
- "@vitejs/plugin-react-swc": "3.10.2",
91
+ "@vitejs/plugin-react-swc": "3.11.0",
92
92
  "chromatic": "^11.25.2",
93
93
  "dotenv": "^16.4.5",
94
94
  "eslint": "^8.56.0",