@claralight-design/abweb-navbar 0.1.3 → 0.2.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.
- package/NavHeader.module.css +30 -20
- package/NavHeader.tsx +3 -5
- package/package.json +1 -1
package/NavHeader.module.css
CHANGED
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.inner {
|
|
25
|
-
width: calc(100%
|
|
26
|
-
max-width: calc(1200px
|
|
25
|
+
width: calc(100% + 32px);
|
|
26
|
+
max-width: calc(1200px + 32px);
|
|
27
27
|
position: relative;
|
|
28
28
|
display: grid;
|
|
29
29
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
30
30
|
align-items: center;
|
|
31
31
|
overflow: hidden;
|
|
32
|
-
padding: 3px 6px;
|
|
32
|
+
padding: 3px 6px 6px;
|
|
33
33
|
border-radius: 48px;
|
|
34
34
|
gap: 12px;
|
|
35
35
|
transform: translateY(0);
|
|
@@ -41,12 +41,14 @@
|
|
|
41
41
|
corner-shape: unset;
|
|
42
42
|
will-change: transform;
|
|
43
43
|
box-sizing: border-box;
|
|
44
|
+
|
|
45
|
+
--backdrop-filter: blur(12px) saturate(1.05);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
.blurEffect {
|
|
47
49
|
position: absolute;
|
|
48
50
|
inset: -10px 0 auto;
|
|
49
|
-
height:
|
|
51
|
+
height: 72px;
|
|
50
52
|
width: 120vw;
|
|
51
53
|
z-index: 0;
|
|
52
54
|
pointer-events: none;
|
|
@@ -70,17 +72,6 @@
|
|
|
70
72
|
order: 3;
|
|
71
73
|
}
|
|
72
74
|
|
|
73
|
-
.right {
|
|
74
|
-
gap: 8px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.rightSlot {
|
|
78
|
-
display: inline-flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
min-width: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
75
|
.centerColumn {
|
|
85
76
|
min-width: 0;
|
|
86
77
|
display: flex;
|
|
@@ -201,7 +192,6 @@
|
|
|
201
192
|
border: none;
|
|
202
193
|
border-radius: 999px;
|
|
203
194
|
background: transparent;
|
|
204
|
-
color: color-mix(in srgb, var(--color-text) 72%, transparent);
|
|
205
195
|
display: inline-flex;
|
|
206
196
|
align-items: center;
|
|
207
197
|
justify-content: center;
|
|
@@ -214,22 +204,28 @@
|
|
|
214
204
|
font-family: inherit;
|
|
215
205
|
font-size: 15px;
|
|
216
206
|
font-weight: 600;
|
|
207
|
+
color: var(--color-text);
|
|
208
|
+
opacity: 0.7;
|
|
217
209
|
}
|
|
218
210
|
|
|
219
211
|
.navLink:hover,
|
|
220
212
|
.logotypeWrapper:hover {
|
|
221
213
|
background: color-mix(in srgb, var(--color-text) 8%, transparent);
|
|
222
|
-
|
|
214
|
+
opacity: 1;
|
|
215
|
+
backdrop-filter: var(--backdrop-filter);
|
|
223
216
|
}
|
|
224
217
|
|
|
225
218
|
.navLink:active,
|
|
226
219
|
.logotypeWrapper:active {
|
|
220
|
+
opacity: 0.55;
|
|
227
221
|
transform: scale(0.96);
|
|
228
222
|
}
|
|
229
223
|
|
|
230
224
|
.navLinkActive {
|
|
231
225
|
color: var(--color-text);
|
|
232
226
|
background: color-mix(in srgb, var(--color-text) 10%, transparent);
|
|
227
|
+
opacity: 0.8;
|
|
228
|
+
backdrop-filter: var(--backdrop-filter);
|
|
233
229
|
}
|
|
234
230
|
|
|
235
231
|
.desktopLabel {
|
|
@@ -240,7 +236,7 @@
|
|
|
240
236
|
}
|
|
241
237
|
|
|
242
238
|
.desktopLabel svg {
|
|
243
|
-
max-height:
|
|
239
|
+
max-height: 12px;
|
|
244
240
|
}
|
|
245
241
|
|
|
246
242
|
.mobileMenu {
|
|
@@ -384,6 +380,14 @@
|
|
|
384
380
|
color: var(--color-text);
|
|
385
381
|
}
|
|
386
382
|
|
|
383
|
+
.dividingLine {
|
|
384
|
+
height: 12px;
|
|
385
|
+
width: 2px;
|
|
386
|
+
border-radius: 2px;
|
|
387
|
+
background-color: var(--color-text);
|
|
388
|
+
opacity: 0.4;
|
|
389
|
+
}
|
|
390
|
+
|
|
387
391
|
@media (min-width: 960px) {
|
|
388
392
|
.desktopNav {
|
|
389
393
|
display: flex;
|
|
@@ -396,7 +400,8 @@
|
|
|
396
400
|
|
|
397
401
|
@media (max-width: 959px) {
|
|
398
402
|
.inner {
|
|
399
|
-
|
|
403
|
+
display: flex;
|
|
404
|
+
width: calc(100% - 14px);
|
|
400
405
|
}
|
|
401
406
|
|
|
402
407
|
.slide {
|
|
@@ -417,6 +422,11 @@
|
|
|
417
422
|
|
|
418
423
|
.centerColumn {
|
|
419
424
|
justify-content: center;
|
|
425
|
+
width: 100%;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.dividingLine {
|
|
429
|
+
display: none;
|
|
420
430
|
}
|
|
421
431
|
}
|
|
422
432
|
|
|
@@ -430,4 +440,4 @@
|
|
|
430
440
|
.menuItemMarker {
|
|
431
441
|
transition: none;
|
|
432
442
|
}
|
|
433
|
-
}
|
|
443
|
+
}
|
package/NavHeader.tsx
CHANGED
|
@@ -30,7 +30,6 @@ export type NavHeaderProps = {
|
|
|
30
30
|
showHeaderBlur?: boolean
|
|
31
31
|
navItems?: NavHeaderItem[]
|
|
32
32
|
leftSlot?: React.ReactNode
|
|
33
|
-
rightSlot?: React.ReactNode
|
|
34
33
|
logo?: React.ReactNode
|
|
35
34
|
brandName?: string
|
|
36
35
|
homeHref?: string
|
|
@@ -158,7 +157,6 @@ const NavHeader: React.FC<NavHeaderProps> = ({
|
|
|
158
157
|
showHeaderBlur = true,
|
|
159
158
|
navItems = [],
|
|
160
159
|
leftSlot,
|
|
161
|
-
rightSlot,
|
|
162
160
|
logo,
|
|
163
161
|
brandName = 'Brand',
|
|
164
162
|
homeHref = '/',
|
|
@@ -283,6 +281,8 @@ const NavHeader: React.FC<NavHeaderProps> = ({
|
|
|
283
281
|
</div>
|
|
284
282
|
|
|
285
283
|
{hasNavItems && (
|
|
284
|
+
<>
|
|
285
|
+
<span className={styles.dividingLine} />
|
|
286
286
|
<nav
|
|
287
287
|
className={styles.desktopNav}
|
|
288
288
|
aria-label={resolvedLabels.menu}
|
|
@@ -313,11 +313,9 @@ const NavHeader: React.FC<NavHeaderProps> = ({
|
|
|
313
313
|
})}
|
|
314
314
|
</div>
|
|
315
315
|
</nav>
|
|
316
|
+
</>
|
|
316
317
|
)}
|
|
317
318
|
</div>
|
|
318
|
-
<div className={cx(styles.column, styles.right)}>
|
|
319
|
-
{rightSlot && <div className={styles.rightSlot}>{rightSlot}</div>}
|
|
320
|
-
</div>
|
|
321
319
|
</header>
|
|
322
320
|
</div>
|
|
323
321
|
)
|