Skip to content

Commit 81ff083

Browse files
authored
Merge pull request #65 from Asfak00/ZenUI-2.2
Zen UI 2.2
2 parents 9902ed2 + 586d095 commit 81ff083

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+8230
-233
lines changed

src/App.jsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ const ImageGalleryPage = React.lazy(() => import("./Pages/Components/Surfaces/Im
5454
const AccordingPage = React.lazy(() => import("./Pages/Components/Surfaces/AccordingPage"));
5555
const AppbarPage = React.lazy(() => import("./Pages/Components/Surfaces/AppbarPage"));
5656

57+
// e-commerce
58+
import ProductCardPage from "./Pages/Components/ECommerce/ProductCardPage.jsx";
59+
import AdsCardPage from "./Pages/Components/ECommerce/AdsCardPage.jsx";
60+
5761
// randoms
5862
const CodeSnippetPage = React.lazy(() => import("./Pages/Components/Randoms/CodeSnippetPage"));
5963
const SnippetPage = React.lazy(() => import("./Pages/Components/Randoms/SnippetPage"));
@@ -94,6 +98,12 @@ const MultipageFormPage = React.lazy(() => import("./Pages/Blocks/Forms/Multipag
9498
const ResponsiveSidebarPage = React.lazy(() => import("./Pages/Blocks/Randoms/ResponsiveSidebarPage.jsx"));
9599
const InputSliderPage = React.lazy(() => import("./Pages/Components/Inputs/InputSliderPage.jsx"));
96100

101+
// e-commerce blocks
102+
import OfferGridPage from "./Pages/Blocks/E-Commerce/OfferGridPage.jsx";
103+
import ProductDetailsPage from "./Pages/Blocks/E-Commerce/ProductDetailsPages/Index.jsx";
104+
import ProductFilterPage from "./Pages/Blocks/E-Commerce/ProductFilterPage.jsx";
105+
import CheckoutPage from "./Pages/Blocks/E-Commerce/CheckoutPage.jsx";
106+
97107
// layout playground page
98108
const LayoutPlaygroundPage = React.lazy(() => import("./Pages/LayoutPlaygroundPage.jsx"));
99109
const TreeDropdownPage = React.lazy(() => import("./Pages/Components/Feedback/TreeDropdownPage.jsx"));
@@ -216,6 +226,10 @@ const App = () => {
216226
<Route path="/components/tooltip" element={<TooltipPage/>}/>
217227
<Route path="/components/timeline" element={<TimelinePage/>}/>
218228

229+
{/* e-commerce */}
230+
<Route path="/components/product-card" element={<ProductCardPage/>}/>
231+
<Route path="/components/ads-card" element={<AdsCardPage/>}/>
232+
219233
{/* randoms */}
220234
<Route path="/components/code" element={<CodeSnippetPage/>}/>
221235
<Route path="/components/snippet" element={<SnippetPage/>}/>
@@ -235,6 +249,12 @@ const App = () => {
235249
<Route path="/blocks/responsive-sidebar" element={<ResponsiveSidebarPage/>}/>
236250
<Route path="/blocks/empty-page" element={<WrongRoutePage/>}/>
237251

252+
{/* e-commerce blocks */}
253+
<Route path="/blocks/offer-grid" element={<OfferGridPage/>}/>
254+
<Route path="/blocks/product-details-page" element={<ProductDetailsPage/>}/>
255+
<Route path="/blocks/product-filter-page" element={<ProductFilterPage/>}/>
256+
<Route path="/blocks/checkout-page" element={<CheckoutPage/>}/>
257+
238258

239259
{/* icons */}
240260
<Route path="/icons" element={<IconsPage/>}/>

src/Components/Home/AboutUs.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ const Hero = () => {
4848
offering a comprehensive collection of pre-built UI components, website templates, and more.
4949
</p>
5050

51-
<p className='mt-3 text-[1rem] text-gray-500'>
51+
<p className='mt-4 text-[1rem] text-gray-500'>
5252
Our mission is to empower developers to build beautiful, functional web applications without
5353
the hassle of designing from scratch. At ZenUI, we believe that great design and seamless
5454
functionality should be accessible to everyone. That's why we've meticulously crafted a
5555
library of UI components that are not only visually appealing but also highly customizable
5656
and easy to integrate.
5757
</p>
5858

59-
<p className='mt-3 text-[1rem] text-gray-500'>
59+
<p className='mt-4 text-[1rem] text-gray-500'>
6060
Each component is designed with a focus on user experience, ensuring that your applications
6161
look great and perform flawlessly across all devices. Beyond our extensive library of UI
6262
components and pre-built website templates, we also provide a rich collection of free icons

src/Components/Home/Hero.jsx

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {useEffect} from "react";
1+
import React, {useEffect, useState} from "react";
22

33
// react icons
44
import {CgTemplate} from "react-icons/cg";
@@ -22,7 +22,6 @@ import CountUp from "react-countup";
2222
import {FaArrowRightLong} from "react-icons/fa6";
2323

2424
// components
25-
import AnimatedCard from "../HomePageComponents/AnimatedCard.jsx";
2625
import SwitchCard from "../HomePageComponents/Switch.jsx";
2726
import TabCard from "../HomePageComponents/Tab.jsx";
2827
import SelectCard from "../HomePageComponents/Select.jsx";
@@ -34,6 +33,7 @@ import BadgeCard from "../HomePageComponents/Badge.jsx";
3433
import AnimatedButtonCard from "../HomePageComponents/AnimatedButton.jsx";
3534
import ChipCard from "../HomePageComponents/Chip.jsx";
3635
import StrongPasswordCard from "../HomePageComponents/StrongPasswordCard.jsx";
36+
import AnimatedProductCard from "../HomePageComponents/AnimatedProductCard.jsx";
3737

3838
const Hero = () => {
3939

@@ -50,6 +50,38 @@ const Hero = () => {
5050

5151
const navigate = useNavigate();
5252

53+
const [isAnimating, setIsAnimating] = useState(true);
54+
55+
useEffect(() => {
56+
const animationCycle = () => {
57+
setIsAnimating(true);
58+
59+
const stopTimeout = setTimeout(() => {
60+
setIsAnimating(false);
61+
}, 1200);
62+
63+
const restartTimeout = setTimeout(() => {
64+
setIsAnimating(true);
65+
}, 2000);
66+
67+
return () => {
68+
clearTimeout(stopTimeout);
69+
clearTimeout(restartTimeout);
70+
};
71+
};
72+
73+
const cleanupAnimation = animationCycle();
74+
75+
const interval = setInterval(animationCycle, 4000);
76+
77+
return () => {
78+
clearInterval(interval);
79+
if (typeof cleanupAnimation === 'function') {
80+
cleanupAnimation();
81+
}
82+
};
83+
}, []);
84+
5385
return (
5486
<main className="w-full min-h-screen">
5587

@@ -69,10 +101,17 @@ const Hero = () => {
69101
},
70102
}}>
71103

72-
<a href="https://github.com/Asfak00/zenui-library" target="_blank" className='flex items-center gap-[8px] bg-[#9A04F59E] hover:bg-[#9A04F5D2] transition-all duration-200 w-max py-[5px] px-[12px] text-white rounded-[6px] absolute top-[-10px] z-30 left-0 text-[1rem] cursor-pointer'>
73-
<FaGithub/>
74-
Star us on Github
75-
<FaArrowRightLong/>
104+
<a href="https://github.com/Asfak00/zenui-library" target="_blank" className='flex items-center gap-[10px] bg-[#9A04F59E] hover:bg-[#9A04F5D2] transition-all duration-200 w-max py-[5px] pr-[18px] pl-[12px] text-white rounded-[6px] absolute top-[-10px] z-30 left-0 text-[1rem] cursor-pointer'>
105+
<div className='flex items-center gap-[8px]'>
106+
<FaGithub/>
107+
Star us on Github
108+
</div>
109+
<FaArrowRightLong
110+
className={`
111+
${isAnimating ? 'animate-bounce-custom' : ''}
112+
transition-transform duration-300
113+
`}
114+
/>
76115
</a>
77116

78117
<div
@@ -194,7 +233,7 @@ const Hero = () => {
194233
</div>
195234
<div
196235
className='animation-bounce1 absolute top-[35%] left-[33%] transform translate-y-[-50%] translate-x-[-50%]'>
197-
<AnimatedCard/>
236+
<AnimatedProductCard/>
198237
</div>
199238
<div
200239
className='animation-bounce2 absolute top-[28%] right-[-20px] 1260px:right-12 transform translate-y-[-50%] translate-x-[-50%]'>

src/Components/Home/MobileNavbar.jsx

Lines changed: 97 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@ import {FiGithub} from "react-icons/fi";
99
// react router dom
1010
import {Link, useNavigate} from "react-router-dom";
1111
import Search from "./Search";
12-
import {motion} from "framer-motion";
12+
import {AnimatePresence, motion} from "framer-motion";
1313
import NewBadge from "../../Shared/NewBadge.jsx";
1414

1515
const MobileNavbar = () => {
1616
const [isSearchOpen, setIsSearchOpen] = useState(false);
1717
const [sidebarOpen, setSidebarOpen] = useState(false);
1818
const [developerKitDropdownOpen, setDeveloperKitDropdownOpen] = useState(false);
1919
const [toolsDropdownOpen, setToolsDropdownOpen] = useState(false);
20+
const [eCommerceDropdownOpen, setECommerceDropdownOpen] = useState(false)
21+
22+
const [searchPlaceholderText, setSearchPlaceholderText] = useState("search component");
2023

2124
const navigate = useNavigate();
2225

@@ -44,6 +47,18 @@ const MobileNavbar = () => {
4447
}
4548
}, [])
4649

50+
useEffect(() => {
51+
const placeholderTexts = ["Search components", "Search Blocks", "Explore templates", "Search E-commerce"];
52+
let index = 0;
53+
54+
const interval = setInterval(() => {
55+
setSearchPlaceholderText(placeholderTexts[index]);
56+
index = (index + 1) % placeholderTexts.length;
57+
}, 3000);
58+
59+
return () => clearInterval(interval);
60+
}, []);
61+
4762
return (
4863
<>
4964
<nav
@@ -55,7 +70,7 @@ const MobileNavbar = () => {
5570
<div className='relative'>
5671
<span
5772
className='px-2 absolute right-[-33px] text-[#a4a4a8] top-1 py-[1px] bg-[#f0f0f1] rounded-full text-[10px]'>
58-
v2.0
73+
v2.2
5974
</span>
6075
<img
6176
src="/darklogo.png"
@@ -93,12 +108,25 @@ const MobileNavbar = () => {
93108
<div className="zenuiSearchInput mt-[45px] relative w-full" onClick={handleSearchClick}>
94109
<IoIosSearch
95110
className={`text-gray-400 absolute left-3 top-[0.6rem] text-[1.5rem]`}/>
111+
112+
<AnimatePresence>
113+
<motion.p
114+
key={searchPlaceholderText}
115+
initial={{opacity: 0, y: -10}}
116+
animate={{opacity: 1, y: 0}}
117+
exit={{opacity: 0, y: 10}}
118+
transition={{duration: 0.5}}
119+
className='text-[1rem] text-gray-400 absolute top-[10px] left-[40px]'
120+
>
121+
{searchPlaceholderText}
122+
</motion.p>
123+
</AnimatePresence>
124+
96125
<input
97126
type="search"
98127
name=""
99128
id=""
100129
readOnly={true}
101-
placeholder="Search..."
102130
className={`py-[0.59rem] pl-10 border w-full bg-transparent border-gray-200 rounded-md focus:ring-0 outline-none`}
103131
/>
104132
<span
@@ -208,6 +236,72 @@ const MobileNavbar = () => {
208236
</motion.div>
209237
)
210238
}
239+
240+
241+
<li onClick={() => setECommerceDropdownOpen(!eCommerceDropdownOpen)}
242+
className='cursor-pointer relative flex items-center gap-[8px] mt-1.5'>
243+
E-Commerce
244+
<NewBadge/>
245+
<div className='w-[8px] h-[8px] bg-green-500 rounded-full absolute -top-1.5 right-6 animate-[ping_1.5s_linear_infinite]'></div>
246+
<IoIosArrowDown className={`${eCommerceDropdownOpen ? 'rotate-[180deg]': 'rotate-0'} transition-all duration-300`}/>
247+
</li>
248+
249+
{
250+
eCommerceDropdownOpen && (
251+
<motion.div
252+
initial={{opacity: 0, y: -20}}
253+
animate={{opacity: 1, y: 0}}
254+
exit={{opacity: 0, y: -20}}
255+
className="grid grid-cols-1 gap-[20px] ml-4"
256+
>
257+
<div className='flex flex-col gap-[20px] text-[1rem]'>
258+
<Link to='/components/product-card'
259+
className='!p-0'>
260+
<p className='cursor-pointer leading-[20px] text-gray-600 transition-all duration-200'>
261+
Product Card
262+
</p>
263+
<span className='text-[0.8rem] font-[300] text-gray-500'>Animated modern product cards.</span>
264+
</Link>
265+
266+
<Link to='/blocks/offer-grid'
267+
className='!p-0'>
268+
<p className='cursor-pointer leading-[20px] text-gray-600 transition-all duration-200'>
269+
Offer Grid
270+
</p>
271+
<span className='text-[0.8rem] font-[300] text-gray-500'>Grid layout for showing product offers.</span>
272+
</Link>
273+
274+
<Link to='/blocks/checkout-page'
275+
className='!p-0'>
276+
<p className='cursor-pointer leading-[20px] text-gray-600 transition-all duration-200'>
277+
Checkout Page
278+
</p>
279+
<span className='text-[0.8rem] font-[300] text-gray-500'>Checkout page with order summery.</span>
280+
</Link>
281+
</div>
282+
283+
<div className='flex flex-col gap-[20px] text-[1rem]'>
284+
<Link to='/components/ads-card'
285+
className='!p-0'>
286+
<p className='cursor-pointer leading-[20px] text-gray-600 transition-all duration-200 flex items-center gap-[10px]'>
287+
Ads Card
288+
</p>
289+
<span
290+
className='text-[0.8rem] font-[300] text-gray-500'>Modern ads cards.</span>
291+
</Link>
292+
293+
<Link to='/blocks/product-details-page'
294+
className='!p-0'>
295+
<p className='cursor-pointer leading-[20px] text-gray-600 transition-all duration-200'>
296+
Product Details Page
297+
</p>
298+
<span className='text-[0.8rem] font-[300] text-gray-500'>Product Details with full functionality.</span>
299+
</Link>
300+
301+
</div>
302+
</motion.div>
303+
)
304+
}
211305
</ul>
212306
</aside>
213307

0 commit comments

Comments
 (0)