@mmb-digital/design-system-web 0.1.75 → 0.1.77
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 +19 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
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
|
/**
|
|
@@ -439,8 +440,10 @@ interface CalculatorResultBoxModal {
|
|
|
439
440
|
}
|
|
440
441
|
interface CalculatorResultBoxProps extends CalculatorResultValues {
|
|
441
442
|
description?: ReactElement | string;
|
|
443
|
+
htmlRef?: RefObject<HTMLDivElement>;
|
|
442
444
|
mediaType: MediaType;
|
|
443
445
|
modal: CalculatorResultBoxModal | undefined;
|
|
446
|
+
resultWrapperHtmlRef?: RefObject<HTMLDivElement>;
|
|
444
447
|
}
|
|
445
448
|
|
|
446
449
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -1098,7 +1098,7 @@ import*as e from"react";import t,{useCallback as n,useState as r,useMemo as o,Fr
|
|
|
1098
1098
|
display: flex;
|
|
1099
1099
|
flex-direction: column;
|
|
1100
1100
|
row-gap: ${({theme:e})=>e.spacing.lg};
|
|
1101
|
-
`,Si=e=>{var n;const{bodyItems:r,header:o,main:
|
|
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`
|
|
1102
1102
|
display: flex;
|
|
1103
1103
|
flex-direction: column;
|
|
1104
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")}}};
|
|
@@ -1124,7 +1124,7 @@ import*as e from"react";import t,{useCallback as n,useState as r,useMemo as o,Fr
|
|
|
1124
1124
|
position: absolute;
|
|
1125
1125
|
bottom: -11px;
|
|
1126
1126
|
left: 0;
|
|
1127
|
-
`,Pi=e=>{const{bodyItems:n,description:o,header:a,
|
|
1127
|
+
`,Pi=e=>{const{bodyItems:n,description:o,header:a,htmlRef:i,main:s,mediaType:l,modal:u,resultWrapperHtmlRef:c}=e,[d,p]=r(!1);return t.createElement(Mi,{isDescriptionVisible:void 0!==o,mediaType:l,ref:i},t.createElement(Si,{bodyItems:n,header:a,htmlRef:c,main:s}),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!==u&&t.createElement(t.Fragment,null,t.createElement(or,{hideCloseButton:!1,isOpen:d,onClose:()=>{p(!1)}},u.content),t.createElement(Li,null,t.createElement(Ni,{onClick:()=>{p(!0)}},t.createElement(O,{variant:T.TEXT_SM,weight:N.MEDIUM_500},u.text,t.createElement(_i,null,t.createElement(Oi,null,t.createElement(Ae,{size:R.big,type:P.chevronRight})))))))))};
|
|
1128
1128
|
/*! *****************************************************************************
|
|
1129
1129
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1130
1130
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|