@internxt/ui 0.1.5 → 0.1.6

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 CHANGED
@@ -137,5 +137,5 @@ function print() { __p += __j.call(arguments, '') }
137
137
  ${f?"border-gray-5 text-gray-40":"border-gray-20 text-gray-100"}
138
138
  ${!p&&"border-gray-20 focus:border-primary focus:ring focus:ring-primary/10"}
139
139
  ${p==="red"&&"border-red focus:ring focus:ring-red/10"}
140
- `,value:v,onChange:y,name:S}),bo=({label:f,Icon:p,onClick:u,notifications:v,iconDataCy:y,isActive:S=!1,isCollapsed:_=!1,subsection:R=!1})=>o.jsx("button",{onClick:u,"data-cy":y,className:`flex w-full flex-col focus-visible:bg-gray-10 rounded-lg ${S?"bg-primary/20":"hover:bg-gray-5"} ${R?"pl-5":""}`,title:_?f:void 0,children:o.jsxs("div",{className:`flex flex-row px-2.5 py-2 w-full items-center ${_?"justify-center":"justify-between"}`,children:[o.jsxs("div",{className:`flex flex-row gap-3 items-center ${S?"text-primary":"text-gray-80"}`,children:[o.jsx(p,{size:20,weight:S?"fill":"regular"}),!_&&o.jsx("p",{className:"font-medium",children:f})]}),!_&&v&&o.jsx("div",{className:`flex rounded-full px-2 py-1 ${S?"text-white bg-primary":"bg-gray-10 text-gray-60"}`,children:o.jsx("p",{className:"text-xs font-medium",children:v})})]})}),xp=({options:f,isCollapsed:p,showSubsections:u})=>o.jsx("div",{className:"flex flex-col w-full",children:f.filter(v=>v.isVisible).map((v,y)=>v.subsection&&!u||p&&v.subsection?null:o.jsx(bo,{label:v.label,Icon:v.icon,iconDataCy:v.iconDataCy,isActive:v.isActive,notifications:v.notifications,onClick:v.onClick,isCollapsed:p,subsection:v.subsection},`${v.iconDataCy}-${y}`))}),mp=({logo:f,title:p,onClick:u,isCollapsed:v,className:y,onToggleCollapse:S,suiteLauncher:_})=>o.jsx("div",{className:`flex flex-row justify-between w-full py-5 px-2 ${y} ${v?"justify-center":""}`,children:v?o.jsx("div",{className:"relative flex items-center justify-center w-full",children:o.jsxs("button",{className:"flex flex-row gap-2 items-center",onClick:u,children:[o.jsx("img",{src:f,width:28,alt:p,className:"group-hover:hidden"}),S&&o.jsx("button",{onClick:R=>{R.stopPropagation(),S()},className:"hidden group-hover:flex items-center justify-center text-gray-50",children:o.jsx(Ne.SidebarIcon,{size:28})})]})}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:"flex flex-row gap-2 items-center",onClick:u,children:[o.jsx("img",{src:f,width:28,alt:p}),o.jsx("p",{className:"text-xl font-medium text-gray-100",children:p})]}),o.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[_&&o.jsx(wo,{suiteArray:_?.suiteArray,soonText:_?.soonText,className:_?.className,align:"left"}),S&&o.jsx("button",{onClick:S,className:"flex items-center justify-center text-gray-50 hover:text-gray-70",children:o.jsx(Ne.SidebarIcon,{size:28})})]})]})}),_p=({usage:f,limit:p,percentage:u,onUpgradeClick:v,upgradeLabel:y,isLoading:S=!0})=>o.jsxs("div",{className:"flex flex-col w-full gap-2.5 px-2 pb-5",children:[o.jsxs("div",{className:"flex flex-row w-full justify-between",children:[o.jsx("div",{className:"flex flex-row items-center gap-2",children:S?o.jsxs("div",{className:"flex flex-row items-center gap-2",children:[o.jsx("div",{className:"h-3 w-8 rounded-lg bg-gray-5 animate-pulse"}),o.jsx("div",{className:"h-3 w-2 rounded-lg bg-gray-5 animate-pulse"}),o.jsx("div",{className:"h-3 w-8 rounded-lg bg-gray-5 animate-pulse"})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-gray-60 text-sm font-semibold",children:f}),o.jsx("p",{className:"text-gray-60 text-sm",children:"/"}),o.jsx("p",{className:"text-gray-60 text-sm",children:p})]})}),y&&o.jsx("button",{className:"text-primary text-sm hover:text-primary-dark font-semibold",onClick:v,children:y})]}),o.jsx("div",{className:"flex w-full h-1.5 bg-gray-10 rounded-full",children:o.jsx("div",{className:"bg-gray-60 rounded-full",style:{width:`${u}%`}})})]}),yp=({header:f,primaryAction:p,suiteLauncher:u,collapsedPrimaryAction:v,options:y,showSubsections:S,isCollapsed:_=!1,storage:R,onToggleCollapse:T})=>o.jsxs("div",{className:`relative flex flex-col p-2 h-full justify-between bg-gray-1 border-r border-gray-10 transition-all duration-300 group ${_?"w-16":"w-64"}`,children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsx(mp,{logo:f.logo,title:f.title,onClick:f.onClick,isCollapsed:_,onToggleCollapse:T,suiteLauncher:u,className:f.className}),o.jsxs("div",{className:"flex flex-col gap-4",children:[_?v:p,o.jsx(xp,{options:y,isCollapsed:_,showSubsections:S})]})]}),!_&&R&&o.jsx(_p,{usage:R.usage,limit:R.limit,percentage:R.percentage,onUpgradeClick:R.onUpgradeClick,upgradeLabel:R.upgradeLabel,isLoading:R.isLoading})]});exports.Avatar=k0;exports.BaseDialog=M0;exports.Breadcrumbs=W0;exports.Button=hi;exports.Card=U0;exports.Checkbox=$u;exports.CircleButton=B0;exports.ContextMenu=vo;exports.Copyable=G0;exports.Dialog=Y0;exports.Dropdown=go;exports.Empty=q0;exports.Header=X0;exports.InfiniteScroll=mo;exports.Input=Z0;exports.List=up;exports.Loader=po;exports.Menu=Pu;exports.Modal=ap;exports.Popover=yo;exports.RadioButton=op;exports.RangeSlider=lp;exports.Sidenav=yp;exports.SidenavItem=bo;exports.SkeletonLoader=_o;exports.SuiteLauncher=wo;exports.SwitchComponent=fp;exports.Table=cp;exports.TableBody=hp;exports.TableCell=pp;exports.TableHeader=dp;exports.TableRow=gp;exports.TextArea=vp;exports.Tooltip=xo;exports.TransparentModal=sp;
140
+ `,value:v,onChange:y,name:S}),bo=({label:f,Icon:p,onClick:u,notifications:v,iconDataCy:y,isActive:S=!1,isCollapsed:_=!1,subsection:R=!1})=>o.jsx("button",{onClick:u,"data-cy":y,className:`flex w-full flex-col focus-visible:bg-gray-10 rounded-lg ${S?"bg-primary/20":"hover:bg-gray-5"} ${R?"pl-5":""}`,title:_?f:void 0,children:o.jsxs("div",{className:`flex flex-row px-2.5 py-2 w-full items-center ${_?"justify-center":"justify-between"}`,children:[o.jsxs("div",{className:`flex flex-row gap-3 items-center ${S?"text-primary":"text-gray-80"}`,children:[o.jsx(p,{size:20,weight:S?"fill":"regular"}),!_&&o.jsx("p",{className:"font-medium",children:f})]}),!_&&v&&o.jsx("div",{className:`flex rounded-full px-2 py-1 ${S?"text-white bg-primary":"bg-gray-10 text-gray-60"}`,children:o.jsx("p",{className:"text-xs font-medium",children:v})})]})}),xp=({options:f,isCollapsed:p,showSubsections:u})=>o.jsx("div",{className:"flex flex-col w-full",children:f.filter(v=>v.isVisible).map((v,y)=>v.subsection&&!u||p&&v.subsection?null:o.jsx(bo,{label:v.label,Icon:v.icon,iconDataCy:v.iconDataCy,isActive:v.isActive,notifications:v.notifications,onClick:v.onClick,isCollapsed:p,subsection:v.subsection},`${v.iconDataCy}-${y}`))}),mp=({logo:f,title:p,onClick:u,isCollapsed:v,className:y,onToggleCollapse:S,suiteLauncher:_})=>o.jsx("div",{className:`flex flex-row justify-between w-full py-5 px-2 ${y} ${v?"justify-center":""}`,children:v?o.jsx("div",{className:"relative flex items-center justify-center w-full",children:o.jsxs("button",{className:"flex flex-row gap-2 items-center",onClick:u,children:[o.jsx("img",{src:f,width:28,alt:p,className:"group-hover:hidden"}),S&&o.jsx("button",{onClick:R=>{R.stopPropagation(),S()},className:"hidden group-hover:flex items-center justify-center text-gray-80",children:o.jsx(Ne.SidebarIcon,{size:28})})]})}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:"flex flex-row gap-2 items-center",onClick:u,children:[o.jsx("img",{src:f,width:28,alt:p}),o.jsx("p",{className:"text-xl font-medium text-gray-100",children:p})]}),o.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[_&&o.jsx(wo,{suiteArray:_?.suiteArray,soonText:_?.soonText,className:`text-gray-80 ${_?.className}`,align:"left"}),S&&o.jsx("button",{onClick:S,className:"flex items-center justify-center text-gray-80 hover:text-gray-90",children:o.jsx(Ne.SidebarIcon,{size:28})})]})]})}),_p=({usage:f,limit:p,percentage:u,onUpgradeClick:v,upgradeLabel:y,isLoading:S=!0})=>o.jsxs("div",{className:"flex flex-col w-full gap-2.5 px-2 pb-5",children:[o.jsxs("div",{className:"flex flex-row w-full justify-between",children:[o.jsx("div",{className:"flex flex-row items-center gap-2",children:S?o.jsxs("div",{className:"flex flex-row items-center gap-2",children:[o.jsx("div",{className:"h-3 w-8 rounded-lg bg-gray-5 animate-pulse"}),o.jsx("div",{className:"h-3 w-2 rounded-lg bg-gray-5 animate-pulse"}),o.jsx("div",{className:"h-3 w-8 rounded-lg bg-gray-5 animate-pulse"})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-gray-60 text-sm font-semibold",children:f}),o.jsx("p",{className:"text-gray-60 text-sm",children:"/"}),o.jsx("p",{className:"text-gray-60 text-sm",children:p})]})}),y&&o.jsx("button",{className:"text-primary text-sm hover:text-primary-dark font-semibold",onClick:v,children:y})]}),o.jsx("div",{className:"flex w-full h-1.5 bg-gray-10 rounded-full",children:o.jsx("div",{className:"bg-gray-60 rounded-full",style:{width:`${u}%`}})})]}),yp=({header:f,primaryAction:p,suiteLauncher:u,collapsedPrimaryAction:v,options:y,showSubsections:S,isCollapsed:_=!1,storage:R,onToggleCollapse:T})=>o.jsxs("div",{className:`relative flex flex-col p-2 h-full justify-between bg-gray-1 border-r border-gray-10 transition-all duration-300 group ${_?"w-16":"w-64"}`,children:[o.jsxs("div",{className:"flex flex-col",children:[o.jsx(mp,{logo:f.logo,title:f.title,onClick:f.onClick,isCollapsed:_,onToggleCollapse:T,suiteLauncher:u,className:f.className}),o.jsxs("div",{className:"flex flex-col gap-4",children:[_?v:p,o.jsx(xp,{options:y,isCollapsed:_,showSubsections:S})]})]}),!_&&R&&o.jsx(_p,{usage:R.usage,limit:R.limit,percentage:R.percentage,onUpgradeClick:R.onUpgradeClick,upgradeLabel:R.upgradeLabel,isLoading:R.isLoading})]});exports.Avatar=k0;exports.BaseDialog=M0;exports.Breadcrumbs=W0;exports.Button=hi;exports.Card=U0;exports.Checkbox=$u;exports.CircleButton=B0;exports.ContextMenu=vo;exports.Copyable=G0;exports.Dialog=Y0;exports.Dropdown=go;exports.Empty=q0;exports.Header=X0;exports.InfiniteScroll=mo;exports.Input=Z0;exports.List=up;exports.Loader=po;exports.Menu=Pu;exports.Modal=ap;exports.Popover=yo;exports.RadioButton=op;exports.RangeSlider=lp;exports.Sidenav=yp;exports.SidenavItem=bo;exports.SkeletonLoader=_o;exports.SuiteLauncher=wo;exports.SwitchComponent=fp;exports.Table=cp;exports.TableBody=hp;exports.TableCell=pp;exports.TableHeader=dp;exports.TableRow=gp;exports.TextArea=vp;exports.Tooltip=xo;exports.TransparentModal=sp;
141
141
  //# sourceMappingURL=index.cjs.js.map