ab-nextjs-components 0.1.12 โ 0.1.14
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/CHANGELOG.md +64 -0
- package/README.md +52 -0
- package/ab-app-bar/index.tsx +210 -0
- package/ab-app-bar/styles.module.css +158 -0
- package/ab-avatar/index.tsx +2 -1
- package/ab-avatar/styles.module.css +32 -0
- package/ab-balloon/index.tsx +134 -23
- package/ab-balloon/styles.module.css +84 -7
- package/ab-bottom-drawer/index.tsx +71 -0
- package/ab-bottom-drawer/styles.module.css +66 -0
- package/ab-brand/index.tsx +1 -1
- package/ab-breadcrumbs/index.tsx +92 -0
- package/ab-breadcrumbs/styles.module.css +54 -0
- package/ab-button/helpers.ts +6 -1
- package/ab-button/index.tsx +23 -4
- package/ab-button/styles.module.css +70 -0
- package/ab-card/index.tsx +89 -0
- package/ab-card/styles.module.css +68 -0
- package/ab-carousel/styles.module.css +1 -1
- package/ab-chip/index.tsx +16 -4
- package/ab-chip/styles.module.css +12 -1
- package/ab-collapsible/index.tsx +1 -1
- package/ab-color/index.tsx +1 -0
- package/ab-color/styles.module.css +32 -0
- package/ab-confirm-drawer/index.tsx +97 -0
- package/ab-confirm-drawer/styles.module.css +41 -0
- package/ab-demo-box/index.tsx +1 -0
- package/ab-demo-box/styles.module.css +32 -0
- package/ab-demo-code/index.tsx +1 -0
- package/ab-demo-code/styles.module.css +32 -0
- package/ab-drawer/index.tsx +307 -0
- package/ab-drawer/styles.module.css +127 -0
- package/ab-drawer/use-ab-drawer.ts +89 -0
- package/ab-drawer-list/index.tsx +118 -0
- package/ab-drawer-list/styles.module.css +65 -0
- package/ab-flow-diagram/styles.module.css +2 -2
- package/ab-icon/builtin.ts +19 -1
- package/ab-icon/helpers.ts +37 -0
- package/ab-icon/index.tsx +14 -8
- package/ab-icon/registrar.tsx +68 -0
- package/ab-icon-button/index.tsx +19 -3
- package/ab-icon-button/styles.module.css +1 -1
- package/ab-image/index.tsx +1 -0
- package/ab-image/styles.module.css +32 -0
- package/ab-info/index.tsx +2 -1
- package/ab-info/styles.module.css +32 -0
- package/ab-input/index.tsx +1 -0
- package/ab-input/styles.module.css +1 -0
- package/ab-install-snippet/index.tsx +51 -29
- package/ab-install-snippet/styles.module.css +50 -4
- package/ab-kbd/index.tsx +65 -0
- package/ab-kbd/styles.module.css +55 -0
- package/ab-key-feature/index.tsx +2 -1
- package/ab-key-feature/styles.module.css +32 -0
- package/ab-like-button/index.tsx +1 -1
- package/ab-link/index.tsx +112 -0
- package/ab-link/locale.ts +53 -0
- package/ab-list/index.tsx +107 -0
- package/ab-list/styles.module.css +82 -0
- package/ab-locale-switcher/index.tsx +59 -10
- package/ab-locale-switcher/styles.module.css +15 -4
- package/ab-main-headline/index.tsx +1 -0
- package/ab-main-headline/styles.module.css +32 -0
- package/ab-menu/index.tsx +6 -5
- package/ab-menu/styles.module.css +32 -0
- package/ab-name/index.tsx +1 -0
- package/ab-name/styles.module.css +32 -0
- package/ab-navbar/index.tsx +54 -46
- package/ab-navbar/styles.module.css +102 -28
- package/ab-navbar/view.tsx +166 -0
- package/ab-package-card/index.tsx +141 -0
- package/ab-package-card/styles.module.css +81 -0
- package/ab-page-paginator/index.tsx +1 -0
- package/ab-page-paginator/styles.module.css +32 -0
- package/ab-page-switcher/index.tsx +1 -0
- package/ab-page-switcher/styles.module.css +32 -0
- package/ab-preview/index.tsx +1 -0
- package/ab-preview/styles.module.css +32 -0
- package/ab-price/index.tsx +1 -0
- package/ab-price/styles.module.css +32 -0
- package/ab-price-tag/index.tsx +1 -0
- package/ab-price-tag/styles.module.css +32 -0
- package/ab-product/index.tsx +1 -0
- package/ab-product/styles.module.css +32 -0
- package/ab-product-item/index.tsx +1 -0
- package/ab-product-item/styles.module.css +32 -0
- package/ab-search-result/index.tsx +1 -0
- package/ab-search-result/styles.module.css +32 -0
- package/ab-search-trigger/index.tsx +157 -0
- package/ab-search-trigger/styles.module.css +96 -0
- package/ab-sidebar/index.tsx +91 -49
- package/ab-sidebar/styles.module.css +179 -31
- package/ab-sidebar/view.tsx +192 -0
- package/ab-switch-back/index.tsx +2 -1
- package/ab-switch-back/styles.module.css +32 -0
- package/ab-tab/index.tsx +2 -1
- package/ab-tab/styles.module.css +32 -0
- package/ab-tabs/index.tsx +1 -0
- package/ab-tabs/styles.module.css +32 -0
- package/ab-test-hello/index.tsx +1 -0
- package/ab-test-hello/styles.module.css +32 -0
- package/ab-text/index.tsx +1 -0
- package/ab-text/styles.module.css +32 -0
- package/ab-theme-toggle/index.tsx +21 -6
- package/ab-theme-toggle/styles.module.css +18 -3
- package/ab-toc/index.tsx +131 -0
- package/ab-toc/styles.module.css +66 -0
- package/ab-version-switcher/index.tsx +143 -0
- package/ab-version-switcher/styles.module.css +76 -0
- package/css/chrome-mq.css +32 -0
- package/css/doodle.css +32 -0
- package/css/logo.css +32 -0
- package/css/spinner.css +32 -0
- package/css/toast.css +32 -0
- package/index.ts +45 -0
- package/package.json +42 -10
- package/server/ab-avatar/index.tsx +2 -1
- package/server/ab-avatar/styles.module.css +32 -0
- package/server/ab-badge/index.tsx +1 -0
- package/server/ab-badge/styles.module.css +32 -0
- package/server/ab-brand/index.tsx +1 -1
- package/server/ab-button/index.tsx +6 -2
- package/server/ab-button/styles.module.css +39 -0
- package/server/ab-icon/index.tsx +13 -8
- package/server/ab-key-feature/index.tsx +2 -1
- package/server/ab-key-feature/styles.module.css +32 -0
- package/server/ab-name/index.tsx +1 -0
- package/server/ab-name/styles.module.css +32 -0
- package/server/ab-nav-link/index.tsx +2 -1
- package/server/ab-nav-link/styles.module.css +32 -0
- package/server/ab-navbar/index.tsx +44 -45
- package/server/ab-polygon/index.tsx +1 -0
- package/server/ab-polygon/styles.module.css +32 -0
- package/server/ab-sidebar/index.tsx +44 -49
- package/server/ab-switch-back/index.tsx +2 -1
- package/server/ab-switch-back/styles.module.css +32 -0
- package/server/ab-test-hello/index.tsx +1 -0
- package/server/ab-test-hello/styles.module.css +32 -0
- package/server/ab-text/index.tsx +1 -0
- package/server/ab-text/styles.module.css +32 -0
- package/server/index.ts +1 -0
- package/styles.css +32 -0
- package/types/index.d.ts +54 -0
- package/server/ab-navbar/styles.module.css +0 -35
- package/server/ab-sidebar/styles.module.css +0 -41
|
@@ -49,6 +49,10 @@ import { useCallback, useEffect, useId, useRef, useState } from 'react';
|
|
|
49
49
|
import clsx from 'clsx';
|
|
50
50
|
// ๐ฃ globe glyph
|
|
51
51
|
import AbIcon from '../ab-icon';
|
|
52
|
+
// ๐๏ธ 0.1.14 (G56): drawer presentation
|
|
53
|
+
import AbDrawerList from '../ab-drawer-list';
|
|
54
|
+
import AbBottomDrawer from '../ab-bottom-drawer';
|
|
55
|
+
import type { AbDrawerScope } from '../ab-drawer';
|
|
52
56
|
// ๐จ styles
|
|
53
57
|
import styles from './styles.module.css';
|
|
54
58
|
|
|
@@ -59,6 +63,12 @@ export interface AbLocaleOption {
|
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
// โ๏ธ props
|
|
66
|
+
/** ๐๏ธ how a picker opens (G56): popover menu, drawer, or drawer on mobile only */
|
|
67
|
+
export type AbPresentation = 'menu' | 'drawer' | 'auto';
|
|
68
|
+
/** ๐ฑ resolve `auto` at open time (no hydration flip: the server always renders the closed trigger) */
|
|
69
|
+
export const resolveAbPresentation = (p: AbPresentation = 'menu'): 'menu' | 'drawer' =>
|
|
70
|
+
p === 'auto' ? (typeof window !== 'undefined' && window.matchMedia?.('(max-width: 767.98px)').matches ? 'drawer' : 'menu') : p;
|
|
71
|
+
|
|
62
72
|
export interface AbLocaleSwitcherProps {
|
|
63
73
|
locales: readonly AbLocaleOption[]; // ๐ choices
|
|
64
74
|
current: string; // โ
active locale code
|
|
@@ -70,6 +80,10 @@ export interface AbLocaleSwitcherProps {
|
|
|
70
80
|
icon?: ReactNode; // ๐ผ๏ธ override the globe
|
|
71
81
|
className?: string; // ๐ท๏ธ
|
|
72
82
|
style?: CSSProperties; // ๐จ
|
|
83
|
+
/** ๐๏ธ 0.1.14 (G56, D40): `menu` (default) = popover menu; `drawer` = AbDrawerList; `auto` = drawer below 768px, menu above */
|
|
84
|
+
presentation?: AbPresentation;
|
|
85
|
+
drawerScope?: AbDrawerScope; // ๐บ๏ธ default 'app'
|
|
86
|
+
drawerSide?: 'top' | 'bottom' | 'start' | 'end'; // ๐งญ default 'bottom'
|
|
73
87
|
}
|
|
74
88
|
|
|
75
89
|
/**
|
|
@@ -87,7 +101,9 @@ export function getAbTypeaheadIndex(labels: readonly string[], from: number, cha
|
|
|
87
101
|
|
|
88
102
|
export function AbLocaleSwitcher(props: AbLocaleSwitcherProps) {
|
|
89
103
|
// ๐งฉ props
|
|
90
|
-
const { locales, current, label, onSelect, getHref, variant = 'icon', align = 'end', icon, className, style } = props;
|
|
104
|
+
const { locales, current, label, onSelect, getHref, variant = 'icon', align = 'end', icon, className, style, presentation = 'menu', drawerScope = 'app', drawerSide = 'bottom' } = props;
|
|
105
|
+
// ๐๏ธ how this open happens (decided on click)
|
|
106
|
+
const [mode, setMode] = useState<'menu' | 'drawer'>(presentation === 'drawer' ? 'drawer' : 'menu');
|
|
91
107
|
// ๐ช open?
|
|
92
108
|
const [open, setOpen] = useState(false);
|
|
93
109
|
// ๐ ids
|
|
@@ -110,22 +126,22 @@ export function AbLocaleSwitcher(props: AbLocaleSwitcherProps) {
|
|
|
110
126
|
|
|
111
127
|
// ๐ฏ on open, focus the checked item (after paint)
|
|
112
128
|
useEffect(() => {
|
|
113
|
-
if (!open) return; // ๐ค
|
|
129
|
+
if (!open || mode !== 'menu') return; // ๐ค (the drawer manages its own focus)
|
|
114
130
|
const id = requestAnimationFrame(() => focusItem(activeIndex)); // โญ๏ธ
|
|
115
131
|
return () => cancelAnimationFrame(id); // ๐งน
|
|
116
|
-
}, [open, activeIndex]);
|
|
132
|
+
}, [open, mode, activeIndex]);
|
|
117
133
|
|
|
118
134
|
// ๐ฑ๏ธ click outside closes (no focus steal)
|
|
119
135
|
useEffect(() => {
|
|
120
|
-
if (!open) return; // ๐ค
|
|
136
|
+
if (!open || mode !== 'menu') return; // ๐ค (the drawer portals outside rootRef: it has its own scrim)
|
|
121
137
|
const onDown = (e: PointerEvent) => { if (!rootRef.current?.contains(e.target as Node)) close(false); }; // ๐ช
|
|
122
138
|
document.addEventListener('pointerdown', onDown); // ๐
|
|
123
139
|
return () => document.removeEventListener('pointerdown', onDown); // ๐งน
|
|
124
|
-
}, [open, close]);
|
|
140
|
+
}, [open, mode, close]);
|
|
125
141
|
|
|
126
142
|
// โจ๏ธ trigger: ArrowDown/Up/Enter/Space open the menu
|
|
127
143
|
const onTriggerKey = (e: KeyboardEvent<HTMLButtonElement>) => {
|
|
128
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); setOpen(true); } // โฌ๏ธ
|
|
144
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); setMode(resolveAbPresentation(presentation)); setOpen(true); } // โฌ๏ธ
|
|
129
145
|
};
|
|
130
146
|
|
|
131
147
|
// โจ๏ธ menu keys
|
|
@@ -158,12 +174,12 @@ export function AbLocaleSwitcher(props: AbLocaleSwitcherProps) {
|
|
|
158
174
|
id={`${base}-trigger`} // ๐
|
|
159
175
|
type="button" // ๐งพ
|
|
160
176
|
className={clsx(styles.trigger, variant === 'menu' && styles.withText)} // ๐จ
|
|
161
|
-
aria-haspopup=
|
|
177
|
+
aria-haspopup={mode === 'drawer' ? 'dialog' : 'menu'} // โฟ
|
|
162
178
|
aria-expanded={open} // โฟ
|
|
163
|
-
aria-controls={`${base}-menu`} // ๐
|
|
179
|
+
aria-controls={mode === 'drawer' ? `${base}-drawer` : `${base}-menu`} // ๐
|
|
164
180
|
aria-label={variant === 'icon' ? `${label}: ${active?.label ?? current}` : undefined} // ๐ท๏ธ "Language: Franรงais"
|
|
165
181
|
title={label} // ๐ฌ
|
|
166
|
-
onClick={() => setOpen((o) => !o)} // ๐ฑ๏ธ
|
|
182
|
+
onClick={() => { if (!open) setMode(resolveAbPresentation(presentation)); setOpen((o) => !o); }} // ๐ฑ๏ธ (`auto` picks menu / drawer now)
|
|
167
183
|
onKeyDown={onTriggerKey} // โจ๏ธ
|
|
168
184
|
>
|
|
169
185
|
<span aria-hidden="true">{icon ?? <AbIcon name="language" size={20} />}</span>
|
|
@@ -174,7 +190,7 @@ export function AbLocaleSwitcher(props: AbLocaleSwitcherProps) {
|
|
|
174
190
|
id={`${base}-menu`} // ๐
|
|
175
191
|
role="menu" // โฟ
|
|
176
192
|
aria-labelledby={`${base}-trigger`} // ๐
|
|
177
|
-
hidden={!open} // ๐
|
|
193
|
+
hidden={!open || mode !== 'menu'} // ๐
|
|
178
194
|
className={styles.menu} // ๐จ
|
|
179
195
|
onKeyDown={onMenuKey} // โจ๏ธ
|
|
180
196
|
>
|
|
@@ -205,6 +221,39 @@ export function AbLocaleSwitcher(props: AbLocaleSwitcherProps) {
|
|
|
205
221
|
);
|
|
206
222
|
})}
|
|
207
223
|
</ul>
|
|
224
|
+
{/* ๐๏ธ 0.1.14 (G56): drawer presentation. No in-flow fallback here: the <details> below already is one */}
|
|
225
|
+
{presentation !== 'menu' ? (
|
|
226
|
+
<AbDrawerList
|
|
227
|
+
id={`${base}-drawer`}
|
|
228
|
+
open={open && mode === 'drawer'}
|
|
229
|
+
onClose={() => setOpen(false)} // ๐ช the drawer puts focus back on the trigger
|
|
230
|
+
scope={drawerScope}
|
|
231
|
+
side={drawerSide}
|
|
232
|
+
as={drawerSide === 'bottom' ? AbBottomDrawer : undefined} // ๐ฑ the mobile bottom drawer look
|
|
233
|
+
title={label}
|
|
234
|
+
noJsFallback={false}
|
|
235
|
+
value={current}
|
|
236
|
+
items={locales.map((l) => ({ value: l.code, label: l.label, lang: l.code, href: getHref?.(l.code) }))}
|
|
237
|
+
onSelect={(code) => onSelect?.(code)}
|
|
238
|
+
/>
|
|
239
|
+
) : null}
|
|
240
|
+
{/* ๐ซ JS off (0.1.13, gap-review): a native <details> list of hreflang links replaces the menu.
|
|
241
|
+
Only rendered with getHref (a callback can't run without JS). CSS shows it under (scripting: none). */}
|
|
242
|
+
{getHref ? (
|
|
243
|
+
<details className={styles.noJs} data-ab-part="locale-switcher-nojs">
|
|
244
|
+
<summary className={styles.trigger} aria-label={`${label}: ${active?.label ?? current}`}>
|
|
245
|
+
<span aria-hidden="true">{icon ?? <AbIcon name="language" size={20} />}</span>
|
|
246
|
+
<span lang={current}>{active?.label ?? current}</span>
|
|
247
|
+
</summary>
|
|
248
|
+
<ul className={styles.noJsList}>
|
|
249
|
+
{locales.map((l) => (
|
|
250
|
+
<li key={l.code}>
|
|
251
|
+
<a href={getHref(l.code)} hrefLang={l.code} lang={l.code} aria-current={l.code === current ? 'true' : undefined} className={styles.item}>{l.label}</a>
|
|
252
|
+
</li>
|
|
253
|
+
))}
|
|
254
|
+
</ul>
|
|
255
|
+
</details>
|
|
256
|
+
) : null}
|
|
208
257
|
</div>
|
|
209
258
|
);
|
|
210
259
|
}
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
}
|
|
64
64
|
.trigger:hover,
|
|
65
65
|
.trigger[aria-expanded='true'] {
|
|
66
|
-
background: color-mix(in srgb, currentColor 10%, transparent); /* ๐ซ๏ธ */
|
|
66
|
+
background: var(--ab-color-hover, color-mix(in srgb, currentColor 10%, transparent)); /* ๐ซ๏ธ */
|
|
67
67
|
}
|
|
68
68
|
.trigger:focus-visible,
|
|
69
69
|
.item:focus-visible {
|
|
70
|
-
outline: 2px solid var(--ab-focus-ring, var(--ab-color-primary, #A67C52)); /* ๐ */
|
|
70
|
+
outline: 2px solid var(--ab-color-accent, var(--ab-focus-ring, var(--ab-color-primary, #A67C52))); /* ๐ */
|
|
71
71
|
outline-offset: 2px; /* โ๏ธ */
|
|
72
72
|
}
|
|
73
73
|
@media (pointer: coarse) {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
padding: 0.25rem; /* ๐งฑ */
|
|
86
86
|
list-style: none; /* ๐งน */
|
|
87
87
|
border-radius: 0.75rem; /* ๐ฒ */
|
|
88
|
-
border: 1px solid var(--ab-color-outline-variant, rgb(0 0 0 / 0.12)); /* ๐๏ธ */
|
|
88
|
+
border: 1px solid var(--ab-color-border, var(--ab-color-outline-variant, rgb(0 0 0 / 0.12))); /* ๐๏ธ */
|
|
89
89
|
background: var(--ab-color-surface, #fff); /* ๐จ */
|
|
90
90
|
box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); /* ๐ซ๏ธ */
|
|
91
91
|
}
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
}
|
|
117
117
|
.item:hover,
|
|
118
118
|
.item:focus-visible {
|
|
119
|
-
background: color-mix(in srgb, currentColor 8%, transparent); /* ๐ซ๏ธ */
|
|
119
|
+
background: var(--ab-color-hover, color-mix(in srgb, currentColor 8%, transparent)); /* ๐ซ๏ธ */
|
|
120
120
|
}
|
|
121
121
|
.item[aria-checked='true'] {
|
|
122
122
|
font-weight: 600; /* ๐ช */
|
|
@@ -125,3 +125,14 @@
|
|
|
125
125
|
width: 1em; /* ๐ fixed column */
|
|
126
126
|
color: var(--ab-color-bronze-text, #8A6440); /* โฟ */
|
|
127
127
|
}
|
|
128
|
+
|
|
129
|
+
/* ๐ซ JS off fallback (0.1.13): native <details> + hreflang links */
|
|
130
|
+
.noJs { display: none; } /* ๐ JS on */
|
|
131
|
+
.noJsList { list-style: none; margin: 4px 0 0; padding: 4px; } /* ๐ */
|
|
132
|
+
.noJs > summary { list-style: none; } /* ๐ซ marker */
|
|
133
|
+
.noJs > summary::-webkit-details-marker { display: none; } /* ๐ซ marker (WebKit) */
|
|
134
|
+
@media (scripting: none) {
|
|
135
|
+
.root > .trigger,
|
|
136
|
+
.root > .menu { display: none; } /* ๐ needs JS */
|
|
137
|
+
.noJs { display: block; } /* ๐๏ธ */
|
|
138
|
+
}
|
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license MIT
|
|
3
|
+
* ~~~~~~~~~~~~
|
|
4
|
+
* ab-nextjs-components
|
|
5
|
+
* ~~~~~~~~~~~~
|
|
6
|
+
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* @project: ab-nextjs-components
|
|
27
|
+
* @name: styles.module.css
|
|
28
|
+
* @file: ab-main-headline/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abMainHeadline {
|
|
2
34
|
display: flex;
|
|
3
35
|
flex-direction: column;
|
package/ab-menu/index.tsx
CHANGED
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
* @project: ab-nextjs-components
|
|
9
9
|
* @name: AbMenu - Client (port of lyd-menu)
|
|
10
10
|
* @file: ab-menu/index.tsx
|
|
11
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
'use client';
|
|
14
15
|
|
|
15
16
|
import type { ReactElement } from 'react';
|
|
16
17
|
import { forwardRef } from 'react';
|
|
17
|
-
import Link from 'next/link
|
|
18
|
+
import Link from '../ab-link'; // ๐ G42: injectable via AbLinkProvider (default next/link)
|
|
18
19
|
import clsx from 'clsx';
|
|
20
|
+
import AbIcon from '../ab-icon'; // ๐ฃ G2
|
|
19
21
|
import styles from './styles.module.css';
|
|
20
22
|
|
|
21
23
|
export interface AbMenuItemData {
|
|
@@ -71,9 +73,8 @@ const AbMenu = forwardRef<HTMLMenuElement, AbMenuProps>(function AbMenu(
|
|
|
71
73
|
const body = (
|
|
72
74
|
<>
|
|
73
75
|
{item.icon ? (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
</span>
|
|
76
|
+
// ๐ฃ 0.1.13 (G2): AbIcon (filled when selected), no Material Symbols font
|
|
77
|
+
<AbIcon name={item.icon} variant={item.selected ? 'filled' : 'outlined'} size={20} className={styles.abMenuIcon} />
|
|
77
78
|
) : null}
|
|
78
79
|
<span className={styles.abMenuLabel}>{item.label}</span>
|
|
79
80
|
</>
|
|
@@ -87,7 +88,7 @@ const AbMenu = forwardRef<HTMLMenuElement, AbMenuProps>(function AbMenu(
|
|
|
87
88
|
if (item.href && !item.disabled) {
|
|
88
89
|
return (
|
|
89
90
|
<li key={item.id} className={clsx('menu-item', itemClass)} data-id={item.id} data-action={item.action}>
|
|
90
|
-
<Link href={item.href} className={styles.abMenuLink} onClick={item.onClick}>
|
|
91
|
+
<Link href={item.href} className={styles.abMenuLink} onClick={item.onClick} aria-current={item.selected ? 'page' : undefined}>
|
|
91
92
|
{body}
|
|
92
93
|
</Link>
|
|
93
94
|
</li>
|
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license MIT
|
|
3
|
+
* ~~~~~~~~~~~~
|
|
4
|
+
* ab-nextjs-components
|
|
5
|
+
* ~~~~~~~~~~~~
|
|
6
|
+
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* @project: ab-nextjs-components
|
|
27
|
+
* @name: styles.module.css
|
|
28
|
+
* @file: ab-menu/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abMenu {
|
|
2
34
|
display: flex;
|
|
3
35
|
flex-direction: column;
|
package/ab-name/index.tsx
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license MIT
|
|
3
|
+
* ~~~~~~~~~~~~
|
|
4
|
+
* ab-nextjs-components
|
|
5
|
+
* ~~~~~~~~~~~~
|
|
6
|
+
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* @project: ab-nextjs-components
|
|
27
|
+
* @name: styles.module.css
|
|
28
|
+
* @file: ab-name/styles.module.css
|
|
29
|
+
* @type: CSS Stylesheet
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
1
33
|
.abName {
|
|
2
34
|
display: inline-flex;
|
|
3
35
|
align-items: baseline;
|
package/ab-navbar/index.tsx
CHANGED
|
@@ -5,64 +5,72 @@
|
|
|
5
5
|
* ~~~~~~~~~~~~
|
|
6
6
|
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
7
|
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
8
26
|
* @project: ab-nextjs-components
|
|
9
|
-
* @name: AbNavbar - Client (
|
|
27
|
+
* @name: AbNavbar - Client (G41)
|
|
10
28
|
* @file: ab-navbar/index.tsx
|
|
29
|
+
* @type: Client Component
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*
|
|
32
|
+
* Example usage:
|
|
33
|
+
* <AbNavbar activeHref="/docs" items={[
|
|
34
|
+
* { kind: 'link', href: '/', icon: 'home', label: 'Home' },
|
|
35
|
+
* { kind: 'button', id: 'menu', icon: 'menu', label: 'Menu', onSelect: openSheet },
|
|
36
|
+
* ]} />
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
41
|
+
* MOTTO: We'll always do more ๐!!!
|
|
42
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
11
43
|
*/
|
|
12
44
|
|
|
13
45
|
'use client';
|
|
14
46
|
|
|
47
|
+
// โ๏ธ React
|
|
15
48
|
import type { ReactElement } from 'react';
|
|
16
|
-
|
|
49
|
+
// ๐งญ route fallback
|
|
17
50
|
import { usePathname } from 'next/navigation';
|
|
18
|
-
|
|
19
|
-
import
|
|
51
|
+
// ๐ 0.1.13 (Joseph #10): locale-stripped pathname
|
|
52
|
+
import { stripAbLocalePrefix, useAbLocales } from '../ab-link';
|
|
53
|
+
// ๐ฃ client AbIcon
|
|
54
|
+
import AbIcon from '../ab-icon';
|
|
55
|
+
// ๐ผ๏ธ shared view
|
|
56
|
+
import { AbNavbarView, isAbNavbarActive, type AbNavbarBaseProps } from './view';
|
|
20
57
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
value: string;
|
|
25
|
-
label: string;
|
|
26
|
-
};
|
|
58
|
+
// ๐ฆ shared types
|
|
59
|
+
export type { AbNavbarItem, AbNavbarLinkItem, AbNavbarButtonItem, AbNavbarLink } from './view';
|
|
60
|
+
export { isAbNavbarActive } from './view';
|
|
27
61
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
type?: 'customer' | 'admin';
|
|
31
|
-
page?: string;
|
|
32
|
-
links?: AbNavbarLink[];
|
|
33
|
-
}
|
|
62
|
+
/** โ๏ธ Client props (link and button items). */
|
|
63
|
+
export type AbNavbarProps = AbNavbarBaseProps;
|
|
34
64
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<nav data-type={type} data-ab-part="bottomBar" className={clsx('AbNavbar', styles.abNavbar, className)} aria-label="Primary">
|
|
44
|
-
<ul className={styles.abNavbarList}>
|
|
45
|
-
{links.map((link) => {
|
|
46
|
-
const active = page ? page === link.value : pathname === link.href || pathname.startsWith(`${link.href}/`);
|
|
47
|
-
return (
|
|
48
|
-
<li key={link.value}>
|
|
49
|
-
<Link
|
|
50
|
-
href={link.href}
|
|
51
|
-
data-active={active ? 'true' : 'false'}
|
|
52
|
-
className={styles.abNavbarLink}
|
|
53
|
-
>
|
|
54
|
-
<span className={clsx('material-symbols-rounded', styles.abNavbarIcon)} aria-hidden>
|
|
55
|
-
{link.icon}
|
|
56
|
-
</span>
|
|
57
|
-
<span>{link.label}</span>
|
|
58
|
-
</Link>
|
|
59
|
-
</li>
|
|
60
|
-
);
|
|
61
|
-
})}
|
|
62
|
-
</ul>
|
|
63
|
-
</nav>
|
|
64
|
-
);
|
|
65
|
+
/** ๐ฑ AbNavbar (client, G41): mobile bottom bar, filled active icon, aria-current, safe-area padding. */
|
|
66
|
+
const AbNavbar = (props: AbNavbarProps): ReactElement => {
|
|
67
|
+
const appLocales = useAbLocales(); // ๐ from AbLinkProvider
|
|
68
|
+
const pathname = stripAbLocalePrefix(usePathname() ?? '', props.locales ?? appLocales); // ๐งญ `/fr/docs` โ `/docs`
|
|
69
|
+
const { page, activeHref } = props;
|
|
70
|
+
const active = (href: string, value?: string) => (page ? page === value : isAbNavbarActive(href, activeHref ?? pathname)); // ๐ฏ
|
|
71
|
+
return <AbNavbarView props={props} Icon={AbIcon} active={active} />;
|
|
65
72
|
};
|
|
66
73
|
|
|
74
|
+
// ๐ฆ exports
|
|
67
75
|
export default AbNavbar;
|
|
68
76
|
export { AbNavbar };
|
|
@@ -1,35 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @license MIT
|
|
3
|
+
* ~~~~~~~~~~~~
|
|
4
|
+
* ab-nextjs-components
|
|
5
|
+
* ~~~~~~~~~~~~
|
|
6
|
+
* Copyright (c) 2026 Abraham Ukachi. The abElements Project.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the 'Software'), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* @project: ab-nextjs-components
|
|
27
|
+
* @name: AbNavbar - Styles (G41)
|
|
28
|
+
* @file: ab-navbar/styles.module.css
|
|
29
|
+
* @type: CSS Module
|
|
30
|
+
* @authors: Abraham Ukachi <abrahamukachi@gmail.com>
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
35
|
+
* MOTTO: We'll always do more ๐!!!
|
|
36
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/* ๐ฑ bottom bar: M3 navigation bar, safe-area aware */
|
|
1
40
|
.abNavbar {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
box-sizing: border-box;
|
|
41
|
+
width: 100%; /* ๐ */
|
|
42
|
+
box-sizing: border-box; /* ๐ฆ */
|
|
43
|
+
padding: 12px 8px calc(16px + env(safe-area-inset-bottom, 0px)); /* ๐ฑ home indicator */
|
|
44
|
+
padding-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px)); /* ๐ฑ notch */
|
|
45
|
+
background: var(--ab-color-surface-container, transparent); /* ๐จ */
|
|
8
46
|
}
|
|
9
47
|
.abNavbarList {
|
|
10
|
-
display: flex;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
padding: 0;
|
|
16
|
-
overflow-x: auto;
|
|
48
|
+
display: flex; /* ๐ */
|
|
49
|
+
justify-content: space-around; /* โ๏ธ */
|
|
50
|
+
list-style: none; /* ๐ซ */
|
|
51
|
+
margin: 0; /* ๐ซ */
|
|
52
|
+
padding: 0; /* ๐ซ */
|
|
17
53
|
}
|
|
54
|
+
.abNavbarList > li { flex: 1 1 0; display: flex; justify-content: center; } /* โ๏ธ equal slots */
|
|
55
|
+
/* ๐ item: pill icon over a label */
|
|
18
56
|
.abNavbarLink {
|
|
19
|
-
display:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
57
|
+
display: flex; /* ๐ */
|
|
58
|
+
flex-direction: column; /* โฌ๏ธ */
|
|
59
|
+
align-items: center; /* โ๏ธ */
|
|
60
|
+
gap: 4px; /* โ๏ธ */
|
|
61
|
+
min-width: 64px; /* ๐ */
|
|
62
|
+
border: 0; /* ๐ซ (buttons) */
|
|
63
|
+
background: none; /* ๐ซ */
|
|
64
|
+
font: inherit; /* ๐ค */
|
|
65
|
+
color: var(--ab-color-on-surface-variant, inherit); /* ๐๏ธ */
|
|
66
|
+
text-decoration: none; /* ๐ซ */
|
|
67
|
+
cursor: pointer; /* ๐ */
|
|
30
68
|
}
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
69
|
+
.abNavbarPill {
|
|
70
|
+
display: grid; /* ๐ */
|
|
71
|
+
place-items: center; /* ๐ฏ */
|
|
72
|
+
width: 64px; /* ๐ */
|
|
73
|
+
height: 32px; /* ๐ */
|
|
74
|
+
border-radius: 999px; /* ๐ข */
|
|
34
75
|
}
|
|
35
|
-
.
|
|
76
|
+
.abNavbarLabel { font-size: 12px; font-weight: 500; line-height: 16px; } /* ๐ค */
|
|
77
|
+
.abNavbarLink[data-active='true'],
|
|
78
|
+
.abNavbarLink[aria-expanded='true'] { color: var(--ab-color-on-surface, inherit); } /* ๐ฏ */
|
|
79
|
+
.abNavbarLink[data-active='true'] .abNavbarPill,
|
|
80
|
+
.abNavbarLink[aria-expanded='true'] .abNavbarPill { background: var(--ab-color-tint, var(--ab-color-secondary-container, rgb(0 0 0 / 0.08))); } /* ๐ฏ */
|
|
81
|
+
.abNavbarLink[data-active='true'] .abNavbarLabel { font-weight: 700; } /* ๐ค */
|
|
82
|
+
.abNavbarLink:focus-visible {
|
|
83
|
+
outline: var(--ab-focus-ring-width, 2px) solid var(--ab-color-accent, var(--ab-color-primary, #8f4c38)); /* โฟ */
|
|
84
|
+
outline-offset: var(--ab-focus-ring-offset, 2px); /* โฟ */
|
|
85
|
+
border-radius: 12px; /* ๐ข */
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ๐ซ๐ง 0.1.13: disabled / coming-soon button items (inert, still focusable) */
|
|
89
|
+
.abNavbarLink[aria-disabled='true'] { cursor: default; opacity: 0.6; } /* ๐ซ */
|
|
90
|
+
.abNavbarSoon { font-size: 10px; line-height: 12px; opacity: 0.85; } /* ๐ง tag under the label */
|
|
91
|
+
.abNavbarSrOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* ๐ถ๏ธ */
|
|
92
|
+
|
|
93
|
+
/* ===== ๐ฑ 0.1.14 (P18, Home spec ยง4 bottom nav): indicator="none" ยท blur ===== */
|
|
94
|
+
.abNavbar[data-indicator='none'] { padding-top: 8px; padding-bottom: env(safe-area-inset-bottom, 0px); min-height: calc(50px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; } /* ๐ 84px with the iPhone home indicator */
|
|
95
|
+
.abNavbar[data-indicator='none'] .abNavbarList { justify-content: space-around; }
|
|
96
|
+
.abNavbar[data-indicator='none'] .abNavbarList > li { flex: 0 1 80px; } /* โ๏ธ 4 ร 80px */
|
|
97
|
+
.abNavbar[data-indicator='none'] .abNavbarLink { width: 80px; min-width: 0; gap: 3px; color: var(--ab-color-faint, inherit); } /* ๐ */
|
|
98
|
+
.abNavbar[data-indicator='none'] .abNavbarLink .abNavbarPill { width: auto; height: auto; background: none; } /* ๐ซ pill (0,4,0 beats the active pill rules) */
|
|
99
|
+
.abNavbar[data-indicator='none'] .abNavbarLabel { font-size: 11.5px; font-weight: 550; line-height: 1.2; } /* ๐ค */
|
|
100
|
+
.abNavbar[data-indicator='none'] .abNavbarLink[data-active='true'],
|
|
101
|
+
.abNavbar[data-indicator='none'] .abNavbarLink[aria-expanded='true'] { color: var(--ab-color-accent-text, inherit); } /* ๐ฏ */
|
|
102
|
+
.abNavbar[data-indicator='none'] .abNavbarLink[data-active='true'] .abNavbarLabel { font-weight: 700; }
|
|
103
|
+
.abNavbar[data-indicator='none'] .abNavbarLink:focus-visible { outline-color: var(--ab-color-accent, #a67c52); }
|
|
104
|
+
.abNavbar[data-blur='true'] {
|
|
105
|
+
background: color-mix(in srgb, var(--ab-color-bg, #fff8f5) 92%, transparent); /* ๐ซ๏ธ */
|
|
106
|
+
-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); /* ๐ง */
|
|
107
|
+
border-top: 1px solid var(--ab-color-div, rgb(92 64 48 / 0.11)); /* โ */
|
|
108
|
+
}
|
|
109
|
+
:global(.dark) .abNavbar[data-blur='true'], :global([data-theme='dark']) .abNavbar[data-blur='true'] { background: #1f170f; } /* ๐ mock: solid warm */
|