@dev-blinq/ui-systems 1.0.83 → 1.0.84

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.js CHANGED
@@ -289,7 +289,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${n}Chann
289
289
  opacity: ${({disabled:e})=>e?.5:1};
290
290
  cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
291
291
  position: sticky;
292
- bottom: -6px;
292
+ bottom: 0px;
293
293
  background-color: white;
294
294
  z-index: 2;
295
295
  `,du=be(I.Box)`
@@ -298,6 +298,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${n}Chann
298
298
  align-items: center;
299
299
  width: 100%;
300
300
  margin-top: 8px;
301
+ margin-bottom: 8px;
301
302
  padding: 10px;
302
303
  color: var(--color-grey-80);
303
304
  &:hover {
@@ -311,4 +312,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${n}Chann
311
312
  flex: 1;
312
313
  gap: 8px;
313
314
  width: 100%;
314
- `;function fu(e){return Je({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function pu(e){return Je({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(e)}function gu(e){return Je({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"},child:[]}]})(e)}function hu({value:e,onChange:n,options:t,onEdit:r,label:a,placeholder:i="Select option",showEditIcon:s=!0,showAddOption:c=!0,showDeleteIcon:f=!0,addOptionLabel:p="Add an option",fullWidth:h=!0,onSave:d,noInlineAction:m,onDelete:x,disabledAddOption:v=!1,menuWidth:u,width:A,disabled:T,maxChar:k=80,showWarningForTextLength:w=!1}){const[M,b]=q.useState(!1),[_,D]=q.useState(null),[ie,W]=q.useState(""),[o,B]=q.useState(!1),[L,$]=q.useState(""),te=E=>{n(E.target.value)},oe=(E,R,F)=>{m?(r==null||r(R,R),S(!1)):(E.stopPropagation(),D(R),W(F))},de=(E,R)=>{ie.trim()&&r&&r(R,ie.trim()),S(!1)},ge=E=>{E.stopPropagation(),S(!0)},Me=E=>{v||(m?(d==null||d(""),S(!1)):(E.stopPropagation(),$(""),B(!0)))},ke=()=>{d==null||d(L),S(!1)},S=E=>{b(E),D(""),W(""),$(""),B(!1)},N=(E,R)=>{E.stopPropagation(),x==null||x(R),S(!1)};return g.jsxs(I.Box,{display:"flex",width:A||"100%",flexDirection:"column",gap:.5,children:[a&&g.jsx(_e,{value:a,weight:"medium",color:"var(--color-grey-80)"}),g.jsx(I.FormControl,{fullWidth:h,disabled:T,children:g.jsxs(su,{value:e,onChange:te,open:M,IconComponent:pu,onOpen:()=>S(!0),onClose:()=>S(!1),renderValue:E=>{const R=t.find(F=>F.value===E);return g.jsxs(I.Box,{display:"flex",gap:1.5,alignItems:"center",width:"100%",children:[g.jsx(I.Box,{display:"flex",alignItems:"center",children:R==null?void 0:R.icon}),g.jsx(_e,{value:R==null?void 0:R.label,weight:"bold",color:"secondary",shouldTruncate:!0})]})},MenuProps:{PaperProps:{sx:{width:u||"inherit",borderRadius:"12px",marginTop:"8px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.1)",maxHeight:"calc(100vh - 200px)",overflow:"hidden","& .MuiList-root":{padding:"8px",height:"100%",overflowY:"auto"},border:"1px solid var(--color-grey-50)"}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableAutoFocusItem:!0,disableAutoFocus:!0,disableScrollLock:!0,keepMounted:!0},children:[g.jsx(cu,{disabled:!0,noData:t.length===0,children:i}),t.map(E=>g.jsx(uu,{value:E.value,isEditMode:_===E.value,classes:{selected:"selected-option",focusVisible:"selected-focus-visible"},children:_===E.value?g.jsxs(I.Box,{width:"100%",children:[g.jsxs(zr,{onClick:R=>R.stopPropagation(),onKeyDown:R=>R.stopPropagation(),children:[g.jsxs(I.Box,{display:"flex",gap:1,alignItems:"center",width:"100%",children:[E.icon,g.jsx(Mt,{size:"small",value:ie,onChange:R=>{R.stopPropagation(),(R.target.value.length<=k||!w)&&W(R.target.value)},onKeyDown:R=>{R.stopPropagation(),R.key==="Enter"?de(R,E.value):R.key==="Escape"&&ge(R)},autoFocus:!0,fullWidth:!0})]}),g.jsxs(I.Box,{display:"flex",children:[g.jsx(I.IconButton,{size:"small",onClick:R=>de(R,E.value),disabled:!ie||ie===E.value,children:g.jsx(Vr,{size:20})}),g.jsx(I.IconButton,{size:"small",onClick:ge,children:g.jsx(Wr,{size:16})})]})]}),w&&g.jsx(_e,{value:`Max ${k} characters are allowed`,color:"primary",pt:.2,pl:2.8})]}):g.jsxs(g.Fragment,{children:[g.jsxs(I.Box,{display:"flex",gap:1.5,alignItems:"center",width:"calc(100% - 60px)",children:[g.jsx(I.Box,{display:"flex",alignItems:"center",children:E==null?void 0:E.icon}),g.jsx(_e,{value:E==null?void 0:E.label,color:"secondary",shouldTruncate:!0,weight:e===E.value?"bold":"medium"})]}),g.jsxs(I.Box,{display:"flex",gap:.2,children:[f&&x&&!E.notHavePermission&&e!==E.value&&g.jsx(I.IconButton,{size:"small",onClick:R=>N(R,E.value),children:g.jsx(gu,{size:18})}),s&&r&&!E.notHavePermission&&g.jsx(I.IconButton,{size:"small",onClick:R=>oe(R,E.value,E.label),disabled:E.notHavePermission,children:g.jsx(fu,{size:16})})]})]})},E.value)),c&&d&&g.jsx(lu,{disabled:v,children:o?g.jsxs(I.Box,{width:"100%",children:[g.jsxs(zr,{onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),pt:1,children:[g.jsx(Mt,{size:"small",value:L,onChange:E=>{E.stopPropagation(),(E.target.value.length<=k||!w)&&$(E.target.value)},onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?ke():E.key==="Escape"&&ge(E)},autoFocus:!0,fullWidth:!0}),g.jsxs(I.Box,{display:"flex",children:[g.jsx(I.IconButton,{size:"small",onClick:ke,disabled:!L,children:g.jsx(Vr,{size:20})}),g.jsx(I.IconButton,{size:"small",onClick:ge,children:g.jsx(Wr,{size:16})})]})]}),w&&g.jsx(_e,{value:`Max ${k} characters are allowed`,color:"primary",pt:.2,pl:1})]}):g.jsxs(du,{onClick:Me,children:[g.jsx(ou,{size:20}),g.jsx(_e,{value:p,weight:"semi",color:"var(--color-grey-80)"})]})})]})})]})}function mu(e,n){return e.length>n?e.substring(0,n-3)+"...":e}function yu(e,n){return e.length>n}exports.Button=Ya;exports.CustomCheckbox=gi;exports.CustomInput=fi;exports.CustomMenu=Io;exports.CustomRadioButton=hi;exports.CustomText=_e;exports.CustomTextArea=pi;exports.CustomToggleSwitch=mi;exports.IconButtonCustom=So;exports.LinearProgressBar=tu;exports.MUIButton=au;exports.MUIInput=Mt;exports.MUISelect=hu;exports.MUITabs=To;exports.Tag=Po;exports.Tooltip=ko;exports.Transitioner=yi;exports.TypographyCustom=$e;exports.isTextLarge=yu;exports.textShortner=mu;
315
+ `;function fu(e){return Je({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function pu(e){return Je({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(e)}function gu(e){return Je({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"},child:[]}]})(e)}function hu({value:e,onChange:n,options:t,onEdit:r,label:a,placeholder:i="Select option",showEditIcon:s=!0,showAddOption:c=!0,showDeleteIcon:f=!0,addOptionLabel:p="Add an option",fullWidth:h=!0,onSave:d,noInlineAction:m,onDelete:x,disabledAddOption:v=!1,menuWidth:u,width:A,disabled:T,maxChar:k=80,showWarningForTextLength:w=!1}){const[M,b]=q.useState(!1),[_,D]=q.useState(null),[ie,W]=q.useState(""),[o,B]=q.useState(!1),[L,$]=q.useState(""),te=E=>{n(E.target.value)},oe=(E,R,F)=>{m?(r==null||r(R,R),S(!1)):(E.stopPropagation(),D(R),W(F))},de=(E,R)=>{ie.trim()&&r&&r(R,ie.trim()),S(!1)},ge=E=>{E.stopPropagation(),S(!0)},Me=E=>{v||(m?(d==null||d(""),S(!1)):(E.stopPropagation(),$(""),B(!0)))},ke=()=>{d==null||d(L),S(!1)},S=E=>{b(E),D(""),W(""),$(""),B(!1)},N=(E,R)=>{E.stopPropagation(),x==null||x(R),S(!1)};return g.jsxs(I.Box,{display:"flex",width:A||"100%",flexDirection:"column",gap:.5,children:[a&&g.jsx(_e,{value:a,weight:"medium",color:"var(--color-grey-80)"}),g.jsx(I.FormControl,{fullWidth:h,disabled:T,children:g.jsxs(su,{value:e,onChange:te,open:M,IconComponent:pu,onOpen:()=>S(!0),onClose:()=>S(!1),renderValue:E=>{const R=t.find(F=>F.value===E);return g.jsxs(I.Box,{display:"flex",gap:1.5,alignItems:"center",width:"100%",children:[g.jsx(I.Box,{display:"flex",alignItems:"center",children:R==null?void 0:R.icon}),g.jsx(_e,{value:R==null?void 0:R.label,weight:"bold",color:"var(--color-grey-90)",shouldTruncate:!0})]})},MenuProps:{PaperProps:{sx:{width:u||"inherit",borderRadius:"12px",marginTop:"6px",boxShadow:"0 10px 25px rgba(0, 0, 0, 0.1)",maxHeight:"calc(100vh - 200px)",overflow:"hidden","& .MuiList-root":{padding:"8px 8px 0px 8px",maxHeight:"inherit",overflowY:"auto"},border:"1px solid var(--color-grey-50)"}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableAutoFocusItem:!0,disableAutoFocus:!0,disableScrollLock:!0,keepMounted:!0},children:[g.jsx(cu,{disabled:!0,noData:t.length===0,children:i}),t.map(E=>g.jsx(uu,{value:E.value,isEditMode:_===E.value,classes:{selected:"selected-option",focusVisible:"selected-focus-visible"},children:_===E.value?g.jsxs(I.Box,{width:"100%",children:[g.jsxs(zr,{onClick:R=>R.stopPropagation(),onKeyDown:R=>R.stopPropagation(),children:[g.jsxs(I.Box,{display:"flex",gap:1,alignItems:"center",width:"100%",children:[E.icon,g.jsx(Mt,{size:"small",value:ie,onChange:R=>{R.stopPropagation(),(R.target.value.length<=k||!w)&&W(R.target.value)},onKeyDown:R=>{R.stopPropagation(),R.key==="Enter"?de(R,E.value):R.key==="Escape"&&ge(R)},autoFocus:!0,fullWidth:!0})]}),g.jsxs(I.Box,{display:"flex",children:[g.jsx(I.IconButton,{size:"small",onClick:R=>de(R,E.value),disabled:!ie||ie===E.value,children:g.jsx(Vr,{size:20})}),g.jsx(I.IconButton,{size:"small",onClick:ge,children:g.jsx(Wr,{size:16})})]})]}),w&&g.jsx(_e,{value:`Max ${k} characters are allowed`,color:"primary",pt:.2,pl:2.8})]}):g.jsxs(g.Fragment,{children:[g.jsxs(I.Box,{display:"flex",gap:1.5,alignItems:"center",width:"calc(100% - 60px)",children:[g.jsx(I.Box,{display:"flex",alignItems:"center",children:E==null?void 0:E.icon}),g.jsx(_e,{value:E==null?void 0:E.label,color:"var(--color-grey-90)",shouldTruncate:!0,weight:e===E.value?"bold":"medium"})]}),g.jsxs(I.Box,{display:"flex",gap:.2,children:[f&&x&&!E.notHavePermission&&e!==E.value&&g.jsx(I.IconButton,{size:"small",onClick:R=>N(R,E.value),children:g.jsx(gu,{size:18})}),s&&r&&!E.notHavePermission&&g.jsx(I.IconButton,{size:"small",onClick:R=>oe(R,E.value,E.label),disabled:E.notHavePermission,children:g.jsx(fu,{size:16})})]})]})},E.value)),c&&d&&g.jsx(lu,{disabled:v,children:o?g.jsxs(I.Box,{width:"100%",pb:1,children:[g.jsxs(zr,{onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),pt:1,children:[g.jsx(Mt,{size:"small",value:L,onChange:E=>{E.stopPropagation(),(E.target.value.length<=k||!w)&&$(E.target.value)},onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?ke():E.key==="Escape"&&ge(E)},autoFocus:!0,fullWidth:!0}),g.jsxs(I.Box,{display:"flex",children:[g.jsx(I.IconButton,{size:"small",onClick:ke,disabled:!L,children:g.jsx(Vr,{size:20})}),g.jsx(I.IconButton,{size:"small",onClick:ge,children:g.jsx(Wr,{size:16})})]})]}),w&&g.jsx(_e,{value:`Max ${k} characters are allowed`,color:"primary",pt:.2,pl:1})]}):g.jsxs(du,{onClick:Me,children:[g.jsx(ou,{size:20}),g.jsx(_e,{value:p,weight:"semi",color:"var(--color-grey-80)"})]})})]})})]})}function mu(e,n){return e.length>n?e.substring(0,n-3)+"...":e}function yu(e,n){return e.length>n}exports.Button=Ya;exports.CustomCheckbox=gi;exports.CustomInput=fi;exports.CustomMenu=Io;exports.CustomRadioButton=hi;exports.CustomText=_e;exports.CustomTextArea=pi;exports.CustomToggleSwitch=mi;exports.IconButtonCustom=So;exports.LinearProgressBar=tu;exports.MUIButton=au;exports.MUIInput=Mt;exports.MUISelect=hu;exports.MUITabs=To;exports.Tag=Po;exports.Tooltip=ko;exports.Transitioner=yi;exports.TypographyCustom=$e;exports.isTextLarge=yu;exports.textShortner=mu;
package/dist/index.mjs CHANGED
@@ -6346,7 +6346,7 @@ const bu = ve(fi)`
6346
6346
  opacity: ${({ disabled: e }) => e ? 0.5 : 1};
6347
6347
  cursor: ${({ disabled: e }) => e ? "not-allowed" : "pointer"};
6348
6348
  position: sticky;
6349
- bottom: -6px;
6349
+ bottom: 0px;
6350
6350
  background-color: white;
6351
6351
  z-index: 2;
6352
6352
  `, Eu = ve(ue)`
@@ -6355,6 +6355,7 @@ const bu = ve(fi)`
6355
6355
  align-items: center;
6356
6356
  width: 100%;
6357
6357
  margin-top: 8px;
6358
+ margin-bottom: 8px;
6358
6359
  padding: 10px;
6359
6360
  color: var(--color-grey-80);
6360
6361
  &:hover {
@@ -6452,7 +6453,7 @@ function Wu({
6452
6453
  {
6453
6454
  value: R == null ? void 0 : R.label,
6454
6455
  weight: "bold",
6455
- color: "secondary",
6456
+ color: "var(--color-grey-90)",
6456
6457
  shouldTruncate: !0
6457
6458
  }
6458
6459
  )
@@ -6463,15 +6464,15 @@ function Wu({
6463
6464
  sx: {
6464
6465
  width: u || "inherit",
6465
6466
  borderRadius: "12px",
6466
- marginTop: "8px",
6467
+ marginTop: "6px",
6467
6468
  boxShadow: "0 10px 25px rgba(0, 0, 0, 0.1)",
6468
6469
  maxHeight: "calc(100vh - 200px)",
6469
6470
  // or any desired scroll height
6470
6471
  overflow: "hidden",
6471
6472
  // prevent scroll bleeding
6472
6473
  "& .MuiList-root": {
6473
- padding: "8px",
6474
- height: "100%",
6474
+ padding: "8px 8px 0px 8px",
6475
+ maxHeight: "inherit",
6475
6476
  overflowY: "auto"
6476
6477
  },
6477
6478
  border: "1px solid var(--color-grey-50)"
@@ -6574,7 +6575,7 @@ function Wu({
6574
6575
  Le,
6575
6576
  {
6576
6577
  value: E == null ? void 0 : E.label,
6577
- color: "secondary",
6578
+ color: "var(--color-grey-90)",
6578
6579
  shouldTruncate: !0,
6579
6580
  weight: e === E.value ? "bold" : "medium"
6580
6581
  }
@@ -6605,7 +6606,7 @@ function Wu({
6605
6606
  },
6606
6607
  E.value
6607
6608
  )),
6608
- c && d && /* @__PURE__ */ g.jsx(xu, { disabled: v, children: o ? /* @__PURE__ */ g.jsxs(ue, { width: "100%", children: [
6609
+ c && d && /* @__PURE__ */ g.jsx(xu, { disabled: v, children: o ? /* @__PURE__ */ g.jsxs(ue, { width: "100%", pb: 1, children: [
6609
6610
  /* @__PURE__ */ g.jsxs(
6610
6611
  Jr,
6611
6612
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dev-blinq/ui-systems",
3
3
  "description": "this package contains all ui components like button, input, checkbox, colors that blinq.io needs",
4
- "version": "1.0.83",
4
+ "version": "1.0.84",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",