@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
- <div key={index} className="fullscreen-carousel__slide">
75
- {/* Desktop Layout - Horizontal Split */}
76
- <div
77
- className="hidden md:grid md:grid-cols-2 w-full h-full"
78
- style={{ height: desktopHeight }}
79
- >
80
- <div className="w-full h-full">
81
- {slide.leftContent}
82
- </div>
83
- <div className="w-full h-full">
84
- {slide.rightContent}
85
- </div>
86
- </div>
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
- {/* Mobile Layout - Vertical Split */}
89
- <div
90
- className="md:hidden grid grid-rows-2 w-full h-full"
91
- style={{ height: mobileHeight }}
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>
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
- </div>
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="fixed bottom-6 right-6 z-30">
15
+ <div className={`${absolute ? 'fixed bottom-6 right-6' : 'relative'} z-30`}>
11
16
  <motion.button
12
17
  onClick={toggleCart}
13
- className="relative bg-orange-500 text-white p-4 rounded-full shadow-lg hover:brightness-90 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50"
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
- <ShoppingCart size={26} />
29
+ <CustomIcon size={26} />
25
30
  {/* Badge */}
26
31
  <AnimatePresence>
27
32
  {totalItems > 0 && (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.82",
3
+ "version": "1.1.84",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [