PageSourceSearch

https://tailwindadmin-tanstack-pro-dark.netlify.app/assets/shop-CbqlAVeg.js

js tailwindadmin-tanstack-pro-dark.netlify.app collected 2026-10-03 11:30:35 UTC 8,938 bytes, 1 lines download raw bytes

1import{r as i,j as e,L as T}from"./main-BkpAS6Tt.js";import{B as F}from"./BreadcrumbComp-DdXArMCY.js";import{E as h,a as B}from"./index-DNLMR-id.js";import{I as o}from"./iconify-BLAYqHQO.js";import{M as R}from"./index-CNFSvI9I.js";import{L as p}from"./label-Be_2bmKI.js";import{B as n}from"./button-CVuE7h15.js";import{R as g,a as u}from"./radio-group-CF-3wRIM.js";import{P as $}from"./animatedinput-placeholder-TBMz1eaM.js";import{C as b}from"./card-DoRMGzGn.js";import{A as L,b as z}from"./alert-B5Kzai-m.js";import{T as E,a as I,b as G,c as M}from"./tooltip-Ca_sQpWi.js";import{R as D}from"./RatingStars-Dhz9HQgP.js";import{S as H,a as O}from"./sheet-DX2hmykV.js";import"./_commonjsHelpers-CE1G-McA.js";import"./CardBox-CY_4CfKs.js";import"./index-Q9o1Xzwm.js";import"./index-Bj56izVu.js";import"./iconBase-DXJqPHOa.js";import"./index-QqyytP6n.js";import"./index-L0SKbviM.js";import"./index-Cft9Cwv8.js";import"./utils-4perknFd.js";import"./index-DRcYnjBa.js";import"./index-CfThMl9f.js";import"./index-C0QJ8CHZ.js";import"./index-DhQbCedW.js";import"./index-DfANd6nE.js";import"./index-BHinUB-C.js";import"./index-B_H36sPx.js";import"./index-D9jDtrFa.js";import"./index-DjxFjNHx.js";import"./circle-DoQ76Nbd.js";import"./createLucideIcon-DRlH1f4M.js";import"./input-D3PXSnUk.js";import"./proxy-D5o9uXNM.js";import"./index-Jo9Y0u8a.js";import"./index-Ddz03csu.js";import"./floating-ui.dom-D7G01c1r.js";import"./index-D43gpzwv.js";import"./index-aJTH1M9Z.js";import"./tslib.es6-CmEaCU22.js";const f=()=>{const{selectedCategory:a,selectCategory:t,sortBy:l,updateSortBy:d,selectedGender:m,selectGender:c,priceRange:x,updatePriceRange:r,selectedColor:j,selectColor:y,products:N,filterReset:v}=i.useContext(h),k=[{id:1,filterbyTitle:"Filter by Category"},{id:2,name:"All",sort:"All",icon:"tabler:circles"},{id:3,name:"Fashion",sort:"fashion",icon:"tabler:hanger"},{id:9,name:"Books",sort:"books",icon:"tabler:notebook"},{id:10,name:"Toys",sort:"toys",icon:"tabler:mood-smile"},{id:11,name:"Electronics",sort:"electronics",icon:"tabler:device-laptop"},{id:6,devider:!0}],C=[{id:1,value:"newest",label:"Newest",icon:"tabler:ad-2"},{id:2,value:"priceDesc",label:"Price: High-Low",icon:"tabler:sort-ascending-2"},{id:3,value:"priceAsc",label:"Price: Low-High",icon:"tabler:sort-descending-2"},{id:4,value:"discount",label:"Discounted",icon:"tabler:ad-2"}],w=["All","Men","Women","Kids"],A=["All","0‑50","50‑100","100‑200","200‑99999"],S=["All",...Array.from(new Set(N.flatMap(s=>s.colors)))];return e.jsxs("div",{className:"w-full h-full border-e border-ld",children:[e.jsx("ul",{className:"mt-0 pt-4 flex flex-col gap-1",children:k.map(s=>s.filterbyTitle?e.jsx("h6",{className:"capitalize text-sm py-4 px-6",children:s.filterbyTitle},s.id):s.devider?e.jsx("div",{children:e.jsx("hr",{className:"h-px border-0 bg-gray-200 dark:bg-gray-700 my-6"})},s.id):e.jsxs("li",{className:`flex items-center gap-2 py-3 px-4 rounded-md hover:text-primary cursor-pointer mx-6 ${a===s.sort?"text-primary bg-lightprimary dark:bg-lightprimary":"text-bodytext dark:text-darklink bg-hover"}`,onClick:()=>t(s.sort),children:[e.jsx(o,{icon:s.icon,height:18}),s.name]},s.id))}),e.jsxs("ul",{className:"mt-0 px-6 flex flex-col gap-1",children:[e.jsx("h6",{className:"capitalize text-sm pb-4",children:"Sort By"}),C.map(s=>e.jsxs("li",{className:`flex items-center gap-2 py-3 px-4 rounded-md  hover:text-primary  cursor-pointer ${l===s.value?"text-primary bg-lightprimary dark:bg-lightprimary":"text-bodytext dark:text-darklink bg-hover"}`,onClick:()=>d(s.value),children:[e.jsx(o,{icon:s.icon,height:18}),s.label]},s.id))]}),e.jsx("hr",{className:"h-px border-0 bg-gray-200 dark:bg-gray-700 my-6"}),e.jsxs("div",{className:"mt-0 px-6",children:[e.jsx("h6",{className:"capitalize text-sm pb-4",children:"By Gender"}),e.jsx(g,{value:m,onValueChange:s=>c(s),className:"flex flex-col gap-2",children:w.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(u,{value:s,id:`gender-${s}`}),e.jsx(p,{htmlFor:`gender-${s}`,className:"font-normal text-bodytext dark:text-darklink text-sm",children:s})]},s))})]}),e.jsx("hr",{className:"h-px border-0 bg-gray-200 dark:bg-gray-700 my-6"}),e.jsxs("div",{className:"mt-0 px-6",children:[e.jsx("h6",{className:"capitalize text-sm pb-4",children:"By Pricing"}),e.jsx(g,{value:x,onValueChange:s=>r(s),className:"flex flex-col gap-2",children:A.map(s=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(u,{value:s,id:`price-${s}`}),e.jsx(p,{htmlFor:`price-${s}`,className:"font-normal text-bodytext dark:text-darklink text-sm",children:s})]},s))})]}),e.jsx("hr",{className:"h-px border-0 bg-gray-200 dark:bg-gray-700 my-6"}),e.jsxs("div",{className:"mt-0 px-6",children:[e.jsx("h6",{className:"capitalize text-sm pb-4",children:"By Colors"}),e.jsx("div",{className:"flex flex-row flex-wrap gap-2 mb-7",children:S.map((s,P)=>e.jsx(p,{className:"h-6 w-6 rounded-full cursor-pointer flex items-center justify-center",style:{backgroundColor:s!=="All"?s:"#fff",border:s==="All"?"1px solid #ccc":"none"},onClick:()=>y(j===s?"All":s),children:j===s&&e.jsx(R,{size:16,className:"text-gray-500"})},P))}),e.jsx(n,{className:"w-full rounded-md",onClick:v,children:"Reset Filter"})]})]})},V=({onClickFilter:a})=>{const{searchProduct:t,searchProducts:l}=i.useContext(h);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx("h5",{className:"card-title lg:flex hidden",children:"Products"}),e.jsx(n,{variant:"lightprimary",className:"btn-circle p-0 lg:!hidden flex",onClick:a,children:e.jsx(o,{icon:"tabler:menu-2",height:18})})]}),e.jsxs("div",{className:"relative",children:[e.jsx($,{value:t,onChange:l,placeholders:["Search products...","Find top products...","Look up products..."]}),e.jsx("div",{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400",children:e.jsx(o,{icon:"solar:magnifer-line-duotone",height:18})})]})]})})},K="/images/backgrounds/empty-shopping-cart.svg",W=({openShopFilter:a})=>{const{filteredAndSortedProducts:t,addToCart:l,filterReset:d}=i.useContext(h),[m,c]=i.useState(!1),x=()=>{c(!0),setTimeout(()=>{c(!1)},3e3)};return e.jsxs(e.Fragment,{children:[e.jsx(V,{onClickFilter:()=>a(!0)}),e.jsx("div",{className:"grid grid-cols-12 gap-6 mt-6",children:t.length>0?t.map(r=>e.jsx("div",{className:"lg:col-span-4 md:col-span-6 col-span-12",children:e.jsx(b,{className:"p-0 overflow-hidden group card-hover",children:e.jsxs("div",{className:"relative",children:[e.jsx(T,{to:`/apps/ecommerce/detail/${r.id}`,children:e.jsx("div",{className:"overflow-hidden h-[265px] w-full",children:e.jsx("img",{src:r.photo,alt:"tailwindadmin",height:265,width:500,className:"w-full h-full object-cover"})})}),e.jsxs("div",{className:"p-6 pt-4",children:[e.jsx("div",{className:"flex justify-between items-center -mt-8 relative z-10",children:e.jsx("div",{className:"ms-auto",children:e.jsx(E,{children:e.jsxs(I,{children:[e.jsx(G,{asChild:!0,children:e.jsx(n,{className:"btn-circle ms-auto p-0 rounded-full",onClick:()=>{l(r.id),x()},children:e.jsx(o,{icon:"tabler:basket",height:18})})}),e.jsx(M,{children:"Add To Cart"})]})})})}),e.jsx("h6",{className:"text-base line-clamp-1 group-hover:text-primary",children:r.title}),e.jsxs("div",{className:"flex justify-between items-center mt-1",children:[e.jsxs("h5",{className:"text-base flex gap-2 items-center",children:["$",r.price," ",e.jsxs("span",{className:"font-normal text-sm text-darklink line-through",children:["$",r.salesPrice]})]}),e.jsx(D,{rating:r.rating})]})]})]})})},r.id)):e.jsx(e.Fragment,{children:e.jsx("div",{className:"col-span-12",children:e.jsx("div",{className:"flex justify-center text-center",children:e.jsxs("div",{children:[e.jsx("img",{src:K,alt:"no product",height:400}),e.jsx("h2",{className:"text-2xl",children:"There is no Product"}),e.jsx("p",{className:"text-darklink my-3",children:"The product you are searching for is no longer available."}),e.jsx(n,{className:"w-fit px-4 mx-auto rounded-md",onClick:d,children:"Try Again"})]})})})})}),m&&e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(L,{variant:"primary",className:"max-w-sm w-full text-center fixed top-3 rounded",children:e.jsx(z,{children:"Item Added to the Cart!!!"})})})]})},q=()=>{const[a,t]=i.useState(!1);return e.jsx(e.Fragment,{children:e.jsx(B,{children:e.jsx(b,{className:"p-0",children:e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"lg:relative lg:block hidden max-w-[250px] w-full",children:e.jsx(f,{})}),e.jsx(H,{open:a,onOpenChange:t,children:e.jsx(O,{side:"left",className:"w-[250px] p-0 lg:hidden",children:e.jsx(f,{})})}),e.jsx("div",{className:"p-6 w-full",children:e.jsx(W,{openShopFilter:t})})]})})})})},J=[{to:"/",title:"Home"},{title:"Shop"}];function Ee(){return e.jsxs(e.Fragment,{children:[e.jsx(F,{title:"Shop App",
1items:J}),e.jsx(q,{})]})}export{Ee 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.