srcdev-nuxt-components 6.1.11 → 6.1.13
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,18 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="expanding-panel" :class="[elementClasses]">
|
|
3
3
|
<details class="expanding-panel-details" :name :open>
|
|
4
|
-
<summary
|
|
4
|
+
<summary
|
|
5
|
+
@click.prevent="handleToggle"
|
|
6
|
+
@keydown.enter.prevent="handleToggle"
|
|
7
|
+
@keydown.space.prevent="handleToggle"
|
|
8
|
+
class="expanding-panel-summary"
|
|
9
|
+
:id="`id-${name}-trigger`"
|
|
10
|
+
:aria-controls="`id-${name}-content`"
|
|
11
|
+
>
|
|
5
12
|
<span class="label-wrapper">
|
|
6
13
|
<slot name="summary"></slot>
|
|
7
14
|
</span>
|
|
8
|
-
<span class="icon-wrapper">
|
|
15
|
+
<span v-if="!forceOpened" class="icon-wrapper">
|
|
9
16
|
<slot name="icon">
|
|
10
17
|
<Icon name="bi:caret-down-fill" class="icon mi-12" />
|
|
11
18
|
</slot>
|
|
12
19
|
</span>
|
|
13
20
|
</summary>
|
|
14
21
|
</details>
|
|
15
|
-
<div
|
|
22
|
+
<div
|
|
23
|
+
class="expanding-panel-content"
|
|
24
|
+
:aria-labelledby="`id-${name}-trigger`"
|
|
25
|
+
:id="`id-${name}-content`"
|
|
26
|
+
role="region"
|
|
27
|
+
>
|
|
16
28
|
<div class="inner">
|
|
17
29
|
<slot name="content"></slot>
|
|
18
30
|
</div>
|
|
@@ -45,11 +57,11 @@ const props = defineProps({
|
|
|
45
57
|
})
|
|
46
58
|
|
|
47
59
|
const name = computed(() => props.name || useId())
|
|
48
|
-
|
|
49
|
-
const triggerId = computed(() => `id-${name.value}-trigger`)
|
|
50
|
-
const contentId = computed(() => `id-${name.value}-content`)
|
|
60
|
+
const isPanelOpen = defineModel({ default: false }) as Ref<boolean>
|
|
51
61
|
const animationDurationStr = computed(() => `${props.animationDuration}ms`)
|
|
52
|
-
const open = computed(() =>
|
|
62
|
+
const open = computed(() => {
|
|
63
|
+
return props.forceOpened ? true : isPanelOpen.value
|
|
64
|
+
})
|
|
53
65
|
|
|
54
66
|
const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
55
67
|
|
|
@@ -57,6 +69,7 @@ const handleToggle = (event: Event) => {
|
|
|
57
69
|
if (props.forceOpened) {
|
|
58
70
|
event.preventDefault()
|
|
59
71
|
}
|
|
72
|
+
isPanelOpen.value = !isPanelOpen.value
|
|
60
73
|
}
|
|
61
74
|
</script>
|
|
62
75
|
|
|
@@ -81,6 +94,7 @@ const handleToggle = (event: Event) => {
|
|
|
81
94
|
overflow: hidden;
|
|
82
95
|
|
|
83
96
|
.label-wrapper {
|
|
97
|
+
display: inline-block;
|
|
84
98
|
}
|
|
85
99
|
.icon-wrapper {
|
|
86
100
|
display: flex;
|
|
@@ -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.13",
|
|
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": {
|