@mmb-digital/design-system-web 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1374,7 +1374,7 @@ function Xl(e,t,n){return t=tc(t),function(e,t){if(t&&("object"==typeof t||"func
1374
1374
  border-style: solid;
1375
1375
  border-width: 1px;
1376
1376
  border-radius: ${({theme:e})=>e.borderRadius.xxs};
1377
- `,Vd=e.forwardRef((function(n,r){const{disabled:o=!1,id:a,isError:i,name:s,onBlur:l,onChange:c}=n,u=t.useTheme(),d=e.useRef(null);e.useEffect((()=>{null!==r&&("function"==typeof r?r(d.current):r.current=d.current)}),[r]);const[p,h]=e.useState(!1);e.useEffect((()=>{if(null===d.current)throw new Error("CheckboxBase unexpected error: localRef.current is null");h(d.current.checked)}),[]);const f=e.useMemo((()=>{return e=o?u.colors.icon.neutral.light:u.colors.icon.brand.light,he.encode((e=>`\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n <path d="M7.75 12.75L10 15.25L16.25 8.75" stroke="${e}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>`)(e));var e}),[o,u]);return e.createElement(Bd,null,e.createElement(Gd,{disabled:o,checkBackground:f,checked:p,id:a,isError:!0===i,name:s,ref:d,type:"checkbox",onBlur:l,onChange:e=>{h(!p),void 0!==c&&c(e)}}),e.createElement(Fd,{isError:!0===i}))})),Hd=e.forwardRef((function(n,r){const{errorMessage:o,id:a,isError:i=!1,label:s,position:l=exports.CheckboxPosition.left}=n,c=ho(n,["errorMessage","id","isError","label","position"]),u=t.useTheme(),d=cd(a);return e.createElement(Rd,null,e.createElement(Wd,{isError:i,position:l},e.createElement(Vd,Object.assign({},c,{id:d,isError:i,ref:r})),void 0!==s&&e.createElement(ve,{color:i?u.colors.fg.error.light:u.colors.fg.neutral.default.light,variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.MEDIUM_500},e.createElement("label",{htmlFor:d},s.label),void 0!==s.tooltip&&e.createElement(e.Fragment,null," ",e.createElement("span",null,e.createElement(uo,{floatingElement:s.tooltip}))))),void 0!==o&&e.createElement(ve,{color:u.colors.fg.error.light,variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.REGULAR_400},o))}));var _d;exports.RadioPosition=void 0,(_d=exports.RadioPosition||(exports.RadioPosition={})).left="left",_d.right="right";const Xd=t.div`
1377
+ `,Vd=e.forwardRef((function(n,r){const{checked:o,disabled:a=!1,id:i,isError:s,name:l,onBlur:c,onChange:u}=n,d=t.useTheme(),p=e.useRef(null);e.useEffect((()=>{null!==r&&("function"==typeof r?r(p.current):r.current=p.current)}),[r]),e.useEffect((()=>{if(null===p.current)throw new Error("CheckboxBase unexpected error: localRef.current is null")}),[]);const h=e.useMemo((()=>{return e=a?d.colors.icon.neutral.light:d.colors.icon.brand.light,he.encode((e=>`\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n <path d="M7.75 12.75L10 15.25L16.25 8.75" stroke="${e}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>`)(e));var e}),[a,d]);return e.createElement(Bd,null,e.createElement(Gd,{disabled:a,checkBackground:h,checked:o,id:i,isError:!0===s,name:l,ref:p,type:"checkbox",onBlur:c,onChange:u}),e.createElement(Fd,{isError:!0===s}))})),Hd=e.forwardRef((function(n,r){const{errorMessage:o,id:a,isError:i=!1,label:s,position:l=exports.CheckboxPosition.left}=n,c=ho(n,["errorMessage","id","isError","label","position"]),u=t.useTheme(),d=cd(a);return e.createElement(Rd,null,e.createElement(Wd,{isError:i,position:l},e.createElement(Vd,Object.assign({},c,{id:d,isError:i,ref:r})),void 0!==s&&e.createElement(ve,{color:i?u.colors.fg.error.light:u.colors.fg.neutral.default.light,variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.MEDIUM_500},e.createElement("label",{htmlFor:d},s.label),void 0!==s.tooltip&&e.createElement(e.Fragment,null," ",e.createElement("span",null,e.createElement(uo,{floatingElement:s.tooltip}))))),void 0!==o&&e.createElement(ve,{color:u.colors.fg.error.light,variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.REGULAR_400},o))}));var _d;exports.RadioPosition=void 0,(_d=exports.RadioPosition||(exports.RadioPosition={})).left="left",_d.right="right";const Xd=t.div`
1378
1378
  display: flex;
1379
1379
  flex-direction: column;
1380
1380
  row-gap: ${({theme:e})=>e.spacing.xs};