@mmb-digital/design-system-web 0.1.39 → 0.1.41

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
@@ -1051,7 +1051,7 @@
1051
1051
  display: flex;
1052
1052
  flex-direction: column;
1053
1053
  row-gap: ${({theme:e})=>e.spacing.lg};
1054
- `,va=n=>{const{bodyItems:r,header:o,main:a}=n,i=t.useTheme(),s=exports.ColorScheme.dark,l=H(s);return e.createElement(aa,{chooseColor:l},e.createElement(ia,{chooseColor:l},e.createElement(sa,{chooseColor:l},(void 0!==o.main||void 0!==o.top||void 0!==o.bottom)&&e.createElement(e.Fragment,null,e.createElement(la,{chooseColor:l},void 0!==o.top&&e.createElement(ca,{chooseColor:l},e.createElement(d,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.TEXT_MD},o.top)),void 0!==o.main&&e.createElement(ua,{chooseColor:l},e.createElement(d,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.H2,weight:exports.TypographyWeight.SEMI_BOLD_600},o.main)),void 0!==o.bottom&&e.createElement(da,{chooseColor:l},e.createElement(d,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.TEXT_MD},o.bottom))),e.createElement(pa,{chooseColor:l})),r.length>0&&e.createElement(ha,{chooseColor:l},r.map(((t,n)=>{var r;return e.createElement(fa,{key:n,chooseColor:l},e.createElement(ma,{chooseColor:l},e.createElement(d,{color:i.colors.fg.neutral.subtle.dark,fullWidth:!0,textAlign:exports.TypographyTextAlign.LEFT,variant:exports.TypographyVariant.TEXT_MD},t.left.element,void 0!==(null===(r=t.left.tooltip)||void 0===r?void 0:r.floatingElement)&&e.createElement(e.Fragment,null," ",e.createElement(Lo,{colorScheme:s,floatingElement:t.left.tooltip.floatingElement})))),e.createElement(ga,{chooseColor:l},e.createElement(d,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.RIGHT,variant:exports.TypographyVariant.TEXT_MD},t.right.element)))})))),e.createElement(ba,{chooseColor:l},!0===a.topSeparator&&e.createElement(pa,{chooseColor:l}),a.element)))};var ya;exports.MediaType=void 0,(ya=exports.MediaType||(exports.MediaType={})).desktop="desktop",ya.mobile="mobile";const xa=t.div`
1054
+ `,va=n=>{var r;const{bodyItems:o,header:a,main:i}=n,s=t.useTheme(),l=exports.ColorScheme.dark,c=H(l);return e.createElement(aa,{chooseColor:c},e.createElement(ia,{chooseColor:c},e.createElement(sa,{chooseColor:c},(void 0!==a.main||void 0!==a.top||void 0!==a.bottom)&&e.createElement(e.Fragment,null,e.createElement(la,{chooseColor:c},void 0!==a.top&&e.createElement(ca,{chooseColor:c},e.createElement(d,{color:c(s.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.TEXT_MD},a.top,e.createElement(oa,{colorScheme:l,displayMethod:exports.TooltipInfoDisplayMethod.WITH_NBSP,floatingElement:null===(r=a.topTooltip)||void 0===r?void 0:r.floatingElement}))),void 0!==a.main&&e.createElement(ua,{chooseColor:c},e.createElement(d,{color:c(s.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.H2,weight:exports.TypographyWeight.SEMI_BOLD_600},a.main)),void 0!==a.bottom&&e.createElement(da,{chooseColor:c},e.createElement(d,{color:c(s.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.TEXT_MD},a.bottom))),e.createElement(pa,{chooseColor:c})),o.length>0&&e.createElement(ha,{chooseColor:c},o.map(((t,n)=>{var r;return e.createElement(fa,{key:n,chooseColor:c},e.createElement(ma,{chooseColor:c},e.createElement(d,{color:s.colors.fg.neutral.subtle.dark,fullWidth:!0,textAlign:exports.TypographyTextAlign.LEFT,variant:exports.TypographyVariant.TEXT_MD},t.left.element,void 0!==(null===(r=t.left.tooltip)||void 0===r?void 0:r.floatingElement)&&e.createElement(e.Fragment,null," ",e.createElement(Lo,{colorScheme:l,floatingElement:t.left.tooltip.floatingElement})))),e.createElement(ga,{chooseColor:c},e.createElement(d,{color:c(s.colors.fg.neutral.default),fullWidth:!0,textAlign:exports.TypographyTextAlign.RIGHT,variant:exports.TypographyVariant.TEXT_MD},t.right.element)))})))),e.createElement(ba,{chooseColor:c},!0===i.topSeparator&&e.createElement(pa,{chooseColor:c}),i.element)))};var ya;exports.MediaType=void 0,(ya=exports.MediaType||(exports.MediaType={})).desktop="desktop",ya.mobile="mobile";const xa=t.div`
1055
1055
  display: flex;
1056
1056
  flex-direction: column;
1057
1057
  row-gap: ${({isDescriptionVisible:e,mediaType:t,theme:n})=>{switch(!0){case t===exports.MediaType.desktop&&!e:return n.spacing.xxl;case t===exports.MediaType.mobile||e:return n.spacing.sm;default:throw new Error("unexpected enum value MediaType in calculatorResultBox.style.ts Wrapper row-gap")}}};
@@ -1168,12 +1168,12 @@ function lc(e,t,n){return t=xc(t),function(e,t){if(t&&("object"==typeof t||"func
1168
1168
  padding-left: ${({theme:e})=>e.spacing.xxxl};
1169
1169
  `};
1170
1170
 
1171
- ${({suffix:e})=>void 0!==e&&""!==e&&t.css`
1172
- padding-right: ${({theme:e})=>Number.parseInt(e.spacing.xl)-.75}px;
1171
+ ${({suffix:e,suffixWidth:n})=>void 0!==e&&""!==e&&t.css`
1172
+ padding-right: ${({theme:e})=>void 0===n?"initial":`calc(${n-.75}px + ${e.spacing.md})`};
1173
1173
  `};
1174
1174
 
1175
- ${({hasError:e,suffix:n})=>void 0!==n&&""!==n&&!0===e&&t.css`
1176
- padding-right: ${({theme:e})=>e.spacing.xl};
1175
+ ${({hasError:e,suffix:n,suffixWidth:r})=>void 0!==n&&""!==n&&!0===e&&t.css`
1176
+ padding-right: ${({theme:e})=>void 0===r?"initial":`calc(${r}px + ${e.spacing.md})`};
1177
1177
  `};
1178
1178
 
1179
1179
  border: 2px solid ${({theme:e})=>e.colors.border.brand.default.light};
@@ -1196,8 +1196,8 @@ function lc(e,t,n){return t=xc(t),function(e,t){if(t&&("object"==typeof t||"func
1196
1196
  padding-left: ${({theme:e})=>e.spacing.xxxl};
1197
1197
  `};
1198
1198
 
1199
- ${({suffix:e})=>void 0!==e&&""!==e&&t.css`
1200
- padding-right: ${({theme:e})=>e.spacing.xl};
1199
+ ${({suffix:e,suffixWidth:n})=>void 0!==e&&""!==e&&t.css`
1200
+ padding-right: ${({theme:e})=>void 0===n?"initial":`calc(${n}px + ${e.spacing.md})`};
1201
1201
  `};
1202
1202
 
1203
1203
  ${({size:e})=>{switch(e){case exports.InputSize.MD:return t.css`
@@ -1244,11 +1244,10 @@ function lc(e,t,n){return t=xc(t),function(e,t){if(t&&("object"==typeof t||"func
1244
1244
  display: flex;
1245
1245
  align-items: center;
1246
1246
  justify-content: center;
1247
- width: 20px;
1248
1247
  height: 100%;
1249
- margin-right: 10px;
1248
+ margin-right: ${({theme:e})=>e.spacing.sm};
1250
1249
  ${fd};
1251
- `,xd=e.forwardRef((function(t,n){const{button:r,colorInput:o,halfWidth:a,icon:i,id:s,maxLength:l,name:c,onBlur:u,onChange:d,placeholder:p,prefix:h,suffix:f}=t,m=No(t,["button","colorInput","halfWidth","icon","id","maxLength","name","onBlur","onChange","placeholder","prefix","suffix"]),g=e.useRef(null);return e.useEffect((()=>{null!==n&&("function"==typeof n?n(g.current):n.current=g.current)}),[n]),e.useEffect((()=>{if(null===g.current)throw new Error("InputBase unexpected error: localRef.current is null")}),[]),e.createElement(hd,{halfWidth:a},void 0!==i&&e.createElement(gd,null,i),void 0!==h&&""!==h&&e.createElement(bd,null,h),e.createElement(md,Object.assign({button:r,colorInput:o,halfWidth:a,icon:i,id:s,maxLength:l,name:c,placeholder:p,prefix:h,ref:g,suffix:f,onBlur:u,onChange:d},m)),void 0!==f&&""!==f&&e.createElement(yd,null,f),void 0!==r&&e.createElement(vd,null,r))})),wd=t.label`
1250
+ `,xd=e.forwardRef((function(t,n){const{button:r,colorInput:o,halfWidth:a,icon:i,id:s,maxLength:l,name:c,onBlur:u,onChange:d,placeholder:p,prefix:h,suffix:f}=t,m=No(t,["button","colorInput","halfWidth","icon","id","maxLength","name","onBlur","onChange","placeholder","prefix","suffix"]),g=e.useRef(null);e.useEffect((()=>{null!==n&&("function"==typeof n?n(g.current):n.current=g.current)}),[n]),e.useEffect((()=>{if(null===g.current)throw new Error("InputBase unexpected error: localRef.current is null")}),[]);const b=e.useRef(null),[v,y]=e.useState(void 0);return e.useEffect((()=>{var e;y(null===(e=b.current)||void 0===e?void 0:e.offsetWidth)}),[f]),e.createElement(hd,{halfWidth:a},void 0!==i&&e.createElement(gd,null,i),void 0!==h&&""!==h&&e.createElement(bd,null,h),e.createElement(md,Object.assign({button:r,colorInput:o,halfWidth:a,icon:i,id:s,maxLength:l,name:c,placeholder:p,prefix:h,ref:g,suffix:f,suffixWidth:v,onBlur:u,onChange:d},m)),void 0!==f&&""!==f&&e.createElement(yd,{ref:b},f),void 0!==r&&e.createElement(vd,null,r))})),wd=t.label`
1252
1251
  display: flex;
1253
1252
  gap: ${({theme:e})=>e.spacing.xxs};
1254
1253
  align-items: center;