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.
- package/app/components/accordian/AccordianCore.vue +1 -1
- package/app/components/animated-svg-text/AnimatedSvgText.vue +5 -5
- package/app/components/carousel-basic/CarouselBasic.vue +1 -1
- package/app/components/carousel-basic/CarouselFlip.vue +154 -133
- package/app/components/carousel-basic/CarouselInfinite.vue +120 -89
- package/app/components/clip-element/ClipElement.vue +18 -28
- package/app/components/clipped-panels/ClippedPanel.vue +1 -1
- package/app/components/container-glow/ContainerGlowCore.vue +62 -39
- package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +1 -1
- package/app/components/deep-expanding-menu/DeepExpandingMenuOld.vue +1 -1
- package/app/components/display-banner/DisplayBanner.vue +1 -1
- package/app/components/display-card/DisplayCard.vue +1 -1
- package/app/components/display-details/DisplayDetailsCore.vue +1 -1
- package/app/components/display-dialog/DisplayDialogCore.vue +1 -1
- package/app/components/display-dialog/variants/DisplayDialogConfirm.vue +2 -2
- package/app/components/display-dialog/variants/DisplayDialogScrollableContent.vue +2 -2
- package/app/components/display-grid/DisplayGridCore.vue +4 -4
- package/app/components/display-prompt/DisplayPromptCore.vue +1 -1
- package/app/components/display-prompt/variants/DisplayPromptError.vue +1 -1
- package/app/components/display-toast/DisplayToast.vue +99 -63
- package/app/components/expanding-panel/ExpandingPanel.vue +1 -1
- package/app/components/glowing-border/GlowingBorder.vue +1 -1
- package/app/components/image-galleries/SliderGallery.vue +104 -103
- package/app/components/layout-grids/LayoutGridA.vue +5 -5
- package/app/components/layout-grids/LayoutGridB.vue +10 -10
- package/app/components/layout-row/LayoutRow.vue +1 -1
- package/app/components/magnetic-navigation/MagneticNavigation.vue +1 -1
- package/app/components/masonry-grid/MasonryGrid.vue +12 -8
- package/app/components/masonry-grid-ordered/MasonryGridOrdered.vue +1 -1
- package/app/components/masonry-grid-sorted/MasonryGridSorted.vue +26 -21
- package/app/components/parallax/SectionParallax.vue +1 -1
- package/app/components/pop-over/PopOver.vue +4 -4
- package/app/components/responsive-header/NavigationItems.vue +1 -1
- package/app/components/responsive-header/ResponsiveHeader.vue +1 -1
- package/app/components/rotating-carousel/RotatingCarouselImage.vue +1 -1
- package/app/components/tabs/TabsCore.vue +41 -20
- package/app/composables/useStyleClassPassthrough.ts +19 -22
- package/package.json +1 -1
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
21
|
const props = defineProps({
|
|
22
22
|
styleClassPassthrough: {
|
|
23
|
-
type: Array as PropType<string[]>,
|
|
23
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
24
24
|
default: () => [],
|
|
25
25
|
},
|
|
26
|
-
})
|
|
26
|
+
})
|
|
27
27
|
|
|
28
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
28
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
29
29
|
|
|
30
30
|
watch(
|
|
31
31
|
() => props.styleClassPassthrough,
|
|
32
32
|
() => {
|
|
33
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
33
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
34
34
|
}
|
|
35
|
-
)
|
|
35
|
+
)
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<style lang="css">
|
|
@@ -40,19 +40,19 @@ const props = defineProps({
|
|
|
40
40
|
default: 4,
|
|
41
41
|
},
|
|
42
42
|
styleClassPassthrough: {
|
|
43
|
-
type: Array as PropType<string[]>,
|
|
43
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
44
44
|
default: () => [],
|
|
45
45
|
},
|
|
46
|
-
})
|
|
46
|
+
})
|
|
47
47
|
|
|
48
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
48
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
49
49
|
|
|
50
50
|
watch(
|
|
51
51
|
() => props.styleClassPassthrough,
|
|
52
52
|
() => {
|
|
53
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
53
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
54
54
|
}
|
|
55
|
-
)
|
|
55
|
+
)
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
58
|
<style lang="css">
|
|
@@ -82,15 +82,15 @@ watch(
|
|
|
82
82
|
|
|
83
83
|
grid-template-columns: 1fr;
|
|
84
84
|
grid-template-areas:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
"slot1"
|
|
86
|
+
"slot2"
|
|
87
|
+
"slot3";
|
|
88
88
|
|
|
89
89
|
@container (min-width: 1024px) {
|
|
90
90
|
grid-template-columns: 1fr minmax(460px, 33%);
|
|
91
91
|
grid-template-areas:
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
"slot1 slot2"
|
|
93
|
+
"slot3 slot2";
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="masonry-grid-wrapper"
|
|
4
|
+
:class="[elementClasses]"
|
|
5
|
+
:style="`--_masonry-grid-gap: ${gap}${unit}; --_item-min-width: ${itemMinWidth}px`"
|
|
6
|
+
>
|
|
3
7
|
<template v-for="item in gridData" :key="item.id">
|
|
4
8
|
<div class="masonry-grid-item">
|
|
5
9
|
<slot :name="item.id"></slot>
|
|
@@ -24,24 +28,24 @@ const props = defineProps({
|
|
|
24
28
|
},
|
|
25
29
|
unit: {
|
|
26
30
|
type: String,
|
|
27
|
-
default:
|
|
31
|
+
default: "rem",
|
|
28
32
|
},
|
|
29
33
|
styleClassPassthrough: {
|
|
30
|
-
type: Array as PropType<string[]>,
|
|
34
|
+
type: [String, Array] as PropType<string | string[]>,
|
|
31
35
|
default: () => [],
|
|
32
36
|
},
|
|
33
|
-
})
|
|
37
|
+
})
|
|
34
38
|
|
|
35
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
39
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
36
40
|
|
|
37
|
-
const gridData = toRef(() => props.gridData)
|
|
41
|
+
const gridData = toRef(() => props.gridData)
|
|
38
42
|
|
|
39
43
|
watch(
|
|
40
44
|
() => props.styleClassPassthrough,
|
|
41
45
|
() => {
|
|
42
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
46
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
43
47
|
}
|
|
44
|
-
)
|
|
48
|
+
)
|
|
45
49
|
</script>
|
|
46
50
|
|
|
47
51
|
<style lang="css">
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
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
|
|
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:
|
|
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());
|
|
@@ -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">
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="tabs-core" :class="`axis-${axis}`">
|
|
3
|
-
<ul
|
|
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
|
|
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:
|
|
47
|
+
default: "button",
|
|
32
48
|
},
|
|
33
49
|
axis: {
|
|
34
|
-
type: String as PropType<
|
|
35
|
-
default:
|
|
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(
|
|
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=
|
|
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=
|
|
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:
|
|
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=
|
|
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
|
-
|
|
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
|
|
5
|
-
|
|
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
|
-
|
|
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((
|
|
17
|
-
if (styleClassPassthroughRef.value.includes(
|
|
18
|
-
styleClassPassthroughRef.value = styleClassPassthroughRef.value.filter((
|
|
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(
|
|
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