@mmb-digital/design-system-web 0.1.28 → 0.1.29
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 +8 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +8 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -683,6 +683,9 @@
|
|
|
683
683
|
height: 32px;
|
|
684
684
|
padding: ${({theme:e})=>e.spacing.xxs} ${({theme:e})=>e.spacing.sm};
|
|
685
685
|
`,Be=t.div`
|
|
686
|
+
display: flex;
|
|
687
|
+
flex: 1;
|
|
688
|
+
width: ${({fullWidth:e})=>!0===e?"100%":"fit-content"};
|
|
686
689
|
padding-bottom: ${({variant:e})=>e===exports.TabsVariant.tertiary?"0px":"2px"};
|
|
687
690
|
background: transparent;
|
|
688
691
|
border-top-left-radius: ${({theme:e})=>e.borderRadius.md};
|
|
@@ -696,10 +699,11 @@
|
|
|
696
699
|
`,Ge=t.div`
|
|
697
700
|
box-sizing: border-box;
|
|
698
701
|
display: flex;
|
|
702
|
+
flex: 1;
|
|
699
703
|
flex-shrink: 0;
|
|
700
704
|
align-items: center;
|
|
701
705
|
justify-content: center;
|
|
702
|
-
width: fit-content;
|
|
706
|
+
width: ${({fullWidth:e})=>!0===e?"100%":"fit-content"};
|
|
703
707
|
min-width: 120px;
|
|
704
708
|
white-space: nowrap;
|
|
705
709
|
cursor: pointer;
|
|
@@ -749,14 +753,14 @@
|
|
|
749
753
|
`:t.css`
|
|
750
754
|
${We};
|
|
751
755
|
`}
|
|
752
|
-
`,Ve=n=>{const{colorScheme:r,
|
|
756
|
+
`,Ve=n=>{const{colorScheme:r,fullWidth:o,icon:a,id:i,isActive:s=!1,onClick:l,text:c,variant:u}=n,d=t.useTheme(),p=Oe(r);return e.createElement(Be,{fullWidth:o,isActive:s&&u!==exports.TabsVariant.tertiary,variant:u},e.createElement(Ge,{colorScheme:r,fullWidth:o,id:i,isActive:s,variant:u,onClick:l},void 0!==a&&a,e.createElement(ve,{color:p(d.colors.fg.neutral.subtle),textAlign:exports.TypographyTextAlign.CENTER,variant:u===exports.TabsVariant.tertiary?exports.TypographyVariant.TEXT_SM:exports.TypographyVariant.TEXT_MD,weight:exports.TypographyWeight.MEDIUM_500},c)))},Fe=t.div`
|
|
753
757
|
display: flex;
|
|
754
758
|
flex-direction: row;
|
|
755
759
|
flex-wrap: nowrap;
|
|
756
760
|
gap: ${({theme:e})=>e.spacing.xxs};
|
|
757
761
|
align-items: center;
|
|
758
762
|
justify-content: flex-start;
|
|
759
|
-
width: fit-content;
|
|
763
|
+
width: ${({fullWidth:e})=>!0===e?"100%":"fit-content"};
|
|
760
764
|
padding: ${({theme:e})=>e.spacing.xxs};
|
|
761
765
|
background: ${({chooseColor:e,theme:t})=>e(t.colors.surface.default)};
|
|
762
766
|
border: 1px solid ${({chooseColor:e,theme:t})=>e(t.colors.border.neutral.subtlest)};
|
|
@@ -1679,5 +1683,5 @@ function _l(e,t,n){return t=ec(t),function(e,t){if(t&&("object"==typeof t||"func
|
|
|
1679
1683
|
`;case exports.GapSize.XXXXXL:return t.css`
|
|
1680
1684
|
gap: ${({theme:e})=>e.spacing.xxxxxl};
|
|
1681
1685
|
`;default:throw new Error("unexpected GapSize enum values in stack.styles.ts")}}}
|
|
1682
|
-
`;exports.AsyncSelect=t=>{const{control:n,defaultPlaceholder:r,name:o,optionIcon:a}=t,i=po(t,["control","defaultPlaceholder","name","optionIcon"]),[s,l]=e.useState(),[c,u]=e.useState(r),d=()=>u("");return e.createElement(Lb,{control:n,name:o,render:({field:t})=>{var n;return e.createElement(cb,Object.assign({},i,t,{customComponents:{Input:Wb,DropdownIndicator:null,ValueContainer:Bb,Option:t=>((t,n)=>{var{children:r,data:o}=t,a=po(t,["children","data"]);return e.createElement(Ym.Option,Object.assign({data:o},a),e.createElement(Ob,null,n&&e.createElement(Bt,{size:n.size,type:n.type}),e.createElement(Pb,null,r)))})(t,a)},inputValue:null===(n=t.value)||void 0===n?void 0:n.label,isSearchable:!0,loadingMessage:()=>null,noOptionsMessage:()=>null,placeholder:c,type:sb.ASYNC_SELECT,value:s,onBlur:()=>(e=>{""===e.label&&u(r)})(t.value),onFocus:d,onChange:e=>((e,t)=>{t.onChange(e)})(e,t),onInputChange:(e,n)=>((e,{action:t},n)=>{"input-change"===t&&(l(null),n.onChange({value:null,label:e}))})(e,n,t)}))}})},exports.Button=d,exports.CalculatorResult=Ko,exports.CalculatorResultBox=t=>{const{bodyItems:n,description:r,header:o,main:a,mediaType:i,modal:s}=t,[l,c]=e.useState(!1);return e.createElement(ea,{isDescriptionVisible:void 0!==r,mediaType:i},e.createElement(Ko,{bodyItems:n,header:o,main:a}),e.createElement(ta,null,void 0!==r&&e.createElement(na,null,e.createElement(ve,{fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.TEXT_SM},r)),void 0!==s&&e.createElement(e.Fragment,null,e.createElement($t,{hideCloseButton:!1,isOpen:l,onClose:()=>{c(!1)}},s.content),e.createElement(ra,null,e.createElement(oa,{onClick:()=>{c(!0)}},e.createElement(ve,{variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.MEDIUM_500},s.text,e.createElement(aa,null,e.createElement(ia,null,e.createElement(Bt,{size:exports.IconSystemSize.big,type:exports.IconSystemType.chevronRight})))))))))},exports.Checkbox=Vd,exports.DatePicker=t=>{const{locale:n,name:r,nextMonthAriaLabel:o,previousMonthAriaLabel:a,startDate:i}=t,s=po(t,["locale","name","nextMonthAriaLabel","previousMonthAriaLabel","startDate"]);return e.createElement(Pu,Object.assign({calendarContainer:({children:t})=>e.createElement(wd,{role:"dialog"},e.createElement(kd,{id:"datepicker-prevMonth"},a),e.createElement(kd,{id:"datepicker-nextMonth"},o),t),customInput:e.createElement(ed,{name:r,size:exports.InputSize.MD}),dateFormat:"dd. MM. yyyy",locale:null!=n?n:"cs",renderCustomHeader:Dd,selected:i,showPopperArrow:!1,showTimeSelect:!1},s))},exports.EmailInput=cd,exports.FieldWrapper=id,exports.FormattedAmount=La,exports.FormattedHtmlMessage=Wo,exports.FormattedMessage=t=>{const{defaultMessage:n,description:r,id:o,values:a}=t;return e.createElement(Ro,{defaultMessage:n,description:r,id:o,values:a},(t=>e.createElement("span",{"data-message-id":o},t)))},exports.FormattedPercentage=ba,exports.IconProduct=Je,exports.IconSystem=Bt,exports.InfoConditional=Go,exports.Infobox=t=>{const{children:n,isWarning:r=!1,size:o,variant:a}=t;return e.createElement(ke,{isWarning:r,size:o,variant:a},n)},exports.InputBase=ed,exports.InputLabel=nd,exports.Loader=fa,exports.LoaderOverlayBox=t=>{const{colorScheme:n,loaderSize:r}=t;return e.createElement(ma,{colorScheme:n},e.createElement(fa,{colorScheme:n,loaderSize:r}))},exports.Modal=$t,exports.PhoneInput=ud,exports.Radio=Jd,exports.RadioButton=ep,exports.RadioButtonsHorizontal=ip,exports.SearchInput=dd,exports.Select=t=>{const{control:n,name:r}=t,o=po(t,["control","name"]);return e.createElement(Lb,{control:n,name:r,render:({field:t})=>e.createElement(cb,Object.assign({},o,t))})},exports.SelectBase=cb,exports.SelectField=t=>{const{control:n,errorMessage:r,hasError:o,hintText:a,id:i,label:s,name:l,tooltip:c}=t,u=po(t,["control","errorMessage","hasError","hintText","id","label","name","tooltip"]);return e.createElement(id,{errorMessage:r,hasError:o,hintText:a,id:i,label:s,tooltip:c},e.createElement(Lb,{control:n,name:l,render:({field:t})=>e.createElement(cb,Object.assign({},u,{inputId:i,isError:o},t))}))},exports.Slider=ye,exports.SliderInput=vd,exports.Stack=t=>{const{children:n,direction:r=exports.StackDirection.column,gap:o=exports.GapSize.MD}=t,a=po(t,["children","direction","gap"]);return e.createElement(Ub,Object.assign({direction:r,gap:o},a),n)},exports.Table=t=>{const{children:n,variant:r}=t;return e.createElement(Ie,{variant:r},n)},exports.TableBody=t=>{const{children:n,variant:r}=t;return e.createElement(Ee,{variant:r},n)},exports.TableData=t=>{const{children:n,variant:r}=t;return e.createElement(Se,{variant:r},n)},exports.TableHead=t=>{const{children:n,variant:r}=t;return e.createElement(Te,{variant:r},n)},exports.TableHeadData=t=>{const{children:n,variant:r}=t;return e.createElement(De,{variant:r},n)},exports.TableRow=t=>{const{children:n,variant:r}=t;return e.createElement(Me,{variant:r},n)},exports.Tabs=t=>{const{colorScheme:n,
|
|
1686
|
+
`;exports.AsyncSelect=t=>{const{control:n,defaultPlaceholder:r,name:o,optionIcon:a}=t,i=po(t,["control","defaultPlaceholder","name","optionIcon"]),[s,l]=e.useState(),[c,u]=e.useState(r),d=()=>u("");return e.createElement(Lb,{control:n,name:o,render:({field:t})=>{var n;return e.createElement(cb,Object.assign({},i,t,{customComponents:{Input:Wb,DropdownIndicator:null,ValueContainer:Bb,Option:t=>((t,n)=>{var{children:r,data:o}=t,a=po(t,["children","data"]);return e.createElement(Ym.Option,Object.assign({data:o},a),e.createElement(Ob,null,n&&e.createElement(Bt,{size:n.size,type:n.type}),e.createElement(Pb,null,r)))})(t,a)},inputValue:null===(n=t.value)||void 0===n?void 0:n.label,isSearchable:!0,loadingMessage:()=>null,noOptionsMessage:()=>null,placeholder:c,type:sb.ASYNC_SELECT,value:s,onBlur:()=>(e=>{""===e.label&&u(r)})(t.value),onFocus:d,onChange:e=>((e,t)=>{t.onChange(e)})(e,t),onInputChange:(e,n)=>((e,{action:t},n)=>{"input-change"===t&&(l(null),n.onChange({value:null,label:e}))})(e,n,t)}))}})},exports.Button=d,exports.CalculatorResult=Ko,exports.CalculatorResultBox=t=>{const{bodyItems:n,description:r,header:o,main:a,mediaType:i,modal:s}=t,[l,c]=e.useState(!1);return e.createElement(ea,{isDescriptionVisible:void 0!==r,mediaType:i},e.createElement(Ko,{bodyItems:n,header:o,main:a}),e.createElement(ta,null,void 0!==r&&e.createElement(na,null,e.createElement(ve,{fullWidth:!0,textAlign:exports.TypographyTextAlign.CENTER,variant:exports.TypographyVariant.TEXT_SM},r)),void 0!==s&&e.createElement(e.Fragment,null,e.createElement($t,{hideCloseButton:!1,isOpen:l,onClose:()=>{c(!1)}},s.content),e.createElement(ra,null,e.createElement(oa,{onClick:()=>{c(!0)}},e.createElement(ve,{variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.MEDIUM_500},s.text,e.createElement(aa,null,e.createElement(ia,null,e.createElement(Bt,{size:exports.IconSystemSize.big,type:exports.IconSystemType.chevronRight})))))))))},exports.Checkbox=Vd,exports.DatePicker=t=>{const{locale:n,name:r,nextMonthAriaLabel:o,previousMonthAriaLabel:a,startDate:i}=t,s=po(t,["locale","name","nextMonthAriaLabel","previousMonthAriaLabel","startDate"]);return e.createElement(Pu,Object.assign({calendarContainer:({children:t})=>e.createElement(wd,{role:"dialog"},e.createElement(kd,{id:"datepicker-prevMonth"},a),e.createElement(kd,{id:"datepicker-nextMonth"},o),t),customInput:e.createElement(ed,{name:r,size:exports.InputSize.MD}),dateFormat:"dd. MM. yyyy",locale:null!=n?n:"cs",renderCustomHeader:Dd,selected:i,showPopperArrow:!1,showTimeSelect:!1},s))},exports.EmailInput=cd,exports.FieldWrapper=id,exports.FormattedAmount=La,exports.FormattedHtmlMessage=Wo,exports.FormattedMessage=t=>{const{defaultMessage:n,description:r,id:o,values:a}=t;return e.createElement(Ro,{defaultMessage:n,description:r,id:o,values:a},(t=>e.createElement("span",{"data-message-id":o},t)))},exports.FormattedPercentage=ba,exports.IconProduct=Je,exports.IconSystem=Bt,exports.InfoConditional=Go,exports.Infobox=t=>{const{children:n,isWarning:r=!1,size:o,variant:a}=t;return e.createElement(ke,{isWarning:r,size:o,variant:a},n)},exports.InputBase=ed,exports.InputLabel=nd,exports.Loader=fa,exports.LoaderOverlayBox=t=>{const{colorScheme:n,loaderSize:r}=t;return e.createElement(ma,{colorScheme:n},e.createElement(fa,{colorScheme:n,loaderSize:r}))},exports.Modal=$t,exports.PhoneInput=ud,exports.Radio=Jd,exports.RadioButton=ep,exports.RadioButtonsHorizontal=ip,exports.SearchInput=dd,exports.Select=t=>{const{control:n,name:r}=t,o=po(t,["control","name"]);return e.createElement(Lb,{control:n,name:r,render:({field:t})=>e.createElement(cb,Object.assign({},o,t))})},exports.SelectBase=cb,exports.SelectField=t=>{const{control:n,errorMessage:r,hasError:o,hintText:a,id:i,label:s,name:l,tooltip:c}=t,u=po(t,["control","errorMessage","hasError","hintText","id","label","name","tooltip"]);return e.createElement(id,{errorMessage:r,hasError:o,hintText:a,id:i,label:s,tooltip:c},e.createElement(Lb,{control:n,name:l,render:({field:t})=>e.createElement(cb,Object.assign({},u,{inputId:i,isError:o},t))}))},exports.Slider=ye,exports.SliderInput=vd,exports.Stack=t=>{const{children:n,direction:r=exports.StackDirection.column,gap:o=exports.GapSize.MD}=t,a=po(t,["children","direction","gap"]);return e.createElement(Ub,Object.assign({direction:r,gap:o},a),n)},exports.Table=t=>{const{children:n,variant:r}=t;return e.createElement(Ie,{variant:r},n)},exports.TableBody=t=>{const{children:n,variant:r}=t;return e.createElement(Ee,{variant:r},n)},exports.TableData=t=>{const{children:n,variant:r}=t;return e.createElement(Se,{variant:r},n)},exports.TableHead=t=>{const{children:n,variant:r}=t;return e.createElement(Te,{variant:r},n)},exports.TableHeadData=t=>{const{children:n,variant:r}=t;return e.createElement(De,{variant:r},n)},exports.TableRow=t=>{const{children:n,variant:r}=t;return e.createElement(Me,{variant:r},n)},exports.Tabs=t=>{const{colorScheme:n,fullWidth:r,tabItems:o,variant:a}=t,i=Oe(n);return e.createElement(Fe,{chooseColor:i,fullWidth:r},o.map((t=>e.createElement(e.Fragment,{key:t.id},e.createElement(Ve,{colorScheme:n,fullWidth:r,icon:t.icon,id:t.id,isActive:t.isActive,text:t.text,variant:a,onClick:t.onClick})))))},exports.TabsItem=Ve,exports.TextArea=Zb,exports.TextInput=yd,exports.Toggle=n=>{const{defaultValue:r,disabled:o,id:a,label:i,name:s,onChange:l}=n,c=t.useTheme(),[u,d]=e.useState(r),p=e.useCallback((e=>{d(e),void 0!==l&&l(e)}),[l]);return e.createElement(Yb,{disabled:o,checked:u},e.createElement(Xb,{activeBoxShadow:"",borderRadius:9999,className:"react-switch",disabled:o,handleDiameter:16,height:21,checked:u,checkedIcon:!1,id:a,name:s,offColor:c.colors.bg.neutral.white.light,offHandleColor:c.colors.bg.neutral.white.light,uncheckedIcon:!1,width:36,onColor:!0===o?c.colors.bg.neutral.white.light:c.colors.bg.brand.bold.light,onHandleColor:c.colors.bg.neutral.white.light,onChange:p}),void 0!==i&&e.createElement(zb,{htmlFor:a},e.createElement(ve,{variant:exports.TypographyVariant.TEXT_SM,weight:exports.TypographyWeight.MEDIUM_500},i)))},exports.TooltipGeneral=ao,exports.TooltipInfo=co,exports.TooltipInfoDisplayableCheck=t=>{const{body:n,colorScheme:r,displayMethod:o,title:a}=t,i=Bo();return i(n)?e.createElement(e.Fragment,null,o===exports.TooltipInfoDisplayMethod.WITH_NBSP&&" ",e.createElement(co,{colorScheme:r,floatingElement:{body:e.createElement(Wo,Object.assign({},n)),title:void 0!==a&&i(a)?e.createElement(Wo,Object.assign({},a)):void 0}})):null},exports.TrailingTextInput=xd,exports.Typography=ve,exports.getColor=Le,exports.theme=Ed,exports.useColorScheme=Oe,exports.useCreateTooltipFloatingElement=()=>{const t=Bo();return e.useCallback(((n,r)=>{if(t(n))return{body:e.createElement(Wo,Object.assign({},n)),title:void 0!==r&&t(r)?e.createElement(Wo,Object.assign({},r)):void 0}}),[t])},exports.useFormatAmount=va,exports.useFormattedPercentage=ga,exports.useIsMessageDisplayable=Bo;
|
|
1683
1687
|
//# sourceMappingURL=index.cjs.js.map
|