@internxt/ui 0.1.7 → 0.1.8

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:a,notifications:v,iconDataCy:y,isActive:S=!1,isCollapsed:_=!1,subsection:R=!1})=>o.jsx("button",{onClick:a,"data-cy":y,className:`flex w-full flex-col overflow-hidden 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-between min-h-[36px]",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",className:"flex-shrink-0"}),o.jsx("p",{className:`font-medium whitespace-nowrap overflow-hidden transition-all duration-300 ${_?"opacity-0 delay-200":"opacity-100 delay-0"}`,children:f})]}),o.jsx("div",{className:`flex rounded-full px-2 py-1 transition-all duration-300 ${S?"text-white bg-primary":"bg-gray-10 text-gray-60"} ${_||!v?"opacity-0 invisible delay-300":"opacity-100 delay-0"}`,children:v&&o.jsx("p",{className:"text-xs font-medium",children:v})})]})}),xp=({options:f,isCollapsed:p,showSubsections:a})=>o.jsx("div",{className:"flex flex-col w-full",children:f.filter(v=>v.isVisible).map((v,y)=>v.subsection&&!a||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:a,isCollapsed:v,className:y,onToggleCollapse:S,suiteLauncher:_})=>o.jsxs("div",{className:`flex flex-row justify-between w-full py-5 px-2 ${y}`,children:[o.jsxs("div",{className:"relative flex flex-row gap-2 items-center",children:[o.jsxs("button",{className:"flex flex-row gap-2 items-center",onClick:a,children:[o.jsx("img",{src:f,width:28,alt:p,className:`flex-shrink-0 ${v?"group-hover:hidden":""}`}),!v&&o.jsx("p",{className:"text-xl font-medium text-gray-100 whitespace-nowrap",children:p})]}),v&&S&&o.jsx("button",{onClick:S,className:"hidden group-hover:flex items-center justify-center text-gray-80 absolute left-0",children:o.jsx(Ne.SidebarSimpleIcon,{size:28})})]}),o.jsxs("div",{className:`flex z-20 flex-row gap-2 items-center transition-opacity duration-100 ${v?"opacity-0 invisible":"opacity-100"}`,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.SidebarSimpleIcon,{size:28})})]})]}),_p=({usage:f,limit:p,percentage:a,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:`${a}%`}})})]}),yp=({header:f,primaryAction:p,suiteLauncher:a,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-[60px]":"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:a,className:f.className}),o.jsxs("div",{className:"flex flex-col gap-4 overflow-hidden",children:[o.jsxs("div",{className:"relative",children:[!_&&o.jsx("div",{className:"transition-opacity duration-300 opacity-100",children:p}),_&&o.jsx("div",{className:"transition-opacity duration-300 opacity-100",children:v})]}),o.jsx(xp,{options:y,isCollapsed:_,showSubsections:S})]})]}),R&&o.jsx("div",{className:`transition-all overflow-hidden duration-300 ${_?"opacity-0 invisible delay-200":"opacity-100 delay-0"}`,children: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=F0;exports.Button=hi;exports.Card=U0;exports.Checkbox=$a;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=ap;exports.Loader=po;exports.Menu=Pa;exports.Modal=up;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:a,notifications:v,iconDataCy:y,isActive:S=!1,isCollapsed:_=!1,subsection:R=!1})=>o.jsx("button",{onClick:a,"data-cy":y,className:`flex w-full flex-col overflow-hidden 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-between min-h-[36px]",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",className:"flex-shrink-0"}),o.jsx("p",{className:`font-medium whitespace-nowrap overflow-hidden transition-all duration-300 ${_?"opacity-0 delay-200":"opacity-100 delay-0"}`,children:f})]}),o.jsx("div",{className:`flex rounded-full px-2 py-1 transition-all duration-300 ${S?"text-white bg-primary":"bg-gray-10 text-gray-60"} ${_||!v?"opacity-0 invisible delay-300":"opacity-100 delay-0"}`,children:v&&o.jsx("p",{className:"text-xs font-medium",children:v})})]})}),xp=({options:f,isCollapsed:p,showSubsections:a})=>o.jsx("div",{className:"flex flex-col w-full",children:f.filter(v=>v.isVisible).map((v,y)=>v.subsection&&!a||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:a,isCollapsed:v,className:y,onToggleCollapse:S,suiteLauncher:_})=>o.jsxs("div",{className:`flex flex-row justify-between w-full py-5 px-2 ${y}`,children:[o.jsxs("div",{className:"relative flex flex-row gap-2 items-center",children:[o.jsxs("button",{className:"flex flex-row gap-2 items-center",onClick:a,children:[o.jsx("img",{src:f,width:28,height:28,alt:p,className:`flex-shrink-0 min-w-[28px] min-h-[28px] ${v?"group-hover:hidden":""}`}),!v&&o.jsx("p",{className:"text-xl font-medium text-gray-100 whitespace-nowrap",children:p})]}),v&&S&&o.jsx("button",{onClick:S,className:"hidden group-hover:flex items-center justify-center text-gray-80 absolute left-0",children:o.jsx(Ne.SidebarSimpleIcon,{size:28})})]}),o.jsxs("div",{className:`flex z-20 flex-row gap-2 items-center transition-opacity duration-100 ${v?"opacity-0 invisible":"opacity-100"}`,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.SidebarSimpleIcon,{size:28})})]})]}),_p=({usage:f,limit:p,percentage:a,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:`${a}%`}})})]}),yp=({header:f,primaryAction:p,suiteLauncher:a,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-[60px]":"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:a,className:f.className}),o.jsxs("div",{className:"flex flex-col gap-4 overflow-hidden",children:[o.jsxs("div",{className:"relative",children:[!_&&o.jsx("div",{className:"transition-opacity duration-300 opacity-100",children:p}),_&&o.jsx("div",{className:"transition-opacity duration-300 opacity-100",children:v})]}),o.jsx(xp,{options:y,isCollapsed:_,showSubsections:S})]})]}),R&&o.jsx("div",{className:`transition-all overflow-hidden duration-300 ${_?"opacity-0 invisible delay-200":"opacity-100 delay-0"}`,children: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=F0;exports.Button=hi;exports.Card=U0;exports.Checkbox=$a;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=ap;exports.Loader=po;exports.Menu=Pa;exports.Modal=up;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