ab-nextjs-components 0.2.1 โ†’ 0.2.3

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 CHANGED
@@ -1,4 +1,8 @@
1
- ## 0.2.1 (Unreleased, proposed)
1
+ ## 0.2.2 (Unreleased, proposed)
2
+
3
+ - ๐ŸŒ AbPackagePreviewComponents `labels` ({ button, chip, switch }); English defaults unchanged, the 0.2.1 `button` / `chip` props still work
4
+
5
+ ## 0.2.1
2
6
 
3
7
  ### Sidebar profile (God 02:44)
4
8
  - โœจ AbSidebar `profile` prop (opt-in): a 40px profile button at the bottom left opens AbSettingsDrawer. Signed out it shows the profile glyph; signed in the initials ("AU") on the container colour, or the photo masked to a circle, plus the name when expanded. Rendered on the server and hidden by CSS below 1180px (no flash); the collapsed rail names it with an AbBalloon tooltip. Label via `labels.profile` (default "Profile and settings")
@@ -43,18 +43,22 @@
43
43
  'use client';
44
44
 
45
45
  // โš›๏ธ React
46
- import type { ReactElement } from 'react';
46
+ import { useEffect, useId, useRef, type ReactElement, type RefObject } from 'react';
47
47
  // ๐Ÿงต classes
48
48
  import clsx from 'clsx';
49
49
  // ๐Ÿ—„๏ธ built on AbDrawer
50
50
  import AbDrawer, { type AbDrawerProps } from '../ab-drawer';
51
51
  // ๐ŸŽจ styles
52
52
  import styles from './styles.module.css';
53
+ // ๐Ÿ‘‡ 0.2.3 (Joseph, Welcome 0.2.21): swipe down to close
54
+ import { useAbSwipeDown } from './use-ab-swipe-down';
53
55
 
54
56
  /** โš™๏ธ props: AbDrawer's, minus `side` (always bottom); scope defaults to the whole app */
55
57
  export interface AbBottomDrawerProps extends Omit<AbDrawerProps, 'side'> {
56
58
  side?: AbDrawerProps['side']; // ๐Ÿ™ˆ accepted for drop-in use (AbDrawerList `as`), always rendered as bottom
57
59
  handle?: boolean; // โž– grab handle at the top (default true; decorative)
60
+ swipeToClose?: boolean; // ๐Ÿ‘‡ 0.2.3: a swipe down closes it (default true; off when `snapPoints` drives the drag)
61
+ trigger?: RefObject<HTMLElement | null>; // โ†ฉ๏ธ 0.2.3: focused on close (wins over everything); default = the opener, else the `[aria-controls=id]` button
58
62
  }
59
63
 
60
64
  /**
@@ -62,10 +66,37 @@ export interface AbBottomDrawerProps extends Omit<AbDrawerProps, 'side'> {
62
66
  * with `side="bottom"`, `scope="app"`, the Home tokens (card surface, hairline top edge, 20px top radius,
63
67
  * grab handle, safe-area padding) and at most 560px wide, centred, above 768px.
64
68
  */
65
- const AbBottomDrawer = ({ handle = true, scope = 'app', initialFocus = 'panel', className, ...rest }: AbBottomDrawerProps): ReactElement => (
66
- <AbDrawer {...rest} scope={scope} initialFocus={initialFocus} side="bottom" className={clsx('AbBottomDrawer', styles.abBottomDrawer, handle && styles.withHandle, className)} />
67
- );
69
+ const AbBottomDrawer = ({ handle = true, scope = 'app', initialFocus = 'panel', className, swipeToClose = true, trigger, returnFocus, ...rest }: AbBottomDrawerProps): ReactElement => {
70
+ // ๐Ÿ†” the sheet needs an id: the swipe finds the portalled panel by it, and the trigger points at it (aria-controls)
71
+ const auto = useId().replace(/[^A-Za-z0-9_-]/g, ''); // ๐Ÿ†” SSR-stable
72
+ const id = rest.id ?? `ab-bottom-drawer-${auto}`;
73
+ // ๐Ÿ‘‡ 0.2.3: swipe down to close (AbDrawer's own snap drag owns the gesture when `snapPoints` is on)
74
+ useAbSwipeDown({ id, onClose: rest.onClose, enabled: rest.open && swipeToClose && !rest.snapPoints });
75
+ // โ†ฉ๏ธ 0.2.3 (Joseph): focus goes back to the trigger. AbDrawer already returns it to the focused opener; Safari
76
+ // (and taps on iOS) never focus a clicked <button>, so the opener is <body> and AbDrawer fell back to the logo.
77
+ // The fallback selector is now the button that controls this sheet, and an explicit `trigger` ref wins.
78
+ const wasOpen = useRef(rest.open); // ๐Ÿง  the previous `open`
79
+ useEffect(() => {
80
+ const closing = wasOpen.current && !rest.open; wasOpen.current = rest.open;
81
+ if (!closing || !trigger?.current) return;
82
+ const el = trigger.current; // ๐Ÿ“Œ this close's target
83
+ const t = window.setTimeout(() => { if (el.isConnected) el.focus({ preventScroll: true }); }, 0); // โญ๏ธ after AbDrawer's microtask
84
+ return () => window.clearTimeout(t);
85
+ }, [rest.open, trigger]);
86
+ return (
87
+ <AbDrawer
88
+ {...rest}
89
+ id={id}
90
+ returnFocus={returnFocus ?? `[aria-controls="${id}"]`} // โ†ฉ๏ธ the trigger (when the opener wasn't focused)
91
+ scope={scope}
92
+ initialFocus={initialFocus}
93
+ side="bottom"
94
+ className={clsx('AbBottomDrawer', styles.abBottomDrawer, handle && styles.withHandle, className)}
95
+ />
96
+ );
97
+ };
68
98
 
69
99
  // ๐Ÿ“ฆ exports
70
100
  export default AbBottomDrawer;
71
101
  export { AbBottomDrawer };
102
+ export { useAbSwipeDown, isAbScrolledInside, type UseAbSwipeDownOptions } from './use-ab-swipe-down'; // ๐Ÿ‘‡ 0.2.3
@@ -0,0 +1,125 @@
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: useAbSwipeDown (close a bottom sheet with a swipe down)
28
+ * @file: ab-bottom-drawer/use-ab-swipe-down.ts
29
+ * @type: Client hook
30
+ * @authors: Abraham Ukachi <abrahamukachi@gmail.com>
31
+ */
32
+
33
+ /*
34
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35
+ * MOTTO: We'll always do more ๐Ÿ˜œ!!!
36
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37
+ */
38
+
39
+ 'use client';
40
+
41
+ // โš›๏ธ React
42
+ import { useEffect, useRef } from 'react';
43
+ // ๐Ÿค the shared drawer rules (same numbers as useAbEdgeSwipe: 8px slop, 30% / 0.5px/ms commit)
44
+ import { AB_SWIPE, createAbVelocityTracker, resolveAbSideRelease } from '../ab-drawer/gestures';
45
+
46
+ /** โš™๏ธ options */
47
+ export interface UseAbSwipeDownOptions {
48
+ id: string; // ๐Ÿ†” the sheet's dialog id (the panel is portalled, so we find it by id)
49
+ onClose: () => void; // ๐Ÿšช called when the swipe commits
50
+ enabled?: boolean; // ๐ŸŽš๏ธ e.g. only while open (default true)
51
+ }
52
+
53
+ /** ๐Ÿ“œ is there a scroller between `el` and the sheet that is NOT at its top? Then the finger scrolls it, not the sheet. */
54
+ export function isAbScrolledInside(el: Element | null, sheet: Element): boolean {
55
+ for (let n: Element | null = el; n && n !== sheet.parentElement; n = n.parentElement) {
56
+ if ((n as HTMLElement).scrollTop > 0) return true; // ๐Ÿ“œ scrolled down: the gesture belongs to the content
57
+ if (n === sheet) break; // ๐Ÿงฑ stop at the sheet
58
+ }
59
+ return false;
60
+ }
61
+
62
+ /**
63
+ * ๐Ÿ‘‡ useAbSwipeDown โ€” close a bottom sheet with a swipe down (Joseph, Welcome 0.2.21):
64
+ * - ๐Ÿ‘† touch events, like useAbEdgeSwipe (Android Chrome fires pointercancel on a native pan, so pointer events
65
+ * would lose the gesture); the passive touchstart only arms it, a NON-passive touchmove is attached just for
66
+ * that press, and preventDefault runs only once the move is ours (down, and mostly vertical)
67
+ * - ๐Ÿ“œ never fights inner scroll: a press inside a scroller that isn't at scrollTop 0 is left alone, and an
68
+ * upward move is always the content's
69
+ * - ๐Ÿงญ a mostly sideways move (a carousel, a chip row) is not ours either
70
+ * - ๐Ÿซณ the sheet follows the finger (translateY), then on release it closes past 30% of its height or at
71
+ * โ‰ฅ 0.5px/ms down; anything less springs back
72
+ */
73
+ export function useAbSwipeDown({ id, onClose, enabled = true }: UseAbSwipeDownOptions): void {
74
+ const latest = useRef(onClose); // ๐Ÿ” latest callback for the listeners
75
+ useEffect(() => { latest.current = onClose; }, [onClose]);
76
+ useEffect(() => {
77
+ if (!enabled) return;
78
+ let d: { y: number; x: number; axis: 0 | 1 | 2; v: ReturnType<typeof createAbVelocityTracker>; sheet: HTMLElement } | null = null; // ๐Ÿซณ the press
79
+ // ๐ŸŽž๏ธ follow / release the finger
80
+ const follow = (sheet: HTMLElement, dy: number | null) => {
81
+ if (dy == null) { sheet.style.removeProperty('transform'); sheet.style.removeProperty('transition'); return; } // ๐Ÿ›ฌ back to CSS
82
+ sheet.style.transition = 'none'; // ๐Ÿšซ no lag while dragging
83
+ sheet.style.transform = `translateY(${Math.max(0, dy)}px)`; // โฌ‡๏ธ never above its rest
84
+ };
85
+ const tmove = (e: TouchEvent) => {
86
+ const t = e.touches[0]; if (!d || !t || d.axis === 2) return;
87
+ const dx = t.clientX - d.x; const dy = t.clientY - d.y; // โ†”๏ธ โ†•๏ธ
88
+ if (d.axis === 0) {
89
+ if (Math.max(Math.abs(dx), Math.abs(dy)) < AB_SWIPE.slop) return; // ๐Ÿซณ still a tap
90
+ d.axis = dy > 0 && Math.abs(dy) > Math.abs(dx) ? 1 : 2; // ๐Ÿงญ down = ours; up / sideways = the content's
91
+ if (d.axis === 2) { detach(); d = null; return; } // ๐Ÿ™… let go early
92
+ }
93
+ if (e.cancelable) e.preventDefault(); // ๐Ÿ›‘ no page / body scroll while we lead
94
+ d.v.add(t.clientY, e.timeStamp); // โšก
95
+ follow(d.sheet, dy); // ๐Ÿซณ
96
+ };
97
+ const tend = (e: TouchEvent) => {
98
+ const cur = d; d = null; detach();
99
+ if (!cur || cur.axis !== 1) return;
100
+ const t = e.changedTouches[0];
101
+ follow(cur.sheet, null); // ๐Ÿ›ฌ the drawer's own slide-out (or spring back) takes over
102
+ if (e.type !== 'touchend' || !t) return; // โŒ cancelled
103
+ const height = cur.sheet.offsetHeight || cur.sheet.getBoundingClientRect().height || 320; // ๐Ÿ“
104
+ if (resolveAbSideRelease({ distance: t.clientY - cur.y, velocity: cur.v.velocity(), width: height })) latest.current(); // โœ… 30% / 0.5px/ms
105
+ };
106
+ const attach = () => { document.addEventListener('touchmove', tmove, { capture: true, passive: false }); document.addEventListener('touchend', tend, true); document.addEventListener('touchcancel', tend, true); };
107
+ const detach = () => { document.removeEventListener('touchmove', tmove, true); document.removeEventListener('touchend', tend, true); document.removeEventListener('touchcancel', tend, true); };
108
+ const tstart = (e: TouchEvent) => {
109
+ detach(); d = null;
110
+ if (e.touches.length !== 1) return; // โœŒ๏ธ pinch etc.
111
+ const target = e.target as Element | null;
112
+ const sheet = document.getElementById(id); // ๐Ÿ—„๏ธ the portalled panel
113
+ if (!sheet || !target || !sheet.contains(target)) return; // ๐Ÿ™… not on our sheet
114
+ if (target.closest('[data-ab-no-swipe-down], input, textarea, select, [contenteditable="true"]')) return; // ๐Ÿ™… opt-out + text editing
115
+ if (isAbScrolledInside(target, sheet)) return; // ๐Ÿ“œ the content isn't at its top
116
+ const t = e.touches[0]; const v = createAbVelocityTracker(); v.add(t.clientY, e.timeStamp);
117
+ d = { x: t.clientX, y: t.clientY, axis: 0, v, sheet }; attach(); // ๐ŸŽง armed
118
+ };
119
+ document.addEventListener('touchstart', tstart, { capture: true, passive: true }); // ๐Ÿ‘† passive: never delays a tap or scroll
120
+ return () => { document.removeEventListener('touchstart', tstart, true); detach(); if (d) follow(d.sheet, null); d = null; };
121
+ }, [id, enabled]);
122
+ }
123
+
124
+ // ๐Ÿ“ฆ default export
125
+ export default useAbSwipeDown;
@@ -44,9 +44,9 @@ export type AbButtonType = 'contained' | 'filled' | 'outlined' | 'text' | 'secon
44
44
  // ๐Ÿ”ท 0.1.14 (P16): 'pill' = the legacy 999px look (default) ยท 'rounded' = the Home 10px button
45
45
  export type AbButtonShape = 'pill' | 'rounded';
46
46
  // ๐Ÿ“ 0.1.14 (P16): 'md' = 40px (44px under 768px, the touch CTA); undefined keeps the legacy sizing
47
- export type AbButtonSize = 'md';
47
+ export type AbButtonSize = 'md' | 'lg'; // ๐Ÿ“ 'lg' = v6 CTA: 52px / 56px โ‰ฅ 1180px, radius 12px (0.2.3)
48
48
  // ๐ŸŽจ colour roles
49
- export type AbButtonColor = 'primary' | 'secondary' | 'tertiary' | 'white' | 'black';
49
+ export type AbButtonColor = 'primary' | 'secondary' | 'tertiary' | 'white' | 'black' | 'bronze' | 'card'; // ๐Ÿฅ‰ 'bronze' = v6 Get Started ยท ๐Ÿƒ 'card' = v6 GitHub secondary (0.2.3)
50
50
  // ๐Ÿท๏ธ badge tones (G22): neutral grey or bronze accent
51
51
  export type AbButtonBadgeTone = 'neutral' | 'accent';
52
52
 
@@ -72,7 +72,7 @@ export interface AbButtonProps {
72
72
  iconStyle?: CSSProperties; // ๐ŸŽจ Material icon style
73
73
  rounded?: boolean; // ๐Ÿ’Š
74
74
  shape?: AbButtonShape; // ๐Ÿ”ท 0.1.14 (P16): 'rounded' = Home 10px radius (overrides `rounded`)
75
- size?: AbButtonSize; // ๐Ÿ“ 0.1.14 (P16): 'md' = 40px / 44px on touch widths
75
+ size?: AbButtonSize; // ๐Ÿ“ 0.1.14 (P16): 'md' = 40px / 44px on touch widths ยท 0.2.3: 'lg' = v6 CTA 52px / 56px โ‰ฅ 1180px
76
76
  raised?: boolean; // ๐Ÿ”๏ธ
77
77
  shrinks?: boolean; // ๐Ÿค
78
78
  expands?: boolean; // ๐Ÿ”
@@ -151,16 +151,36 @@
151
151
  border: 0; /* ๐Ÿงน */
152
152
  }
153
153
 
154
- /* ๐Ÿ”— 0.1.13 (Joseph #7): link mode. The theme paints `button[data-type]` and `a[role="button"][data-type]`,
155
- * but a real link (no role=button: it navigates) matched neither, so it rendered at 20px with no padding.
156
- * These mirror the theme's box rules for <a>, using the same --ab-button-* overrides. */
157
- a.abButton[data-type="contained"],
158
- a.abButton[data-type="text"] {
159
- padding: var(--ab-button-padding, 6px 12px); /* ๐Ÿ“ฆ */
160
- border-radius: 8px; /* ๐Ÿ”ฒ */
161
- font-size: 18px; /* ๐Ÿ”ค */
162
- line-height: 32px; /* ๐Ÿ“ 40px tall */
154
+ /* ๐Ÿ“ 0.2.3 (Joseph 03:37): AbButton OWNS its box per type (button AND link), with the old theme values, because
155
+ * theme โ‰ฅ 0.3.7 keeps its legacy button sizes off `.AbButton`. Every value is a --ab-button-* token:
156
+ * --ab-button-padding contained / text 6px 12px ยท filled 6px 16px ยท outlined 8px 16px (all 8px 16px โ‰ฅ 460px)
157
+ * --ab-button-font-size 18px (20px โ‰ฅ 460px, as the theme did)
158
+ * --ab-button-line-height 32px
159
+ * --ab-button-height / -min-height 40px (border-box, like the theme's <button data-type>)
160
+ * --ab-button-radius 8px (filled 999px)
161
+ * shape="rounded" / size="md" (doubled class, below) keep their own box. */
162
+ .abButton[data-type] {
163
+ box-sizing: border-box; /* ๐Ÿ“ฆ */
164
+ padding: var(--ab-button-padding, 6px 12px); /* ๐Ÿ“ฆ contained / text */
165
+ font-size: var(--ab-button-font-size, 18px); /* ๐Ÿ”ค */
166
+ line-height: var(--ab-button-line-height, 32px); /* ๐Ÿ“ */
167
+ height: var(--ab-button-height, 40px); /* ๐Ÿ“ 40px tall */
168
+ min-height: var(--ab-button-min-height, 40px); /* ๐Ÿ“ */
169
+ border-radius: var(--ab-button-radius, 8px); /* ๐Ÿ”ฒ */
163
170
  }
171
+ .abButton[data-type="filled"] { padding: var(--ab-button-padding, 6px 16px); border-radius: var(--ab-button-radius, 999px); } /* ๐Ÿ’Š */
172
+ .abButton[data-type="outlined"] {
173
+ padding: var(--ab-button-padding, 8px 16px); /* ๐Ÿ“ฆ */
174
+ border: 2px solid var(--ab-button-outline-color, var(--outline-color)); /* โž– */
175
+ opacity: var(--ab-button-opacity, var(--opacity-text-inactive, 1)); /* ๐ŸŒซ๏ธ theme look (hover โ†’ 1 via the theme) */
176
+ }
177
+ .abButton[data-type="outlined"]:not(:disabled, [aria-disabled="true"]):is(:hover, :focus-visible) { opacity: 1; } /* ๐Ÿ‘€ */
178
+ @media (width >= 460px) {
179
+ .abButton[data-type] { padding: var(--ab-button-padding, 8px 16px); font-size: var(--ab-button-font-size, 20px); } /* ๐Ÿ“ฑโ†’๐Ÿ–ฅ๏ธ the theme's โ‰ฅ 460px size */
180
+ }
181
+
182
+ /* ๐Ÿ”— 0.1.13 (Joseph #7): link mode colours. The theme paints `button[data-type]` and `a[role="button"][data-type]`,
183
+ * but a real link (no role=button: it navigates) matches neither, so it takes the colours here (box: above). */
164
184
  a.abButton[data-type="contained"] {
165
185
  background: var(--ab-button-background-color, var(--primary-container-color)); /* ๐ŸŽจ */
166
186
  color: var(--ab-button-text-color, var(--on-primary-container-color)); /* ๐Ÿ–‹๏ธ */
@@ -168,17 +188,6 @@ a.abButton[data-type="contained"] {
168
188
  a.abButton[data-type="filled"] {
169
189
  background: var(--ab-button-background-color, var(--md-sys-color-primary)); /* ๐Ÿฅ‰ */
170
190
  color: var(--ab-button-text-color, var(--md-sys-color-on-primary)); /* ๐Ÿ–‹๏ธ */
171
- padding: var(--ab-button-padding, 6px 16px); /* ๐Ÿ“ฆ */
172
- border-radius: var(--ab-button-radius, 999px); /* ๐Ÿ’Š */
173
- font-size: 18px; /* ๐Ÿ”ค */
174
- line-height: 32px; /* ๐Ÿ“ */
175
- }
176
- a.abButton[data-type="outlined"] {
177
- border: 2px solid var(--ab-button-outline-color, var(--outline-color)); /* โž– */
178
- border-radius: 8px; /* ๐Ÿ”ฒ */
179
- padding: 8px 16px; /* ๐Ÿ“ฆ */
180
- font-size: 18px; /* ๐Ÿ”ค */
181
- line-height: 32px; /* ๐Ÿ“ */
182
191
  }
183
192
  a.abButton.abButtonRounded { border-radius: 9999px; } /* ๐Ÿ’Š */
184
193
 
@@ -217,6 +226,63 @@ a.abButton.abButtonRounded { border-radius: 9999px; } /* ๐Ÿ’Š */
217
226
  .abButton.abButton[data-size="md"] { height: var(--ab-button-height-touch, 44px); }
218
227
  .abButton.abButton[data-shape="rounded"][data-size="md"] { font-size: 14.5px; }
219
228
  }
229
+ /* ๐Ÿ“ 0.2.3 (God 04:12): size="lg" = the v6 Welcome CTA box (welcome-v6/_src/build.py `.btn` + `.lap .f8 .btn`):
230
+ * mobile 52px ยท 0 24px ยท 16px/600 ยท radius 12px ยท gap 10px โ†’ laptop (โ‰ฅ 1180px, core's laptop breakpoint) 56px ยท 0 30px ยท 17px.
231
+ * Triple class (0,4,0) + later than shape="rounded", so it wins over rounded's padding / radius / font. */
232
+ .abButton.abButton.abButton[data-size="lg"] {
233
+ box-sizing: border-box; /* ๐Ÿ“ฆ */
234
+ height: var(--ab-button-height-lg, 52px); min-height: var(--ab-button-height-lg, 52px); /* ๐Ÿ“ */
235
+ padding: 0 var(--ab-button-padding-inline-lg, 24px); /* ๐Ÿ“ฆ */
236
+ border-radius: var(--ab-button-radius-lg, 12px); /* ๐Ÿ”ฒ */
237
+ font-size: var(--ab-button-font-size-lg, 16px); font-weight: var(--ab-button-font-weight-lg, 600); line-height: 1; /* ๐Ÿ”ค */
238
+ gap: var(--ab-button-gap-lg, 10px); white-space: nowrap; /* ๐Ÿงฑ */
239
+ }
240
+ @media (width >= 1180px) {
241
+ .abButton.abButton.abButton[data-size="lg"] {
242
+ height: var(--ab-button-height-lg-laptop, 56px); min-height: var(--ab-button-height-lg-laptop, 56px); /* ๐Ÿ’ป */
243
+ padding: 0 var(--ab-button-padding-inline-lg-laptop, 30px); font-size: var(--ab-button-font-size-lg-laptop, 17px); /* ๐Ÿ’ป */
244
+ }
245
+ }
246
+ /* ๐Ÿฅ‰ 0.2.3 (God 04:12): color="bronze" = v6 `.btn.p` (any type / shape). Same values in dark (v6 dark uses the same bronze).
247
+ * Quad class (0,5,0) + later than rounded+filled, so it wins over the rounded primary paint. */
248
+ .abButton.abButton.abButton.abButton[data-color="bronze"] {
249
+ background: var(--ab-button-bronze-background, var(--ab-color-bronze, #a67c52)); /* ๐ŸŽจ */
250
+ color: var(--ab-button-bronze-text-color, var(--ab-color-on-bronze, #fff8f5)); /* ๐Ÿ–‹๏ธ */
251
+ border: 0; opacity: 1; /* โž– */
252
+ box-shadow: var(--ab-button-bronze-shadow, 0 8px 24px rgba(166, 124, 82, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2)); /* โœจ v6 exact */
253
+ }
254
+ .abButton.abButton.abButton.abButton[data-color="bronze"]:not(:disabled, [aria-disabled="true"]):hover {
255
+ background: var(--ab-button-bronze-background-hover, color-mix(in srgb, var(--ab-color-bronze, #a67c52) 90%, #000)); /* ๐Ÿ–ฑ๏ธ */
256
+ }
257
+ .abButton.abButton.abButton.abButton[data-color="bronze"]:not(:disabled, [aria-disabled="true"]):active {
258
+ background: var(--ab-button-bronze-background-active, color-mix(in srgb, var(--ab-color-bronze, #a67c52) 82%, #000)); /* ๐Ÿ‘‡ */
259
+ box-shadow: var(--ab-button-bronze-shadow-active, 0 4px 12px rgba(166, 124, 82, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2));
260
+ transform: translateY(1px);
261
+ }
262
+ .abButton.abButton.abButton.abButton[data-color="bronze"]:focus-visible {
263
+ outline: 2px solid var(--ab-button-bronze-focus-ring, var(--ab-color-bronze-text, #8a6440)); outline-offset: 2px; /* โ™ฟ AA ring (light #8a6440 / dark #d9ab7f) */
264
+ }
265
+ .abButton.abButton.abButton.abButton[data-color="bronze"]:is(:disabled, [aria-disabled="true"]) {
266
+ opacity: var(--ab-button-disabled-opacity, 0.5); box-shadow: none; cursor: not-allowed; /* ๐Ÿšซ */
267
+ }
268
+ /* ๐Ÿƒ 0.2.3 (God 04:16): color="card" = v6 `.btn.s` (Continue with GitHub): 1px --line border on --card, --fg text.
269
+ * Opt-in only: plain outlined buttons are untouched. v6 โ†’ theme: --line โ†’ --ab-color-line, --card โ†’ --ab-color-card,
270
+ * --fg โ†’ --ab-color-text. v6 has no hover for .btn.s, so hover = the secondary button's 8% bronze tint over the card. */
271
+ .abButton.abButton.abButton.abButton[data-color="card"] {
272
+ border: var(--ab-button-outline-width, 1px) solid var(--ab-button-outline-color, var(--ab-color-line, rgb(107 79 53 / 16%))); /* โž– */
273
+ background: var(--ab-button-background, var(--ab-color-card, #fff)); /* ๐Ÿƒ */
274
+ color: var(--ab-button-text-color, var(--ab-color-text, #211a16)); /* ๐Ÿ–‹๏ธ */
275
+ opacity: 1; box-shadow: none; /* ๐Ÿซฅ no inactive fade, no shadow */
276
+ }
277
+ .abButton.abButton.abButton.abButton[data-color="card"]:not(:disabled, [aria-disabled="true"]):hover {
278
+ background: var(--ab-button-background-hover, linear-gradient(var(--ab-color-hover, rgb(166 124 82 / 0.08)), var(--ab-color-hover, rgb(166 124 82 / 0.08))) var(--ab-color-card, #fff)); /* ๐Ÿ–ฑ๏ธ */
279
+ }
280
+ .abButton.abButton.abButton.abButton[data-color="card"]:not(:disabled, [aria-disabled="true"]):active { transform: translateY(1px); } /* ๐Ÿ‘‡ */
281
+ .abButton.abButton.abButton.abButton[data-color="card"]:focus-visible { outline: 2px solid var(--ab-color-bronze-text, #8a6440); outline-offset: 2px; } /* โ™ฟ */
282
+ .abButton.abButton.abButton.abButton[data-color="card"]:is(:disabled, [aria-disabled="true"]) { opacity: var(--ab-button-disabled-opacity, 0.5); cursor: not-allowed; } /* ๐Ÿšซ */
283
+ @media (prefers-reduced-motion: reduce) {
284
+ .abButton.abButton.abButton.abButton:is([data-color="bronze"], [data-color="card"]):active { transform: none; } /* โ™ฟ */
285
+ }
220
286
  @media (prefers-reduced-motion: reduce) {
221
287
  .abButton.abButton[data-shape="rounded"]:active { transform: none; } /* โ™ฟ no nudge */
222
288
  }