PageSourceSearch

https://tailwindadmin-tanstack-pro-dark.netlify.app/assets/orders-table-CmbCppVJ.js

js tailwindadmin-tanstack-pro-dark.netlify.app collected 2026-10-03 11:31:33 UTC 22,438 bytes, 2 lines download raw bytes

1import{j as e,r as i,C as pe,R as ae}from"./main-BkpAS6Tt.js";import{u as je,g as fe,e as be,a as we,b as Ce,c as Ne,f as U,d as ve}from"./index-D2HWtwv1.js";import{S as $,a as z,b as L,c as B,e as x}from"./select-CTV8gp4j.js";import{D as Y,a as Q,b as W,c as D}from"./dropdown-menu-CLPKr1dO.js";import{A as ye,a as Se,b as ke}from"./avatar-Da6FP_Y6.js";import{C as F}from"./checkbox-D8LlTdKA.js";import{I as h}from"./input-D3PXSnUk.js";import{B as Me}from"./badge-BVkGl1_x.js";import{B as m}from"./button-CVuE7h15.js";import{I as o}from"./iconify-BLAYqHQO.js";import{C as se}from"./card-DoRMGzGn.js";import{y as Re,L as Pe}from"./index-C9jNhDaY.js";import{C as X}from"./calendar-m2MJAs-m.js";import{P as Z,a as _,b as ee}from"./popover-CcEl5z_f.js";import{p as te}from"./parseISO-CuRpBHaz.js";import{v as C}from"./v4-BKrj-4V8.js";import{f as k}from"./format-CNjrC8BB.js";import{u as De}from"./user-1-BJMQmRW9.js";import{u as Fe}from"./user-2-CmbXL6KQ.js";import{u as Ee}from"./user-3-BrFpV_SU.js";import{u as Ae}from"./user-4-Bo4yhbeF.js";import{u as Ie}from"./user-5-BOjRhHJK.js";import{u as Oe}from"./user-6-CT9FDbIU.js";import{a as Te,s as $e,c as ze,b as Le,d as Be}from"./little-angel-toy-BfDJfIkp.js";import{s as qe,c as He,b as Ve,a as Ke}from"./teddybear-Bui1BROM.js";import{B as Ge}from"./BreadcrumbComp-DdXArMCY.js";import"./_commonjsHelpers-CE1G-McA.js";import"./index-BdQq_4o_.js";import"./index-DRcYnjBa.js";import"./index-CfThMl9f.js";import"./index-L0SKbviM.js";import"./index-DhQbCedW.js";import"./index-Jo9Y0u8a.js";import"./index-BHinUB-C.js";import"./index-aJTH1M9Z.js";import"./tslib.es6-CmEaCU22.js";import"./index-DfANd6nE.js";import"./index-Ddz03csu.js";import"./floating-ui.dom-D7G01c1r.js";import"./index-B_H36sPx.js";import"./index-D9jDtrFa.js";import"./utils-4perknFd.js";import"./chevron-down-ChXj5Bit.js";import"./createLucideIcon-DRlH1f4M.js";import"./check-DIOPK-zC.js";import"./index-DjxFjNHx.js";import"./index-C0QJ8CHZ.js";import"./chevron-right-DFxpASjY.js";import"./circle-DoQ76Nbd.js";import"./index-QqyytP6n.js";import"./index-Bj56izVu.js";import"./index-Cft9Cwv8.js";import"./en-US-Dw4dfe3S.js";import"./toDate-BK_JsdFu.js";import"./addMonths-BQ1GswEf.js";import"./CardBox-CY_4CfKs.js";function Je({title:N,status:E,icon:M,iconColor:v,cardColor:p}){return e.jsx(se,{className:`bg-${p} ${p==="blue-100"?"dark:bg-blue-500/20":p==="lightprimary"?"dark:bg-darkprimary":`dark:bg-${p}`} p-3 !shadow-none border-0`,children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h6",{className:"text-base font-semibold",children:N}),e.jsx("p",{className:"text-sm",children:E})]}),e.jsx("div",{children:e.jsx(o,{icon:M,className:`text-${v}`,width:20,height:20})})]})})}const Ue=[{id:C(),title:"$95.3k",status:"Income",icon:"solar:dollar-minimalistic-bold-duotone",iconColor:"info",cardColor:"lightinfo"},{id:C(),title:"485",status:"Pending",icon:"solar:stopwatch-bold-duotone",iconColor:"warning",cardColor:"lightwarning"},{id:C(),title:"1.4k",status:"Completed",icon:"solar:bag-check-bold-duotone",iconColor:"success",cardColor:"lightsuccess"},{id:C(),title:"996",status:"Shipping",icon:"solar:box-bold-duotone",iconColor:"secondary",cardColor:"lightsecondary"},{id:C(),title:"2.1k",status:"Processing",icon:"solar:hourglass-line-bold-duotone",iconColor:"primary",cardColor:"lightprimary"},{id:C(),title:"1.1k",status:"Cancelled",icon:"solar:forbidden-bold-duotone",iconColor:"error",cardColor:"lighterror"}],Ye={Shipped:"lightSuccess",Pending:"lightWarning",Completed:"lightPrimary",Cancelled:"lightError",Processing:"lightInfo"},Qe=ae.memo(Je);function We({data:N}){const{activeMode:E}=i.useContext(pe),[M,v]=i.useState(N.map(t=>({...t,items:t.items??[]}))),[p,re]=i.useState([]),[A,q]=i.useState(""),[ie,le]=i.useState({}),[oe,ne]=i.useState({}),[g,I]=i.useState(null),[d,j]=i.useState({}),[de,H]=i.useState(!1),[f,R]=i.useState(null),[P,V]=i.useState({id:!0,customerName:!0,status:!0,date:!0,amount:!0,address:!0}),[l,ce]=i.useState({id:"",customerName:"",status:"",amount:"",address:"",date:""}),[O,me]=i.useState(!1),ue=t=>{v(a=>a.filter(s=>s.id!==t)),R("Order deleted")},u=ve(),K=i.useMemo(()=>[u.display({id:"select",header:t=>{const{table:a}=t;return e.jsx(F,{checked:a.getIsAllPageRowsSelected(),onCheckedChange:s=>a.toggleAllPageRowsSelected(s===!0),"aria-label":"Select all rows"})},cell:t=>{const{row:a}=t;return e.jsx(F,{checked:a.getIsSelected(),onCheckedChange:s=>a.toggleSelected(s===!0),"aria-label":"Select row"})}}),u.accessor("id",{header:"Order ID",cell:t=>{const{row:a}=t;return e.jsx("p",{className:"text-sm font-medium text-link",children:a.original.id})}}),u.accessor("customerName",{header:"Customer",cell:t=>{const{row:a}=t;return g===a.original.id?e.jsx(h,{value:d.customerName??a.original.customerName,onChange:s=>j(n=>({...n,customerName:s.target.value,avatar:n.avatar??a.original.avatar})),autoFocus:!0,"aria-label":"Edit customer name"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(ye,{children:[e.jsx(Se,{src:a.original.avatar,alt:a.original.customerName}),e.jsx(ke,{children:a.original.customerName})]}),e.jsx("p",{className:"text-sm font-medium text-link",children:a.original.customerName})]})}}),u.accessor("status",{header:"Status",cell:t=>{const{row:a}=t;return g===a.original.id?e.jsxs($,{value:d.status??a.original.status,onValueChange:s=>j(n=>({...n,status:s})),children:[e.jsx(z,{className:"select-md-transparent !pe-0","aria-label":"Edit status",children:e.jsx(L,{placeholder:"Select status"})}),e.jsx(B,{children:["Pending","Shipped","Completed","Cancelled","Processing"].map(s=>e.jsx(x,{value:s,children:s},s))})]}):e.jsx(Me,{className:"text-xs font-medium",variant:Ye[a.original.status],children:a.original.status})}}),u.accessor("date",{header:"Date",cell:t=>{const{row:a}=t;return g===a.original.id?e.jsx("div",{className:"flex flex-col gap-1",children:e.jsxs(Z,{children:[e.jsx(_,{asChild:!0,children:e.jsx(m,{variant:"outline",className:"justify-start text-left w-full border border-ld text-ld hover:bg-transparent hover:text-ld hover:border-primary",children:d.date?k(new Date(d.date),"PPP"):k(new Date(a.original.date),"PPP")})}),e.jsx(ee,{className:"w-auto p-0",align:"start",children:e.jsx(X,{mode:"single",selected:d.date?new Date(d.date):new Date(a.original.date),onSelect:s=>{j(n=>({...n,date:s?k(s,"yyyy-MM-dd"):void 0}))},initialFocus:!0})})]})}):e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-normal text-link",children:a.original.date}),e.jsx("p",{className:"text-xs ",children:a.original.time})]})}}),u.accessor("amount",{header:"Amount",cell:t=>{const{row:a}=t;return g===a.original.id?e.jsx(h,{type:"number",step:"0.01",value:d.amount!==void 0?d.amount:a.original.amount,onChange:s=>j(n=>({...n,amount:s.target.value?parseFloat(s.target.value):a.original.amount})),autoFocus:!0,"aria-label":"Edit amount"}):e.jsxs("p",{className:"text-sm font-medium text-link",children:["$",a.original.amount.toFixed(2)]})}}),u.accessor("address",{header:"Address",cell:t=>{const{row:a}=t;return g===a.original.id?e.jsx(h,{className:"w-full",value:d.address??a.original.address,onChange:s=>j(n=>({...n,address:s.target.value})),autoFocus:!0,"aria-label":"Edit address"}):e.jsx("p",{className:"text-sm font-medium text-link",children:a.original.address})}}),u.display({id:"actions",header:"Actions",cell:t=>{const{row:a}=t,s=g===a.original.id;return e.jsxs("div",{className:"flex items-center gap-1",children:[a.getCanExpand()&&e.jsx(m,{variant:"ghostprimary",shape:"pill",size:"icon",onClick:a.getToggleExpandedHandler(),"aria-label":a.getIsExpanded()?"Collapse row":"Expand row",children:a.getIsExpanded()?e.jsx(o,{icon:"solar:alt-arrow-up-linear",width:20,height:20}):e.jsx(o,{icon:"solar:alt-arrow-down-linear",width:20,height:20})}),s?e.jsxs(e.Fragment,{children:[e.jsx(m,{variant:"ghostsuccess",shape:"pill",size:"icon",onClick:()=>{v(n=>n.map(c=>c.id===a.original.id?{...c,...d}:c)),I(null),R("Order updated")},"aria-label":"Save changes",children:e.jsx(o,{icon:"solar:check-read-linear",width:20,height:20})}),e.jsx(m,{variant:"ghosterror",shape:"pill",size:"icon",onClick:()=>I(null),"aria-label":"Cancel edit",children:e.jsx(o,{icon:"solar:close-circle-linear",width:20,height:20})})]}):e.jsx(e.Fragment,{children:e.jsxs(Y,{children:[e.jsx(Q,{asChild:!0,children:e.jsx(m,{variant:"ghostprimary",shape:"pill",size:"icon","aria-label":"menu",children:e.jsx(o,{icon:"solar:menu-dots-bold",width:18,height:18,"aria-hidden":"true"})})}),e.jsxs(W,{align:"end",sideOffset:4,className:"min-w-[150px]",children:[e.jsxs(D,{onSelect:()=>{I(a.original.id),j(a.original)},className:"flex items-center",children:[e.jsx(o,{icon:"solar:pen-2-linear",width:20,height:20,className:"me-2"}),"Edit"]}),e.jsxs(D,{onSelect:()=>ue(a.original.id),className:"flex items-center text-red-600",children:[e.jsx(o,{icon:"solar:trash-bin-2-outline",width:20,height:20,color:"red",className:"me-2"}),"Delete"]})]})]})})]})}})],[g,d]),b=i.useMemo(()=>K.filter(t=>t.id==="select"?!0:"accessorKey"in t&&typeof t.accessorKey=="string"?P[t.accessorKey]:(t.id==="actions",!0)),[K,P]),T=i.useMemo(()=>M.filter(t=>{const a=t.id.toLowerCase().includes(l.id.toLowerCase()),s=t.customerName.toLowerCase().includes(l.customerName.toLowerCase()),n=t.status.toLowerCase().includes(l.status.toLowerCase()),c=l.amount===""||t.amount.toString().includes(l.amount),y=t.address.toLowerCase().includes(l.address.toLowerCase()),S=l.date===""||t.date===l.date;return a&&s&&n&&c&&y&&S}),[M,l]),r=je({data:T,columns:b,state:{sorting:p,globalFilter:A,expanded:ie,rowSelection:oe},onSortingChange:re,onGlobalFilterChange:q,onExpandedChange:le,onRowSelectionChange:ne,getCoreRowModel:Ne(),getSortedRowModel:Ce(),getFilteredRowModel:we(),getExpandedRowModel:be(),getPaginationRowModel:fe(),getRowCanExpand:()=>!0}),G=i.useMemo(()=>b.filter(t=>t.accessorKey&&t.id!=="select"&&t.id!=="actions").map(t=>t.accessorKey),[b]),J=i.useMemo(()=>b.filter(t=>t.accessorKey&&t.id!=="select"&&t.id!=="actions").map(t=>typeof t.header=="string"?t.header:t.accessorKey),[b]),he=i.useCallback(()=>{const t=T.map(y=>G.map(S=>y[S]??"")),a=[J.join(","),...t.map(y=>y.map(S=>`"${String(S).replace(/"/g,'""')}"`).join(","))].join(`
2`),s=new Blob([a],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(s),c=document.createElement("a");c.href=n,c.setAttribute("download","orders.csv"),document.body.appendChild(c),c.click(),document.body.removeChild(c)},[T,G,J]),ge=i.useCallback(()=>{const t=r.getSelectedRowModel().rows.map(a=>a.original.id);v(a=>a.filter(s=>
2!t.includes(s.id))),r.resetRowSelection(),R(`Deleted ${t.length} order(s)`)},[r]),w=i.useCallback((t,a)=>{ce(s=>({...s,[t]:a}))},[]);i.useEffect(()=>{if(!f)return;const t=setTimeout(()=>{R(null)},3e3);return()=>clearTimeout(t)},[f]);const xe=E==="dark"?"dark":"light";return i.useEffect(()=>{f&&Re(f,{position:"top-center",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,theme:xe})},[f]),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-dark dark:text-white mb-4",children:"Orders History"}),e.jsx("div",{className:"grid lg:grid-cols-6 sm:grid-cols-3 grid-cols-2 gap-3",children:Ue.map(t=>e.jsx("div",{children:e.jsx(Qe,{title:t.title,status:t.status,icon:t.icon,iconColor:t.iconColor,cardColor:t.cardColor})},t.id))}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between my-5",children:[e.jsx("h3",{className:"text-lg font-semibold text-dark dark:text-white mb-4 md:mb-0",children:"Orders Table"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[de?e.jsx(h,{placeholder:"Search...",className:"w-40 md:w-56",value:A??"",onChange:t=>q(t.target.value),onBlur:()=>{A||H(!1)},"aria-label":"Search orders"}):e.jsx(m,{variant:"ghostprimary",shape:"pill",size:"icon",onClick:()=>H(!0),"aria-label":"Show search",children:e.jsx(o,{icon:"solar:minimalistic-magnifer-line-duotone",width:18,height:18})}),e.jsx(m,{variant:O?"ghosterror":"ghostprimary",shape:"pill",size:"icon",onClick:()=>me(t=>!t),"aria-label":"Toggle filters",children:O?e.jsx(o,{icon:"solar:close-circle-outline",width:18,height:18}):e.jsx(o,{icon:"solar:filter-line-duotone",width:18,height:18})}),e.jsxs(Y,{children:[e.jsx(Q,{asChild:!0,children:e.jsx(m,{variant:"ghostprimary",shape:"pill",size:"icon","aria-label":"Settings",type:"button",children:e.jsx(o,{icon:"solar:settings-line-duotone",width:18,height:18,"aria-hidden":"true"})})}),e.jsxs(W,{align:"end",sideOffset:4,className:"min-w-[150px]",children:[Object.keys(P).map(t=>e.jsxs(D,{className:"flex items-center cursor-pointer select-none",onSelect:a=>{a.preventDefault(),V(s=>({...s,[t]:!s[t]}))},children:[e.jsx(F,{checked:P[t],onCheckedChange:()=>{V(a=>({...a,[t]:!a[t]}))},className:"mr-2",onClick:a=>a.stopPropagation()}),e.jsx("span",{className:"capitalize",children:t})]},t)),e.jsxs(D,{disabled:!0,className:"flex items-center select-none",children:[e.jsx(F,{checked:!0,disabled:!0,className:"mr-2"}),e.jsx("span",{className:"capitalize text-gray-400",children:"actions"})]})]})]}),e.jsx(m,{variant:"ghostprimary",shape:"pill",size:"icon",onClick:he,"aria-label":"Download CSV",children:e.jsx(o,{icon:"solar:download-minimalistic-line-duotone",width:18,height:18})}),r.getSelectedRowModel().rows.length>0&&e.jsx(m,{variant:"ghosterror",shape:"pill",size:"icon",onClick:ge,children:e.jsx(o,{icon:"solar:trash-bin-2-outline",width:18,height:18})})]})]}),e.jsx(i.Activity,{mode:O?"visible":"hidden",children:e.jsxs("div",{className:"mb-4 p-4 grid md:grid-cols-4 sm:grid-cols-2 grid-cols-1 gap-3",children:[e.jsx("div",{className:"flex-1",children:e.jsx(h,{placeholder:"Order ID",value:l.id,onChange:t=>w("id",t.target.value),className:"w-full"})}),e.jsx("div",{className:"flex-1",children:e.jsx(h,{placeholder:"Customer Name",value:l.customerName,onChange:t=>w("customerName",t.target.value),className:"w-full"})}),e.jsx("div",{className:"flex-1",children:e.jsxs($,{value:l.status??void 0,onValueChange:t=>w("status",t),children:[e.jsx(z,{className:"w-full","aria-label":"Filter by status",children:e.jsx(L,{placeholder:"All Status"})}),e.jsxs(B,{children:[e.jsx(x,{value:"Pending",children:"Pending"}),e.jsx(x,{value:"Shipped",children:"Shipped"}),e.jsx(x,{value:"Completed",children:"Completed"}),e.jsx(x,{value:"Cancelled",children:"Cancelled"}),e.jsx(x,{value:"Processing",children:"Processing"})]})]})}),e.jsx("div",{className:"flex-1",children:e.jsx(h,{placeholder:"Amount",value:l.amount,onChange:t=>w("amount",t.target.value),type:"number",className:"w-full"})}),e.jsx("div",{className:"flex-1",children:e.jsx(h,{placeholder:"Address",value:l.address,onChange:t=>w("address",t.target.value),className:"w-full"})}),e.jsx("div",{className:"flex-1",children:e.jsxs(Z,{children:[e.jsx(_,{asChild:!0,children:e.jsx(m,{variant:"outline",className:`justify-start text-left w-full border border-ld text-ld hover:bg-transparent hover:border-primary ${l.date?"text-ld hover:text-ld":"text-muted-foreground hover:text-muted-foreground"}`,children:l.date?k(te(l.date),"PPP"):"Pick a date"})}),e.jsx(ee,{className:"w-auto p-0",align:"start",children:e.jsx(X,{mode:"single",selected:l.date?te(l.date):void 0,onSelect:t=>{w("date",t?k(t,"yyyy-MM-dd"):"")},initialFocus:!0})})]})})]})}),f&&e.jsx(Pe,{}),e.jsx("div",{className:"overflow-x-auto",children:e.jsx("div",{className:"border rounded-md border-ld overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full",children:[e.jsx("thead",{children:r.getHeaderGroups().map(t=>e.jsx("tr",{children:t.headers.map(a=>e.jsx("th",{className:"px-4 py-2 border-b border-ld text-left  text-foreground",children:a.isPlaceholder?null:e.jsx("div",{className:a.column.getCanSort()?"cursor-pointer select-none":"",onClick:a.column.getToggleSortingHandler(),children:e.jsxs("div",{className:"flex items-center gap-1",children:[U(a.column.columnDef.header,a.getContext()),a.column.getCanSort()&&e.jsx(o,{icon:"solar:transfer-vertical-line-duotone"})]})})},a.id))},t.id))}),e.jsx("tbody",{children:r.getRowModel().rows.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:b.length,className:"text-center py-4",children:"No orders found."})}):r.getRowModel().rows.map(t=>e.jsxs(ae.Fragment,{children:[e.jsx("tr",{className:"border-b last:border-b-0 border-ld",children:t.getVisibleCells().map(a=>e.jsx("td",{className:`px-4 py-2${a.column.id==="customerName"?" min-w-[160px]":""}`,children:U(a.column.columnDef.cell,a.getContext())},a.id))}),t.getIsExpanded()&&e.jsx("tr",{children:e.jsxs("td",{colSpan:t.getVisibleCells().length,className:"bg-gray-100 dark:bg-white/5 px-4 py-4",children:[e.jsx("h6",{className:"font-semibold mb-2",children:"Customer Order Details"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full text-sm",children:[e.jsx("thead",{className:"bg-gray-200 dark:bg-white/20",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-2",children:"Name"}),e.jsx("th",{className:"text-left px-4 py-2",children:"SKU"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Quantity"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Price"})]})}),e.jsx("tbody",{children:t.original.items?.length?e.jsxs(e.Fragment,{children:[t.original.items.map((a,s)=>e.jsxs("tr",{className:"border-b border-ld",children:[e.jsxs("td",{className:"px-4 py-2 flex items-center gap-2",children:[e.jsx("img",{src:a.image,alt:"img",width:24,height:24,className:"rounded-2xl"}),a.name]}),e.jsx("td",{className:"px-4 py-2",children:a.sku}),e.jsx("td",{className:"px-4 py-2",children:a.quantity}),e.jsxs("td",{className:"px-4 py-2",children:["$",a.price.toFixed(2)]})]},s)),e.jsxs("tr",{children:[e.jsx("td",{colSpan:3,className:"px-4 py-1 text-right font-semibold",children:"Delivery Fee:"}),e.jsx("td",{className:"px-4 py-1 font-semibold",children:"$ 10"})]}),e.jsxs("tr",{children:[e.jsx("td",{colSpan:3,className:"px-4 py-1 text-right font-semibold",children:"Tax:"}),e.jsx("td",{className:"px-4 py-1 font-semibold",children:"$ 5"})]}),e.jsxs("tr",{children:[e.jsx("td",{colSpan:3,className:"px-4 py-1 text-right font-semibold",children:"Total"}),e.jsxs("td",{className:"px-4 py-1 font-semibold",children:["$",(t.original.items.reduce((a,s)=>a+s.price*s.quantity,0)+10+5).toFixed(2)]})]})]}):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-2 text-center text-gray-500",children:"No items found."})})})]})})]})})]},t.id))})]})})})}),r.getPageCount()>0?e.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center mt-4 gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-sm text-muted dark:text-lightgray",children:"Show"}),e.jsxs($,{value:String(r.getState().pagination.pageSize),onValueChange:t=>r.setPageSize(Number(t)),children:[e.jsx(z,{className:"w-fit","aria-label":"Select number of rows per page",children:e.jsx(L,{placeholder:"Rows per page"})}),e.jsx(B,{children:[3,10,20,30,40,50].map(t=>e.jsx(x,{value:String(t),children:t},t))})]}),e.jsx("p",{className:"text-sm text-muted dark:text-lightgray",children:"per page"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{children:e.jsx("p",{className:"text-sm font-normal text-muted dark:text-lightgray",children:r.getRowModel().rows.length>0?`${r.getState().pagination.pageIndex*r.getState().pagination.pageSize+1}-${Math.min((r.getState().pagination.pageIndex+1)*r.getState().pagination.pageSize,r.getFilteredRowModel().rows.length)} of ${r.getFilteredRowModel().rows.length}`:"0 of 0"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{icon:"solar:arrow-left-line-duotone",className:`text-dark dark:text-white hover:text-primary curs
2or-pointer ${r.getState().pagination.pageIndex===0?"opacity-50 !cursor-not-allowed":""}`,width:20,height:20,onClick:()=>r.previousPage()}),e.jsx("span",{className:"w-8 h-8 bg-lightprimary text-primary flex items-center justify-center rounded-md dark:bg-darkprimary dark:text-white text-sm font-normal",children:r.getState().pagination.pageIndex+1}),e.jsx(o,{icon:"solar:arrow-right-line-duotone",className:`text-dark dark:text-white hover:text-primary cursor-pointer ${r.getState().pagination.pageIndex+1===r.getPageCount()?"opacity-50 !cursor-not-allowed":""}`,width:20,height:20,onClick:()=>r.getState().pagination.pageIndex+1<r.getPageCount()&&r.nextPage()})]})]})]}):null]})}function Xe(){const N=[{id:"ORD-001",avatar:Ie,customerName:"John Doe",status:"Pending",badgecolor:"lightwarning",date:"06-10-2025",time:"10:31AM",amount:80.5,address:"123 Main St, New York, NY",items:[{image:Te,name:"Headphone",sku:"TS-001",quantity:2,price:20},{image:$e,name:"Books",sku:"MG-009",quantity:1,price:10.5}]},{id:"ORD-002",avatar:De,customerName:"Jane Smith",status:"Completed",badgecolor:"lightsuccess",date:"06-09-2025",time:"11:31AM",amount:814,address:"456 Elm St, Los Angeles, CA",items:[{image:qe,name:"Macbook pro",sku:"ES-021",quantity:1,price:799}]},{id:"ORD-003",avatar:Ae,customerName:"Bob Johnson",status:"Shipped",badgecolor:"lightprimary",date:"06-08-2025",time:"12:01AM",amount:407.3,address:"789 Pine St, Chicago, IL",items:[{image:He,name:"Teddy",sku:"TS-024",quantity:2,price:99.4},{image:ze,name:"Tiny Dino",sku:"TS-024",quantity:2,price:89.25}]},{id:"ORD-004",avatar:Fe,customerName:"Georgeanna Ramero",status:"Cancelled",badgecolor:"lighterror",date:"06-08-2025",time:"01:06AM",amount:1127.1,address:"19214 110th Rd, Saint Albans, NY, 1141",items:[{image:Le,name:" hills",sku:"FS-027",quantity:1,price:497.8},{image:Ve,name:"Red Dress",sku:"FS-029",quantity:1,price:599.3}]},{id:"ORD-005",avatar:Ee,customerName:"Dalton Paden",status:"Processing",badgecolor:"lightinfo",date:"06-06-2025",time:"02:34AM",amount:311,address:"19103 Stefani Ave, Cerritos, CA, 90703",items:[{image:Ke,name:"X-box console",sku:"ES-018",quantity:1,price:296}]},{id:"ORD-006",avatar:Oe,customerName:"Cami Macha",status:"Pending",badgecolor:"lightwarning",date:"09-06-2025",time:"02:34AM",amount:213,address:"930 Fruit Ave, Farrell, PA, 16121",items:[{image:Be,name:"Soft Toys",sku:"TS-016",quantity:2,price:99}]}];return e.jsx(se,{children:e.jsx(We,{data:N})})}const Ze=[{to:"/",title:"Home"},{to:"",title:"React Tables"}];function ta(){return e.jsxs(e.Fragment,{children:[e.jsx(Ge,{title:"Order Table",items:Ze}),e.jsx(Xe,{})]})}export{ta as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.