@gemboss/ui 0.6.9 → 0.7.1

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/README.md CHANGED
@@ -360,6 +360,45 @@ The admin's "Search ⌘K" box for every surface, as a real form (works with no J
360
360
  - Shortcut on a page without React: `gembossUI.initSearch()` from `kit-plain.js` (⌘K / Ctrl+K and "/" focus it,
361
361
  Escape leaves it). "/" is ignored while another field has focus.
362
362
 
363
+ ## Public portal pieces (0.7.0)
364
+
365
+ For public surfaces laid out like the GemPages Featurebase board (GemFeedback) and for GemCommunity's
366
+ "Top contributors" (Chris, 04/10/2026: one leaderboard for both, with medals, in the kit).
367
+
368
+ ```tsx
369
+ import { Avatar, Dialog, Leaderboard, Podium, SearchDialog, ThemeToggle, themeScript, TopbarNav } from "@gemboss/ui";
370
+
371
+ <Topbar>
372
+ <div className="gemboss-topbar-start"><BrandLockup name="GemFeedback" href="/" />
373
+ <TopbarNav as={Link} items={[{ href: "/", label: "Feedback", active: true }, { href: "/roadmap", label: "Roadmap" }]} /></div>
374
+ <div className="gemboss-topbar-center" />
375
+ <div className="gemboss-topbar-end"><SearchDialog search={find} initial={trending} fallbackHref="/?q=" /><ThemeToggle /></div>
376
+ </Topbar>
377
+ <head><script dangerouslySetInnerHTML={{ __html: themeScript }} /></head> // no white flash in dark
378
+ <Leaderboard title="Most helpful" rows={[{ key, name, value, avatar, href }]} unit="votes" viewAll={{ href, label }} />
379
+ <Dialog open={open} onClose={close} title="Sign in">…</Dialog>
380
+ ```
381
+
382
+ - `TopbarNav`: section tabs in the topbar after the brand, the active one underlined on the topbar's
383
+ edge. A topbar holding tabs drops the centre search column (`:has(.gb-topnav)`), so the tabs get the
384
+ room. 36px under a mouse, 44px under a finger. Under 600px the tabs fold into one button naming the
385
+ open tab, with the tabs in a list under it (a row that scrolls sideways hid the third tab at 390).
386
+ - `SearchDialog`: the topbar search button opening a 640px popup (Featurebase's, the admin's ⌘K).
387
+ `initial` before typing, `search(q)` while typing (150 ms debounce, latest answer wins); ↑ ↓ Enter
388
+ Esc; ⌘K / Ctrl+K and "/" open it. Results are links; without JavaScript the button goes to
389
+ `fallbackHref`.
390
+ - `Dialog`: the kit's native `<dialog class="ui-modal">` (see kit-plain.css) driven by `open`; a
391
+ backdrop click closes it, focus returns to the opener.
392
+ - `ThemeToggle` + `themeScript`: `data-theme="dark|light"` on <html>, remembered in localStorage
393
+ (`gemboss-theme`), the OS's choice until then. `portal.css` redefines every `--gemboss-*` colour under
394
+ `[data-theme="dark"]` (a test fails if a colour token is left out), so every kit class follows.
395
+ Opt-in: a surface without it (the admin) stays light.
396
+ - `Avatar` (24 · 32 · 40 · 56): picture or initials on one of eight tones picked from the name.
397
+ - `Leaderboard`: 🥇 🥈 🥉 then the rank, avatar, name, count; the leader's count in gold; nothing at
398
+ all when empty. `Podium`: the first three, second · first · third.
399
+ - `initialsOf` moved to `initials.ts` (plain, not "use client") so server components can call it; it is
400
+ still exported from the package and from account.tsx.
401
+
363
402
  ## Report pages (0.4.0)
364
403
 
365
404
  Plain CSS in `kit-plain.css` for a numbers page written by hand (first user: gemnews `/admin`, 03/10/2026; that page moved to GemCommunity the same day, so gemnews no longer takes the package). The