@useloops/design-system 1.4.733 → 1.4.734

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.
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{styled as t}from"@mui/material";import"react";import{omitProps as r}from"../../../utils/shouldForwardProp.js";import{primary as e,secondary as i,outlined as a,subtle as s,buttonPadding as n,getIconSizing as u,getButtonSizing as l,getButtonTypography as c}from"../ButtonBase/Button.variant-helpers.js";import m from"../ButtonBase/ButtonBase.js";const d=t(m,{shouldForwardProp:r("variation","destructive","sizing")})(({theme:o,variation:t,sizing:r,destructive:m})=>({color:o.custom.palette.text.primary,...r&&{...c(r)},...r&&{...l(r)},...r&&{...u(r)},...n(),"&:hover:before":{backgroundColor:o.custom.palette.interaction.hover},"&:focus:before":{backgroundColor:o.custom.palette.interaction.hover},"&:active:before":{backgroundColor:o.custom.palette.interaction.press},..."subtle"===t&&{...s(o,m)},..."outlined"===t&&{...a(o,m)},..."secondary"===t&&{...i(o,m)},..."primary"===t&&{...e(o,m)},"&.Mui-disabled, &.Mui-disabled:hover":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.text.disabled,"&:before":{backgroundColor:"transparent"}}})),p=({sizing:t="lg",variation:r="primary",...e})=>o(d,{variation:r,sizing:t,...e});export{p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{styled as t}from"@mui/material";import"react";import{omitProps as r}from"../../../utils/shouldForwardProp.js";import{primary as e,secondary as i,outlined as a,subtle as s,buttonPadding as n,getIconSizing as u,getButtonSizing as l,getButtonTypography as c}from"../ButtonBase/Button.variant-helpers.js";import m from"../ButtonBase/ButtonBase.js";const d=t(m,{shouldForwardProp:r("variation","destructive","sizing")})(({theme:o,variation:t,sizing:r,destructive:m})=>({color:o.custom.palette.text.primary,...r&&{...c(r)},...r&&{...l(r)},...r&&{...u(r)},...n(),"@media (hover: hover)":{"&:hover:before":{backgroundColor:o.custom.palette.interaction.hover}},"&:focus-visible:before":{backgroundColor:o.custom.palette.interaction.hover},"&:active:before":{backgroundColor:o.custom.palette.interaction.press},..."subtle"===t&&{...s(o,m)},..."outlined"===t&&{...a(o,m)},..."secondary"===t&&{...i(o,m)},..."primary"===t&&{...e(o,m)},"&.Mui-disabled, &.Mui-disabled:hover":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.text.disabled,"&:before":{backgroundColor:"transparent"}}})),p=({sizing:t="lg",variation:r="primary",...e})=>o(d,{variation:r,sizing:t,...e});export{p as default};
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"@mui/material";import{iconSizeMap as o}from"../../BrandCore/Icon/Icon.js";import{base as t}from"../../BrandCore/primitiveVariables.js";import{fontSizemap as e}from"../utils/typography.util.js";const r=(o,t)=>({backgroundColor:o.custom.palette.interaction.none,color:t?o.custom.palette.text.negative:o.custom.palette.text.primary,fontWeight:300,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus}}),a=(o,t)=>({backgroundColor:o.custom.palette.surface.raised,color:t?o.custom.palette.text.negative:o.custom.palette.text.primary,border:`1px solid ${o.custom.palette.stroke.default}`,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"&:hover":{backgroundColor:o.custom.palette.surface.raised},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&:active":{backgroundColor:o.custom.palette.surface.raised},"&:disabled":{border:`1px solid ${o.custom.palette.stroke.disabled}`}}),c=(o,t)=>({backgroundColor:t?o.custom.palette.red[0]:o.custom.palette.purple[0],color:t?o.custom.palette.text.negative:o.custom.palette.text.primary,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"&:hover":{backgroundColor:t?o.custom.palette.red[0]:o.custom.palette.purple[0]},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&:active":{backgroundColor:t?o.custom.palette.red[0]:o.custom.palette.purple[0]}}),u=(o,t)=>({backgroundColor:t?o.custom.palette.red[500]:o.custom.palette.purple[500],color:o.custom.palette.text.lockedWhite,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"&:hover":{backgroundColor:t?o.custom.palette.red[500]:o.custom.palette.purple[500],color:o.custom.palette.text.lockedWhite,"&::before":{backgroundColor:o.custom.palette.interaction.hoverOnDark}},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus,"&::before":{backgroundColor:o.custom.palette.interaction.hoverOnDark}},"&:active":{backgroundColor:t?o.custom.palette.red[500]:o.custom.palette.purple[500],color:o.custom.palette.text.lockedWhite,"&::before":{backgroundColor:o.custom.palette.interaction.pressOnDark}}}),l=(o,t)=>({cursor:"pointer","&:hover":{backgroundColor:o.custom.palette.interaction.hover},"&:focus":{backgroundColor:o.custom.palette.interaction.hover},"&:active":{backgroundColor:o.custom.palette.interaction.press},"&:disabled":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.text.disabled},...t&&{backgroundColor:o.custom.palette.interaction.press,"&:hover":{backgroundColor:o.custom.palette.interaction.press},"&:focus":{backgroundColor:o.custom.palette.interaction.press},"&:active":{backgroundColor:o.custom.palette.interaction.press}},...r(o,!1)}),i={xs:3*t,sm:3.5*t,md:4*t,lg:5*t,xl:6*t,xxl:7*t,xxxl:8*t},s={xs:.5*t,sm:.5*t,md:t,lg:t,xl:t,xxl:t,xxxl:t},n=t=>({"& .MuiButton-icon":{margin:0,".MuiSvgIcon-root":{height:o[t],width:o[t]}},"& .MuiSvgIcon-root":{height:o[t],width:o[t]}}),p=o=>({"& .MuiBox-root":{lineHeight:"120%",fontSize:e[o],paddingLeft:s[o],paddingRight:s[o]}}),d=o=>({height:i[o]}),m=()=>({paddingLeft:t,paddingRight:t});export{i as buttonHeightMap,l as buttonInteraction,m as buttonPadding,d as getButtonSizing,p as getButtonTypography,n as getIconSizing,a as outlined,u as primary,c as secondary,r as subtle};
1
+ import"react/jsx-runtime";import"@mui/material";import{iconSizeMap as o}from"../../BrandCore/Icon/Icon.js";import{base as t}from"../../BrandCore/primitiveVariables.js";import{fontSizemap as e}from"../utils/typography.util.js";const r=(o,t)=>({backgroundColor:o.custom.palette.interaction.none,color:t?o.custom.palette.text.negative:o.custom.palette.text.primary,fontWeight:300,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus}}),a=(o,t)=>({backgroundColor:o.custom.palette.surface.raised,color:t?o.custom.palette.text.negative:o.custom.palette.text.primary,border:`1px solid ${o.custom.palette.stroke.default}`,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover":{backgroundColor:o.custom.palette.surface.raised}},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&:active":{backgroundColor:o.custom.palette.surface.raised},"&:disabled":{border:`1px solid ${o.custom.palette.stroke.disabled}`}}),c=(o,t)=>({backgroundColor:t?o.custom.palette.red[0]:o.custom.palette.purple[0],color:t?o.custom.palette.text.negative:o.custom.palette.text.primary,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover":{backgroundColor:t?o.custom.palette.red[0]:o.custom.palette.purple[0]}},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&:active":{backgroundColor:t?o.custom.palette.red[0]:o.custom.palette.purple[0]}}),i=(o,t)=>({backgroundColor:t?o.custom.palette.red[500]:o.custom.palette.purple[500],color:o.custom.palette.text.lockedWhite,"&:focus:before":{boxShadow:o.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover":{backgroundColor:t?o.custom.palette.red[500]:o.custom.palette.purple[500],color:o.custom.palette.text.lockedWhite,"&::before":{backgroundColor:o.custom.palette.interaction.hoverOnDark}}},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus,"&::before":{backgroundColor:o.custom.palette.interaction.hoverOnDark}},"&:active":{backgroundColor:t?o.custom.palette.red[500]:o.custom.palette.purple[500],color:o.custom.palette.text.lockedWhite,"&::before":{backgroundColor:o.custom.palette.interaction.pressOnDark}}}),u=(o,t)=>({cursor:"pointer","&:hover":{backgroundColor:o.custom.palette.interaction.hover},"&:focus":{backgroundColor:o.custom.palette.interaction.hover},"&:active":{backgroundColor:o.custom.palette.interaction.press},"&:disabled":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.text.disabled},...t&&{backgroundColor:o.custom.palette.interaction.press,"&:hover":{backgroundColor:o.custom.palette.interaction.press},"&:focus":{backgroundColor:o.custom.palette.interaction.press},"&:active":{backgroundColor:o.custom.palette.interaction.press}},...r(o,!1)}),l={xs:3*t,sm:3.5*t,md:4*t,lg:5*t,xl:6*t,xxl:7*t,xxxl:8*t},s={xs:.5*t,sm:.5*t,md:t,lg:t,xl:t,xxl:t,xxxl:t},n=t=>({"& .MuiButton-icon":{margin:0,".MuiSvgIcon-root":{height:o[t],width:o[t]}},"& .MuiSvgIcon-root":{height:o[t],width:o[t]}}),p=o=>({"& .MuiBox-root":{lineHeight:"120%",fontSize:e[o],paddingLeft:s[o],paddingRight:s[o]}}),d=o=>({height:l[o]}),m=()=>({paddingLeft:t,paddingRight:t});export{l as buttonHeightMap,u as buttonInteraction,m as buttonPadding,d as getButtonSizing,p as getButtonTypography,n as getIconSizing,a as outlined,i as primary,c as secondary,r as subtle};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Remove as t,Check as e}from"@mui/icons-material";import{styled as i,Checkbox as a}from"@mui/material";import"react";import{omitProps as s}from"../../../utils/shouldForwardProp.js";import{iconSizeMap as r}from"../../BrandCore/Icon/Icon.js";import{space as u}from"../../BrandCore/primitiveVariables.js";const p=i(a,{shouldForwardProp:s("sizing","variant")})(({theme:o,sizing:t,variant:e})=>({height:"default"===t?u[300]:u[400],width:"default"===t?u[300]:u[400],padding:0,flex:"none",borderRadius:o.spacing(o.custom.radius.sm),border:"none",boxShadow:`0px 0px 0px 0px ${o.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${o.custom.palette.stroke.default}`,backgroundColor:o.custom.palette.input.default,position:"relative",transition:`${o.custom.easing.input}`,"& svg":{transition:o.custom.easing.input,fill:"none",width:"default"===t?r.sm:r.xl,height:"default"===t?r.sm:r.xl},"&:before":{content:'""',position:"absolute",inset:0},"&:hover":{backgroundColor:o.custom.palette.input.default,"&:before":{borderRadius:o.spacing(o.custom.radius.sm),backgroundColor:o.custom.palette.interaction.hover}},"&:active":{backgroundColor:o.custom.palette.input.default,boxShadow:`${o.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${o.custom.palette.stroke.focus}`,"&:before":{borderRadius:o.spacing(o.custom.radius.sm),backgroundColor:o.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${o.custom.palette.stroke.disabled}`},"&.Mui-checked":{backgroundColor:o.custom.palette.purple[500],"& svg":{fill:o.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,"& svg":{fill:o.custom.palette.icon.disabled}}},"&.MuiCheckbox-indeterminate":{backgroundColor:o.custom.palette.purple[500],"& svg":{fill:o.custom.palette.icon.lockedWhite}},"&.Mui-focusVisible":{boxShadow:`${o.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${o.custom.palette.stroke.focus}`,"&:before":{backgroundColor:o.custom.palette.interaction.press}},..."secondary"===e?{boxShadow:`0px 0px 0px 0px ${o.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${o.custom.palette.blue[500]}`,"&:hover":{backgroundColor:o.custom.palette.blue[0]},"&:active":{backgroundColor:o.custom.palette.input.default,boxShadow:`${o.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${o.custom.palette.blue[500]}`,"&:before":{borderRadius:o.spacing(o.custom.radius.sm),backgroundColor:o.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:o.custom.palette.blue[0],"& svg":{fill:o.custom.palette.icon.primary}},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${o.custom.palette.stroke.disabled}`},"&.MuiCheckbox-indeterminate":{backgroundColor:o.custom.palette.blue[0],"& svg":{fill:o.custom.palette.icon.primary}}}:void 0})),l=({inputRef:i,slotProps:a,...s})=>o(p,{checkedIcon:o(e,{}),indeterminateIcon:o(t,{}),...s,slotProps:{...a,input:{...a?.input,ref:i}},disableFocusRipple:!0});export{l as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{Remove as t,Check as e}from"@mui/icons-material";import{styled as i,Checkbox as a}from"@mui/material";import"react";import{omitProps as s}from"../../../utils/shouldForwardProp.js";import{iconSizeMap as r}from"../../BrandCore/Icon/Icon.js";import{space as u}from"../../BrandCore/primitiveVariables.js";const p=i(a,{shouldForwardProp:s("sizing","variant")})(({theme:o,sizing:t,variant:e})=>({height:"default"===t?u[300]:u[400],width:"default"===t?u[300]:u[400],padding:0,flex:"none",borderRadius:o.spacing(o.custom.radius.sm),border:"none",boxShadow:`0px 0px 0px 0px ${o.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${o.custom.palette.stroke.default}`,backgroundColor:o.custom.palette.input.default,position:"relative",transition:`${o.custom.easing.input}`,"& svg":{transition:o.custom.easing.input,fill:"none",width:"default"===t?r.sm:r.xl,height:"default"===t?r.sm:r.xl},"&:before":{content:'""',position:"absolute",inset:0},"@media (hover: hover)":{"&:hover":{backgroundColor:o.custom.palette.input.default,"&:before":{borderRadius:o.spacing(o.custom.radius.sm),backgroundColor:o.custom.palette.interaction.hover}}},"&:active":{backgroundColor:o.custom.palette.input.default,boxShadow:`${o.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${o.custom.palette.stroke.focus}`,"&:before":{borderRadius:o.spacing(o.custom.radius.sm),backgroundColor:o.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${o.custom.palette.stroke.disabled}`},"&.Mui-checked":{backgroundColor:o.custom.palette.purple[500],"& svg":{fill:o.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,"& svg":{fill:o.custom.palette.icon.disabled}}},"&.MuiCheckbox-indeterminate":{backgroundColor:o.custom.palette.purple[500],"& svg":{fill:o.custom.palette.icon.lockedWhite}},"&.Mui-focusVisible":{boxShadow:`${o.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${o.custom.palette.stroke.focus}`,"&:before":{backgroundColor:o.custom.palette.interaction.press}},..."secondary"===e?{boxShadow:`0px 0px 0px 0px ${o.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${o.custom.palette.blue[500]}`,"@media (hover: hover)":{"&:hover":{backgroundColor:o.custom.palette.blue[0]}},"&:active":{backgroundColor:o.custom.palette.input.default,boxShadow:`${o.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${o.custom.palette.blue[500]}`,"&:before":{borderRadius:o.spacing(o.custom.radius.sm),backgroundColor:o.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:o.custom.palette.blue[0],"& svg":{fill:o.custom.palette.icon.primary}},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${o.custom.palette.stroke.disabled}`},"&.MuiCheckbox-indeterminate":{backgroundColor:o.custom.palette.blue[0],"& svg":{fill:o.custom.palette.icon.primary}}}:void 0})),l=({inputRef:i,slotProps:a,...s})=>o(p,{checkedIcon:o(e,{}),indeterminateIcon:o(t,{}),...s,slotProps:{...a,input:{...a?.input,ref:i}},disableFocusRipple:!0});export{l as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import{FormGroup as o,Box as i}from"@mui/material";import{useMemo as n}from"react";import r from"../FormControlLabel/FormControlLabel.js";import a from"../Checkbox/StyledCheckbox.js";import c from"../TextField/TextField.js";const s=({sizing:s,options:u,other:d,internalChange:h,value:m,inputRef:f,onChange:p,maxSelections:b,noneOfTheseOption:g})=>{const x=d?.name||"other-option",C=g?.value||"none-of-these-option",v=`${x}-value-`,k=e=>`${v}${e}`,M=d?.enabled,F=m?.includes(x)&&M,j=m?.find(e=>e.includes(v)),y=n(()=>m?m.filter(e=>!e.startsWith(v)).length:0,[m,v]),z=!!b&&y>=b;if(!m)return e("div",{});const S=(e,l)=>{const t=m.includes(e);if(!t&&z&&!l)return;let o;t?o=m.filter(l=>l!==e):l?o=[e]:(o=[...new Set(m),e],o=o.filter(e=>!u.find(l=>l?.exclusive&&e===l.value)),g&&(o=o.filter(e=>e!==C))),d?.enabled&&(l?o=o.filter(e=>e!==x&&!e.includes(v)):e===x&&t&&(o=o.filter(e=>!e.includes(v)))),p(o),h&&h()},T=(e,l)=>!l&&(z&&!m.includes(e));return l(t,{children:[l(o,{sx:{display:"flex",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"&:not(.Mui-disabled):hover":{"& .MuiCheckbox-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}},children:[u?.map(l=>{const t=l.value,o=T(t,l.exclusive);return e(r,{sx:{"& .MuiButtonBase-root.MuiCheckbox-root":{alignSelf:"baseline"},"& .MuiTypography-root":{mt:0}},onChange:()=>S(t,l.exclusive),checked:m.includes(t),disabled:o,control:e(a,{sizing:s,disabled:o}),label:l.label},t)}),M&&e(r,{inputRef:f,onChange:()=>S(x),label:d?.label||"Other",checked:m.includes(x),disabled:T(x),control:e(a,{sizing:s})},x),g&&e(r,{onChange:()=>S(C,!0),checked:m.includes(C),control:e(a,{sizing:s}),label:g.label},C)]}),F&&e(i,{sx:{mt:1},children:e(c,{fullWidth:!0,autoFocus:!0,defaultValue:j?j.replace(v,""):"",placeholder:d?.placeholder,onChange:e=>{const l=m.find(e=>e.includes(v)),t=(l?m.map(l=>l.includes(v)?k(e.target.value):l):[...m,k(e.target.value)]).filter(e=>e!==v);p(t),h&&h()},required:!0})})]})};export{s as default};
1
+ import{jsx as e,jsxs as l,Fragment as o}from"react/jsx-runtime";import{FormGroup as t,Box as i}from"@mui/material";import{useMemo as n}from"react";import r from"../FormControlLabel/FormControlLabel.js";import a from"../Checkbox/StyledCheckbox.js";import c from"../TextField/TextField.js";const s=({sizing:s,options:u,other:d,internalChange:h,value:m,inputRef:f,onChange:p,maxSelections:b,noneOfTheseOption:g})=>{const x=d?.name||"other-option",v=g?.value||"none-of-these-option",C=`${x}-value-`,k=e=>`${C}${e}`,M=d?.enabled,F=m?.includes(x)&&M,j=m?.find(e=>e.includes(C)),y=n(()=>m?m.filter(e=>!e.startsWith(C)).length:0,[m,C]),z=!!b&&y>=b;if(!m)return e("div",{});const S=(e,l)=>{const o=m.includes(e);if(!o&&z&&!l)return;let t;o?t=m.filter(l=>l!==e):l?t=[e]:(t=[...new Set(m),e],t=t.filter(e=>!u.find(l=>l?.exclusive&&e===l.value)),g&&(t=t.filter(e=>e!==v))),d?.enabled&&(l?t=t.filter(e=>e!==x&&!e.includes(C)):e===x&&o&&(t=t.filter(e=>!e.includes(C)))),p(t),h&&h()},T=(e,l)=>!l&&(z&&!m.includes(e));return l(o,{children:[l(t,{sx:{display:"flex",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"@media (hover: hover)":{"&:not(.Mui-disabled):hover":{"& .MuiCheckbox-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}}},children:[u?.map(l=>{const o=l.value,t=T(o,l.exclusive);return e(r,{sx:{"& .MuiButtonBase-root.MuiCheckbox-root":{alignSelf:"baseline"},"& .MuiTypography-root":{mt:0}},onChange:()=>S(o,l.exclusive),checked:m.includes(o),disabled:t,control:e(a,{sizing:s,disabled:t}),label:l.label},o)}),M&&e(r,{inputRef:f,onChange:()=>S(x),label:d?.label||"Other",checked:m.includes(x),disabled:T(x),control:e(a,{sizing:s})},x),g&&e(r,{onChange:()=>S(v,!0),checked:m.includes(v),control:e(a,{sizing:s}),label:g.label},v)]}),F&&e(i,{sx:{mt:1},children:e(c,{fullWidth:!0,autoFocus:!0,defaultValue:j?j.replace(C,""):"",placeholder:d?.placeholder,onChange:e=>{const l=m.find(e=>e.includes(C)),o=(l?m.map(l=>l.includes(C)?k(e.target.value):l):[...m,k(e.target.value)]).filter(e=>e!==C);p(o),h&&h()},required:!0})})]})};export{s as default};
@@ -1 +1 @@
1
- import{base as o}from"../../BrandCore/primitiveVariables.js";const t=o=>({backgroundColor:o.custom.palette.interaction.none,color:o.custom.palette.icon.primary}),e=(o,t)=>({"&.MuiButtonBase-root":{color:t?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,backgroundColor:t?o.custom.palette[t][500]:o.custom.palette.purple[100],"&:focus:before":{backgroundColor:"none"},"&:hover:before":{backgroundColor:o.custom.palette.interaction.hoverOnDark},"&:active:before":{backgroundColor:o.custom.palette.interaction.pressOnDark},"&:focus-visible:before":{backgroundColor:o.custom.palette.surface.transparent},"&.Mui-disabled":{backgroundColor:o.custom.palette.interaction.disabled,"&:before":{color:o.custom.palette.icon.disabled}}}}),r=o=>({backgroundColor:o.custom.palette.surface.raised,border:`1px solid ${o.custom.palette.stroke.default}`,color:o.custom.palette.icon.primary,"&.MuiIconButton-root:disabled":{border:"none"}}),a=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.raised,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),c=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.overlay,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),s=(o,t)=>({borderRadius:"default"===o?t.spacing(t.custom.radius.md):t.custom.radius.round}),u={xs:3*o,sm:3.5*o,md:4*o,lg:5*o,xl:6*o},i=o=>({height:u[o],width:u[o]}),l={xs:2*o,sm:2*o,md:2*o,lg:2.5*o,xl:3*o},n=o=>({height:l[o],width:l[o]});export{l as IconSizeMap,u as buttonSizeMap,t as defaultStyle,c as elevated,s as getIconButtonRadius,i as getIconButtonSizing,n as getIconSizing,r as outlined,a as raised,e as toggle};
1
+ import{base as o}from"../../BrandCore/primitiveVariables.js";const e=o=>({backgroundColor:o.custom.palette.interaction.none,color:o.custom.palette.icon.primary}),t=(o,e)=>({"&.MuiButtonBase-root":{color:e?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,backgroundColor:e?o.custom.palette[e][500]:o.custom.palette.purple[100],"&:focus:before":{backgroundColor:"none"},"@media (hover: hover)":{"&:hover:before":{backgroundColor:o.custom.palette.interaction.hoverOnDark}},"&:active:before":{backgroundColor:o.custom.palette.interaction.pressOnDark},"&:focus-visible:before":{backgroundColor:o.custom.palette.surface.transparent},"&.Mui-disabled":{backgroundColor:o.custom.palette.interaction.disabled,"&:before":{color:o.custom.palette.icon.disabled}}}}),r=o=>({backgroundColor:o.custom.palette.surface.raised,border:`1px solid ${o.custom.palette.stroke.default}`,color:o.custom.palette.icon.primary,"&.MuiIconButton-root:disabled":{border:"none"}}),a=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.raised,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),c=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.overlay,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),s=(o,e)=>({borderRadius:"default"===o?e.spacing(e.custom.radius.md):e.custom.radius.round}),i={xs:3*o,sm:3.5*o,md:4*o,lg:5*o,xl:6*o},u=o=>({height:i[o],width:i[o]}),l={xs:2*o,sm:2*o,md:2*o,lg:2.5*o,xl:3*o},n=o=>({height:l[o],width:l[o]});export{l as IconSizeMap,i as buttonSizeMap,e as defaultStyle,c as elevated,s as getIconButtonRadius,u as getIconButtonSizing,n as getIconSizing,r as outlined,a as raised,t as toggle};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{styled as t,IconButton as e}from"@mui/material";import{forwardRef as r}from"react";import{omitProps as i}from"../../../utils/shouldForwardProp.js";import{getIconButtonRadius as a,elevated as n,raised as l,outlined as s,toggle as c,defaultStyle as u,getIconSizing as d,getIconButtonSizing as m}from"./IconButton.variant-helpers.js";const p=t(e,{shouldForwardProp:i("variation","shape","sizing","toggleColor")})(({theme:o,variation:t,shape:e="default",sizing:r,toggleColor:i})=>({boxSizing:"border-box",transition:"all 200ms ease",overflow:"hidden","&::before":{content:'""',backgroundColor:"transparent",transition:"all 200ms ease",position:"absolute",inset:0,zIndex:1},...e&&{...a(e,o)},...r&&{...m(r)},"&.MuiIconButton-root":{"&:focus:before":{backgroundColor:o.custom.palette.interaction.none},"&:hover:before":{backgroundColor:o.custom.palette.interaction.hover},"&:active:before":{backgroundColor:o.custom.palette.interaction.press},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&.Mui-disabled":{"&:before":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.icon.disabled},"& .MuiSvgIcon-root":{fill:o.custom.palette.icon.disabled,"& path":{fill:"inherit"}}},"& .MuiSvgIcon-root":{fill:i?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,...r&&{...d(r)},position:"relative",zIndex:2},..."default"===t&&{...u(o)},..."toggle"===t&&{...c(o,i)},..."outlined"===t&&{...s(o)},..."raised"===t&&{...l(o)},..."elevated"===t&&{...n(o)},...e&&{...a(e,o)}}})),b=r((t,e)=>o(p,{ref:e,...t}));export{b as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{styled as e,IconButton as t}from"@mui/material";import{forwardRef as r}from"react";import{omitProps as i}from"../../../utils/shouldForwardProp.js";import{getIconButtonRadius as a,elevated as n,raised as l,outlined as s,toggle as c,defaultStyle as u,getIconSizing as d,getIconButtonSizing as m}from"./IconButton.variant-helpers.js";const p=e(t,{shouldForwardProp:i("variation","shape","sizing","toggleColor")})(({theme:o,variation:e,shape:t="default",sizing:r,toggleColor:i})=>({boxSizing:"border-box",transition:"all 200ms ease",overflow:"hidden","&::before":{content:'""',backgroundColor:"transparent",transition:"all 200ms ease",position:"absolute",inset:0,zIndex:1},...t&&{...a(t,o)},...r&&{...m(r)},"&.MuiIconButton-root":{"&:focus:before":{backgroundColor:o.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover:before":{backgroundColor:o.custom.palette.interaction.hover}},"&:active:before":{backgroundColor:o.custom.palette.interaction.press},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&.Mui-disabled":{"&:before":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.icon.disabled},"& .MuiSvgIcon-root":{fill:o.custom.palette.icon.disabled,"& path":{fill:"inherit"}}},"& .MuiSvgIcon-root":{fill:i?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,...r&&{...d(r)},position:"relative",zIndex:2},..."default"===e&&{...u(o)},..."toggle"===e&&{...c(o,i)},..."outlined"===e&&{...s(o)},..."raised"===e&&{...l(o)},..."elevated"===e&&{...n(o)},...t&&{...a(t,o)}}})),b=r((e,t)=>o(p,{ref:t,...e}));export{b as default};
@@ -1 +1 @@
1
- import{jsx as o,jsxs as e}from"react/jsx-runtime";import{useTheme as t,Box as r,Grid as i}from"@mui/material";import{margin as a}from"../../BrandCore/primitiveVariables.js";import n from"./LikertContainer.js";import l from"./LikertLabel.js";import s from"./LikertRadio.js";const u=({options:u=[],disabled:c=!1,sizing:d="lg",onChange:m,internalChange:p,value:b})=>{const h=t();function f(o){m(o.value),p&&p()}return o(r,{children:o(n,{children:o(i,{container:!0,sx:{justifyContent:"space-between"},children:u.map(t=>e(i,{size:"grow",onClick:()=>f(t),sx:{...!c&&{cursor:"pointer"},textAlign:"center","&:hover":{"& .MuiButtonBase-root.MuiRadio-root":{"&:before":{...!c&&{backgroundColor:h.custom.palette.interaction.hover}}}},"&:active":{"& .MuiButtonBase-root.MuiRadio-root":{...!c&&{backgroundColor:h.custom.palette.input.default,borderColor:h.custom.palette.stroke.focus,boxShadow:h.custom.boxShadow.input.focus},"&:before":{...!c&&{backgroundColor:h.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:h.custom.palette.purple[500]}}}},children:[o(s,{sizing:d,disabled:c,onChange:o=>f(t),checked:b===t.value},t.value),o(r,{sx:{mt:a.xs,width:"100%"},children:o(l,{disabled:c,children:t.label})})]},t.value))})})})};export{u as default};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useTheme as t,Box as r,Grid as i}from"@mui/material";import{margin as a}from"../../BrandCore/primitiveVariables.js";import n from"./LikertContainer.js";import l from"./LikertLabel.js";import s from"./LikertRadio.js";const u=({options:u=[],disabled:c=!1,sizing:d="lg",onChange:m,internalChange:p,value:h})=>{const b=t();function f(e){m(e.value),p&&p()}return e(r,{children:e(n,{children:e(i,{container:!0,sx:{justifyContent:"space-between"},children:u.map(t=>o(i,{size:"grow",onClick:()=>f(t),sx:{...!c&&{cursor:"pointer"},textAlign:"center","@media (hover: hover)":{"&:hover":{"& .MuiButtonBase-root.MuiRadio-root":{"&:before":{...!c&&{backgroundColor:b.custom.palette.interaction.hover}}}}},"&:active":{"& .MuiButtonBase-root.MuiRadio-root":{...!c&&{backgroundColor:b.custom.palette.input.default,borderColor:b.custom.palette.stroke.focus,boxShadow:b.custom.boxShadow.input.focus},"&:before":{...!c&&{backgroundColor:b.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:b.custom.palette.purple[500]}}}},children:[e(s,{sizing:d,disabled:c,onChange:e=>f(t),checked:h===t.value},t.value),e(r,{sx:{mt:a.xs,width:"100%"},children:e(l,{disabled:c,children:t.label})})]},t.value))})})})};export{u as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{styled as t,Radio as e}from"@mui/material";import"react";import{omitProps as r}from"../../../utils/shouldForwardProp.js";import{iconSizeMap as s}from"../../BrandCore/Icon/Icon.js";import{space as i}from"../../BrandCore/primitiveVariables.js";const a=t(e,{shouldForwardProp:r("sizing")})(({theme:o,sizing:t})=>({padding:0,backgroundColor:o.custom.palette.input.default,border:`1px solid ${o.custom.palette.stroke.default}`,position:"relative",transition:o.custom.easing.input,flexShrink:0,height:"sm"===t?i[300]:i[400],width:"sm"===t?i[300]:i[400],"& svg":{transition:o.custom.easing.input,fill:"none",width:"sm"===t&&s.sm,height:"sm"===t&&s.sm},"&:before":{content:'""',position:"absolute",inset:0,borderRadius:o.custom.radius.round},"&:hover":{backgroundColor:o.custom.palette.input.default,"&:before":{backgroundColor:o.custom.palette.interaction.hover}},"&:active":{backgroundColor:o.custom.palette.input.default,borderColor:o.custom.palette.stroke.focus,boxShadow:o.custom.boxShadow.input.focus,"&:before":{backgroundColor:o.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,borderColor:o.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:o.custom.palette.icon.disabled}},"&.Mui-focusVisible":{borderColor:o.custom.palette.stroke.focus,boxShadow:o.custom.boxShadow.input.focus,"&:before":{backgroundColor:o.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:o.custom.palette.purple[500],"& svg":{"&:first-of-type":{fill:"transparent"},fill:o.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,borderColor:o.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:o.custom.palette.icon.disabled}}}})),l=({inputRef:t,slotProps:e,...r})=>o(a,{...r,slotProps:{...e,input:{...e?.input,ref:t}}});export{l as StyledRadio};
1
+ import{jsx as o}from"react/jsx-runtime";import{styled as t,Radio as e}from"@mui/material";import"react";import{omitProps as r}from"../../../utils/shouldForwardProp.js";import{iconSizeMap as i}from"../../BrandCore/Icon/Icon.js";import{space as s}from"../../BrandCore/primitiveVariables.js";const a=t(e,{shouldForwardProp:r("sizing")})(({theme:o,sizing:t})=>({padding:0,backgroundColor:o.custom.palette.input.default,border:`1px solid ${o.custom.palette.stroke.default}`,position:"relative",transition:o.custom.easing.input,flexShrink:0,height:"sm"===t?s[300]:s[400],width:"sm"===t?s[300]:s[400],"& svg":{transition:o.custom.easing.input,fill:"none",width:"sm"===t&&i.sm,height:"sm"===t&&i.sm},"&:before":{content:'""',position:"absolute",inset:0,borderRadius:o.custom.radius.round},"@media (hover: hover)":{"&:hover":{backgroundColor:o.custom.palette.input.default,"&:before":{backgroundColor:o.custom.palette.interaction.hover}}},"&:active":{backgroundColor:o.custom.palette.input.default,borderColor:o.custom.palette.stroke.focus,boxShadow:o.custom.boxShadow.input.focus,"&:before":{backgroundColor:o.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,borderColor:o.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:o.custom.palette.icon.disabled}},"&.Mui-focusVisible":{borderColor:o.custom.palette.stroke.focus,boxShadow:o.custom.boxShadow.input.focus,"&:before":{backgroundColor:o.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:o.custom.palette.purple[500],"& svg":{"&:first-of-type":{fill:"transparent"},fill:o.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:o.custom.palette.input.disabled,borderColor:o.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:o.custom.palette.icon.disabled}}}})),l=({inputRef:t,slotProps:e,...r})=>o(a,{...r,slotProps:{...e,input:{...e?.input,ref:t}}});export{l as StyledRadio};
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as o,jsx as r}from"react/jsx-runtime";import{RadioGroup as l,Box as a}from"@mui/material";import{useState as t,useRef as i,useEffect as n}from"react";import{base as u}from"../../BrandCore/primitiveVariables.js";import s from"../FormControlLabel/FormControlLabel.js";import c from"../Radio/Radio.js";import"../Radio/StyledRadio.js";import m from"../TextField/TextField.js";const p=({options:p,onChange:d,other:g,value:h,internalChange:f,sizing:b="lg",inputRef:v,noneOfTheseOption:y,...x})=>{const C=g?.enabled,R="other-option",M=`${R}-value-`,[T,j]=t(h),[S,F]=t(!1),k=i(null);n(()=>{!S&&T?.includes(M)?F(!0):S&&F(!1)},[T]);return n(()=>{k.current&&Array.from(k.current.getElementsByTagName("label")).forEach(e=>{if(e.clientHeight>4*u){const o=e.querySelector(".MuiTypography-root");o&&(o.style.marginTop=u/2+"px")}})},[k.current]),e(o,{children:[e(l,{...x,value:T,ref:k,sx:{"& .MuiRadio-root":{alignSelf:"baseline"},"& .MuiTypography-root":{alignSelf:"center"},display:"flex",alignSelf:"baseline",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"&:hover":{"& .MuiRadio-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}},onChange:(e,o)=>{d&&d(o),j(o),f&&f()},children:[p?p.map((e,o)=>r(s,{sx:{"& .MuiButtonBase-root.MuiRadio-root":{alignSelf:"baseline"}},...e,control:r(c,{sizing:b})},o)):null,C&&r(s,{label:g?.label||"Other",value:M,control:r(c,{sizing:b,checked:T?.includes(M)})},R),y&&r(s,{...y,control:r(c,{sizing:b})},y.value)]}),S&&r(a,{sx:{mt:1},children:r(m,{fullWidth:!0,autoFocus:!0,placeholder:g?.placeholder,defaultValue:T?.replace(M,""),onChange:e=>{var o;d&&d((o=e.target.value,`${M}${o}`)),f&&f()},required:!0})})]})};export{p as default};
1
+ import{jsxs as e,Fragment as o,jsx as r}from"react/jsx-runtime";import{RadioGroup as l,Box as a}from"@mui/material";import{useState as i,useRef as t,useEffect as n}from"react";import{base as u}from"../../BrandCore/primitiveVariables.js";import s from"../FormControlLabel/FormControlLabel.js";import c from"../Radio/Radio.js";import"../Radio/StyledRadio.js";import m from"../TextField/TextField.js";const d=({options:d,onChange:p,other:h,value:g,internalChange:f,sizing:b="lg",inputRef:v,noneOfTheseOption:y,...x})=>{const C=h?.enabled,R="other-option",M=`${R}-value-`,[T,j]=i(g),[S,F]=i(!1),k=t(null);n(()=>{!S&&T?.includes(M)?F(!0):S&&F(!1)},[T]);return n(()=>{k.current&&Array.from(k.current.getElementsByTagName("label")).forEach(e=>{if(e.clientHeight>4*u){const o=e.querySelector(".MuiTypography-root");o&&(o.style.marginTop=u/2+"px")}})},[k.current]),e(o,{children:[e(l,{...x,value:T,ref:k,sx:{"& .MuiRadio-root":{alignSelf:"baseline"},"& .MuiTypography-root":{alignSelf:"center"},display:"flex",alignSelf:"baseline",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"@media (hover: hover)":{"&:hover":{"& .MuiRadio-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}}},onChange:(e,o)=>{p&&p(o),j(o),f&&f()},children:[d?d.map((e,o)=>r(s,{sx:{"& .MuiButtonBase-root.MuiRadio-root":{alignSelf:"baseline"}},...e,control:r(c,{sizing:b})},o)):null,C&&r(s,{label:h?.label||"Other",value:M,control:r(c,{sizing:b,checked:T?.includes(M)})},R),y&&r(s,{...y,control:r(c,{sizing:b})},y.value)]}),S&&r(a,{sx:{mt:1},children:r(m,{fullWidth:!0,autoFocus:!0,placeholder:h?.placeholder,defaultValue:T?.replace(M,""),onChange:e=>{var o;p&&p((o=e.target.value,`${M}${o}`)),f&&f()},required:!0})})]})};export{d as default};
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"@mui/material";import{iconSizeMap as t}from"../../BrandCore/Icon/Icon.js";import{getButtonSizing as i}from"../ButtonBase/Button.variant-helpers.js";import"../ButtonBase/ButtonBase.js";import{fontSizemap as o}from"../utils/typography.util.js";const e="0px 4px 8px 0px #06040D14, 0px 16px 24px 0px #06040D14, 0px 0px 4px 2px #06040D0A, 0px 0px 0px 1px #FFFFFF29",n=t=>{switch(t){case"xs":return 24;case"sm":case"md":return 32;case"lg":default:return 40;case"xl":return 48}},s=t=>{switch(t){case"xs":case"sm":case"md":return 16;case"lg":default:return 24;case"xl":return 28}},a=(t,i)=>{switch(i){case"xs":case"sm":case"md":return{paddingLeft:t.spacing(t.custom.padding.xs),paddingRight:t.spacing(t.custom.padding.md)};default:return{paddingLeft:t.spacing(t.custom.padding.sm),paddingRight:t.spacing(t.custom.padding.lg)}}},c=(t,i)=>({"& .MuiTypography-root":{overflow:"hidden",textOverflow:"ellipsis",fontSize:o[i],paddingLeft:t.spacing("xs"===i?t.custom.padding.xs:t.custom.padding.sm),paddingRight:t.spacing("xs"===i?t.custom.padding.xs:t.custom.padding.sm)}}),r=(t,i)=>({fontSize:o[i],borderRadius:t.spacing(t.custom.radius.md),position:"relative",padding:0,"& .MuiSelect-outlined":{padding:0},"& .MuiSelect-select.MuiInputBase-input":{height:"100%",display:"flex",alignItems:"center",...a(t,i),width:"100%"},"&:before":{transition:t.custom.easing.input,content:'""',position:"absolute",background:t.custom.palette.interaction.none,borderRadius:t.spacing(t.custom.radius.md),inset:0,zIndex:0},"&:hover:before":{backgroundColor:t.custom.palette.interaction.hover},"&.Mui-focused:before":{backgroundColor:t.custom.palette.interaction.press},"&.Mui-disabled:before":{backgroundColor:t.custom.palette.interaction.none},"& .MuiSelect-select":{position:"relative"}}),p=(o,e)=>{switch(e){case"xl":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.xl,height:t.xl,top:`calc(50% - ${t.xl/2}px)`}};case"lg":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.lg,height:t.lg,top:`calc(50% - ${t.lg/2}px)`}};case"md":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.md,height:t.md,top:`calc(50% - ${t.md/2}px)`}};case"sm":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.sm,height:t.sm,top:`calc(50% - ${t.sm/2}px)`}};case"xs":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.xs,height:t.xs,top:`calc(50% - ${t.xs/2}px)`}};default:return{...i("lg"),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.lg,height:t.lg,top:`calc(50% - ${t.lg/2}px)`}}}},u=(t,i)=>({position:"relative",fontSize:o[i],backgroundColor:t.custom.palette.interaction.none,color:t.custom.palette.text.primary,minHeight:n(i),justifyContent:"space-between",paddingLeft:t.spacing("xs"===i?t.custom.padding.sm:t.custom.padding.md),paddingRight:t.spacing("xs"===i?t.custom.padding.sm:t.custom.padding.md),gap:t.spacing(t.custom.padding.sm),whiteSpace:"wrap","& .MuiSvgIcon-root":{width:s(i),height:s(i)}});export{a as getInputPadding,p as getInputSize,c as getTypographyStyle,e as popperBoxShadow,r as selectBaseStyles,u as selectItemBaseStyles,n as selectMenuItemSize,s as selectTickSize};
1
+ import"react/jsx-runtime";import"@mui/material";import{iconSizeMap as t}from"../../BrandCore/Icon/Icon.js";import{getButtonSizing as i}from"../ButtonBase/Button.variant-helpers.js";import"../ButtonBase/ButtonBase.js";import{fontSizemap as o}from"../utils/typography.util.js";const e="0px 4px 8px 0px #06040D14, 0px 16px 24px 0px #06040D14, 0px 0px 4px 2px #06040D0A, 0px 0px 0px 1px #FFFFFF29",n=t=>{switch(t){case"xs":return 24;case"sm":case"md":return 32;case"lg":default:return 40;case"xl":return 48}},s=t=>{switch(t){case"xs":case"sm":case"md":return 16;case"lg":default:return 24;case"xl":return 28}},a=(t,i)=>{switch(i){case"xs":case"sm":case"md":return{paddingLeft:t.spacing(t.custom.padding.xs),paddingRight:t.spacing(t.custom.padding.md)};default:return{paddingLeft:t.spacing(t.custom.padding.sm),paddingRight:t.spacing(t.custom.padding.lg)}}},c=(t,i)=>({"& .MuiTypography-root":{overflow:"hidden",textOverflow:"ellipsis",fontSize:o[i],paddingLeft:t.spacing("xs"===i?t.custom.padding.xs:t.custom.padding.sm),paddingRight:t.spacing("xs"===i?t.custom.padding.xs:t.custom.padding.sm)}}),r=(t,i)=>({fontSize:o[i],borderRadius:t.spacing(t.custom.radius.md),position:"relative",padding:0,"& .MuiSelect-outlined":{padding:0},"& .MuiSelect-select.MuiInputBase-input":{height:"100%",display:"flex",alignItems:"center",...a(t,i),width:"100%"},"&:before":{transition:t.custom.easing.input,content:'""',position:"absolute",background:t.custom.palette.interaction.none,borderRadius:t.spacing(t.custom.radius.md),inset:0,zIndex:0},"@media (hover: hover)":{"&:hover:before":{backgroundColor:t.custom.palette.interaction.hover}},"&.Mui-focused:before":{backgroundColor:t.custom.palette.interaction.press},"&.Mui-disabled:before":{backgroundColor:t.custom.palette.interaction.none},"& .MuiSelect-select":{position:"relative"}}),p=(o,e)=>{switch(e){case"xl":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.xl,height:t.xl,top:`calc(50% - ${t.xl/2}px)`}};case"lg":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.lg,height:t.lg,top:`calc(50% - ${t.lg/2}px)`}};case"md":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.md,height:t.md,top:`calc(50% - ${t.md/2}px)`}};case"sm":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.sm,height:t.sm,top:`calc(50% - ${t.sm/2}px)`}};case"xs":return{...i(e),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.xs,height:t.xs,top:`calc(50% - ${t.xs/2}px)`}};default:return{...i("lg"),"& .MuiSvgIcon-root":{color:o.custom.palette.icon.primary,transition:o.custom.easing.input,width:t.lg,height:t.lg,top:`calc(50% - ${t.lg/2}px)`}}}},u=(t,i)=>({position:"relative",fontSize:o[i],backgroundColor:t.custom.palette.interaction.none,color:t.custom.palette.text.primary,minHeight:n(i),justifyContent:"space-between",paddingLeft:t.spacing("xs"===i?t.custom.padding.sm:t.custom.padding.md),paddingRight:t.spacing("xs"===i?t.custom.padding.sm:t.custom.padding.md),gap:t.spacing(t.custom.padding.sm),whiteSpace:"wrap","& .MuiSvgIcon-root":{width:s(i),height:s(i)}});export{a as getInputPadding,p as getInputSize,c as getTypographyStyle,e as popperBoxShadow,r as selectBaseStyles,u as selectItemBaseStyles,n as selectMenuItemSize,s as selectTickSize};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material");require("react");var r=require("../../../utils/shouldForwardProp.js"),o=require("../ButtonBase/Button.variant-helpers.js"),i=require("../ButtonBase/ButtonBase.js");const a=t.styled(i,{shouldForwardProp:r.omitProps("variation","destructive","sizing")})(({theme:e,variation:t,sizing:r,destructive:i})=>({color:e.custom.palette.text.primary,...r&&{...o.getButtonTypography(r)},...r&&{...o.getButtonSizing(r)},...r&&{...o.getIconSizing(r)},...o.buttonPadding(),"&:hover:before":{backgroundColor:e.custom.palette.interaction.hover},"&:focus:before":{backgroundColor:e.custom.palette.interaction.hover},"&:active:before":{backgroundColor:e.custom.palette.interaction.press},..."subtle"===t&&{...o.subtle(e,i)},..."outlined"===t&&{...o.outlined(e,i)},..."secondary"===t&&{...o.secondary(e,i)},..."primary"===t&&{...o.primary(e,i)},"&.Mui-disabled, &.Mui-disabled:hover":{backgroundColor:e.custom.palette.interaction.disabled,color:e.custom.palette.text.disabled,"&:before":{backgroundColor:"transparent"}}}));module.exports=({sizing:t="lg",variation:r="primary",...o})=>e.jsx(a,{variation:r,sizing:t,...o});
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material");require("react");var t=require("../../../utils/shouldForwardProp.js"),o=require("../ButtonBase/Button.variant-helpers.js"),i=require("../ButtonBase/ButtonBase.js");const a=r.styled(i,{shouldForwardProp:t.omitProps("variation","destructive","sizing")})(({theme:e,variation:r,sizing:t,destructive:i})=>({color:e.custom.palette.text.primary,...t&&{...o.getButtonTypography(t)},...t&&{...o.getButtonSizing(t)},...t&&{...o.getIconSizing(t)},...o.buttonPadding(),"@media (hover: hover)":{"&:hover:before":{backgroundColor:e.custom.palette.interaction.hover}},"&:focus-visible:before":{backgroundColor:e.custom.palette.interaction.hover},"&:active:before":{backgroundColor:e.custom.palette.interaction.press},..."subtle"===r&&{...o.subtle(e,i)},..."outlined"===r&&{...o.outlined(e,i)},..."secondary"===r&&{...o.secondary(e,i)},..."primary"===r&&{...o.primary(e,i)},"&.Mui-disabled, &.Mui-disabled:hover":{backgroundColor:e.custom.palette.interaction.disabled,color:e.custom.palette.text.disabled,"&:before":{backgroundColor:"transparent"}}}));module.exports=({sizing:r="lg",variation:t="primary",...o})=>e.jsx(a,{variation:t,sizing:r,...o});
@@ -19,8 +19,10 @@ declare const outlined: (theme: Theme, destructive?: boolean) => {
19
19
  '&:focus:before': {
20
20
  boxShadow: string;
21
21
  };
22
- '&:hover': {
23
- backgroundColor: string;
22
+ '@media (hover: hover)': {
23
+ '&:hover': {
24
+ backgroundColor: string;
25
+ };
24
26
  };
25
27
  '&:focus-visible': {
26
28
  boxShadow: string;
@@ -38,8 +40,10 @@ declare const secondary: (theme: Theme, destructive?: boolean) => {
38
40
  '&:focus:before': {
39
41
  boxShadow: string;
40
42
  };
41
- '&:hover': {
42
- backgroundColor: string;
43
+ '@media (hover: hover)': {
44
+ '&:hover': {
45
+ backgroundColor: string;
46
+ };
43
47
  };
44
48
  '&:focus-visible': {
45
49
  boxShadow: string;
@@ -54,11 +58,13 @@ declare const primary: (theme: Theme, destructive?: boolean) => {
54
58
  '&:focus:before': {
55
59
  boxShadow: string;
56
60
  };
57
- '&:hover': {
58
- backgroundColor: string;
59
- color: string;
60
- '&::before': {
61
+ '@media (hover: hover)': {
62
+ '&:hover': {
61
63
  backgroundColor: string;
64
+ color: string;
65
+ '&::before': {
66
+ backgroundColor: string;
67
+ };
62
68
  };
63
69
  };
64
70
  '&:focus-visible': {
@@ -1 +1 @@
1
- "use strict";require("react/jsx-runtime"),require("@mui/material");var e=require("../../BrandCore/Icon/Icon.js"),t=require("../../BrandCore/primitiveVariables.js"),o=require("../utils/typography.util.js");const r=(e,t)=>({backgroundColor:e.custom.palette.interaction.none,color:t?e.custom.palette.text.negative:e.custom.palette.text.primary,fontWeight:300,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus}}),a={xs:3*t.base,sm:3.5*t.base,md:4*t.base,lg:5*t.base,xl:6*t.base,xxl:7*t.base,xxxl:8*t.base},s={xs:.5*t.base,sm:.5*t.base,md:t.base,lg:t.base,xl:t.base,xxl:t.base,xxxl:t.base};exports.buttonHeightMap=a,exports.buttonInteraction=(e,t)=>({cursor:"pointer","&:hover":{backgroundColor:e.custom.palette.interaction.hover},"&:focus":{backgroundColor:e.custom.palette.interaction.hover},"&:active":{backgroundColor:e.custom.palette.interaction.press},"&:disabled":{backgroundColor:e.custom.palette.interaction.disabled,color:e.custom.palette.text.disabled},...t&&{backgroundColor:e.custom.palette.interaction.press,"&:hover":{backgroundColor:e.custom.palette.interaction.press},"&:focus":{backgroundColor:e.custom.palette.interaction.press},"&:active":{backgroundColor:e.custom.palette.interaction.press}},...r(e,!1)}),exports.buttonPadding=()=>({paddingLeft:t.base,paddingRight:t.base}),exports.getButtonSizing=e=>({height:a[e]}),exports.getButtonTypography=e=>({"& .MuiBox-root":{lineHeight:"120%",fontSize:o.fontSizemap[e],paddingLeft:s[e],paddingRight:s[e]}}),exports.getIconSizing=t=>({"& .MuiButton-icon":{margin:0,".MuiSvgIcon-root":{height:e.iconSizeMap[t],width:e.iconSizeMap[t]}},"& .MuiSvgIcon-root":{height:e.iconSizeMap[t],width:e.iconSizeMap[t]}}),exports.outlined=(e,t)=>({backgroundColor:e.custom.palette.surface.raised,color:t?e.custom.palette.text.negative:e.custom.palette.text.primary,border:`1px solid ${e.custom.palette.stroke.default}`,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"&:hover":{backgroundColor:e.custom.palette.surface.raised},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus},"&:active":{backgroundColor:e.custom.palette.surface.raised},"&:disabled":{border:`1px solid ${e.custom.palette.stroke.disabled}`}}),exports.primary=(e,t)=>({backgroundColor:t?e.custom.palette.red[500]:e.custom.palette.purple[500],color:e.custom.palette.text.lockedWhite,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"&:hover":{backgroundColor:t?e.custom.palette.red[500]:e.custom.palette.purple[500],color:e.custom.palette.text.lockedWhite,"&::before":{backgroundColor:e.custom.palette.interaction.hoverOnDark}},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus,"&::before":{backgroundColor:e.custom.palette.interaction.hoverOnDark}},"&:active":{backgroundColor:t?e.custom.palette.red[500]:e.custom.palette.purple[500],color:e.custom.palette.text.lockedWhite,"&::before":{backgroundColor:e.custom.palette.interaction.pressOnDark}}}),exports.secondary=(e,t)=>({backgroundColor:t?e.custom.palette.red[0]:e.custom.palette.purple[0],color:t?e.custom.palette.text.negative:e.custom.palette.text.primary,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"&:hover":{backgroundColor:t?e.custom.palette.red[0]:e.custom.palette.purple[0]},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus},"&:active":{backgroundColor:t?e.custom.palette.red[0]:e.custom.palette.purple[0]}}),exports.subtle=r;
1
+ "use strict";require("react/jsx-runtime"),require("@mui/material");var e=require("../../BrandCore/Icon/Icon.js"),t=require("../../BrandCore/primitiveVariables.js"),o=require("../utils/typography.util.js");const r=(e,t)=>({backgroundColor:e.custom.palette.interaction.none,color:t?e.custom.palette.text.negative:e.custom.palette.text.primary,fontWeight:300,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus}}),a={xs:3*t.base,sm:3.5*t.base,md:4*t.base,lg:5*t.base,xl:6*t.base,xxl:7*t.base,xxxl:8*t.base},s={xs:.5*t.base,sm:.5*t.base,md:t.base,lg:t.base,xl:t.base,xxl:t.base,xxxl:t.base};exports.buttonHeightMap=a,exports.buttonInteraction=(e,t)=>({cursor:"pointer","&:hover":{backgroundColor:e.custom.palette.interaction.hover},"&:focus":{backgroundColor:e.custom.palette.interaction.hover},"&:active":{backgroundColor:e.custom.palette.interaction.press},"&:disabled":{backgroundColor:e.custom.palette.interaction.disabled,color:e.custom.palette.text.disabled},...t&&{backgroundColor:e.custom.palette.interaction.press,"&:hover":{backgroundColor:e.custom.palette.interaction.press},"&:focus":{backgroundColor:e.custom.palette.interaction.press},"&:active":{backgroundColor:e.custom.palette.interaction.press}},...r(e,!1)}),exports.buttonPadding=()=>({paddingLeft:t.base,paddingRight:t.base}),exports.getButtonSizing=e=>({height:a[e]}),exports.getButtonTypography=e=>({"& .MuiBox-root":{lineHeight:"120%",fontSize:o.fontSizemap[e],paddingLeft:s[e],paddingRight:s[e]}}),exports.getIconSizing=t=>({"& .MuiButton-icon":{margin:0,".MuiSvgIcon-root":{height:e.iconSizeMap[t],width:e.iconSizeMap[t]}},"& .MuiSvgIcon-root":{height:e.iconSizeMap[t],width:e.iconSizeMap[t]}}),exports.outlined=(e,t)=>({backgroundColor:e.custom.palette.surface.raised,color:t?e.custom.palette.text.negative:e.custom.palette.text.primary,border:`1px solid ${e.custom.palette.stroke.default}`,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover":{backgroundColor:e.custom.palette.surface.raised}},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus},"&:active":{backgroundColor:e.custom.palette.surface.raised},"&:disabled":{border:`1px solid ${e.custom.palette.stroke.disabled}`}}),exports.primary=(e,t)=>({backgroundColor:t?e.custom.palette.red[500]:e.custom.palette.purple[500],color:e.custom.palette.text.lockedWhite,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover":{backgroundColor:t?e.custom.palette.red[500]:e.custom.palette.purple[500],color:e.custom.palette.text.lockedWhite,"&::before":{backgroundColor:e.custom.palette.interaction.hoverOnDark}}},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus,"&::before":{backgroundColor:e.custom.palette.interaction.hoverOnDark}},"&:active":{backgroundColor:t?e.custom.palette.red[500]:e.custom.palette.purple[500],color:e.custom.palette.text.lockedWhite,"&::before":{backgroundColor:e.custom.palette.interaction.pressOnDark}}}),exports.secondary=(e,t)=>({backgroundColor:t?e.custom.palette.red[0]:e.custom.palette.purple[0],color:t?e.custom.palette.text.negative:e.custom.palette.text.primary,"&:focus:before":{boxShadow:e.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover":{backgroundColor:t?e.custom.palette.red[0]:e.custom.palette.purple[0]}},"&:focus-visible":{boxShadow:e.custom.boxShadow.input.focus},"&:active":{backgroundColor:t?e.custom.palette.red[0]:e.custom.palette.purple[0]}}),exports.subtle=r;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),o=require("@mui/icons-material"),t=require("@mui/material");require("react");var i=require("../../../utils/shouldForwardProp.js"),s=require("../../BrandCore/Icon/Icon.js"),a=require("../../BrandCore/primitiveVariables.js");const u=t.styled(t.Checkbox,{shouldForwardProp:i.omitProps("sizing","variant")})(({theme:e,sizing:o,variant:t})=>({height:"default"===o?a.space[300]:a.space[400],width:"default"===o?a.space[300]:a.space[400],padding:0,flex:"none",borderRadius:e.spacing(e.custom.radius.sm),border:"none",boxShadow:`0px 0px 0px 0px ${e.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${e.custom.palette.stroke.default}`,backgroundColor:e.custom.palette.input.default,position:"relative",transition:`${e.custom.easing.input}`,"& svg":{transition:e.custom.easing.input,fill:"none",width:"default"===o?s.iconSizeMap.sm:s.iconSizeMap.xl,height:"default"===o?s.iconSizeMap.sm:s.iconSizeMap.xl},"&:before":{content:'""',position:"absolute",inset:0},"&:hover":{backgroundColor:e.custom.palette.input.default,"&:before":{borderRadius:e.spacing(e.custom.radius.sm),backgroundColor:e.custom.palette.interaction.hover}},"&:active":{backgroundColor:e.custom.palette.input.default,boxShadow:`${e.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${e.custom.palette.stroke.focus}`,"&:before":{borderRadius:e.spacing(e.custom.radius.sm),backgroundColor:e.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${e.custom.palette.stroke.disabled}`},"&.Mui-checked":{backgroundColor:e.custom.palette.purple[500],"& svg":{fill:e.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,"& svg":{fill:e.custom.palette.icon.disabled}}},"&.MuiCheckbox-indeterminate":{backgroundColor:e.custom.palette.purple[500],"& svg":{fill:e.custom.palette.icon.lockedWhite}},"&.Mui-focusVisible":{boxShadow:`${e.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${e.custom.palette.stroke.focus}`,"&:before":{backgroundColor:e.custom.palette.interaction.press}},..."secondary"===t?{boxShadow:`0px 0px 0px 0px ${e.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${e.custom.palette.blue[500]}`,"&:hover":{backgroundColor:e.custom.palette.blue[0]},"&:active":{backgroundColor:e.custom.palette.input.default,boxShadow:`${e.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${e.custom.palette.blue[500]}`,"&:before":{borderRadius:e.spacing(e.custom.radius.sm),backgroundColor:e.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:e.custom.palette.blue[0],"& svg":{fill:e.custom.palette.icon.primary}},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${e.custom.palette.stroke.disabled}`},"&.MuiCheckbox-indeterminate":{backgroundColor:e.custom.palette.blue[0],"& svg":{fill:e.custom.palette.icon.primary}}}:void 0}));module.exports=({inputRef:t,slotProps:i,...s})=>e.jsx(u,{checkedIcon:e.jsx(o.Check,{}),indeterminateIcon:e.jsx(o.Remove,{}),...s,slotProps:{...i,input:{...i?.input,ref:t}},disableFocusRipple:!0});
1
+ "use strict";var e=require("react/jsx-runtime"),o=require("@mui/icons-material"),t=require("@mui/material");require("react");var i=require("../../../utils/shouldForwardProp.js"),a=require("../../BrandCore/Icon/Icon.js"),s=require("../../BrandCore/primitiveVariables.js");const r=t.styled(t.Checkbox,{shouldForwardProp:i.omitProps("sizing","variant")})(({theme:e,sizing:o,variant:t})=>({height:"default"===o?s.space[300]:s.space[400],width:"default"===o?s.space[300]:s.space[400],padding:0,flex:"none",borderRadius:e.spacing(e.custom.radius.sm),border:"none",boxShadow:`0px 0px 0px 0px ${e.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${e.custom.palette.stroke.default}`,backgroundColor:e.custom.palette.input.default,position:"relative",transition:`${e.custom.easing.input}`,"& svg":{transition:e.custom.easing.input,fill:"none",width:"default"===o?a.iconSizeMap.sm:a.iconSizeMap.xl,height:"default"===o?a.iconSizeMap.sm:a.iconSizeMap.xl},"&:before":{content:'""',position:"absolute",inset:0},"@media (hover: hover)":{"&:hover":{backgroundColor:e.custom.palette.input.default,"&:before":{borderRadius:e.spacing(e.custom.radius.sm),backgroundColor:e.custom.palette.interaction.hover}}},"&:active":{backgroundColor:e.custom.palette.input.default,boxShadow:`${e.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${e.custom.palette.stroke.focus}`,"&:before":{borderRadius:e.spacing(e.custom.radius.sm),backgroundColor:e.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${e.custom.palette.stroke.disabled}`},"&.Mui-checked":{backgroundColor:e.custom.palette.purple[500],"& svg":{fill:e.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,"& svg":{fill:e.custom.palette.icon.disabled}}},"&.MuiCheckbox-indeterminate":{backgroundColor:e.custom.palette.purple[500],"& svg":{fill:e.custom.palette.icon.lockedWhite}},"&.Mui-focusVisible":{boxShadow:`${e.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${e.custom.palette.stroke.focus}`,"&:before":{backgroundColor:e.custom.palette.interaction.press}},..."secondary"===t?{boxShadow:`0px 0px 0px 0px ${e.custom.palette.interaction.none}, inset 0px 0px 0px 1px ${e.custom.palette.blue[500]}`,"@media (hover: hover)":{"&:hover":{backgroundColor:e.custom.palette.blue[0]}},"&:active":{backgroundColor:e.custom.palette.input.default,boxShadow:`${e.custom.boxShadow.input.focus}, inset 0px 0px 0px 1px ${e.custom.palette.blue[500]}`,"&:before":{borderRadius:e.spacing(e.custom.radius.sm),backgroundColor:e.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:e.custom.palette.blue[0],"& svg":{fill:e.custom.palette.icon.primary}},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,boxShadow:`inset 0px 0px 0px 1px ${e.custom.palette.stroke.disabled}`},"&.MuiCheckbox-indeterminate":{backgroundColor:e.custom.palette.blue[0],"& svg":{fill:e.custom.palette.icon.primary}}}:void 0}));module.exports=({inputRef:t,slotProps:i,...a})=>e.jsx(r,{checkedIcon:e.jsx(o.Check,{}),indeterminateIcon:e.jsx(o.Remove,{}),...a,slotProps:{...i,input:{...i?.input,ref:t}},disableFocusRipple:!0});
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),l=require("@mui/material"),i=require("react"),t=require("../FormControlLabel/FormControlLabel.js"),n=require("../Checkbox/StyledCheckbox.js"),r=require("../TextField/TextField.js");module.exports=({sizing:o,options:s,other:a,internalChange:u,value:c,inputRef:d,onChange:h,maxSelections:x,noneOfTheseOption:b})=>{const m=a?.name||"other-option",p=b?.value||"none-of-these-option",f=`${m}-value-`,g=e=>`${f}${e}`,j=a?.enabled,v=c?.includes(m)&&j,C=c?.find(e=>e.includes(f)),k=i.useMemo(()=>c?c.filter(e=>!e.startsWith(f)).length:0,[c,f]),q=!!x&&k>=x;if(!c)return e.jsx("div",{});const F=(e,l)=>{const i=c.includes(e);if(!i&&q&&!l)return;let t;i?t=c.filter(l=>l!==e):l?t=[e]:(t=[...new Set(c),e],t=t.filter(e=>!s.find(l=>l?.exclusive&&e===l.value)),b&&(t=t.filter(e=>e!==p))),a?.enabled&&(l?t=t.filter(e=>e!==m&&!e.includes(f)):e===m&&i&&(t=t.filter(e=>!e.includes(f)))),h(t),u&&u()},M=(e,l)=>!l&&(q&&!c.includes(e));return e.jsxs(e.Fragment,{children:[e.jsxs(l.FormGroup,{sx:{display:"flex",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"&:not(.Mui-disabled):hover":{"& .MuiCheckbox-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}},children:[s?.map(l=>{const i=l.value,r=M(i,l.exclusive);return e.jsx(t,{sx:{"& .MuiButtonBase-root.MuiCheckbox-root":{alignSelf:"baseline"},"& .MuiTypography-root":{mt:0}},onChange:()=>F(i,l.exclusive),checked:c.includes(i),disabled:r,control:e.jsx(n,{sizing:o,disabled:r}),label:l.label},i)}),j&&e.jsx(t,{inputRef:d,onChange:()=>F(m),label:a?.label||"Other",checked:c.includes(m),disabled:M(m),control:e.jsx(n,{sizing:o})},m),b&&e.jsx(t,{onChange:()=>F(p,!0),checked:c.includes(p),control:e.jsx(n,{sizing:o}),label:b.label},p)]}),v&&e.jsx(l.Box,{sx:{mt:1},children:e.jsx(r,{fullWidth:!0,autoFocus:!0,defaultValue:C?C.replace(f,""):"",placeholder:a?.placeholder,onChange:e=>{const l=c.find(e=>e.includes(f)),i=(l?c.map(l=>l.includes(f)?g(e.target.value):l):[...c,g(e.target.value)]).filter(e=>e!==f);h(i),u&&u()},required:!0})})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),l=require("@mui/material"),i=require("react"),t=require("../FormControlLabel/FormControlLabel.js"),n=require("../Checkbox/StyledCheckbox.js"),r=require("../TextField/TextField.js");module.exports=({sizing:o,options:s,other:a,internalChange:u,value:c,inputRef:d,onChange:h,maxSelections:x,noneOfTheseOption:b})=>{const m=a?.name||"other-option",p=b?.value||"none-of-these-option",f=`${m}-value-`,g=e=>`${f}${e}`,v=a?.enabled,j=c?.includes(m)&&v,C=c?.find(e=>e.includes(f)),k=i.useMemo(()=>c?c.filter(e=>!e.startsWith(f)).length:0,[c,f]),q=!!x&&k>=x;if(!c)return e.jsx("div",{});const F=(e,l)=>{const i=c.includes(e);if(!i&&q&&!l)return;let t;i?t=c.filter(l=>l!==e):l?t=[e]:(t=[...new Set(c),e],t=t.filter(e=>!s.find(l=>l?.exclusive&&e===l.value)),b&&(t=t.filter(e=>e!==p))),a?.enabled&&(l?t=t.filter(e=>e!==m&&!e.includes(f)):e===m&&i&&(t=t.filter(e=>!e.includes(f)))),h(t),u&&u()},M=(e,l)=>!l&&(q&&!c.includes(e));return e.jsxs(e.Fragment,{children:[e.jsxs(l.FormGroup,{sx:{display:"flex",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"@media (hover: hover)":{"&:not(.Mui-disabled):hover":{"& .MuiCheckbox-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}}},children:[s?.map(l=>{const i=l.value,r=M(i,l.exclusive);return e.jsx(t,{sx:{"& .MuiButtonBase-root.MuiCheckbox-root":{alignSelf:"baseline"},"& .MuiTypography-root":{mt:0}},onChange:()=>F(i,l.exclusive),checked:c.includes(i),disabled:r,control:e.jsx(n,{sizing:o,disabled:r}),label:l.label},i)}),v&&e.jsx(t,{inputRef:d,onChange:()=>F(m),label:a?.label||"Other",checked:c.includes(m),disabled:M(m),control:e.jsx(n,{sizing:o})},m),b&&e.jsx(t,{onChange:()=>F(p,!0),checked:c.includes(p),control:e.jsx(n,{sizing:o}),label:b.label},p)]}),j&&e.jsx(l.Box,{sx:{mt:1},children:e.jsx(r,{fullWidth:!0,autoFocus:!0,defaultValue:C?C.replace(f,""):"",placeholder:a?.placeholder,onChange:e=>{const l=c.find(e=>e.includes(f)),i=(l?c.map(l=>l.includes(f)?g(e.target.value):l):[...c,g(e.target.value)]).filter(e=>e!==f);h(i),u&&u()},required:!0})})]})};
@@ -1 +1 @@
1
- "use strict";var o=require("../../BrandCore/primitiveVariables.js");const e={xs:3*o.base,sm:3.5*o.base,md:4*o.base,lg:5*o.base,xl:6*o.base},t={xs:2*o.base,sm:2*o.base,md:2*o.base,lg:2.5*o.base,xl:3*o.base};exports.IconSizeMap=t,exports.buttonSizeMap=e,exports.defaultStyle=o=>({backgroundColor:o.custom.palette.interaction.none,color:o.custom.palette.icon.primary}),exports.elevated=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.overlay,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),exports.getIconButtonRadius=(o,e)=>({borderRadius:"default"===o?e.spacing(e.custom.radius.md):e.custom.radius.round}),exports.getIconButtonSizing=o=>({height:e[o],width:e[o]}),exports.getIconSizing=o=>({height:t[o],width:t[o]}),exports.outlined=o=>({backgroundColor:o.custom.palette.surface.raised,border:`1px solid ${o.custom.palette.stroke.default}`,color:o.custom.palette.icon.primary,"&.MuiIconButton-root:disabled":{border:"none"}}),exports.raised=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.raised,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),exports.toggle=(o,e)=>({"&.MuiButtonBase-root":{color:e?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,backgroundColor:e?o.custom.palette[e][500]:o.custom.palette.purple[100],"&:focus:before":{backgroundColor:"none"},"&:hover:before":{backgroundColor:o.custom.palette.interaction.hoverOnDark},"&:active:before":{backgroundColor:o.custom.palette.interaction.pressOnDark},"&:focus-visible:before":{backgroundColor:o.custom.palette.surface.transparent},"&.Mui-disabled":{backgroundColor:o.custom.palette.interaction.disabled,"&:before":{color:o.custom.palette.icon.disabled}}}});
1
+ "use strict";var o=require("../../BrandCore/primitiveVariables.js");const e={xs:3*o.base,sm:3.5*o.base,md:4*o.base,lg:5*o.base,xl:6*o.base},t={xs:2*o.base,sm:2*o.base,md:2*o.base,lg:2.5*o.base,xl:3*o.base};exports.IconSizeMap=t,exports.buttonSizeMap=e,exports.defaultStyle=o=>({backgroundColor:o.custom.palette.interaction.none,color:o.custom.palette.icon.primary}),exports.elevated=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.overlay,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),exports.getIconButtonRadius=(o,e)=>({borderRadius:"default"===o?e.spacing(e.custom.radius.md):e.custom.radius.round}),exports.getIconButtonSizing=o=>({height:e[o],width:e[o]}),exports.getIconSizing=o=>({height:t[o],width:t[o]}),exports.outlined=o=>({backgroundColor:o.custom.palette.surface.raised,border:`1px solid ${o.custom.palette.stroke.default}`,color:o.custom.palette.icon.primary,"&.MuiIconButton-root:disabled":{border:"none"}}),exports.raised=o=>({backgroundColor:o.custom.palette.surface.raised,boxShadow:o.custom.elevation.raised,color:o.custom.palette.icon.primary,"&:focus-visible:after":{boxShadow:o.custom.boxShadow.input.focus},"&.MuiIconButton-root:disabled":{boxShadow:"none"}}),exports.toggle=(o,e)=>({"&.MuiButtonBase-root":{color:e?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,backgroundColor:e?o.custom.palette[e][500]:o.custom.palette.purple[100],"&:focus:before":{backgroundColor:"none"},"@media (hover: hover)":{"&:hover:before":{backgroundColor:o.custom.palette.interaction.hoverOnDark}},"&:active:before":{backgroundColor:o.custom.palette.interaction.pressOnDark},"&:focus-visible:before":{backgroundColor:o.custom.palette.surface.transparent},"&.Mui-disabled":{backgroundColor:o.custom.palette.interaction.disabled,"&:before":{color:o.custom.palette.icon.disabled}}}});
@@ -1 +1 @@
1
- "use strict";var o=require("react/jsx-runtime"),e=require("@mui/material"),t=require("react"),i=require("../../../utils/shouldForwardProp.js"),r=require("./IconButton.variant-helpers.js");const n=e.styled(e.IconButton,{shouldForwardProp:i.omitProps("variation","shape","sizing","toggleColor")})(({theme:o,variation:e,shape:t="default",sizing:i,toggleColor:n})=>({boxSizing:"border-box",transition:"all 200ms ease",overflow:"hidden","&::before":{content:'""',backgroundColor:"transparent",transition:"all 200ms ease",position:"absolute",inset:0,zIndex:1},...t&&{...r.getIconButtonRadius(t,o)},...i&&{...r.getIconButtonSizing(i)},"&.MuiIconButton-root":{"&:focus:before":{backgroundColor:o.custom.palette.interaction.none},"&:hover:before":{backgroundColor:o.custom.palette.interaction.hover},"&:active:before":{backgroundColor:o.custom.palette.interaction.press},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&.Mui-disabled":{"&:before":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.icon.disabled},"& .MuiSvgIcon-root":{fill:o.custom.palette.icon.disabled,"& path":{fill:"inherit"}}},"& .MuiSvgIcon-root":{fill:n?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,...i&&{...r.getIconSizing(i)},position:"relative",zIndex:2},..."default"===e&&{...r.defaultStyle(o)},..."toggle"===e&&{...r.toggle(o,n)},..."outlined"===e&&{...r.outlined(o)},..."raised"===e&&{...r.raised(o)},..."elevated"===e&&{...r.elevated(o)},...t&&{...r.getIconButtonRadius(t,o)}}})),a=t.forwardRef((e,t)=>o.jsx(n,{ref:t,...e}));module.exports=a;
1
+ "use strict";var o=require("react/jsx-runtime"),e=require("@mui/material"),t=require("react"),i=require("../../../utils/shouldForwardProp.js"),r=require("./IconButton.variant-helpers.js");const a=e.styled(e.IconButton,{shouldForwardProp:i.omitProps("variation","shape","sizing","toggleColor")})(({theme:o,variation:e,shape:t="default",sizing:i,toggleColor:a})=>({boxSizing:"border-box",transition:"all 200ms ease",overflow:"hidden","&::before":{content:'""',backgroundColor:"transparent",transition:"all 200ms ease",position:"absolute",inset:0,zIndex:1},...t&&{...r.getIconButtonRadius(t,o)},...i&&{...r.getIconButtonSizing(i)},"&.MuiIconButton-root":{"&:focus:before":{backgroundColor:o.custom.palette.interaction.none},"@media (hover: hover)":{"&:hover:before":{backgroundColor:o.custom.palette.interaction.hover}},"&:active:before":{backgroundColor:o.custom.palette.interaction.press},"&:focus-visible":{boxShadow:o.custom.boxShadow.input.focus},"&.Mui-disabled":{"&:before":{backgroundColor:o.custom.palette.interaction.disabled,color:o.custom.palette.icon.disabled},"& .MuiSvgIcon-root":{fill:o.custom.palette.icon.disabled,"& path":{fill:"inherit"}}},"& .MuiSvgIcon-root":{fill:a?o.custom.palette.icon.lockedWhite:o.custom.palette.icon.primary,...i&&{...r.getIconSizing(i)},position:"relative",zIndex:2},..."default"===e&&{...r.defaultStyle(o)},..."toggle"===e&&{...r.toggle(o,a)},..."outlined"===e&&{...r.outlined(o)},..."raised"===e&&{...r.raised(o)},..."elevated"===e&&{...r.elevated(o)},...t&&{...r.getIconButtonRadius(t,o)}}})),n=t.forwardRef((e,t)=>o.jsx(a,{ref:t,...e}));module.exports=n;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),o=require("../../BrandCore/primitiveVariables.js"),t=require("./LikertContainer.js"),i=require("./LikertLabel.js"),a=require("./LikertRadio.js");module.exports=({options:n=[],disabled:s=!1,sizing:u="lg",onChange:l,internalChange:c,value:d})=>{const x=r.useTheme();function h(e){l(e.value),c&&c()}return e.jsx(r.Box,{children:e.jsx(t.default,{children:e.jsx(r.Grid,{container:!0,sx:{justifyContent:"space-between"},children:n.map(t=>e.jsxs(r.Grid,{size:"grow",onClick:()=>h(t),sx:{...!s&&{cursor:"pointer"},textAlign:"center","&:hover":{"& .MuiButtonBase-root.MuiRadio-root":{"&:before":{...!s&&{backgroundColor:x.custom.palette.interaction.hover}}}},"&:active":{"& .MuiButtonBase-root.MuiRadio-root":{...!s&&{backgroundColor:x.custom.palette.input.default,borderColor:x.custom.palette.stroke.focus,boxShadow:x.custom.boxShadow.input.focus},"&:before":{...!s&&{backgroundColor:x.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:x.custom.palette.purple[500]}}}},children:[e.jsx(a,{sizing:u,disabled:s,onChange:e=>h(t),checked:d===t.value},t.value),e.jsx(r.Box,{sx:{mt:o.margin.xs,width:"100%"},children:e.jsx(i,{disabled:s,children:t.label})})]},t.value))})})})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),o=require("../../BrandCore/primitiveVariables.js"),t=require("./LikertContainer.js"),i=require("./LikertLabel.js"),a=require("./LikertRadio.js");module.exports=({options:n=[],disabled:s=!1,sizing:u="lg",onChange:l,internalChange:c,value:d})=>{const h=r.useTheme();function x(e){l(e.value),c&&c()}return e.jsx(r.Box,{children:e.jsx(t.default,{children:e.jsx(r.Grid,{container:!0,sx:{justifyContent:"space-between"},children:n.map(t=>e.jsxs(r.Grid,{size:"grow",onClick:()=>x(t),sx:{...!s&&{cursor:"pointer"},textAlign:"center","@media (hover: hover)":{"&:hover":{"& .MuiButtonBase-root.MuiRadio-root":{"&:before":{...!s&&{backgroundColor:h.custom.palette.interaction.hover}}}}},"&:active":{"& .MuiButtonBase-root.MuiRadio-root":{...!s&&{backgroundColor:h.custom.palette.input.default,borderColor:h.custom.palette.stroke.focus,boxShadow:h.custom.boxShadow.input.focus},"&:before":{...!s&&{backgroundColor:h.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:h.custom.palette.purple[500]}}}},children:[e.jsx(a,{sizing:u,disabled:s,onChange:e=>x(t),checked:d===t.value},t.value),e.jsx(r.Box,{sx:{mt:o.margin.xs,width:"100%"},children:e.jsx(i,{disabled:s,children:t.label})})]},t.value))})})})};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),o=require("@mui/material");require("react");var t=require("../../../utils/shouldForwardProp.js"),r=require("../../BrandCore/Icon/Icon.js"),s=require("../../BrandCore/primitiveVariables.js");const i=o.styled(o.Radio,{shouldForwardProp:t.omitProps("sizing")})(({theme:e,sizing:o})=>({padding:0,backgroundColor:e.custom.palette.input.default,border:`1px solid ${e.custom.palette.stroke.default}`,position:"relative",transition:e.custom.easing.input,flexShrink:0,height:"sm"===o?s.space[300]:s.space[400],width:"sm"===o?s.space[300]:s.space[400],"& svg":{transition:e.custom.easing.input,fill:"none",width:"sm"===o&&r.iconSizeMap.sm,height:"sm"===o&&r.iconSizeMap.sm},"&:before":{content:'""',position:"absolute",inset:0,borderRadius:e.custom.radius.round},"&:hover":{backgroundColor:e.custom.palette.input.default,"&:before":{backgroundColor:e.custom.palette.interaction.hover}},"&:active":{backgroundColor:e.custom.palette.input.default,borderColor:e.custom.palette.stroke.focus,boxShadow:e.custom.boxShadow.input.focus,"&:before":{backgroundColor:e.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,borderColor:e.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:e.custom.palette.icon.disabled}},"&.Mui-focusVisible":{borderColor:e.custom.palette.stroke.focus,boxShadow:e.custom.boxShadow.input.focus,"&:before":{backgroundColor:e.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:e.custom.palette.purple[500],"& svg":{"&:first-of-type":{fill:"transparent"},fill:e.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,borderColor:e.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:e.custom.palette.icon.disabled}}}}));exports.StyledRadio=({inputRef:o,slotProps:t,...r})=>e.jsx(i,{...r,slotProps:{...t,input:{...t?.input,ref:o}}});
1
+ "use strict";var e=require("react/jsx-runtime"),o=require("@mui/material");require("react");var t=require("../../../utils/shouldForwardProp.js"),r=require("../../BrandCore/Icon/Icon.js"),s=require("../../BrandCore/primitiveVariables.js");const i=o.styled(o.Radio,{shouldForwardProp:t.omitProps("sizing")})(({theme:e,sizing:o})=>({padding:0,backgroundColor:e.custom.palette.input.default,border:`1px solid ${e.custom.palette.stroke.default}`,position:"relative",transition:e.custom.easing.input,flexShrink:0,height:"sm"===o?s.space[300]:s.space[400],width:"sm"===o?s.space[300]:s.space[400],"& svg":{transition:e.custom.easing.input,fill:"none",width:"sm"===o&&r.iconSizeMap.sm,height:"sm"===o&&r.iconSizeMap.sm},"&:before":{content:'""',position:"absolute",inset:0,borderRadius:e.custom.radius.round},"@media (hover: hover)":{"&:hover":{backgroundColor:e.custom.palette.input.default,"&:before":{backgroundColor:e.custom.palette.interaction.hover}}},"&:active":{backgroundColor:e.custom.palette.input.default,borderColor:e.custom.palette.stroke.focus,boxShadow:e.custom.boxShadow.input.focus,"&:before":{backgroundColor:e.custom.palette.interaction.press}},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,borderColor:e.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:e.custom.palette.icon.disabled}},"&.Mui-focusVisible":{borderColor:e.custom.palette.stroke.focus,boxShadow:e.custom.boxShadow.input.focus,"&:before":{backgroundColor:e.custom.palette.interaction.press}},"&.Mui-checked":{backgroundColor:e.custom.palette.purple[500],"& svg":{"&:first-of-type":{fill:"transparent"},fill:e.custom.palette.icon.lockedWhite},"&.Mui-disabled":{backgroundColor:e.custom.palette.input.disabled,borderColor:e.custom.palette.stroke.disabled,"& svg":{"&:first-of-type":{fill:"transparent"},fill:e.custom.palette.icon.disabled}}}}));exports.StyledRadio=({inputRef:o,slotProps:t,...r})=>e.jsx(i,{...r,slotProps:{...t,input:{...t?.input,ref:o}}});
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),a=require("react"),o=require("../../BrandCore/primitiveVariables.js"),l=require("../FormControlLabel/FormControlLabel.js"),i=require("../Radio/Radio.js");require("../Radio/StyledRadio.js");var t=require("../TextField/TextField.js");module.exports=({options:n,onChange:s,other:u,value:c,internalChange:d,sizing:g="lg",inputRef:h,noneOfTheseOption:p,...m})=>{const x=u?.enabled,f="other-option",b=`${f}-value-`,[j,v]=a.useState(c),[q,y]=a.useState(!1),R=a.useRef(null);a.useEffect(()=>{!q&&j?.includes(b)?y(!0):q&&y(!1)},[j]);return a.useEffect(()=>{R.current&&Array.from(R.current.getElementsByTagName("label")).forEach(e=>{if(e.clientHeight>4*o.base){const r=e.querySelector(".MuiTypography-root");r&&(r.style.marginTop=o.base/2+"px")}})},[R.current]),e.jsxs(e.Fragment,{children:[e.jsxs(r.RadioGroup,{...m,value:j,ref:R,sx:{"& .MuiRadio-root":{alignSelf:"baseline"},"& .MuiTypography-root":{alignSelf:"center"},display:"flex",alignSelf:"baseline",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"&:hover":{"& .MuiRadio-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}},onChange:(e,r)=>{s&&s(r),v(r),d&&d()},children:[n?n.map((r,a)=>e.jsx(l,{sx:{"& .MuiButtonBase-root.MuiRadio-root":{alignSelf:"baseline"}},...r,control:e.jsx(i,{sizing:g})},a)):null,x&&e.jsx(l,{label:u?.label||"Other",value:b,control:e.jsx(i,{sizing:g,checked:j?.includes(b)})},f),p&&e.jsx(l,{...p,control:e.jsx(i,{sizing:g})},p.value)]}),q&&e.jsx(r.Box,{sx:{mt:1},children:e.jsx(t,{fullWidth:!0,autoFocus:!0,placeholder:u?.placeholder,defaultValue:j?.replace(b,""),onChange:e=>{var r;s&&s((r=e.target.value,`${b}${r}`)),d&&d()},required:!0})})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),o=require("react"),a=require("../../BrandCore/primitiveVariables.js"),l=require("../FormControlLabel/FormControlLabel.js"),i=require("../Radio/Radio.js");require("../Radio/StyledRadio.js");var t=require("../TextField/TextField.js");module.exports=({options:n,onChange:s,other:u,value:c,internalChange:d,sizing:g="lg",inputRef:h,noneOfTheseOption:p,...m})=>{const x=u?.enabled,f="other-option",b=`${f}-value-`,[j,v]=o.useState(c),[q,y]=o.useState(!1),R=o.useRef(null);o.useEffect(()=>{!q&&j?.includes(b)?y(!0):q&&y(!1)},[j]);return o.useEffect(()=>{R.current&&Array.from(R.current.getElementsByTagName("label")).forEach(e=>{if(e.clientHeight>4*a.base){const r=e.querySelector(".MuiTypography-root");r&&(r.style.marginTop=a.base/2+"px")}})},[R.current]),e.jsxs(e.Fragment,{children:[e.jsxs(r.RadioGroup,{...m,value:j,ref:R,sx:{"& .MuiRadio-root":{alignSelf:"baseline"},"& .MuiTypography-root":{alignSelf:"center"},display:"flex",alignSelf:"baseline",gap:e=>e.custom.margin.sm,label:{"&:last-child":{mb:0},"@media (hover: hover)":{"&:hover":{"& .MuiRadio-root":{backgroundColor:e=>e.custom.palette.interaction.hover,"&.Mui-checked":{backgroundColor:e=>e.custom.palette.purple[500]}}}}}},onChange:(e,r)=>{s&&s(r),v(r),d&&d()},children:[n?n.map((r,o)=>e.jsx(l,{sx:{"& .MuiButtonBase-root.MuiRadio-root":{alignSelf:"baseline"}},...r,control:e.jsx(i,{sizing:g})},o)):null,x&&e.jsx(l,{label:u?.label||"Other",value:b,control:e.jsx(i,{sizing:g,checked:j?.includes(b)})},f),p&&e.jsx(l,{...p,control:e.jsx(i,{sizing:g})},p.value)]}),q&&e.jsx(r.Box,{sx:{mt:1},children:e.jsx(t,{fullWidth:!0,autoFocus:!0,placeholder:u?.placeholder,defaultValue:j?.replace(b,""),onChange:e=>{var r;s&&s((r=e.target.value,`${b}${r}`)),d&&d()},required:!0})})]})};
@@ -1 +1 @@
1
- "use strict";require("react/jsx-runtime"),require("@mui/material");var t=require("../../BrandCore/Icon/Icon.js"),e=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var i=require("../utils/typography.util.js");const o=t=>{switch(t){case"xs":return 24;case"sm":case"md":return 32;case"lg":default:return 40;case"xl":return 48}},n=t=>{switch(t){case"xs":case"sm":case"md":return 16;case"lg":default:return 24;case"xl":return 28}},a=(t,e)=>{switch(e){case"xs":case"sm":case"md":return{paddingLeft:t.spacing(t.custom.padding.xs),paddingRight:t.spacing(t.custom.padding.md)};default:return{paddingLeft:t.spacing(t.custom.padding.sm),paddingRight:t.spacing(t.custom.padding.lg)}}};exports.getInputPadding=a,exports.getInputSize=(i,o)=>{switch(o){case"xl":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.xl,height:t.iconSizeMap.xl,top:`calc(50% - ${t.iconSizeMap.xl/2}px)`}};case"lg":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.lg,height:t.iconSizeMap.lg,top:`calc(50% - ${t.iconSizeMap.lg/2}px)`}};case"md":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.md,height:t.iconSizeMap.md,top:`calc(50% - ${t.iconSizeMap.md/2}px)`}};case"sm":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.sm,height:t.iconSizeMap.sm,top:`calc(50% - ${t.iconSizeMap.sm/2}px)`}};case"xs":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.xs,height:t.iconSizeMap.xs,top:`calc(50% - ${t.iconSizeMap.xs/2}px)`}};default:return{...e.getButtonSizing("lg"),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.lg,height:t.iconSizeMap.lg,top:`calc(50% - ${t.iconSizeMap.lg/2}px)`}}}},exports.getTypographyStyle=(t,e)=>({"& .MuiTypography-root":{overflow:"hidden",textOverflow:"ellipsis",fontSize:i.fontSizemap[e],paddingLeft:t.spacing("xs"===e?t.custom.padding.xs:t.custom.padding.sm),paddingRight:t.spacing("xs"===e?t.custom.padding.xs:t.custom.padding.sm)}}),exports.popperBoxShadow="0px 4px 8px 0px #06040D14, 0px 16px 24px 0px #06040D14, 0px 0px 4px 2px #06040D0A, 0px 0px 0px 1px #FFFFFF29",exports.selectBaseStyles=(t,e)=>({fontSize:i.fontSizemap[e],borderRadius:t.spacing(t.custom.radius.md),position:"relative",padding:0,"& .MuiSelect-outlined":{padding:0},"& .MuiSelect-select.MuiInputBase-input":{height:"100%",display:"flex",alignItems:"center",...a(t,e),width:"100%"},"&:before":{transition:t.custom.easing.input,content:'""',position:"absolute",background:t.custom.palette.interaction.none,borderRadius:t.spacing(t.custom.radius.md),inset:0,zIndex:0},"&:hover:before":{backgroundColor:t.custom.palette.interaction.hover},"&.Mui-focused:before":{backgroundColor:t.custom.palette.interaction.press},"&.Mui-disabled:before":{backgroundColor:t.custom.palette.interaction.none},"& .MuiSelect-select":{position:"relative"}}),exports.selectItemBaseStyles=(t,e)=>({position:"relative",fontSize:i.fontSizemap[e],backgroundColor:t.custom.palette.interaction.none,color:t.custom.palette.text.primary,minHeight:o(e),justifyContent:"space-between",paddingLeft:t.spacing("xs"===e?t.custom.padding.sm:t.custom.padding.md),paddingRight:t.spacing("xs"===e?t.custom.padding.sm:t.custom.padding.md),gap:t.spacing(t.custom.padding.sm),whiteSpace:"wrap","& .MuiSvgIcon-root":{width:n(e),height:n(e)}}),exports.selectMenuItemSize=o,exports.selectTickSize=n;
1
+ "use strict";require("react/jsx-runtime"),require("@mui/material");var t=require("../../BrandCore/Icon/Icon.js"),e=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var i=require("../utils/typography.util.js");const o=t=>{switch(t){case"xs":return 24;case"sm":case"md":return 32;case"lg":default:return 40;case"xl":return 48}},n=t=>{switch(t){case"xs":case"sm":case"md":return 16;case"lg":default:return 24;case"xl":return 28}},a=(t,e)=>{switch(e){case"xs":case"sm":case"md":return{paddingLeft:t.spacing(t.custom.padding.xs),paddingRight:t.spacing(t.custom.padding.md)};default:return{paddingLeft:t.spacing(t.custom.padding.sm),paddingRight:t.spacing(t.custom.padding.lg)}}};exports.getInputPadding=a,exports.getInputSize=(i,o)=>{switch(o){case"xl":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.xl,height:t.iconSizeMap.xl,top:`calc(50% - ${t.iconSizeMap.xl/2}px)`}};case"lg":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.lg,height:t.iconSizeMap.lg,top:`calc(50% - ${t.iconSizeMap.lg/2}px)`}};case"md":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.md,height:t.iconSizeMap.md,top:`calc(50% - ${t.iconSizeMap.md/2}px)`}};case"sm":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.sm,height:t.iconSizeMap.sm,top:`calc(50% - ${t.iconSizeMap.sm/2}px)`}};case"xs":return{...e.getButtonSizing(o),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.xs,height:t.iconSizeMap.xs,top:`calc(50% - ${t.iconSizeMap.xs/2}px)`}};default:return{...e.getButtonSizing("lg"),"& .MuiSvgIcon-root":{color:i.custom.palette.icon.primary,transition:i.custom.easing.input,width:t.iconSizeMap.lg,height:t.iconSizeMap.lg,top:`calc(50% - ${t.iconSizeMap.lg/2}px)`}}}},exports.getTypographyStyle=(t,e)=>({"& .MuiTypography-root":{overflow:"hidden",textOverflow:"ellipsis",fontSize:i.fontSizemap[e],paddingLeft:t.spacing("xs"===e?t.custom.padding.xs:t.custom.padding.sm),paddingRight:t.spacing("xs"===e?t.custom.padding.xs:t.custom.padding.sm)}}),exports.popperBoxShadow="0px 4px 8px 0px #06040D14, 0px 16px 24px 0px #06040D14, 0px 0px 4px 2px #06040D0A, 0px 0px 0px 1px #FFFFFF29",exports.selectBaseStyles=(t,e)=>({fontSize:i.fontSizemap[e],borderRadius:t.spacing(t.custom.radius.md),position:"relative",padding:0,"& .MuiSelect-outlined":{padding:0},"& .MuiSelect-select.MuiInputBase-input":{height:"100%",display:"flex",alignItems:"center",...a(t,e),width:"100%"},"&:before":{transition:t.custom.easing.input,content:'""',position:"absolute",background:t.custom.palette.interaction.none,borderRadius:t.spacing(t.custom.radius.md),inset:0,zIndex:0},"@media (hover: hover)":{"&:hover:before":{backgroundColor:t.custom.palette.interaction.hover}},"&.Mui-focused:before":{backgroundColor:t.custom.palette.interaction.press},"&.Mui-disabled:before":{backgroundColor:t.custom.palette.interaction.none},"& .MuiSelect-select":{position:"relative"}}),exports.selectItemBaseStyles=(t,e)=>({position:"relative",fontSize:i.fontSizemap[e],backgroundColor:t.custom.palette.interaction.none,color:t.custom.palette.text.primary,minHeight:o(e),justifyContent:"space-between",paddingLeft:t.spacing("xs"===e?t.custom.padding.sm:t.custom.padding.md),paddingRight:t.spacing("xs"===e?t.custom.padding.sm:t.custom.padding.md),gap:t.spacing(t.custom.padding.sm),whiteSpace:"wrap","& .MuiSvgIcon-root":{width:n(e),height:n(e)}}),exports.selectMenuItemSize=o,exports.selectTickSize=n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useloops/design-system",
3
- "version": "1.4.733",
3
+ "version": "1.4.734",
4
4
  "description": "The official React based Loops design system",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",