@gemboss/ui 0.6.5 → 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 +45 -3
- package/catalog/index.html +421 -5
- package/gemboss-ui.css +212 -17
- package/package.json +1 -1
- package/src/account.tsx +4 -6
- package/src/app-shell.css +4 -1
- package/src/assistant.css +7 -4
- package/src/chat.css +2 -2
- package/src/dialog.tsx +195 -0
- package/src/icons.tsx +2 -0
- package/src/index.ts +6 -1
- package/src/initials.ts +14 -0
- package/src/kit-plain.js +19 -6
- package/src/portal.css +187 -0
- package/src/portal.tsx +161 -0
- package/src/shell.css +13 -11
- package/src/theme.tsx +42 -0
- package/src/ui.css +4 -4
package/README.md
CHANGED
|
@@ -100,7 +100,8 @@ The host registers `allowSide` with the provider, and every way into the panel c
|
|
|
100
100
|
a "side" remembered in storage: a host without it gets the popup.
|
|
101
101
|
|
|
102
102
|
The rail's way in is a `RailItem` with `className="gnav-assistant"`, linking to your full-screen
|
|
103
|
-
address (the admin puts it in `RailBottom`, above Inbox). That class draws the tinted pill
|
|
103
|
+
address (the admin puts it in `RailBottom`, above Inbox). That class draws the iris-tinted pill (0.6.8; it
|
|
104
|
+
was a mix of `--gemboss-primary`, grey once primary went near-black, so it read as a second selected row), and the
|
|
104
105
|
working / answer-waiting dot the provider switches on through `<body>` classes. Leave
|
|
105
106
|
`bodyClassPrefix` at its default so those rules apply. If the popup is what the person last used, a
|
|
106
107
|
plain click on that link opens the popup instead of navigating.
|
|
@@ -233,7 +234,8 @@ New primitives, Polaris' shapes on GemBoss tokens (`kit-plain.css`; the admin us
|
|
|
233
234
|
|
|
234
235
|
And four targets that measured under 44px at phone width are now 44: a compact text button's width, the bare input
|
|
235
236
|
inside `gemboss-field--group`, the brand mark alone (≤460px), a toggle chip. A popup opened by an Escape handler no
|
|
236
|
-
longer catches that same Escape (`openModal` listens
|
|
237
|
+
longer catches that same Escape (0.6.7: `openModal` listens at once and skips only the keydown that opened it; 0.5.1
|
|
238
|
+
listened from the next task, which on a busy page lost Escape or Tab pressed right after a popup opened). The rail item and segmented buttons draw the iris focus ring (they had
|
|
237
239
|
none: the browser drew its own), the popup × too (it drew near-black); at phone width the chat composer is 16px (iOS
|
|
238
240
|
zoomed it at 14) and the thread rail's "new chat" / collapse buttons are 44px under a fine pointer as well. Headings carry
|
|
239
241
|
their own line-height (a wrapped 22px title overlapped itself on the 20px body line), a badge is a tint of the ink (it
|
|
@@ -353,10 +355,50 @@ The admin's "Search ⌘K" box for every surface, as a real form (works with no J
|
|
|
353
355
|
|
|
354
356
|
- Submits `GET action?q=…` (`name` changes the parameter). `defaultValue` keeps the current query on the results page.
|
|
355
357
|
- 36px under a mouse; 44px under a finger **and at phone width** (≤767px, 0.6.5: the kit's own controls use the same pair,
|
|
356
|
-
and with `pointer: coarse` alone a narrow window measured 36 and failed `tap_target_size`).
|
|
358
|
+
and with `pointer: coarse` alone a narrow window measured 36 and failed `tap_target_size`). The input itself spans the
|
|
359
|
+
full 44 (0.6.6): the box is a form, so the input is what a finger has to hit. ⌘K hint hidden on focus and below 460px.
|
|
357
360
|
- Shortcut on a page without React: `gembossUI.initSearch()` from `kit-plain.js` (⌘K / Ctrl+K and "/" focus it,
|
|
358
361
|
Escape leaves it). "/" is ignored while another field has focus.
|
|
359
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
|
+
|
|
360
402
|
## Report pages (0.4.0)
|
|
361
403
|
|
|
362
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
|