ab-nextjs-components 0.4.0 → 0.4.2
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/ab-breadcrumbs/index.tsx
CHANGED
|
@@ -77,9 +77,11 @@ const AbBreadcrumbs = ({ items, label = 'Breadcrumb', className }: AbBreadcrumbs
|
|
|
77
77
|
return (
|
|
78
78
|
<li key={i} className={styles.abCrumb}>
|
|
79
79
|
{i > 0 && <AbIcon name="chevron_right" size={16} className={styles.abCrumbSep} />}
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
{/* ✂️ 0.4.1 (Joseph 0.2.24, gap 4 v3): the label sits in its own text box, so a squeezed crumb ellipsizes on the
|
|
81
|
+
right ("Installa…") while the inline-flex target box (24px min) stays as it is */}
|
|
82
|
+
{last ? <span className={styles.abCrumbCurrent} aria-current="page"><span className={styles.abCrumbText}>{it.label}</span></span>
|
|
83
|
+
: it.href ? <Link href={it.href} className={styles.abCrumbLink}><span className={styles.abCrumbText}>{it.label}</span></Link>
|
|
84
|
+
: <span className={styles.abCrumbText}>{it.label}</span>}
|
|
83
85
|
</li>
|
|
84
86
|
);
|
|
85
87
|
})}
|
|
@@ -43,10 +43,20 @@
|
|
|
43
43
|
--ab-crumbs-current: var(--ab-color-text, var(--ab-color-on-surface, #211a16)); /* 🖋️ --text */
|
|
44
44
|
--ab-crumbs-hover: var(--ab-color-accent-text, var(--ab-color-bronze-text, #8b6340)); /* 🖱️ --accent-t */
|
|
45
45
|
--ab-crumbs-ring: var(--ab-color-accent, var(--ab-color-bronze, #a67c52)); /* ♿ --accent */
|
|
46
|
-
|
|
46
|
+
font-size: 13px; color: var(--ab-crumbs-color); /* 🔤 */
|
|
47
|
+
flex: 1 1 auto; /* ↔️ 0.4.1 (Joseph 0.2.24, gap 4): in a header row it takes the space left */
|
|
48
|
+
min-width: var(--ab-crumbs-min-width, 96px); /* 📏 0.4.1 v2: never collapses to 0, so the first crumb always fits */
|
|
49
|
+
flex-shrink: 1; /* 🗜️ a neighbour with a bigger flex-shrink (the search field) gives way first */
|
|
47
50
|
}
|
|
48
51
|
.abCrumbsList { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; } /* 📐 */
|
|
52
|
+
/* ✂️ 0.4.1 (Joseph 0.2.24, gap 4): at 768px the trail ran under the search field. Now it never paints past its own box:
|
|
53
|
+
it clips (with 4px of room so the focus ring still shows) and each crumb may shrink instead of pushing out. */
|
|
54
|
+
.abCrumbsList { overflow: clip; overflow-clip-margin: 4px; flex-wrap: nowrap; } /* ✂️ */
|
|
49
55
|
.abCrumb { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; } /* 🍞 */
|
|
56
|
+
.abCrumb { flex: 0 1 auto; } /* 🗜️ 0.4.1: crumbs shrink (min-width: 0 above) rather than overflow */
|
|
57
|
+
.abCrumb:first-child { flex: none; } /* 🏠 0.4.1 v2: the first crumb (e.g. Docs) never shrinks: full 24px target */
|
|
58
|
+
.abCrumb:not(:first-child) { overflow: hidden; } /* ✂️ middle + current crumbs clip inside their own box */
|
|
59
|
+
.abCrumbLink { overflow: hidden; } /* ✂️ a squeezed parent crumb clips inside its own box */
|
|
50
60
|
.abCrumbSep { width: 16px; height: 16px; flex: none; } /* › */
|
|
51
61
|
.abCrumbCurrent { color: var(--ab-crumbs-current); font-weight: 650; overflow: hidden; text-overflow: ellipsis; } /* 🎯 */
|
|
52
62
|
.abCrumbLink { color: inherit; text-decoration: none; border-radius: 4px; } /* 🔗 */
|
|
@@ -55,10 +65,13 @@
|
|
|
55
65
|
.abCrumbCurrent {
|
|
56
66
|
display: inline-flex; /* 📐 */
|
|
57
67
|
align-items: center; /* ↕️ */
|
|
58
|
-
justify-content: center; /* ↔️ short labels ("Docs") centre in the 24px box */
|
|
68
|
+
justify-content: safe center; /* ↔️ short labels ("Docs") centre in the 24px box; 0.4.1 v3: `safe` falls back to start on overflow (plain centre clipped both ends: "stallatio") */
|
|
59
69
|
min-width: 24px; /* 👆 */
|
|
60
70
|
min-height: 24px; /* 👆 */
|
|
61
71
|
box-sizing: border-box; /* 📦 */
|
|
62
72
|
}
|
|
63
73
|
.abCrumbLink:hover { color: var(--ab-crumbs-hover); } /* 🖱️ */
|
|
64
74
|
.abCrumbLink:focus-visible { outline: 2px solid var(--ab-crumbs-ring); outline-offset: 2px; } /* ♿ */
|
|
75
|
+
|
|
76
|
+
/* ✂️ 0.4.1 (Joseph 0.2.24, gap 4 v3): the label's own box ellipsizes on the right, anchored at the start */
|
|
77
|
+
.abCrumbText { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ✂️ */
|
|
@@ -67,6 +67,9 @@
|
|
|
67
67
|
}
|
|
68
68
|
.abCalloutIcon { flex: none; display: inline-flex; padding-top: 2px; color: var(--ab-callout-icon, var(--ab-callout-accent)); } /* 🔣 */
|
|
69
69
|
.abCalloutBody { flex: 1 1 auto; min-width: 0; } /* 📝 */
|
|
70
|
+
/* 🔠 0.4.1 (Joseph 0.2.24, gap 1): theme's base `body, p { font-size: 24px }` hit the title + text <p>s, even outside
|
|
71
|
+
.ab-prose. They inherit the callout's own size + leading instead (theme ≥ 0.3.8 .ab-prose fix covers prose pages). */
|
|
72
|
+
.abCalloutBody :where(p) { font-size: inherit; line-height: inherit; letter-spacing: inherit; word-spacing: inherit; } /* 🔠 */
|
|
70
73
|
.abCalloutTitle { margin: 0 0 4px; font-weight: 700; } /* 🏷️ */
|
|
71
74
|
.abCalloutText > :first-child { margin-top: 0; } /* ⬆️ */
|
|
72
75
|
.abCalloutText > :last-child { margin-bottom: 0; } /* ⬇️ */
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
border-radius: var(--ab-radius-code, 12px); /* 🟢 */
|
|
45
45
|
background: var(--ab-color-code-surface, #231a14); /* 🎨 */
|
|
46
46
|
color: var(--ab-color-on-code-surface, #f4ece5); /* 🖋️ */
|
|
47
|
+
color-scheme: dark; /* 🌑 0.4.1 (Joseph 0.2.24, gap 3): scrollbars, selection + the copy button match the dark surface in every page scheme */
|
|
47
48
|
}
|
|
48
49
|
/* 🏷️ header: title · filename · language badge */
|
|
49
50
|
.abCodeBlockHead { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 16px; border-bottom: 1px solid rgb(255 255 255 / 0.08); font: 500 12.5px/1.2 var(--ab-font-body, system-ui, sans-serif); } /* 📐 */
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
border: 1px solid var(--ab-color-border, rgb(92 64 48 / 0.13)); border-radius: var(--ab-radius-button, 10px); /* 🔲 */
|
|
77
77
|
background: var(--ab-color-card, #fff); color: var(--ab-color-faint, #807062); /* 🎨 */
|
|
78
78
|
font-size: 13.5px; line-height: 1; box-shadow: var(--ab-shadow-card, 0 1px 2px rgb(33 26 22 / 0.05)); /* 🔤 🌗 */
|
|
79
|
+
flex: 0 8 auto; min-width: var(--ab-search-trigger-min-width, 160px); /* 🔎 0.4.1 (Joseph 0.2.24, gap 4): its own space in a flex row; v2: shrinks first (flex-shrink 8) down to 160px, never under */
|
|
79
80
|
}
|
|
80
81
|
.abSearchTrigger[data-size='sm'] {
|
|
81
82
|
flex: none; width: auto; max-width: none; height: 34px; /* 📏 the pill still LOOKS 34px (mock) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ab-nextjs-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "🚀 A lightweight collection of server & client React components created by Abraham Ukachi, and optimized for Next.js applications 😎.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"ab-nextjs-animations": "^0.2.5",
|
|
44
44
|
"ab-nextjs-hooks": "^0.1.7",
|
|
45
45
|
"ab-nextjs-icons": "^0.2.7",
|
|
46
|
-
"ab-nextjs-theme": "^0.3.
|
|
46
|
+
"ab-nextjs-theme": "^0.3.9",
|
|
47
47
|
"clsx": "^2",
|
|
48
48
|
"next": "^16.3.4",
|
|
49
49
|
"react": "^19",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"ab-nextjs-animations": "^0.2.5",
|
|
57
57
|
"ab-nextjs-hooks": "^0.1.7",
|
|
58
58
|
"ab-nextjs-icons": "^0.2.7",
|
|
59
|
-
"ab-nextjs-theme": "^0.3.
|
|
59
|
+
"ab-nextjs-theme": "^0.3.9",
|
|
60
60
|
"clsx": "^2.1.1",
|
|
61
61
|
"esbuild": "^0.28.2",
|
|
62
62
|
"eslint": "^9.39.0",
|