@flipdish/portal-library 7.6.0 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/components/atoms/Avatar/index.cjs.js +1 -1
  2. package/dist/components/atoms/Avatar/index.cjs.js.map +1 -1
  3. package/dist/components/atoms/Avatar/index.d.ts +2 -0
  4. package/dist/components/atoms/Avatar/index.js +1 -1
  5. package/dist/components/atoms/Avatar/index.js.map +1 -1
  6. package/dist/components/atoms/Button/buttonThemeOverrides.cjs.js +1 -1
  7. package/dist/components/atoms/Button/buttonThemeOverrides.cjs.js.map +1 -1
  8. package/dist/components/atoms/Button/buttonThemeOverrides.js +1 -1
  9. package/dist/components/atoms/Button/buttonThemeOverrides.js.map +1 -1
  10. package/dist/components/atoms/Button/index.cjs.js +1 -1
  11. package/dist/components/atoms/Button/index.cjs.js.map +1 -1
  12. package/dist/components/atoms/Button/index.d.ts +1 -1
  13. package/dist/components/atoms/Button/index.js +1 -1
  14. package/dist/components/atoms/Button/index.js.map +1 -1
  15. package/dist/components/atoms/Checkbox/index.cjs.js +1 -1
  16. package/dist/components/atoms/Checkbox/index.cjs.js.map +1 -1
  17. package/dist/components/atoms/Checkbox/index.js +1 -1
  18. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  19. package/dist/components/atoms/MenuItem/index.cjs.js +1 -1
  20. package/dist/components/atoms/MenuItem/index.cjs.js.map +1 -1
  21. package/dist/components/atoms/MenuItem/index.d.ts +45 -13
  22. package/dist/components/atoms/MenuItem/index.js +1 -1
  23. package/dist/components/atoms/MenuItem/index.js.map +1 -1
  24. package/dist/components/molecules/AlertGlobal/index.cjs.js +1 -1
  25. package/dist/components/molecules/AlertGlobal/index.cjs.js.map +1 -1
  26. package/dist/components/molecules/AlertGlobal/index.js +1 -1
  27. package/dist/components/molecules/AlertGlobal/index.js.map +1 -1
  28. package/dist/components/molecules/DropdownMenu/index.cjs.js +2 -0
  29. package/dist/components/molecules/DropdownMenu/index.cjs.js.map +1 -0
  30. package/dist/components/molecules/DropdownMenu/index.d.ts +120 -0
  31. package/dist/components/molecules/DropdownMenu/index.js +2 -0
  32. package/dist/components/molecules/DropdownMenu/index.js.map +1 -0
  33. package/dist/components/organisms/FileUpload/components/FileDropZone.cjs.js.map +1 -1
  34. package/dist/components/organisms/FileUpload/components/FileDropZone.js.map +1 -1
  35. package/dist/components/organisms/FileUpload/components/FileItem.cjs.js.map +1 -1
  36. package/dist/components/organisms/FileUpload/components/FileItem.js.map +1 -1
  37. package/dist/components/organisms/FileUpload/components/FileThumbnail.cjs.js.map +1 -1
  38. package/dist/components/organisms/FileUpload/components/FileThumbnail.js.map +1 -1
  39. package/dist/components/organisms/ImageUploadWidget/components/FlipdishFonts.cjs.js.map +1 -1
  40. package/dist/components/organisms/ImageUploadWidget/components/FlipdishFonts.js.map +1 -1
  41. package/dist/components/organisms/ImageUploadWidget/components/ImageDisplay.cjs.js.map +1 -1
  42. package/dist/components/organisms/ImageUploadWidget/components/ImageDisplay.js.map +1 -1
  43. package/dist/components/organisms/ImageUploadWidget/components/ImageDropZone.cjs.js.map +1 -1
  44. package/dist/components/organisms/ImageUploadWidget/components/ImageDropZone.js.map +1 -1
  45. package/dist/components/organisms/ImageUploadWidget/index.cjs.js.map +1 -1
  46. package/dist/components/organisms/ImageUploadWidget/index.js.map +1 -1
  47. package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
  48. package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
  49. package/dist/themes/flipdishPublicTheme.js +1 -1
  50. package/dist/themes/flipdishPublicTheme.js.map +1 -1
  51. package/dist/themes/overrides/listSubheaderOverrides.cjs.js +2 -0
  52. package/dist/themes/overrides/listSubheaderOverrides.cjs.js.map +1 -0
  53. package/dist/themes/overrides/listSubheaderOverrides.d.ts +5 -0
  54. package/dist/themes/overrides/listSubheaderOverrides.js +2 -0
  55. package/dist/themes/overrides/listSubheaderOverrides.js.map +1 -0
  56. package/dist/themes/overrides/menuItemOverrides.cjs.js +1 -1
  57. package/dist/themes/overrides/menuItemOverrides.cjs.js.map +1 -1
  58. package/dist/themes/overrides/menuItemOverrides.js +1 -1
  59. package/dist/themes/overrides/menuItemOverrides.js.map +1 -1
  60. package/dist/themes/overrides/menuOverrides.cjs.js +1 -1
  61. package/dist/themes/overrides/menuOverrides.cjs.js.map +1 -1
  62. package/dist/themes/overrides/menuOverrides.js +1 -1
  63. package/dist/themes/overrides/menuOverrides.js.map +1 -1
  64. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/Avatar"),r=require("../../../themes/tokens/typography/font-family.cjs.js"),o=require("../../../themes/tokens/typography/font-size.cjs.js"),i=require("../../../themes/typography.cjs.js");const s=require("@mui/material/styles").styled(t,{shouldForwardProp:e=>"size"!==e&&"type"!==e})((({theme:e,size:t="medium",type:s})=>{const a={small:o.fontSize.desktop.caption,medium:o.fontSize.desktop.h4,large:o.fontSize.desktop.h3},l={small:"32",medium:"48",large:"64"}[t],n="photo"!==s?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:r.fontFamily.desktop.body,fontSize:a[t],color:e.palette.grey[700],backgroundColor:"#f5f5f5",width:`${l}px`,height:`${l}px`,border:"1px solid #ddd",...n,[e.breakpoints.down("tablet")]:{...i.getMobileTextStyle({small:"caption",medium:"h4",large:"h3"}[t])}}}));module.exports=t=>{const{type:r,fdKey:o}=t;return e.jsx(s,{alt:t.alt||t.type,"data-fd":o,size:t.size,src:(()=>{switch(r){case"logo":case"photo":return t.src;default:return}})(),type:t.type,variant:"photo"===r?"circular":"rounded",children:(()=>{switch(r){case"icon":return t.icon;case"initials":return t.initials;default:return null}})()})};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material/Avatar"),r=require("../../../themes/tokens/typography/font-family.cjs.js"),i=require("../../../themes/tokens/typography/font-size.cjs.js"),o=require("../../../themes/typography.cjs.js");const a=require("@mui/material/styles").styled(t,{shouldForwardProp:e=>"size"!==e&&"type"!==e})((({theme:e,size:t="medium",type:a})=>{const s={small:i.fontSize.desktop.caption,medium:i.fontSize.desktop.h4,large:i.fontSize.desktop.h3},l={small:"32",medium:"48",large:"64"}[t],n="photo"!==a?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:r.fontFamily.desktop.body,fontSize:s[t],color:e.palette.grey[700],backgroundColor:"#f5f5f5",width:`${l}px`,height:`${l}px`,border:"1px solid #ddd",...n,[e.breakpoints.down("tablet")]:{...o.getMobileTextStyle({small:"caption",medium:"h4",large:"h3"}[t])}}}));module.exports=t=>{const{type:r,fdKey:i}=t;return e.jsx(a,{alt:t.alt,"aria-hidden":"icon"===t.type,"aria-label":(()=>{if("initials"===r)return t.ariaLabel})(),"data-fd":i,size:t.size,src:(()=>{switch(r){case"logo":case"photo":return t.src;default:return}})(),type:t.type,variant:"photo"===r?"circular":"rounded",children:(()=>{switch(r){case"icon":return t.icon;case"initials":return t.initials;default:return null}})()})};
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt || props.type}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","props","fdKey","_jsx","alt","src","getSrc","variant","children","icon","initials","getChildren"],"mappings":"mQA4DA,MAAMA,kCAAeC,OAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAAAA,SAASC,QAAQC,QACxBC,OAAQH,EAAAA,SAASC,QAAQG,GACzBC,MAAOL,EAAAA,SAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAAA,WAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EACH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBA3BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAwB4BT,wBAUA4B,IACrC,MAAM3B,KAAEA,EAAI4B,MAAEA,GAAUD,EAiCxB,OACEE,MAACpC,GACCqC,IAAKH,EAAMG,KAAOH,EAAM3B,KAAI,UACnB4B,EACT7B,KAAM4B,EAAM5B,KACZgC,IAfW,MACb,OAAQ/B,GACN,IAAK,OACL,IAAK,QACH,OAAO2B,EAAMI,IACf,QACE,SASGC,GACLhC,KAAM2B,EAAM3B,KACZiC,QApCK,UADCjC,EAEG,WAGA,UAgCYkC,SA5BL,MAClB,OAAQlC,GACN,IAAK,OACH,OAAO2B,EAAMQ,KACf,IAAK,WACH,OAAOR,EAAMS,SACf,QACE,OAAO,OAuBRC"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Aria-label for full name of the displayed initials */\n ariaLabel?: string;\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getAriaLabel = (): string | undefined => {\n switch (type) {\n case 'initials':\n return props.ariaLabel;\n default:\n return undefined;\n }\n };\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt}\n aria-hidden={props.type === 'icon'}\n aria-label={getAriaLabel()}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","props","fdKey","_jsx","alt","ariaLabel","getAriaLabel","src","getSrc","variant","icon","initials","getChildren"],"mappings":"mQA8DA,MAAMA,kCAAeC,OAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAAAA,SAASC,QAAQC,QACxBC,OAAQH,EAAAA,SAASC,QAAQG,GACzBC,MAAOL,EAAAA,SAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAAA,WAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EAEH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EAAAA,mBA5BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAyB4BT,wBAUA4B,IACrC,MAAM3B,KAAEA,EAAI4B,MAAEA,GAAUD,EA0CxB,OACEE,EAAAA,IAACpC,EAAY,CACXqC,IAAKH,EAAMG,IAAG,cACc,SAAfH,EAAM3B,KAAe,aA3CjB,MACnB,GACO,aADCA,EAEJ,OAAO2B,EAAMI,WAyCHC,GAAc,UACjBJ,EACT7B,KAAM4B,EAAM5B,KACZkC,IAjBW,MACb,OAAQjC,GACN,IAAK,OACL,IAAK,QACH,OAAO2B,EAAMM,IACf,QACE,SAWGC,GACLlC,KAAM2B,EAAM3B,KACZmC,QAtCK,UADCnC,EAEG,WAGA,mBAIO,MAClB,OAAQA,GACN,IAAK,OACH,OAAO2B,EAAMS,KACf,IAAK,WACH,OAAOT,EAAMU,SACf,QACE,OAAO,OAyBRC"}
@@ -24,6 +24,8 @@ interface PhotoProps {
24
24
  alt: string;
25
25
  }
26
26
  interface InitialsProps {
27
+ /** Aria-label for full name of the displayed initials */
28
+ ariaLabel?: string;
27
29
  /** Type of avatar - displays initials text */
28
30
  type: 'initials';
29
31
  /** Initials text to display in the avatar */
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import e from"@mui/material/Avatar";import{fontFamily as o}from"../../../themes/tokens/typography/font-family.js";import{fontSize as r}from"../../../themes/tokens/typography/font-size.js";import{getMobileTextStyle as a}from"../../../themes/typography.js";import{styled as i}from"@mui/material/styles";const s=i(e,{shouldForwardProp:t=>"size"!==t&&"type"!==t})((({theme:t,size:e="medium",type:i})=>{const s={small:r.desktop.caption,medium:r.desktop.h4,large:r.desktop.h3},m={small:"32",medium:"48",large:"64"}[e],p="photo"!==i?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:o.desktop.body,fontSize:s[e],color:t.palette.grey[700],backgroundColor:"#f5f5f5",width:`${m}px`,height:`${m}px`,border:"1px solid #ddd",...p,[t.breakpoints.down("tablet")]:{...a({small:"caption",medium:"h4",large:"h3"}[e])}}})),m=e=>{const{type:o,fdKey:r}=e;return t(s,{alt:e.alt||e.type,"data-fd":r,size:e.size,src:(()=>{switch(o){case"logo":case"photo":return e.src;default:return}})(),type:e.type,variant:"photo"===o?"circular":"rounded",children:(()=>{switch(o){case"icon":return e.icon;case"initials":return e.initials;default:return null}})()})};export{m as default};
1
+ import{jsx as t}from"react/jsx-runtime";import e from"@mui/material/Avatar";import{fontFamily as r}from"../../../themes/tokens/typography/font-family.js";import{fontSize as o}from"../../../themes/tokens/typography/font-size.js";import{getMobileTextStyle as a}from"../../../themes/typography.js";import{styled as i}from"@mui/material/styles";const s=i(e,{shouldForwardProp:t=>"size"!==t&&"type"!==t})((({theme:t,size:e="medium",type:i})=>{const s={small:o.desktop.caption,medium:o.desktop.h4,large:o.desktop.h3},l={small:"32",medium:"48",large:"64"}[e],n="photo"!==i?{borderRadius:"8px"}:{};return{fontStyle:"normal",fontWeight:600,fontFamily:r.desktop.body,fontSize:s[e],color:t.palette.grey[700],backgroundColor:"#f5f5f5",width:`${l}px`,height:`${l}px`,border:"1px solid #ddd",...n,[t.breakpoints.down("tablet")]:{...a({small:"caption",medium:"h4",large:"h3"}[e])}}})),l=e=>{const{type:r,fdKey:o}=e;return t(s,{alt:e.alt,"aria-hidden":"icon"===e.type,"aria-label":(()=>{if("initials"===r)return e.ariaLabel})(),"data-fd":o,size:e.size,src:(()=>{switch(r){case"logo":case"photo":return e.src;default:return}})(),type:e.type,variant:"photo"===r?"circular":"rounded",children:(()=>{switch(r){case"icon":return e.icon;case"initials":return e.initials;default:return null}})()})};export{l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt || props.type}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","Avatar","props","fdKey","_jsx","alt","src","getSrc","variant","children","icon","initials","getChildren"],"mappings":"qVA4DA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAASC,QAAQC,QACxBC,OAAQH,EAASC,QAAQG,GACzBC,MAAOL,EAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EACH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EA3BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAwB4BT,SAUjC4B,EAAiCC,IACrC,MAAM5B,KAAEA,EAAI6B,MAAEA,GAAUD,EAiCxB,OACEE,EAACrC,GACCsC,IAAKH,EAAMG,KAAOH,EAAM5B,KAAI,UACnB6B,EACT9B,KAAM6B,EAAM7B,KACZiC,IAfW,MACb,OAAQhC,GACN,IAAK,OACL,IAAK,QACH,OAAO4B,EAAMI,IACf,QACE,SASGC,GACLjC,KAAM4B,EAAM5B,KACZkC,QApCK,UADClC,EAEG,WAGA,UAgCYmC,SA5BL,MAClB,OAAQnC,GACN,IAAK,OACH,OAAO4B,EAAMQ,KACf,IAAK,WACH,OAAOR,EAAMS,SACf,QACE,OAAO,OAuBRC"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Avatar/index.tsx"],"sourcesContent":["import MuiAvatar, { type AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';\nimport type { CSSObject } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { getMobileTextStyle } from '@fd/themes/typography';\nimport styled from '@fd/utilities/styledUtilities';\n\ntype Size = 'large' | 'medium' | 'small' | undefined;\ntype Type = 'icon' | 'initials' | 'logo' | 'photo' | undefined;\n\ninterface CommonProps {\n /** Size of the avatar, defaults to 'medium' */\n size?: Size;\n /** Test ID for testing and automation */\n fdKey?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n}\n\ninterface LogoProps {\n /** Type of avatar - displays a logo image */\n type: 'logo';\n /** Source URL for the logo image */\n src: string;\n /** Alternative text for the logo image */\n alt: string;\n}\n\ninterface PhotoProps {\n /** Type of avatar - displays a photo image */\n type: 'photo';\n /** Source URL for the photo image */\n src: string;\n /** Alternative text for the photo image */\n alt: string;\n}\n\ninterface InitialsProps {\n /** Aria-label for full name of the displayed initials */\n ariaLabel?: string;\n /** Type of avatar - displays initials text */\n type: 'initials';\n /** Initials text to display in the avatar */\n initials: string;\n}\n\ninterface IconProps {\n /** Type of avatar - displays an icon */\n type?: 'icon';\n /** Icon component to display in the avatar */\n icon?: React.ReactNode;\n}\n\n/** Props for the Avatar component */\nexport type AvatarProps = CommonProps & (IconProps | InitialsProps | LogoProps | PhotoProps);\n\ntype StyledAvatarProps = MuiAvatarProps & {\n size: Size;\n type: Type;\n};\n\nconst StyledAvatar = styled(MuiAvatar, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'type',\n})<StyledAvatarProps>(({ theme, size = 'medium', type }): CSSObject => {\n const pixels = {\n small: '32',\n medium: '48',\n large: '64',\n } as const;\n\n const fontSizes = {\n small: fontSize.desktop.caption,\n medium: fontSize.desktop.h4,\n large: fontSize.desktop.h3,\n };\n\n const mobileKeys = {\n small: 'caption',\n medium: 'h4',\n large: 'h3',\n } as const;\n\n const dim = pixels[size];\n\n const customBorderRadius =\n type !== 'photo'\n ? {\n borderRadius: '8px',\n }\n : {};\n\n return {\n fontStyle: 'normal',\n fontWeight: 600,\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSizes[size],\n color: theme.palette.grey[700],\n backgroundColor: '#f5f5f5',\n width: `${dim}px`,\n height: `${dim}px`,\n border: `1px solid #ddd`,\n ...customBorderRadius,\n\n [theme.breakpoints.down('tablet')]: {\n ...getMobileTextStyle(mobileKeys[size]), // mobile typography override\n },\n };\n});\n\n/**\n * Avatar component displays user avatars in different formats: photos, logos, initials, or icons.\n * The component automatically adjusts styling based on the avatar type - photos use circular shape\n * while logos use rounded corners. Size can be controlled via the size prop (small, medium, large).\n */\nconst Avatar: React.FC<AvatarProps> = (props) => {\n const { type, fdKey } = props;\n\n const getAriaLabel = (): string | undefined => {\n switch (type) {\n case 'initials':\n return props.ariaLabel;\n default:\n return undefined;\n }\n };\n\n const getVariant = (): MuiAvatarProps['variant'] => {\n switch (type) {\n case 'photo':\n return 'circular';\n case 'logo':\n default:\n return 'rounded';\n }\n };\n\n const getChildren = (): React.ReactNode => {\n switch (type) {\n case 'icon':\n return props.icon;\n case 'initials':\n return props.initials;\n default:\n return null;\n }\n };\n\n const getSrc = (): string | undefined => {\n switch (type) {\n case 'logo':\n case 'photo':\n return props.src;\n default:\n return undefined;\n }\n };\n\n return (\n <StyledAvatar\n alt={props.alt}\n aria-hidden={props.type === 'icon'}\n aria-label={getAriaLabel()}\n data-fd={fdKey}\n size={props.size}\n src={getSrc()}\n type={props.type}\n variant={getVariant()}\n >\n {getChildren()}\n </StyledAvatar>\n );\n};\n\nexport default Avatar;\n"],"names":["StyledAvatar","styled","MuiAvatar","shouldForwardProp","prop","theme","size","type","fontSizes","small","fontSize","desktop","caption","medium","h4","large","h3","dim","customBorderRadius","borderRadius","fontStyle","fontWeight","fontFamily","body","color","palette","grey","backgroundColor","width","height","border","breakpoints","down","getMobileTextStyle","Avatar","props","fdKey","_jsx","alt","ariaLabel","getAriaLabel","src","getSrc","variant","icon","initials","getChildren"],"mappings":"qVA8DA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,GAAkB,SAATA,GAA4B,SAATA,GAD7BH,EAEC,EAAGI,QAAOC,OAAO,SAAUC,WAC/C,MAMMC,EAAY,CAChBC,MAAOC,EAASC,QAAQC,QACxBC,OAAQH,EAASC,QAAQG,GACzBC,MAAOL,EAASC,QAAQK,IASpBC,EAlBS,CACbR,MAAO,KACPI,OAAQ,KACRE,MAAO,MAeUT,GAEbY,EACK,UAATX,EACI,CACEY,aAAc,OAEhB,CAAA,EAEN,MAAO,CACLC,UAAW,SACXC,WAAY,IACZC,WAAYA,EAAWX,QAAQY,KAC/Bb,SAAUF,EAAUF,GACpBkB,MAAOnB,EAAMoB,QAAQC,KAAK,KAC1BC,gBAAiB,UACjBC,MAAO,GAAGX,MACVY,OAAQ,GAAGZ,MACXa,OAAQ,oBACLZ,EAEH,CAACb,EAAM0B,YAAYC,KAAK,WAAY,IAC/BC,EA5BY,CACjBxB,MAAO,UACPI,OAAQ,KACRE,MAAO,MAyB4BT,SAUjC4B,EAAiCC,IACrC,MAAM5B,KAAEA,EAAI6B,MAAEA,GAAUD,EA0CxB,OACEE,EAACrC,EAAY,CACXsC,IAAKH,EAAMG,IAAG,cACc,SAAfH,EAAM5B,KAAe,aA3CjB,MACnB,GACO,aADCA,EAEJ,OAAO4B,EAAMI,WAyCHC,GAAc,UACjBJ,EACT9B,KAAM6B,EAAM7B,KACZmC,IAjBW,MACb,OAAQlC,GACN,IAAK,OACL,IAAK,QACH,OAAO4B,EAAMM,IACf,QACE,SAWGC,GACLnC,KAAM4B,EAAM5B,KACZoC,QAtCK,UADCpC,EAEG,WAGA,mBAIO,MAClB,OAAQA,GACN,IAAK,OACH,OAAO4B,EAAMS,KACf,IAAK,WACH,OAAOT,EAAMU,SACf,QACE,OAAO,OAyBRC"}
@@ -1,2 +1,2 @@
1
- "use strict";require("@mui/material/styles");var e=require("../../../themes/tokens/typography/font-family.cjs.js"),t=require("../../../themes/tokens/typography/font-size.cjs.js"),i=require("../../../themes/tokens/typography/letter-spacing.cjs.js"),n=require("../../../themes/tokens/typography/line-height.cjs.js");exports.buttonStyleOverrides=o=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.caption,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.caption,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.caption,lineHeight:n.lineHeight.mobile.caption,letterSpacing:i.letterSpacing.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.b1,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.b1,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.b1,lineHeight:n.lineHeight.mobile.b1,letterSpacing:i.letterSpacing.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.heading,fontSize:t.fontSize.desktop.h4,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.h4,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.heading,fontSize:t.fontSize.mobile.h4,lineHeight:n.lineHeight.mobile.h4,letterSpacing:i.letterSpacing.mobile.h4}}}});
1
+ "use strict";require("@mui/material/styles");var e=require("../../../themes/tokens/typography/font-family.cjs.js"),t=require("../../../themes/tokens/typography/font-size.cjs.js"),i=require("../../../themes/tokens/typography/letter-spacing.cjs.js"),n=require("../../../themes/tokens/typography/line-height.cjs.js");exports.buttonStyleOverrides=o=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.caption,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.caption,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.caption,lineHeight:n.lineHeight.mobile.caption,letterSpacing:i.letterSpacing.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.body,fontSize:t.fontSize.desktop.b1,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.b1,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.body,fontSize:t.fontSize.mobile.b1,lineHeight:n.lineHeight.mobile.b1,letterSpacing:i.letterSpacing.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.fontFamily.desktop.heading,fontSize:t.fontSize.desktop.h4,lineHeight:"normal",letterSpacing:i.letterSpacing.desktop.h4,fontWeight:"600",[o.breakpoints.down("tablet")]:{fontFamily:e.fontFamily.mobile.heading,fontSize:t.fontSize.mobile.h4,lineHeight:n.lineHeight.mobile.h4,letterSpacing:i.letterSpacing.mobile.h4}}}});
2
2
  //# sourceMappingURL=buttonThemeOverrides.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttonThemeOverrides.cjs.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","flex","alignSelf","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","heading","h4"],"mappings":"uVAgBqCA,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,WAEbC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAON,QAC1BC,WAAYA,EAAAA,WAAWK,OAAON,QAC9BE,cAAeA,EAAAA,cAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAOG,GAC1BR,WAAYA,EAAAA,WAAWK,OAAOG,GAC9BP,cAAeA,EAAAA,cAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRN,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,UACXiB,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQc,QAC/BZ,SAAUA,EAAAA,SAASF,QAAQe,GAC3BX,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQe,GACrCT,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOK,QAC9BZ,SAAUA,EAAAA,SAASO,OAAOM,GAC1BX,WAAYA,EAAAA,WAAWK,OAAOM,GAC9BV,cAAeA,EAAAA,cAAcI,OAAOM"}
1
+ {"version":3,"file":"buttonThemeOverrides.cjs.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","flex","alignSelf","heading","h4"],"mappings":"uVAgBqCA,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,UAElBC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAON,QAC1BC,WAAYA,EAAAA,WAAWK,OAAON,QAC9BE,cAAeA,EAAAA,cAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQC,KAC/BC,SAAUA,EAAAA,SAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOR,KAC9BC,SAAUA,EAAAA,SAASO,OAAOG,GAC1BR,WAAYA,EAAAA,WAAWK,OAAOG,GAC9BP,cAAeA,EAAAA,cAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRJ,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBoB,KAAM,QACNC,UAAW,UACXJ,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAAA,WAAWC,QAAQgB,QAC/Bd,SAAUA,EAAAA,SAASF,QAAQiB,GAC3Bb,WAAY,SACZC,cAAeA,EAAAA,cAAcL,QAAQiB,GACrCX,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAAA,WAAWU,OAAOO,QAC9Bd,SAAUA,EAAAA,SAASO,OAAOQ,GAC1Bb,WAAYA,EAAAA,WAAWK,OAAOQ,GAC9BZ,cAAeA,EAAAA,cAAcI,OAAOQ"}
@@ -1,2 +1,2 @@
1
- import"@mui/material/styles";import{fontFamily as e}from"../../../themes/tokens/typography/font-family.js";import{fontSize as t}from"../../../themes/tokens/typography/font-size.js";import{letterSpacing as i}from"../../../themes/tokens/typography/letter-spacing.js";import{lineHeight as o}from"../../../themes/tokens/typography/line-height.js";const n=n=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.caption,lineHeight:"normal",letterSpacing:i.desktop.caption,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.caption,lineHeight:o.mobile.caption,letterSpacing:i.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.b1,lineHeight:"normal",letterSpacing:i.desktop.b1,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.b1,lineHeight:o.mobile.b1,letterSpacing:i.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.desktop.heading,fontSize:t.desktop.h4,lineHeight:"normal",letterSpacing:i.desktop.h4,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.heading,fontSize:t.mobile.h4,lineHeight:o.mobile.h4,letterSpacing:i.mobile.h4}}}});export{n as buttonStyleOverrides};
1
+ import"@mui/material/styles";import{fontFamily as e}from"../../../themes/tokens/typography/font-family.js";import{fontSize as t}from"../../../themes/tokens/typography/font-size.js";import{letterSpacing as o}from"../../../themes/tokens/typography/letter-spacing.js";import{lineHeight as i}from"../../../themes/tokens/typography/line-height.js";const n=n=>({styleOverrides:{root:{textAlign:"center",textTransform:"none",display:"flex",alignItems:"center",justifyContent:"center"},sizeSmall:{height:"32px",padding:"0px 12px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.caption,lineHeight:"normal",letterSpacing:o.desktop.caption,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.caption,lineHeight:i.mobile.caption,letterSpacing:o.mobile.caption}},sizeMedium:{height:"48px",gap:"4px",padding:"0px 16px",fontStyle:"normal",fontFamily:e.desktop.body,fontSize:t.desktop.b1,lineHeight:"normal",letterSpacing:o.desktop.b1,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.body,fontSize:t.mobile.b1,lineHeight:i.mobile.b1,letterSpacing:o.mobile.b1}},sizeLarge:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center",flex:"1 0 0",alignSelf:"stretch",gap:"4px",padding:"0px 24px",fontStyle:"normal",fontFamily:e.desktop.heading,fontSize:t.desktop.h4,lineHeight:"normal",letterSpacing:o.desktop.h4,fontWeight:"600",[n.breakpoints.down("tablet")]:{fontFamily:e.mobile.heading,fontSize:t.mobile.h4,lineHeight:i.mobile.h4,letterSpacing:o.mobile.h4}}}});export{n as buttonStyleOverrides};
2
2
  //# sourceMappingURL=buttonThemeOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttonThemeOverrides.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["buttonStyleOverrides","baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","flex","alignSelf","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","heading","h4"],"mappings":"6VAgBaA,EAAwBC,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,WAEbC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAON,QAC1BC,WAAYA,EAAWK,OAAON,QAC9BE,cAAeA,EAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAOG,GAC1BR,WAAYA,EAAWK,OAAOG,GAC9BP,cAAeA,EAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRN,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,KAAM,QACNC,UAAW,UACXiB,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQc,QAC/BZ,SAAUA,EAASF,QAAQe,GAC3BX,WAAY,SACZC,cAAeA,EAAcL,QAAQe,GACrCT,WAAY,MACZ,CAACrB,EAAUsB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOK,QAC9BZ,SAAUA,EAASO,OAAOM,GAC1BX,WAAYA,EAAWK,OAAOM,GAC9BV,cAAeA,EAAcI,OAAOM"}
1
+ {"version":3,"file":"buttonThemeOverrides.js","sources":["../../../../src/components/atoms/Button/buttonThemeOverrides.ts"],"sourcesContent":["import { type Theme } from '@mui/material/styles';\n\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { fontSize } from '@fd/themes/tokens/typography/font-size';\nimport { letterSpacing } from '@fd/themes/tokens/typography/letter-spacing';\nimport { lineHeight } from '@fd/themes/tokens/typography/line-height';\n\ninterface ButtonStyleOverrides {\n styleOverrides: {\n root: Record<string, string | { [key: string]: string }>;\n sizeSmall: Record<string, string | { [key: string]: string }>;\n sizeMedium: Record<string, string | { [key: string]: string }>;\n sizeLarge: Record<string, string | { [key: string]: string }>;\n };\n}\n\nexport const buttonStyleOverrides = (baseTheme: Theme): ButtonStyleOverrides => ({\n styleOverrides: {\n root: {\n textAlign: 'center',\n textTransform: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n sizeSmall: {\n height: '32px',\n padding: '0px 12px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.caption,\n lineHeight: 'normal', // normal vs lineHeight.desktop.caption due to mui issue with text alignment https://github.com/mui/material-ui/issues/29965\n letterSpacing: letterSpacing.desktop.caption,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.caption,\n lineHeight: lineHeight.mobile.caption,\n letterSpacing: letterSpacing.mobile.caption,\n },\n },\n sizeMedium: {\n height: '48px',\n gap: '4px',\n padding: '0px 16px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.body,\n fontSize: fontSize.desktop.b1,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.b1,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n fontSize: fontSize.mobile.b1,\n lineHeight: lineHeight.mobile.b1,\n letterSpacing: letterSpacing.mobile.b1,\n },\n },\n sizeLarge: {\n height: '64px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flex: '1 0 0',\n alignSelf: 'stretch',\n gap: '4px',\n padding: '0px 24px',\n fontStyle: 'normal',\n fontFamily: fontFamily.desktop.heading,\n fontSize: fontSize.desktop.h4,\n lineHeight: 'normal',\n letterSpacing: letterSpacing.desktop.h4,\n fontWeight: '600',\n [baseTheme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.heading,\n fontSize: fontSize.mobile.h4,\n lineHeight: lineHeight.mobile.h4,\n letterSpacing: letterSpacing.mobile.h4,\n },\n },\n },\n});\n"],"names":["buttonStyleOverrides","baseTheme","styleOverrides","root","textAlign","textTransform","display","alignItems","justifyContent","sizeSmall","height","padding","fontStyle","fontFamily","desktop","body","fontSize","caption","lineHeight","letterSpacing","fontWeight","breakpoints","down","mobile","sizeMedium","gap","b1","sizeLarge","flex","alignSelf","heading","h4"],"mappings":"6VAgBaA,EAAwBC,IAAgB,CACnDC,eAAgB,CACdC,KAAM,CACJC,UAAW,SACXC,cAAe,OACfC,QAAS,OACTC,WAAY,SACZC,eAAgB,UAElBC,UAAW,CACTC,OAAQ,OACRC,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQG,QAC3BC,WAAY,SACZC,cAAeA,EAAcL,QAAQG,QACrCG,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAON,QAC1BC,WAAYA,EAAWK,OAAON,QAC9BE,cAAeA,EAAcI,OAAON,UAGxCO,WAAY,CACVd,OAAQ,OACRe,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQC,KAC/BC,SAAUA,EAASF,QAAQY,GAC3BR,WAAY,SACZC,cAAeA,EAAcL,QAAQY,GACrCN,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOR,KAC9BC,SAAUA,EAASO,OAAOG,GAC1BR,WAAYA,EAAWK,OAAOG,GAC9BP,cAAeA,EAAcI,OAAOG,KAGxCC,UAAW,CACTjB,OAAQ,OACRJ,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBoB,KAAM,QACNC,UAAW,UACXJ,IAAK,MACLd,QAAS,WACTC,UAAW,SACXC,WAAYA,EAAWC,QAAQgB,QAC/Bd,SAAUA,EAASF,QAAQiB,GAC3Bb,WAAY,SACZC,cAAeA,EAAcL,QAAQiB,GACrCX,WAAY,MACZ,CAACnB,EAAUoB,YAAYC,KAAK,WAAY,CACtCT,WAAYA,EAAWU,OAAOO,QAC9Bd,SAAUA,EAASO,OAAOQ,GAC1Bb,WAAYA,EAAWK,OAAOQ,GAC9BZ,cAAeA,EAAcI,OAAOQ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/material/Button"),r=require("@mui/material/styles"),a=require("./getButtonStyles.cjs.js");const i=r.styled(t,{shouldForwardProp:e=>!["casingOverride","customVariant","tone"].includes(e)})((({theme:e,customVariant:t="primary",tone:r="brand",casingOverride:i="none",fullWidth:n=!1})=>{const o=a(e,t,r);return{...o.default,width:n?"100%":"fit-content",maxWidth:n?"100%":"fit-content",textTransform:i,transition:"all 0.2s ease-in-out",padding:"12px 24px","&:hover":{...o.hover},"&:focus":{outline:"none"},"&:focus-visible":{...o.focus},"&:active":{...o.press},"&:disabled":{...o.disabled,cursor:"not-allowed"}}})),n={primary:"contained",secondary:"outlined",tertiary:"text"},o=({children:t,className:r,disabled:a=!1,fdKey:o,form:s,fullWidth:d=!1,href:l,casingOverride:u="none",type:c="button",variant:f="primary",tone:m,target:p,startIcon:h,endIcon:v,onKeyDown:y,...x})=>e.jsx(i,{disableRipple:!0,casingOverride:u,className:r,customVariant:f,"data-fd":o,disabled:a,endIcon:v,form:s,fullWidth:d,href:l,startIcon:h,target:p,tone:m,type:c,variant:n[f],...x,children:t});exports.Button=o,exports.default=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react");var t=require("@mui/material/Button"),r=require("@mui/material/styles"),i=require("./getButtonStyles.cjs.js");const a=r.styled(t,{shouldForwardProp:e=>!["casingOverride","customVariant","tone"].includes(e)})((({theme:e,customVariant:t="primary",tone:r="brand",casingOverride:a="none",fullWidth:n=!1})=>{const s=i(e,t,r);return{...s.default,width:n?"100%":"fit-content",maxWidth:n?"100%":"fit-content",textTransform:a,transition:"all 0.2s ease-in-out","&:hover":{...s.hover},"&:focus":{outline:"none"},"&:focus-visible":{...s.focus},"&:active":{...s.press},"&:disabled":{...s.disabled,cursor:"not-allowed"}}})),n={primary:"contained",secondary:"outlined",tertiary:"text"},s=({casingOverride:t="none",children:r,className:i,disabled:s=!1,endIcon:o,fdKey:d,form:l,fullWidth:u=!1,href:c,onKeyDown:m,size:f="medium",startIcon:h,target:p,tone:v,type:y="button",variant:b="primary",...x})=>e.jsx(a,{...x,disableRipple:!0,casingOverride:t,className:i,customVariant:b,"data-fd":d,disabled:s,endIcon:o,form:l,fullWidth:u,href:c,size:f,startIcon:h,target:p,tone:v,type:y,variant:n[b],children:r});exports.Button=s,exports.default=s;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n padding: '12px 24px',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n children,\n className,\n disabled = false,\n fdKey,\n form,\n fullWidth = false,\n href,\n casingOverride = 'none',\n type = 'button',\n variant = 'primary',\n tone,\n target,\n startIcon,\n endIcon,\n onKeyDown,\n ...rest\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n {...rest}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","padding","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","fdKey","form","href","type","variant","target","startIcon","endIcon","onKeyDown","rest","_jsx","disableRipple"],"mappings":"sOAyBA,MAAMA,EAAeC,EAAAA,OAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBACZC,QAAS,YAET,UAAW,IAAKP,EAAOQ,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKT,EAAOU,OAC/B,WAAY,IAAKV,EAAOW,OACxB,aAAc,IAAKX,EAAOY,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBC,WACAC,YACAR,YAAW,EACXS,QACAC,OACAvB,aAAY,EACZwB,OACAzB,iBAAiB,OACjB0B,OAAO,SACPC,UAAU,UACV5B,OACA6B,SACAC,YACAC,UACAC,eACGC,KAGDC,MAAC1C,GACC2C,eAAa,EACblC,eAAgBA,EAChBsB,UAAWA,EACXxB,cAAe6B,EAAO,UACbJ,EACTT,SAAUA,EACVgB,QAASA,EACTN,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNI,UAAWA,EAEXD,OAAQA,EACR7B,KAAMA,EACN2B,KAAMA,EACNC,QAASX,EAAgBW,MACrBK,EAAIX,SAEPA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n casingOverride = 'none',\n children,\n className,\n disabled = false,\n endIcon,\n fdKey,\n form,\n fullWidth = false,\n href,\n onKeyDown,\n size = 'medium',\n startIcon,\n target,\n tone,\n type = 'button',\n variant = 'primary',\n ...props\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n {...props}\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n size={size}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","endIcon","fdKey","form","href","onKeyDown","size","startIcon","target","type","variant","props","_jsx","disableRipple"],"mappings":"sOAyBA,MAAMA,EAAeC,EAAAA,OAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBAEZ,UAAW,IAAKN,EAAOO,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKR,EAAOS,OAC/B,WAAY,IAAKT,EAAOU,OACxB,aAAc,IAAKV,EAAOW,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBnB,iBAAiB,OACjBoB,WACAC,YACAR,YAAW,EACXS,UACAC,QACAC,OACAvB,aAAY,EACZwB,OACAC,YACAC,OAAO,SACPC,YACAC,SACA9B,OACA+B,OAAO,SACPC,UAAU,aACPC,KAGDC,EAAAA,IAAC1C,EAAY,IACPyC,EACJE,eAAa,EACblC,eAAgBA,EAChBqB,UAAWA,EACXvB,cAAeiC,EAAO,UACbR,EACTV,SAAUA,EACVS,QAASA,EACTE,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNE,KAAMA,EACNC,UAAWA,EAEXC,OAAQA,EACR9B,KAAMA,EACN+B,KAAMA,EACNC,QAAShB,EAAgBgB,GAAqCX,SAE7DA"}
@@ -18,7 +18,7 @@ interface ButtonProps extends Omit<ButtonProps$1, 'variant'> {
18
18
  startIcon?: react__default.ReactNode;
19
19
  endIcon?: react__default.ReactNode;
20
20
  }
21
- declare const Button: ({ children, className, disabled, fdKey, form, fullWidth, href, casingOverride, type, variant, tone, target, startIcon, endIcon, onKeyDown, ...rest }: ButtonProps) => JSX.Element;
21
+ declare const Button: ({ casingOverride, children, className, disabled, endIcon, fdKey, form, fullWidth, href, onKeyDown, size, startIcon, target, tone, type, variant, ...props }: ButtonProps) => JSX.Element;
22
22
 
23
23
  export { Button, Button as default };
24
24
  export type { ButtonProps };
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import"react";import e from"@mui/material/Button";import{styled as r}from"@mui/material/styles";import a from"./getButtonStyles.js";const i=r(e,{shouldForwardProp:t=>!["casingOverride","customVariant","tone"].includes(t)})((({theme:t,customVariant:e="primary",tone:r="brand",casingOverride:i="none",fullWidth:n=!1})=>{const o=a(t,e,r);return{...o.default,width:n?"100%":"fit-content",maxWidth:n?"100%":"fit-content",textTransform:i,transition:"all 0.2s ease-in-out",padding:"12px 24px","&:hover":{...o.hover},"&:focus":{outline:"none"},"&:focus-visible":{...o.focus},"&:active":{...o.press},"&:disabled":{...o.disabled,cursor:"not-allowed"}}})),n={primary:"contained",secondary:"outlined",tertiary:"text"},o=({children:e,className:r,disabled:a=!1,fdKey:o,form:s,fullWidth:d=!1,href:l,casingOverride:c="none",type:m="button",variant:u="primary",tone:f,target:p,startIcon:h,endIcon:y,onKeyDown:v,...b})=>t(i,{disableRipple:!0,casingOverride:c,className:r,customVariant:u,"data-fd":o,disabled:a,endIcon:y,form:s,fullWidth:d,href:l,startIcon:h,target:p,tone:f,type:m,variant:n[u],...b,children:e});export{o as Button,o as default};
1
+ import{jsx as t}from"react/jsx-runtime";import"react";import e from"@mui/material/Button";import{styled as r}from"@mui/material/styles";import i from"./getButtonStyles.js";const a=r(e,{shouldForwardProp:t=>!["casingOverride","customVariant","tone"].includes(t)})((({theme:t,customVariant:e="primary",tone:r="brand",casingOverride:a="none",fullWidth:o=!1})=>{const n=i(t,e,r);return{...n.default,width:o?"100%":"fit-content",maxWidth:o?"100%":"fit-content",textTransform:a,transition:"all 0.2s ease-in-out","&:hover":{...n.hover},"&:focus":{outline:"none"},"&:focus-visible":{...n.focus},"&:active":{...n.press},"&:disabled":{...n.disabled,cursor:"not-allowed"}}})),o={primary:"contained",secondary:"outlined",tertiary:"text"},n=({casingOverride:e="none",children:r,className:i,disabled:n=!1,endIcon:s,fdKey:d,form:l,fullWidth:c=!1,href:m,onKeyDown:u,size:f="medium",startIcon:p,target:h,tone:y,type:v="button",variant:b="primary",...g})=>t(a,{...g,disableRipple:!0,casingOverride:e,className:i,customVariant:b,"data-fd":d,disabled:n,endIcon:s,form:l,fullWidth:c,href:m,size:f,startIcon:p,target:h,tone:y,type:v,variant:o[b],children:r});export{n as Button,n as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n padding: '12px 24px',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n children,\n className,\n disabled = false,\n fdKey,\n form,\n fullWidth = false,\n href,\n casingOverride = 'none',\n type = 'button',\n variant = 'primary',\n tone,\n target,\n startIcon,\n endIcon,\n onKeyDown,\n ...rest\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n {...rest}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","padding","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","fdKey","form","href","type","variant","target","startIcon","endIcon","onKeyDown","rest","_jsx","disableRipple"],"mappings":"4KAyBA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBACZC,QAAS,YAET,UAAW,IAAKP,EAAOQ,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKT,EAAOU,OAC/B,WAAY,IAAKV,EAAOW,OACxB,aAAc,IAAKX,EAAOY,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBC,WACAC,YACAR,YAAW,EACXS,QACAC,OACAvB,aAAY,EACZwB,OACAzB,iBAAiB,OACjB0B,OAAO,SACPC,UAAU,UACV5B,OACA6B,SACAC,YACAC,UACAC,eACGC,KAGDC,EAAC1C,GACC2C,eAAa,EACblC,eAAgBA,EAChBsB,UAAWA,EACXxB,cAAe6B,EAAO,UACbJ,EACTT,SAAUA,EACVgB,QAASA,EACTN,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNI,UAAWA,EAEXD,OAAQA,EACR7B,KAAMA,EACN2B,KAAMA,EACNC,QAASX,EAAgBW,MACrBK,EAAIX,SAEPA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport MuiButton, { type ButtonProps as MuiButtonProps } from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\n\nimport getButtonStyles, { type ButtonTone, type ButtonType } from './getButtonStyles';\n\ntype CasingOverride = 'capitalize' | 'lowercase' | 'none' | 'uppercase';\n\nexport interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {\n className?: string;\n children: React.ReactNode;\n disabled?: boolean;\n form?: string;\n fullWidth?: boolean;\n casingOverride?: CasingOverride;\n type?: 'button' | 'reset' | 'submit';\n fdKey: string;\n variant?: ButtonType;\n tone?: ButtonTone;\n target?: '_blank';\n startIcon?: React.ReactNode;\n endIcon?: React.ReactNode;\n}\n\nconst StyledButton = styled(MuiButton, {\n shouldForwardProp: (prop) => !['casingOverride', 'customVariant', 'tone'].includes(prop as string),\n})<{ casingOverride?: CasingOverride; customVariant?: ButtonType; tone?: ButtonTone }>(({\n theme,\n customVariant = 'primary',\n tone = 'brand',\n casingOverride = 'none',\n fullWidth = false,\n}) => {\n const styles = getButtonStyles(theme, customVariant, tone);\n\n return {\n ...styles.default,\n width: fullWidth ? '100%' : 'fit-content',\n maxWidth: fullWidth ? '100%' : 'fit-content',\n textTransform: casingOverride,\n transition: 'all 0.2s ease-in-out',\n\n '&:hover': { ...styles.hover },\n '&:focus': {\n outline: 'none', // Removes the focus ring on click\n },\n // focus visible so that the focus ring only shows for keyboard users\n '&:focus-visible': { ...styles.focus },\n '&:active': { ...styles.press },\n '&:disabled': { ...styles.disabled, cursor: 'not-allowed' },\n };\n});\n\nconst MUI_VARIANT_MAP = {\n primary: 'contained',\n secondary: 'outlined',\n tertiary: 'text',\n};\n\nexport const Button = ({\n casingOverride = 'none',\n children,\n className,\n disabled = false,\n endIcon,\n fdKey,\n form,\n fullWidth = false,\n href,\n onKeyDown,\n size = 'medium',\n startIcon,\n target,\n tone,\n type = 'button',\n variant = 'primary',\n ...props\n}: ButtonProps): JSX.Element => {\n return (\n <StyledButton\n {...props}\n disableRipple\n casingOverride={casingOverride}\n className={className}\n customVariant={variant}\n data-fd={fdKey}\n disabled={disabled}\n endIcon={endIcon}\n form={form}\n fullWidth={fullWidth}\n href={href}\n size={size}\n startIcon={startIcon}\n // @ts-expect-error - target is not a valid prop for MuiButton\n target={target}\n tone={tone}\n type={type}\n variant={MUI_VARIANT_MAP[variant] as MuiButtonProps['variant']}\n >\n {children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["StyledButton","styled","MuiButton","shouldForwardProp","prop","includes","theme","customVariant","tone","casingOverride","fullWidth","styles","getButtonStyles","default","width","maxWidth","textTransform","transition","hover","outline","focus","press","disabled","cursor","MUI_VARIANT_MAP","primary","secondary","tertiary","Button","children","className","endIcon","fdKey","form","href","onKeyDown","size","startIcon","target","type","variant","props","_jsx","disableRipple"],"mappings":"4KAyBA,MAAMA,EAAeC,EAAOC,EAAW,CACrCC,kBAAoBC,IAAU,CAAC,iBAAkB,gBAAiB,QAAQC,SAASD,IADhEH,EAEkE,EACrFK,QACAC,gBAAgB,UAChBC,OAAO,QACPC,iBAAiB,OACjBC,aAAY,MAEZ,MAAMC,EAASC,EAAgBN,EAAOC,EAAeC,GAErD,MAAO,IACFG,EAAOE,QACVC,MAAOJ,EAAY,OAAS,cAC5BK,SAAUL,EAAY,OAAS,cAC/BM,cAAeP,EACfQ,WAAY,uBAEZ,UAAW,IAAKN,EAAOO,OACvB,UAAW,CACTC,QAAS,QAGX,kBAAmB,IAAKR,EAAOS,OAC/B,WAAY,IAAKT,EAAOU,OACxB,aAAc,IAAKV,EAAOW,SAAUC,OAAQ,mBAI1CC,EAAkB,CACtBC,QAAS,YACTC,UAAW,WACXC,SAAU,QAGCC,EAAS,EACpBnB,iBAAiB,OACjBoB,WACAC,YACAR,YAAW,EACXS,UACAC,QACAC,OACAvB,aAAY,EACZwB,OACAC,YACAC,OAAO,SACPC,YACAC,SACA9B,OACA+B,OAAO,SACPC,UAAU,aACPC,KAGDC,EAAC1C,EAAY,IACPyC,EACJE,eAAa,EACblC,eAAgBA,EAChBqB,UAAWA,EACXvB,cAAeiC,EAAO,UACbR,EACTV,SAAUA,EACVS,QAASA,EACTE,KAAMA,EACNvB,UAAWA,EACXwB,KAAMA,EACNE,KAAMA,EACNC,UAAWA,EAEXC,OAAQA,EACR9B,KAAMA,EACN+B,KAAMA,EACNC,QAAShB,EAAgBgB,GAAqCX,SAE7DA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/Box"),l=require("@mui/material/Checkbox"),t=require("@mui/material/FormControlLabel"),r=require("@mui/material/styles"),s=require("../../../icons/Remove/index.cjs.js"),o=require("../../../icons/Tick/index.cjs.js"),a=require("../../../themes/tokens/typography/font-family.cjs.js"),n=require("../../../themes/typography.cjs.js");const d=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:"transparent",position:"relative",...t&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!l&&!t&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!t&&{"&::before":{content:'""',width:r,height:r,inset:l?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...t&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!l&&!t&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!t&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:r,height:r,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),p=r.styled(t,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...n.typography.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:a.fontFamily.mobile.body,...n.getMobileTextStyle("caption")}}}}))),u=r.styled(l,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:l})=>({padding:0,margin:0,...!i&&!l&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}})));module.exports=({fdKey:i,label:l,size:t="medium",valid:r=!0,disabled:a,...n})=>e.jsx(p,{control:e.jsx(u,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(o,{})}),"data-fd":i,icon:e.jsx(d,{disabled:a,size:t,valid:r}),indeterminateIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(s,{})}),size:t,valid:r,...n}),"data-fd":`${i}-label`,disabled:a,label:l,size:t});
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@mui/material/Box"),l=require("@mui/material/Checkbox"),t=require("@mui/material/FormControlLabel"),r=require("@mui/material/styles"),s=require("../../../icons/Remove/index.cjs.js"),o=require("../../../icons/Tick/index.cjs.js"),a=require("../../../themes/tokens/typography/font-family.cjs.js"),n=require("../../../themes/typography.cjs.js");const d=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"],position:"relative",...t&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!l&&!t&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!t&&{"&::before":{content:'""',width:r,height:r,inset:l?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=r.styled(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:l,disabled:t})=>{const r=e.spacing("small"===i?3:4);return{width:r,height:r,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...t&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!l&&!t&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!t&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:r,height:r,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),p=r.styled(t,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...n.typography.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:a.fontFamily.mobile.body,...n.getMobileTextStyle("caption")}}}}))),u=r.styled(l,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:l})=>({padding:0,margin:0,...!i&&!l&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}})));module.exports=({fdKey:i,label:l,size:t="medium",valid:r=!0,disabled:a,...n})=>e.jsx(p,{control:e.jsx(u,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(o,{})}),"data-fd":i,icon:e.jsx(d,{disabled:a,size:t,valid:r}),indeterminateIcon:e.jsx(c,{disabled:a,size:t,valid:r,children:e.jsx(s,{})}),size:t,valid:r,...n}),"data-fd":`${i}-label`,disabled:a,label:l,size:t});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: 'transparent',\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","position","fill","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","fill","position","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import i from"@mui/material/Box";import o from"@mui/material/Checkbox";import t from"@mui/material/FormControlLabel";import{styled as l}from"@mui/material/styles";import r from"../../../icons/Remove/index.js";import a from"../../../icons/Tick/index.js";import{fontFamily as s}from"../../../themes/tokens/typography/font-family.js";import{getMobileTextStyle as n,typography as d}from"../../../themes/typography.js";const p=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:o,disabled:t})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:"transparent",position:"relative",...t&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!o&&!t&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!t&&{"&::before":{content:'""',width:l,height:l,inset:o?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:o,disabled:t})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...t&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!o&&!t&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!t&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:l,height:l,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),m=l(t,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...d.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:s.mobile.body,...n("caption")}}}}))),f=l(o,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:o})=>({padding:0,margin:0,...!i&&!o&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}}))),u=({fdKey:i,label:o,size:t="medium",valid:l=!0,disabled:s,...n})=>e(m,{control:e(f,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e(c,{disabled:s,size:t,valid:l,children:e(a,{})}),"data-fd":i,icon:e(p,{disabled:s,size:t,valid:l}),indeterminateIcon:e(c,{disabled:s,size:t,valid:l,children:e(r,{})}),size:t,valid:l,...n}),"data-fd":`${i}-label`,disabled:s,label:o,size:t});export{u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import i from"@mui/material/Box";import t from"@mui/material/Checkbox";import o from"@mui/material/FormControlLabel";import{styled as l}from"@mui/material/styles";import r from"../../../icons/Remove/index.js";import a from"../../../icons/Tick/index.js";import{fontFamily as s}from"../../../themes/tokens/typography/font-family.js";import{getMobileTextStyle as n,typography as d}from"../../../themes/typography.js";const p=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:t,disabled:o})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],border:`1px solid ${e.palette.semantic.stroke["stroke-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"],position:"relative",...o&&{border:`1px solid ${e.palette.semantic.stroke["stroke-disabled"]}`,backgroundColor:e.palette.semantic.fill["fill-inverse-strong"]},...!t&&!o&&{border:`2px solid ${e.palette.semantic.stroke["stroke-error-strong"]}`,backgroundColor:e.palette.semantic.fill["fill-error-weak"]},...!o&&{"&::before":{content:'""',width:l,height:l,inset:t?"-1px 0 0 -1px":"-2px 0 0 -2px",position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}}}})),c=l(i,{shouldForwardProp:e=>"size"!==e&&"valid"!==e&&"disabled"!==e})((({theme:e,size:i,valid:t,disabled:o})=>{const l=e.spacing("small"===i?3:4);return{width:l,height:l,borderRadius:e.radius["radius-4"],backgroundColor:e.palette.semantic.fill["fill-selected"],position:"relative",...o&&{backgroundColor:e.palette.semantic.fill["fill-disabled"]},...!t&&!o&&{backgroundColor:e.palette.semantic.fill["fill-error-strong"]},...!o&&{"&::before":{content:'""',inset:0,position:"absolute",borderRadius:e.radius["radius-4"],pointerEvents:"none"},"input:hover ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-hover"]},"input:active ~ &::before":{backgroundColor:e.palette.semantic.fill["fill-press"]},"input:focus ~ &":{outline:`2px solid ${e.palette.semantic.stroke["stroke-focus"]}`,outlineOffset:"2px"}},display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:l,height:l,color:e.palette.semantic.fill["fill-inverse-strong"],flexShrink:0,display:"block",overflow:"visible","& g, & path":{transform:"scale(1.08)",transformOrigin:"center"}}}})),m=l(o,{shouldForwardProp:e=>!["size","valid"].includes(e)})((({theme:e,size:i})=>({alignItems:"center",display:"flex",justifyContent:"flex-start",margin:0,padding:0,..."small"===i&&{gap:e.spacing(1)},..."medium"===i&&{gap:e.spacing(1.5)},"& .MuiTypography-root":{..."small"===i&&{...d.captionWeak,[e.breakpoints.down("tablet")]:{fontFamily:s.mobile.body,...n("caption")}}}}))),f=l(t,{shouldForwardProp:e=>"valid"!==e})((({theme:e,valid:i,disabled:t})=>({padding:0,margin:0,...!i&&!t&&{color:e.palette.semantic.fill["fill-error-strong"],"&.Mui-checked":{color:e.palette.semantic.fill["fill-error-strong"]}}}))),u=({fdKey:i,label:t,size:o="medium",valid:l=!0,disabled:s,...n})=>e(m,{control:e(f,{disableFocusRipple:!0,disableRipple:!0,disableTouchRipple:!0,checkedIcon:e(c,{disabled:s,size:o,valid:l,children:e(a,{})}),"data-fd":i,icon:e(p,{disabled:s,size:o,valid:l}),indeterminateIcon:e(c,{disabled:s,size:o,valid:l,children:e(r,{})}),size:o,valid:l,...n}),"data-fd":`${i}-label`,disabled:s,label:t,size:o});export{u as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: 'transparent',\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","position","fill","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","Checkbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/atoms/Checkbox/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport MuiCheckbox, { type CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox';\nimport MuiFormControlLabel from '@mui/material/FormControlLabel';\nimport { styled } from '@mui/material/styles';\n\nimport RemoveIcon from '@fd/icons/Remove';\nimport TickIcon from '@fd/icons/Tick';\nimport { fontFamily } from '@fd/themes/tokens/typography/font-family';\nimport { getMobileTextStyle, typography } from '@fd/themes/typography';\n\ninterface CheckboxProps extends Omit<MuiCheckboxProps, 'size'> {\n fdKey: string;\n label?: string;\n size?: 'medium' | 'small';\n valid?: boolean;\n}\n\nconst UncheckedControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n border: `1px solid ${theme.palette.semantic.stroke['stroke-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n position: 'relative',\n\n ...(disabled && {\n border: `1px solid ${theme.palette.semantic.stroke['stroke-disabled']}`,\n backgroundColor: theme.palette.semantic.fill['fill-inverse-strong'],\n }),\n\n ...(!valid &&\n !disabled && {\n border: `2px solid ${theme.palette.semantic.stroke['stroke-error-strong']}`,\n backgroundColor: theme.palette.semantic.fill['fill-error-weak'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n width: dimensions,\n height: dimensions,\n inset: valid ? '-1px 0 0 -1px' : '-2px 0 0 -2px',\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n };\n});\n\nconst IconControl = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'size' && prop !== 'valid' && prop !== 'disabled',\n})<{ size: 'medium' | 'small'; valid: boolean; disabled?: boolean }>(({ theme, size, valid, disabled }) => {\n const dimensions = theme.spacing(size === 'small' ? 3 : 4);\n\n return {\n width: dimensions,\n height: dimensions,\n borderRadius: theme.radius['radius-4'],\n backgroundColor: theme.palette.semantic.fill['fill-selected'],\n position: 'relative',\n\n ...(disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-disabled'],\n }),\n\n ...(!valid &&\n !disabled && {\n backgroundColor: theme.palette.semantic.fill['fill-error-strong'],\n }),\n\n ...(!disabled && {\n '&::before': {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n borderRadius: theme.radius['radius-4'],\n pointerEvents: 'none',\n },\n 'input:hover ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-hover'],\n },\n 'input:active ~ &::before': {\n backgroundColor: theme.palette.semantic.fill['fill-press'],\n },\n 'input:focus ~ &': {\n outline: `2px solid ${theme.palette.semantic.stroke['stroke-focus']}`,\n outlineOffset: '2px',\n },\n }),\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& svg': {\n width: dimensions,\n height: dimensions,\n color: theme.palette.semantic.fill['fill-inverse-strong'],\n flexShrink: 0,\n display: 'block',\n overflow: 'visible',\n '& g, & path': {\n transform: 'scale(1.08)',\n transformOrigin: 'center',\n },\n },\n };\n});\n\nconst StyledFormControlLabel = styled(MuiFormControlLabel, {\n shouldForwardProp: (prop) => !['size', 'valid'].includes(prop as string),\n})<{ size: 'medium' | 'small' }>(({ theme, size }) => ({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'flex-start',\n margin: 0,\n padding: 0,\n\n ...(size === 'small' && { gap: theme.spacing(1) }),\n ...(size === 'medium' && { gap: theme.spacing(1.5) }),\n\n '& .MuiTypography-root': {\n ...(size === 'small' && {\n ...typography.captionWeak,\n [theme.breakpoints.down('tablet')]: {\n fontFamily: fontFamily.mobile.body,\n ...getMobileTextStyle('caption'),\n },\n }),\n },\n}));\n\nconst StyledMuiCheckbox = styled(MuiCheckbox, {\n shouldForwardProp: (prop) => prop !== 'valid',\n})<{ valid: boolean }>(({ theme, valid, disabled }) => ({\n padding: 0,\n margin: 0,\n\n ...(!valid &&\n !disabled && {\n color: theme.palette.semantic.fill['fill-error-strong'],\n '&.Mui-checked': {\n color: theme.palette.semantic.fill['fill-error-strong'],\n },\n }),\n}));\n\nconst Checkbox = ({\n fdKey,\n label,\n size = 'medium',\n valid = true,\n disabled,\n ...props\n}: CheckboxProps): JSX.Element => {\n return (\n <StyledFormControlLabel\n control={\n <StyledMuiCheckbox\n disableFocusRipple\n disableRipple\n disableTouchRipple\n checkedIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <TickIcon />\n </IconControl>\n }\n data-fd={fdKey}\n icon={<UncheckedControl disabled={disabled} size={size} valid={valid} />}\n indeterminateIcon={\n <IconControl disabled={disabled} size={size} valid={valid}>\n <RemoveIcon />\n </IconControl>\n }\n size={size}\n valid={valid}\n {...props}\n />\n }\n data-fd={`${fdKey}-label`}\n disabled={disabled}\n label={label}\n size={size}\n />\n );\n};\n\nexport default Checkbox;\n"],"names":["UncheckedControl","styled","Box","shouldForwardProp","prop","theme","size","valid","disabled","dimensions","spacing","width","height","borderRadius","radius","border","palette","semantic","stroke","backgroundColor","fill","position","content","inset","pointerEvents","outline","outlineOffset","IconControl","display","alignItems","justifyContent","color","flexShrink","overflow","transform","transformOrigin","StyledFormControlLabel","MuiFormControlLabel","includes","margin","padding","gap","typography","captionWeak","breakpoints","down","fontFamily","mobile","body","getMobileTextStyle","StyledMuiCheckbox","MuiCheckbox","Checkbox","fdKey","label","props","_jsx","control","disableFocusRipple","disableRipple","disableTouchRipple","checkedIcon","children","TickIcon","icon","indeterminateIcon","RemoveIcon"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/Box"),r=require("@mui/material/ListItemText"),a=require("@mui/material/MenuItem"),n=require("@mui/material/styles"),c=require("../Checkbox/index.cjs.js");const i=n.styled(t,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:t=!1})=>({alignItems:"center",display:"inline-flex",justifyContent:"center","& .MuiAvatar-img":{opacity:t?e.palette.action.disabledOpacity:1}}))),s=n.styled(c)((()=>({pointerEvents:"none"}))),o=({children:t,disabled:n=!1,label:c,secondaryText:o,type:l="text",...d})=>{const u=(()=>{switch(l){case"checkbox":{const{checked:e,onCheckedChange:t,...r}=d;return r}case"avatar":{const{avatar:e,...t}=d;return t}case"icon":{const{icon:e,...t}=d;return t}default:return d}})();return e.jsxs(a,{...u,disabled:n,onClick:e=>{if(!n)if("checkbox"!==l)u?.onClick?.(e);else{e.preventDefault(),e.stopPropagation();const{checked:t,onCheckedChange:r}=d,a="boolean"==typeof t?t:Boolean(d.selected);r?.(!a,e)}},children:[(()=>{switch(l){case"avatar":return(()=>{const{avatar:t}=d;return e.jsx(i,{disabled:n,children:t})})();case"checkbox":return(()=>{const{checked:t}=d,r="boolean"==typeof t?t:Boolean(d.selected);return e.jsx(s,{"aria-hidden":!0,checked:r,disabled:n,fdKey:"checkbox-menu-item",size:"small",tabIndex:-1})})();case"icon":return(()=>{const{icon:t}=d;return e.jsx(i,{children:t})})();default:return null}})(),c||o?e.jsx(r,{primary:c,secondary:o}):t]})};exports.MenuItem=o,exports.default=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material/MenuItem"),r=require("@mui/material/styles"),a=require("../Avatar/index.cjs.js"),n=require("@mui/material/Box"),s=require("../Checkbox/index.cjs.js"),c=require("@mui/material/ListItemText");const i=r.styled(n,{shouldForwardProp:e=>"disabled"!==e})((({theme:e,disabled:t=!1})=>({alignItems:"center",display:"inline-flex",justifyContent:"center","& .MuiAvatar-img":{opacity:t?e.palette.action.disabledOpacity:1}}))),o=r.styled(s)((()=>({pointerEvents:"none"}))),l=({children:r,disabled:n=!1,label:s,secondaryText:l,type:d="text",...u})=>{const m=(()=>{switch(d){case"checkbox":{const{checked:e,onCheckedChange:t,...r}=u;return r}case"avatar":{const{avatarSrc:e,...t}=u;return t}case"icon":{const{icon:e,...t}=u;return t}default:return u}})();return e.jsxs(t,{...m,disabled:n,onClick:e=>{if(!n)if("checkbox"!==d)m?.onClick?.(e);else{e.preventDefault(),e.stopPropagation();const{checked:t,onCheckedChange:r}=u,a="boolean"==typeof t?t:Boolean(u.selected);r?.(!a,e)}},children:[(()=>{switch(d){case"avatar":return(()=>{const{avatarSrc:t}=u;return e.jsx(i,{className:"fd-MenuItem-startAdornment",disabled:n,children:e.jsx(a,{alt:"",src:t,type:"logo"})})})();case"checkbox":return(()=>{const{checked:t}=u,r="boolean"==typeof t?t:Boolean(u.selected);return e.jsx(o,{"aria-hidden":!0,checked:r,disabled:n,fdKey:"checkbox-menu-item",size:"small",tabIndex:-1})})();case"icon":return(()=>{const{icon:t}=u;return e.jsx(i,{className:"fd-MenuItem-startAdornment",children:t})})();default:return null}})(),s||l?e.jsx(c,{primary:s,secondary:l}):r]})};exports.MenuItem=l,exports.default=l;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/MenuItem/index.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport ListItemText from '@mui/material/ListItemText';\nimport MuiMenuItem, { type MenuItemProps as MuiMenuItemProps } from '@mui/material/MenuItem';\nimport { styled } from '@mui/material/styles';\n\nimport Checkbox from '../Checkbox';\n\ntype BaseProps = Omit<MuiMenuItemProps, 'children'> & {\n children?: React.ReactNode;\n label?: React.ReactNode;\n secondaryText?: React.ReactNode;\n type?: 'avatar' | 'checkbox' | 'icon' | 'text';\n};\n\ntype AvatarMenuItemProps = BaseProps & {\n avatar: React.ReactNode;\n checkbox?: never;\n icon?: never;\n type: 'avatar';\n};\n\ntype CheckboxMenuItemProps = BaseProps & {\n avatar?: never;\n checked?: boolean;\n icon?: never;\n onCheckedChange?: (\n checked: boolean,\n e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLLIElement>,\n ) => void;\n type: 'checkbox';\n};\n\ntype IconMenuItemProps = BaseProps & {\n avatar?: never;\n checkbox?: never;\n icon: React.ReactNode;\n type: 'icon';\n};\n\ntype TextMenuItemProps = BaseProps & {\n avatar?: never;\n checkbox?: never;\n icon?: never;\n type?: 'text';\n};\n\nexport type MenuItemProps =\n | AvatarMenuItemProps\n | CheckboxMenuItemProps\n | IconMenuItemProps\n | TextMenuItemProps;\n\nconst StyledStartAdornment = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n '& .MuiAvatar-img': {\n opacity: disabled ? theme.palette.action.disabledOpacity : 1,\n },\n}));\n\nconst StyledCheckbox = styled(Checkbox)(() => ({\n pointerEvents: 'none',\n}));\n\nexport const MenuItem = ({\n children,\n disabled = false,\n label,\n secondaryText,\n type = 'text',\n ...props\n}: MenuItemProps): JSX.Element => {\n // Remove type-specific props from props object to avoid passing them to MuiMenuItem\n const muiProps: MuiMenuItemProps = ((): MuiMenuItemProps => {\n switch (type) {\n case 'checkbox': {\n const { checked: _c, onCheckedChange: _h, ...rest } = props as CheckboxMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'avatar': {\n const { avatar: _a, ...rest } = props as AvatarMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'icon': {\n const { icon: _i, ...rest } = props as IconMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n default:\n return props as MuiMenuItemProps;\n }\n })();\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled) {\n return;\n }\n\n // If menu item is a checkbox, clicking the menu item will toggle the checkbox\n if (type === 'checkbox') {\n event.preventDefault();\n event.stopPropagation();\n\n const { checked, onCheckedChange } = props as CheckboxMenuItemProps;\n const isChecked =\n typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n onCheckedChange?.(!isChecked, event);\n return;\n }\n\n muiProps?.onClick?.(event);\n };\n\n const renderAvatar = (): React.ReactNode => {\n const { avatar } = props as AvatarMenuItemProps;\n return <StyledStartAdornment disabled={disabled}>{avatar}</StyledStartAdornment>;\n };\n\n const renderCheckbox = (): React.ReactNode => {\n const { checked } = props as CheckboxMenuItemProps;\n const isChecked = typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n return (\n <StyledCheckbox\n aria-hidden\n checked={isChecked}\n disabled={disabled}\n fdKey=\"checkbox-menu-item\"\n size=\"small\"\n tabIndex={-1}\n />\n );\n };\n\n const renderIcon = (): React.ReactNode => {\n const { icon } = props as IconMenuItemProps;\n return <StyledStartAdornment>{icon}</StyledStartAdornment>;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n switch (type) {\n case 'avatar':\n return renderAvatar();\n case 'checkbox':\n return renderCheckbox();\n case 'icon':\n return renderIcon();\n default:\n return null;\n }\n };\n\n const renderText = (): React.ReactNode => {\n if (label || secondaryText) {\n return <ListItemText primary={label} secondary={secondaryText} />;\n }\n\n return children;\n };\n\n return (\n <MuiMenuItem {...muiProps} disabled={disabled} onClick={handleClick}>\n {renderStartAdornment()}\n {renderText()}\n </MuiMenuItem>\n );\n};\n\nexport default MenuItem;\n"],"names":["StyledStartAdornment","styled","Box","shouldForwardProp","prop","theme","disabled","alignItems","display","justifyContent","opacity","palette","action","disabledOpacity","StyledCheckbox","Checkbox","pointerEvents","MenuItem","children","label","secondaryText","type","props","muiProps","checked","_c","onCheckedChange","_h","rest","avatar","_a","icon","_i","_jsxs","MuiMenuItem","onClick","event","preventDefault","stopPropagation","isChecked","Boolean","selected","_jsx","renderAvatar","fdKey","size","tabIndex","renderCheckbox","renderIcon","renderStartAdornment","ListItemText","primary","secondary"],"mappings":"0RAoDA,MAAMA,EAAuBC,EAAAA,OAAOC,EAAK,CACvCC,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOC,YAAW,MAAO,CACrDC,WAAY,SACZC,QAAS,cACTC,eAAgB,SAEhB,mBAAoB,CAClBC,QAASJ,EAAWD,EAAMM,QAAQC,OAAOC,gBAAkB,OAIzDC,EAAiBb,EAAAA,OAAOc,EAAPd,EAAiB,KAAA,CACtCe,cAAe,WAGJC,EAAW,EACtBC,WACAZ,YAAW,EACXa,QACAC,gBACAC,OAAO,UACJC,MAGH,MAAMC,EAA6B,MACjC,OAAQF,GACN,IAAK,WAAY,CACf,MAAQG,QAASC,EAAIC,gBAAiBC,KAAOC,GAASN,EACtD,OAAOM,CACT,CACA,IAAK,SAAU,CACb,MAAQC,OAAQC,KAAOF,GAASN,EAChC,OAAOM,CACT,CACA,IAAK,OAAQ,CACX,MAAQG,KAAMC,KAAOJ,GAASN,EAC9B,OAAOM,CACT,CACA,QACE,OAAON,EAEZ,EAjBkC,GAuFnC,OACEW,EAAAA,KAACC,EAAW,IAAKX,EAAUjB,SAAUA,EAAU6B,QArE5BC,IACnB,IAAI9B,EAKJ,GAAa,aAATe,EAYJE,GAAUY,UAAUC,OAZpB,CACEA,EAAMC,iBACND,EAAME,kBAEN,MAAMd,QAAEA,EAAOE,gBAAEA,GAAoBJ,EAC/BiB,EACe,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/Ef,KAAmBa,EAAWH,EAEhC,aA+B2B,MAC3B,OAAQf,GACN,IAAK,SACH,MA7Be,MACnB,MAAMQ,OAAEA,GAAWP,EACnB,OAAOoB,EAAAA,IAAC1C,EAAoB,CAACM,SAAUA,EAAQY,SAAGW,KA2BvCc,GACT,IAAK,WACH,MA1BiB,MACrB,MAAMnB,QAAEA,GAAYF,EACdiB,EAA+B,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/F,OACEC,EAAAA,IAAC5B,EAAc,CAAA,eAAA,EAEbU,QAASe,EACTjC,SAAUA,EACVsC,MAAM,qBACNC,KAAK,QACLC,UAAU,KAeHC,GACT,IAAK,OACH,MAZa,MACjB,MAAMhB,KAAEA,GAAST,EACjB,OAAOoB,EAAAA,IAAC1C,EAAoB,CAAAkB,SAAEa,KAUnBiB,GACT,QACE,OAAO,OAcRC,GATC9B,GAASC,EACJsB,EAAAA,IAACQ,EAAY,CAACC,QAAShC,EAAOiC,UAAWhC,IAG3CF"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../src/components/atoms/MenuItem/index.tsx"],"sourcesContent":["import MuiMenuItem, { type MenuItemProps as MuiMenuItemProps } from '@mui/material/MenuItem';\nimport { styled } from '@mui/material/styles';\n\nimport Avatar from '../Avatar';\nimport Box from '../Box';\nimport Checkbox from '../Checkbox';\nimport ListItemText from '../ListItemText';\n\ntype BaseProps = Omit<MuiMenuItemProps, 'children'> & {\n /** Children of the menu item */\n children?: React.ReactNode;\n /** Label of the menu item */\n label?: React.ReactNode;\n /** Secondary text of the menu item */\n secondaryText?: React.ReactNode;\n};\n\n/** Props for an avatar menu item */\nexport interface AvatarMenuItemProps extends BaseProps {\n /** Source URL for the avatar image */\n avatarSrc: string;\n /** Checkbox of the menu item */\n checkbox?: never;\n /** Icon of the menu item */\n icon?: never;\n /** Type of the menu item */\n type: 'avatar';\n}\n\n/** Props for a checkbox menu item */\nexport interface CheckboxMenuItemProps extends BaseProps {\n /** Avatar of the menu item */\n avatar?: never;\n /** Checked state of the menu item */\n checked: boolean;\n /** Icon of the menu item */\n icon?: never;\n /** Function to call when the checkbox is changed */\n onCheckedChange: (\n checked: boolean,\n e: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLLIElement>,\n ) => void;\n /** Function to call when the menu item is clicked */\n onClick?: never;\n /** Type of the menu item */\n type: 'checkbox';\n}\n\n/** Props for an icon menu item */\nexport interface IconMenuItemProps extends BaseProps {\n /** Avatar of the menu item */\n avatar?: never;\n /** Checkbox of the menu item */\n checkbox?: never;\n /** Icon of the menu item */\n icon: React.ReactNode;\n /** Type of the menu item */\n type: 'icon';\n}\n\n/** Props for a text menu item */\nexport interface TextMenuItemProps extends BaseProps {\n /** Avatar of the menu item */\n avatar?: never;\n /** Checkbox of the menu item */\n checkbox?: never;\n /** Icon of the menu item */\n icon?: never;\n /** Type of the menu item */\n type?: 'text';\n}\n\n/** Props for the MenuItem component */\nexport type MenuItemProps =\n | AvatarMenuItemProps\n | CheckboxMenuItemProps\n | IconMenuItemProps\n | TextMenuItemProps;\n\nconst StyledStartAdornment = styled(Box, {\n shouldForwardProp: (prop) => prop !== 'disabled',\n})<{ disabled?: boolean }>(({ theme, disabled = false }) => ({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n '& .MuiAvatar-img': {\n opacity: disabled ? theme.palette.action.disabledOpacity : 1,\n },\n}));\n\nconst StyledCheckbox = styled(Checkbox)(() => ({\n pointerEvents: 'none',\n}));\n\n/**\n * A customizable MenuItem component supporting text, avatar, icon and checkbox menu items.\n *\n * @param props - The component props\n * @returns The rendered MenuItem component\n */\nexport const MenuItem = ({\n children,\n disabled = false,\n label,\n secondaryText,\n type = 'text',\n ...props\n}: MenuItemProps): JSX.Element => {\n // Remove type-specific props from props object to avoid passing them to MuiMenuItem\n const muiProps: MuiMenuItemProps = ((): MuiMenuItemProps => {\n switch (type) {\n case 'checkbox': {\n const { checked: _c, onCheckedChange: _h, ...rest } = props as CheckboxMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'avatar': {\n const { avatarSrc: _avatarSrc, ...rest } = props as AvatarMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n case 'icon': {\n const { icon: _i, ...rest } = props as IconMenuItemProps;\n return rest as MuiMenuItemProps;\n }\n default:\n return props as MuiMenuItemProps;\n }\n })();\n\n const handleClick = (event: React.MouseEvent<HTMLLIElement>): void => {\n if (disabled) {\n return;\n }\n\n // If menu item is a checkbox, clicking the menu item will toggle the checkbox\n if (type === 'checkbox') {\n event.preventDefault();\n event.stopPropagation();\n\n const { checked, onCheckedChange } = props as CheckboxMenuItemProps;\n const isChecked =\n typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n onCheckedChange?.(!isChecked, event);\n return;\n }\n\n muiProps?.onClick?.(event);\n };\n\n const renderAvatar = (): React.ReactNode => {\n const { avatarSrc } = props as AvatarMenuItemProps;\n return (\n <StyledStartAdornment className=\"fd-MenuItem-startAdornment\" disabled={disabled}>\n <Avatar\n alt=\"\" // Avatar is described by the label\n src={avatarSrc}\n type=\"logo\"\n />\n </StyledStartAdornment>\n );\n };\n\n const renderCheckbox = (): React.ReactNode => {\n const { checked } = props as CheckboxMenuItemProps;\n const isChecked = typeof checked === 'boolean' ? checked : Boolean((props as MuiMenuItemProps).selected);\n\n return (\n <StyledCheckbox\n aria-hidden\n checked={isChecked}\n disabled={disabled}\n fdKey=\"checkbox-menu-item\"\n size=\"small\"\n tabIndex={-1}\n />\n );\n };\n\n const renderIcon = (): React.ReactNode => {\n const { icon } = props as IconMenuItemProps;\n return <StyledStartAdornment className=\"fd-MenuItem-startAdornment\">{icon}</StyledStartAdornment>;\n };\n\n const renderStartAdornment = (): React.ReactNode => {\n switch (type) {\n case 'avatar':\n return renderAvatar();\n case 'checkbox':\n return renderCheckbox();\n case 'icon':\n return renderIcon();\n default:\n return null;\n }\n };\n\n const renderText = (): React.ReactNode => {\n if (label || secondaryText) {\n return <ListItemText primary={label} secondary={secondaryText} />;\n }\n\n return children;\n };\n\n return (\n <MuiMenuItem {...muiProps} disabled={disabled} onClick={handleClick}>\n {renderStartAdornment()}\n {renderText()}\n </MuiMenuItem>\n );\n};\n\nexport default MenuItem;\n"],"names":["StyledStartAdornment","styled","Box","shouldForwardProp","prop","theme","disabled","alignItems","display","justifyContent","opacity","palette","action","disabledOpacity","StyledCheckbox","Checkbox","pointerEvents","MenuItem","children","label","secondaryText","type","props","muiProps","checked","_c","onCheckedChange","_h","rest","avatarSrc","_avatarSrc","icon","_i","_jsxs","MuiMenuItem","onClick","event","preventDefault","stopPropagation","isChecked","Boolean","selected","_jsx","className","Avatar","alt","src","renderAvatar","fdKey","size","tabIndex","renderCheckbox","renderIcon","renderStartAdornment","ListItemText","primary","secondary"],"mappings":"8TA+EA,MAAMA,EAAuBC,EAAAA,OAAOC,EAAK,CACvCC,kBAAoBC,GAAkB,aAATA,GADFH,EAEF,EAAGI,QAAOC,YAAW,MAAO,CACrDC,WAAY,SACZC,QAAS,cACTC,eAAgB,SAEhB,mBAAoB,CAClBC,QAASJ,EAAWD,EAAMM,QAAQC,OAAOC,gBAAkB,OAIzDC,EAAiBb,EAAAA,OAAOc,EAAPd,EAAiB,KAAA,CACtCe,cAAe,WASJC,EAAW,EACtBC,WACAZ,YAAW,EACXa,QACAC,gBACAC,OAAO,UACJC,MAGH,MAAMC,EAA6B,MACjC,OAAQF,GACN,IAAK,WAAY,CACf,MAAQG,QAASC,EAAIC,gBAAiBC,KAAOC,GAASN,EACtD,OAAOM,CACT,CACA,IAAK,SAAU,CACb,MAAQC,UAAWC,KAAeF,GAASN,EAC3C,OAAOM,CACT,CACA,IAAK,OAAQ,CACX,MAAQG,KAAMC,KAAOJ,GAASN,EAC9B,OAAOM,CACT,CACA,QACE,OAAON,EAEZ,EAjBkC,GA+FnC,OACEW,EAAAA,KAACC,EAAW,IAAKX,EAAUjB,SAAUA,EAAU6B,QA7E5BC,IACnB,IAAI9B,EAKJ,GAAa,aAATe,EAYJE,GAAUY,UAAUC,OAZpB,CACEA,EAAMC,iBACND,EAAME,kBAEN,MAAMd,QAAEA,EAAOE,gBAAEA,GAAoBJ,EAC/BiB,EACe,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/Ef,KAAmBa,EAAWH,EAEhC,aAuC2B,MAC3B,OAAQf,GACN,IAAK,SACH,MArCe,MACnB,MAAMQ,UAAEA,GAAcP,EACtB,OACEoB,MAAC1C,GAAqB2C,UAAU,6BAA6BrC,SAAUA,EAAQY,SAC7EwB,EAAAA,IAACE,EAAM,CACLC,IAAI,GACJC,IAAKjB,EACLR,KAAK,YA8BA0B,GACT,IAAK,WACH,MA1BiB,MACrB,MAAMvB,QAAEA,GAAYF,EACdiB,EAA+B,kBAAZf,EAAwBA,EAAUgB,QAASlB,EAA2BmB,UAE/F,OACEC,EAAAA,IAAC5B,EAAc,CAAA,eAAA,EAEbU,QAASe,EACTjC,SAAUA,EACV0C,MAAM,qBACNC,KAAK,QACLC,UAAU,KAeHC,GACT,IAAK,OACH,MAZa,MACjB,MAAMpB,KAAEA,GAAST,EACjB,OAAOoB,EAAAA,IAAC1C,EAAoB,CAAC2C,UAAU,6BAA4BzB,SAAEa,KAU1DqB,GACT,QACE,OAAO,OAcRC,GATClC,GAASC,EACJsB,EAAAA,IAACY,EAAY,CAACC,QAASpC,EAAOqC,UAAWpC,IAG3CF"}