@codesinger0/shared-components 1.1.82 → 1.1.84
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.
|
@@ -70,35 +70,51 @@ const FullscreenCarousel = ({
|
|
|
70
70
|
<div className="fullscreen-carousel" dir="rtl">
|
|
71
71
|
<div className="fullscreen-carousel__viewport" ref={emblaRef}>
|
|
72
72
|
<div className="fullscreen-carousel__container">
|
|
73
|
-
{slides.map((slide, index) =>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
{slides.map((slide, index) => {
|
|
74
|
+
const isSingleSlide = !slide.leftContent && !slide.rightContent;
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div key={index} className="fullscreen-carousel__slide">
|
|
78
|
+
{isSingleSlide ? (
|
|
79
|
+
/* Single Slide Mode */
|
|
80
|
+
<div
|
|
81
|
+
className="w-full h-full"
|
|
82
|
+
style={{ height: desktopHeight }}
|
|
83
|
+
>
|
|
84
|
+
{slide.content}
|
|
85
|
+
</div>
|
|
86
|
+
) : (
|
|
87
|
+
<>
|
|
88
|
+
{/* Desktop Layout - Horizontal Split */}
|
|
89
|
+
<div
|
|
90
|
+
className="hidden md:grid md:grid-cols-2 w-full h-full"
|
|
91
|
+
style={{ height: desktopHeight }}
|
|
92
|
+
>
|
|
93
|
+
<div className="w-full h-full">
|
|
94
|
+
{slide.leftContent}
|
|
95
|
+
</div>
|
|
96
|
+
<div className="w-full h-full">
|
|
97
|
+
{slide.rightContent}
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
87
100
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
{/* Mobile Layout - Vertical Split */}
|
|
102
|
+
<div
|
|
103
|
+
className="md:hidden grid grid-rows-2 w-full h-full"
|
|
104
|
+
style={{ height: mobileHeight }}
|
|
105
|
+
>
|
|
106
|
+
<div className="w-full h-full">
|
|
107
|
+
{slide.leftContent}
|
|
108
|
+
</div>
|
|
109
|
+
<div className="w-full h-full">
|
|
110
|
+
{slide.rightContent}
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</>
|
|
114
|
+
)}
|
|
99
115
|
</div>
|
|
100
|
-
|
|
101
|
-
)
|
|
116
|
+
);
|
|
117
|
+
})}
|
|
102
118
|
</div>
|
|
103
119
|
</div>
|
|
104
120
|
|
|
@@ -3,14 +3,19 @@ import { motion, AnimatePresence } from 'framer-motion';
|
|
|
3
3
|
import { ShoppingCart } from 'lucide-react';
|
|
4
4
|
import { useCart } from '../../context/CartContext';
|
|
5
5
|
|
|
6
|
-
const FloatingCartButton = (
|
|
6
|
+
const FloatingCartButton = ({
|
|
7
|
+
absolute = true,
|
|
8
|
+
icon: CustomIcon = ShoppingCart,
|
|
9
|
+
bgColor = 'bg-orange-500',
|
|
10
|
+
hoverColor = 'hover:brightness-90'
|
|
11
|
+
}) => {
|
|
7
12
|
const { totalItems, toggleCart } = useCart();
|
|
8
13
|
|
|
9
14
|
return (
|
|
10
|
-
<div className=
|
|
15
|
+
<div className={`${absolute ? 'fixed bottom-6 right-6' : 'relative'} z-30`}>
|
|
11
16
|
<motion.button
|
|
12
17
|
onClick={toggleCart}
|
|
13
|
-
className=
|
|
18
|
+
className={`relative ${bgColor} text-white p-4 rounded-full shadow-lg ${hoverColor} transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50`}
|
|
14
19
|
style={{
|
|
15
20
|
transform: 'translate3d(0, 0, 0)',
|
|
16
21
|
WebkitTransform: 'translate3d(0, 0, 0)',
|
|
@@ -21,7 +26,7 @@ const FloatingCartButton = () => {
|
|
|
21
26
|
animate={{ scale: 1 }}
|
|
22
27
|
transition={{ type: "spring", stiffness: 300, damping: 25 }}
|
|
23
28
|
>
|
|
24
|
-
<
|
|
29
|
+
<CustomIcon size={26} />
|
|
25
30
|
{/* Badge */}
|
|
26
31
|
<AnimatePresence>
|
|
27
32
|
{totalItems > 0 && (
|