@codesinger0/shared-components 1.1.107 → 1.1.108

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.
@@ -12,9 +12,14 @@ const FullscreenCarousel = ({
12
12
  showDots = true,
13
13
  showArrows = true,
14
14
  dotsColor = 'rgba(255, 255, 255, 1)',
15
+ dotsPosition = { mobile: 'inside', desktop: 'inside' }, // 'inside' | 'below'
15
16
  className = '',
16
17
  ...props
17
18
  }) => {
19
+ // Normalize dotsPosition to always be an object
20
+ const normalizedDotsPosition = typeof dotsPosition === 'string'
21
+ ? { mobile: dotsPosition, desktop: dotsPosition }
22
+ : { mobile: dotsPosition?.mobile || 'inside', desktop: dotsPosition?.desktop || 'inside' };
18
23
  const [prevBtnEnabled, setPrevBtnEnabled] = useState(false);
19
24
  const [nextBtnEnabled, setNextBtnEnabled] = useState(false);
20
25
  const [selectedIndex, setSelectedIndex] = useState(0);
@@ -127,9 +132,9 @@ const FullscreenCarousel = ({
127
132
  </div>
128
133
  </div>
129
134
 
130
- {/* Dots indicator */}
135
+ {/* Dots indicator - inside content (absolute positioned) */}
131
136
  {showDots && slides.length > 1 && (
132
- <div className="fullscreen-carousel__dots">
137
+ <div className={`fullscreen-carousel__dots fullscreen-carousel__dots--mobile-${normalizedDotsPosition.mobile} fullscreen-carousel__dots--desktop-${normalizedDotsPosition.desktop}`}>
133
138
  {scrollSnaps.map((_, index) => (
134
139
  <button
135
140
  key={index}
@@ -266,12 +271,35 @@ const FullscreenCarousel = ({
266
271
  display: flex;
267
272
  justify-content: center;
268
273
  gap: 0.5rem;
269
- position: absolute;
270
- bottom: 2rem;
271
274
  left: 50%;
272
275
  transform: translateX(-50%);
273
276
  z-index: 10;
274
277
  }
278
+
279
+ /* Mobile: inside (default) */
280
+ .fullscreen-carousel__dots--mobile-inside {
281
+ position: absolute;
282
+ bottom: 2rem;
283
+ }
284
+
285
+ /* Mobile: below */
286
+ .fullscreen-carousel__dots--mobile-below {
287
+ position: relative;
288
+ padding: 1rem 0;
289
+ }
290
+
291
+ /* Desktop overrides */
292
+ @media (min-width: 768px) {
293
+ .fullscreen-carousel__dots--desktop-inside {
294
+ position: absolute;
295
+ bottom: 2rem;
296
+ }
297
+
298
+ .fullscreen-carousel__dots--desktop-below {
299
+ position: relative;
300
+ padding: 1rem 0;
301
+ }
302
+ }
275
303
 
276
304
  .fullscreen-carousel__dot {
277
305
  background-color: ${dotsColor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesinger0/shared-components",
3
- "version": "1.1.107",
3
+ "version": "1.1.108",
4
4
  "description": "Shared React components for customer projects",
5
5
  "main": "dist/index.js",
6
6
  "files": [