ab-nextjs-components 0.1.13 โ†’ 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.
Files changed (53) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +30 -0
  3. package/ab-app-bar/index.tsx +39 -10
  4. package/ab-app-bar/styles.module.css +43 -4
  5. package/ab-bottom-drawer/index.tsx +71 -0
  6. package/ab-bottom-drawer/styles.module.css +66 -0
  7. package/ab-breadcrumbs/index.tsx +92 -0
  8. package/ab-breadcrumbs/styles.module.css +54 -0
  9. package/ab-button/helpers.ts +6 -1
  10. package/ab-button/index.tsx +8 -2
  11. package/ab-button/styles.module.css +39 -0
  12. package/ab-card/styles.module.css +1 -1
  13. package/ab-carousel/styles.module.css +1 -1
  14. package/ab-chip/index.tsx +16 -4
  15. package/ab-chip/styles.module.css +12 -1
  16. package/ab-confirm-drawer/index.tsx +97 -0
  17. package/ab-confirm-drawer/styles.module.css +41 -0
  18. package/ab-drawer/index.tsx +307 -0
  19. package/ab-drawer/styles.module.css +127 -0
  20. package/ab-drawer/use-ab-drawer.ts +89 -0
  21. package/ab-drawer-list/index.tsx +118 -0
  22. package/ab-drawer-list/styles.module.css +65 -0
  23. package/ab-flow-diagram/styles.module.css +2 -2
  24. package/ab-icon/builtin.ts +4 -0
  25. package/ab-icon-button/index.tsx +12 -1
  26. package/ab-icon-button/styles.module.css +1 -1
  27. package/ab-install-snippet/index.tsx +51 -29
  28. package/ab-install-snippet/styles.module.css +34 -2
  29. package/ab-kbd/styles.module.css +1 -1
  30. package/ab-list/index.tsx +107 -0
  31. package/ab-list/styles.module.css +82 -0
  32. package/ab-locale-switcher/index.tsx +42 -10
  33. package/ab-locale-switcher/styles.module.css +4 -4
  34. package/ab-navbar/styles.module.css +20 -2
  35. package/ab-navbar/view.tsx +7 -4
  36. package/ab-package-card/index.tsx +49 -2
  37. package/ab-package-card/styles.module.css +40 -0
  38. package/ab-search-trigger/index.tsx +17 -2
  39. package/ab-search-trigger/styles.module.css +27 -1
  40. package/ab-sidebar/index.tsx +5 -2
  41. package/ab-sidebar/styles.module.css +48 -5
  42. package/ab-sidebar/view.tsx +14 -4
  43. package/ab-theme-toggle/index.tsx +21 -6
  44. package/ab-theme-toggle/styles.module.css +18 -3
  45. package/ab-toc/index.tsx +9 -2
  46. package/ab-toc/styles.module.css +20 -8
  47. package/ab-version-switcher/index.tsx +143 -0
  48. package/ab-version-switcher/styles.module.css +76 -0
  49. package/index.ts +27 -0
  50. package/package.json +18 -3
  51. package/server/ab-button/index.tsx +6 -2
  52. package/server/ab-button/styles.module.css +39 -0
  53. package/types/index.d.ts +19 -0
@@ -0,0 +1,127 @@
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: AbDrawer styles (G53)
28
+ * @file: ab-drawer/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
+
40
+ /* ๐Ÿ“ the anchor is layout-neutral: the drawer itself lives in the scope's layer */
41
+ .abDrawerAnchor { display: contents; }
42
+
43
+ /* ๐Ÿงฑ the layer: absolute `inset: 0` INSIDE the scope box (app / main / aside), so a drawer is clipped
44
+ by its scope and never makes the document scroll (D34). Clicks pass through when no drawer is open. */
45
+ .abDrawerLayer {
46
+ position: absolute; /* ๐Ÿ“Œ inside the scope box */
47
+ inset: 0; /* ๐Ÿ“ the whole scope */
48
+ z-index: 60; /* โฌ†๏ธ above the panes and the aside sheet (30) */
49
+ overflow: hidden; /* โœ‚๏ธ a sliding panel never leaks out */
50
+ pointer-events: none; /* ๐Ÿ–ฑ๏ธ idle layer = transparent to clicks */
51
+ contain: layout paint; /* ๐Ÿš€ */
52
+ }
53
+ .abDrawerLayer[data-host='body'] { position: fixed; } /* ๐Ÿ“Œ no AbAppLayout: cover the viewport */
54
+
55
+ .abDrawerFrame { position: absolute; inset: 0; pointer-events: auto; } /* ๐Ÿ–ฑ๏ธ a drawer is up */
56
+
57
+ /* ๐ŸŒซ๏ธ scrim */
58
+ .abDrawerScrim {
59
+ position: absolute; /* ๐Ÿ“Œ */
60
+ inset: 0; /* ๐Ÿ“ */
61
+ background: var(--ab-scrim-color, rgb(25 18 12 / 0.4)); /* ๐ŸŒซ๏ธ theme 0.3.5: 40% light / 60% dark (John) */
62
+ opacity: 0; /* ๐Ÿซฅ */
63
+ --ab-motion-duration: var(--ab-drawer-duration, 240ms); /* ๐ŸŽž๏ธ fade = .ab-motion-colors (ab-nextjs-animations) */
64
+ }
65
+ .abDrawerFrame[data-state='open'] > .abDrawerScrim { opacity: 1; } /* ๐ŸŒซ๏ธ */
66
+
67
+ /* ๐Ÿ—„๏ธ the panel */
68
+ .abDrawer {
69
+ --ab-drawer-shift: 100%; /* ๐Ÿ› how far it starts off-screen */
70
+ position: absolute; /* ๐Ÿ“Œ */
71
+ display: flex; /* ๐Ÿ“ header ยท body ยท footer */
72
+ flex-direction: column; /* โ†•๏ธ */
73
+ box-sizing: border-box; /* ๐Ÿ“ฆ */
74
+ margin: 0; /* ๐Ÿงน */
75
+ min-width: 0; /* ๐Ÿšซ overflow */
76
+ min-height: 0; /* ๐Ÿšซ overflow */
77
+ background: var(--ab-color-surface-container-low, var(--surface-color, Canvas)); /* ๐ŸŽจ */
78
+ color: var(--ab-color-on-surface, var(--on-surface-color, CanvasText)); /* ๐Ÿ–‹๏ธ */
79
+ box-shadow: 0 8px 32px rgb(0 0 0 / 0.24); /* ๐ŸŒ— */
80
+ outline: none; /* ๐ŸŽฏ the panel itself is only a fallback focus target */
81
+ overscroll-behavior: contain; /* ๐Ÿšซ scroll chaining (G54) */
82
+ --ab-motion-duration: var(--ab-drawer-duration, 240ms); /* ๐ŸŽž๏ธ the panes slide = .ab-motion-transform (ab-nextjs-animations) */
83
+ --ab-motion-easing: cubic-bezier(0.2, 0, 0, 1); /* ๐Ÿš€ */
84
+ }
85
+ .abDrawer[data-side='bottom'] { inset: auto 0 0 0; max-height: min(85%, var(--ab-drawer-size, 480px)); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(var(--ab-drawer-shift)); } /* โฌ†๏ธ */
86
+ .abDrawer[data-side='top'] { inset: 0 0 auto 0; max-height: min(85%, var(--ab-drawer-size, 480px)); border-radius: 0 0 16px 16px; padding-top: env(safe-area-inset-top, 0px); transform: translateY(calc(-1 * var(--ab-drawer-shift))); } /* โฌ‡๏ธ */
87
+ .abDrawer[data-side='left'] { inset: 0 auto 0 0; width: min(85%, var(--ab-drawer-size, 360px)); transform: translateX(calc(-1 * var(--ab-drawer-shift))); } /* โžก๏ธ */
88
+ .abDrawer[data-side='right'] { inset: 0 0 0 auto; width: min(85%, var(--ab-drawer-size, 360px)); transform: translateX(var(--ab-drawer-shift)); } /* โฌ…๏ธ */
89
+ /* ๐ŸŒ logical sides follow the writing direction */
90
+ .abDrawer[data-side='start'] { inset-block: 0; inset-inline-start: 0; width: min(85%, var(--ab-drawer-size, 360px)); transform: translateX(calc(-1 * var(--ab-drawer-shift))); }
91
+ .abDrawer[data-side='end'] { inset-block: 0; inset-inline-end: 0; width: min(85%, var(--ab-drawer-size, 360px)); transform: translateX(var(--ab-drawer-shift)); }
92
+ .abDrawer[data-side='start']:dir(rtl) { transform: translateX(var(--ab-drawer-shift)); } /* ๐ŸŒ RTL */
93
+ .abDrawer[data-side='end']:dir(rtl) { transform: translateX(calc(-1 * var(--ab-drawer-shift))); } /* ๐ŸŒ RTL */
94
+ .abDrawerFrame[data-state='open'] > .abDrawer { transform: none; } /* ๐Ÿ›ฌ slid in */
95
+
96
+ .abDrawerHeader { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px 20px; } /* ๐Ÿ” */
97
+ .abDrawerTitle { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.125rem; font-weight: 600; } /* ๐Ÿท๏ธ */
98
+ .abDrawerClose {
99
+ flex: none; /* ๐Ÿ“ */
100
+ inline-size: 40px; /* ๐Ÿ“ */
101
+ block-size: 40px; /* ๐Ÿ“ */
102
+ border: 0; /* ๐Ÿงน */
103
+ border-radius: 999px; /* ๐ŸŸข */
104
+ background: transparent; /* ๐ŸŽจ */
105
+ color: inherit; /* ๐Ÿ–‹๏ธ */
106
+ font: inherit; /* ๐Ÿ”ค */
107
+ cursor: pointer; /* ๐Ÿ–ฑ๏ธ */
108
+ }
109
+ .abDrawerClose:hover { background: var(--ab-color-surface-container-high, rgb(0 0 0 / 0.06)); } /* ๐Ÿ–ฑ๏ธ */
110
+ .abDrawerClose:focus-visible { outline: var(--ab-focus-ring-width, 2px) solid var(--ab-color-accent, var(--ab-color-primary, #8f4c38)); outline-offset: 2px; } /* โ™ฟ */
111
+ .abDrawerBody { flex: 1 1 auto; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; padding: 8px 20px 16px; } /* ๐Ÿ“œ its own scroller */
112
+ .abDrawerFooter { flex: none; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; } /* ๐Ÿ”š */
113
+
114
+ /* โ™ฟ reduced motion: no slide, no fade (handled by ab-nextjs-animations .ab-motion-*) */
115
+
116
+ /* ๐Ÿงฉ D41 no-JS fallback: an in-flow section; hidden as soon as scripting runs (hydration swaps in the drawer) */
117
+ .abDrawerFallback { display: block; margin-block: 16px; border: var(--ab-divider-hairline, 1px solid rgb(0 0 0 / 0.12)); border-radius: 12px; }
118
+ .abDrawerFallback .abDrawerTitle { padding: 12px 20px 0; }
119
+ .abDrawerFallback .abDrawerBody { overflow: visible; }
120
+ @media (scripting: enabled) {
121
+ .abDrawerFallback { display: none; }
122
+ }
123
+
124
+ /* ๐Ÿ“ the scope box (.AbAppLayout / main / aside pane) is the layer's containing block while a drawer uses it.
125
+ :where() = zero specificity, so a host that is already positioned (fixed / absolute aside) keeps its own.
126
+ The local class inside :has() keeps CSS-modules "pure" mode happy. (A core rule could own this later.) */
127
+ :where([data-ab-drawer-host]:has(> .abDrawerLayer)) { position: relative; }
@@ -0,0 +1,89 @@
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: useAbDrawer (G53)
28
+ * @file: ab-drawer/use-ab-drawer.ts
29
+ * @type: Client hook
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ *
32
+ * Example usage:
33
+ * 1+|> const drawer = useAbDrawer('app')
34
+ * -|> <button {...drawer.triggerProps}>Language</button>
35
+ * -|> <AbDrawer {...drawer.drawerProps} title="Language">โ€ฆ</AbDrawer>
36
+ */
37
+
38
+ /*
39
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
40
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
41
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
42
+ */
43
+
44
+
45
+ 'use client';
46
+
47
+ // โš›๏ธ React
48
+ import { useCallback, useId, useMemo, useState } from 'react';
49
+
50
+ /** ๐Ÿ—บ๏ธ which box clips the drawer (G53): the whole app, the main pane or the aside pane */
51
+ export type AbDrawerScope = 'app' | 'main' | 'aside';
52
+
53
+ /** ๐ŸŽ›๏ธ what useAbDrawer returns */
54
+ export interface UseAbDrawer {
55
+ scope: AbDrawerScope; // ๐Ÿ—บ๏ธ
56
+ id: string; // ๐Ÿ†” the drawer id (`aria-controls` target)
57
+ open: boolean; // ๐Ÿšช is it open?
58
+ show: () => void; // โž• open it
59
+ close: () => void; // โž– close it (Escape / scrim / buttons)
60
+ toggle: () => void; // ๐Ÿ”
61
+ setOpen: (open: boolean) => void; // ๐ŸŽš๏ธ controlled setter
62
+ /** ๐Ÿ”˜ spread on the trigger button: aria-expanded / aria-controls / aria-haspopup / onClick */
63
+ triggerProps: { 'aria-expanded': boolean; 'aria-controls': string; 'aria-haspopup': 'dialog'; onClick: () => void };
64
+ /** ๐Ÿ—„๏ธ spread on the drawer: id / scope / open / onClose */
65
+ drawerProps: { id: string; scope: AbDrawerScope; open: boolean; onClose: () => void };
66
+ }
67
+
68
+ /**
69
+ * ๐ŸŽ›๏ธ useAbDrawer(scope) โ€” one drawer's open state + the trigger / drawer prop bags (G53).
70
+ *
71
+ * ๐Ÿงญ Lives in **components** (next to AbDrawer), not in core: it holds no layout state, only `open`,
72
+ * and components doesn't depend on core. Focus return is handled by AbDrawer itself.
73
+ */
74
+ export function useAbDrawer(scope: AbDrawerScope = 'app', options: { defaultOpen?: boolean; id?: string } = {}): UseAbDrawer {
75
+ const auto = `ab-drawer-${useId().replace(/[^A-Za-z0-9_-]/g, '')}`; // ๐Ÿ†” stable across SSR + hydration
76
+ const id = options.id ?? auto; // ๐Ÿ†”
77
+ const [open, setOpen] = useState<boolean>(options.defaultOpen ?? false); // ๐Ÿšช
78
+ const show = useCallback(() => setOpen(true), []); // โž•
79
+ const close = useCallback(() => setOpen(false), []); // โž–
80
+ const toggle = useCallback(() => setOpen((o) => !o), []); // ๐Ÿ”
81
+ return useMemo(() => ({
82
+ scope, id, open, show, close, toggle, setOpen,
83
+ triggerProps: { 'aria-expanded': open, 'aria-controls': id, 'aria-haspopup': 'dialog' as const, onClick: toggle },
84
+ drawerProps: { id, scope, open, onClose: close },
85
+ }), [scope, id, open, show, close, toggle]);
86
+ }
87
+
88
+ // ๐Ÿ“ฆ default export
89
+ export default useAbDrawer;
@@ -0,0 +1,118 @@
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: AbDrawerList (G53 preset)
28
+ * @file: ab-drawer-list/index.tsx
29
+ * @type: Client component
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ *
32
+ * Example usage:
33
+ * 1+|> <AbDrawerList scope="app" side="bottom" open={d.open} onClose={d.close} title="Language"
34
+ * -|> items={[{ value: 'en', label: 'English' }, { value: 'fr', label: 'Franรงais' }]} value="en" onSelect={setLocale} />
35
+ */
36
+
37
+ /*
38
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
39
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
40
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41
+ */
42
+
43
+
44
+ 'use client';
45
+
46
+ // โš›๏ธ React
47
+ import type { ReactElement, ReactNode } from 'react';
48
+ // ๐Ÿงต classes
49
+ import clsx from 'clsx';
50
+ // ๐Ÿ—„๏ธ the drawer
51
+ import AbDrawer, { type AbDrawerProps } from '../ab-drawer';
52
+ import type { ComponentType } from 'react';
53
+ // ๐Ÿ”— links go through AbLinkProvider (locale-aware apps)
54
+ import Link from '../ab-link';
55
+ // ๐ŸŽจ styles
56
+ import styles from './styles.module.css';
57
+
58
+ /** ๐Ÿ“‹ one choice */
59
+ export interface AbDrawerListItem {
60
+ value: string; // ๐Ÿ†” e.g. a locale code
61
+ label: ReactNode; // ๐Ÿท๏ธ
62
+ description?: ReactNode; // ๐Ÿ“ a second line
63
+ icon?: ReactNode; // ๐Ÿ”ฃ leading, decorative
64
+ href?: string; // ๐Ÿ”— render a link (e.g. the same page in another locale) instead of a button
65
+ lang?: string; // ๐ŸŒ e.g. 'fr' for "Franรงais" (screen readers pronounce it right)
66
+ disabled?: boolean; // ๐Ÿšซ
67
+ }
68
+
69
+ /** โš™๏ธ props: every AbDrawer prop, plus the list */
70
+ export interface AbDrawerListProps extends Omit<AbDrawerProps, 'children'> {
71
+ as?: ComponentType<AbDrawerProps>; // ๐Ÿงฑ the drawer to render in (default AbDrawer; e.g. AbBottomDrawer)
72
+ items: AbDrawerListItem[]; // ๐Ÿ“‹
73
+ value?: string | null; // ๐ŸŽฏ the selected item (`aria-current="true"` + a check mark)
74
+ onSelect?: (value: string) => void; // ๐Ÿ””
75
+ closeOnSelect?: boolean; // ๐Ÿšช default true
76
+ listLabel?: string; // โ™ฟ the list's name when the title isn't enough
77
+ }
78
+
79
+ /**
80
+ * ๐Ÿ“‹ AbDrawerList โ€” AbDrawer with one selectable list (languages, sort orders, โ€ฆ). D40: the mobile
81
+ * language picker is `<AbDrawerList scope="app" side="bottom" />`. Items are buttons (or links with
82
+ * `href`), the selected one carries `aria-current="true"`. No-JS: the links still work in the fallback.
83
+ */
84
+ const AbDrawerList = ({ as: Drawer = AbDrawer, items, value, onSelect, closeOnSelect = true, listLabel, onClose, className, ...drawer }: AbDrawerListProps): ReactElement => {
85
+ const pick = (v: string) => { onSelect?.(v); if (closeOnSelect) onClose(); }; // ๐Ÿ”” then ๐Ÿšช
86
+ return (
87
+ <Drawer {...drawer} onClose={onClose} className={clsx('AbDrawerList', className)}>
88
+ <ul className={styles.abDrawerList} aria-label={listLabel} data-ab-part="drawer-list">
89
+ {items.map((it) => {
90
+ const on = it.value === value; // ๐ŸŽฏ
91
+ const inner = (
92
+ <>
93
+ {it.icon != null && <span className={styles.abDrawerListIcon} aria-hidden="true">{it.icon}</span>}
94
+ <span className={styles.abDrawerListText}>
95
+ <span lang={it.lang}>{it.label}</span>
96
+ {it.description != null && <span className={styles.abDrawerListDescription}>{it.description}</span>}
97
+ </span>
98
+ <span className={styles.abDrawerListCheck} aria-hidden="true">{on ? 'โœ“' : ''}</span>
99
+ </>
100
+ );
101
+ return (
102
+ <li key={it.value}>
103
+ {it.href && !it.disabled ? (
104
+ <Link href={it.href} className={styles.abDrawerListItem} data-active={on ? 'true' : 'false'} aria-current={on ? 'true' : undefined} hrefLang={it.lang} onClick={() => pick(it.value)}>{inner}</Link>
105
+ ) : (
106
+ <button type="button" className={styles.abDrawerListItem} data-active={on ? 'true' : 'false'} aria-current={on ? 'true' : undefined} disabled={it.disabled} onClick={() => pick(it.value)}>{inner}</button>
107
+ )}
108
+ </li>
109
+ );
110
+ })}
111
+ </ul>
112
+ </Drawer>
113
+ );
114
+ };
115
+
116
+ // ๐Ÿ“ฆ exports
117
+ export default AbDrawerList;
118
+ export { AbDrawerList };
@@ -0,0 +1,65 @@
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: AbDrawerList styles
28
+ * @file: ab-drawer-list/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
+
40
+ .abDrawerList { list-style: none; margin: 0 -12px; padding: 0; display: grid; gap: 2px; } /* ๐Ÿ“‹ */
41
+ .abDrawerListItem {
42
+ display: flex; /* ๐Ÿ“ icon ยท text ยท check */
43
+ align-items: center; /* โ†•๏ธ */
44
+ gap: 12px; /* โ†”๏ธ */
45
+ inline-size: 100%; /* โ†”๏ธ */
46
+ min-block-size: 48px; /* ๐Ÿ‘† touch target */
47
+ padding: 8px 12px; /* ๐Ÿ“ฆ */
48
+ border: 0; /* ๐Ÿงน */
49
+ border-radius: 8px; /* ๐Ÿ”ฒ = the Home nav rows */
50
+ background: transparent; /* ๐ŸŽจ */
51
+ color: inherit; /* ๐Ÿ–‹๏ธ */
52
+ font: inherit; /* ๐Ÿ”ค */
53
+ text-align: start; /* โฌ…๏ธ */
54
+ text-decoration: none; /* ๐Ÿšซ */
55
+ cursor: pointer; /* ๐Ÿ–ฑ๏ธ */
56
+ box-sizing: border-box; /* ๐Ÿ“ฆ */
57
+ }
58
+ .abDrawerListItem:hover { background: var(--ab-color-hover, rgb(166 124 82 / 0.08)); } /* ๐Ÿ–ฑ๏ธ --hover */
59
+ .abDrawerListItem[data-active='true'] { background: var(--ab-color-tint, #f4e7db); color: var(--ab-color-accent-text, #8b6340); font-weight: 650; } /* ๐ŸŽฏ = the Home active nav (--tint, --accent-t, 650) */
60
+ .abDrawerListItem:focus-visible { outline: 2px solid var(--ab-color-accent, #a67c52); outline-offset: -2px; } /* โ™ฟ --accent */
61
+ .abDrawerListItem:disabled { opacity: 0.5; cursor: not-allowed; } /* ๐Ÿšซ */
62
+ .abDrawerListIcon { flex: none; display: inline-flex; } /* ๐Ÿ”ฃ */
63
+ .abDrawerListText { flex: 1 1 auto; min-width: 0; display: grid; } /* ๐Ÿท๏ธ */
64
+ .abDrawerListDescription { font-size: 0.875rem; opacity: 0.75; } /* ๐Ÿ“ */
65
+ .abDrawerListCheck { flex: none; inline-size: 1.25em; text-align: center; } /* โœ“ */
@@ -43,7 +43,7 @@
43
43
  width: 100%; /* โ†”๏ธ */
44
44
  aspect-ratio: 760 / 600; /* ๐Ÿ“ mock card */
45
45
  border-radius: 1.25rem; /* ๐Ÿ”ฒ */
46
- border: 1px solid var(--ab-color-outline-variant, rgb(0 0 0 / 0.12)); /* ๐Ÿ–Š๏ธ */
46
+ border: 1px solid var(--ab-color-border, var(--ab-color-outline-variant, rgb(0 0 0 / 0.12))); /* ๐Ÿ–Š๏ธ */
47
47
  background: var(--ab-color-surface-container, transparent); /* ๐ŸŽจ */
48
48
  overflow: hidden; /* โœ‚๏ธ */
49
49
  color: var(--ab-color-on-surface, currentColor); /* ๐ŸŽจ */
@@ -127,7 +127,7 @@
127
127
  /* ๐Ÿ“ scales with the card (cqi = 1% of its width): 760px card โ†’ 13px text, 390px โ†’ 11px; clamped both ways */
128
128
  padding: clamp(0.25rem, 0.8cqi, 0.375rem) clamp(0.4375rem, 1.4cqi, 0.625rem); /* ๐Ÿงฑ */
129
129
  border-radius: clamp(0.5rem, 1.4cqi, 0.625rem); /* ๐Ÿ”ฒ */
130
- border: 1px solid var(--ab-color-outline-variant, rgb(0 0 0 / 0.12)); /* ๐Ÿ–Š๏ธ */
130
+ border: 1px solid var(--ab-color-border, var(--ab-color-outline-variant, rgb(0 0 0 / 0.12))); /* ๐Ÿ–Š๏ธ */
131
131
  background: var(--ab-color-surface, #fff); /* ๐ŸŽจ */
132
132
  font-size: clamp(0.6875rem, 1.75cqi, 0.8125rem); /* ๐Ÿ”ก */
133
133
  white-space: nowrap; /* ๐Ÿšซ wrap */
@@ -52,6 +52,8 @@ import moreVert from 'ab-nextjs-icons/ab-icons/icons/more_vert'; // โ‹ฎ AbAppBar
52
52
  import search from 'ab-nextjs-icons/ab-icons/icons/search'; // ๐Ÿ”Ž AbSearchTrigger (0.1.13)
53
53
  import close from 'ab-nextjs-icons/ab-icons/icons/close'; // โœ–๏ธ AbPage aside close (0.1.13)
54
54
  import expandMore from 'ab-nextjs-icons/ab-icons/icons/expand_more'; // ๐Ÿ”ฝ AbLocaleSwitcher no-JS list (0.1.13)
55
+ import doubleLeft from 'ab-nextjs-icons/ab-icons/icons/keyboard_double_arrow_left'; // โช AbSidebar outlined collapse (0.1.14, P9)
56
+ import doubleRight from 'ab-nextjs-icons/ab-icons/icons/keyboard_double_arrow_right'; // โฉ AbSidebar outlined expand (0.1.14, P9)
55
57
  // ๐Ÿงพ shape
56
58
  import type { AbIconSvgData } from './helpers';
57
59
 
@@ -72,4 +74,6 @@ export const AB_ICON_BUILTINS: Record<string, AbIconSvgData> = {
72
74
  search, // ๐Ÿ”Ž
73
75
  close, // โœ–๏ธ
74
76
  expand_more: expandMore, // ๐Ÿ”ฝ
77
+ keyboard_double_arrow_left: doubleLeft, // โช
78
+ keyboard_double_arrow_right: doubleRight, // โฉ
75
79
  };
@@ -90,6 +90,12 @@ export interface AbIconButtonProps {
90
90
  title?: string;
91
91
  // ๐Ÿงพ button type
92
92
  type?: 'button' | 'submit' | 'reset';
93
+ // โ™ฟ 0.1.14: disclosure state for menus / drawers / the TOC toggle (button variant)
94
+ 'aria-expanded'?: boolean;
95
+ // โ™ฟ 0.1.14: id of the element this button opens
96
+ 'aria-controls'?: string;
97
+ // ๐Ÿ“ 0.1.14: glyph size in px (default: AbIcon's 24), e.g. 16 for the terminal copy button
98
+ iconSize?: number;
93
99
  }
94
100
 
95
101
  const AbIconButton = forwardRef<HTMLButtonElement, AbIconButtonProps>(function AbIconButton(props, ref) {
@@ -112,6 +118,9 @@ const AbIconButton = forwardRef<HTMLButtonElement, AbIconButtonProps>(function A
112
118
  title, // ๐Ÿ’ฌ
113
119
  type = 'button', // ๐Ÿงพ
114
120
  iconFilled, // โฌ›
121
+ 'aria-expanded': ariaExpanded, // โ™ฟ 0.1.14
122
+ 'aria-controls': ariaControls, // โ™ฟ 0.1.14
123
+ iconSize, // ๐Ÿ“ 0.1.14
115
124
  } = props;
116
125
 
117
126
  // โ™ฟ G6: one accessible name for both variants, ON the interactive element (not the wrapper span)
@@ -121,7 +130,7 @@ const AbIconButton = forwardRef<HTMLButtonElement, AbIconButtonProps>(function A
121
130
  // ๐Ÿท๏ธ classes
122
131
  const classNames = clsx('AbIconButton', 'icon-button', styles.abIconButton, AB_MOTION.interactive, expands && AB_MOTION.lift, shrinks && AB_MOTION.press, className); // ๐ŸŽฌ hover lift / press from ab-nextjs-animations
123
132
  // ๐Ÿ”ฃ the glyph is decoration (the button carries the name): AbIcon without a label is aria-hidden
124
- const glyph = <AbIcon name={icon} variant={(iconFilled ?? active) ? 'filled' : 'outlined'} className="icon" />;
133
+ const glyph = <AbIcon name={icon} variant={(iconFilled ?? active) ? 'filled' : 'outlined'} className="icon" size={iconSize} />;
125
134
 
126
135
  // ๐Ÿ”— link variant
127
136
  if (href && !isLoading) {
@@ -158,6 +167,8 @@ const AbIconButton = forwardRef<HTMLButtonElement, AbIconButtonProps>(function A
158
167
  aria-label={name} // โ™ฟ accessible name
159
168
  title={tooltip} // ๐Ÿ’ฌ tooltip on the button itself
160
169
  aria-busy={isLoading || undefined} // โณ announce loading
170
+ aria-expanded={ariaExpanded} // โ™ฟ open / closed (omitted when undefined)
171
+ aria-controls={ariaControls} // โ™ฟ what it opens
161
172
  data-active={String(active)} // โœ…
162
173
  data-naked={String(naked)} // ๐Ÿซฅ
163
174
  data-expands={String(expands)} // ๐Ÿ”
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  .abIconButton:hover {
66
- background-color: color-mix(in srgb, currentColor 10%, transparent);
66
+ background-color: var(--ab-color-hover, color-mix(in srgb, currentColor 10%, transparent));
67
67
  }
68
68
 
69
69
  .abIconButton[data-naked='true']:hover {
@@ -76,6 +76,7 @@ export interface AbInstallSnippetProps {
76
76
  dev?: boolean; // ๐Ÿ› ๏ธ dev dependency flag
77
77
  className?: string; // ๐Ÿท๏ธ
78
78
  style?: CSSProperties; // ๐ŸŽจ
79
+ variant?: 'card' | 'terminal'; // ๐Ÿ’ป 0.1.14 (P12): 'terminal' = the Home dark block (underline tabs, copy in the tab row, no clipping). Default 'card'
79
80
  }
80
81
 
81
82
  // ๐Ÿง  state source: persisted (shared across instances) or local
@@ -96,7 +97,7 @@ function LocalSnippet(props: AbInstallSnippetProps) {
96
97
  }
97
98
 
98
99
  /** ๐Ÿ–ผ๏ธ the actual UI */
99
- function SnippetView({ pkg, labels, managers = AB_PACKAGE_MANAGERS, dev = false, className, style, state }: AbInstallSnippetProps & { state: PmState }) {
100
+ function SnippetView({ pkg, labels, managers = AB_PACKAGE_MANAGERS, dev = false, className, style, state, variant = 'card' }: AbInstallSnippetProps & { state: PmState }) {
100
101
  const [pm, setPm] = state; // ๐ŸŽš๏ธ
101
102
  const current = managers.includes(pm) ? pm : managers[0]; // ๐Ÿงฏ stored pm not offered here
102
103
  const command = getAbInstallCommand(current, pkg, dev); // ๐Ÿงพ
@@ -122,38 +123,59 @@ function SnippetView({ pkg, labels, managers = AB_PACKAGE_MANAGERS, dev = false,
122
123
  tabs.current[j]?.focus(); // ๐ŸŽฏ
123
124
  };
124
125
 
126
+ const terminal = variant === 'terminal'; // ๐Ÿ’ป P12
127
+ // ๐Ÿ“‹ the copy button (card: in the command row ยท terminal: at the end of the tab row, always visible)
128
+ const copyButton = (
129
+ <AbIconButton
130
+ icon={copied ? 'check' : 'content_copy'} // ๐Ÿ“‹ / โœ…
131
+ label={labels.copy} // โ™ฟ name stays "Copy command"
132
+ naked // ๐Ÿซฅ
133
+ iconSize={terminal ? 16 : undefined} // ๐Ÿ“ P12: 16px in the terminal tab row
134
+ className={styles.copy} // ๐ŸŽจ
135
+ onClick={() => { void copy(command); }} // ๐Ÿ“‹
136
+ />
137
+ );
138
+ // ๐Ÿ–๏ธ terminal: "$ pnpm add <pkg>" with the package highlighted (the text stays one copyable string)
139
+ const at = command.lastIndexOf(pkg); // ๐Ÿ“
140
+ const highlighted = at >= 0 ? <>{command.slice(0, at)}<span className={styles.termPkg}>{pkg}</span>{command.slice(at + pkg.length)}</> : command;
141
+
142
+ // ๐Ÿ—‚๏ธ manager tabs
143
+ const tablist = (
144
+ <div role="tablist" aria-label={labels.group} className={styles.tabs} onKeyDown={onKeyDown}>
145
+ {managers.map((m, i) => (
146
+ <button
147
+ key={m} // ๐Ÿ”‘
148
+ ref={(el) => { tabs.current[i] = el; }} // ๐Ÿ“
149
+ id={`${base}-tab-${m}`} // ๐Ÿ†”
150
+ type="button" // ๐Ÿงพ
151
+ role="tab" // โ™ฟ
152
+ aria-selected={m === current} // โœ…
153
+ aria-controls={`${base}-panel`} // ๐Ÿ”—
154
+ tabIndex={m === current ? 0 : -1} // โŒจ๏ธ roving
155
+ className={styles.tab} // ๐ŸŽจ
156
+ onClick={() => setPm(m)} // ๐Ÿ–ฑ๏ธ
157
+ >
158
+ {m}
159
+ </button>
160
+ ))}
161
+ </div>
162
+ );
163
+
125
164
  return (
126
- <div className={clsx('AbInstallSnippet', styles.root, className)} style={style} data-ab-part="install-snippet" data-ab-swipe-ignore="">
127
- {/* ๐Ÿ—‚๏ธ manager tabs */}
128
- <div role="tablist" aria-label={labels.group} className={styles.tabs} onKeyDown={onKeyDown}>
129
- {managers.map((m, i) => (
130
- <button
131
- key={m} // ๐Ÿ”‘
132
- ref={(el) => { tabs.current[i] = el; }} // ๐Ÿ“
133
- id={`${base}-tab-${m}`} // ๐Ÿ†”
134
- type="button" // ๐Ÿงพ
135
- role="tab" // โ™ฟ
136
- aria-selected={m === current} // โœ…
137
- aria-controls={`${base}-panel`} // ๐Ÿ”—
138
- tabIndex={m === current ? 0 : -1} // โŒจ๏ธ roving
139
- className={styles.tab} // ๐ŸŽจ
140
- onClick={() => setPm(m)} // ๐Ÿ–ฑ๏ธ
141
- >
142
- {m}
143
- </button>
144
- ))}
145
- </div>
165
+ <div className={clsx('AbInstallSnippet', styles.root, terminal && styles.terminal, className)} style={style} data-ab-part="install-snippet" data-variant={terminal ? 'terminal' : undefined} data-ab-swipe-ignore="">
166
+ {/* ๐Ÿ—‚๏ธ manager tabs (๐Ÿ’ป terminal: tabs + copy share one row; the copy button stays OUTSIDE the tablist) */}
167
+ {terminal ? (
168
+ <div className={styles.termHead}>
169
+ {tablist}
170
+ <span className={styles.termGrow} aria-hidden="true" />
171
+ {copyButton}
172
+ </div>
173
+ ) : tablist}
146
174
  {/* ๐Ÿงพ command panel */}
147
175
  <div id={`${base}-panel`} role="tabpanel" aria-labelledby={`${base}-tab-${current}`} className={styles.panel}>
148
176
  <span className={styles.prompt} aria-hidden="true">$</span>{/* ๐Ÿ’ฒ decorative prompt */}
149
- <code className={styles.code}>{command}</code>
150
- <AbIconButton
151
- icon={copied ? 'check' : 'content_copy'} // ๐Ÿ“‹ / โœ…
152
- label={labels.copy} // โ™ฟ name stays "Copy command"
153
- naked // ๐Ÿซฅ
154
- className={styles.copy} // ๐ŸŽจ
155
- onClick={() => { void copy(command); }} // ๐Ÿ“‹
156
- />
177
+ <code className={styles.code}>{terminal ? highlighted : command}</code>
178
+ {!terminal && copyButton}
157
179
  </div>
158
180
  {/* ๐Ÿ“ฃ own polite live region */}
159
181
  <span className={styles.srOnly} aria-live="polite" role="status">{copied ? labels.copied : ''}</span>
@@ -42,7 +42,7 @@
42
42
  gap: 0.5rem; /* ๐Ÿงฑ */
43
43
  padding: 0.75rem; /* ๐Ÿงฑ */
44
44
  border-radius: 0.875rem; /* ๐Ÿ”ฒ */
45
- border: 1px solid var(--ab-color-outline-variant, rgb(0 0 0 / 0.12)); /* ๐Ÿ–Š๏ธ */
45
+ border: 1px solid var(--ab-color-border, var(--ab-color-outline-variant, rgb(0 0 0 / 0.12))); /* ๐Ÿ–Š๏ธ */
46
46
  background: var(--ab-color-surface-container, transparent); /* ๐ŸŽจ */
47
47
  max-width: 100%; /* ๐Ÿ“ */
48
48
  min-width: 0; /* ๐Ÿšซ overflow in narrow columns (0.1.13) */
@@ -84,7 +84,7 @@
84
84
  font-weight: 600; /* ๐Ÿ’ช */
85
85
  }
86
86
  .tab:focus-visible {
87
- outline: 2px solid var(--ab-focus-ring, var(--ab-color-primary, #A67C52)); /* ๐Ÿ’ */
87
+ outline: 2px solid var(--ab-color-accent, var(--ab-focus-ring, var(--ab-color-primary, #A67C52))); /* ๐Ÿ’ */
88
88
  outline-offset: 2px; /* โ†”๏ธ */
89
89
  }
90
90
 
@@ -126,3 +126,35 @@
126
126
  @media (scripting: none) {
127
127
  .copy { display: none; } /* ๐Ÿ™ˆ */
128
128
  }
129
+
130
+ /* ===== ๐Ÿ’ป 0.1.14 (P12, Home spec ยง4 install block): variant="terminal" (dark in both themes) ===== */
131
+ .root.terminal {
132
+ display: block; gap: 0; padding: 0; overflow: hidden; /* ๐Ÿงน no outer card */
133
+ border: 1px solid rgb(255 232 210 / 0.06); border-radius: var(--ab-radius-code, 12px); /* ๐Ÿ”ฒ */
134
+ background: var(--ab-color-code, #231a14); color: var(--ab-color-code-text, #ede0d4); /* ๐Ÿ’ป dark: #110b07 / #e8dacc */
135
+ box-shadow: 0 10px 30px rgb(33 26 22 / 0.14); /* ๐ŸŒ— */
136
+ }
137
+ .termHead {
138
+ display: flex; align-items: center; padding: 6px 8px 0 10px; /* ๐Ÿ“ฆ tabs ยท grow ยท copy */
139
+ border-bottom: 1px solid rgb(255 232 210 / 0.08); /* โž– */
140
+ }
141
+ .terminal .tabs { gap: 2px; } /* ๐Ÿ—‚๏ธ */
142
+ .terminal .tab, .terminal .tab:hover {
143
+ min-height: 0; padding: 6px 8px 8px; border-radius: 0; background: none; /* ๐Ÿงน no pills */
144
+ font-size: 12px; font-weight: 600; line-height: 17px; color: rgb(237 224 212 / 0.55); /* ๐Ÿ”ค */
145
+ }
146
+ .terminal .tab:hover { color: rgb(237 224 212 / 0.8); } /* ๐Ÿ–ฑ๏ธ */
147
+ .terminal .tab[aria-selected='true'], .terminal .tab[aria-selected='true']:hover {
148
+ background: none; color: #e7c8a5; box-shadow: inset 0 -2px 0 #c29a6f; /* โœ… underline */
149
+ }
150
+ .terminal .tab:focus-visible { outline-color: #c29a6f; outline-offset: -2px; } /* โ™ฟ inside the block */
151
+ .termGrow { flex: 1; } /* โ†”๏ธ */
152
+ .terminal .copy.copy { margin: 0; padding: 4px 4px 6px; border-radius: 6px; color: rgb(237 224 212 / 0.7); } /* ๐Ÿ“‹ always visible; mock .cp 4/4/6 โ†’ a 26px (โ‰ฅ 24px) target */
153
+ .terminal .panel { display: block; padding: 14px 16px 16px; border-radius: 0; background: none; color: inherit; overflow-x: auto; } /* ๐Ÿ“œ scrolls, never clips */
154
+ .terminal .prompt { opacity: 1; color: #8e7a69; margin-inline-end: 0.6em; font-size: 13.5px; } /* ๐Ÿ’ฒ */
155
+ .terminal .code { display: inline; overflow: visible; font-size: 13.5px; line-height: 1.4; white-space: pre; } /* โŒจ๏ธ Roboto Mono 13.5/1.4 */
156
+ .termPkg { color: #e7c8a5; } /* ๐Ÿ“ฆ */
157
+ @media (max-width: 767px) {
158
+ .terminal .panel { padding: 12px 14px 13px; } /* ๐Ÿ“ฑ */
159
+ .terminal .prompt, .terminal .code { font-size: 13px; }
160
+ }
@@ -47,7 +47,7 @@
47
47
  .abKbdKey {
48
48
  min-width: 20px; /* ๐Ÿ“ */
49
49
  padding: 3px 5px; /* ๐Ÿ“ฆ */
50
- border: 1px solid var(--ab-color-outline-variant, rgb(0 0 0 / 0.15)); /* ๐Ÿ–ผ๏ธ */
50
+ border: 1px solid var(--ab-color-border, var(--ab-color-outline-variant, rgb(0 0 0 / 0.15))); /* ๐Ÿ–ผ๏ธ */
51
51
  border-radius: 6px; /* ๐ŸŸข */
52
52
  box-sizing: border-box; /* ๐Ÿ“ฆ */
53
53
  text-align: center; /* โ†”๏ธ */