srcdev-nuxt-components 6.1.21 → 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 +1 -1
  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
@@ -1,5 +1,10 @@
1
1
  <template>
2
- <div class="masonry-grid-wrapper" :class="[elementClasses]" :style="`--_masonry-grid-gap: ${gap}${unit}; --_item-min-width: ${itemMinWidth}px`" ref="gridWrapper">
2
+ <div
3
+ class="masonry-grid-wrapper"
4
+ :class="[elementClasses]"
5
+ :style="`--_masonry-grid-gap: ${gap}${unit}; --_item-min-width: ${itemMinWidth}px`"
6
+ ref="gridWrapper"
7
+ >
3
8
  <template v-for="item in rearrangedItems" :key="item.id">
4
9
  <div class="masonry-grid-item">
5
10
  <slot :name="item.id"></slot>
@@ -9,7 +14,7 @@
9
14
  </template>
10
15
 
11
16
  <script setup lang="ts">
12
- import { useResizeObserver } from '@vueuse/core';
17
+ import { useResizeObserver } from "@vueuse/core"
13
18
 
14
19
  const props = defineProps({
15
20
  gridData: {
@@ -26,46 +31,46 @@ const props = defineProps({
26
31
  },
27
32
  unit: {
28
33
  type: String,
29
- default: 'rem',
34
+ default: "rem",
30
35
  },
31
36
  styleClassPassthrough: {
32
- type: Array as PropType<string[]>,
37
+ type: [String, Array] as PropType<string | string[]>,
33
38
  default: () => [],
34
39
  },
35
- });
40
+ })
36
41
 
37
- const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
42
+ const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
38
43
 
39
- const gridData = toRef(() => props.gridData);
44
+ const gridData = toRef(() => props.gridData)
40
45
 
41
- const gridWrapper = ref<HTMLDivElement>();
46
+ const gridWrapper = ref<HTMLDivElement>()
42
47
 
43
48
  const getColumnCountWithinGridWrapper = () => {
44
- return gridWrapper.value ? Math.floor(gridWrapper.value.clientWidth / props.itemMinWidth) : 0;
45
- };
49
+ return gridWrapper.value ? Math.floor(gridWrapper.value.clientWidth / props.itemMinWidth) : 0
50
+ }
46
51
 
47
52
  // const columns = ref(4);
48
53
  const columns = computed(() => {
49
- return gridWrapper.value ? Math.floor(gridWrapper.value.clientWidth / props.itemMinWidth) : 0;
50
- });
54
+ return gridWrapper.value ? Math.floor(gridWrapper.value.clientWidth / props.itemMinWidth) : 0
55
+ })
51
56
 
52
57
  const rearrangeArray = (items: any[], columns: number): any[] => {
53
- const rows = Math.ceil(items.length / columns);
54
- const rearrangedArray = [];
58
+ const rows = Math.ceil(items.length / columns)
59
+ const rearrangedArray = []
55
60
 
56
61
  for (let col = 0; col < columns; col++) {
57
62
  for (let row = 0; row < rows; row++) {
58
- const index = row * columns + col;
63
+ const index = row * columns + col
59
64
  if (index < items.length) {
60
- rearrangedArray.push(items[index]);
65
+ rearrangedArray.push(items[index])
61
66
  }
62
67
  }
63
68
  }
64
69
 
65
- return rearrangedArray;
66
- };
70
+ return rearrangedArray
71
+ }
67
72
 
68
- const rearrangedItems = computed(() => rearrangeArray(props.gridData, columns.value));
73
+ const rearrangedItems = computed(() => rearrangeArray(props.gridData, columns.value))
69
74
  // const rearrangedItems = computed(() => {
70
75
  // const rows = Math.ceil(props.gridData.length / columns.value);
71
76
  // const rearrangedArray = [];
@@ -85,9 +90,9 @@ const rearrangedItems = computed(() => rearrangeArray(props.gridData, columns.va
85
90
  watch(
86
91
  () => props.styleClassPassthrough,
87
92
  () => {
88
- resetElementClasses(props.styleClassPassthrough);
93
+ resetElementClasses(props.styleClassPassthrough)
89
94
  }
90
- );
95
+ )
91
96
 
92
97
  // onMounted(() => {
93
98
  // console.log(getColumnCountWithinGridWrapper());
@@ -17,7 +17,7 @@ const props = defineProps({
17
17
  type: String,
18
18
  },
19
19
  styleClassPassthrough: {
20
- type: Array as PropType<string[]>,
20
+ type: [String, Array] as PropType<string | string[]>,
21
21
  default: () => [],
22
22
  },
23
23
  })
@@ -18,14 +18,14 @@ const props = defineProps({
18
18
  required: true,
19
19
  },
20
20
  styleClassPassthrough: {
21
- type: Array as PropType<string[]>,
21
+ type: [String, Array] as PropType<string | string[]>,
22
22
  default: () => [],
23
23
  },
24
- });
24
+ })
25
25
 
26
- const anchorName = `--anchor-${useId()}`;
26
+ const anchorName = `--anchor-${useId()}`
27
27
 
28
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
28
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
29
29
  </script>
30
30
 
31
31
  <style scoped lang="css">
@@ -87,7 +87,7 @@ const props = defineProps({
87
87
  default: () => [],
88
88
  },
89
89
  styleClassPassthrough: {
90
- type: Array as PropType<string[]>,
90
+ type: [String, Array] as PropType<string | string[]>,
91
91
  default: () => [],
92
92
  },
93
93
  })
@@ -145,7 +145,7 @@ const props = defineProps({
145
145
  default: false,
146
146
  },
147
147
  styleClassPassthrough: {
148
- type: Array as PropType<string[]>,
148
+ type: [String, Array] as PropType<string | string[]>,
149
149
  default: () => [],
150
150
  },
151
151
  allowExpandOnGesture: {
@@ -70,7 +70,7 @@ const props = defineProps({
70
70
  default: true,
71
71
  },
72
72
  styleClassPassthrough: {
73
- type: Array as PropType<string[]>,
73
+ type: [String, Array] as PropType<string | string[]>,
74
74
  default: () => [],
75
75
  },
76
76
  })
@@ -1,6 +1,13 @@
1
1
  <template>
2
2
  <div class="tabs-core" :class="`axis-${axis}`">
3
- <ul role="tablist" aria-labelledby="channel-name" ref="tabsNavRef" @mouseleave="resetHoverToActivePosition()" class="tabs-list" :class="[elementClasses]">
3
+ <ul
4
+ role="tablist"
5
+ aria-labelledby="channel-name"
6
+ ref="tabsNavRef"
7
+ @mouseleave="resetHoverToActivePosition()"
8
+ class="tabs-list"
9
+ :class="[elementClasses]"
10
+ >
4
11
  <li v-for="(index, key) in itemCount" :key="key">
5
12
  <button
6
13
  @click.prevent="navItemClicked($event)"
@@ -17,7 +24,16 @@
17
24
  </li>
18
25
  </ul>
19
26
  <div class="tab-content-wrapper">
20
- <div v-for="(item, key) in itemCount" :key="key" class="tab-content" :aria-labelledby="`tab-${key}-trigger`" :id="`tab-${key}-content`" role="region" aria-hidden="true" ref="tabsContentRefs">
27
+ <div
28
+ v-for="(item, key) in itemCount"
29
+ :key="key"
30
+ class="tab-content"
31
+ :aria-labelledby="`tab-${key}-trigger`"
32
+ :id="`tab-${key}-content`"
33
+ role="region"
34
+ aria-hidden="true"
35
+ ref="tabsContentRefs"
36
+ >
21
37
  <slot :name="`tab-${key}-content`"></slot>
22
38
  </div>
23
39
  </div>
@@ -28,11 +44,11 @@
28
44
  const props = defineProps({
29
45
  tag: {
30
46
  type: String as PropType<string>,
31
- default: 'button',
47
+ default: "button",
32
48
  },
33
49
  axis: {
34
- type: String as PropType<'x' | 'y'>,
35
- default: 'x',
50
+ type: String as PropType<"x" | "y">,
51
+ default: "x",
36
52
  },
37
53
  transitionDuration: {
38
54
  type: Number as PropType<number>,
@@ -55,21 +71,26 @@ const props = defineProps({
55
71
  default: true,
56
72
  },
57
73
  styleClassPassthrough: {
58
- type: Array as PropType<string[]>,
74
+ type: [String, Array] as PropType<string | string[]>,
59
75
  default: () => [],
60
76
  },
61
- });
77
+ })
62
78
 
63
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
79
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
64
80
 
65
- const tabsNavRef = ref<HTMLElement | null>(null);
66
- const tabsContentRefs = ref<HTMLElement[] | null>(null);
81
+ const tabsNavRef = ref<HTMLElement | null>(null)
82
+ const tabsContentRefs = ref<HTMLElement[] | null>(null)
67
83
 
68
- const { initNavDecorators, navItemClicked, navItemHovered, resetHoverToActivePosition } = useTabs(props.axis, tabsNavRef, tabsContentRefs, props.transitionDuration);
84
+ const { initNavDecorators, navItemClicked, navItemHovered, resetHoverToActivePosition } = useTabs(
85
+ props.axis,
86
+ tabsNavRef,
87
+ tabsContentRefs,
88
+ props.transitionDuration
89
+ )
69
90
 
70
91
  onMounted(() => {
71
- initNavDecorators();
72
- });
92
+ initNavDecorators()
93
+ })
73
94
  </script>
74
95
 
75
96
  <style lang="css">
@@ -85,7 +106,7 @@ onMounted(() => {
85
106
  padding: 0;
86
107
 
87
108
  .nav__hovered {
88
- content: '';
109
+ content: "";
89
110
  position: absolute;
90
111
  left: 0;
91
112
  right: 0;
@@ -99,7 +120,7 @@ onMounted(() => {
99
120
  }
100
121
 
101
122
  .nav__active {
102
- content: '';
123
+ content: "";
103
124
  position: absolute;
104
125
  left: 0;
105
126
  right: 0;
@@ -113,7 +134,7 @@ onMounted(() => {
113
134
  }
114
135
 
115
136
  .nav__active-indicator {
116
- content: '';
137
+ content: "";
117
138
  position: absolute;
118
139
  left: 0;
119
140
  right: 0;
@@ -135,7 +156,7 @@ onMounted(() => {
135
156
  opacity: 1;
136
157
  }
137
158
 
138
- &[aria-selected='true'] {
159
+ &[aria-selected="true"] {
139
160
  opacity: 1;
140
161
  }
141
162
  }
@@ -172,7 +193,7 @@ onMounted(() => {
172
193
  color: light-dark(var(--gray-0), var(--gray-12));
173
194
  }
174
195
 
175
- &[aria-selected='true'] {
196
+ &[aria-selected="true"] {
176
197
  color: light-dark(var(--gray-0), var(--gray-12));
177
198
  }
178
199
 
@@ -184,7 +205,7 @@ onMounted(() => {
184
205
 
185
206
  .tab-content-wrapper {
186
207
  display: grid;
187
- grid-template-areas: 'element-stack';
208
+ grid-template-areas: "element-stack";
188
209
 
189
210
  background-color: light-dark(var(--gray-9), var(--gray-10));
190
211
  border: 0.1rem solid var(--gray-6);
@@ -226,7 +247,7 @@ onMounted(() => {
226
247
  /* color: light-dark(var(--gray-0), var(--gray-12)); */
227
248
  }
228
249
 
229
- &[aria-selected='true'] {
250
+ &[aria-selected="true"] {
230
251
  /* color: var(--_tabs-active-text); */
231
252
  }
232
253
 
@@ -1,35 +1,32 @@
1
- export const useStyleClassPassthrough = (styleClassPassthrough: string[]) => {
2
- const styleClassPassthroughRef = ref(styleClassPassthrough);
1
+ export const useStyleClassPassthrough = (styleClassPassthrough: string | string[]) => {
2
+ // Normalize initial value to an array
3
+ const normalize = (input: string | string[]): string[] =>
4
+ Array.isArray(input) ? input : input.split(/\s+/).filter(Boolean)
3
5
 
4
- const elementClasses = computed(() => {
5
- return styleClassPassthroughRef.value.join(' ');
6
- });
6
+ const styleClassPassthroughRef = ref<string[]>(normalize(styleClassPassthrough))
7
+
8
+ const elementClasses = computed(() => styleClassPassthroughRef.value.join(" "))
7
9
 
8
10
  const updateElementClasses = (cssClass: string | string[]) => {
9
- let cssClasses = [] as string[];
10
- if (typeof cssClass === 'string') {
11
- cssClasses = [cssClass];
12
- } else if (Array.isArray(cssClass)) {
13
- cssClasses = cssClass;
14
- }
11
+ const cssClasses = Array.isArray(cssClass) ? cssClass : [cssClass]
15
12
 
16
- cssClasses.forEach((cssClass) => {
17
- if (styleClassPassthroughRef.value.includes(cssClass)) {
18
- styleClassPassthroughRef.value = styleClassPassthroughRef.value.filter((className) => className !== cssClass);
13
+ cssClasses.forEach((cls) => {
14
+ if (styleClassPassthroughRef.value.includes(cls)) {
15
+ styleClassPassthroughRef.value = styleClassPassthroughRef.value.filter((c) => c !== cls)
19
16
  } else {
20
- styleClassPassthroughRef.value.push(cssClass);
17
+ styleClassPassthroughRef.value.push(cls)
21
18
  }
22
- });
23
- };
19
+ })
20
+ }
24
21
 
25
- const resetElementClasses = (propsClasses: string[]) => {
26
- styleClassPassthroughRef.value = propsClasses;
27
- };
22
+ const resetElementClasses = (propsClasses: string | string[]) => {
23
+ styleClassPassthroughRef.value = normalize(propsClasses)
24
+ }
28
25
 
29
26
  return {
30
27
  elementClasses,
31
28
  updateElementClasses,
32
29
  resetElementClasses,
33
30
  styleClassPassthroughRef,
34
- };
35
- };
31
+ }
32
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-components",
3
3
  "type": "module",
4
- "version": "6.1.21",
4
+ "version": "6.1.22",
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",