@mmb-digital/design-system-web 0.1.73 → 0.1.74
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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1432,7 +1432,7 @@ function Gu(e,t,n){return t=qu(t),function(e,t){if(t&&("object"==typeof t||"func
|
|
|
1432
1432
|
::placeholder {
|
|
1433
1433
|
color: ${({theme:e})=>e.palette.grey700};
|
|
1434
1434
|
}
|
|
1435
|
-
`,ip=t=>{const
|
|
1435
|
+
`,ip=(t,n)=>{const r=e.useRef(null),[o,a]=e.useState(void 0),i=Boolean(t)||0===t,s=e.useCallback((()=>{r.current&&a(r.current.offsetWidth)}),[]),l=qo(s,500,{maxWait:500});return e.useLayoutEffect((()=>{i&&s()}),[i,s]),e.useEffect((()=>{var e;return null===(e=n.current)||void 0===e||e.addEventListener("focus",s),()=>{var e;null===(e=n.current)||void 0===e||e.removeEventListener("focus",s)}}),[n,s]),e.useEffect((()=>(i&&window.addEventListener("resize",l),()=>{i&&window.removeEventListener("resize",l)})),[i,l]),{width:o,wrapperRef:r}},sp=e.forwardRef(((t,n)=>{const{button:r,colorInput:o,colorScheme:a=exports.ColorScheme.light,halfWidth:i,icon:s,id:l,maxLength:u,name:c,onBlur:d,onChange:p,onFocus:h,placeholder:f,prefix:m,prefixColor:g,size:b,suffix:v,weight:y=exports.InputWeight.REGULAR_400}=t,x=Ht(t,["button","colorInput","colorScheme","halfWidth","icon","id","maxLength","name","onBlur","onChange","onFocus","placeholder","prefix","prefixColor","size","suffix","weight"]),k=H(a),w=e.useRef(null),C=Ur([n,w]),{width:E,wrapperRef:I}=ip(m,w),{width:S,wrapperRef:T}=ip(v,w);return e.createElement(Qd,{$halfWidth:i,$size:b},void 0!==s&&e.createElement(np,null,s),void 0!==m&&""!==m&&e.createElement(rp,{$chooseColor:k,$prefixColor:g,ref:I},m),e.createElement(tp,Object.assign({button:r,colorInput:o,halfWidth:i,icon:s,id:l,maxLength:u,name:c,placeholder:f,prefixWidth:E,ref:C,size:b,suffixWidth:S,weight:y,onBlur:d,onChange:p,onFocus:h},x)),void 0!==v&&""!==v&&e.createElement(ap,{ref:T},v),void 0!==r&&e.createElement(op,null,r))}));sp.displayName="InputBase";const lp=t.label`
|
|
1436
1436
|
display: flex;
|
|
1437
1437
|
gap: ${({theme:e})=>e.spacing.xxs};
|
|
1438
1438
|
align-items: center;
|