srcdev-nuxt-components 6.1.9 → 6.1.11
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/clipped-panels/ClippedPanel.vue +28 -16
- package/app/components/deep-expanding-menu/DeepExpandingMenu.vue +1 -3
- package/app/components/deep-expanding-menu/DeepExpandingMenuOld.vue +1 -3
- package/app/components/display-banner/DisplayBanner.vue +20 -12
- package/app/components/expanding-panel/ExpandingPanel.vue +13 -2
- package/app/components/layout-row/LayoutRow.vue +18 -36
- package/app/components/rotating-carousel/RotatingCarouselImage.vue +58 -42
- package/package.json +1 -1
|
@@ -4,40 +4,49 @@
|
|
|
4
4
|
</component>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script lang="ts">
|
|
8
|
-
const TAGS_ALLOWED = <string[]>['div', 'p', 'span', 'section', 'article', 'aside', 'header', 'footer', 'main', 'nav', 'ul', 'ol'];
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
7
|
<script setup lang="ts">
|
|
12
8
|
const props = defineProps({
|
|
13
9
|
tag: {
|
|
14
10
|
type: String,
|
|
15
|
-
default:
|
|
11
|
+
default: "div",
|
|
16
12
|
validator(value: string) {
|
|
17
|
-
return
|
|
13
|
+
return [
|
|
14
|
+
"div",
|
|
15
|
+
"p",
|
|
16
|
+
"span",
|
|
17
|
+
"section",
|
|
18
|
+
"article",
|
|
19
|
+
"aside",
|
|
20
|
+
"header",
|
|
21
|
+
"footer",
|
|
22
|
+
"main",
|
|
23
|
+
"nav",
|
|
24
|
+
"ul",
|
|
25
|
+
"ol",
|
|
26
|
+
].includes(value)
|
|
18
27
|
},
|
|
19
28
|
},
|
|
20
29
|
variant: {
|
|
21
30
|
type: String,
|
|
22
|
-
default:
|
|
31
|
+
default: "square",
|
|
23
32
|
validator(value: string) {
|
|
24
|
-
return [
|
|
33
|
+
return ["circle-cutout", "rectangle", "square"].includes(value)
|
|
25
34
|
},
|
|
26
35
|
},
|
|
27
36
|
styleClassPassthrough: {
|
|
28
37
|
type: Array as PropType<string[]>,
|
|
29
38
|
default: () => [],
|
|
30
39
|
},
|
|
31
|
-
})
|
|
40
|
+
})
|
|
32
41
|
|
|
33
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
42
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
34
43
|
|
|
35
44
|
watch(
|
|
36
45
|
() => props.styleClassPassthrough,
|
|
37
46
|
() => {
|
|
38
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
47
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
39
48
|
}
|
|
40
|
-
)
|
|
49
|
+
)
|
|
41
50
|
</script>
|
|
42
51
|
|
|
43
52
|
<style lang="css">
|
|
@@ -54,20 +63,23 @@ watch(
|
|
|
54
63
|
aspect-ratio: 1;
|
|
55
64
|
|
|
56
65
|
&.rectangle {
|
|
57
|
-
|
|
58
66
|
--_max-x-position: 300px;
|
|
59
67
|
--_curve-radius: 10px;
|
|
60
68
|
|
|
61
|
-
clip-path: path(
|
|
69
|
+
clip-path: path(
|
|
70
|
+
"M 10, 50 L 140, 50 A 10, 10, 0, 0, 0 150, 40 L 150, 10 A 10, 10, 0, 0, 1 160, 0 L 290, 0 A 10, 10, 0, 0, 1 300, 10 L 300, 190 A 10, 10, 0, 0, 1 290, 200 L 10, 200 A 10, 10, 0, 0, 1 0, 190 L 0, 60 A 10, 10, 0, 0, 1 10, 50 Z"
|
|
71
|
+
);
|
|
62
72
|
width: 300px;
|
|
63
73
|
}
|
|
64
74
|
&.square {
|
|
65
75
|
/* clip-path: path('M 10, 50 L 90, 50 A 10, 10, 0, 0, 0 100, 40 L 100, 10 L 110, 0 L 190, 0 L 200, 10 L 200, 190 L 190, 200 L 10, 200 L 0, 190 L 0, 60 L 10, 50 Z'); */
|
|
66
|
-
clip-path: path(
|
|
76
|
+
clip-path: path(
|
|
77
|
+
"M 10, 50 L 90, 50 A 10, 10, 0, 0, 0 100, 40 L 100, 10 A 10, 10, 0, 0, 1 110, 0 L 190, 0 A 10, 10, 0, 0, 1 200, 10 L 200, 190 A 10, 10, 0, 0, 1 190, 200 L 10, 200 A 10, 10, 0, 0, 1 0, 190 L 0, 60 A 10, 10, 0, 0, 1 10, 50 Z"
|
|
78
|
+
);
|
|
67
79
|
width: 200px;
|
|
68
80
|
}
|
|
69
81
|
&.circle-cutout {
|
|
70
|
-
clip-path: path(
|
|
82
|
+
clip-path: path("M Z");
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
</style>
|
|
@@ -25,8 +25,6 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script lang="ts">
|
|
28
|
-
const TAGS_ALLOWED = <string[]>["div", "section", "nav", "ul", "ol"]
|
|
29
|
-
|
|
30
28
|
interface ResponsiveHeaderNavItem {
|
|
31
29
|
name: string
|
|
32
30
|
path?: string
|
|
@@ -42,7 +40,7 @@ const props = defineProps({
|
|
|
42
40
|
type: String,
|
|
43
41
|
default: "nav",
|
|
44
42
|
validator(value: string) {
|
|
45
|
-
return
|
|
43
|
+
return ["div", "section", "nav", "ul", "ol"].includes(value)
|
|
46
44
|
},
|
|
47
45
|
},
|
|
48
46
|
navLinks: {
|
|
@@ -30,7 +30,7 @@ const props = defineProps({
|
|
|
30
30
|
type: String,
|
|
31
31
|
default: "nav",
|
|
32
32
|
validator(value: string) {
|
|
33
|
-
return
|
|
33
|
+
return ["div", "section", "nav", "ul", "ol"].includes(value)
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
navLinks: {
|
|
@@ -64,8 +64,6 @@ onMounted(() => {
|
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
66
|
<script lang="ts">
|
|
67
|
-
const TAGS_ALLOWED = <string[]>["div", "section", "nav", "ul", "ol"]
|
|
68
|
-
|
|
69
67
|
interface ResponsiveHeaderNavItem {
|
|
70
68
|
name: string
|
|
71
69
|
path?: string
|
|
@@ -9,40 +9,48 @@
|
|
|
9
9
|
</component>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script lang="ts">
|
|
13
|
-
const TAGS_ALLOWED = <string[]>['div', 'p', 'span', 'section', 'article', 'aside', 'header', 'footer', 'main', 'nav', 'ul', 'ol'];
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
12
|
<script setup lang="ts">
|
|
17
|
-
|
|
18
13
|
const props = defineProps({
|
|
19
14
|
tag: {
|
|
20
15
|
type: String,
|
|
21
|
-
default:
|
|
16
|
+
default: "div",
|
|
22
17
|
validator(value: string) {
|
|
23
|
-
return
|
|
18
|
+
return [
|
|
19
|
+
"div",
|
|
20
|
+
"p",
|
|
21
|
+
"span",
|
|
22
|
+
"section",
|
|
23
|
+
"article",
|
|
24
|
+
"aside",
|
|
25
|
+
"header",
|
|
26
|
+
"footer",
|
|
27
|
+
"main",
|
|
28
|
+
"nav",
|
|
29
|
+
"ul",
|
|
30
|
+
"ol",
|
|
31
|
+
].includes(value)
|
|
24
32
|
},
|
|
25
33
|
},
|
|
26
34
|
styleClassPassthrough: {
|
|
27
35
|
type: Array as PropType<string[]>,
|
|
28
36
|
default: () => [],
|
|
29
37
|
},
|
|
30
|
-
})
|
|
38
|
+
})
|
|
31
39
|
|
|
32
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
40
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
33
41
|
|
|
34
42
|
watch(
|
|
35
43
|
() => props.styleClassPassthrough,
|
|
36
44
|
() => {
|
|
37
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
45
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
38
46
|
}
|
|
39
|
-
)
|
|
47
|
+
)
|
|
40
48
|
</script>
|
|
41
49
|
|
|
42
50
|
<style lang="css">
|
|
43
51
|
.display-banner {
|
|
44
52
|
display: grid;
|
|
45
|
-
grid-template-areas:
|
|
53
|
+
grid-template-areas: "banner";
|
|
46
54
|
container-type: inline-size;
|
|
47
55
|
overflow: hidden;
|
|
48
56
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="expanding-panel" :class="[elementClasses]">
|
|
3
|
-
<details class="expanding-panel-details" :name>
|
|
4
|
-
<summary class="expanding-panel-summary" :id="triggerId" :aria-controls="contentId">
|
|
3
|
+
<details class="expanding-panel-details" :name :open>
|
|
4
|
+
<summary @click="handleToggle" class="expanding-panel-summary" :id="triggerId" :aria-controls="contentId">
|
|
5
5
|
<span class="label-wrapper">
|
|
6
6
|
<slot name="summary"></slot>
|
|
7
7
|
</span>
|
|
@@ -34,6 +34,10 @@ const props = defineProps({
|
|
|
34
34
|
type: Number,
|
|
35
35
|
default: 400,
|
|
36
36
|
},
|
|
37
|
+
forceOpened: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
37
41
|
styleClassPassthrough: {
|
|
38
42
|
type: Array as PropType<string[]>,
|
|
39
43
|
default: () => [],
|
|
@@ -45,8 +49,15 @@ const name = computed(() => props.name || useId())
|
|
|
45
49
|
const triggerId = computed(() => `id-${name.value}-trigger`)
|
|
46
50
|
const contentId = computed(() => `id-${name.value}-content`)
|
|
47
51
|
const animationDurationStr = computed(() => `${props.animationDuration}ms`)
|
|
52
|
+
const open = computed(() => props.forceOpened)
|
|
48
53
|
|
|
49
54
|
const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
55
|
+
|
|
56
|
+
const handleToggle = (event: Event) => {
|
|
57
|
+
if (props.forceOpened) {
|
|
58
|
+
event.preventDefault()
|
|
59
|
+
}
|
|
60
|
+
}
|
|
50
61
|
</script>
|
|
51
62
|
|
|
52
63
|
<style lang="css">
|
|
@@ -15,40 +15,6 @@
|
|
|
15
15
|
</component>
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
|
-
<script lang="ts">
|
|
19
|
-
export const TAGS_ALLOWED = <string[]>[
|
|
20
|
-
"div",
|
|
21
|
-
"section",
|
|
22
|
-
"article",
|
|
23
|
-
"aside",
|
|
24
|
-
"header",
|
|
25
|
-
"footer",
|
|
26
|
-
"main",
|
|
27
|
-
"nav",
|
|
28
|
-
"ul",
|
|
29
|
-
"ol",
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
export const VARIANT_CLASSES = <string[]>[
|
|
33
|
-
"full",
|
|
34
|
-
"full-start",
|
|
35
|
-
"full-end",
|
|
36
|
-
"popout",
|
|
37
|
-
"popout-start",
|
|
38
|
-
"popout-end",
|
|
39
|
-
"content",
|
|
40
|
-
"content-start",
|
|
41
|
-
"content-end",
|
|
42
|
-
"inset-content",
|
|
43
|
-
"inset-content-start",
|
|
44
|
-
"inset-content-end",
|
|
45
|
-
"full-width",
|
|
46
|
-
"full-content",
|
|
47
|
-
"full-content-nopad",
|
|
48
|
-
"full-content",
|
|
49
|
-
]
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
18
|
<script setup lang="ts">
|
|
53
19
|
const props = defineProps({
|
|
54
20
|
dataTestid: {
|
|
@@ -59,14 +25,30 @@ const props = defineProps({
|
|
|
59
25
|
type: String,
|
|
60
26
|
default: "div",
|
|
61
27
|
validator(value: string) {
|
|
62
|
-
return
|
|
28
|
+
return ["div", "section", "article", "aside", "header", "footer", "main", "nav", "ul", "ol"].includes(value)
|
|
63
29
|
},
|
|
64
30
|
},
|
|
65
31
|
variant: {
|
|
66
32
|
type: String,
|
|
67
33
|
required: true,
|
|
68
34
|
validator(value: string) {
|
|
69
|
-
return
|
|
35
|
+
return [
|
|
36
|
+
"full",
|
|
37
|
+
"full-start",
|
|
38
|
+
"full-end",
|
|
39
|
+
"popout",
|
|
40
|
+
"popout-start",
|
|
41
|
+
"popout-end",
|
|
42
|
+
"content",
|
|
43
|
+
"content-start",
|
|
44
|
+
"content-end",
|
|
45
|
+
"inset-content",
|
|
46
|
+
"inset-content-start",
|
|
47
|
+
"inset-content-end",
|
|
48
|
+
"full-width",
|
|
49
|
+
"full-content",
|
|
50
|
+
"full-content-nopad",
|
|
51
|
+
].includes(value)
|
|
70
52
|
},
|
|
71
53
|
},
|
|
72
54
|
id: {
|
|
@@ -3,20 +3,23 @@
|
|
|
3
3
|
:is="tag"
|
|
4
4
|
class="rotating-carousel"
|
|
5
5
|
:class="[elementClasses]"
|
|
6
|
-
:style="`--_rotate-x: ${rotateXProp}deg; --_perspective: ${perspectiveProp}; --_translateZ: ${translateZProp}; --_animation-play-state: ${
|
|
6
|
+
:style="`--_rotate-x: ${rotateXProp}deg; --_perspective: ${perspectiveProp}; --_translateZ: ${translateZProp}; --_animation-play-state: ${
|
|
7
|
+
pauseOnHover ? 'paused' : 'running'
|
|
8
|
+
}`"
|
|
7
9
|
ref="carouselRef"
|
|
8
10
|
>
|
|
9
11
|
<div class="slider" :style="`--quantity: ${Object.keys(data).length}`">
|
|
10
|
-
<div v-for="(item, key) in data" :key="key" class="item" :style="`--_position: ${key}`"
|
|
12
|
+
<div v-for="(item, key) in data" :key="key" class="item" :style="`--_position: ${key}`">
|
|
13
|
+
<NuxtImg :src="item.src" :alt="item.alt" />
|
|
14
|
+
</div>
|
|
11
15
|
</div>
|
|
12
16
|
</component>
|
|
13
17
|
</template>
|
|
14
18
|
|
|
15
19
|
<script lang="ts">
|
|
16
|
-
const TAGS_ALLOWED = <string[]>['div', 'p', 'span', 'section', 'article', 'aside', 'header', 'footer', 'main', 'nav', 'ul', 'ol'];
|
|
17
20
|
interface IAccordianData {
|
|
18
|
-
src: string
|
|
19
|
-
alt: string
|
|
21
|
+
src: string
|
|
22
|
+
alt: string
|
|
20
23
|
}
|
|
21
24
|
</script>
|
|
22
25
|
|
|
@@ -28,9 +31,22 @@ const props = defineProps({
|
|
|
28
31
|
},
|
|
29
32
|
tag: {
|
|
30
33
|
type: String,
|
|
31
|
-
default:
|
|
34
|
+
default: "div",
|
|
32
35
|
validator(value: string) {
|
|
33
|
-
return
|
|
36
|
+
return [
|
|
37
|
+
"div",
|
|
38
|
+
"p",
|
|
39
|
+
"span",
|
|
40
|
+
"section",
|
|
41
|
+
"article",
|
|
42
|
+
"aside",
|
|
43
|
+
"header",
|
|
44
|
+
"footer",
|
|
45
|
+
"main",
|
|
46
|
+
"nav",
|
|
47
|
+
"ul",
|
|
48
|
+
"ol",
|
|
49
|
+
].includes(value)
|
|
34
50
|
},
|
|
35
51
|
},
|
|
36
52
|
rotateX: {
|
|
@@ -57,77 +73,77 @@ const props = defineProps({
|
|
|
57
73
|
type: Array as PropType<string[]>,
|
|
58
74
|
default: () => [],
|
|
59
75
|
},
|
|
60
|
-
})
|
|
76
|
+
})
|
|
61
77
|
|
|
62
|
-
const perspectiveProp = computed(() => `${props.perspective.toString()}px`)
|
|
63
|
-
const translateZProp = computed(() => `${props.translateZ.toString()}px`)
|
|
78
|
+
const perspectiveProp = computed(() => `${props.perspective.toString()}px`)
|
|
79
|
+
const translateZProp = computed(() => `${props.translateZ.toString()}px`)
|
|
64
80
|
|
|
65
|
-
const carouselRef = ref<HTMLElement | null>(null)
|
|
66
|
-
const rotateXProp = ref(props.rotateX)
|
|
67
|
-
const minRotateX = -32
|
|
68
|
-
const maxRotateX = 32
|
|
81
|
+
const carouselRef = ref<HTMLElement | null>(null)
|
|
82
|
+
const rotateXProp = ref(props.rotateX)
|
|
83
|
+
const minRotateX = -32
|
|
84
|
+
const maxRotateX = 32
|
|
69
85
|
|
|
70
|
-
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
86
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
71
87
|
|
|
72
88
|
watch(
|
|
73
89
|
() => props.styleClassPassthrough,
|
|
74
90
|
() => {
|
|
75
|
-
resetElementClasses(props.styleClassPassthrough)
|
|
91
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
76
92
|
}
|
|
77
|
-
)
|
|
93
|
+
)
|
|
78
94
|
|
|
79
95
|
watch(
|
|
80
96
|
() => props.rotateX,
|
|
81
97
|
() => {
|
|
82
98
|
if (!props.useParallaxEffect) {
|
|
83
|
-
console.log(
|
|
99
|
+
console.log("rotateXProp changed: ", rotateXProp.value)
|
|
84
100
|
|
|
85
|
-
rotateXProp.value = props.rotateX
|
|
101
|
+
rotateXProp.value = props.rotateX
|
|
86
102
|
}
|
|
87
103
|
}
|
|
88
|
-
)
|
|
104
|
+
)
|
|
89
105
|
|
|
90
106
|
watch(
|
|
91
107
|
() => props.useParallaxEffect,
|
|
92
108
|
(currentValue) => {
|
|
93
109
|
if (currentValue) {
|
|
94
|
-
handleScroll()
|
|
95
|
-
window.addEventListener(
|
|
110
|
+
handleScroll()
|
|
111
|
+
window.addEventListener("scroll", handleScroll)
|
|
96
112
|
} else {
|
|
97
|
-
window.removeEventListener(
|
|
113
|
+
window.removeEventListener("scroll", handleScroll)
|
|
98
114
|
}
|
|
99
115
|
}
|
|
100
|
-
)
|
|
116
|
+
)
|
|
101
117
|
|
|
102
118
|
const handleScroll = () => {
|
|
103
|
-
if (!carouselRef.value) return
|
|
104
|
-
if (
|
|
105
|
-
const rect = carouselRef.value.getBoundingClientRect()
|
|
106
|
-
const viewportHeight = window.innerHeight
|
|
119
|
+
if (!carouselRef.value) return
|
|
120
|
+
if ("IntersectionObserver" in window) {
|
|
121
|
+
const rect = carouselRef.value.getBoundingClientRect()
|
|
122
|
+
const viewportHeight = window.innerHeight
|
|
107
123
|
|
|
108
|
-
const elementCenter = rect.top + rect.height / 2
|
|
109
|
-
const viewportCenter = viewportHeight / 2
|
|
110
|
-
const distanceFromCenter = viewportCenter - elementCenter
|
|
111
|
-
const maxDistance = viewportHeight / 2 + rect.height / 2
|
|
124
|
+
const elementCenter = rect.top + rect.height / 2
|
|
125
|
+
const viewportCenter = viewportHeight / 2
|
|
126
|
+
const distanceFromCenter = viewportCenter - elementCenter
|
|
127
|
+
const maxDistance = viewportHeight / 2 + rect.height / 2
|
|
112
128
|
|
|
113
|
-
const progress = (distanceFromCenter + maxDistance) / (maxDistance * 2)
|
|
114
|
-
const clampedProgress = Math.max(0, Math.min(1, progress))
|
|
129
|
+
const progress = (distanceFromCenter + maxDistance) / (maxDistance * 2)
|
|
130
|
+
const clampedProgress = Math.max(0, Math.min(1, progress))
|
|
115
131
|
|
|
116
|
-
rotateXProp.value = minRotateX + (maxRotateX - minRotateX) * clampedProgress
|
|
132
|
+
rotateXProp.value = minRotateX + (maxRotateX - minRotateX) * clampedProgress
|
|
117
133
|
}
|
|
118
|
-
}
|
|
134
|
+
}
|
|
119
135
|
|
|
120
136
|
onMounted(async () => {
|
|
121
137
|
if (props.useParallaxEffect) {
|
|
122
|
-
handleScroll()
|
|
123
|
-
await nextTick()
|
|
124
|
-
window.addEventListener(
|
|
138
|
+
handleScroll()
|
|
139
|
+
await nextTick()
|
|
140
|
+
window.addEventListener("scroll", handleScroll)
|
|
125
141
|
}
|
|
126
|
-
})
|
|
142
|
+
})
|
|
127
143
|
|
|
128
144
|
onUnmounted(() => {
|
|
129
|
-
window.removeEventListener(
|
|
130
|
-
})
|
|
145
|
+
window.removeEventListener("scroll", handleScroll)
|
|
146
|
+
})
|
|
131
147
|
</script>
|
|
132
148
|
|
|
133
149
|
<style lang="css">
|
package/package.json
CHANGED