@mmb-digital/design-system-web 0.1.74 → 0.1.76

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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { ReactNode, FC, PropsWithChildren, ReactElement, SyntheticEvent, RefAttributes, FocusEvent, ChangeEvent, HTMLInputTypeAttribute, ComponentType, MouseEvent, HTMLAttributes } from 'react';
2
+ import React__default, { ReactNode, FC, PropsWithChildren, ReactElement, RefObject, SyntheticEvent, RefAttributes, FocusEvent, ChangeEvent, HTMLInputTypeAttribute, ComponentType, MouseEvent, HTMLAttributes } from 'react';
3
3
  import * as styled_components from 'styled-components';
4
4
  import * as styled_components_dist_types from 'styled-components/dist/types';
5
5
  import { MessageDescriptor } from 'react-intl';
@@ -420,6 +420,7 @@ interface CalculatorResultValues {
420
420
  }
421
421
 
422
422
  interface CalculatorResultProps extends CalculatorResultValues {
423
+ htmlRef?: RefObject<HTMLDivElement>;
423
424
  }
424
425
 
425
426
  /**
@@ -441,6 +442,7 @@ interface CalculatorResultBoxProps extends CalculatorResultValues {
441
442
  description?: ReactElement | string;
442
443
  mediaType: MediaType;
443
444
  modal: CalculatorResultBoxModal | undefined;
445
+ resultWrapperHtmlRef?: RefObject<HTMLDivElement>;
444
446
  }
445
447
 
446
448
  /**
package/dist/index.esm.js CHANGED
@@ -1001,12 +1001,11 @@ import*as e from"react";import t,{useCallback as n,useState as r,useMemo as o,Fr
1001
1001
  ${({theme:e})=>e.spacing.sm}
1002
1002
  `,ua=b.div`
1003
1003
  position: relative;
1004
- z-index: 9;
1004
+ z-index: 10;
1005
1005
  display: block;
1006
- row-gap: ${({theme:e})=>e.spacing.xxs};
1007
1006
  max-width: 266px;
1008
1007
  padding: ${la};
1009
- background-color: ${({chooseColor:e,theme:t})=>e(t.colors.surface.risen)};
1008
+ background-color: ${({chooseColor:e,theme:t})=>e(t.colors.surface.risen)}!important;
1010
1009
  border-radius: ${({theme:e})=>e.borderRadius.xs};
1011
1010
  box-shadow: ${({theme:e})=>e.shadow.box.md};
1012
1011
  `,ca=b.div`
@@ -1059,7 +1058,6 @@ import*as e from"react";import t,{useCallback as n,useState as r,useMemo as o,Fr
1059
1058
  border-radius: ${({theme:e})=>e.borderRadius.md};
1060
1059
 
1061
1060
  @media (min-width: ${({theme:e})=>e.breakpoints.sm}) {
1062
- min-width: 355px;
1063
1061
  padding: ${({theme:e})=>e.spacing.xl};
1064
1062
  }
1065
1063
  `,fi=b.div`
@@ -1100,7 +1098,7 @@ import*as e from"react";import t,{useCallback as n,useState as r,useMemo as o,Fr
1100
1098
  display: flex;
1101
1099
  flex-direction: column;
1102
1100
  row-gap: ${({theme:e})=>e.spacing.lg};
1103
- `,Si=e=>{var n;const{bodyItems:r,header:o,main:a}=e,i=y(),s=le.dark,l=ce(s);return t.createElement(pi,{chooseColor:l},t.createElement(hi,{chooseColor:l},t.createElement(fi,{chooseColor:l},(void 0!==o.main||void 0!==o.top||void 0!==o.bottom)&&t.createElement(t.Fragment,null,t.createElement(mi,{chooseColor:l},void 0!==o.top&&t.createElement(gi,{chooseColor:l},t.createElement(O,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:L.CENTER,variant:T.TEXT_MD},o.top,t.createElement(ci,{colorScheme:s,displayMethod:Pa.WITH_NBSP,floatingElement:null===(n=o.topTooltip)||void 0===n?void 0:n.floatingElement}))),void 0!==o.main&&t.createElement(bi,{chooseColor:l},t.createElement(O,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:L.CENTER,variant:T.H2,weight:N.SEMI_BOLD_600},o.main)),void 0!==o.bottom&&t.createElement(yi,{chooseColor:l},t.createElement(O,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:L.CENTER,variant:T.TEXT_MD},o.bottom))),t.createElement(ki,{chooseColor:l})),r.length>0&&t.createElement(wi,{chooseColor:l},r.map(((e,n)=>{var r;return t.createElement(xi,{key:n,chooseColor:l},t.createElement(Ci,{chooseColor:l},t.createElement(O,{color:i.colors.fg.neutral.subtle.dark,fullWidth:!0,textAlign:L.LEFT,variant:T.TEXT_MD},e.left.element,void 0!==(null===(r=e.left.tooltip)||void 0===r?void 0:r.floatingElement)&&t.createElement(t.Fragment,null," ",t.createElement(Ba,{colorScheme:s,floatingElement:e.left.tooltip.floatingElement})))),t.createElement(Ei,{chooseColor:l},t.createElement(O,{color:l(i.colors.fg.neutral.default),fullWidth:!0,textAlign:L.RIGHT,variant:T.TEXT_MD},e.right.element)))})))),t.createElement(Ii,{chooseColor:l},!0===a.topSeparator&&t.createElement(ki,{chooseColor:l}),a.element)))};var Di;!function(e){e.desktop="desktop",e.mobile="mobile",e.tablet="tablet"}(Di||(Di={}));const Mi=b.div`
1101
+ `,Si=e=>{var n;const{bodyItems:r,header:o,htmlRef:a,main:i}=e,s=y(),l=le.dark,u=ce(l);return t.createElement(pi,{chooseColor:u,ref:a},t.createElement(hi,{chooseColor:u},t.createElement(fi,{chooseColor:u},(void 0!==o.main||void 0!==o.top||void 0!==o.bottom)&&t.createElement(t.Fragment,null,t.createElement(mi,{chooseColor:u},void 0!==o.top&&t.createElement(gi,{chooseColor:u},t.createElement(O,{color:u(s.colors.fg.neutral.default),fullWidth:!0,textAlign:L.CENTER,variant:T.TEXT_MD},o.top,t.createElement(ci,{colorScheme:l,displayMethod:Pa.WITH_NBSP,floatingElement:null===(n=o.topTooltip)||void 0===n?void 0:n.floatingElement}))),void 0!==o.main&&t.createElement(bi,{chooseColor:u},t.createElement(O,{color:u(s.colors.fg.neutral.default),fullWidth:!0,textAlign:L.CENTER,variant:T.H2,weight:N.SEMI_BOLD_600},o.main)),void 0!==o.bottom&&t.createElement(yi,{chooseColor:u},t.createElement(O,{color:u(s.colors.fg.neutral.default),fullWidth:!0,textAlign:L.CENTER,variant:T.TEXT_MD},o.bottom))),t.createElement(ki,{chooseColor:u})),r.length>0&&t.createElement(wi,{chooseColor:u},r.map(((e,n)=>{var r;return t.createElement(xi,{key:n,chooseColor:u},t.createElement(Ci,{chooseColor:u},t.createElement(O,{color:s.colors.fg.neutral.subtle.dark,fullWidth:!0,textAlign:L.LEFT,variant:T.TEXT_MD},e.left.element,void 0!==(null===(r=e.left.tooltip)||void 0===r?void 0:r.floatingElement)&&t.createElement(t.Fragment,null," ",t.createElement(Ba,{colorScheme:l,floatingElement:e.left.tooltip.floatingElement})))),t.createElement(Ei,{chooseColor:u},t.createElement(O,{color:u(s.colors.fg.neutral.default),fullWidth:!0,textAlign:L.RIGHT,variant:T.TEXT_MD},e.right.element)))})))),t.createElement(Ii,{chooseColor:u},!0===i.topSeparator&&t.createElement(ki,{chooseColor:u}),i.element)))};var Di;!function(e){e.desktop="desktop",e.mobile="mobile",e.tablet="tablet"}(Di||(Di={}));const Mi=b.div`
1104
1102
  display: flex;
1105
1103
  flex-direction: column;
1106
1104
  row-gap: ${({isDescriptionVisible:e,mediaType:t,theme:n})=>{switch(!0){case t===Di.desktop&&!e:return n.spacing.xxl;case t===Di.mobile||e:return n.spacing.sm;default:throw new Error("unexpected enum value MediaType in calculatorResultBox.style.ts Wrapper row-gap")}}};
@@ -1126,7 +1124,7 @@ import*as e from"react";import t,{useCallback as n,useState as r,useMemo as o,Fr
1126
1124
  position: absolute;
1127
1125
  bottom: -11px;
1128
1126
  left: 0;
1129
- `,Pi=e=>{const{bodyItems:n,description:o,header:a,main:i,mediaType:s,modal:l}=e,[u,c]=r(!1);return t.createElement(Mi,{isDescriptionVisible:void 0!==o,mediaType:s},t.createElement(Si,{bodyItems:n,header:a,main:i}),t.createElement(Ai,null,void 0!==o&&t.createElement(Ti,null,t.createElement(O,{fullWidth:!0,textAlign:L.CENTER,variant:T.TEXT_SM},o)),void 0!==l&&t.createElement(t.Fragment,null,t.createElement(or,{hideCloseButton:!1,isOpen:u,onClose:()=>{c(!1)}},l.content),t.createElement(Li,null,t.createElement(Ni,{onClick:()=>{c(!0)}},t.createElement(O,{variant:T.TEXT_SM,weight:N.MEDIUM_500},l.text,t.createElement(_i,null,t.createElement(Oi,null,t.createElement(Ae,{size:R.big,type:P.chevronRight})))))))))};
1127
+ `,Pi=e=>{const{bodyItems:n,description:o,header:a,main:i,mediaType:s,modal:l,resultWrapperHtmlRef:u}=e,[c,d]=r(!1);return t.createElement(Mi,{isDescriptionVisible:void 0!==o,mediaType:s},t.createElement(Si,{bodyItems:n,header:a,htmlRef:u,main:i}),t.createElement(Ai,null,void 0!==o&&t.createElement(Ti,null,t.createElement(O,{fullWidth:!0,textAlign:L.CENTER,variant:T.TEXT_SM},o)),void 0!==l&&t.createElement(t.Fragment,null,t.createElement(or,{hideCloseButton:!1,isOpen:c,onClose:()=>{d(!1)}},l.content),t.createElement(Li,null,t.createElement(Ni,{onClick:()=>{d(!0)}},t.createElement(O,{variant:T.TEXT_SM,weight:N.MEDIUM_500},l.text,t.createElement(_i,null,t.createElement(Oi,null,t.createElement(Ae,{size:R.big,type:P.chevronRight})))))))))};
1130
1128
  /*! *****************************************************************************
1131
1129
  Copyright (c) Microsoft Corporation. All rights reserved.
1132
1130
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -1865,8 +1863,8 @@ function Ic(e,t,n){return t=Bc(t),function(e,t){if(t&&("object"==typeof t||"func
1865
1863
  min-height: 124px;
1866
1864
  padding: ${({theme:e})=>e.spacing.sm};
1867
1865
  font-family: Inter, sans-serif;
1868
- font-size: ${({theme:e})=>e.font.size.body.sm};
1869
- line-height: ${({theme:e})=>e.font.lineHeight.body.sm};
1866
+ font-size: ${({theme:e})=>e.font.size.body.md};
1867
+ line-height: ${({theme:e})=>e.font.lineHeight.body.md};
1870
1868
  letter-spacing: ${({theme:e})=>e.font.letterSpacing.body.sm};
1871
1869
  resize: vertical;
1872
1870
  background: ${({theme:e})=>e.palette.white};