srcdev-nuxt-components 6.1.20 → 6.1.22

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 (38) hide show
  1. package/app/components/accordian/AccordianCore.vue +1 -1
  2. package/app/components/animated-svg-text/AnimatedSvgText.vue +5 -5
  3. package/app/components/carousel-basic/CarouselBasic.vue +1 -1
  4. package/app/components/carousel-basic/CarouselFlip.vue +154 -133
  5. package/app/components/carousel-basic/CarouselInfinite.vue +120 -89
  6. package/app/components/clip-element/ClipElement.vue +18 -28
  7. package/app/components/clipped-panels/ClippedPanel.vue +1 -1
  8. package/app/components/container-glow/ContainerGlowCore.vue +62 -39
  9. package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +1 -1
  10. package/app/components/deep-expanding-menu/DeepExpandingMenuOld.vue +1 -1
  11. package/app/components/display-banner/DisplayBanner.vue +1 -1
  12. package/app/components/display-card/DisplayCard.vue +1 -1
  13. package/app/components/display-details/DisplayDetailsCore.vue +1 -1
  14. package/app/components/display-dialog/DisplayDialogCore.vue +1 -1
  15. package/app/components/display-dialog/variants/DisplayDialogConfirm.vue +2 -2
  16. package/app/components/display-dialog/variants/DisplayDialogScrollableContent.vue +2 -2
  17. package/app/components/display-grid/DisplayGridCore.vue +4 -4
  18. package/app/components/display-prompt/DisplayPromptCore.vue +1 -1
  19. package/app/components/display-prompt/variants/DisplayPromptError.vue +1 -1
  20. package/app/components/display-toast/DisplayToast.vue +99 -63
  21. package/app/components/expanding-panel/ExpandingPanel.vue +1 -1
  22. package/app/components/glowing-border/GlowingBorder.vue +1 -1
  23. package/app/components/image-galleries/SliderGallery.vue +104 -103
  24. package/app/components/layout-grids/LayoutGridA.vue +5 -5
  25. package/app/components/layout-grids/LayoutGridB.vue +10 -10
  26. package/app/components/layout-row/LayoutRow.vue +1 -1
  27. package/app/components/magnetic-navigation/MagneticNavigation.vue +1 -1
  28. package/app/components/masonry-grid/MasonryGrid.vue +12 -8
  29. package/app/components/masonry-grid-ordered/MasonryGridOrdered.vue +1 -1
  30. package/app/components/masonry-grid-sorted/MasonryGridSorted.vue +26 -21
  31. package/app/components/parallax/SectionParallax.vue +1 -1
  32. package/app/components/pop-over/PopOver.vue +4 -4
  33. package/app/components/responsive-header/NavigationItems.vue +1 -1
  34. package/app/components/responsive-header/ResponsiveHeader.vue +1 -1
  35. package/app/components/rotating-carousel/RotatingCarouselImage.vue +1 -1
  36. package/app/components/tabs/TabsCore.vue +41 -20
  37. package/app/composables/useStyleClassPassthrough.ts +19 -22
  38. package/package.json +1 -1
@@ -18,14 +18,14 @@
18
18
  <script setup lang="ts">
19
19
  const props = defineProps({
20
20
  styleClassPassthrough: {
21
- type: Array as PropType<string[]>,
21
+ type: [String, Array] as PropType<string | string[]>,
22
22
  default: () => [],
23
23
  },
24
24
  dataDialogId: {
25
25
  type: String,
26
26
  required: true,
27
27
  },
28
- });
28
+ })
29
29
  </script>
30
30
 
31
31
  <style lang="css">
@@ -18,7 +18,7 @@
18
18
  <script setup lang="ts">
19
19
  const props = defineProps({
20
20
  styleClassPassthrough: {
21
- type: Array as PropType<string[]>,
21
+ type: [String, Array] as PropType<string | string[]>,
22
22
  default: () => [],
23
23
  },
24
24
  allowContentScroll: {
@@ -29,7 +29,7 @@ const props = defineProps({
29
29
  type: String,
30
30
  required: true,
31
31
  },
32
- });
32
+ })
33
33
  </script>
34
34
 
35
35
  <style lang="css">
@@ -11,12 +11,12 @@ const props = defineProps({
11
11
  default: {},
12
12
  },
13
13
  styleClassPassthrough: {
14
- type: Array as PropType<string[]>,
14
+ type: [String, Array] as PropType<string | string[]>,
15
15
  default: () => [],
16
16
  },
17
- });
17
+ })
18
18
 
19
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
19
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
20
20
 
21
- const gridData = toRef(() => props.gridData);
21
+ const gridData = toRef(() => props.gridData)
22
22
  </script>
@@ -51,7 +51,7 @@ const props = defineProps({
51
51
  },
52
52
  },
53
53
  styleClassPassthrough: {
54
- type: Array as PropType<string[]>,
54
+ type: [String, Array] as PropType<string | string[]>,
55
55
  default: () => [],
56
56
  },
57
57
  iconColor: {
@@ -19,7 +19,7 @@ const props = defineProps({
19
19
  default: false,
20
20
  },
21
21
  styleClassPassthrough: {
22
- type: Array as PropType<string[]>,
22
+ type: [String, Array] as PropType<string | string[]>,
23
23
  default: () => [],
24
24
  },
25
25
  })
@@ -5,12 +5,10 @@
5
5
  class="display-toast"
6
6
  :class="[
7
7
  elementClasses,
8
+ cssStateClass,
8
9
  {
9
- [theme]: !slots.default,
10
10
  'has-theme': !slots.default,
11
- show: publicToastState && !isHiding && displayDurationInt === 0,
12
- 'use-timer': displayDurationInt > 0,
13
- hide: isHiding,
11
+ 'auto-dismiss': autoDismiss,
14
12
  },
15
13
  ]"
16
14
  :data-theme="theme"
@@ -25,13 +23,13 @@
25
23
  </div>
26
24
  <div class="toast-message">{{ toastDisplayText }}</div>
27
25
  <div class="toast-action">
28
- <button @click.prevent="closeToast">
26
+ <button @click.prevent="updateToHiding()">
29
27
  <Icon name="material-symbols:close" class="icon" />
30
28
  <span class="sr-only">Close</span>
31
29
  </button>
32
30
  </div>
33
31
  </div>
34
- <div v-if="displayDurationInt > 0" @transitionend="closeToast()" class="display-toast-progress"></div>
32
+ <div v-if="autoDismiss" class="display-toast-progress"></div>
35
33
  </div>
36
34
  </Teleport>
37
35
  </template>
@@ -46,7 +44,11 @@ const props = defineProps({
46
44
  },
47
45
  revealDuration: {
48
46
  type: Number,
49
- default: 3000,
47
+ default: 550,
48
+ },
49
+ autoDismiss: {
50
+ type: Boolean,
51
+ default: true,
50
52
  },
51
53
  duration: {
52
54
  type: Number,
@@ -57,7 +59,7 @@ const props = defineProps({
57
59
  default: "",
58
60
  },
59
61
  styleClassPassthrough: {
60
- type: Array as PropType<string[]>,
62
+ type: [String, Array] as PropType<string | string[]>,
61
63
  default: () => [],
62
64
  },
63
65
  })
@@ -76,10 +78,18 @@ const defaultThemeIcons = {
76
78
  const slots = useSlots()
77
79
  const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
78
80
 
79
- const privateToastState = ref(false)
80
- const isHiding = ref(false)
81
+ // single state ref
82
+ const state = ref<"idle" | "entering" | "visible" | "hiding">("idle")
83
+ const cssStateClass = computed(() => {
84
+ return state.value !== "idle" && !props.autoDismiss ? state.value : ""
85
+ })
86
+
87
+ // external toggle
81
88
  const publicToastState = defineModel<boolean>({ default: false })
82
89
 
90
+ // computed helpers
91
+ const privateToastState = ref(false)
92
+
83
93
  const revealDurationInt = computed(() => props.revealDuration)
84
94
  const revealDuration = computed(() => revealDurationInt.value + "ms")
85
95
  const displayDurationInt = computed(() => props.duration)
@@ -88,16 +98,28 @@ const displayDuration = computed(() => displayDurationInt.value + "ms")
88
98
  const progressDurationInt = computed(() => Math.floor(displayDurationInt.value - revealDurationInt.value / 2))
89
99
  const progressDuration = computed(() => progressDurationInt.value + "ms")
90
100
 
91
- const sendCloseEvent = () => {
101
+ const removeToast = () => {
92
102
  publicToastState.value = false
93
103
  privateToastState.value = false
94
- isHiding.value = false
95
104
  }
96
105
 
97
- const closeToast = async () => {
98
- isHiding.value = true
106
+ const updateToIdle = () => {
107
+ state.value = "idle"
108
+ removeToast()
109
+ }
110
+ const updateToEntering = async () => {
111
+ privateToastState.value = true
112
+ state.value = "entering"
113
+ await useSleep(revealDurationInt.value)
114
+ updateToVisible()
115
+ }
116
+ const updateToVisible = () => {
117
+ state.value = "visible"
118
+ }
119
+ const updateToHiding = async () => {
120
+ state.value = "hiding"
99
121
  await useSleep(revealDurationInt.value)
100
- sendCloseEvent()
122
+ updateToIdle()
101
123
  }
102
124
 
103
125
  watch(
@@ -110,22 +132,52 @@ watch(
110
132
  watch(
111
133
  () => publicToastState.value,
112
134
  async (newValue, previousValue) => {
113
- if (!previousValue && newValue) {
114
- privateToastState.value = true
135
+ if (props.autoDismiss) {
136
+ privateToastState.value = newValue
137
+ await useSleep(displayDurationInt.value)
138
+ updateToIdle()
139
+ return
140
+ }
115
141
 
116
- if (newValue && displayDurationInt.value > 0) {
117
- await useSleep(displayDurationInt.value)
118
- sendCloseEvent()
119
- }
120
- } else if (previousValue && !newValue) {
121
- closeToast()
142
+ if (!previousValue && newValue && state.value === "idle") {
143
+ updateToEntering()
144
+ }
145
+
146
+ if (previousValue && !newValue && state.value == "visible") {
147
+ updateToHiding()
122
148
  }
123
149
  }
124
150
  )
125
151
  </script>
126
152
 
127
153
  <style scoped lang="css">
128
- @keyframes fade-in {
154
+ @keyframes slide-in {
155
+ from {
156
+ opacity: 0;
157
+ visibility: hidden;
158
+ transform: translateY(20px);
159
+ }
160
+ to {
161
+ opacity: 1;
162
+ visibility: visible;
163
+ transform: translateY(0);
164
+ }
165
+ }
166
+
167
+ @keyframes slide-out {
168
+ from {
169
+ opacity: 1;
170
+ visibility: visible;
171
+ transform: translateY(0);
172
+ }
173
+ to {
174
+ opacity: 0;
175
+ visibility: hidden;
176
+ transform: translateY(20px);
177
+ }
178
+ }
179
+
180
+ @keyframes slide-in-out {
129
181
  5% {
130
182
  opacity: 1;
131
183
  visibility: visible;
@@ -174,48 +226,29 @@ watch(
174
226
 
175
227
  z-index: 100;
176
228
 
177
- &.use-timer {
178
- animation: fade-in v-bind(displayDuration) linear;
229
+ &.auto-dismiss {
230
+ /* first run slide-in, then slide-out after a delay */
231
+ animation: slide-in 400ms var(--spring-in-easing) forwards,
232
+ slide-out 400ms var(--spring-out-easing) forwards v-bind(displayDuration);
179
233
  }
180
234
 
181
- &.show {
182
- animation: show v-bind(revealDuration)
183
- linear(
184
- 0,
185
- 0.029 1.6%,
186
- 0.123 3.5%,
187
- 0.651 10.6%,
188
- 0.862 14.1%,
189
- 1.002 17.7%,
190
- 1.046 19.6%,
191
- 1.074 21.6%,
192
- 1.087 23.9%,
193
- 1.086 26.6%,
194
- 1.014 38.5%,
195
- 0.994 46.3%,
196
- 1
197
- )
198
- forwards;
199
- }
235
+ &:not(&.auto-dismiss) {
236
+ &.show,
237
+ &.entering {
238
+ animation: show v-bind(revealDuration) var(--spring-easing) forwards;
239
+ }
240
+
241
+ &.visible {
242
+ /* if you want a steady state style, add here */
243
+ opacity: 1;
244
+ visibility: visible;
245
+ transform: translateY(0);
246
+ }
200
247
 
201
- &.hide {
202
- animation: hide v-bind(revealDuration)
203
- linear(
204
- 0,
205
- 0.006 53.7%,
206
- 0.986 61.5%,
207
- 1.014 73.4%,
208
- 1.087 76.1%,
209
- 1.074 78.4%,
210
- 1.046 80.4%,
211
- 1.002 82.3%,
212
- 0.862 85.9%,
213
- 0.651 89.4%,
214
- 0.123 96.5%,
215
- 0.029 98.4%,
216
- 0
217
- )
218
- forwards;
248
+ &.hide,
249
+ &.hiding {
250
+ animation: hide v-bind(revealDuration) var(--spring-easing) forwards;
251
+ }
219
252
  }
220
253
 
221
254
  &:hover {
@@ -264,6 +297,9 @@ watch(
264
297
  border: 0.1rem solid var(--colour-theme-8);
265
298
  border-start-start-radius: 8px;
266
299
  border-end-start-radius: 8px;
300
+ border-start-end-radius: 4px;
301
+ border-end-end-radius: 4px;
302
+
267
303
  overflow: hidden;
268
304
 
269
305
  .display-toast-inner {
@@ -51,7 +51,7 @@ const props = defineProps({
51
51
  default: false,
52
52
  },
53
53
  styleClassPassthrough: {
54
- type: Array as PropType<string[]>,
54
+ type: [String, Array] as PropType<string | string[]>,
55
55
  default: () => [],
56
56
  },
57
57
  })
@@ -34,7 +34,7 @@ const props = defineProps({
34
34
  },
35
35
  },
36
36
  styleClassPassthrough: {
37
- type: Array as PropType<string[]>,
37
+ type: [String, Array] as PropType<string | string[]>,
38
38
  default: () => [],
39
39
  },
40
40
  })
@@ -13,8 +13,9 @@
13
13
  <div v-show="item.stylist !== ''" class="author" :class="item.textBrightness">{{ item.stylist }}</div>
14
14
  <div v-show="item.title !== ''" class="title" :class="item.textBrightness">{{ item.title }}</div>
15
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>
16
+ <div v-show="item.description !== ''" class="description" :class="item.textBrightness">
17
+ {{ item.description }}
18
+ </div>
18
19
  <div class="buttons" :class="item.textBrightness">
19
20
  <button>SEE MORE</button>
20
21
  </div>
@@ -27,10 +28,11 @@
27
28
  <div class="inner">
28
29
  <NuxtImg :src="item.src" :alt="item.alt" />
29
30
  <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 }}
31
+ <div v-show="item.thumbnail?.title !== ''" class="title" :class="item.textBrightness">
32
+ {{ item.thumbnail?.title }}
33
+ </div>
34
+ <div v-show="item.thumbnail?.description !== ''" class="description" :class="item.textBrightness">
35
+ {{ item.thumbnail?.description }}
34
36
  </div>
35
37
  </div>
36
38
  </div>
@@ -52,7 +54,7 @@
52
54
  </template>
53
55
 
54
56
  <script setup lang="ts">
55
- import { type IGalleryData } from '@/types/gallery-data';
57
+ import { type IGalleryData } from "@/types/gallery-data"
56
58
 
57
59
  const props = defineProps({
58
60
  autoRun: {
@@ -68,198 +70,197 @@ const props = defineProps({
68
70
  default: 3000,
69
71
  },
70
72
  styleClassPassthrough: {
71
- type: Array as PropType<string[]>,
73
+ type: [String, Array] as PropType<string | string[]>,
72
74
  default: () => [],
73
75
  },
74
- });
76
+ })
75
77
 
76
- const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
77
- const galleryData = defineModel<IGalleryData[]>('galleryData');
78
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
79
+ const galleryData = defineModel<IGalleryData[]>("galleryData")
78
80
 
79
- const sliderGalleryWrapper = useTemplateRef('sliderGalleryWrapper');
80
- const sliderGalleryImagesList = useTemplateRef('sliderGalleryImagesList');
81
- const sliderGalleryThumbnailsList = useTemplateRef('sliderGalleryThumbnailsList');
81
+ const sliderGalleryWrapper = useTemplateRef("sliderGalleryWrapper")
82
+ const sliderGalleryImagesList = useTemplateRef("sliderGalleryImagesList")
83
+ const sliderGalleryThumbnailsList = useTemplateRef("sliderGalleryThumbnailsList")
82
84
 
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>>([]);
85
+ const transitionRunning = ref(false)
86
+ const galleryLoaded = ref(true)
87
+ const showGallery = ref(false)
88
+ const loadedImages = ref<Set<number>>(new Set())
89
+ const preloadedImages = ref<Array<HTMLImageElement>>([])
88
90
 
89
91
  onMounted(async () => {
90
- await nextTick();
92
+ await nextTick()
91
93
 
92
94
  // If no images or galleryData is empty, stop loading
93
95
  if (!galleryData.value || galleryData.value.length === 0) {
94
- galleryLoaded.value = false;
95
- return;
96
+ galleryLoaded.value = false
97
+ return
96
98
  }
97
99
 
98
100
  // Create an array to hold image loading promises
99
- const imageLoadPromises: Promise<void>[] = [];
101
+ const imageLoadPromises: Promise<void>[] = []
100
102
 
101
103
  // Preload the first image at minimum
102
- const firstImageIndex = 0;
104
+ const firstImageIndex = 0
103
105
  if (galleryData.value[firstImageIndex]) {
104
- const img = new Image();
105
- img.src = galleryData.value[firstImageIndex].src;
106
+ const img = new Image()
107
+ img.src = galleryData.value[firstImageIndex].src
106
108
 
107
109
  const promise = new Promise<void>((resolve) => {
108
110
  img.onload = () => {
109
- loadedImages.value.add(firstImageIndex);
110
- resolve();
111
- };
111
+ loadedImages.value.add(firstImageIndex)
112
+ resolve()
113
+ }
112
114
  img.onerror = () => {
113
- loadedImages.value.add(firstImageIndex); // Count as loaded anyway
114
- resolve();
115
- };
116
- });
115
+ loadedImages.value.add(firstImageIndex) // Count as loaded anyway
116
+ resolve()
117
+ }
118
+ })
117
119
 
118
- imageLoadPromises.push(promise);
119
- preloadedImages.value.push(img);
120
+ imageLoadPromises.push(promise)
121
+ preloadedImages.value.push(img)
120
122
  }
121
123
 
122
124
  // Wait for at least the first image to load
123
- await Promise.race(imageLoadPromises);
125
+ await Promise.race(imageLoadPromises)
124
126
 
125
127
  setTimeout(() => {
126
- galleryLoaded.value = false;
127
- }, 500);
128
+ galleryLoaded.value = false
129
+ }, 500)
128
130
 
129
- showGallery.value = true;
130
- window.addEventListener('keydown', handleKeyDown);
131
- });
131
+ showGallery.value = true
132
+ window.addEventListener("keydown", handleKeyDown)
133
+ })
132
134
 
133
135
  const handleImageLoad = (index: number) => {
134
- loadedImages.value.add(index);
135
- };
136
+ loadedImages.value.add(index)
137
+ }
136
138
 
137
139
  const handleImageError = (index: number) => {
138
- loadedImages.value.add(index);
139
- };
140
+ loadedImages.value.add(index)
141
+ }
140
142
 
141
143
  const doNext = () => {
142
- if (transitionRunning.value) return;
143
- showSlider('next');
144
- };
144
+ if (transitionRunning.value) return
145
+ showSlider("next")
146
+ }
145
147
 
146
148
  const doPrevious = () => {
147
- if (transitionRunning.value) return;
148
- showSlider('prev');
149
- };
149
+ if (transitionRunning.value) return
150
+ showSlider("prev")
151
+ }
150
152
 
151
- let runTimeOut: any;
152
- let runNextAuto: any = null;
153
+ let runTimeOut: any
154
+ let runNextAuto: any = null
153
155
 
154
156
  function showSlider(type: string) {
155
- transitionRunning.value = true;
157
+ transitionRunning.value = true
156
158
 
157
- const currentSliderItems = Array.from(sliderGalleryImagesList.value?.children || []);
158
- const currentThumbnailItems = Array.from(sliderGalleryThumbnailsList.value?.children || []);
159
+ const currentSliderItems = Array.from(sliderGalleryImagesList.value?.children || [])
160
+ const currentThumbnailItems = Array.from(sliderGalleryThumbnailsList.value?.children || [])
159
161
 
160
- if (type === 'next') {
162
+ if (type === "next") {
161
163
  if (currentSliderItems.length) {
162
- const firstItem = currentSliderItems[0];
164
+ const firstItem = currentSliderItems[0]
163
165
  if (firstItem) {
164
- sliderGalleryImagesList.value?.appendChild(firstItem);
166
+ sliderGalleryImagesList.value?.appendChild(firstItem)
165
167
  }
166
168
  }
167
169
 
168
170
  if (currentThumbnailItems.length) {
169
- const firstThumb = currentThumbnailItems[0];
171
+ const firstThumb = currentThumbnailItems[0]
170
172
  if (firstThumb) {
171
- sliderGalleryThumbnailsList.value?.appendChild(firstThumb);
173
+ sliderGalleryThumbnailsList.value?.appendChild(firstThumb)
172
174
  }
173
175
  }
174
176
 
175
- sliderGalleryWrapper.value?.classList.add('next');
177
+ sliderGalleryWrapper.value?.classList.add("next")
176
178
  } else {
177
179
  if (currentSliderItems.length) {
178
- const lastItem = currentSliderItems[currentSliderItems.length - 1];
180
+ const lastItem = currentSliderItems[currentSliderItems.length - 1]
179
181
  if (lastItem) {
180
- lastItem.classList.add('prepend-item');
181
- sliderGalleryImagesList.value?.prepend(lastItem);
182
+ lastItem.classList.add("prepend-item")
183
+ sliderGalleryImagesList.value?.prepend(lastItem)
182
184
  }
183
185
  }
184
186
 
185
187
  if (currentThumbnailItems.length) {
186
- const lastThumb = currentThumbnailItems[currentThumbnailItems.length - 1];
188
+ const lastThumb = currentThumbnailItems[currentThumbnailItems.length - 1]
187
189
  if (lastThumb) {
188
- lastThumb.classList.add('prepend-item');
189
- sliderGalleryThumbnailsList.value?.prepend(lastThumb);
190
+ lastThumb.classList.add("prepend-item")
191
+ sliderGalleryThumbnailsList.value?.prepend(lastThumb)
190
192
  }
191
193
  }
192
194
 
193
- sliderGalleryWrapper.value?.offsetWidth; // Force reflow
194
- sliderGalleryWrapper.value?.classList.add('prev');
195
+ sliderGalleryWrapper.value?.offsetWidth // Force reflow
196
+ sliderGalleryWrapper.value?.classList.add("prev")
195
197
  }
196
198
 
197
- clearTimeout(runTimeOut);
199
+ clearTimeout(runTimeOut)
198
200
  runTimeOut = setTimeout(() => {
199
-
200
201
  if (sliderGalleryWrapper.value) {
201
- sliderGalleryWrapper.value.classList.remove('next');
202
- sliderGalleryWrapper.value.classList.remove('prev');
202
+ sliderGalleryWrapper.value.classList.remove("next")
203
+ sliderGalleryWrapper.value.classList.remove("prev")
203
204
 
204
- const items = sliderGalleryImagesList.value?.querySelectorAll('.prepend-item');
205
- items?.forEach((item) => item.classList.remove('prepend-item'));
205
+ const items = sliderGalleryImagesList.value?.querySelectorAll(".prepend-item")
206
+ items?.forEach((item) => item.classList.remove("prepend-item"))
206
207
 
207
- const thumbs = sliderGalleryThumbnailsList.value?.querySelectorAll('.prepend-item');
208
- thumbs?.forEach((thumb) => thumb.classList.remove('prepend-item'));
208
+ const thumbs = sliderGalleryThumbnailsList.value?.querySelectorAll(".prepend-item")
209
+ thumbs?.forEach((thumb) => thumb.classList.remove("prepend-item"))
209
210
  }
210
- transitionRunning.value = false;
211
- }, props.animationDuration);
211
+ transitionRunning.value = false
212
+ }, props.animationDuration)
212
213
 
213
214
  // Reset auto-run timer
214
- clearTimeout(runNextAuto);
215
+ clearTimeout(runNextAuto)
215
216
  runNextAuto = setTimeout(() => {
216
- if (!props.autoRun || galleryLoaded.value) return;
217
- doNext();
218
- }, props.autoRunInterval);
217
+ if (!props.autoRun || galleryLoaded.value) return
218
+ doNext()
219
+ }, props.autoRunInterval)
219
220
  }
220
221
 
221
222
  // Add keyboard navigation event handlers
222
223
  const handleKeyDown = (event: KeyboardEvent) => {
223
224
  // Don't process key events if transition is running or gallery isn't loaded
224
225
  if (transitionRunning.value || galleryLoaded.value) {
225
- return;
226
+ return
226
227
  }
227
228
 
228
- if (event.key === 'ArrowLeft') {
229
- doPrevious();
230
- } else if (event.key === 'ArrowRight') {
231
- doNext();
229
+ if (event.key === "ArrowLeft") {
230
+ doPrevious()
231
+ } else if (event.key === "ArrowRight") {
232
+ doNext()
232
233
  }
233
- };
234
+ }
234
235
 
235
236
  // Initialize auto-run only after loading completes
236
237
  watch(galleryLoaded, (previousValue, currentValue) => {
237
238
  if (!currentValue && props.autoRun) {
238
- clearTimeout(runNextAuto);
239
+ clearTimeout(runNextAuto)
239
240
  runNextAuto = setTimeout(() => {
240
- doNext();
241
- }, props.autoRunInterval);
241
+ doNext()
242
+ }, props.autoRunInterval)
242
243
  }
243
- });
244
+ })
244
245
 
245
246
  watch(
246
247
  () => props.styleClassPassthrough,
247
248
  () => {
248
- resetElementClasses(props.styleClassPassthrough);
249
+ resetElementClasses(props.styleClassPassthrough)
249
250
  }
250
- );
251
+ )
251
252
 
252
253
  onBeforeUnmount(() => {
253
- showGallery.value = false;
254
- clearTimeout(runTimeOut);
255
- clearTimeout(runNextAuto);
256
- window.removeEventListener('keydown', handleKeyDown);
257
- });
254
+ showGallery.value = false
255
+ clearTimeout(runTimeOut)
256
+ clearTimeout(runNextAuto)
257
+ window.removeEventListener("keydown", handleKeyDown)
258
+ })
258
259
  </script>
259
260
 
260
261
  <style lang="css">
261
262
  .slider-gallery {
262
- --_animationDuration: v-bind(animationDuration + 'ms');
263
+ --_animationDuration: v-bind(animationDuration + "ms");
263
264
 
264
265
  --_thumbnailAspectRatio: 150 /220;
265
266
 
@@ -498,7 +499,7 @@ onBeforeUnmount(() => {
498
499
  }
499
500
  &.dark {
500
501
  color: #000;
501
- }
502
+ }
502
503
  }
503
504
 
504
505
  .description {