@kanda-libs/ks-design-library-new 0.0.36 → 0.0.37
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.esm.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as He}from"react/jsx-runtime";var Ae=function({children:e}){return He("div",{className:"p-4 border bg-lavender-100 border-lavender-200 rounded-xl text-lavender-200",children:e})},ke=Ae;import{Pagination as it}from"@kanda-libs/ks-design-library";import{SkeletonLoader as We}from"@kanda-libs/ks-design-library";import{Icon as Fe}from"@kanda-libs/ks-design-library";var X="flex px-3 py-1.75 h-9 -ml-3 my-auto rounded-lg bg-transparent hover:bg-neutral-100 text-style-g-em text-neutral-500 whitespace-nowrap z-20",j={icon:"chevron-down",stroke:"neutral-500",size:12,className:"ml-2 my-auto"},D={width:"calc(100% + 16px)"},x={container:{base:"w-full h-full overflow-hidden",padding:"pl-4 -ml-4"},flex:{base:"w-full h-full flex px-4 px-0",padding:"pl-4"}};import{jsx as Me,jsxs as Oe}from"react/jsx-runtime";var Ie=function({label:e,...t}){return Oe("button",{className:X,...t,children:[e,Me(Fe,{...j})]})},z=Ie;import $ from"clsx";function v(e){let t=e===0?D:{};return{classNames:{container:$(x.container.base,e===0?x.container.padding:""),flex:$(x.flex.base,e===0?"":x.flex.padding)},containerStyle:t}}import{jsx as V}from"react/jsx-runtime";var _e=function({index:e,children:t}){let{classNames:o,containerStyle:r}=v(e);return V("div",{className:o.container,style:r,children:V("div",{className:o.flex,children:t})})},U=_e;var E={Button:z,Wrapper:U};import Z from"clsx";var f={main:"flex h-14",loading:{base:"my-auto md:w-full mr-8",margin:"ml-4"},wrapper:{padding:"px-2 pt-2",popover:"pb-1"}};function L(e,t){return{classNames:{...f,loading:Z(f.loading.base,e===0?"":f.loading.margin),wrapper:Z(f.wrapper.padding,t?"":f.wrapper.popover)}}}import{jsx as C}from"react/jsx-runtime";var Be=function({index:e,isLoading:t=!1,popoverButtons:o=!1,label:r,...n}){let{classNames:a}=L(e,o);return C("div",{...n,className:a.main,children:C(We,{isLoading:t,wrapperClassName:a.loading,afterLoading:C(E.Wrapper,{index:e,children:C(E.Button,{label:r})})})})},Y=Be;var K={base:"flex-row h-14 border-b border-neutral-200"};function R(e,t){let{headers:o,getHeaderGroupProps:r}=e,n=r({}),a=t.filter(s=>s.isVisible).length;return{headers:o,headerGroupProps:n,totalVisible:a}}import{jsx as q}from"react/jsx-runtime";function Ge({headerGroup:e,columns:t,isLoading:o}){let{headerGroupProps:r,headers:n}=R(e,t);return q("div",{...r,className:K.base,children:n.map((a,s)=>q(Y,{index:s,label:a.render("Header"),isLoading:o,...a.getHeaderProps(a.getSortByToggleProps())}))})}var Q=Ge;import{SkeletonLoader as je,Text as De}from"@kanda-libs/ks-design-library";import Je from"clsx";var c={container:"flex w-full h-full",render:"w-full my-auto text-style-g text-neutral-600 whitespace-nowrap overflow-hidden overflow-ellipsis",renderLoading:"w-full my-auto mr-8 text-style-g",mobileLabel:"block md:hidden text-16-24-em text-neutral-600 mr-2",cell:{base:"px-4 py-1 md:pt-0 md:pr-0 md:pb-0 md:h-16 flex",compact:"h-8 flex",padding:"md:pl-4"}};function A(e,t,o){return{cell:Je(t?c.cell.compact:c.cell.base,e===0?"":c.cell.padding),container:c.container,render:o?c.renderLoading:c.render,mobileLabel:c.mobileLabel}}import{useIsDesktop as Xe}from"@kanda-libs/ks-design-library";function k(e){if(!e)return{};let t=Xe();return{...e,width:t?e==null?void 0:e.width:"100%"}}import{Fragment as $e,jsx as b,jsxs as Ve}from"react/jsx-runtime";var ze=function({render:e,index:t,compact:o=!1,isLoading:r=!1,label:n,...a}){let s=A(t,o,r),{style:l,...p}=a,i=k(l);return b("div",{...p,style:i,className:s.cell,children:b("div",{className:s.container,children:b("div",{className:s.render,children:b(je,{isLoading:r,afterLoading:Ve($e,{children:[b(De,{text:`${n}:`,className:s.mobileLabel}),e()]})})})})})},ee=ze;import{useClasses as Ue}from"@kanda-libs/ks-design-library";var te={base:"relative md:h-16 flex-col py-2 md:py-0 md:flex-row",compact:"relative h-8",border:"border-b border-neutral-200",hover:"group hover:bg-neutral-50 cursor-pointer",button:"hidden group-hover:block"};function H(e,t){return Ue(te,{base:[".base",e===9?"":".border",t?".hover":""],button:[".button"]})}import{jsx as oe}from"react/jsx-runtime";function Ze({cells:e,index:t,compact:o=!1,isLoading:r=!1,onRowClick:n,...a}){let s=H(t,!!n);return oe("div",{...a,className:o?s.compact:s.base,onClick:()=>{n&&n(e[0].row.original)},children:e.map((l,p)=>oe(ee,{...l.getCellProps(),index:p,isLoading:r,render:()=>l.render("Cell"),label:l.column.Header}))})}var re=Ze;import{Fragment as Ke,jsx as ne}from"react/jsx-runtime";function Ye({page:e,prepareRow:t,isLoading:o=!1,compact:r=!1,onRowClick:n}){return ne(Ke,{children:e.map((a,s)=>(t(a),ne(re,{...a.getRowProps(),index:s,cells:a.cells,isLoading:o,compact:r,onRowClick:n})))})}var ae=Ye;import{useTable as tt,useGlobalFilter as ot,usePagination as rt,useSortBy as nt,useFlexLayout as at}from"react-table";import qe from"fuse.js";var Qe=(e,t)=>e.filter(o=>Object.values(o.values).join(", ").toLowerCase().includes(t.toLowerCase())),se=(e,t)=>e.filter(({id:o})=>t.filter(r=>r.id===o).length===0),et=(e,t,o,r,n)=>{let a=e.map(i=>i.values),p=new qe(a,{keys:o.map(i=>({name:i,getFn:m=>m[i]}))}).search(t).map(({item:i})=>i).slice(0,r).map(i=>e.find(m=>m.values.cid===i.cid)).filter(Boolean);return se(p,n)},ie=(e,t,o,r=10)=>{if(o.length<1)return e;let n=Qe(e,o).slice(0,r),a=se(e,n),s=et(a,o,t,r-n.length,n),l=[...n,...s];return e.map(({id:p})=>l.find(i=>i.id===p)).filter(Boolean)};import{useEffect as st}from"react";function F({columns:e,data:t,pageSize:o=10,query:r=""}){let n=tt({columns:e,data:t,initialState:{pageSize:10,pageIndex:0},autoResetGlobalFilter:!1,globalFilter:(i,m,S)=>ie(i,m,S,o)},ot,nt,rt,at),{gotoPage:a,pageCount:s,state:{pageIndex:l}}=n,p={pageCount:s,pageIndex:l,setPage:i=>{a(i)}};return st(()=>{n.setGlobalFilter(r)},[r]),{paginationProps:p,...n}}import{Fragment as mt,jsx as P,jsxs as le}from"react/jsx-runtime";function lt({compact:e=!1,isLoading:t=!1,onRowClick:o,...r}){let{page:n,prepareRow:a,columns:s,getTableProps:l,headerGroups:p,paginationProps:i}=F(r);return le(mt,{children:[le("div",{...l(),className:"w-full",children:[P("div",{children:p.map(m=>P(Q,{headerGroup:m,columns:s,isLoading:t}))}),P(ae,{page:n,prepareRow:a,isLoading:t,compact:e,onRowClick:o})]}),i.pageCount>1&&P("div",{className:"px-4 py-4",children:P(it,{...i})})]})}var pt=lt;import{Text as ct}from"@kanda-libs/ks-design-library";import dt from"clsx";var pe={1:"text-24-28-em",2:"text-16-20-em"},me={1:"mb-4",2:"mb-2"};import{jsx as gt}from"react/jsx-runtime";var ut=function({size:e=1,className:t,children:o}){return gt(ct,{text:o,className:dt(me[e],pe[e],t)})},ft=ut;import{Icon as xt,Logo as bt}from"@kanda-libs/ks-design-library";import{jsx as g,jsxs as T}from"react/jsx-runtime";var ce={80:"max-w-80",96:"max-w-96",120:"max-w-120",160:"max-w160"},de=({logo:e,icon:t,iconClassName:o,iconSize:r,title:n,subText:a,boldSubText:s,cta:l,append:p,width:i=80,contentWidth:m=80,content:S})=>T("div",{className:`flex flex-col m-auto w-full ${ce[i]} text-center items-center justify-center`,children:[e&&g("div",{className:"mb-10",children:g(bt,{height:32})}),!e&&g(xt,{icon:t,size:r,className:`mx-auto mb-8 ${o}`}),g("h1",{className:"text-24-28-em mb-4",children:n}),T("div",{className:`flex flex-col w-full ${ce[m]} mx-auto`,children:[S&&g("div",{className:"mt-4 mb-8",children:S}),T("span",{className:"text-16-24 text-neutral-600",children:[a,s&&T("b",{children:[" ",s]})]}),l&&g("div",{className:"mt-10",children:l}),p]})]});de.defaultProps={logo:!1,iconClassName:"",iconSize:104,cta:null,append:null,boldSubText:null,content:null,width:96,contentWidth:96};var Pt=de;import{useEffect as ht}from"react";import{Document as wt,Page as Nt,pdfjs as ue}from"react-pdf";import{useToast as St}from"@kanda-libs/ks-design-library";import{useCallback as I,useMemo as Ct,useState as Tt}from"react";function M(e){let[t,o]=Tt(null),{showError:r}=St(),n=I(({numPages:i})=>{o([...Array(i).keys()].map(m=>({key:`page_${m+1}`,pageNumber:m+1,className:m!==0?"mt-4":""})))},[]),a=I(({message:i})=>r(`Error loading document. Please contact Kanda. Error message: ${i}`),[r]),s=I(({message:i})=>r(`Error retrieving document source. Please contact Kanda. Error message: ${i}`),[r]),l=Ct(()=>e?{file:`data:application/pdf;base64,${e}`,error:"Failed to load the PDF file. The file can still be downloaded by clicking the button below",onLoadSuccess:n,onLoadError:a,onSourceError:s}:null,[e,n,a,s]);return{pdfProps:l,pages:t,showContent:!!(l&&!!e)}}import{Fragment as fe,jsx as h}from"react/jsx-runtime";var yt=wt,vt=function({content:e}){let{pdfProps:t,pages:o,showContent:r}=M(e);return ht(()=>{ue.GlobalWorkerOptions.workerSrc=`https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${ue.version}/pdf.worker.js`},[]),r?h(yt,{...t,children:o&&o.map(n=>h(fe,{children:h(Nt,{...n})}))}):h(fe,{})},Et=vt;var ge={container:"grid grid-cols-7 justify-start items-start gap-x-2"};import{jsx as At}from"react/jsx-runtime";var Lt=function({children:e}){return At("div",{className:ge.container,children:e})},Rt=Lt;import{Children as Ft}from"react";import{Button as It}from"@kanda-libs/ks-design-library";var O={title:"text-18-22-em text-neutral-900 py-2 text-center h-14",items:"flex flex-col gap-y-2"};import{useCallback as kt,useState as Ht}from"react";function _(e,t){let[o,r]=Ht(0),n=kt(()=>{r(s=>s+1)},[r]),a=e.slice(0,(o+1)*t);return{items:a,showMore:n,canShowMore:e.length>a.length}}import{jsx as W,jsxs as xe}from"react/jsx-runtime";var Mt=function({title:e,children:t,perPage:o=5}){let{items:r,showMore:n,canShowMore:a}=_(Ft.toArray(t),o);return xe("div",{children:[W("div",{className:O.title,children:e}),xe("div",{className:O.items,children:[r,a&&W("div",{className:"mt-2",children:W(It.Text,{id:"pipeline-column-show-more",variant:"outline",onClick:n,label:"More",className:"w-full"})})]})]})},Ot=Mt;import{Card as _t,Text as be,TimeAgo as Wt}from"@kanda-libs/ks-design-library";import{jsx as w,jsxs as Jt}from"react/jsx-runtime";var Bt=function({name:e,signedUpDate:t,reviewed:o=!1,isLoading:r=!1}){return w(_t,{className:o?"bg-blue-100":"",children:Jt("div",{className:"flex flex-col gap-y-2",children:[w(be,{text:e,className:"text-16-20-em",isLoading:r}),o&&w(be,{text:"Reviewed",className:"text-12-18-em-up"}),w(Wt,{timestamp:t.getTime()})]})})},Gt=Bt;import{BreakPoints as qt}from"@kanda-libs/ks-design-library";import{Icon as Pe,Text as Xt}from"@kanda-libs/ks-design-library";import N from"clsx";function B(e,t,o,r){let n=e||t,a=N("w-7 h-7 rounded-2xl mb-2 relative z-10","text-center text-18-22-em flex items-center justify-center border border-solid border-2",!n&&"border-neutral-600 text-neutral-600 bg-neutral-000",n&&"bg-green-500 text-neutral-000 border-transparent"),s=N("absolute h-1 top-[31px] z-0",!n&&"bg-neutral-200",n&&"bg-green-500"),l=N(s,"w-1/2 left-0",o!==0&&"hidden md:block",o===0&&"hidden"),p=N(s,"w-1/2 right-0 hidden md:block",t&&"bg-neutral-200",!r&&"hidden md:block",r&&"hidden");return{iconClasses:a,leftBorderClasses:l,rightBorderClasses:p}}import{jsx as d,jsxs as Se}from"react/jsx-runtime";var jt=function({index:e,active:t=!1,current:o=!1,last:r=!1,label:n}){let{iconClasses:a,leftBorderClasses:s,rightBorderClasses:l}=B(t,o,e,r);return Se("div",{className:"relative flex flex-col items-center w-full md:w-auto md:min-w-48",children:[o&&d(Pe,{icon:"chevron-down",height:20}),!o&&d("div",{className:"h-5"}),d("div",{className:a,children:Se("div",{children:[!t&&e+1,t&&d(Pe,{icon:"check",width:12})]})}),d("div",{className:s}),!r&&d("div",{className:l}),d(Xt,{text:n,className:"text-sm text-center text-neutral-700"})]})},Ce=jt;import Dt from"clsx";import{jsx as $t}from"react/jsx-runtime";var zt=function({active:e=!1}){return $t("div",{className:Dt("flex-grow w-full h-1 -mt-[32px] hidden md:block",!e&&"bg-neutral-200",e&&"bg-green-500")})},Te=zt;import{Fragment as Ut,jsx as G,jsxs as Zt}from"react/jsx-runtime";var Vt=function({stages:e,activeKey:t}){return G("div",{className:"flex flex-col items-center justify-between h-full md:flex-row",children:e.map((o,r)=>Zt(Ut,{children:[G(Ce,{index:r,active:r<t,current:r===t,last:r===e.length-1,label:o},`stage-${r}`),r!==e.length-1&&G(Te,{active:r<t})]}))})},he=Vt;import{Timeline as Yt}from"@kanda-libs/ks-design-library";import{jsx as we}from"react/jsx-runtime";var Kt=function({mobileStages:e=[],activeKey:t}){return we("div",{className:"px-2",children:we(Yt,{compact:!0,items:e.map((o,r)=>({title:o,fill:t===r?"green":"grey"}))})})},Ne=Kt;import{jsx as J}from"react/jsx-runtime";var Qt=function(e){return J(qt,{desktop:J(he,{...e}),mobile:J(Ne,{...e})})},eo=Qt;import{Text as ve}from"@kanda-libs/ks-design-library";var ye={container:"w-screen h-screen flex flex-col justify-center items-center"};import{jsx as Ee,jsxs as ro}from"react/jsx-runtime";var to=function(){return ro("div",{className:ye.container,children:[Ee(ve,{text:"404",className:"mb-4 text-28-32-em text-neutral-900"}),Ee(ve,{text:"Page not found",className:"text-20-24 text-neutral-700"})]})},oo=to;import{Text as Le}from"@kanda-libs/ks-design-library";import no from"clsx";var u={wrapper:"flex flex-col gap-y-1",item:"flex flex-row items-center justify-start gap-y-2 md:mb-3",itemNumber:"flex items-center justify-center w-8 h-8 px-4 mr-3 text-green-900 bg-green-200 rounded-full text-18-28-em",itemContent:"flex flex-col text-left gap-y-1",itemTitle:"w-full mb-auto text-16-20-em text-neutral-700",itemDescription:"w-full mb-auto text-14-22 text-neutral-700"};import{jsx as y,jsxs as Re}from"react/jsx-runtime";var ao=function({items:e,className:t}){return y("div",{className:no(u.wrapper,t),children:e.map((o,r)=>Re("div",{className:u.item,children:[y("div",{className:u.itemNumber,children:o.number||r+1}),Re("div",{className:u.itemContent,children:[y(Le,{text:o.title,className:u.itemTitle}),y(Le,{text:o.description,className:u.itemDescription})]})]},`item-${r}`))})},so=ao;export{ke as AlertBanner,oo as NotFoundPage,so as NumberedList,Et as Pdf,Rt as Pipeline,Ot as PipelineColumn,Gt as SimpleCompanyCard,Pt as SplashScreen,eo as StageTimeline,pt as Table,ft as Title};
|
|
1
|
+
import{jsx as He}from"react/jsx-runtime";var Ae=function({children:e}){return He("div",{className:"p-4 border bg-lavender-100 border-lavender-200 rounded-xl text-lavender-200",children:e})},ke=Ae;import{Pagination as it}from"@kanda-libs/ks-design-library";import{SkeletonLoader as We}from"@kanda-libs/ks-design-library";import{Icon as Fe}from"@kanda-libs/ks-design-library";var X="flex px-3 py-1.75 h-9 -ml-3 my-auto rounded-lg bg-transparent hover:bg-neutral-100 text-style-g-em text-neutral-500 whitespace-nowrap z-20",j={icon:"chevron-down",stroke:"neutral-500",size:12,className:"ml-2 my-auto"},D={width:"calc(100% + 16px)"},x={container:{base:"w-full h-full overflow-hidden",padding:"pl-4 -ml-4"},flex:{base:"w-full h-full flex px-4 px-0",padding:"pl-4"}};import{jsx as Me,jsxs as Oe}from"react/jsx-runtime";var Ie=function({label:e,...t}){return Oe("button",{className:X,...t,children:[e,Me(Fe,{...j})]})},z=Ie;import $ from"clsx";function v(e){let t=e===0?D:{};return{classNames:{container:$(x.container.base,e===0?x.container.padding:""),flex:$(x.flex.base,e===0?"":x.flex.padding)},containerStyle:t}}import{jsx as V}from"react/jsx-runtime";var _e=function({index:e,children:t}){let{classNames:o,containerStyle:r}=v(e);return V("div",{className:o.container,style:r,children:V("div",{className:o.flex,children:t})})},U=_e;var E={Button:z,Wrapper:U};import Z from"clsx";var f={main:"flex h-14",loading:{base:"my-auto md:w-full mr-8",margin:"ml-4"},wrapper:{padding:"px-2 pt-2",popover:"pb-1"}};function L(e,t){return{classNames:{...f,loading:Z(f.loading.base,e===0?"":f.loading.margin),wrapper:Z(f.wrapper.padding,t?"":f.wrapper.popover)}}}import{jsx as C}from"react/jsx-runtime";var Be=function({index:e,isLoading:t=!1,popoverButtons:o=!1,label:r,...n}){let{classNames:a}=L(e,o);return C("div",{...n,className:a.main,children:C(We,{isLoading:t,wrapperClassName:a.loading,afterLoading:C(E.Wrapper,{index:e,children:C(E.Button,{label:r})})})})},Y=Be;var K={base:"flex-row h-14 border-b border-neutral-200"};function R(e,t){let{headers:o,getHeaderGroupProps:r}=e,n=r({}),a=t.filter(s=>s.isVisible).length;return{headers:o,headerGroupProps:n,totalVisible:a}}import{jsx as q}from"react/jsx-runtime";function Ge({headerGroup:e,columns:t,isLoading:o}){let{headerGroupProps:r,headers:n}=R(e,t);return q("div",{...r,className:K.base,children:n.map((a,s)=>q(Y,{index:s,label:a.render("Header"),isLoading:o,...a.getHeaderProps(a.getSortByToggleProps())}))})}var Q=Ge;import{SkeletonLoader as je,Text as De}from"@kanda-libs/ks-design-library";import Je from"clsx";var c={container:"flex w-full h-full",render:"w-full my-auto text-style-g text-neutral-600 whitespace-nowrap overflow-hidden overflow-ellipsis",renderLoading:"w-full my-auto mr-8 text-style-g",mobileLabel:"block md:hidden text-16-24-em text-neutral-600 mr-2",cell:{base:"px-4 py-1 md:pt-0 md:pr-0 md:pb-0 md:h-16 flex",compact:"h-8 flex",padding:"md:pl-4"}};function A(e,t,o){return{cell:Je(t?c.cell.compact:c.cell.base,e===0?"":c.cell.padding),container:c.container,render:o?c.renderLoading:c.render,mobileLabel:c.mobileLabel}}import{useIsDesktop as Xe}from"@kanda-libs/ks-design-library";function k(e){if(!e)return{};let t=Xe();return{...e,width:t?e==null?void 0:e.width:"100%"}}import{Fragment as $e,jsx as b,jsxs as Ve}from"react/jsx-runtime";var ze=function({render:e,index:t,compact:o=!1,isLoading:r=!1,label:n,...a}){let s=A(t,o,r),{style:l,...p}=a,i=k(l);return b("div",{...p,style:i,className:s.cell,children:b("div",{className:s.container,children:b("div",{className:s.render,children:b(je,{isLoading:r,afterLoading:Ve($e,{children:[b(De,{text:`${n}:`,className:s.mobileLabel}),e()]})})})})})},ee=ze;import{useClasses as Ue}from"@kanda-libs/ks-design-library";var te={base:"relative md:h-16 flex-col py-2 md:py-0 md:flex-row",compact:"relative h-8",border:"border-b border-neutral-200",hover:"group hover:bg-neutral-50 cursor-pointer",button:"hidden group-hover:block"};function H(e,t){return Ue(te,{base:[".base",e===9?"":".border",t?".hover":""],button:[".button"]})}import{jsx as oe}from"react/jsx-runtime";function Ze({cells:e,index:t,compact:o=!1,isLoading:r=!1,onRowClick:n,...a}){let s=H(t,!!n);return oe("div",{...a,className:o?s.compact:s.base,onClick:()=>{n&&n(e[0].row.original)},children:e.map((l,p)=>oe(ee,{...l.getCellProps(),index:p,isLoading:r,render:()=>l.render("Cell"),label:l.column.Header}))})}var re=Ze;import{Fragment as Ke,jsx as ne}from"react/jsx-runtime";function Ye({page:e,prepareRow:t,isLoading:o=!1,compact:r=!1,onRowClick:n}){return ne(Ke,{children:e.map((a,s)=>(t(a),ne(re,{...a.getRowProps(),index:s,cells:a.cells,isLoading:o,compact:r,onRowClick:n})))})}var ae=Ye;import{useTable as tt,useGlobalFilter as ot,usePagination as rt,useSortBy as nt,useFlexLayout as at}from"react-table";import qe from"fuse.js";var Qe=(e,t)=>e.filter(o=>Object.values(o.values).join(", ").toLowerCase().includes(t.toLowerCase())),se=(e,t)=>e.filter(({id:o})=>t.filter(r=>r.id===o).length===0),et=(e,t,o,r,n)=>{let a=e.map(i=>i.values),p=new qe(a,{keys:o.map(i=>({name:i,getFn:m=>m[i]}))}).search(t).map(({item:i})=>i).slice(0,r).map(i=>e.find(m=>m.values.cid===i.cid)).filter(Boolean);return se(p,n)},ie=(e,t,o,r=10)=>{if(o.length<1)return e;let n=Qe(e,o).slice(0,r),a=se(e,n),s=et(a,o,t,r-n.length,n),l=[...n,...s];return e.map(({id:p})=>l.find(i=>i.id===p)).filter(Boolean)};import{useEffect as st}from"react";function F({columns:e,data:t,pageSize:o=10,query:r=""}){let n=tt({columns:e,data:t,initialState:{pageSize:10,pageIndex:0},autoResetGlobalFilter:!1,globalFilter:(i,m,S)=>ie(i,m,S,o)},ot,nt,rt,at),{gotoPage:a,pageCount:s,state:{pageIndex:l}}=n,p={pageCount:s,pageIndex:l,setPage:i=>{a(i)}};return st(()=>{n.setGlobalFilter(r)},[r]),{paginationProps:p,...n}}import{Fragment as mt,jsx as P,jsxs as le}from"react/jsx-runtime";function lt({compact:e=!1,isLoading:t=!1,onRowClick:o,...r}){let{page:n,prepareRow:a,columns:s,getTableProps:l,headerGroups:p,paginationProps:i}=F(r);return le(mt,{children:[le("div",{...l(),className:"w-full",children:[P("div",{children:p.map(m=>P(Q,{headerGroup:m,columns:s,isLoading:t}))}),P(ae,{page:n,prepareRow:a,isLoading:t,compact:e,onRowClick:o})]}),i.pageCount>1&&P("div",{className:"px-4 py-4",children:P(it,{...i})})]})}var pt=lt;import{Text as ct}from"@kanda-libs/ks-design-library";import dt from"clsx";var pe={1:"text-24-28-em",2:"text-16-20-em"},me={1:"mb-4",2:"mb-2"};import{jsx as gt}from"react/jsx-runtime";var ut=function({size:e=1,className:t,children:o}){return gt(ct,{text:o,className:dt(me[e],pe[e],t)})},ft=ut;import{Icon as xt,Logo as bt}from"@kanda-libs/ks-design-library";import{jsx as g,jsxs as T}from"react/jsx-runtime";var ce={80:"max-w-80",96:"max-w-96",120:"max-w-120",160:"max-w160"},de=({logo:e,icon:t,iconClassName:o,iconSize:r,title:n,subText:a,boldSubText:s,cta:l,append:p,width:i=80,contentWidth:m=80,content:S})=>T("div",{className:`flex flex-col m-auto w-full ${ce[i]} text-center items-center justify-center`,children:[e&&g("div",{className:"mb-10",children:g(bt,{height:32})}),!e&&g(xt,{icon:t,size:r,className:`mx-auto mb-8 ${o}`}),g("h1",{className:"text-24-28-em mb-4",children:n}),T("div",{className:`flex flex-col w-full ${ce[m]} mx-auto`,children:[S&&g("div",{className:"mt-4 mb-8",children:S}),T("span",{className:"text-16-24 text-neutral-600",children:[a,s&&T("b",{children:[" ",s]})]}),l&&g("div",{className:"mt-10",children:l}),p]})]});de.defaultProps={logo:!1,iconClassName:"",iconSize:104,cta:null,append:null,boldSubText:null,content:null,width:96,contentWidth:96};var Pt=de;import{useEffect as ht}from"react";import{Document as wt,Page as Nt,pdfjs as ue}from"react-pdf";import{useToast as St}from"@kanda-libs/ks-design-library";import{useCallback as I,useMemo as Ct,useState as Tt}from"react";function M(e){let[t,o]=Tt(null),{showError:r}=St(),n=I(({numPages:i})=>{o([...Array(i).keys()].map(m=>({key:`page_${m+1}`,pageNumber:m+1,className:m!==0?"mt-4":""})))},[]),a=I(({message:i})=>r(`Error loading document. Please contact Kanda. Error message: ${i}`),[r]),s=I(({message:i})=>r(`Error retrieving document source. Please contact Kanda. Error message: ${i}`),[r]),l=Ct(()=>e?{file:`data:application/pdf;base64,${e}`,error:"Failed to load the PDF file. The file can still be downloaded by clicking the button below",onLoadSuccess:n,onLoadError:a,onSourceError:s}:null,[e,n,a,s]);return{pdfProps:l,pages:t,showContent:!!(l&&!!e)}}import{Fragment as fe,jsx as h}from"react/jsx-runtime";var yt=wt,vt=function({content:e}){let{pdfProps:t,pages:o,showContent:r}=M(e);return ht(()=>{ue.GlobalWorkerOptions.workerSrc=`https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${ue.version}/pdf.worker.js`},[]),r?h(yt,{...t,children:o&&o.map(n=>h(fe,{children:h(Nt,{...n})}))}):h(fe,{})},Et=vt;var ge={container:"grid grid-cols-7 justify-start items-start gap-x-2"};import{jsx as At}from"react/jsx-runtime";var Lt=function({children:e}){return At("div",{className:ge.container,children:e})},Rt=Lt;import{Children as Ft}from"react";import{Button as It}from"@kanda-libs/ks-design-library";var O={title:"text-18-22-em text-neutral-900 py-2 text-center h-14",items:"flex flex-col gap-y-2"};import{useCallback as kt,useState as Ht}from"react";function _(e,t){let[o,r]=Ht(0),n=kt(()=>{r(s=>s+1)},[r]),a=e.slice(0,(o+1)*t);return{items:a,showMore:n,canShowMore:e.length>a.length}}import{jsx as W,jsxs as xe}from"react/jsx-runtime";var Mt=function({title:e,children:t,perPage:o=5}){let{items:r,showMore:n,canShowMore:a}=_(Ft.toArray(t),o);return xe("div",{children:[W("div",{className:O.title,children:e}),xe("div",{className:O.items,children:[r,a&&W("div",{className:"mt-2",children:W(It.Text,{id:"pipeline-column-show-more",variant:"outline",onClick:n,label:"More",className:"w-full"})})]})]})},Ot=Mt;import{Card as _t,Text as be,TimeAgo as Wt}from"@kanda-libs/ks-design-library";import{jsx as w,jsxs as Jt}from"react/jsx-runtime";var Bt=function({name:e,signedUpDate:t,reviewed:o=!1,isLoading:r=!1}){return w(_t,{className:o?"bg-blue-100":"",children:Jt("div",{className:"flex flex-col gap-y-2",children:[w(be,{text:e,className:"text-16-20-em",isLoading:r}),o&&w(be,{text:"Reviewed",className:"text-12-18-em-up"}),w(Wt,{timestamp:t.getTime()})]})})},Gt=Bt;import{BreakPoints as qt}from"@kanda-libs/ks-design-library";import{Icon as Pe,Text as Xt}from"@kanda-libs/ks-design-library";import N from"clsx";function B(e,t,o,r){let n=e||t,a=N("w-7 h-7 rounded-2xl mb-2 relative z-10","text-center text-18-22-em flex items-center justify-center border border-solid border-2",!n&&"border-neutral-600 text-neutral-600 bg-neutral-000",n&&"bg-green-500 text-neutral-000 border-transparent"),s=N("absolute h-1 top-[31px] z-0",!n&&"bg-neutral-200",n&&"bg-green-500"),l=N(s,"w-1/2 left-0",o!==0&&"hidden md:block",o===0&&"hidden"),p=N(s,"w-1/2 right-0 hidden md:block",t&&"bg-neutral-200",!r&&"hidden md:block",r&&"hidden");return{iconClasses:a,leftBorderClasses:l,rightBorderClasses:p}}import{jsx as d,jsxs as Se}from"react/jsx-runtime";var jt=function({index:e,active:t=!1,current:o=!1,last:r=!1,label:n}){let{iconClasses:a,leftBorderClasses:s,rightBorderClasses:l}=B(t,o,e,r);return Se("div",{className:"relative flex flex-col items-center w-full md:w-auto md:min-w-48",children:[o&&d(Pe,{icon:"chevron-down",height:20}),!o&&d("div",{className:"h-5"}),d("div",{className:a,children:Se("div",{children:[!t&&e+1,t&&d(Pe,{icon:"check",width:12})]})}),d("div",{className:s}),!r&&d("div",{className:l}),d(Xt,{text:n,className:"text-sm text-center text-neutral-700"})]})},Ce=jt;import Dt from"clsx";import{jsx as $t}from"react/jsx-runtime";var zt=function({active:e=!1}){return $t("div",{className:Dt("flex-grow w-full h-1 -mt-[32px] hidden md:block",!e&&"bg-neutral-200",e&&"bg-green-500")})},Te=zt;import{Fragment as Ut,jsx as G,jsxs as Zt}from"react/jsx-runtime";var Vt=function({stages:e,activeKey:t}){return G("div",{className:"flex flex-col items-center justify-between h-full md:flex-row",children:e.map((o,r)=>Zt(Ut,{children:[G(Ce,{index:r,active:r<t,current:r===t,last:r===e.length-1,label:o},`stage-${r}`),r!==e.length-1&&G(Te,{active:r<t})]}))})},he=Vt;import{Timeline as Yt}from"@kanda-libs/ks-design-library";import{jsx as we}from"react/jsx-runtime";var Kt=function({mobileStages:e=[],activeKey:t}){return we("div",{className:"px-2",children:we(Yt,{compact:!0,items:e.map((o,r)=>({title:o,fill:t===r?"green":"grey"}))})})},Ne=Kt;import{jsx as J}from"react/jsx-runtime";var Qt=function(e){return J(qt,{desktop:J(he,{...e}),mobile:J(Ne,{...e})})},eo=Qt;import{Text as ve}from"@kanda-libs/ks-design-library";var ye={container:"w-screen h-screen flex flex-col justify-center items-center"};import{jsx as Ee,jsxs as ro}from"react/jsx-runtime";var to=function(){return ro("div",{className:ye.container,children:[Ee(ve,{text:"404",className:"mb-4 text-28-32-em text-neutral-900"}),Ee(ve,{text:"Page not found",className:"text-20-24 text-neutral-700"})]})},oo=to;import{Text as Le}from"@kanda-libs/ks-design-library";import no from"clsx";var u={wrapper:"flex flex-col gap-y-4 md:gap-y-1",item:"flex flex-row items-center justify-start gap-y-2 md:mb-3",itemNumber:"flex items-center justify-center w-8 h-8 px-4 mr-3 text-green-900 bg-green-200 rounded-full text-18-28-em",itemContent:"flex flex-col text-left gap-y-1",itemTitle:"w-full mb-auto text-16-20-em text-neutral-700",itemDescription:"w-full mb-auto text-14-22 text-neutral-700"};import{jsx as y,jsxs as Re}from"react/jsx-runtime";var ao=function({items:e,className:t}){return y("div",{className:no(u.wrapper,t),children:e.map((o,r)=>Re("div",{className:u.item,children:[y("div",{className:u.itemNumber,children:o.number||r+1}),Re("div",{className:u.itemContent,children:[y(Le,{text:o.title,className:u.itemTitle}),y(Le,{text:o.description,className:u.itemDescription})]})]},`item-${r}`))})},so=ao;export{ke as AlertBanner,oo as NotFoundPage,so as NumberedList,Et as Pdf,Rt as Pipeline,Ot as PipelineColumn,Gt as SimpleCompanyCard,Pt as SplashScreen,eo as StageTimeline,pt as Table,ft as Title};
|
|
2
2
|
//# sourceMappingURL=index.esm.mjs.map
|
package/dist/index.esm.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/AlertBanner/index.tsx", "../src/components/Table/index.tsx", "../src/components/Table/components/HeaderColumn/index.tsx", "../src/components/Table/components/HeaderButton/Button.tsx", "../src/components/Table/components/HeaderButton/constants.ts", "../src/components/Table/components/HeaderButton/useWrapperProps.ts", "../src/components/Table/components/HeaderButton/Wrapper.tsx", "../src/components/Table/components/HeaderButton/index.tsx", "../src/components/Table/components/HeaderColumn/useHeaderColumnProps.ts", "../src/components/Table/components/HeaderColumn/constants.ts", "../src/components/Table/components/HeaderGroup/constants.ts", "../src/components/Table/components/HeaderGroup/useHeaderGroupProps.ts", "../src/components/Table/components/HeaderGroup/index.tsx", "../src/components/Table/components/Cell/index.tsx", "../src/components/Table/components/Cell/useCellClassNames.ts", "../src/components/Table/components/Cell/constants.ts", "../src/hooks/useMobileFullWidthCellStyle.ts", "../src/components/Table/components/Row/useRowClassNames.ts", "../src/components/Table/components/Row/constants.ts", "../src/components/Table/components/Row/index.tsx", "../src/components/Table/components/Pages/index.tsx", "../src/components/Table/useTableProps.ts", "../src/components/Table/helpers/search.ts", "../src/components/Title/index.tsx", "../src/components/Title/constants.ts", "../src/components/SplashScreen/index.tsx", "../src/components/Pdf/index.tsx", "../src/components/Pdf/usePdf.ts", "../src/components/Pipeline/constants.ts", "../src/components/Pipeline/index.tsx", "../src/components/Pipeline/PipelineColumn/index.tsx", "../src/components/Pipeline/PipelineColumn/constants.ts", "../src/components/Pipeline/PipelineColumn/usePipelineColumnPagination.ts", "../src/components/SimpleCompanyCard/index.tsx", "../src/components/StageTimeline/index.tsx", "../src/components/StageTimeline/Stage/index.tsx", "../src/components/StageTimeline/Stage/useStageProps.ts", "../src/components/StageTimeline/TimelineBorder.tsx", "../src/components/StageTimeline/Desktop.tsx", "../src/components/StageTimeline/Mobile.tsx", "../src/components/NotFoundPage/index.tsx", "../src/components/NotFoundPage/constants.ts", "../src/components/NumberedList/index.tsx", "../src/components/NumberedList/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import type { FunctionComponent } from 'react';\n\nexport interface AlertBannerProps {\n children: string | JSX.Element | JSX.Element[];\n}\n\nconst AlertBanner: FunctionComponent<AlertBannerProps> = function ({\n children,\n}) {\n return (\n <div className=\"p-4 border bg-lavender-100 border-lavender-200 rounded-xl text-lavender-200\">\n {children}\n </div>\n );\n};\n\nexport default AlertBanner;\n", "import type { FunctionComponent, PropsWithChildren } from 'react';\nimport {\n Pagination,\n type StringIndexedObject,\n} from '@kanda-libs/ks-design-library';\nimport type { Column } from 'react-table';\nimport HeaderGroup from './components/HeaderGroup';\nimport Pages from './components/Pages';\nimport useTableProps from './useTableProps';\n\nexport interface TableProps<T extends StringIndexedObject<unknown>> {\n columns: Readonly<Column<T>[]>;\n data: T[];\n filter?: string;\n pageSize?: number;\n compact?: boolean;\n isLoading?: boolean;\n onRowClick?: (row: T) => void;\n query?: string;\n}\n\nexport type TableFunctionComponent<\n T extends StringIndexedObject<unknown> = any,\n> = FunctionComponent<TableProps<T>>;\n\nfunction Table<T extends StringIndexedObject<unknown>>({\n compact = false,\n isLoading = false,\n onRowClick,\n ...props\n}: PropsWithChildren<TableProps<T>>) {\n const {\n page,\n prepareRow,\n columns,\n getTableProps,\n headerGroups,\n paginationProps,\n } = useTableProps(props);\n\n return (\n <>\n <div {...getTableProps()} className=\"w-full\">\n <div>\n {headerGroups.map((headerGroup) => (\n <HeaderGroup\n headerGroup={headerGroup}\n columns={columns}\n isLoading={isLoading}\n />\n ))}\n </div>\n <Pages\n page={page}\n prepareRow={prepareRow}\n isLoading={isLoading}\n compact={compact}\n onRowClick={onRowClick}\n />\n </div>\n {paginationProps.pageCount > 1 && (\n <div className=\"px-4 py-4\">\n <Pagination {...paginationProps} />\n </div>\n )}\n </>\n );\n}\n\nexport default Table;\n", "import { SkeletonLoader } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent, ReactNode } from 'react';\nimport type { TableHeaderProps } from 'react-table';\nimport HeaderButton from '../HeaderButton';\nimport useHeaderColumnProps from './useHeaderColumnProps';\n\nexport interface HeaderColumnProps extends TableHeaderProps {\n index: number;\n isLoading?: boolean;\n popoverButtons?: boolean;\n label: ReactNode;\n}\n\nconst HeaderColumn: FunctionComponent<HeaderColumnProps> = function ({\n index,\n isLoading = false,\n popoverButtons = false,\n label,\n ...props\n}) {\n const { classNames } = useHeaderColumnProps(index, popoverButtons);\n\n return (\n <div {...props} className={classNames.main}>\n <SkeletonLoader\n isLoading={isLoading}\n wrapperClassName={classNames.loading}\n afterLoading={\n <HeaderButton.Wrapper index={index}>\n <HeaderButton.Button label={label} />\n </HeaderButton.Wrapper>\n }\n />\n </div>\n );\n};\n\nexport default HeaderColumn;\n", "import type { FunctionComponent, HTMLAttributes, ReactNode } from 'react';\nimport { Icon } from '@kanda-libs/ks-design-library';\nimport { BUTTON_CLASS_NAMES, ICON_PROPS } from './constants';\n\nexport interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {\n label: ReactNode;\n}\n\nconst Button: FunctionComponent<ButtonProps> = function ({ label, ...props }) {\n return (\n <button className={BUTTON_CLASS_NAMES} {...props}>\n {label}\n <Icon {...ICON_PROPS} />\n </button>\n );\n};\n\nexport default Button;\n", "export const BUTTON_CLASS_NAMES =\n 'flex px-3 py-1.75 h-9 -ml-3 my-auto rounded-lg bg-transparent hover:bg-neutral-100 text-style-g-em text-neutral-500 whitespace-nowrap z-20';\n\nexport const ICON_PROPS = {\n icon: 'chevron-down',\n stroke: 'neutral-500',\n size: 12,\n className: 'ml-2 my-auto',\n};\n\nexport const WRAPPER_STYLE = {\n width: 'calc(100% + 16px)',\n};\n\nexport const WRAPPER_CLASS_NAMES = {\n container: {\n base: 'w-full h-full overflow-hidden',\n padding: 'pl-4 -ml-4',\n },\n flex: {\n base: 'w-full h-full flex px-4 px-0',\n padding: 'pl-4',\n },\n};\n", "import type { CSSProperties } from 'react';\nimport clsx from 'clsx';\nimport { WRAPPER_STYLE, WRAPPER_CLASS_NAMES } from './constants';\n\nexport interface WrapperPropsHook {\n classNames: {\n container: string;\n flex: string;\n };\n containerStyle: CSSProperties;\n}\n\nexport default function useWrapperProps(index: number): WrapperPropsHook {\n const containerStyle = index === 0 ? WRAPPER_STYLE : {};\n\n const classNames = {\n container: clsx(\n WRAPPER_CLASS_NAMES.container.base,\n index === 0 ? WRAPPER_CLASS_NAMES.container.padding : '',\n ),\n flex: clsx(\n WRAPPER_CLASS_NAMES.flex.base,\n index === 0 ? '' : WRAPPER_CLASS_NAMES.flex.padding,\n ),\n };\n\n return {\n classNames,\n containerStyle,\n };\n}\n", "import type { FunctionComponent } from 'react';\nimport useWrapperProps from './useWrapperProps';\n\nexport interface WrapperProps {\n index: number;\n children?: JSX.Element | JSX.Element[];\n}\n\nconst Wrapper: FunctionComponent<WrapperProps> = function ({\n index,\n children,\n}) {\n const { classNames, containerStyle } = useWrapperProps(index);\n\n return (\n <div className={classNames.container} style={containerStyle}>\n <div className={classNames.flex}>{children}</div>\n </div>\n );\n};\n\nexport default Wrapper;\n", "import Button from './Button';\nimport Wrapper from './Wrapper';\n\nexport default {\n Button,\n Wrapper,\n};\n", "import clsx from 'clsx';\nimport { CLASS_NAMES } from './constants';\n\nexport interface HeaderColumnPropsHook {\n classNames: {\n main: string;\n loading: string;\n wrapper: string;\n };\n}\n\nexport default function useHeaderColumnProps(\n index: number,\n popoverButtons: boolean,\n): HeaderColumnPropsHook {\n const classNames = {\n ...CLASS_NAMES,\n loading: clsx(\n CLASS_NAMES.loading.base,\n index === 0 ? '' : CLASS_NAMES.loading.margin,\n ),\n wrapper: clsx(\n CLASS_NAMES.wrapper.padding,\n popoverButtons ? '' : CLASS_NAMES.wrapper.popover,\n ),\n };\n\n return {\n classNames,\n };\n}\n", "export const CLASS_NAMES = {\n main: 'flex h-14',\n loading: {\n base: 'my-auto md:w-full mr-8',\n margin: 'ml-4',\n },\n wrapper: {\n padding: 'px-2 pt-2',\n popover: 'pb-1',\n },\n};\n\nexport const MOVE_LEFT_ITEM_PROPS = {\n name: 'Move column left',\n icon: 'arrow-left',\n};\n\nexport const MOVE_RIGHT_ITEM_PROPS = {\n name: 'Move column right',\n icon: 'arrow-right',\n};\n\nexport const HIDE_COLUMN_PROPS = {\n name: 'Hide column',\n icon: 'eye-off',\n};\n", "export const CLASS_NAMES = {\n base: 'flex-row h-14 border-b border-neutral-200',\n};\n", "import type {\n ColumnInstance,\n HeaderGroup,\n TableHeaderProps,\n} from 'react-table';\n\nexport interface HeaderGroupPropsHook<T extends Object> {\n headers: ColumnInstance<T>[];\n headerGroupProps: TableHeaderProps;\n totalVisible: number;\n}\n\nexport default function useHeaderGroupProps<T extends Object>(\n headerGroup: HeaderGroup<T>,\n columns: ColumnInstance<T>[],\n): HeaderGroupPropsHook<T> {\n const { headers, getHeaderGroupProps } = headerGroup;\n const headerGroupProps = getHeaderGroupProps({});\n\n const totalVisible = columns.filter((column) => column.isVisible).length;\n\n return {\n headers,\n headerGroupProps,\n totalVisible,\n };\n}\n", "import type { PropsWithChildren } from 'react';\nimport type {\n ColumnInstance,\n HeaderGroup as HeaderGroupType,\n} from 'react-table';\nimport HeaderColumn from '../HeaderColumn';\nimport { CLASS_NAMES } from './constants';\nimport useHeaderGroupProps from './useHeaderGroupProps';\n\nexport interface HeaderGroupProps<T extends Object> {\n headerGroup: HeaderGroupType<T>;\n columns: ColumnInstance<T>[];\n isLoading?: boolean;\n}\n\nfunction HeaderGroup<T extends Object>({\n headerGroup,\n columns,\n isLoading,\n}: PropsWithChildren<HeaderGroupProps<T>>) {\n const { headerGroupProps, headers } = useHeaderGroupProps(\n headerGroup,\n columns,\n );\n\n return (\n <div {...headerGroupProps} className={CLASS_NAMES.base}>\n {headers.map((column, index) => (\n <HeaderColumn\n index={index}\n label={column.render('Header')}\n isLoading={isLoading}\n {...column.getHeaderProps(column.getSortByToggleProps())}\n />\n ))}\n </div>\n );\n}\n\nexport default HeaderGroup;\n", "import type { FunctionComponent, ReactNode } from 'react';\nimport type { TableCellProps } from 'react-table';\nimport { SkeletonLoader, Text } from '@kanda-libs/ks-design-library';\nimport useCellClassNames from './useCellClassNames';\nimport useMobileFullWidthCellStyle from '~/hooks/useMobileFullWidthCellStyle';\n\nexport interface CellProps extends TableCellProps {\n index: number;\n render: () => ReactNode;\n compact?: boolean;\n isLoading?: boolean;\n label?: string;\n}\n\nconst Cell: FunctionComponent<CellProps> = function ({\n render,\n index,\n compact = false,\n isLoading = false,\n label,\n ...props\n}) {\n const classNames = useCellClassNames(index, compact, isLoading);\n\n const { style: unformattedStyle, ...formattedProps } = props;\n const style = useMobileFullWidthCellStyle(unformattedStyle);\n\n return (\n <div {...formattedProps} style={style} className={classNames.cell}>\n <div className={classNames.container}>\n <div className={classNames.render}>\n <SkeletonLoader\n isLoading={isLoading}\n afterLoading={\n <>\n <Text text={`${label}:`} className={classNames.mobileLabel} />\n {render()}\n </>\n }\n />\n </div>\n </div>\n </div>\n );\n};\n\nexport default Cell;\n", "import clsx from 'clsx';\nimport { CLASS_NAMES } from './constants';\n\nexport type CellClassNamesHook = {\n cell: string;\n container: string;\n render: string;\n mobileLabel: string;\n};\n\nexport default function useCellClassNames(\n index: number,\n compact: boolean,\n isLoading: boolean,\n): CellClassNamesHook {\n return {\n cell: clsx(\n compact ? CLASS_NAMES.cell.compact : CLASS_NAMES.cell.base,\n index === 0 ? '' : CLASS_NAMES.cell.padding,\n ),\n container: CLASS_NAMES.container,\n render: isLoading ? CLASS_NAMES.renderLoading : CLASS_NAMES.render,\n mobileLabel: CLASS_NAMES.mobileLabel,\n };\n}\n", "export const CLASS_NAMES = {\n container: 'flex w-full h-full',\n render:\n 'w-full my-auto text-style-g text-neutral-600 whitespace-nowrap overflow-hidden overflow-ellipsis',\n renderLoading: 'w-full my-auto mr-8 text-style-g',\n mobileLabel: 'block md:hidden text-16-24-em text-neutral-600 mr-2',\n cell: {\n base: 'px-4 py-1 md:pt-0 md:pr-0 md:pb-0 md:h-16 flex',\n compact: 'h-8 flex',\n padding: 'md:pl-4',\n },\n};\n", "import { useIsDesktop } from '@kanda-libs/ks-design-library';\nimport type { CSSProperties } from 'react';\n\nexport type MobileFullWidthCellStyleHook = CSSProperties;\n\nexport default function useMobileFullWidthCellStyle(\n style?: CSSProperties,\n): MobileFullWidthCellStyleHook {\n if (!style) return {};\n\n const isDesktop = useIsDesktop();\n\n // For mobile, we want to make sure that the cell is always 100% width\n const formattedStyle = {\n ...style,\n width: isDesktop ? style?.width : '100%',\n };\n\n return formattedStyle;\n}\n", "import { useClasses } from '@kanda-libs/ks-design-library';\nimport { CLASS_NAMES } from './constants';\n\nexport interface RowClassNamesHook {\n base: string;\n compact: string;\n border: string;\n hover: string;\n button: string;\n}\n\nexport default function useRowClassNames(\n index: number,\n canSelect: boolean,\n): RowClassNamesHook {\n const classNames = useClasses(CLASS_NAMES, {\n base: ['.base', index === 9 ? '' : '.border', canSelect ? '.hover' : ''],\n button: ['.button'],\n });\n\n return classNames as RowClassNamesHook;\n}\n", "export const CLASS_NAMES = {\n base: 'relative md:h-16 flex-col py-2 md:py-0 md:flex-row',\n compact: 'relative h-8',\n border: 'border-b border-neutral-200',\n hover: 'group hover:bg-neutral-50 cursor-pointer',\n button: 'hidden group-hover:block',\n};\n", "import type { PropsWithChildren } from 'react';\nimport type { Row as RowType, TableRowProps } from 'react-table';\nimport Cell from '../Cell';\nimport useRowClassNames from './useRowClassNames';\n\nexport interface RowProps<T extends Object> extends TableRowProps {\n cells: RowType<T>['cells'];\n index: number;\n compact?: boolean;\n isLoading?: boolean;\n onRowClick?: (row: T) => void;\n}\n\nfunction Row<T extends Object>({\n cells,\n index,\n compact = false,\n isLoading = false,\n onRowClick,\n ...props\n}: PropsWithChildren<RowProps<T>>) {\n const classNames = useRowClassNames(index, !!onRowClick);\n\n return (\n <div\n {...props}\n className={compact ? classNames.compact : classNames.base}\n onClick={() => {\n onRowClick && onRowClick(cells[0].row.original as T);\n }}\n >\n {cells.map((cell, cellIndex) => (\n <Cell\n {...cell.getCellProps()}\n index={cellIndex}\n isLoading={isLoading}\n render={() => cell.render('Cell')}\n label={cell.column.Header as string}\n />\n ))}\n </div>\n );\n}\n\nexport default Row;\n", "import type { StringIndexedObject } from '@kanda-libs/ks-design-library';\nimport type { PropsWithChildren } from 'react';\nimport type { Row as RowType } from 'react-table';\nimport Row from '../Row';\n\nexport interface PagesProps<T extends StringIndexedObject> {\n page: RowType<T>[];\n prepareRow: (row: RowType<T>) => void;\n isLoading?: boolean;\n compact?: boolean;\n onRowClick?: (row: T) => void;\n}\n\nfunction Pages<T extends StringIndexedObject>({\n page,\n prepareRow,\n isLoading = false,\n compact = false,\n onRowClick,\n}: PropsWithChildren<PagesProps<T>>) {\n return (\n <>\n {page.map((row, index) => {\n prepareRow(row);\n return (\n <Row\n {...row.getRowProps()}\n index={index}\n cells={row.cells}\n isLoading={isLoading}\n compact={compact}\n onRowClick={onRowClick}\n />\n );\n })}\n </>\n );\n}\nexport default Pages;\n", "import type { TableInstance, Row } from '../../@types/index';\nimport {\n useTable,\n useGlobalFilter,\n usePagination,\n useSortBy,\n useFlexLayout,\n type IdType,\n TableOptions,\n} from 'react-table';\nimport type { TableProps } from '.';\nimport { globalFilter } from './helpers/search';\nimport type {\n PaginationProps,\n StringIndexedObject,\n} from '@kanda-libs/ks-design-library';\nimport { useEffect } from 'react';\n\nexport interface TablePropsHook<T extends StringIndexedObject<unknown>>\n extends TableInstance<T> {\n paginationProps: PaginationProps;\n}\n\nexport default function useTableProps<T extends StringIndexedObject<unknown>>({\n columns,\n data,\n pageSize = 10,\n query = '',\n}: TableProps<T>): TablePropsHook<T> {\n const table = useTable<T>(\n {\n columns,\n data,\n initialState: {\n pageSize: 10,\n pageIndex: 0,\n },\n autoResetGlobalFilter: false,\n globalFilter: (\n rows: Row<T>[],\n searchKeys: IdType<T>[],\n filterValue: string,\n ) => globalFilter(rows, searchKeys, filterValue, pageSize),\n } as unknown as TableOptions<T>,\n useGlobalFilter,\n useSortBy,\n usePagination,\n useFlexLayout,\n );\n\n const {\n gotoPage,\n pageCount,\n state: { pageIndex },\n } = table;\n\n const paginationProps: PaginationProps = {\n pageCount,\n pageIndex,\n setPage: (nextPage: number) => {\n gotoPage(nextPage);\n },\n };\n\n useEffect(() => {\n table.setGlobalFilter(query);\n }, [query]);\n\n return {\n paginationProps,\n ...table,\n };\n}\n", "import type { IdType } from 'react-table';\nimport type { Row } from '../../../@types/index';\nimport Fuse from 'fuse.js';\nimport type { StringIndexedObject } from '~/types';\n\nconst exactMatchSearch = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n filterValue: string,\n) => {\n return rows.filter((row) => {\n // Take all values from the row, and add them together in a string\n // for the purposes of searching\n const rowValues = Object.values(row.values).join(', ');\n\n return rowValues.toLowerCase().includes(filterValue.toLowerCase());\n });\n};\n\nconst excludeExactMatches = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n exactMatchRows: Row<T>[],\n) =>\n rows.filter(\n ({ id }) => exactMatchRows.filter((p) => p.id === id).length === 0,\n );\n\nconst fuzzySearch = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n filterValue: string,\n searchKeys: string[],\n numberOfRows: number,\n exactMatchRows: Row<T>[],\n): Row<T>[] => {\n const currentRows = rows.map((row) => {\n return row.values;\n });\n\n const fuse = new Fuse(currentRows, {\n keys: searchKeys.map((key) => ({\n name: key,\n // Because FuseJS allows for dot notation,\n // we need to use a function to get the value\n // as the object returned from the table is flat,\n // rather than nested\n getFn: (obj: StringIndexedObject) => obj[key],\n })),\n });\n\n const results = fuse\n .search(filterValue)\n .map(({ item }) => item)\n .slice(0, numberOfRows);\n\n const filteredResults = results\n .map((result) => rows.find((row) => row.values.cid === result.cid))\n .filter(Boolean) as Row<T>[];\n\n return excludeExactMatches(filteredResults, exactMatchRows);\n};\n\nexport const globalFilter = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n searchKeys: IdType<T>[],\n filterValue: string,\n pageSize = 10,\n): Row<T>[] => {\n if (filterValue.length < 1) {\n return rows;\n }\n\n // Get the first 10 exact matches. The reason for this is that exact matching\n // should take presedence over fuzzy matching. An exact match is more useful\n // but also less expensive to compute. So there's no need to do a fuzzy search\n // if there are >= 10 exact matches.\n const exactMatches = exactMatchSearch(rows, filterValue).slice(0, pageSize);\n const currentRowsExcludingExactMatches = excludeExactMatches(\n rows,\n exactMatches,\n );\n\n const fuzzyMatches = fuzzySearch(\n currentRowsExcludingExactMatches,\n filterValue,\n searchKeys,\n pageSize - exactMatches.length,\n exactMatches,\n );\n\n const results = [...exactMatches, ...fuzzyMatches];\n\n // Return the rows in the same order as the original rows\n // to preserve sorting, which happens before fuzzy matching\n return rows\n .map(({ id }) => results.find((row) => row.id === id))\n .filter(Boolean) as Row<T>[];\n};\n", "import { Text } from '@kanda-libs/ks-design-library';\nimport clsx from 'clsx';\nimport type { FunctionComponent } from 'react';\nimport { TITLE_MARGINS, TITLE_SIZES } from './constants';\n\nexport interface TitleProps {\n size?: keyof typeof TITLE_SIZES;\n className?: string;\n children: string | JSX.Element;\n}\n\nconst Title: FunctionComponent<TitleProps> = function ({\n size = 1,\n className,\n children,\n}) {\n return (\n <Text\n text={children}\n className={clsx(TITLE_MARGINS[size], TITLE_SIZES[size], className)}\n />\n );\n};\n\nexport default Title;\n", "export const TITLE_SIZES = {\n 1: 'text-24-28-em',\n 2: 'text-16-20-em',\n};\n\nexport const TITLE_MARGINS: Record<keyof typeof TITLE_SIZES, string> = {\n 1: 'mb-4',\n 2: 'mb-2',\n};\n", "import { Icon, Logo } from '@kanda-libs/ks-design-library';\n\ntype Widths = 80 | 96 | 120 | 160;\n\ninterface SplashScreenProps {\n logo?: boolean;\n icon: string;\n iconClassName?: string;\n iconSize?: number;\n title: string;\n subText: string | JSX.Element;\n boldSubText?: string;\n cta?: JSX.Element;\n append?: JSX.Element;\n width?: Widths;\n contentWidth?: Widths;\n content?: JSX.Element;\n}\n\nconst WIDTHS = {\n 80: 'max-w-80',\n 96: 'max-w-96',\n 120: 'max-w-120',\n 160: 'max-w160',\n};\n\nconst SplashScreen = ({\n logo,\n icon,\n iconClassName,\n iconSize,\n title,\n subText,\n boldSubText,\n cta,\n append,\n width = 80,\n contentWidth = 80,\n content,\n}: SplashScreenProps) => (\n <div\n className={`flex flex-col m-auto w-full ${WIDTHS[width]} text-center items-center justify-center`}\n >\n {logo && (\n <div className=\"mb-10\">\n <Logo height={32} />\n </div>\n )}\n {!logo && (\n <Icon\n icon={icon}\n size={iconSize}\n className={`mx-auto mb-8 ${iconClassName}`}\n />\n )}\n <h1 className=\"text-24-28-em mb-4\">{title}</h1>\n <div className={`flex flex-col w-full ${WIDTHS[contentWidth]} mx-auto`}>\n {content && <div className=\"mt-4 mb-8\">{content}</div>}\n <span className=\"text-16-24 text-neutral-600\">\n {subText}\n {boldSubText && <b> {boldSubText}</b>}\n </span>\n {cta && <div className=\"mt-10\">{cta}</div>}\n {append}\n </div>\n </div>\n);\n\nSplashScreen.defaultProps = {\n logo: false,\n iconClassName: '',\n iconSize: 104,\n cta: null,\n append: null,\n boldSubText: null,\n content: null,\n width: 96,\n contentWidth: 96,\n};\n\nexport default SplashScreen;\n", "import { FunctionComponent, useEffect } from 'react';\nimport { Document, Page, pdfjs } from 'react-pdf';\nimport usePdf from './usePdf';\n\n// This sucks, but so does react-pdf's typescript support\nconst DocumentTag = Document as unknown as FunctionComponent<any>;\n\nexport interface PdfProps {\n content?: string;\n}\n\nconst Pdf: FunctionComponent<PdfProps> = function ({ content }) {\n const { pdfProps, pages, showContent } = usePdf(content);\n\n useEffect(() => {\n pdfjs.GlobalWorkerOptions.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;\n }, []);\n\n if (!showContent) {\n return <></>;\n }\n\n return (\n <DocumentTag {...pdfProps}>\n {pages &&\n pages.map((page) => (\n <>\n <Page {...page} />\n </>\n ))}\n </DocumentTag>\n );\n};\n\nexport default Pdf;\n", "import { useToast } from '@kanda-libs/ks-design-library';\nimport { useCallback, useMemo, useState } from 'react';\n\nexport interface PdfPage {\n key: string;\n pageNumber: number;\n className: string;\n}\n\nexport interface PdfOnLoadSuccessArgs {\n numPages: number;\n}\n\nexport interface PdfOnLoadErrorArgs {\n message: string;\n}\n\nexport interface PdfHook {\n pdfProps: {\n file: string;\n error: string;\n onLoadSuccess: (args: PdfOnLoadSuccessArgs) => void;\n onLoadError: (args: PdfOnLoadErrorArgs) => void;\n onSourceError: (args: PdfOnLoadErrorArgs) => void;\n } | null;\n pages: PdfPage[] | null;\n showContent: boolean;\n}\n\nexport default function usePdf(content?: string): PdfHook {\n const [pages, setPages] = useState<PdfPage[] | null>(null);\n\n const { showError } = useToast();\n\n const onLoadSuccess = useCallback(({ numPages }: PdfOnLoadSuccessArgs) => {\n setPages(\n [...Array(numPages).keys()].map((index) => ({\n key: `page_${index + 1}`,\n pageNumber: index + 1,\n className: index !== 0 ? 'mt-4' : '',\n })),\n );\n }, []);\n\n const onLoadError = useCallback(\n ({ message }: PdfOnLoadErrorArgs) =>\n showError(\n `Error loading document. Please contact Kanda. Error message: ${message}`,\n ),\n [showError],\n );\n\n const onSourceError = useCallback(\n ({ message }: PdfOnLoadErrorArgs) =>\n showError(\n `Error retrieving document source. Please contact Kanda. Error message: ${message}`,\n ),\n [showError],\n );\n\n const pdfProps = useMemo(() => {\n if (!content) return null;\n return {\n file: `data:application/pdf;base64,${content}`,\n error:\n 'Failed to load the PDF file. The file can still be downloaded by clicking the button below',\n onLoadSuccess,\n onLoadError,\n onSourceError,\n };\n }, [content, onLoadSuccess, onLoadError, onSourceError]);\n\n const showContent = !!(pdfProps && !!content);\n\n return {\n pdfProps,\n pages,\n showContent,\n };\n}\n", "export const CLASS_NAMES = {\n container: 'grid grid-cols-7 justify-start items-start gap-x-2',\n};\n", "import type { FunctionComponent } from 'react';\nimport { CLASS_NAMES } from './constants';\n\nexport interface PipelineProps {\n children: JSX.Element | JSX.Element[];\n}\n\nconst Pipeline: FunctionComponent<PipelineProps> = function ({ children }) {\n return <div className={CLASS_NAMES.container}>{children}</div>;\n};\n\nexport default Pipeline;\n", "import { Children, type FunctionComponent } from 'react';\nimport { Button } from '@kanda-libs/ks-design-library';\nimport { CLASS_NAMES } from './constants';\nimport usePipelineColumnPagination from './usePipelineColumnPagination';\n\nexport interface PipelineColumnProps {\n title: string;\n children: JSX.Element | JSX.Element[];\n perPage?: number;\n}\n\nconst PipelineColumn: FunctionComponent<PipelineColumnProps> = function ({\n title,\n children,\n perPage = 5,\n}) {\n const { items, showMore, canShowMore } = usePipelineColumnPagination(\n Children.toArray(children) as JSX.Element[],\n perPage,\n );\n\n return (\n <div>\n <div className={CLASS_NAMES.title}>{title}</div>\n <div className={CLASS_NAMES.items}>\n {items}\n {canShowMore && (\n <div className=\"mt-2\">\n <Button.Text\n id=\"pipeline-column-show-more\"\n variant=\"outline\"\n onClick={showMore}\n label=\"More\"\n className=\"w-full\"\n />\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default PipelineColumn;\n", "export const CLASS_NAMES = {\n title: 'text-18-22-em text-neutral-900 py-2 text-center h-14',\n items: 'flex flex-col gap-y-2',\n};\n", "import { useCallback, useState } from 'react';\n\nexport interface PipelineColumnPaginationHook {\n items: JSX.Element[];\n showMore: () => void;\n canShowMore: boolean;\n}\n\nexport default function usePipelineColumnPagination(\n children: JSX.Element[],\n perPage: number,\n): PipelineColumnPaginationHook {\n const [page, setPage] = useState(0);\n\n const showMore = useCallback(() => {\n setPage((currentPage) => currentPage + 1);\n }, [setPage]);\n\n const items = children.slice(0, (page + 1) * perPage);\n\n return {\n items,\n showMore,\n canShowMore: children.length > items.length,\n };\n}\n", "import { Card, Text, TimeAgo } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\n\nexport interface SimpleCompanyCardProps {\n name: string;\n signedUpDate: Date;\n reviewed?: boolean;\n isLoading?: boolean;\n}\n\nconst SimpleCompanyCard: FunctionComponent<SimpleCompanyCardProps> = function ({\n name,\n signedUpDate,\n reviewed = false,\n isLoading = false,\n}) {\n return (\n <Card className={reviewed ? 'bg-blue-100' : ''}>\n <div className=\"flex flex-col gap-y-2\">\n <Text text={name} className=\"text-16-20-em\" isLoading={isLoading} />\n {reviewed && <Text text=\"Reviewed\" className=\"text-12-18-em-up\" />}\n <TimeAgo timestamp={signedUpDate.getTime()} />\n </div>\n </Card>\n );\n};\n\nexport default SimpleCompanyCard;\n", "import { BreakPoints } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport Desktop from './Desktop';\nimport Mobile from './Mobile';\n\nexport interface StageTimelineProps {\n stages: (string | JSX.Element)[];\n mobileStages?: string[];\n activeKey: number;\n}\n\nconst StageTimeline: FunctionComponent<StageTimelineProps> = function (props) {\n return (\n <BreakPoints\n desktop={<Desktop {...props} />}\n mobile={<Mobile {...props} />}\n />\n );\n};\n\nexport default StageTimeline;\n", "import { Icon, Text } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport useStageProps from './useStageProps';\n\nexport interface StageProps {\n index: number;\n active?: boolean;\n current?: boolean;\n last?: boolean;\n label: string | JSX.Element;\n}\n\nconst Stage: FunctionComponent<StageProps> = function ({\n index,\n active = false,\n current = false,\n last = false,\n label,\n}) {\n const { iconClasses, leftBorderClasses, rightBorderClasses } = useStageProps(\n active,\n current,\n index,\n last,\n );\n\n return (\n <div className=\"relative flex flex-col items-center w-full md:w-auto md:min-w-48\">\n {current && <Icon icon=\"chevron-down\" height={20} />}\n {!current && <div className=\"h-5\" />}\n <div className={iconClasses}>\n <div>\n {!active && index + 1}\n {active && <Icon icon=\"check\" width={12} />}\n </div>\n </div>\n <div className={leftBorderClasses} />\n {!last && <div className={rightBorderClasses} />}\n <Text text={label} className=\"text-sm text-center text-neutral-700\" />\n </div>\n );\n};\n\nexport default Stage;\n", "import clsx from 'clsx';\nimport type { StageProps } from '.';\n\nexport interface StagePropsHook {\n iconClasses: string;\n leftBorderClasses: string;\n rightBorderClasses: string;\n}\n\nexport default function useStageProps(\n active: StageProps['active'],\n current: StageProps['current'],\n index: StageProps['index'],\n last: StageProps['last'],\n): StagePropsHook {\n const currentlyActive = active || current;\n const iconClasses = clsx(\n 'w-7 h-7 rounded-2xl mb-2 relative z-10',\n 'text-center text-18-22-em flex items-center justify-center border border-solid border-2',\n !currentlyActive && 'border-neutral-600 text-neutral-600 bg-neutral-000',\n currentlyActive && 'bg-green-500 text-neutral-000 border-transparent',\n );\n\n const borderClasses = clsx(\n 'absolute h-1 top-[31px] z-0',\n !currentlyActive && 'bg-neutral-200',\n currentlyActive && 'bg-green-500',\n );\n\n const leftBorderClasses = clsx(\n borderClasses,\n 'w-1/2 left-0',\n index !== 0 && 'hidden md:block',\n index === 0 && 'hidden',\n );\n const rightBorderClasses = clsx(\n borderClasses,\n 'w-1/2 right-0 hidden md:block',\n current && 'bg-neutral-200',\n !last && 'hidden md:block',\n last && 'hidden',\n );\n\n return {\n iconClasses,\n leftBorderClasses,\n rightBorderClasses,\n };\n}\n", "import clsx from 'clsx';\nimport type { FunctionComponent } from 'react';\n\nexport interface TimelineBorderProps {\n active?: boolean;\n}\n\nconst TimelineBorder: FunctionComponent<TimelineBorderProps> = function ({\n active = false,\n}) {\n return (\n <div\n className={clsx(\n 'flex-grow w-full h-1 -mt-[32px] hidden md:block',\n !active && 'bg-neutral-200',\n active && 'bg-green-500',\n )}\n />\n );\n};\n\nexport default TimelineBorder;\n", "import type { FunctionComponent } from 'react';\nimport type { StageTimelineProps } from '.';\nimport Stage from './Stage';\nimport TimelineBorder from './TimelineBorder';\n\nconst Desktop: FunctionComponent<StageTimelineProps> = function ({\n stages,\n activeKey,\n}) {\n return (\n <div className=\"flex flex-col items-center justify-between h-full md:flex-row\">\n {stages.map((stage, key) => (\n <>\n <Stage\n key={`stage-${key}`}\n index={key}\n active={key < activeKey}\n current={key === activeKey}\n last={key === stages.length - 1}\n label={stage}\n />\n {key !== stages.length - 1 && (\n <TimelineBorder active={key < activeKey} />\n )}\n </>\n ))}\n </div>\n );\n};\n\nexport default Desktop;\n", "import { Timeline } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport type { StageTimelineProps } from '.';\n\nconst Mobile: FunctionComponent<StageTimelineProps> = function ({\n mobileStages = [],\n activeKey,\n}) {\n return (\n <div className=\"px-2\">\n <Timeline\n compact\n items={mobileStages.map((stage, index) => ({\n title: stage,\n fill: activeKey === index ? 'green' : 'grey',\n }))}\n />\n </div>\n );\n};\n\nexport default Mobile;\n", "import { Text } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport { CLASS_NAMES } from './constants';\n\nconst NotFoundPage: FunctionComponent = function () {\n return (\n <div className={CLASS_NAMES.container}>\n <Text text=\"404\" className=\"mb-4 text-28-32-em text-neutral-900\" />\n <Text text=\"Page not found\" className=\"text-20-24 text-neutral-700\" />\n </div>\n );\n};\n\nexport default NotFoundPage;\n", "export const CLASS_NAMES = {\n container: 'w-screen h-screen flex flex-col justify-center items-center',\n};\n", "import { Text } from '@kanda-libs/ks-design-library';\nimport clsx from 'clsx';\nimport type { FunctionComponent } from 'react';\nimport { CLASS_NAMES } from './constants';\n\nexport interface NumberedListItem {\n title: string;\n description: string;\n number?: number;\n}\n\nexport interface NumberedListProps {\n items: NumberedListItem[];\n className?: string;\n}\n\nconst NumberedList: FunctionComponent<NumberedListProps> = function ({\n items,\n className,\n}) {\n return (\n <div className={clsx(CLASS_NAMES.wrapper, className)}>\n {items.map((item, key) => (\n <div className={CLASS_NAMES.item} key={`item-${key}`}>\n <div className={CLASS_NAMES.itemNumber}>{item.number || key + 1}</div>\n <div className={CLASS_NAMES.itemContent}>\n <Text text={item.title} className={CLASS_NAMES.itemTitle} />\n <Text\n text={item.description}\n className={CLASS_NAMES.itemDescription}\n />\n </div>\n </div>\n ))}\n </div>\n );\n};\n\nexport default NumberedList;\n", "export const CLASS_NAMES = {\n wrapper: 'flex flex-col gap-y-1',\n item: 'flex flex-row items-center justify-start gap-y-2 md:mb-3',\n itemNumber:\n 'flex items-center justify-center w-8 h-8 px-4 mr-3 text-green-900 bg-green-200 rounded-full text-18-28-em',\n itemContent: 'flex flex-col text-left gap-y-1',\n itemTitle: 'w-full mb-auto text-16-20-em text-neutral-700',\n itemDescription: 'w-full mb-auto text-14-22 text-neutral-700',\n};\n"],
|
|
5
|
-
"mappings": "AAUI,cAAAA,OAAA,oBAJJ,IAAMC,GAAmD,SAAU,CACjE,SAAAC,CACF,EAAG,CACD,OACEF,GAAC,OAAI,UAAU,8EACZ,SAAAE,EACH,CAEJ,EAEOC,GAAQF,GCff,OACE,cAAAG,OAEK,gCCJP,OAAS,kBAAAC,OAAsB,gCCC/B,OAAS,QAAAC,OAAY,gCCDd,IAAMC,EACX,6IAEWC,EAAa,CACxB,KAAM,eACN,OAAQ,cACR,KAAM,GACN,UAAW,cACb,EAEaC,EAAgB,CAC3B,MAAO,mBACT,EAEaC,EAAsB,CACjC,UAAW,CACT,KAAM,gCACN,QAAS,YACX,EACA,K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D,SAAU,CACnE,MAAAC,EACA,UAAAC,CACF,EAAG,CACD,OACEJ,EAAC,OAAI,UAAWK,GAAKC,EAAY,QAASF,CAAS,EAChD,SAAAD,EAAM,IAAI,CAACI,EAAMC,IAChBP,GAAC,OAAI,UAAWK,EAAY,KAC1B,UAAAN,EAAC,OAAI,UAAWM,EAAY,WAAa,SAAAC,EAAK,QAAUC,EAAM,EAAE,EAChEP,GAAC,OAAI,UAAWK,EAAY,YAC1B,UAAAN,EAACS,GAAA,CAAK,KAAMF,EAAK,MAAO,UAAWD,EAAY,UAAW,EAC1DN,EAACS,GAAA,CACC,KAAMF,EAAK,YACX,UAAWD,EAAY,gBACzB,GACF,IARqC,QAAQE,GAS/C,CACD,EACH,CAEJ,EAEOE,GAAQR",
|
|
4
|
+
"sourcesContent": ["import type { FunctionComponent } from 'react';\n\nexport interface AlertBannerProps {\n children: string | JSX.Element | JSX.Element[];\n}\n\nconst AlertBanner: FunctionComponent<AlertBannerProps> = function ({\n children,\n}) {\n return (\n <div className=\"p-4 border bg-lavender-100 border-lavender-200 rounded-xl text-lavender-200\">\n {children}\n </div>\n );\n};\n\nexport default AlertBanner;\n", "import type { FunctionComponent, PropsWithChildren } from 'react';\nimport {\n Pagination,\n type StringIndexedObject,\n} from '@kanda-libs/ks-design-library';\nimport type { Column } from 'react-table';\nimport HeaderGroup from './components/HeaderGroup';\nimport Pages from './components/Pages';\nimport useTableProps from './useTableProps';\n\nexport interface TableProps<T extends StringIndexedObject<unknown>> {\n columns: Readonly<Column<T>[]>;\n data: T[];\n filter?: string;\n pageSize?: number;\n compact?: boolean;\n isLoading?: boolean;\n onRowClick?: (row: T) => void;\n query?: string;\n}\n\nexport type TableFunctionComponent<\n T extends StringIndexedObject<unknown> = any,\n> = FunctionComponent<TableProps<T>>;\n\nfunction Table<T extends StringIndexedObject<unknown>>({\n compact = false,\n isLoading = false,\n onRowClick,\n ...props\n}: PropsWithChildren<TableProps<T>>) {\n const {\n page,\n prepareRow,\n columns,\n getTableProps,\n headerGroups,\n paginationProps,\n } = useTableProps(props);\n\n return (\n <>\n <div {...getTableProps()} className=\"w-full\">\n <div>\n {headerGroups.map((headerGroup) => (\n <HeaderGroup\n headerGroup={headerGroup}\n columns={columns}\n isLoading={isLoading}\n />\n ))}\n </div>\n <Pages\n page={page}\n prepareRow={prepareRow}\n isLoading={isLoading}\n compact={compact}\n onRowClick={onRowClick}\n />\n </div>\n {paginationProps.pageCount > 1 && (\n <div className=\"px-4 py-4\">\n <Pagination {...paginationProps} />\n </div>\n )}\n </>\n );\n}\n\nexport default Table;\n", "import { SkeletonLoader } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent, ReactNode } from 'react';\nimport type { TableHeaderProps } from 'react-table';\nimport HeaderButton from '../HeaderButton';\nimport useHeaderColumnProps from './useHeaderColumnProps';\n\nexport interface HeaderColumnProps extends TableHeaderProps {\n index: number;\n isLoading?: boolean;\n popoverButtons?: boolean;\n label: ReactNode;\n}\n\nconst HeaderColumn: FunctionComponent<HeaderColumnProps> = function ({\n index,\n isLoading = false,\n popoverButtons = false,\n label,\n ...props\n}) {\n const { classNames } = useHeaderColumnProps(index, popoverButtons);\n\n return (\n <div {...props} className={classNames.main}>\n <SkeletonLoader\n isLoading={isLoading}\n wrapperClassName={classNames.loading}\n afterLoading={\n <HeaderButton.Wrapper index={index}>\n <HeaderButton.Button label={label} />\n </HeaderButton.Wrapper>\n }\n />\n </div>\n );\n};\n\nexport default HeaderColumn;\n", "import type { FunctionComponent, HTMLAttributes, ReactNode } from 'react';\nimport { Icon } from '@kanda-libs/ks-design-library';\nimport { BUTTON_CLASS_NAMES, ICON_PROPS } from './constants';\n\nexport interface ButtonProps extends HTMLAttributes<HTMLButtonElement> {\n label: ReactNode;\n}\n\nconst Button: FunctionComponent<ButtonProps> = function ({ label, ...props }) {\n return (\n <button className={BUTTON_CLASS_NAMES} {...props}>\n {label}\n <Icon {...ICON_PROPS} />\n </button>\n );\n};\n\nexport default Button;\n", "export const BUTTON_CLASS_NAMES =\n 'flex px-3 py-1.75 h-9 -ml-3 my-auto rounded-lg bg-transparent hover:bg-neutral-100 text-style-g-em text-neutral-500 whitespace-nowrap z-20';\n\nexport const ICON_PROPS = {\n icon: 'chevron-down',\n stroke: 'neutral-500',\n size: 12,\n className: 'ml-2 my-auto',\n};\n\nexport const WRAPPER_STYLE = {\n width: 'calc(100% + 16px)',\n};\n\nexport const WRAPPER_CLASS_NAMES = {\n container: {\n base: 'w-full h-full overflow-hidden',\n padding: 'pl-4 -ml-4',\n },\n flex: {\n base: 'w-full h-full flex px-4 px-0',\n padding: 'pl-4',\n },\n};\n", "import type { CSSProperties } from 'react';\nimport clsx from 'clsx';\nimport { WRAPPER_STYLE, WRAPPER_CLASS_NAMES } from './constants';\n\nexport interface WrapperPropsHook {\n classNames: {\n container: string;\n flex: string;\n };\n containerStyle: CSSProperties;\n}\n\nexport default function useWrapperProps(index: number): WrapperPropsHook {\n const containerStyle = index === 0 ? WRAPPER_STYLE : {};\n\n const classNames = {\n container: clsx(\n WRAPPER_CLASS_NAMES.container.base,\n index === 0 ? WRAPPER_CLASS_NAMES.container.padding : '',\n ),\n flex: clsx(\n WRAPPER_CLASS_NAMES.flex.base,\n index === 0 ? '' : WRAPPER_CLASS_NAMES.flex.padding,\n ),\n };\n\n return {\n classNames,\n containerStyle,\n };\n}\n", "import type { FunctionComponent } from 'react';\nimport useWrapperProps from './useWrapperProps';\n\nexport interface WrapperProps {\n index: number;\n children?: JSX.Element | JSX.Element[];\n}\n\nconst Wrapper: FunctionComponent<WrapperProps> = function ({\n index,\n children,\n}) {\n const { classNames, containerStyle } = useWrapperProps(index);\n\n return (\n <div className={classNames.container} style={containerStyle}>\n <div className={classNames.flex}>{children}</div>\n </div>\n );\n};\n\nexport default Wrapper;\n", "import Button from './Button';\nimport Wrapper from './Wrapper';\n\nexport default {\n Button,\n Wrapper,\n};\n", "import clsx from 'clsx';\nimport { CLASS_NAMES } from './constants';\n\nexport interface HeaderColumnPropsHook {\n classNames: {\n main: string;\n loading: string;\n wrapper: string;\n };\n}\n\nexport default function useHeaderColumnProps(\n index: number,\n popoverButtons: boolean,\n): HeaderColumnPropsHook {\n const classNames = {\n ...CLASS_NAMES,\n loading: clsx(\n CLASS_NAMES.loading.base,\n index === 0 ? '' : CLASS_NAMES.loading.margin,\n ),\n wrapper: clsx(\n CLASS_NAMES.wrapper.padding,\n popoverButtons ? '' : CLASS_NAMES.wrapper.popover,\n ),\n };\n\n return {\n classNames,\n };\n}\n", "export const CLASS_NAMES = {\n main: 'flex h-14',\n loading: {\n base: 'my-auto md:w-full mr-8',\n margin: 'ml-4',\n },\n wrapper: {\n padding: 'px-2 pt-2',\n popover: 'pb-1',\n },\n};\n\nexport const MOVE_LEFT_ITEM_PROPS = {\n name: 'Move column left',\n icon: 'arrow-left',\n};\n\nexport const MOVE_RIGHT_ITEM_PROPS = {\n name: 'Move column right',\n icon: 'arrow-right',\n};\n\nexport const HIDE_COLUMN_PROPS = {\n name: 'Hide column',\n icon: 'eye-off',\n};\n", "export const CLASS_NAMES = {\n base: 'flex-row h-14 border-b border-neutral-200',\n};\n", "import type {\n ColumnInstance,\n HeaderGroup,\n TableHeaderProps,\n} from 'react-table';\n\nexport interface HeaderGroupPropsHook<T extends Object> {\n headers: ColumnInstance<T>[];\n headerGroupProps: TableHeaderProps;\n totalVisible: number;\n}\n\nexport default function useHeaderGroupProps<T extends Object>(\n headerGroup: HeaderGroup<T>,\n columns: ColumnInstance<T>[],\n): HeaderGroupPropsHook<T> {\n const { headers, getHeaderGroupProps } = headerGroup;\n const headerGroupProps = getHeaderGroupProps({});\n\n const totalVisible = columns.filter((column) => column.isVisible).length;\n\n return {\n headers,\n headerGroupProps,\n totalVisible,\n };\n}\n", "import type { PropsWithChildren } from 'react';\nimport type {\n ColumnInstance,\n HeaderGroup as HeaderGroupType,\n} from 'react-table';\nimport HeaderColumn from '../HeaderColumn';\nimport { CLASS_NAMES } from './constants';\nimport useHeaderGroupProps from './useHeaderGroupProps';\n\nexport interface HeaderGroupProps<T extends Object> {\n headerGroup: HeaderGroupType<T>;\n columns: ColumnInstance<T>[];\n isLoading?: boolean;\n}\n\nfunction HeaderGroup<T extends Object>({\n headerGroup,\n columns,\n isLoading,\n}: PropsWithChildren<HeaderGroupProps<T>>) {\n const { headerGroupProps, headers } = useHeaderGroupProps(\n headerGroup,\n columns,\n );\n\n return (\n <div {...headerGroupProps} className={CLASS_NAMES.base}>\n {headers.map((column, index) => (\n <HeaderColumn\n index={index}\n label={column.render('Header')}\n isLoading={isLoading}\n {...column.getHeaderProps(column.getSortByToggleProps())}\n />\n ))}\n </div>\n );\n}\n\nexport default HeaderGroup;\n", "import type { FunctionComponent, ReactNode } from 'react';\nimport type { TableCellProps } from 'react-table';\nimport { SkeletonLoader, Text } from '@kanda-libs/ks-design-library';\nimport useCellClassNames from './useCellClassNames';\nimport useMobileFullWidthCellStyle from '~/hooks/useMobileFullWidthCellStyle';\n\nexport interface CellProps extends TableCellProps {\n index: number;\n render: () => ReactNode;\n compact?: boolean;\n isLoading?: boolean;\n label?: string;\n}\n\nconst Cell: FunctionComponent<CellProps> = function ({\n render,\n index,\n compact = false,\n isLoading = false,\n label,\n ...props\n}) {\n const classNames = useCellClassNames(index, compact, isLoading);\n\n const { style: unformattedStyle, ...formattedProps } = props;\n const style = useMobileFullWidthCellStyle(unformattedStyle);\n\n return (\n <div {...formattedProps} style={style} className={classNames.cell}>\n <div className={classNames.container}>\n <div className={classNames.render}>\n <SkeletonLoader\n isLoading={isLoading}\n afterLoading={\n <>\n <Text text={`${label}:`} className={classNames.mobileLabel} />\n {render()}\n </>\n }\n />\n </div>\n </div>\n </div>\n );\n};\n\nexport default Cell;\n", "import clsx from 'clsx';\nimport { CLASS_NAMES } from './constants';\n\nexport type CellClassNamesHook = {\n cell: string;\n container: string;\n render: string;\n mobileLabel: string;\n};\n\nexport default function useCellClassNames(\n index: number,\n compact: boolean,\n isLoading: boolean,\n): CellClassNamesHook {\n return {\n cell: clsx(\n compact ? CLASS_NAMES.cell.compact : CLASS_NAMES.cell.base,\n index === 0 ? '' : CLASS_NAMES.cell.padding,\n ),\n container: CLASS_NAMES.container,\n render: isLoading ? CLASS_NAMES.renderLoading : CLASS_NAMES.render,\n mobileLabel: CLASS_NAMES.mobileLabel,\n };\n}\n", "export const CLASS_NAMES = {\n container: 'flex w-full h-full',\n render:\n 'w-full my-auto text-style-g text-neutral-600 whitespace-nowrap overflow-hidden overflow-ellipsis',\n renderLoading: 'w-full my-auto mr-8 text-style-g',\n mobileLabel: 'block md:hidden text-16-24-em text-neutral-600 mr-2',\n cell: {\n base: 'px-4 py-1 md:pt-0 md:pr-0 md:pb-0 md:h-16 flex',\n compact: 'h-8 flex',\n padding: 'md:pl-4',\n },\n};\n", "import { useIsDesktop } from '@kanda-libs/ks-design-library';\nimport type { CSSProperties } from 'react';\n\nexport type MobileFullWidthCellStyleHook = CSSProperties;\n\nexport default function useMobileFullWidthCellStyle(\n style?: CSSProperties,\n): MobileFullWidthCellStyleHook {\n if (!style) return {};\n\n const isDesktop = useIsDesktop();\n\n // For mobile, we want to make sure that the cell is always 100% width\n const formattedStyle = {\n ...style,\n width: isDesktop ? style?.width : '100%',\n };\n\n return formattedStyle;\n}\n", "import { useClasses } from '@kanda-libs/ks-design-library';\nimport { CLASS_NAMES } from './constants';\n\nexport interface RowClassNamesHook {\n base: string;\n compact: string;\n border: string;\n hover: string;\n button: string;\n}\n\nexport default function useRowClassNames(\n index: number,\n canSelect: boolean,\n): RowClassNamesHook {\n const classNames = useClasses(CLASS_NAMES, {\n base: ['.base', index === 9 ? '' : '.border', canSelect ? '.hover' : ''],\n button: ['.button'],\n });\n\n return classNames as RowClassNamesHook;\n}\n", "export const CLASS_NAMES = {\n base: 'relative md:h-16 flex-col py-2 md:py-0 md:flex-row',\n compact: 'relative h-8',\n border: 'border-b border-neutral-200',\n hover: 'group hover:bg-neutral-50 cursor-pointer',\n button: 'hidden group-hover:block',\n};\n", "import type { PropsWithChildren } from 'react';\nimport type { Row as RowType, TableRowProps } from 'react-table';\nimport Cell from '../Cell';\nimport useRowClassNames from './useRowClassNames';\n\nexport interface RowProps<T extends Object> extends TableRowProps {\n cells: RowType<T>['cells'];\n index: number;\n compact?: boolean;\n isLoading?: boolean;\n onRowClick?: (row: T) => void;\n}\n\nfunction Row<T extends Object>({\n cells,\n index,\n compact = false,\n isLoading = false,\n onRowClick,\n ...props\n}: PropsWithChildren<RowProps<T>>) {\n const classNames = useRowClassNames(index, !!onRowClick);\n\n return (\n <div\n {...props}\n className={compact ? classNames.compact : classNames.base}\n onClick={() => {\n onRowClick && onRowClick(cells[0].row.original as T);\n }}\n >\n {cells.map((cell, cellIndex) => (\n <Cell\n {...cell.getCellProps()}\n index={cellIndex}\n isLoading={isLoading}\n render={() => cell.render('Cell')}\n label={cell.column.Header as string}\n />\n ))}\n </div>\n );\n}\n\nexport default Row;\n", "import type { StringIndexedObject } from '@kanda-libs/ks-design-library';\nimport type { PropsWithChildren } from 'react';\nimport type { Row as RowType } from 'react-table';\nimport Row from '../Row';\n\nexport interface PagesProps<T extends StringIndexedObject> {\n page: RowType<T>[];\n prepareRow: (row: RowType<T>) => void;\n isLoading?: boolean;\n compact?: boolean;\n onRowClick?: (row: T) => void;\n}\n\nfunction Pages<T extends StringIndexedObject>({\n page,\n prepareRow,\n isLoading = false,\n compact = false,\n onRowClick,\n}: PropsWithChildren<PagesProps<T>>) {\n return (\n <>\n {page.map((row, index) => {\n prepareRow(row);\n return (\n <Row\n {...row.getRowProps()}\n index={index}\n cells={row.cells}\n isLoading={isLoading}\n compact={compact}\n onRowClick={onRowClick}\n />\n );\n })}\n </>\n );\n}\nexport default Pages;\n", "import type { TableInstance, Row } from '../../@types/index';\nimport {\n useTable,\n useGlobalFilter,\n usePagination,\n useSortBy,\n useFlexLayout,\n type IdType,\n TableOptions,\n} from 'react-table';\nimport type { TableProps } from '.';\nimport { globalFilter } from './helpers/search';\nimport type {\n PaginationProps,\n StringIndexedObject,\n} from '@kanda-libs/ks-design-library';\nimport { useEffect } from 'react';\n\nexport interface TablePropsHook<T extends StringIndexedObject<unknown>>\n extends TableInstance<T> {\n paginationProps: PaginationProps;\n}\n\nexport default function useTableProps<T extends StringIndexedObject<unknown>>({\n columns,\n data,\n pageSize = 10,\n query = '',\n}: TableProps<T>): TablePropsHook<T> {\n const table = useTable<T>(\n {\n columns,\n data,\n initialState: {\n pageSize: 10,\n pageIndex: 0,\n },\n autoResetGlobalFilter: false,\n globalFilter: (\n rows: Row<T>[],\n searchKeys: IdType<T>[],\n filterValue: string,\n ) => globalFilter(rows, searchKeys, filterValue, pageSize),\n } as unknown as TableOptions<T>,\n useGlobalFilter,\n useSortBy,\n usePagination,\n useFlexLayout,\n );\n\n const {\n gotoPage,\n pageCount,\n state: { pageIndex },\n } = table;\n\n const paginationProps: PaginationProps = {\n pageCount,\n pageIndex,\n setPage: (nextPage: number) => {\n gotoPage(nextPage);\n },\n };\n\n useEffect(() => {\n table.setGlobalFilter(query);\n }, [query]);\n\n return {\n paginationProps,\n ...table,\n };\n}\n", "import type { IdType } from 'react-table';\nimport type { Row } from '../../../@types/index';\nimport Fuse from 'fuse.js';\nimport type { StringIndexedObject } from '~/types';\n\nconst exactMatchSearch = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n filterValue: string,\n) => {\n return rows.filter((row) => {\n // Take all values from the row, and add them together in a string\n // for the purposes of searching\n const rowValues = Object.values(row.values).join(', ');\n\n return rowValues.toLowerCase().includes(filterValue.toLowerCase());\n });\n};\n\nconst excludeExactMatches = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n exactMatchRows: Row<T>[],\n) =>\n rows.filter(\n ({ id }) => exactMatchRows.filter((p) => p.id === id).length === 0,\n );\n\nconst fuzzySearch = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n filterValue: string,\n searchKeys: string[],\n numberOfRows: number,\n exactMatchRows: Row<T>[],\n): Row<T>[] => {\n const currentRows = rows.map((row) => {\n return row.values;\n });\n\n const fuse = new Fuse(currentRows, {\n keys: searchKeys.map((key) => ({\n name: key,\n // Because FuseJS allows for dot notation,\n // we need to use a function to get the value\n // as the object returned from the table is flat,\n // rather than nested\n getFn: (obj: StringIndexedObject) => obj[key],\n })),\n });\n\n const results = fuse\n .search(filterValue)\n .map(({ item }) => item)\n .slice(0, numberOfRows);\n\n const filteredResults = results\n .map((result) => rows.find((row) => row.values.cid === result.cid))\n .filter(Boolean) as Row<T>[];\n\n return excludeExactMatches(filteredResults, exactMatchRows);\n};\n\nexport const globalFilter = <T extends StringIndexedObject<unknown>>(\n rows: Row<T>[],\n searchKeys: IdType<T>[],\n filterValue: string,\n pageSize = 10,\n): Row<T>[] => {\n if (filterValue.length < 1) {\n return rows;\n }\n\n // Get the first 10 exact matches. The reason for this is that exact matching\n // should take presedence over fuzzy matching. An exact match is more useful\n // but also less expensive to compute. So there's no need to do a fuzzy search\n // if there are >= 10 exact matches.\n const exactMatches = exactMatchSearch(rows, filterValue).slice(0, pageSize);\n const currentRowsExcludingExactMatches = excludeExactMatches(\n rows,\n exactMatches,\n );\n\n const fuzzyMatches = fuzzySearch(\n currentRowsExcludingExactMatches,\n filterValue,\n searchKeys,\n pageSize - exactMatches.length,\n exactMatches,\n );\n\n const results = [...exactMatches, ...fuzzyMatches];\n\n // Return the rows in the same order as the original rows\n // to preserve sorting, which happens before fuzzy matching\n return rows\n .map(({ id }) => results.find((row) => row.id === id))\n .filter(Boolean) as Row<T>[];\n};\n", "import { Text } from '@kanda-libs/ks-design-library';\nimport clsx from 'clsx';\nimport type { FunctionComponent } from 'react';\nimport { TITLE_MARGINS, TITLE_SIZES } from './constants';\n\nexport interface TitleProps {\n size?: keyof typeof TITLE_SIZES;\n className?: string;\n children: string | JSX.Element;\n}\n\nconst Title: FunctionComponent<TitleProps> = function ({\n size = 1,\n className,\n children,\n}) {\n return (\n <Text\n text={children}\n className={clsx(TITLE_MARGINS[size], TITLE_SIZES[size], className)}\n />\n );\n};\n\nexport default Title;\n", "export const TITLE_SIZES = {\n 1: 'text-24-28-em',\n 2: 'text-16-20-em',\n};\n\nexport const TITLE_MARGINS: Record<keyof typeof TITLE_SIZES, string> = {\n 1: 'mb-4',\n 2: 'mb-2',\n};\n", "import { Icon, Logo } from '@kanda-libs/ks-design-library';\n\ntype Widths = 80 | 96 | 120 | 160;\n\ninterface SplashScreenProps {\n logo?: boolean;\n icon: string;\n iconClassName?: string;\n iconSize?: number;\n title: string;\n subText: string | JSX.Element;\n boldSubText?: string;\n cta?: JSX.Element;\n append?: JSX.Element;\n width?: Widths;\n contentWidth?: Widths;\n content?: JSX.Element;\n}\n\nconst WIDTHS = {\n 80: 'max-w-80',\n 96: 'max-w-96',\n 120: 'max-w-120',\n 160: 'max-w160',\n};\n\nconst SplashScreen = ({\n logo,\n icon,\n iconClassName,\n iconSize,\n title,\n subText,\n boldSubText,\n cta,\n append,\n width = 80,\n contentWidth = 80,\n content,\n}: SplashScreenProps) => (\n <div\n className={`flex flex-col m-auto w-full ${WIDTHS[width]} text-center items-center justify-center`}\n >\n {logo && (\n <div className=\"mb-10\">\n <Logo height={32} />\n </div>\n )}\n {!logo && (\n <Icon\n icon={icon}\n size={iconSize}\n className={`mx-auto mb-8 ${iconClassName}`}\n />\n )}\n <h1 className=\"text-24-28-em mb-4\">{title}</h1>\n <div className={`flex flex-col w-full ${WIDTHS[contentWidth]} mx-auto`}>\n {content && <div className=\"mt-4 mb-8\">{content}</div>}\n <span className=\"text-16-24 text-neutral-600\">\n {subText}\n {boldSubText && <b> {boldSubText}</b>}\n </span>\n {cta && <div className=\"mt-10\">{cta}</div>}\n {append}\n </div>\n </div>\n);\n\nSplashScreen.defaultProps = {\n logo: false,\n iconClassName: '',\n iconSize: 104,\n cta: null,\n append: null,\n boldSubText: null,\n content: null,\n width: 96,\n contentWidth: 96,\n};\n\nexport default SplashScreen;\n", "import { FunctionComponent, useEffect } from 'react';\nimport { Document, Page, pdfjs } from 'react-pdf';\nimport usePdf from './usePdf';\n\n// This sucks, but so does react-pdf's typescript support\nconst DocumentTag = Document as unknown as FunctionComponent<any>;\n\nexport interface PdfProps {\n content?: string;\n}\n\nconst Pdf: FunctionComponent<PdfProps> = function ({ content }) {\n const { pdfProps, pages, showContent } = usePdf(content);\n\n useEffect(() => {\n pdfjs.GlobalWorkerOptions.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;\n }, []);\n\n if (!showContent) {\n return <></>;\n }\n\n return (\n <DocumentTag {...pdfProps}>\n {pages &&\n pages.map((page) => (\n <>\n <Page {...page} />\n </>\n ))}\n </DocumentTag>\n );\n};\n\nexport default Pdf;\n", "import { useToast } from '@kanda-libs/ks-design-library';\nimport { useCallback, useMemo, useState } from 'react';\n\nexport interface PdfPage {\n key: string;\n pageNumber: number;\n className: string;\n}\n\nexport interface PdfOnLoadSuccessArgs {\n numPages: number;\n}\n\nexport interface PdfOnLoadErrorArgs {\n message: string;\n}\n\nexport interface PdfHook {\n pdfProps: {\n file: string;\n error: string;\n onLoadSuccess: (args: PdfOnLoadSuccessArgs) => void;\n onLoadError: (args: PdfOnLoadErrorArgs) => void;\n onSourceError: (args: PdfOnLoadErrorArgs) => void;\n } | null;\n pages: PdfPage[] | null;\n showContent: boolean;\n}\n\nexport default function usePdf(content?: string): PdfHook {\n const [pages, setPages] = useState<PdfPage[] | null>(null);\n\n const { showError } = useToast();\n\n const onLoadSuccess = useCallback(({ numPages }: PdfOnLoadSuccessArgs) => {\n setPages(\n [...Array(numPages).keys()].map((index) => ({\n key: `page_${index + 1}`,\n pageNumber: index + 1,\n className: index !== 0 ? 'mt-4' : '',\n })),\n );\n }, []);\n\n const onLoadError = useCallback(\n ({ message }: PdfOnLoadErrorArgs) =>\n showError(\n `Error loading document. Please contact Kanda. Error message: ${message}`,\n ),\n [showError],\n );\n\n const onSourceError = useCallback(\n ({ message }: PdfOnLoadErrorArgs) =>\n showError(\n `Error retrieving document source. Please contact Kanda. Error message: ${message}`,\n ),\n [showError],\n );\n\n const pdfProps = useMemo(() => {\n if (!content) return null;\n return {\n file: `data:application/pdf;base64,${content}`,\n error:\n 'Failed to load the PDF file. The file can still be downloaded by clicking the button below',\n onLoadSuccess,\n onLoadError,\n onSourceError,\n };\n }, [content, onLoadSuccess, onLoadError, onSourceError]);\n\n const showContent = !!(pdfProps && !!content);\n\n return {\n pdfProps,\n pages,\n showContent,\n };\n}\n", "export const CLASS_NAMES = {\n container: 'grid grid-cols-7 justify-start items-start gap-x-2',\n};\n", "import type { FunctionComponent } from 'react';\nimport { CLASS_NAMES } from './constants';\n\nexport interface PipelineProps {\n children: JSX.Element | JSX.Element[];\n}\n\nconst Pipeline: FunctionComponent<PipelineProps> = function ({ children }) {\n return <div className={CLASS_NAMES.container}>{children}</div>;\n};\n\nexport default Pipeline;\n", "import { Children, type FunctionComponent } from 'react';\nimport { Button } from '@kanda-libs/ks-design-library';\nimport { CLASS_NAMES } from './constants';\nimport usePipelineColumnPagination from './usePipelineColumnPagination';\n\nexport interface PipelineColumnProps {\n title: string;\n children: JSX.Element | JSX.Element[];\n perPage?: number;\n}\n\nconst PipelineColumn: FunctionComponent<PipelineColumnProps> = function ({\n title,\n children,\n perPage = 5,\n}) {\n const { items, showMore, canShowMore } = usePipelineColumnPagination(\n Children.toArray(children) as JSX.Element[],\n perPage,\n );\n\n return (\n <div>\n <div className={CLASS_NAMES.title}>{title}</div>\n <div className={CLASS_NAMES.items}>\n {items}\n {canShowMore && (\n <div className=\"mt-2\">\n <Button.Text\n id=\"pipeline-column-show-more\"\n variant=\"outline\"\n onClick={showMore}\n label=\"More\"\n className=\"w-full\"\n />\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default PipelineColumn;\n", "export const CLASS_NAMES = {\n title: 'text-18-22-em text-neutral-900 py-2 text-center h-14',\n items: 'flex flex-col gap-y-2',\n};\n", "import { useCallback, useState } from 'react';\n\nexport interface PipelineColumnPaginationHook {\n items: JSX.Element[];\n showMore: () => void;\n canShowMore: boolean;\n}\n\nexport default function usePipelineColumnPagination(\n children: JSX.Element[],\n perPage: number,\n): PipelineColumnPaginationHook {\n const [page, setPage] = useState(0);\n\n const showMore = useCallback(() => {\n setPage((currentPage) => currentPage + 1);\n }, [setPage]);\n\n const items = children.slice(0, (page + 1) * perPage);\n\n return {\n items,\n showMore,\n canShowMore: children.length > items.length,\n };\n}\n", "import { Card, Text, TimeAgo } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\n\nexport interface SimpleCompanyCardProps {\n name: string;\n signedUpDate: Date;\n reviewed?: boolean;\n isLoading?: boolean;\n}\n\nconst SimpleCompanyCard: FunctionComponent<SimpleCompanyCardProps> = function ({\n name,\n signedUpDate,\n reviewed = false,\n isLoading = false,\n}) {\n return (\n <Card className={reviewed ? 'bg-blue-100' : ''}>\n <div className=\"flex flex-col gap-y-2\">\n <Text text={name} className=\"text-16-20-em\" isLoading={isLoading} />\n {reviewed && <Text text=\"Reviewed\" className=\"text-12-18-em-up\" />}\n <TimeAgo timestamp={signedUpDate.getTime()} />\n </div>\n </Card>\n );\n};\n\nexport default SimpleCompanyCard;\n", "import { BreakPoints } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport Desktop from './Desktop';\nimport Mobile from './Mobile';\n\nexport interface StageTimelineProps {\n stages: (string | JSX.Element)[];\n mobileStages?: string[];\n activeKey: number;\n}\n\nconst StageTimeline: FunctionComponent<StageTimelineProps> = function (props) {\n return (\n <BreakPoints\n desktop={<Desktop {...props} />}\n mobile={<Mobile {...props} />}\n />\n );\n};\n\nexport default StageTimeline;\n", "import { Icon, Text } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport useStageProps from './useStageProps';\n\nexport interface StageProps {\n index: number;\n active?: boolean;\n current?: boolean;\n last?: boolean;\n label: string | JSX.Element;\n}\n\nconst Stage: FunctionComponent<StageProps> = function ({\n index,\n active = false,\n current = false,\n last = false,\n label,\n}) {\n const { iconClasses, leftBorderClasses, rightBorderClasses } = useStageProps(\n active,\n current,\n index,\n last,\n );\n\n return (\n <div className=\"relative flex flex-col items-center w-full md:w-auto md:min-w-48\">\n {current && <Icon icon=\"chevron-down\" height={20} />}\n {!current && <div className=\"h-5\" />}\n <div className={iconClasses}>\n <div>\n {!active && index + 1}\n {active && <Icon icon=\"check\" width={12} />}\n </div>\n </div>\n <div className={leftBorderClasses} />\n {!last && <div className={rightBorderClasses} />}\n <Text text={label} className=\"text-sm text-center text-neutral-700\" />\n </div>\n );\n};\n\nexport default Stage;\n", "import clsx from 'clsx';\nimport type { StageProps } from '.';\n\nexport interface StagePropsHook {\n iconClasses: string;\n leftBorderClasses: string;\n rightBorderClasses: string;\n}\n\nexport default function useStageProps(\n active: StageProps['active'],\n current: StageProps['current'],\n index: StageProps['index'],\n last: StageProps['last'],\n): StagePropsHook {\n const currentlyActive = active || current;\n const iconClasses = clsx(\n 'w-7 h-7 rounded-2xl mb-2 relative z-10',\n 'text-center text-18-22-em flex items-center justify-center border border-solid border-2',\n !currentlyActive && 'border-neutral-600 text-neutral-600 bg-neutral-000',\n currentlyActive && 'bg-green-500 text-neutral-000 border-transparent',\n );\n\n const borderClasses = clsx(\n 'absolute h-1 top-[31px] z-0',\n !currentlyActive && 'bg-neutral-200',\n currentlyActive && 'bg-green-500',\n );\n\n const leftBorderClasses = clsx(\n borderClasses,\n 'w-1/2 left-0',\n index !== 0 && 'hidden md:block',\n index === 0 && 'hidden',\n );\n const rightBorderClasses = clsx(\n borderClasses,\n 'w-1/2 right-0 hidden md:block',\n current && 'bg-neutral-200',\n !last && 'hidden md:block',\n last && 'hidden',\n );\n\n return {\n iconClasses,\n leftBorderClasses,\n rightBorderClasses,\n };\n}\n", "import clsx from 'clsx';\nimport type { FunctionComponent } from 'react';\n\nexport interface TimelineBorderProps {\n active?: boolean;\n}\n\nconst TimelineBorder: FunctionComponent<TimelineBorderProps> = function ({\n active = false,\n}) {\n return (\n <div\n className={clsx(\n 'flex-grow w-full h-1 -mt-[32px] hidden md:block',\n !active && 'bg-neutral-200',\n active && 'bg-green-500',\n )}\n />\n );\n};\n\nexport default TimelineBorder;\n", "import type { FunctionComponent } from 'react';\nimport type { StageTimelineProps } from '.';\nimport Stage from './Stage';\nimport TimelineBorder from './TimelineBorder';\n\nconst Desktop: FunctionComponent<StageTimelineProps> = function ({\n stages,\n activeKey,\n}) {\n return (\n <div className=\"flex flex-col items-center justify-between h-full md:flex-row\">\n {stages.map((stage, key) => (\n <>\n <Stage\n key={`stage-${key}`}\n index={key}\n active={key < activeKey}\n current={key === activeKey}\n last={key === stages.length - 1}\n label={stage}\n />\n {key !== stages.length - 1 && (\n <TimelineBorder active={key < activeKey} />\n )}\n </>\n ))}\n </div>\n );\n};\n\nexport default Desktop;\n", "import { Timeline } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport type { StageTimelineProps } from '.';\n\nconst Mobile: FunctionComponent<StageTimelineProps> = function ({\n mobileStages = [],\n activeKey,\n}) {\n return (\n <div className=\"px-2\">\n <Timeline\n compact\n items={mobileStages.map((stage, index) => ({\n title: stage,\n fill: activeKey === index ? 'green' : 'grey',\n }))}\n />\n </div>\n );\n};\n\nexport default Mobile;\n", "import { Text } from '@kanda-libs/ks-design-library';\nimport type { FunctionComponent } from 'react';\nimport { CLASS_NAMES } from './constants';\n\nconst NotFoundPage: FunctionComponent = function () {\n return (\n <div className={CLASS_NAMES.container}>\n <Text text=\"404\" className=\"mb-4 text-28-32-em text-neutral-900\" />\n <Text text=\"Page not found\" className=\"text-20-24 text-neutral-700\" />\n </div>\n );\n};\n\nexport default NotFoundPage;\n", "export const CLASS_NAMES = {\n container: 'w-screen h-screen flex flex-col justify-center items-center',\n};\n", "import { Text } from '@kanda-libs/ks-design-library';\nimport clsx from 'clsx';\nimport type { FunctionComponent } from 'react';\nimport { CLASS_NAMES } from './constants';\n\nexport interface NumberedListItem {\n title: string;\n description: string;\n number?: number;\n}\n\nexport interface NumberedListProps {\n items: NumberedListItem[];\n className?: string;\n}\n\nconst NumberedList: FunctionComponent<NumberedListProps> = function ({\n items,\n className,\n}) {\n return (\n <div className={clsx(CLASS_NAMES.wrapper, className)}>\n {items.map((item, key) => (\n <div className={CLASS_NAMES.item} key={`item-${key}`}>\n <div className={CLASS_NAMES.itemNumber}>{item.number || key + 1}</div>\n <div className={CLASS_NAMES.itemContent}>\n <Text text={item.title} className={CLASS_NAMES.itemTitle} />\n <Text\n text={item.description}\n className={CLASS_NAMES.itemDescription}\n />\n </div>\n </div>\n ))}\n </div>\n );\n};\n\nexport default NumberedList;\n", "export const CLASS_NAMES = {\n wrapper: 'flex flex-col gap-y-4 md:gap-y-1',\n item: 'flex flex-row items-center justify-start gap-y-2 md:mb-3',\n itemNumber:\n 'flex items-center justify-center w-8 h-8 px-4 mr-3 text-green-900 bg-green-200 rounded-full text-18-28-em',\n itemContent: 'flex flex-col text-left gap-y-1',\n itemTitle: 'w-full mb-auto text-16-20-em text-neutral-700',\n itemDescription: 'w-full mb-auto text-14-22 text-neutral-700',\n};\n"],
|
|
5
|
+
"mappings": "AAUI,cAAAA,OAAA,oBAJJ,IAAMC,GAAmD,SAAU,CACjE,SAAAC,CACF,EAAG,CACD,OACEF,GAAC,OAAI,UAAU,8EACZ,SAAAE,EACH,CAEJ,EAEOC,GAAQF,GCff,OACE,cAAAG,OAEK,gCCJP,OAAS,kBAAAC,OAAsB,gCCC/B,OAAS,QAAAC,OAAY,gCCDd,IAAMC,EACX,6IAEWC,EAAa,CACxB,KAAM,eACN,OAAQ,cACR,KAAM,GACN,UAAW,cACb,EAEaC,EAAgB,CAC3B,MAAO,mBACT,EAEaC,EAAsB,CACjC,UAAW,CACT,KAAM,gCACN,QAAS,YACX,EACA,KAAM,CACJ,KAAM,+BACN,QAAS,MACX,CACF,EDbI,OAEE,OAAAC,GAFF,QAAAC,OAAA,oBAFJ,IAAMC,GAAyC,SAAU,CAAE,MAAAC,KAAUC,CAAM,EAAG,CAC5E,OACEH,GAAC,UAAO,UAAWI,EAAqB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B,UAAAN,EAAC,OAAI,UAAWM,EAAY,WAAa,SAAAC,EAAK,QAAUC,EAAM,EAAE,EAChEP,GAAC,OAAI,UAAWK,EAAY,YAC1B,UAAAN,EAACS,GAAA,CAAK,KAAMF,EAAK,MAAO,UAAWD,EAAY,UAAW,EAC1DN,EAACS,GAAA,CACC,KAAMF,EAAK,YACX,UAAWD,EAAY,gBACzB,GACF,IARqC,QAAQE,GAS/C,CACD,EACH,CAEJ,EAEOE,GAAQR",
|
|
6
6
|
"names": ["jsx", "AlertBanner", "children", "AlertBanner_default", "Pagination", "SkeletonLoader", "Icon", "BUTTON_CLASS_NAMES", "ICON_PROPS", "WRAPPER_STYLE", "WRAPPER_CLASS_NAMES", "jsx", "jsxs", "Button", "label", "props", "BUTTON_CLASS_NAMES", "Icon", "ICON_PROPS", "Button_default", "clsx", "useWrapperProps", "index", "containerStyle", "WRAPPER_STYLE", "clsx", "WRAPPER_CLASS_NAMES", "jsx", "Wrapper", "index", "children", "classNames", "containerStyle", "useWrapperProps", "Wrapper_default", "HeaderButton_default", "Button_default", "Wrapper_default", "clsx", "CLASS_NAMES", "useHeaderColumnProps", "index", "popoverButtons", "CLASS_NAMES", "clsx", "jsx", "HeaderColumn", "index", "isLoading", "popoverButtons", "label", "props", "classNames", "useHeaderColumnProps", "SkeletonLoader", "HeaderButton_default", "HeaderColumn_default", "CLASS_NAMES", "useHeaderGroupProps", "headerGroup", "columns", "headers", "getHeaderGroupProps", "headerGroupProps", "totalVisible", "column", "jsx", "HeaderGroup", "headerGroup", "columns", "isLoading", "headerGroupProps", "headers", "useHeaderGroupProps", "CLASS_NAMES", "column", "index", "HeaderColumn_default", "HeaderGroup_default", "SkeletonLoader", "Text", "clsx", "CLASS_NAMES", "useCellClassNames", "index", "compact", "isLoading", "clsx", "CLASS_NAMES", "useIsDesktop", "useMobileFullWidthCellStyle", "style", "isDesktop", "Fragment", "jsx", "jsxs", "Cell", "render", "index", "compact", "isLoading", "label", "props", "classNames", "useCellClassNames", "unformattedStyle", "formattedProps", "style", "useMobileFullWidthCellStyle", "SkeletonLoader", "Text", "Cell_default", "useClasses", "CLASS_NAMES", "useRowClassNames", "index", "canSelect", "useClasses", "CLASS_NAMES", "jsx", "Row", "cells", "index", "compact", "isLoading", "onRowClick", "props", "classNames", "useRowClassNames", "cell", "cellIndex", "Cell_default", "Row_default", "Fragment", "jsx", "Pages", "page", "prepareRow", "isLoading", "compact", "onRowClick", "row", "index", "Row_default", "Pages_default", "useTable", "useGlobalFilter", "usePagination", "useSortBy", "useFlexLayout", "Fuse", "exactMatchSearch", "rows", "filterValue", "row", "excludeExactMatches", "exactMatchRows", "id", "p", "fuzzySearch", "searchKeys", "numberOfRows", "currentRows", "filteredResults", "key", "obj", "item", "result", "globalFilter", "pageSize", "exactMatches", "currentRowsExcludingExactMatches", "fuzzyMatches", "results", "useEffect", "useTableProps", "columns", "data", "pageSize", "query", "table", "useTable", "rows", "searchKeys", "filterValue", "globalFilter", "useGlobalFilter", "useSortBy", "usePagination", "useFlexLayout", "gotoPage", "pageCount", "pageIndex", "paginationProps", "nextPage", "Fragment", "jsx", "jsxs", "Table", "compact", "isLoading", "onRowClick", "props", "page", "prepareRow", "columns", "getTableProps", "headerGroups", "paginationProps", "useTableProps", "headerGroup", "HeaderGroup_default", "Pages_default", "Pagination", "Table_default", "Text", "clsx", "TITLE_SIZES", "TITLE_MARGINS", "jsx", "Title", "size", "className", "children", "Text", "clsx", "TITLE_MARGINS", "TITLE_SIZES", "Title_default", "Icon", "Logo", "jsx", "jsxs", "WIDTHS", "SplashScreen", "logo", "icon", "iconClassName", "iconSize", "title", "subText", "boldSubText", "cta", "append", "width", "contentWidth", "content", "SplashScreen_default", "useEffect", "Document", "Page", "pdfjs", "useToast", "useCallback", "useMemo", "useState", "usePdf", "content", "pages", "setPages", "showError", "onLoadSuccess", "numPages", "index", "onLoadError", "message", "onSourceError", "pdfProps", "Fragment", "jsx", "DocumentTag", "Document", "Pdf", "content", "pdfProps", "pages", "showContent", "usePdf", "useEffect", "pdfjs", "page", "Page", "Pdf_default", "CLASS_NAMES", "jsx", "Pipeline", "children", "CLASS_NAMES", "Pipeline_default", "Children", "Button", "CLASS_NAMES", "useCallback", "useState", "usePipelineColumnPagination", "children", "perPage", "page", "setPage", "showMore", "currentPage", "items", "jsx", "jsxs", "PipelineColumn", "title", "children", "perPage", "items", "showMore", "canShowMore", "usePipelineColumnPagination", "Children", "CLASS_NAMES", "Button", "PipelineColumn_default", "Card", "Text", "TimeAgo", "jsx", "jsxs", "SimpleCompanyCard", "name", "signedUpDate", "reviewed", "isLoading", "SimpleCompanyCard_default", "BreakPoints", "Icon", "Text", "clsx", "useStageProps", "active", "current", "index", "last", "currentlyActive", "iconClasses", "borderClasses", "leftBorderClasses", "rightBorderClasses", "jsx", "jsxs", "Stage", "index", "active", "current", "last", "label", "iconClasses", "leftBorderClasses", "rightBorderClasses", "useStageProps", "Icon", "Text", "Stage_default", "clsx", "jsx", "TimelineBorder", "active", "TimelineBorder_default", "Fragment", "jsx", "jsxs", "Desktop", "stages", "activeKey", "stage", "key", "Stage_default", "TimelineBorder_default", "Desktop_default", "Timeline", "jsx", "Mobile", "mobileStages", "activeKey", "stage", "index", "Mobile_default", "jsx", "StageTimeline", "props", "BreakPoints", "Desktop_default", "Mobile_default", "StageTimeline_default", "Text", "CLASS_NAMES", "jsx", "jsxs", "NotFoundPage", "CLASS_NAMES", "Text", "NotFoundPage_default", "Text", "clsx", "CLASS_NAMES", "jsx", "jsxs", "NumberedList", "items", "className", "clsx", "CLASS_NAMES", "item", "key", "Text", "NumberedList_default"]
|
|
7
7
|
}
|
package/dist/library.css
CHANGED
|
@@ -1231,14 +1231,18 @@ video {
|
|
|
1231
1231
|
justify-content: space-between;
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
1234
|
-
.gap-y-
|
|
1235
|
-
row-gap:
|
|
1234
|
+
.gap-y-4 {
|
|
1235
|
+
row-gap: 16px;
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
1238
|
.gap-y-2 {
|
|
1239
1239
|
row-gap: 8px;
|
|
1240
1240
|
}
|
|
1241
1241
|
|
|
1242
|
+
.gap-y-1 {
|
|
1243
|
+
row-gap: 4px;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1242
1246
|
.gap-x-2 {
|
|
1243
1247
|
-moz-column-gap: 8px;
|
|
1244
1248
|
column-gap: 8px;
|
|
@@ -2387,6 +2391,10 @@ Modified version of toast CSS to match designs
|
|
|
2387
2391
|
flex-direction: row;
|
|
2388
2392
|
}
|
|
2389
2393
|
|
|
2394
|
+
.md\:gap-y-1 {
|
|
2395
|
+
row-gap: 4px;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2390
2398
|
.md\:py-0 {
|
|
2391
2399
|
padding-top: 0;
|
|
2392
2400
|
padding-bottom: 0;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const CLASS_NAMES = {
|
|
2
|
-
wrapper: 'flex flex-col gap-y-1',
|
|
2
|
+
wrapper: 'flex flex-col gap-y-4 md:gap-y-1',
|
|
3
3
|
item: 'flex flex-row items-center justify-start gap-y-2 md:mb-3',
|
|
4
4
|
itemNumber:
|
|
5
5
|
'flex items-center justify-center w-8 h-8 px-4 mr-3 text-green-900 bg-green-200 rounded-full text-18-28-em',
|
package/src/styles/library.css
CHANGED
|
@@ -1231,14 +1231,18 @@ video {
|
|
|
1231
1231
|
justify-content: space-between;
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
1234
|
-
.gap-y-
|
|
1235
|
-
row-gap:
|
|
1234
|
+
.gap-y-4 {
|
|
1235
|
+
row-gap: 16px;
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
1238
|
.gap-y-2 {
|
|
1239
1239
|
row-gap: 8px;
|
|
1240
1240
|
}
|
|
1241
1241
|
|
|
1242
|
+
.gap-y-1 {
|
|
1243
|
+
row-gap: 4px;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1242
1246
|
.gap-x-2 {
|
|
1243
1247
|
-moz-column-gap: 8px;
|
|
1244
1248
|
column-gap: 8px;
|
|
@@ -2387,6 +2391,10 @@ Modified version of toast CSS to match designs
|
|
|
2387
2391
|
flex-direction: row;
|
|
2388
2392
|
}
|
|
2389
2393
|
|
|
2394
|
+
.md\:gap-y-1 {
|
|
2395
|
+
row-gap: 4px;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2390
2398
|
.md\:py-0 {
|
|
2391
2399
|
padding-top: 0;
|
|
2392
2400
|
padding-bottom: 0;
|