@mailstep/design-system 0.6.32 → 0.6.34

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.6.32",
3
+ "version": "0.6.34",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -35,7 +35,7 @@ export var ActionRow = function (_a) {
35
35
  'props' in column.title &&
36
36
  ((_c = column.title) === null || _c === void 0 ? void 0 : _c.props) &&
37
37
  i18n._({ id: (_e = (_d = column.title) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.id, message: (_f = column.title) === null || _f === void 0 ? void 0 : _f.props.message });
38
- var isVisible = translatedValue && translatedValue.toLocaleLowerCase().includes(searchedValue.toLocaleLowerCase());
38
+ var isVisible = translatedValue && translatedValue.toLocaleLowerCase().includes(searchedValue.toLocaleLowerCase()) && !column.alwaysOn;
39
39
  var handleToggleChange = useCallback(function () {
40
40
  setColumnsConfigOptions(function (prevOptions) {
41
41
  var _a;
@@ -6,7 +6,7 @@ import { Link } from '../Link';
6
6
  import { x } from '@xstyled/styled-components';
7
7
  import { th } from '@xstyled/styled-components';
8
8
  import styled from 'styled-components';
9
- export var StyledAlert = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n min-height: 48px;\n align-items: center;\n justify-content: space-between;\n border: ", ";\n border-radius: 8px;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n padding: 6px 5px 6px 5px;\n margin-bottom: 5px;\n position: relative;\n"], ["\n width: 100%;\n display: flex;\n min-height: 48px;\n align-items: center;\n justify-content: space-between;\n border: ", ";\n border-radius: 8px;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n padding: 6px 5px 6px 5px;\n margin-bottom: 5px;\n position: relative;\n"])), function (_a) {
9
+ export var StyledAlert = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: calc(100vw - 20px);\n display: flex;\n min-height: 48px;\n align-items: center;\n justify-content: space-between;\n border: ", ";\n border-radius: 8px;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n padding: 6px 5px 6px 5px;\n margin-bottom: 5px;\n position: sticky;\n left: 10px;\n @media (min-width: 1024px) {\n position: relative;\n left: 0;\n width: 100%;\n }\n"], ["\n width: calc(100vw - 20px);\n display: flex;\n min-height: 48px;\n align-items: center;\n justify-content: space-between;\n border: ", ";\n border-radius: 8px;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n padding: 6px 5px 6px 5px;\n margin-bottom: 5px;\n position: sticky;\n left: 10px;\n @media (min-width: 1024px) {\n position: relative;\n left: 0;\n width: 100%;\n }\n"])), function (_a) {
10
10
  var $inline = _a.$inline, $colorFill = _a.$colorFill;
11
11
  return ($inline ? "solid 1px ".concat($colorFill) : 'none');
12
12
  }, function (_a) {
package/ui/index.es.js CHANGED
@@ -16721,7 +16721,7 @@ KA.defaultProps = {
16721
16721
  replace: !1
16722
16722
  };
16723
16723
  const jle = Ti(ft.div)`
16724
- width: 100%;
16724
+ width: calc(100vw - 20px);
16725
16725
  display: flex;
16726
16726
  min-height: 48px;
16727
16727
  align-items: center;
@@ -16738,7 +16738,13 @@ const jle = Ti(ft.div)`
16738
16738
  font-family: ${te("fonts.primary")};
16739
16739
  padding: 6px 5px 6px 5px;
16740
16740
  margin-bottom: 5px;
16741
- position: relative;
16741
+ position: sticky;
16742
+ left: 10px;
16743
+ @media (min-width: 1024px) {
16744
+ position: relative;
16745
+ left: 0;
16746
+ width: 100%;
16747
+ }
16742
16748
  `, Wle = Ti(ft.div)`
16743
16749
  width: 4px;
16744
16750
  height: 36px;
@@ -50898,7 +50904,7 @@ const KCe = /* @__PURE__ */ ho(QCe), exe = (e, t, r = [], n) => {
50898
50904
  }), [o]), h = Pj.isObject(e == null ? void 0 : e.title) && "props" in e.title && ((m = e.title) == null ? void 0 : m.props) && vt._({
50899
50905
  id: (C = (w = e.title) == null ? void 0 : w.props) == null ? void 0 : C.id,
50900
50906
  message: (S = e.title) == null ? void 0 : S.props.message
50901
- }), p = h && h.toLocaleLowerCase().includes(n.toLocaleLowerCase()), v = ke(() => {
50907
+ }), p = h && h.toLocaleLowerCase().includes(n.toLocaleLowerCase()) && !e.alwaysOn, v = ke(() => {
50902
50908
  r((x) => ({
50903
50909
  ...x,
50904
50910
  [e.name]: c ? {
package/ui/index.umd.js CHANGED
@@ -1567,7 +1567,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1567
1567
  opacity: 0.5;
1568
1568
  `:null}
1569
1569
  `,s2=e=>{const t=vt(),r=e.color?re.color(e.color)({theme:t}):void 0,n=re.fontSize(e.size)({theme:t});return b.jsx(Iue,{...e,color:r,size:n,children:e.children})};s2.defaultProps={to:"",color:"linkColor",disabled:!1,size:1,padding:"0",replace:!1};const kue=wr(ot.div)`
1570
- width: 100%;
1570
+ width: calc(100vw - 20px);
1571
1571
  display: flex;
1572
1572
  min-height: 48px;
1573
1573
  align-items: center;
@@ -1579,7 +1579,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1579
1579
  font-family: ${re("fonts.primary")};
1580
1580
  padding: 6px 5px 6px 5px;
1581
1581
  margin-bottom: 5px;
1582
- position: relative;
1582
+ position: sticky;
1583
+ left: 10px;
1584
+ @media (min-width: 1024px) {
1585
+ position: relative;
1586
+ left: 0;
1587
+ width: 100%;
1588
+ }
1583
1589
  `,Oue=wr(ot.div)`
1584
1590
  width: 4px;
1585
1591
  height: 36px;
@@ -3759,7 +3765,7 @@ function print() { __p += __j.call(arguments, '') }
3759
3765
  border: 1px solid ${re.color("lightGray6")};
3760
3766
  border-radius: 8px;
3761
3767
  margin-bottom: 15px;
3762
- `,fEe=({column:e,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n,innerRef:i,draggableProps:o,dragHandleProps:l})=>{var m,w,C,S;const[u,c]=I.useState((t==null?void 0:t.includes(e.name))??!1),f=I.useMemo(()=>({...o==null?void 0:o.style}),[o]),h=Lj.isObject(e==null?void 0:e.title)&&"props"in e.title&&((m=e.title)==null?void 0:m.props)&&ht._({id:(C=(w=e.title)==null?void 0:w.props)==null?void 0:C.id,message:(S=e.title)==null?void 0:S.props.message}),p=h&&h.toLocaleLowerCase().includes(n.toLocaleLowerCase()),v=I.useCallback(()=>{r(x=>({...x,[e.name]:u?{isHidden:!0}:{}})),c(!u)},[r,u,e.name]);return b.jsxs(dEe,{$isVisible:p,...o,...l,ref:i,style:f,children:[b.jsxs(ot.div,{display:"flex",alignItems:"center",children:[b.jsx(ot.div,{w:"28px",children:b.jsx(Zf,{name:"",variant:"grid",onChange:v,spaceAround:!1,checked:u})}),b.jsx(Dp,{variant:"medium",ml:"8px",children:h})]}),b.jsx(iO,{})]})},hEe=({columns:e,columnsConfigValues:t,setColumnsConfigOptions:r,handleDragEnd:n})=>{const[i,o]=I.useState(""),l=I.useCallback(c=>{o(c.target.value)},[o]),u=I.useCallback(()=>{o("")},[o]);return b.jsxs(ot.div,{children:[b.jsx(Rl,{icon:"search",type:"text",value:i,placeholder:ht._({id:"manageColumn.searchPlaceholder",message:"Find column..."}),onChange:l,onClear:u,variant:"gray"}),b.jsx(NV,{onDragEnd:n,children:b.jsx(q7,{droppableId:"droppable",direction:"vertical",children:c=>b.jsx(ot.div,{h:"400px",overflowY:"scroll",mt:"20px",ref:c.innerRef,...c.droppableProps,children:e==null?void 0:e.map((f,h)=>b.jsx(YV,{draggableId:f.name,index:h,isDragDisabled:!!i,children:(p,v)=>b.jsx(fEe,{column:f,innerRef:p.innerRef,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:i,draggableProps:p.draggableProps,dragHandleProps:p.dragHandleProps},h)},f.name))})})})]})},pEe=e=>{const{optimizeFilters:t=!1,extraControlButtons:r,eshopSelect:n,onBatchAction:i,processCheckedValues:o,processCheckedValuesTitle:l,hideControlButtons:u,quickFilter:c,floatingButtonProps:f,queryRowsParam:h,customPaginationHandler:p,...v}=e,{gridActions:m,gridSelectors:w,rowsData:C,actionColumnDefinition:S}=v,[x,k]=I.useState(!1),{gridHeight:T,gridRef:P,paginationRef:D}=ipe();I.useEffect(()=>{var Z;if(!h&&T&&T>0){const X=Math.max(Math.floor(T/_6e-2),N6e);X&&((Z=m.setRowsPerPage)==null||Z.call(m,X))}},[T,m,h]);const B=g5e(v),F=I.useMemo(()=>L6e(t),[t]),W=B.columnsDefinitions,{onOpen:G,isOpen:U,onClose:R}=sb(),{columnsConfigValues:j,setColumnsConfigOptions:V,onConfirmForm:$,resetColumnConfig:Y,handleDragEnd:ne,onCloseForm:he,displayColumnsDefinitions:be,manageColumnsFormDefinitions:fe}=v5e({columns:W,gridActions:m,gridSelectors:w,onClose:R});return b.jsxs(hxe,{children:[b.jsxs(pxe,{children:[b.jsx(Pj,{children:b.jsxs(gxe,{className:"buttonsStrip",children:[!u&&b.jsx(Dxe,{extraControlButtons:r,gridActions:m,gridSelectors:w,eshopSelect:n,quickFilter:c,displayColumnsDefinitions:be,filters:F,setDisplayManageColumnButton:k}),x&&b.jsx(vxe,{type:"button",variant:"ghost",appearance:"primary",iconLeft:b.jsx(rO,{}),onClick:G,children:b.jsx(Dp,{variant:"semiBold",mt:0,mb:0,children:b.jsx(vn,{id:"manageColumn.title",message:"Manage column"})})})]})}),b.jsx(mxe,{...v,...B,filters:F,gridRef:P,height:T,floatingButtonProps:f,handleDragEnd:ne(!1),displayColumnsDefinitions:be,hasColouredRows:!0})]}),b.jsx(Pj,{children:b.jsxs(fxe,{ref:D,isFixed:!!T,children:[o&&b.jsx(iEe,{rowsData:C,onBatchAction:i,gridActions:m,gridSelectors:w,actionColumn:S,processCheckedValues:o,processCheckedValuesTitle:l}),b.jsxs(ot.div,{display:"flex",justifyContent:"center",alignItems:"center",className:"paginatorWrapper",w:"100%",h:window.innerWidth>1204?"60px":"32px",children:[b.jsx(oN,{page:w==null?void 0:w.page,itemCount:v==null?void 0:v.totalRowsCount,itemPerPage:(w==null?void 0:w.rowsPerPage)||10,onPageChange:m==null?void 0:m.setPage,customPaginationHandler:p,radius:window.innerWidth<768?3:5,rate:window.innerWidth<768?1:4}),b.jsx(cEe,{gridActions:m,gridSelectors:w,customPaginationHandler:p})]})]})}),U&&b.jsx(ob,{title:b.jsx(vn,{id:"manageColumn.title",message:"Manage columns"}),onClose:he,onCancel:he,onExtraAction:Y,onConfirm:$,width:"auto",minWidth:"350px",hasFooter:!0,extraActionLabel:b.jsx(vn,{id:"dataGrid.buttonClearConfig",message:"Reset config"}),cancelLabel:b.jsx(vn,{id:"form.buttonCancel",message:"Cancel"}),confirmLabel:b.jsx(vn,{id:"form.buttonConfirm",message:"Confirm"}),children:b.jsx(hEe,{columns:fe,columnsConfigValues:j,setColumnsConfigOptions:V,handleDragEnd:ne(!0)})})]})};var x9={};/**
3768
+ `,fEe=({column:e,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:n,innerRef:i,draggableProps:o,dragHandleProps:l})=>{var m,w,C,S;const[u,c]=I.useState((t==null?void 0:t.includes(e.name))??!1),f=I.useMemo(()=>({...o==null?void 0:o.style}),[o]),h=Lj.isObject(e==null?void 0:e.title)&&"props"in e.title&&((m=e.title)==null?void 0:m.props)&&ht._({id:(C=(w=e.title)==null?void 0:w.props)==null?void 0:C.id,message:(S=e.title)==null?void 0:S.props.message}),p=h&&h.toLocaleLowerCase().includes(n.toLocaleLowerCase())&&!e.alwaysOn,v=I.useCallback(()=>{r(x=>({...x,[e.name]:u?{isHidden:!0}:{}})),c(!u)},[r,u,e.name]);return b.jsxs(dEe,{$isVisible:p,...o,...l,ref:i,style:f,children:[b.jsxs(ot.div,{display:"flex",alignItems:"center",children:[b.jsx(ot.div,{w:"28px",children:b.jsx(Zf,{name:"",variant:"grid",onChange:v,spaceAround:!1,checked:u})}),b.jsx(Dp,{variant:"medium",ml:"8px",children:h})]}),b.jsx(iO,{})]})},hEe=({columns:e,columnsConfigValues:t,setColumnsConfigOptions:r,handleDragEnd:n})=>{const[i,o]=I.useState(""),l=I.useCallback(c=>{o(c.target.value)},[o]),u=I.useCallback(()=>{o("")},[o]);return b.jsxs(ot.div,{children:[b.jsx(Rl,{icon:"search",type:"text",value:i,placeholder:ht._({id:"manageColumn.searchPlaceholder",message:"Find column..."}),onChange:l,onClear:u,variant:"gray"}),b.jsx(NV,{onDragEnd:n,children:b.jsx(q7,{droppableId:"droppable",direction:"vertical",children:c=>b.jsx(ot.div,{h:"400px",overflowY:"scroll",mt:"20px",ref:c.innerRef,...c.droppableProps,children:e==null?void 0:e.map((f,h)=>b.jsx(YV,{draggableId:f.name,index:h,isDragDisabled:!!i,children:(p,v)=>b.jsx(fEe,{column:f,innerRef:p.innerRef,columnsConfigValues:t,setColumnsConfigOptions:r,searchedValue:i,draggableProps:p.draggableProps,dragHandleProps:p.dragHandleProps},h)},f.name))})})})]})},pEe=e=>{const{optimizeFilters:t=!1,extraControlButtons:r,eshopSelect:n,onBatchAction:i,processCheckedValues:o,processCheckedValuesTitle:l,hideControlButtons:u,quickFilter:c,floatingButtonProps:f,queryRowsParam:h,customPaginationHandler:p,...v}=e,{gridActions:m,gridSelectors:w,rowsData:C,actionColumnDefinition:S}=v,[x,k]=I.useState(!1),{gridHeight:T,gridRef:P,paginationRef:D}=ipe();I.useEffect(()=>{var Z;if(!h&&T&&T>0){const X=Math.max(Math.floor(T/_6e-2),N6e);X&&((Z=m.setRowsPerPage)==null||Z.call(m,X))}},[T,m,h]);const B=g5e(v),F=I.useMemo(()=>L6e(t),[t]),W=B.columnsDefinitions,{onOpen:G,isOpen:U,onClose:R}=sb(),{columnsConfigValues:j,setColumnsConfigOptions:V,onConfirmForm:$,resetColumnConfig:Y,handleDragEnd:ne,onCloseForm:he,displayColumnsDefinitions:be,manageColumnsFormDefinitions:fe}=v5e({columns:W,gridActions:m,gridSelectors:w,onClose:R});return b.jsxs(hxe,{children:[b.jsxs(pxe,{children:[b.jsx(Pj,{children:b.jsxs(gxe,{className:"buttonsStrip",children:[!u&&b.jsx(Dxe,{extraControlButtons:r,gridActions:m,gridSelectors:w,eshopSelect:n,quickFilter:c,displayColumnsDefinitions:be,filters:F,setDisplayManageColumnButton:k}),x&&b.jsx(vxe,{type:"button",variant:"ghost",appearance:"primary",iconLeft:b.jsx(rO,{}),onClick:G,children:b.jsx(Dp,{variant:"semiBold",mt:0,mb:0,children:b.jsx(vn,{id:"manageColumn.title",message:"Manage column"})})})]})}),b.jsx(mxe,{...v,...B,filters:F,gridRef:P,height:T,floatingButtonProps:f,handleDragEnd:ne(!1),displayColumnsDefinitions:be,hasColouredRows:!0})]}),b.jsx(Pj,{children:b.jsxs(fxe,{ref:D,isFixed:!!T,children:[o&&b.jsx(iEe,{rowsData:C,onBatchAction:i,gridActions:m,gridSelectors:w,actionColumn:S,processCheckedValues:o,processCheckedValuesTitle:l}),b.jsxs(ot.div,{display:"flex",justifyContent:"center",alignItems:"center",className:"paginatorWrapper",w:"100%",h:window.innerWidth>1204?"60px":"32px",children:[b.jsx(oN,{page:w==null?void 0:w.page,itemCount:v==null?void 0:v.totalRowsCount,itemPerPage:(w==null?void 0:w.rowsPerPage)||10,onPageChange:m==null?void 0:m.setPage,customPaginationHandler:p,radius:window.innerWidth<768?3:5,rate:window.innerWidth<768?1:4}),b.jsx(cEe,{gridActions:m,gridSelectors:w,customPaginationHandler:p})]})]})}),U&&b.jsx(ob,{title:b.jsx(vn,{id:"manageColumn.title",message:"Manage columns"}),onClose:he,onCancel:he,onExtraAction:Y,onConfirm:$,width:"auto",minWidth:"350px",hasFooter:!0,extraActionLabel:b.jsx(vn,{id:"dataGrid.buttonClearConfig",message:"Reset config"}),cancelLabel:b.jsx(vn,{id:"form.buttonCancel",message:"Cancel"}),confirmLabel:b.jsx(vn,{id:"form.buttonConfirm",message:"Confirm"}),children:b.jsx(hEe,{columns:fe,columnsConfigValues:j,setColumnsConfigOptions:V,handleDragEnd:ne(!0)})})]})};var x9={};/**
3763
3769
  * @license React
3764
3770
  * use-sync-external-store-with-selector.production.min.js
3765
3771
  *