srcdev-nuxt-components 3.0.0 → 4.0.1

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.
Files changed (90) hide show
  1. package/assets/styles/a11y/_utils.css +20 -0
  2. package/assets/styles/a11y/_variables.css +8 -0
  3. package/assets/styles/a11y/index.css +2 -0
  4. package/assets/styles/forms/index.css +2 -0
  5. package/assets/styles/forms/themes/_error.css +77 -0
  6. package/assets/styles/forms/themes/_ghost.css +77 -0
  7. package/assets/styles/forms/themes/_input-action.css +20 -0
  8. package/assets/styles/forms/themes/_primary.css +82 -0
  9. package/assets/styles/forms/themes/_secondary.css +77 -0
  10. package/assets/styles/forms/themes/_success.css +77 -0
  11. package/assets/styles/forms/themes/_tertiary.css +77 -0
  12. package/assets/styles/forms/themes/_warning.css +77 -0
  13. package/assets/styles/forms/themes/index.css +8 -0
  14. package/assets/styles/forms/variables/_sizes.css +82 -0
  15. package/assets/styles/forms/variables/_theme.css +11 -0
  16. package/assets/styles/forms/variables/index.css +2 -0
  17. package/assets/styles/main.css +5 -0
  18. package/assets/styles/typography/index.css +2 -0
  19. package/assets/styles/typography/utils/_font-classes.css +160 -0
  20. package/assets/styles/typography/utils/_weights.css +69 -0
  21. package/assets/styles/typography/utils/index.css +2 -0
  22. package/assets/styles/typography/variables/_colors.css +14 -0
  23. package/assets/styles/typography/variables/_reponsive-font-size.css +10 -0
  24. package/assets/styles/typography/variables/index.css +2 -0
  25. package/assets/styles/utils/_animations.css +42 -0
  26. package/assets/styles/utils/_canvasWidths.css +18 -0
  27. package/assets/styles/utils/_display.css +7 -0
  28. package/assets/styles/utils/_margin-helpers.css +334 -0
  29. package/assets/styles/utils/_padding-helpers.css +308 -0
  30. package/assets/styles/utils/_page.css +24 -0
  31. package/assets/styles/utils/_placement.css +73 -0
  32. package/assets/styles/utils/index.css +7 -0
  33. package/assets/styles/variables/colors/_blue.css +15 -0
  34. package/assets/styles/variables/colors/_gray.css +16 -0
  35. package/assets/styles/variables/colors/_green.css +15 -0
  36. package/assets/styles/variables/colors/_orange.css +15 -0
  37. package/assets/styles/variables/colors/_red.css +15 -0
  38. package/assets/styles/variables/colors/_yellow.css +15 -0
  39. package/assets/styles/variables/colors/colors.css +6 -0
  40. package/assets/styles/variables/components/_accordian.css +7 -0
  41. package/assets/styles/variables/components/_container-glow-core.css +16 -0
  42. package/assets/styles/variables/components/_display-dialog-core.css +35 -0
  43. package/assets/styles/variables/components/_tabs.css +18 -0
  44. package/assets/styles/variables/components/display-prompt-core/_scaffolding.css +57 -0
  45. package/assets/styles/variables/components/display-prompt-core/index.css +2 -0
  46. package/assets/styles/variables/components/display-prompt-core/themes/_error.css +39 -0
  47. package/assets/styles/variables/components/display-prompt-core/themes/_info.css +39 -0
  48. package/assets/styles/variables/components/display-prompt-core/themes/_success.css +39 -0
  49. package/assets/styles/variables/components/display-prompt-core/themes/_warning.css +39 -0
  50. package/assets/styles/variables/components/display-prompt-core/themes/index.css +4 -0
  51. package/assets/styles/variables/components/index.css +5 -0
  52. package/assets/styles/variables/index.css +2 -0
  53. package/components/animated-svg-text/AnimatedSvgText.vue +87 -0
  54. package/components/canvas-switcher/CanvasSwitcher.vue +77 -0
  55. package/components/carousel-basic/CarouselBasic.vue +241 -0
  56. package/components/carousel-basic/CarouselFlip.vue +378 -0
  57. package/components/clip-element/ClipElement.vue +73 -0
  58. package/components/clipped-panels/ClippedPanel.vue +73 -0
  59. package/components/deep-expanding-menu/DeepExpandingMenu.vue +214 -0
  60. package/components/deep-expanding-menu/DeepExpandingMenuOld.vue +218 -0
  61. package/components/display-banner/DisplayBanner.vue +63 -0
  62. package/components/display-details/DisplayDetailsCore.vue +312 -0
  63. package/components/functional/accordian/AccordianCore.vue +138 -0
  64. package/components/functional/display-dialog/DisplayDialogCore.vue +244 -0
  65. package/components/functional/display-dialog/variants/DisplayDialogConfirm.vue +45 -0
  66. package/components/functional/display-dialog/variants/DisplayDialogScrollableContent.vue +49 -0
  67. package/components/functional/pop-over/PopOver.vue +88 -0
  68. package/components/image-galleries/SliderGallery.vue +784 -0
  69. package/components/masonry-grid-ordered/MasonryGridOrdered.vue +158 -0
  70. package/components/presentation/container-glow/ContainerGlowCore.vue +211 -0
  71. package/components/presentation/display-grid/DisplayGridCore.vue +22 -0
  72. package/components/presentation/display-prompt/DisplayPromptCore.vue +150 -0
  73. package/components/presentation/display-prompt/variants/DisplayPromptError.vue +53 -0
  74. package/components/presentation/layout-grids/LayoutGridA.vue +103 -0
  75. package/components/presentation/layout-grids/LayoutGridB.vue +132 -0
  76. package/components/presentation/layout-row/LayoutRow.vue +157 -0
  77. package/components/presentation/masonry-grid/MasonryGrid.vue +62 -0
  78. package/components/presentation/masonry-grid-sorted/MasonryGridSorted.vue +115 -0
  79. package/components/presentation/tabs/TabsCore.vue +308 -0
  80. package/components/responsive-header/NavigationItems.vue +164 -0
  81. package/components/responsive-header/ResponsiveHeader.vue +586 -0
  82. package/components/rotating-carousel/RotatingCarouselImage.vue +200 -0
  83. package/composables/useDialogControls.ts +23 -0
  84. package/composables/useStyleClassPassthrough.ts +35 -0
  85. package/composables/useTabs.ts +201 -0
  86. package/nuxt.config.ts +0 -3
  87. package/package.json +7 -7
  88. package/types/gallery-data.ts +13 -0
  89. package/types/responsiveHeader.ts +38 -0
  90. package/types/types.carousel-basic.ts +19 -0
@@ -0,0 +1,784 @@
1
+ <template>
2
+ <div class="slider-gallery" :class="[elementClasses]" ref="sliderGalleryWrapper">
3
+ <div class="loading-state" :class="[{ galleryLoaded: !galleryLoaded }]">
4
+ <div class="loading-spinner"></div>
5
+ <p>Loading gallery...</p>
6
+ </div>
7
+
8
+ <div v-if="showGallery" class="gallery-content" :class="[{ galleryLoaded: !galleryLoaded }]">
9
+ <div class="list" ref="sliderGalleryImagesList">
10
+ <div v-for="(item, index) in galleryData" :key="index" class="item">
11
+ <NuxtImg @load="handleImageLoad(index)" @error="handleImageError(index)" :src="item.src" :alt="item.alt" />
12
+ <div class="content" :class="item.textBrightness">
13
+ <div v-show="item.stylist !== ''" class="author" :class="item.textBrightness">{{ item.stylist }}</div>
14
+ <div v-show="item.title !== ''" class="title" :class="item.textBrightness">{{ item.title }}</div>
15
+ <div v-show="item.category !== ''" class="topic" :class="item.textBrightness">{{ item.category }}</div>
16
+ <div v-show="item.description !== ''" class="description" :class="item.textBrightness">{{ item.description
17
+ }}</div>
18
+ <div class="buttons" :class="item.textBrightness">
19
+ <button>SEE MORE</button>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </div>
24
+
25
+ <div class="thumbnail" ref="sliderGalleryThumbnailsList">
26
+ <div v-for="(item, index) in galleryData" :key="index" class="item">
27
+ <div class="inner">
28
+ <NuxtImg :src="item.src" :alt="item.alt" />
29
+ <div class="content" :class="item.textBrightness">
30
+ <div v-show="item.thumbnail?.title !== ''" class="title" :class="item.textBrightness">{{
31
+ item.thumbnail?.title }}</div>
32
+ <div v-show="item.thumbnail?.description !== ''" class="description" :class="item.textBrightness">{{
33
+ item.thumbnail?.description }}
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="arrows">
41
+ <button id="prev" ref="prevDom" @click.prevent="doPrevious()" aria-label="Previous image">
42
+ <Icon name="ic:outline-keyboard-arrow-left" class="arrows-icon" />
43
+ </button>
44
+ <button id="next" ref="nextDom" @click.prevent="doNext()" aria-label="Next image">
45
+ <Icon name="ic:outline-keyboard-arrow-right" class="arrows-icon" />
46
+ </button>
47
+ </div>
48
+
49
+ <div class="time"></div>
50
+ </div>
51
+ </div>
52
+ </template>
53
+
54
+ <script setup lang="ts">
55
+ import { type IGalleryData } from '@/types/gallery-data';
56
+
57
+ const props = defineProps({
58
+ autoRun: {
59
+ type: Boolean,
60
+ default: true,
61
+ },
62
+ autoRunInterval: {
63
+ type: Number,
64
+ default: 7000,
65
+ },
66
+ animationDuration: {
67
+ type: Number,
68
+ default: 3000,
69
+ },
70
+ styleClassPassthrough: {
71
+ type: Array as PropType<string[]>,
72
+ default: () => [],
73
+ },
74
+ });
75
+
76
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
77
+ const galleryData = defineModel<IGalleryData[]>('galleryData');
78
+
79
+ const sliderGalleryWrapper = useTemplateRef('sliderGalleryWrapper');
80
+ const sliderGalleryImagesList = useTemplateRef('sliderGalleryImagesList');
81
+ const sliderGalleryThumbnailsList = useTemplateRef('sliderGalleryThumbnailsList');
82
+
83
+ const transitionRunning = ref(false);
84
+ const galleryLoaded = ref(true);
85
+ const showGallery = ref(false);
86
+ const loadedImages = ref<Set<number>>(new Set());
87
+ const preloadedImages = ref<Array<HTMLImageElement>>([]);
88
+
89
+ onMounted(async () => {
90
+ await nextTick();
91
+
92
+ // If no images or galleryData is empty, stop loading
93
+ if (!galleryData.value || galleryData.value.length === 0) {
94
+ galleryLoaded.value = false;
95
+ return;
96
+ }
97
+
98
+ // Create an array to hold image loading promises
99
+ const imageLoadPromises: Promise<void>[] = [];
100
+
101
+ // Preload the first image at minimum
102
+ const firstImageIndex = 0;
103
+ if (galleryData.value[firstImageIndex]) {
104
+ const img = new Image();
105
+ img.src = galleryData.value[firstImageIndex].src;
106
+
107
+ const promise = new Promise<void>((resolve) => {
108
+ img.onload = () => {
109
+ loadedImages.value.add(firstImageIndex);
110
+ resolve();
111
+ };
112
+ img.onerror = () => {
113
+ loadedImages.value.add(firstImageIndex); // Count as loaded anyway
114
+ resolve();
115
+ };
116
+ });
117
+
118
+ imageLoadPromises.push(promise);
119
+ preloadedImages.value.push(img);
120
+ }
121
+
122
+ // Wait for at least the first image to load
123
+ await Promise.race(imageLoadPromises);
124
+
125
+ setTimeout(() => {
126
+ galleryLoaded.value = false;
127
+ }, 500);
128
+
129
+ showGallery.value = true;
130
+ window.addEventListener('keydown', handleKeyDown);
131
+ });
132
+
133
+ const handleImageLoad = (index: number) => {
134
+ loadedImages.value.add(index);
135
+ };
136
+
137
+ const handleImageError = (index: number) => {
138
+ loadedImages.value.add(index);
139
+ };
140
+
141
+ const doNext = () => {
142
+ if (transitionRunning.value) return;
143
+ showSlider('next');
144
+ };
145
+
146
+ const doPrevious = () => {
147
+ if (transitionRunning.value) return;
148
+ showSlider('prev');
149
+ };
150
+
151
+ let runTimeOut: any;
152
+ let runNextAuto: any = null;
153
+
154
+ function showSlider(type: string) {
155
+ transitionRunning.value = true;
156
+
157
+ const currentSliderItems = Array.from(sliderGalleryImagesList.value?.children || []);
158
+ const currentThumbnailItems = Array.from(sliderGalleryThumbnailsList.value?.children || []);
159
+
160
+ if (type === 'next') {
161
+ if (currentSliderItems.length) {
162
+ const firstItem = currentSliderItems[0];
163
+ if (firstItem) {
164
+ sliderGalleryImagesList.value?.appendChild(firstItem);
165
+ }
166
+ }
167
+
168
+ if (currentThumbnailItems.length) {
169
+ const firstThumb = currentThumbnailItems[0];
170
+ if (firstThumb) {
171
+ sliderGalleryThumbnailsList.value?.appendChild(firstThumb);
172
+ }
173
+ }
174
+
175
+ sliderGalleryWrapper.value?.classList.add('next');
176
+ } else {
177
+ if (currentSliderItems.length) {
178
+ const lastItem = currentSliderItems[currentSliderItems.length - 1];
179
+ if (lastItem) {
180
+ lastItem.classList.add('prepend-item');
181
+ sliderGalleryImagesList.value?.prepend(lastItem);
182
+ }
183
+ }
184
+
185
+ if (currentThumbnailItems.length) {
186
+ const lastThumb = currentThumbnailItems[currentThumbnailItems.length - 1];
187
+ if (lastThumb) {
188
+ lastThumb.classList.add('prepend-item');
189
+ sliderGalleryThumbnailsList.value?.prepend(lastThumb);
190
+ }
191
+ }
192
+
193
+ sliderGalleryWrapper.value?.offsetWidth; // Force reflow
194
+ sliderGalleryWrapper.value?.classList.add('prev');
195
+ }
196
+
197
+ clearTimeout(runTimeOut);
198
+ runTimeOut = setTimeout(() => {
199
+
200
+ if (sliderGalleryWrapper.value) {
201
+ sliderGalleryWrapper.value.classList.remove('next');
202
+ sliderGalleryWrapper.value.classList.remove('prev');
203
+
204
+ const items = sliderGalleryImagesList.value?.querySelectorAll('.prepend-item');
205
+ items?.forEach((item) => item.classList.remove('prepend-item'));
206
+
207
+ const thumbs = sliderGalleryThumbnailsList.value?.querySelectorAll('.prepend-item');
208
+ thumbs?.forEach((thumb) => thumb.classList.remove('prepend-item'));
209
+ }
210
+ transitionRunning.value = false;
211
+ }, props.animationDuration);
212
+
213
+ // Reset auto-run timer
214
+ clearTimeout(runNextAuto);
215
+ runNextAuto = setTimeout(() => {
216
+ if (!props.autoRun || galleryLoaded.value) return;
217
+ doNext();
218
+ }, props.autoRunInterval);
219
+ }
220
+
221
+ // Add keyboard navigation event handlers
222
+ const handleKeyDown = (event: KeyboardEvent) => {
223
+ // Don't process key events if transition is running or gallery isn't loaded
224
+ if (transitionRunning.value || galleryLoaded.value) {
225
+ return;
226
+ }
227
+
228
+ if (event.key === 'ArrowLeft') {
229
+ doPrevious();
230
+ } else if (event.key === 'ArrowRight') {
231
+ doNext();
232
+ }
233
+ };
234
+
235
+ // Initialize auto-run only after loading completes
236
+ watch(galleryLoaded, (previousValue, currentValue) => {
237
+ if (!currentValue && props.autoRun) {
238
+ clearTimeout(runNextAuto);
239
+ runNextAuto = setTimeout(() => {
240
+ doNext();
241
+ }, props.autoRunInterval);
242
+ }
243
+ });
244
+
245
+ watch(
246
+ () => props.styleClassPassthrough,
247
+ () => {
248
+ resetElementClasses(props.styleClassPassthrough);
249
+ }
250
+ );
251
+
252
+ onBeforeUnmount(() => {
253
+ showGallery.value = false;
254
+ clearTimeout(runTimeOut);
255
+ clearTimeout(runNextAuto);
256
+ window.removeEventListener('keydown', handleKeyDown);
257
+ });
258
+ </script>
259
+
260
+ <style lang="css">
261
+ .slider-gallery {
262
+ --_animationDuration: v-bind(animationDuration + 'ms');
263
+
264
+ --_thumbnailAspectRatio: 150 /220;
265
+
266
+ --_thumbnailWidth: var(--_thumbnailMobileWidth, 100px);
267
+ --_thumbnailHeight: var(--_thumbnailMobileHeight, 165px);
268
+
269
+ height: 100svh;
270
+ width: 100vw;
271
+ overflow: hidden;
272
+ position: absolute;
273
+ inset: 0 0 0 0;
274
+
275
+ z-index: 9999;
276
+ container-type: inline-size;
277
+
278
+ .loading-state {
279
+ position: absolute;
280
+ inset: 0 0 0 0;
281
+ z-index: 1000;
282
+ display: flex;
283
+ flex-direction: column;
284
+ background-color: var(--page-bg);
285
+ align-items: center;
286
+ justify-content: center;
287
+ color: var(--grayscale-text-body);
288
+ opacity: 1;
289
+ transition: display 0.5s, opacity 0.5s;
290
+ transition-behavior: allow-discrete;
291
+
292
+ &.galleryLoaded {
293
+ display: none;
294
+ opacity: 0;
295
+ }
296
+
297
+ .loading-spinner {
298
+ width: 50px;
299
+ height: 50px;
300
+ border: 5px solid rgba(0, 0, 0, 0.1);
301
+ border-radius: 50%;
302
+ border-top-color: #f1683a;
303
+ animation: spinner 1s ease-in-out infinite;
304
+ margin-bottom: 20px;
305
+ }
306
+
307
+ p {
308
+ font-size: 1.2em;
309
+ font-weight: 500;
310
+ }
311
+ }
312
+
313
+ .gallery-content {
314
+ width: 100%;
315
+ height: 100%;
316
+ position: relative;
317
+ /* opacity: 0; */
318
+ /* transition: opacity 0.5s ease-in-out; */
319
+
320
+ &.galleryLoaded {
321
+ /* opacity: 1; */
322
+ }
323
+ }
324
+
325
+ .list {
326
+ .item {
327
+ width: 100%;
328
+ height: 100%;
329
+ position: absolute;
330
+ inset: 0 0 0 0;
331
+
332
+ &:nth-child(1) {
333
+ z-index: 1;
334
+
335
+ .content {
336
+ .author,
337
+ .title,
338
+ .topic,
339
+ .description,
340
+ .buttons {
341
+ transform: translateY(50px);
342
+ filter: blur(20px);
343
+ opacity: 0;
344
+ animation: showContent 0.5s 1s linear 1 forwards;
345
+ }
346
+
347
+ .title {
348
+ animation-delay: 1.2s !important;
349
+ }
350
+ .topic {
351
+ animation-delay: 1.4s !important;
352
+ }
353
+ .description {
354
+ animation-delay: 1.6s !important;
355
+ }
356
+ .buttons {
357
+ animation-delay: 1.8s !important;
358
+ }
359
+ }
360
+ }
361
+
362
+ img {
363
+ width: 100%;
364
+ height: 100%;
365
+ object-fit: cover;
366
+ }
367
+
368
+ .content {
369
+ position: absolute;
370
+ top: 20%;
371
+ width: 1140px;
372
+ max-width: 80%;
373
+ left: 50%;
374
+ transform: translateX(-50%);
375
+ padding-right: 30%;
376
+ box-sizing: border-box;
377
+ text-shadow: 0 5px 10px #0004;
378
+
379
+ &.light {
380
+ color: #fff;
381
+ }
382
+ &.dark {
383
+ color: #000;
384
+ }
385
+
386
+ .author {
387
+ font-weight: bold;
388
+ letter-spacing: 10px;
389
+
390
+ &.light {
391
+ color: #fff;
392
+ }
393
+ &.dark {
394
+ color: #000;
395
+ }
396
+ }
397
+
398
+ .title {
399
+ font-size: 5em;
400
+ font-weight: bold;
401
+ line-height: 1.3em;
402
+
403
+ &.light {
404
+ color: #fff;
405
+ }
406
+ &.dark {
407
+ color: #000;
408
+ }
409
+ }
410
+ .topic {
411
+ font-size: 5em;
412
+ font-weight: bold;
413
+ line-height: 1.3em;
414
+
415
+ &.light {
416
+ color: #fff;
417
+ }
418
+ &.dark {
419
+ color: #000;
420
+ }
421
+ }
422
+
423
+ .buttons {
424
+ display: grid;
425
+ grid-template-columns: repeat(2, 130px);
426
+ grid-template-rows: 40px;
427
+ gap: 5px;
428
+ margin-top: 20px;
429
+
430
+ button {
431
+ background-color: #99999975;
432
+ border: 1px solid #fff;
433
+ color: #fff;
434
+ letter-spacing: 3px;
435
+ font-weight: 500;
436
+
437
+ &.light {
438
+ color: #fff;
439
+ }
440
+ &.dark {
441
+ color: #000;
442
+ }
443
+ }
444
+ }
445
+ }
446
+ }
447
+ }
448
+
449
+ .thumbnail {
450
+ position: absolute;
451
+ bottom: 50px;
452
+ left: 50%;
453
+ width: max-content;
454
+ z-index: 100;
455
+ display: flex;
456
+ gap: 20px;
457
+
458
+ @container (width >= 1024px) {
459
+ --_thumbnailWidth: var(--_thumbnailDesktopWidth, 150px);
460
+ --_thumbnailHeight: var(--_thumbnailDesktopHeight, 220px);
461
+ }
462
+
463
+ .item {
464
+ width: var(--_thumbnailWidth);
465
+ height: var(--_thumbnailHeight);
466
+ flex-shrink: 0;
467
+ position: relative;
468
+
469
+ border: var(--_thumbnailBorder, 1px solid transparent);
470
+ outline: var(--_thumbnailOutline, 1px solid transparent);
471
+ border-radius: var(--_thumbnailBorderRadius, 20px);
472
+ overflow: hidden;
473
+
474
+ .inner {
475
+ position: absolute;
476
+ inset: 0 0 0 0;
477
+ background-color: #0004;
478
+ z-index: 2;
479
+ }
480
+
481
+ img {
482
+ width: 100%;
483
+ height: 100%;
484
+ object-fit: cover;
485
+ }
486
+
487
+ .content {
488
+ position: absolute;
489
+ bottom: 10px;
490
+ left: 10px;
491
+ right: 10px;
492
+
493
+ .title {
494
+ font-weight: 500;
495
+
496
+ &.light {
497
+ color: #fff;
498
+ }
499
+ &.dark {
500
+ color: #000;
501
+ }
502
+ }
503
+
504
+ .description {
505
+ font-weight: 300;
506
+
507
+ &.light {
508
+ color: #fff;
509
+ }
510
+ &.dark {
511
+ color: #000;
512
+ }
513
+ }
514
+ }
515
+ }
516
+ }
517
+
518
+ /* arrows */
519
+ .arrows {
520
+ position: absolute;
521
+ top: 80%;
522
+ right: 52%;
523
+ z-index: 100;
524
+ width: 300px;
525
+ max-width: 30%;
526
+ display: flex;
527
+ gap: 20px;
528
+ align-items: center;
529
+
530
+ button {
531
+ display: grid;
532
+ justify-content: center;
533
+ align-items: center;
534
+ width: 40px;
535
+ height: 40px;
536
+ border-radius: 50%;
537
+ background-color: #eee4;
538
+ color: #fff;
539
+ font-family: monospace;
540
+ font-weight: bold;
541
+ transition: 0.5s;
542
+
543
+ border-width: 2px;
544
+ border-style: solid;
545
+ border-color: white;
546
+
547
+ &#prev {
548
+ --_translateX: -2px;
549
+ }
550
+
551
+ &#next {
552
+ --_translateX: 2px;
553
+ }
554
+
555
+ &:hover {
556
+ background-color: #fff;
557
+ color: #000;
558
+ }
559
+
560
+ .arrows-icon {
561
+ color: currentColor;
562
+ font-weight: 900;
563
+ height: 40px;
564
+ width: 40px;
565
+ translate: var(--_translateX) -3px;
566
+ }
567
+ }
568
+ }
569
+
570
+ .time {
571
+ position: absolute;
572
+ z-index: 1000;
573
+ width: 0%;
574
+ height: 3px;
575
+ background-color: #f1683a;
576
+ left: 0;
577
+ top: 0;
578
+ }
579
+
580
+ /* Slider carousel animations */
581
+ &.next {
582
+ .list {
583
+ .item {
584
+ &:nth-child(1) {
585
+ img {
586
+ width: var(--_thumbnailWidth);
587
+ height: var(--_thumbnailHeight);
588
+ position: absolute;
589
+ bottom: 50px;
590
+ left: 50%;
591
+ border-radius: 30px;
592
+ animation: showImage 0.5s linear 1 forwards;
593
+ }
594
+ }
595
+ }
596
+ }
597
+
598
+ .arrows {
599
+ button {
600
+ pointer-events: none;
601
+ }
602
+ }
603
+
604
+ .thumbnail {
605
+ animation: effectNext 0.5s linear 1 forwards;
606
+
607
+ .item {
608
+ &:nth-last-child(1) {
609
+ overflow: hidden;
610
+ animation: showThumbnail 0.5s linear 1 forwards;
611
+ }
612
+ }
613
+ }
614
+
615
+ .time {
616
+ animation: runningTime var(--_animationDuration) linear 1 forwards;
617
+ }
618
+ }
619
+
620
+ &.prev {
621
+ .list {
622
+ .item {
623
+ &:nth-child(2) {
624
+ z-index: 2;
625
+
626
+ img {
627
+ animation: outFrame 0.5s linear 1 forwards;
628
+ position: absolute;
629
+ bottom: 0;
630
+ left: 0;
631
+ }
632
+
633
+ .content {
634
+ .author,
635
+ .title,
636
+ .topic,
637
+ .description,
638
+ .buttons {
639
+ animation: contentOut 1.5s linear 1 forwards !important;
640
+ }
641
+ }
642
+ }
643
+ img {
644
+ z-index: 100;
645
+ }
646
+ }
647
+
648
+ .item.prepend-item {
649
+ z-index: 1; /* Ensure it's visible */
650
+ /* Any initial styles needed */
651
+ }
652
+ }
653
+
654
+ .arrows {
655
+ button {
656
+ pointer-events: none;
657
+ }
658
+ }
659
+
660
+ .thumbnail {
661
+ /* Add a transform to the entire thumbnail container */
662
+ animation: effectPrev 0.5s linear 1 forwards;
663
+
664
+ .item {
665
+ &:first-child {
666
+ /* Add the animated border effect */
667
+ &::before {
668
+ animation: countdownBorder 7s linear 1 forwards;
669
+ }
670
+ }
671
+ &:nth-child(1) {
672
+ overflow: hidden;
673
+ animation: showThumbnailPrev 0.5s linear 1 forwards;
674
+ }
675
+ }
676
+
677
+ .item.prepend-item {
678
+ opacity: 0;
679
+ transform: translateX(-20px);
680
+ /* Initial state for thumbnail animation */
681
+ }
682
+ }
683
+ .time {
684
+ animation: runningTime var(--_animationDuration) linear 1 forwards;
685
+ }
686
+ }
687
+ }
688
+
689
+ @keyframes showContent {
690
+ to {
691
+ transform: translateY(0px);
692
+ filter: blur(0px);
693
+ opacity: 1;
694
+ }
695
+ }
696
+
697
+ @keyframes showImage {
698
+ to {
699
+ bottom: 0;
700
+ left: 0;
701
+ width: 100%;
702
+ height: 100%;
703
+ border-radius: 0;
704
+ }
705
+ }
706
+
707
+ @keyframes showThumbnail {
708
+ from {
709
+ width: 0;
710
+ opacity: 0;
711
+ }
712
+ }
713
+
714
+ @keyframes effectNext {
715
+ from {
716
+ transform: translateX(calc(1 * var(--_thumbnailWidth)));
717
+ }
718
+ }
719
+
720
+ @keyframes runningTime {
721
+ from {
722
+ width: 100%;
723
+ }
724
+ to {
725
+ width: 0;
726
+ }
727
+ }
728
+
729
+ @keyframes outFrame {
730
+ to {
731
+ width: var(--_thumbnailWidth);
732
+ height: var(--_thumbnailHeight);
733
+ bottom: 50px;
734
+ left: 50%;
735
+ border-radius: 20px;
736
+ }
737
+ }
738
+
739
+ @keyframes contentOut {
740
+ to {
741
+ transform: translateY(calc(-1 * var(--_thumbnailWidth)));
742
+ filter: blur(20px);
743
+ opacity: 0;
744
+ }
745
+ }
746
+
747
+ @keyframes effectPrev {
748
+ from {
749
+ transform: translateX(calc(-1 * var(--_thumbnailWidth)));
750
+ }
751
+ to {
752
+ transform: translateX(0);
753
+ }
754
+ }
755
+
756
+ @keyframes showThumbnailPrev {
757
+ from {
758
+ opacity: 0;
759
+ transform: translateX(-20px);
760
+ }
761
+ to {
762
+ opacity: 1;
763
+ transform: translateX(0);
764
+ }
765
+ }
766
+
767
+ @keyframes spinner {
768
+ 0% {
769
+ transform: rotate(0deg);
770
+ }
771
+ 100% {
772
+ transform: rotate(360deg);
773
+ }
774
+ }
775
+
776
+ @media screen and (max-width: 678px) {
777
+ .slider-gallery .list .item .content {
778
+ padding-right: 0;
779
+ }
780
+ .slider-gallery .list .item .content .title {
781
+ font-size: 30px;
782
+ }
783
+ }
784
+ </style>