@codecavepro/brand 2.5.5 → 2.7.0
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.
|
@@ -198,8 +198,22 @@ withDefaults(defineProps<{
|
|
|
198
198
|
height: 10px;
|
|
199
199
|
border-radius: 50%;
|
|
200
200
|
background: var(--color-error-400);
|
|
201
|
-
box-shadow:
|
|
202
|
-
|
|
201
|
+
box-shadow:
|
|
202
|
+
0 0 12px 0 var(--color-error-400),
|
|
203
|
+
0 0 4px 0 hsl(from var(--color-error-400) h s l / 0.5);
|
|
204
|
+
|
|
205
|
+
animation: pulse-opacity 1.5s ease-in-out infinite;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes pulse-opacity {
|
|
209
|
+
0%,
|
|
210
|
+
100% {
|
|
211
|
+
opacity: 1;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
50% {
|
|
215
|
+
opacity: 0.3;
|
|
216
|
+
}
|
|
203
217
|
}
|
|
204
218
|
|
|
205
219
|
.brand-nav-logo {
|
|
@@ -223,12 +237,13 @@ withDefaults(defineProps<{
|
|
|
223
237
|
position: absolute;
|
|
224
238
|
top: 100%;
|
|
225
239
|
left: 0;
|
|
226
|
-
margin-top:
|
|
240
|
+
margin-top: 13px;
|
|
227
241
|
width: max-content;
|
|
228
242
|
opacity: 0;
|
|
229
243
|
visibility: hidden;
|
|
230
244
|
border-radius: 1rem;
|
|
231
245
|
padding: 1.25rem;
|
|
246
|
+
z-index: 100;
|
|
232
247
|
background: var(--color-surface-primary);
|
|
233
248
|
-webkit-backdrop-filter: blur(24px);
|
|
234
249
|
backdrop-filter: blur(24px);
|
|
@@ -1,28 +1,46 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue';
|
|
3
|
-
import { type MenuItem } from '../lib/menus/menuTypes';
|
|
3
|
+
import { type MenuItem } from '../lib/menus/menuTypes.ts';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
|
|
6
|
+
section?: string;
|
|
7
|
+
current?: string;
|
|
8
|
+
subMenu: Record<string, MenuItem[]>;
|
|
7
9
|
}
|
|
10
|
+
|
|
8
11
|
const props = defineProps<Props>();
|
|
12
|
+
|
|
13
|
+
const items = computed<MenuItem[]>(() => {
|
|
14
|
+
return props.section ? props.subMenu[props.section] ?? [] : [];
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
if (
|
|
18
|
+
props.current &&
|
|
19
|
+
props.section &&
|
|
20
|
+
!(props.subMenu[props.section] ?? []).some(i => i.name === props.current)
|
|
21
|
+
) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
`SubNav: no item named "${props.current}" in SUB["${props.section}"]`
|
|
24
|
+
);
|
|
25
|
+
}
|
|
9
26
|
</script>
|
|
10
27
|
|
|
11
28
|
<template>
|
|
12
29
|
<nav
|
|
13
|
-
v-if="items.length
|
|
30
|
+
v-if="items.length"
|
|
14
31
|
class="ds-subnav"
|
|
15
32
|
aria-label="Section"
|
|
16
33
|
>
|
|
17
|
-
<div class="
|
|
18
|
-
<ul>
|
|
34
|
+
<div class="ds-subnav-inner">
|
|
35
|
+
<ul class="flex w-max min-w-full flex-nowrap">
|
|
19
36
|
<li
|
|
20
37
|
v-for="item in items"
|
|
21
38
|
:key="item.name"
|
|
22
39
|
>
|
|
23
40
|
<a
|
|
24
|
-
class="btn btn-ghost"
|
|
25
|
-
:href="
|
|
41
|
+
class="btn btn-ghost whitespace-nowrap"
|
|
42
|
+
:href="item.href"
|
|
43
|
+
:aria-current="item.name === current ? 'page' : undefined"
|
|
26
44
|
>
|
|
27
45
|
{{ item.label }}
|
|
28
46
|
</a>
|
|
@@ -75,7 +75,7 @@ const handleCloseMenu = () => {
|
|
|
75
75
|
|
|
76
76
|
<template>
|
|
77
77
|
<div>
|
|
78
|
-
<div :class="`fixed z-50 top-0 w-full bg-surface-primary-transparent backdrop-blur-3xl
|
|
78
|
+
<div :class="`fixed z-50 top-0 w-full bg-surface-primary-transparent backdrop-blur-3xl border-b border-surface-quaternary`">
|
|
79
79
|
<div :class="`h-full px-5 ${isMenuOpen ? 'pb-5' : 'pb-0'} flex flex-col gap-2 transition-all`">
|
|
80
80
|
<div class="flex justify-between items-center py-1.5">
|
|
81
81
|
<a :href="homeHref" class="px-1.5 hover:opacity-80 transition-opacity">
|
|
@@ -85,12 +85,12 @@ const handleCloseMenu = () => {
|
|
|
85
85
|
<span></span>
|
|
86
86
|
</button>
|
|
87
87
|
</div>
|
|
88
|
-
<nav v-if="isMenuOpen" class="h-full text-sm">
|
|
88
|
+
<nav v-if="isMenuOpen" class="h-full text-sm flex-1 overflow-y-auto min-h-0">
|
|
89
89
|
<div v-if="isServicesOpen">
|
|
90
90
|
<h2 class="text-center font-bold text-body-primary py-2.5">
|
|
91
91
|
{{ servicesItem?.submenuTitle }}
|
|
92
92
|
</h2>
|
|
93
|
-
<
|
|
93
|
+
<slot name="services" />
|
|
94
94
|
<button class="pt-4" @click="isServicesOpen = false">
|
|
95
95
|
<component class="w-11 h-11 text-action" :is="BackIcon" />
|
|
96
96
|
</button>
|
package/package.json
CHANGED