srcdev-nuxt-components 6.1.10 → 6.1.12
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.
|
@@ -1,11 +1,11 @@
|
|
|
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>
|
|
8
|
-
<span class="icon-wrapper">
|
|
8
|
+
<span v-if="!forceOpened" class="icon-wrapper">
|
|
9
9
|
<slot name="icon">
|
|
10
10
|
<Icon name="bi:caret-down-fill" class="icon mi-12" />
|
|
11
11
|
</slot>
|
|
@@ -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">
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="tag" class="section-parallax" :class="[elementClasses]">
|
|
3
|
+
<slot v-if="slots.default" name="default"></slot>
|
|
4
|
+
</component>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
tag: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "div",
|
|
12
|
+
validator(value: string) {
|
|
13
|
+
return ["div", "section", "article", "aside"].includes(value)
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
backgroundImage: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
styleClassPassthrough: {
|
|
20
|
+
type: Array as PropType<string[]>,
|
|
21
|
+
default: () => [],
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const slots = useSlots()
|
|
26
|
+
|
|
27
|
+
const backgroundImage = computed(() => `url("${props.backgroundImage}")`)
|
|
28
|
+
|
|
29
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
30
|
+
|
|
31
|
+
watch(
|
|
32
|
+
() => props.styleClassPassthrough,
|
|
33
|
+
() => {
|
|
34
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="css">
|
|
40
|
+
.section-parallax {
|
|
41
|
+
/* Component styles */
|
|
42
|
+
|
|
43
|
+
min-height: 120vh;
|
|
44
|
+
background-image: v-bind(backgroundImage);
|
|
45
|
+
background-position: center;
|
|
46
|
+
background-repeat: no-repeat;
|
|
47
|
+
background-size: inherit;
|
|
48
|
+
position: relative;
|
|
49
|
+
|
|
50
|
+
background-color: light-dark(var(--gray-1), var(--gray-8));
|
|
51
|
+
width: 100%;
|
|
52
|
+
|
|
53
|
+
@supports (background-attachment: fixed) {
|
|
54
|
+
background-attachment: fixed;
|
|
55
|
+
background-size: cover;
|
|
56
|
+
min-height: 120vh;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* &.use-fixed-bg {
|
|
60
|
+
background-attachment: fixed;
|
|
61
|
+
background-size: cover;
|
|
62
|
+
min-height: 120vh;
|
|
63
|
+
} */
|
|
64
|
+
}
|
|
65
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "srcdev-nuxt-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.1.
|
|
4
|
+
"version": "6.1.12",
|
|
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",
|
|
@@ -24,21 +24,19 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@iconify-json/akar-icons": "1.2.7",
|
|
26
26
|
"@iconify-json/bitcoin-icons": "1.2.4",
|
|
27
|
-
"@iconify-json/material-symbols": "
|
|
28
|
-
"@nuxt/eslint": "1.
|
|
27
|
+
"@iconify-json/material-symbols": "1.2.34",
|
|
28
|
+
"@nuxt/eslint": "1.9.0",
|
|
29
29
|
"@nuxt/icon": "2.0.0",
|
|
30
30
|
"@nuxt/image": "1.11.0",
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
31
|
+
"@nuxtjs/i18n": "10.1.0",
|
|
32
|
+
"@vueuse/core": "13.9.0",
|
|
33
|
+
"eslint": "9.35.0",
|
|
34
|
+
"focus-trap-vue": "4.1.0",
|
|
33
35
|
"happy-dom": "18.0.1",
|
|
34
|
-
"nuxt": "4.
|
|
36
|
+
"nuxt": "4.1.2",
|
|
35
37
|
"release-it": "19.0.4",
|
|
36
38
|
"typescript": "5.9.2"
|
|
37
39
|
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@nuxtjs/i18n": "^10.0.6",
|
|
40
|
-
"focus-trap-vue": "4.0.3"
|
|
41
|
-
},
|
|
42
40
|
"release-it": {
|
|
43
41
|
"$schema": "https://unpkg.com/release-it/schema/release-it.json",
|
|
44
42
|
"git": {
|