@mailstep/design-system 0.4.1-beta.4 → 0.4.2-beta.0

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.1-beta.4",
3
+ "version": "0.4.2-beta.0",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -7,5 +7,5 @@ export var ImageElement = function (_a) {
7
7
  var label = _a.label, onImageRemove = _a.onImageRemove, isDisabled = _a.isDisabled, onOpenLightBox = _a.onOpenLightBox, imageUrl = _a.imageUrl;
8
8
  if (!imageUrl)
9
9
  return null;
10
- return (_jsxs(x.div, { position: "relative", pr: "15px", pt: "15px", w: "100px", children: [_jsx(Image, { src: imageUrl, alt: "", width: "85px", height: "85px", onClick: onOpenLightBox }), onImageRemove && _jsx(CloseButton, { onImageRemove: onImageRemove, isDisabled: isDisabled }), _jsx(ImageTag, { label: label })] }));
10
+ return (_jsxs(x.div, { position: "relative", pr: "15px", pt: "15px", w: "100px", h: "100px", children: [_jsx(Image, { src: imageUrl, alt: "", width: "85px", height: "85px", onClick: onOpenLightBox }), onImageRemove && _jsx(CloseButton, { onImageRemove: onImageRemove, isDisabled: isDisabled }), _jsx(ImageTag, { label: label })] }));
11
11
  };
@@ -18,14 +18,14 @@ var meta = {
18
18
  };
19
19
  export default meta;
20
20
  var images = [
21
- { id: '1', smallUrl: 'https://picsum.photos/200/300', url: 'https://d3l7rp8qrtssjc.cloudfront.net/cache/receipt_original/001074f6-997d-46e5-80e0-82edaa6f3d3a/06a09ae0-557c-4808-86f7-f75ac43c6238.jpg' },
22
- { id: '2', smallUrl: 'https://picsum.photos/200/300', url: 'https://d3l7rp8qrtssjc.cloudfront.net/cache/receipt_original/001074f6-997d-46e5-80e0-82edaa6f3d3a/d0d38623-a7db-40dc-b2d9-2dc851f6a702.jpg' },
23
- { id: '3', smallUrl: 'https://picsum.photos/200/300', url: 'https://d3l7rp8qrtssjc.cloudfront.net/cache/receipt_original/001074f6-997d-46e5-80e0-82edaa6f3d3a/639e91d9-49b8-4106-a2b6-152d4d3d8f1e.jpg' },
21
+ { id: '1', smallUrl: 'https://picsum.photos/200/300', url: 'https://picsum.photos/400/400' },
22
+ { id: '1', smallUrl: 'https://picsum.photos/200/300', url: 'https://picsum.photos/400/400' },
24
23
  ];
25
24
  export var ImageListDefault = {
26
25
  args: {
27
26
  images: images,
28
27
  isDisabled: false,
28
+ onImageRemove: function (id) { return function () { return null; }; }
29
29
  },
30
30
  };
31
31
  export var ImageListDisabled = {
@@ -6,5 +6,5 @@ import styled from '@xstyled/styled-components';
6
6
  export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n"], ["\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n"])));
7
7
  export var Image = styled.img(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
8
8
  export var ButtonContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n justify-content: center;\n position: absolute;\n bottom: -60px;\n"], ["\n width: 100%;\n display: flex;\n justify-content: center;\n position: absolute;\n bottom: -60px;\n"])));
9
- export var Description = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 10px;\n position: absolute;\n bottom: 0px;\n background: rgba(255, 255, 255, 0.5);\n"], ["\n padding: 10px;\n position: absolute;\n bottom: 0px;\n background: rgba(255, 255, 255, 0.5);\n"])));
9
+ export var Description = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 10px;\n position: absolute;\n width: 100%;\n bottom: 0px;\n background: rgba(255, 255, 255, 0.8);\n"], ["\n padding: 10px;\n position: absolute;\n width: 100%;\n bottom: 0px;\n background: rgba(255, 255, 255, 0.8);\n"])));
10
10
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
package/ui/index.es.js CHANGED
@@ -14828,8 +14828,9 @@ const qT = V.div`
14828
14828
  `, eL = V.div`
14829
14829
  padding: 10px;
14830
14830
  position: absolute;
14831
+ width: 100%;
14831
14832
  bottom: 0px;
14832
- background: rgba(255, 255, 255, 0.5);
14833
+ background: rgba(255, 255, 255, 0.8);
14833
14834
  `, tL = ({
14834
14835
  isLightBoxOpen: e,
14835
14836
  onCloseLightBox: t,
@@ -14967,7 +14968,7 @@ const oL = V.img`
14967
14968
  justify-content: center;
14968
14969
  cursor: pointer;
14969
14970
  transition: all 0.2s linear;
14970
- `, vL = ({ onImageRemove: e, isDisabled: t }) => /* @__PURE__ */ f.jsx(pL, { onClick: t ? void 0 : e, isDisabled: t, children: /* @__PURE__ */ f.jsx(Le, { icon: "close", size: "22px", fill: t ? "magenta60" : "red1" }) }), mL = ({ label: e, onImageRemove: t, isDisabled: r, onOpenLightBox: n, imageUrl: i }) => i ? /* @__PURE__ */ f.jsxs(Re.div, { position: "relative", pr: "15px", pt: "15px", w: "100px", children: [
14971
+ `, vL = ({ onImageRemove: e, isDisabled: t }) => /* @__PURE__ */ f.jsx(pL, { onClick: t ? void 0 : e, isDisabled: t, children: /* @__PURE__ */ f.jsx(Le, { icon: "close", size: "22px", fill: t ? "magenta60" : "red1" }) }), mL = ({ label: e, onImageRemove: t, isDisabled: r, onOpenLightBox: n, imageUrl: i }) => i ? /* @__PURE__ */ f.jsxs(Re.div, { position: "relative", pr: "15px", pt: "15px", w: "100px", h: "100px", children: [
14971
14972
  /* @__PURE__ */ f.jsx(oL, { src: i, alt: "", width: "85px", height: "85px", onClick: n }),
14972
14973
  t && /* @__PURE__ */ f.jsx(vL, { onImageRemove: t, isDisabled: r }),
14973
14974
  /* @__PURE__ */ f.jsx(gL, { label: e })
package/ui/index.umd.js CHANGED
@@ -1418,8 +1418,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1418
1418
  `,dL=F.div`
1419
1419
  padding: 10px;
1420
1420
  position: absolute;
1421
+ width: 100%;
1421
1422
  bottom: 0px;
1422
- background: rgba(255, 255, 255, 0.5);
1423
+ background: rgba(255, 255, 255, 0.8);
1423
1424
  `,cf=({isLightBoxOpen:e,onCloseLightBox:t,lightBoxAction:r,lightBoxActionTitle:n,images:i,initialSlide:a=0})=>i!=null&&i.length?d.jsx(D3,{isShown:e,onClose:t,variant:"mobileFullscreen",top:"10px",children:d.jsx(sf,{initialSlide:a,slidesPerView:1,autoHeight:!0,children:i.map(o=>d.jsx(lf,{children:d.jsxs(lL,{children:[d.jsx(cL,{src:o.originalUrl??o.url,loading:"lazy",alt:""}),(o.date||o.description)&&d.jsxs(dL,{children:[o.date," ",o.description]}),!!o.withLightBoxAction&&r&&n&&d.jsx(fL,{children:d.jsx(vn,{onClick:r(o.id),appearance:"primaryLight",children:n})})]})},o.id))})}):null,ff=()=>{const{isOpen:e,onOpen:t,onClose:r,data:n}=V3();return{onOpenLightBox:M.useCallback((a=0)=>()=>{t({initialSlide:a})},[t]),onCloseLightBox:r,isLightBoxOpen:e,lightBoxData:n}},uL=F.div`
1424
1425
  position: relative;
1425
1426
  flex-shrink: 0;
@@ -1487,7 +1488,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1487
1488
  justify-content: center;
1488
1489
  cursor: pointer;
1489
1490
  transition: all 0.2s linear;
1490
- `,xL=({onImageRemove:e,isDisabled:t})=>d.jsx(SL,{onClick:t?void 0:e,isDisabled:t,children:d.jsx(Oe,{icon:"close",size:"22px",fill:t?"magenta60":"red1"})}),kL=({label:e,onImageRemove:t,isDisabled:r,onOpenLightBox:n,imageUrl:i})=>i?d.jsxs(Be.div,{position:"relative",pr:"15px",pt:"15px",w:"100px",children:[d.jsx(pL,{src:i,alt:"",width:"85px",height:"85px",onClick:n}),t&&d.jsx(xL,{onImageRemove:t,isDisabled:r}),d.jsx(EL,{label:e})]}):null,PL=F.div`
1491
+ `,xL=({onImageRemove:e,isDisabled:t})=>d.jsx(SL,{onClick:t?void 0:e,isDisabled:t,children:d.jsx(Oe,{icon:"close",size:"22px",fill:t?"magenta60":"red1"})}),kL=({label:e,onImageRemove:t,isDisabled:r,onOpenLightBox:n,imageUrl:i})=>i?d.jsxs(Be.div,{position:"relative",pr:"15px",pt:"15px",w:"100px",h:"100px",children:[d.jsx(pL,{src:i,alt:"",width:"85px",height:"85px",onClick:n}),t&&d.jsx(xL,{onImageRemove:t,isDisabled:r}),d.jsx(EL,{label:e})]}):null,PL=F.div`
1491
1492
  display: flex;
1492
1493
  overflow-x: scroll;
1493
1494
  -ms-overflow-style: none;