srcdev-nuxt-components 2.5.16 → 2.5.18

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 { type IGalleryData } from '~/types/gallery-data';
56
+
53
57
  const props = defineProps({
54
58
  autoRun: {
55
59
  type: Boolean,
@@ -69,20 +73,6 @@ const props = defineProps({
69
73
  },
70
74
  });
71
75
 
72
- interface IGalleryData {
73
- src: string;
74
- alt: string;
75
- stylist?: string;
76
- title?: string;
77
- category?: string;
78
- description?: string;
79
- thumbnail?: {
80
- title: string;
81
- description: string;
82
- };
83
- textBrightness: 'light' | 'dark';
84
- }
85
-
86
76
  const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
87
77
  const galleryData = defineModel<IGalleryData[]>('galleryData');
88
78
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "2.5.16",
4
+ "version": "2.5.18",
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",
@@ -0,0 +1,13 @@
1
+ export interface IGalleryData {
2
+ src: string;
3
+ alt: string;
4
+ stylist?: string;
5
+ title?: string;
6
+ category?: string;
7
+ description?: string;
8
+ thumbnail?: {
9
+ title: string;
10
+ description: string;
11
+ };
12
+ textBrightness: 'light' | 'dark';
13
+ }