@mailstep/design-system 0.4.3 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -64,5 +64,5 @@ export var AddPhoto = function (_a) {
64
64
  }, [onImageUpload]);
65
65
  if (!onImageUpload)
66
66
  return null;
67
- return (_jsxs(Container, { isDisabled: isDisabled, children: [_jsx(HiddenInput, { disabled: isDisabled, onChange: handleImageUpload, type: "file", accept: "image/*" }), _jsx(AddPhotoIcon, { width: "36", height: "36" })] }));
67
+ return (_jsxs(Container, { isDisabled: isDisabled, children: [_jsx(HiddenInput, { disabled: isDisabled, onChange: handleImageUpload, type: "file", accept: "image/*;capture=camera", capture: "environment" }), _jsx(AddPhotoIcon, { width: "36", height: "36" })] }));
68
68
  };
package/ui/index.es.js CHANGED
@@ -14897,7 +14897,7 @@ const qT = V.div`
14897
14897
  [e]
14898
14898
  );
14899
14899
  return e ? /* @__PURE__ */ f.jsxs(nL, { isDisabled: t, children: [
14900
- /* @__PURE__ */ f.jsx(iL, { disabled: t, onChange: r, type: "file", accept: "image/*" }),
14900
+ /* @__PURE__ */ f.jsx(iL, { disabled: t, onChange: r, type: "file", accept: "image/*;capture=camera", capture: "environment" }),
14901
14901
  /* @__PURE__ */ f.jsx(jh, { width: "36", height: "36" })
14902
14902
  ] }) : null;
14903
14903
  };
package/ui/index.umd.js CHANGED
@@ -1444,7 +1444,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1444
1444
  width: 100%;
1445
1445
  height: 100%;
1446
1446
  cursor: pointer;
1447
- `,gL=({onImageUpload:e,isDisabled:t})=>{const r=M.useCallback(n=>{var a,o;if(!((o=(a=n.target)==null?void 0:a.files)!=null&&o[0]))return;const i=new FileReader;i.readAsDataURL(n.target.files[0]),i.onload=async()=>{var s,l;await(e==null?void 0:e({base64image:(s=i.result)==null?void 0:s.split(",").pop(),base64WithDataDeclaration:i.result,file:(l=n.target.files)==null?void 0:l[0]}))}},[e]);return e?d.jsxs(uL,{isDisabled:t,children:[d.jsx(hL,{disabled:t,onChange:r,type:"file",accept:"image/*"}),d.jsx(sl,{width:"36",height:"36"})]}):null};F.div``;const pL=F.img`
1447
+ `,gL=({onImageUpload:e,isDisabled:t})=>{const r=M.useCallback(n=>{var a,o;if(!((o=(a=n.target)==null?void 0:a.files)!=null&&o[0]))return;const i=new FileReader;i.readAsDataURL(n.target.files[0]),i.onload=async()=>{var s,l;await(e==null?void 0:e({base64image:(s=i.result)==null?void 0:s.split(",").pop(),base64WithDataDeclaration:i.result,file:(l=n.target.files)==null?void 0:l[0]}))}},[e]);return e?d.jsxs(uL,{isDisabled:t,children:[d.jsx(hL,{disabled:t,onChange:r,type:"file",accept:"image/*;capture=camera",capture:"environment"}),d.jsx(sl,{width:"36",height:"36"})]}):null};F.div``;const pL=F.img`
1448
1448
  border-radius: ${L.radius("lg")};
1449
1449
  `,vL={small:"14px",medium:"16px",big:"20px"},mL={small:"2px 8px",medium:"7px 10px",big:"12px 12px"},AL={small:"6px",medium:"20px",big:"20px"},bL=(e,t)=>t?L.color(t):e?L.color("blue2"):"white",yL=e=>e?L.color(e):"rgba(157, 163, 169, 0.2)",df=F.div`
1450
1450
  background-color: ${({color:e})=>yL(e)};