srcdev-nuxt-components 2.5.15 → 2.5.17

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.
@@ -8,13 +8,13 @@
8
8
  <div v-if="showGallery" class="gallery-content" :class="[{ galleryLoaded: !galleryLoaded }]">
9
9
  <div class="list" ref="sliderGalleryImagesList">
10
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
- loading="lazy" />
11
+ <NuxtImg @load="handleImageLoad(index)" @error="handleImageError(index)" :src="item.src" :alt="item.alt" />
13
12
  <div class="content" :class="item.textBrightness">
14
13
  <div v-show="item.stylist !== ''" class="author" :class="item.textBrightness">{{ item.stylist }}</div>
15
14
  <div v-show="item.title !== ''" class="title" :class="item.textBrightness">{{ item.title }}</div>
16
15
  <div v-show="item.category !== ''" class="topic" :class="item.textBrightness">{{ item.category }}</div>
17
- <div v-show="item.description !== ''" class="description" :class="item.textBrightness">{{ item.description }}</div>
16
+ <div v-show="item.description !== ''" class="description" :class="item.textBrightness">{{ item.description
17
+ }}</div>
18
18
  <div class="buttons" :class="item.textBrightness">
19
19
  <button>SEE MORE</button>
20
20
  </div>
@@ -25,10 +25,12 @@
25
25
  <div class="thumbnail" ref="sliderGalleryThumbnailsList">
26
26
  <div v-for="(item, index) in galleryData" :key="index" class="item">
27
27
  <div class="inner">
28
- <img :src="item.src" :alt="item.alt" loading="lazy" />
28
+ <NuxtImg :src="item.src" :alt="item.alt" />
29
29
  <div class="content" :class="item.textBrightness">
30
- <div v-show="item.thumbnail?.title !== ''" class="title" :class="item.textBrightness">{{ item.thumbnail?.title }}</div>
31
- <div v-show="item.thumbnail?.description !== ''" class="description" :class="item.textBrightness">{{ item.thumbnail?.description }}
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 }}
32
34
  </div>
33
35
  </div>
34
36
  </div>
@@ -36,10 +38,10 @@
36
38
  </div>
37
39
 
38
40
  <div class="arrows">
39
- <button id="prev" ref="prevDom" @click.prevent="doPrevious()">
41
+ <button id="prev" ref="prevDom" @click.prevent="doPrevious()" aria-label="Previous image">
40
42
  <Icon name="ic:outline-keyboard-arrow-left" class="arrows-icon" />
41
43
  </button>
42
- <button id="next" ref="nextDom" @click.prevent="doNext()">
44
+ <button id="next" ref="nextDom" @click.prevent="doNext()" aria-label="Next image">
43
45
  <Icon name="ic:outline-keyboard-arrow-right" class="arrows-icon" />
44
46
  </button>
45
47
  </div>
@@ -50,6 +52,8 @@
50
52
  </template>
51
53
 
52
54
  <script setup lang="ts">
55
+ import NuxtImg from '#image/components/NuxtImg.vue';
56
+
53
57
  const props = defineProps({
54
58
  autoRun: {
55
59
  type: Boolean,
@@ -270,11 +274,6 @@ onBeforeUnmount(() => {
270
274
  --_thumbnailWidth: var(--_thumbnailMobileWidth, 100px);
271
275
  --_thumbnailHeight: var(--_thumbnailMobileHeight, 165px);
272
276
 
273
- @container (width >= 1024px) {
274
- --_thumbnailWidth: var(--_thumbnailDesktopWidth, 150px);
275
- --_thumbnailHeight: var(--_thumbnailDesktopHeight, 220px);
276
- }
277
-
278
277
  height: 100svh;
279
278
  width: 100vw;
280
279
  overflow: hidden;
@@ -464,6 +463,11 @@ onBeforeUnmount(() => {
464
463
  display: flex;
465
464
  gap: 20px;
466
465
 
466
+ @container (width >= 1024px) {
467
+ --_thumbnailWidth: var(--_thumbnailDesktopWidth, 150px);
468
+ --_thumbnailHeight: var(--_thumbnailDesktopHeight, 220px);
469
+ }
470
+
467
471
  .item {
468
472
  width: var(--_thumbnailWidth);
469
473
  height: var(--_thumbnailHeight);
@@ -473,12 +477,12 @@ onBeforeUnmount(() => {
473
477
  border: var(--_thumbnailBorder, 1px solid transparent);
474
478
  outline: var(--_thumbnailOutline, 1px solid transparent);
475
479
  border-radius: var(--_thumbnailBorderRadius, 20px);
480
+ overflow: hidden;
476
481
 
477
482
  .inner {
478
483
  position: absolute;
479
484
  inset: 0 0 0 0;
480
485
  background-color: #0004;
481
- border-radius: var(--_thumbnailBorderRadius, 20px);
482
486
  z-index: 2;
483
487
  }
484
488
 
@@ -486,7 +490,6 @@ onBeforeUnmount(() => {
486
490
  width: 100%;
487
491
  height: 100%;
488
492
  object-fit: cover;
489
- border-radius: 20px;
490
493
  }
491
494
 
492
495
  .content {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "2.5.15",
4
+ "version": "2.5.17",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",