@gemboss/ui 0.50.0 → 0.51.0
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 +197 -0
- package/README.md +153 -1
- package/catalog/editor.html +25 -12
- package/catalog/index.html +635 -93
- package/gemboss-ui.css +3 -3
- package/package.json +8 -1
- package/parts/components.css +1 -1
- package/parts/core.css +1 -1
- package/parts/shell.css +1 -1
- package/src/auth-extras.css +1 -0
- package/src/auth-footer.css +1 -0
- package/src/auth-footer.tsx +71 -0
- package/src/auth-signin-plain.js +1 -1
- package/src/auth-sso-plain.js +1 -1
- package/src/auth-steps.css +1 -0
- package/src/auth-steps.tsx +179 -0
- package/src/auth.css +1 -1
- package/src/auth.tsx +159 -31
- package/src/dialog.tsx +3 -0
- package/src/editor/color-picker.tsx +183 -0
- package/src/editor/controls.tsx +49 -33
- package/src/editor/index.ts +8 -0
- package/src/editor/picker-grid.tsx +186 -0
- package/src/editor/picker.tsx +275 -0
- package/src/editor/popover.tsx +160 -0
- package/src/editor/swatch.ts +2 -1
- package/src/editor-color.css +1 -0
- package/src/editor-picker-grid.css +1 -0
- package/src/editor-picker.css +1 -0
- package/src/editor-plain.js +1 -1
- package/src/editor-popover.css +1 -0
- package/src/editor.css +1 -1
- package/src/icons.tsx +4 -0
- package/src/index.ts +4 -1
- package/src/theme.tsx +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,203 @@ Versions up to 0.9.0 are described in the README, each in the section that intro
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.51.0 (24/10/2026)
|
|
8
|
+
|
|
9
|
+
**AuthSignIn: the server's sentence, a notice, the cursor, and a sentence that blames no field** (24/10/2026). Moving the
|
|
10
|
+
fleet's 20 sign-in pages onto `AuthSignIn` 0.50.0 found four things the hand-built forms did and the component could not:
|
|
11
|
+
|
|
12
|
+
Added
|
|
13
|
+
- `error` (+ `errorFields`): the sentence the server answered a plain form post with (a press before React loaded; the page
|
|
14
|
+
reads it from `?error=`), shown as if `onSignIn` had said it. Without it, that press came back to a silent form (8 gemlabs
|
|
15
|
+
toolkits). `errorFields={false}` for a lock or a closed door.
|
|
16
|
+
- `onSignIn` may answer `{ message, fields: false }`: a 429 lock or a 503 closed door no longer marks Email and Password
|
|
17
|
+
`aria-invalid` (a screen reader heard "invalid" over correct input). Only what was typed is blamed.
|
|
18
|
+
- `notice`: one line above the form until the first press ("Your session expired. Sign in again."): `.gb-auth-notice` in
|
|
19
|
+
auth.css. The admins had each drawn their own above the GemBoss button.
|
|
20
|
+
- `autoFocus`: the cursor in Email (three radars had it by hand).
|
|
21
|
+
- `signInRefusal(res)`: a sign-in route's refusal read the way the plain form reads it (the body's `error`, `detail` or
|
|
22
|
+
`message`; the fields marked for 400, 401 and 422 only). `if (!res.ok) return signInRefusal(res);` in an `onSignIn`, so no
|
|
23
|
+
toolkit writes that mapping itself.
|
|
24
|
+
- auth-signin-plain.js: the same as `data-error-fields="false"`, `data-notice`, `data-autofocus`; in `data-submit="json"` only
|
|
25
|
+
400, 401 and 422 mark the fields (it marked every answer under 500, a lock included).
|
|
26
|
+
- auth-signin-browser.test.ts: both forms compared in the refused-with-notice and the locked states; the notice goes on the
|
|
27
|
+
first press on both sides; `signInRefusal` and the plain json form give the same sentence and marks for 400, 401, 429,
|
|
28
|
+
503, an empty 500 and a dropped network. Negative control: the plain form ignoring `data-error-fields` is red.
|
|
29
|
+
|
|
30
|
+
Fixed (review of this change)
|
|
31
|
+
- An `onSignIn` answer whose `message` is empty no longer leaves the button on "Signing in…": it says "Couldn't sign in. Try
|
|
32
|
+
again."
|
|
33
|
+
- `error` changing after the form is on the page (a client navigation to another `?error=`) is shown; it was read only once.
|
|
34
|
+
- The notice is in the page when it is read, so its live region never spoke: Email's `aria-describedby` now names it too.
|
|
35
|
+
- `data-autofocus` on a second plain form no longer takes the cursor from the first, nor from a field someone is in.
|
|
36
|
+
|
|
37
|
+
Fixed (review of the five product pages moving onto it: gemfactory, gemform, gemcapture, gemcare, gempress)
|
|
38
|
+
- `AuthSignIn`'s fields are no longer controlled: submit reads the form. A password manager that filled them before React
|
|
39
|
+
loaded fires no change event, so the press sent an empty email and password, and the door counted a wrong try.
|
|
40
|
+
- `next` is posted with the form (a hidden field, both twins; the plain one from `data-next`), so a press made before React or
|
|
41
|
+
the script took over still lands there. Left out, no field: the server keeps its own default.
|
|
42
|
+
- `autoFocus` / `data-autofocus` put the cursor in Email only when nobody is in a field yet (a click into Password while the page
|
|
43
|
+
loaded kept it there before; React's own autofocus did not ask) and never while the page goes on to GemBoss by itself (a
|
|
44
|
+
phone's keyboard opened over the redirect). `autoFocus` no longer writes the HTML attribute.
|
|
45
|
+
- auth-sso-plain.js: `gembossUI.continuesByItself()`, the rule its door already used, for initSignIn and for a page that draws
|
|
46
|
+
its own form.
|
|
47
|
+
- `initSignIn({ onSignIn })` for a one-page app that checks the two values itself (GemCapture's console, GemCare's inbox):
|
|
48
|
+
`onSignIn({ email, password }, form)` answers as AuthSignIn's does, and the plain form keeps the button, the sentence and the
|
|
49
|
+
marks. Both apps had copied the package's error writer and busy state, and found the error region by guessing its id.
|
|
50
|
+
`gembossUI.resetSignIn(form?)` puts a form back as it first came when the app shows it again after sign-out (no sentence, no
|
|
51
|
+
password, the eye shut, Sign in pressable, no `?sso=` reason the address no longer carries).
|
|
52
|
+
- Back from GemBoss into a page the browser kept in memory, the door no longer still reads "Continuing with GemBoss…" (both
|
|
53
|
+
twins; auth-sso-plain.js `resetContinueWithGemBoss`).
|
|
54
|
+
- `data-submit="json"` goes to `data-next` only when it is a path on this site: `//host` or `/\host` lands on `/` (GemPress's
|
|
55
|
+
page check let `/.//evil.com` through as `//evil.com`).
|
|
56
|
+
- auth-signin-plain.js's ceiling 2096 → 2730 B gzip (measured 2218 + the 512 slack), with Chris's OK 24/10/2026: the plain twin
|
|
57
|
+
now holds what each one-page app had copied, and the fixes above.
|
|
58
|
+
|
|
59
|
+
**One sign-in and sign-up for GemBoss, GemCommunity and GemBoss Affiliates** (24/10/2026, Chris's design canvas). The
|
|
60
|
+
screen gains a real screenshot of the product on the panel, "Forgot password?" on the Password row, a row under the card
|
|
61
|
+
(theme, language, Help · Terms · Privacy), and the pieces of a sign-up asked one question a step. Nothing changes for a
|
|
62
|
+
caller that passes none of the new props: the same markup, and auth.css gains no rule (only notes).
|
|
63
|
+
|
|
64
|
+
Added
|
|
65
|
+
- `AuthLayout` `panel.shot` (`AuthShot`: `src`, `alt`, `caption?`, `width?`, `height?`): the screenshot in a white window
|
|
66
|
+
(12px corners, a 28px bar with three grey dots) under the panel's words. Lazy (a phone never downloads it), cropped
|
|
67
|
+
before the panel would cut it (swept 900 to 1920 wide, 600 to 1080 tall), gone under 600px of height.
|
|
68
|
+
- `AuthLayout` `footer`: a row at the bottom of the form's column, outside the card (`gb-auth-stage--foot`,
|
|
69
|
+
`gb-auth-bottom`); gone with the keyboard up, under 400px of height.
|
|
70
|
+
- `PasswordField` `forgot` (`{ href, label?, onClick? }`) and `AuthSignIn` `forgot`: the link on the label's row, at its
|
|
71
|
+
right end, after the field in the tab order, adding no height. Plain twin: `data-forgot` / `data-forgot-label` on
|
|
72
|
+
`initSignIn()`'s form.
|
|
73
|
+
- `AuthFooter` (auth-footer.tsx): the kit's `ThemeToggle` and `LanguageSwitcher` (ghost variant) and the Help, Terms and
|
|
74
|
+
Privacy links, each 44 x 44; the two kit controls take the screen's `--gb-*` colours, so on a dark OS with no theme
|
|
75
|
+
chosen they are dark with the screen. `AUTH_FOOTER_LABELS` for its words.
|
|
76
|
+
- `AuthSteps`, `AuthStepActions`, `AuthChoices`, `AuthChips` (auth-steps.tsx): the step header ("Step 1 of 3", the step's
|
|
77
|
+
name, iris segments, `aria-current="step"`), Back + Continue, radio cards (title, line, iris note; chosen = 2px ink edge
|
|
78
|
+
on a light surface) and checkbox pills (44px), drawn from auth.css's tokens so they follow the screen's dark mode and
|
|
79
|
+
need no core.
|
|
80
|
+
- `ThemeToggle` `followsSystem`: with no `data-theme` set yet, it reads the OS (the sign-in screen does). Off by default.
|
|
81
|
+
- Three entries, each with its ceiling: `auth-extras.css` (0.7 KB gzip, imported by auth.tsx beside auth.css),
|
|
82
|
+
`auth-footer.css` (0.5 KB), `auth-steps.css` (1.0 KB). Not in auth.css: it rides in the frozen gemboss-ui.css, which was
|
|
83
|
+
21 bytes under its ceiling.
|
|
84
|
+
- `auth-standard-browser.test.ts` in Chromium (1280 x 800 and 390 x 844, light and dark), each layout claim beside a
|
|
85
|
+
negative control; the catalog's "Đăng nhập" section draws the standard sign-in (light and dark) and two sign-up steps.
|
|
86
|
+
|
|
87
|
+
**The public site layer is deprecated** (24/10/2026). Public websites use `@gemboss/website-ui` (gemboss-www
|
|
88
|
+
[packages/website-ui](https://github.com/chriskoh26/gemboss-www/tree/main/packages/website-ui), on npm), the full site kit with its rules and CLI; Chris chose one kit for every GemCommerce
|
|
89
|
+
website. `SiteHeader`, `SiteBrand` and `site.css` stay, unchanged, until news.gemboss.ai and the community home move;
|
|
90
|
+
no new page should adopt them. README "The public site layer" says so.
|
|
91
|
+
|
|
92
|
+
**One way to open a picker: the focus, Escape and back** (24/10/2026, picker standard). Five editor pickers opened in `Dialog`
|
|
93
|
+
with the focus on its ✕, the sixth (the page picker) in a popover of its own with its own focus code, back row and copy of the
|
|
94
|
+
Escape rule. Now every picker opens in a kit container with the focus in its search box, and Escape and ← Back are the kit's.
|
|
95
|
+
|
|
96
|
+
Added
|
|
97
|
+
- `Dialog`: a `[data-autofocus]` inside it gets the focus as it opens, as in `Popover` (without one, the browser's first control).
|
|
98
|
+
- PickerList / PickerGrid: with `search.autoFocus` the box carries `[data-autofocus]`, under a mouse only (under a finger a
|
|
99
|
+
focused box raises the on-screen keyboard over the list).
|
|
100
|
+
- `Popover` `placement="below"`: under the anchor, from its left edge (a menu from a top bar).
|
|
101
|
+
|
|
102
|
+
Changed
|
|
103
|
+
- `Popover`: Escape in a nested panel (`onBack`) steps back, as ← Back, and the focus stays in it; at the top it closes as before.
|
|
104
|
+
- `Popover`'s rounding is the shared `gemboss-popover-surface`'s (it declared the same 12px itself); its phone sheet only squares
|
|
105
|
+
the bottom corners.
|
|
106
|
+
- The editor's page picker is a `Popover` (`.gemboss-pagepicker-menu`, `-back` and their animation removed from editor.css).
|
|
107
|
+
|
|
108
|
+
**PickerItem `picture` and `drill`: the editor's page picker on PickerList** (24/10/2026, picker standard, the last picker that drew
|
|
109
|
+
its own list). The top bar's page picker (home, products, collections, cart, the store's pages, then a product, a collection or a
|
|
110
|
+
page) drew its own buttons, search box, thumbs and empty lines (`.gemboss-pagepicker-item`, `-search`, `-list`, `-thumb`, `-empty`,
|
|
111
|
+
`-drill`, `-check`), now removed from editor.css; the trigger, the menu surface, the back row and the sample note stay.
|
|
112
|
+
|
|
113
|
+
Added
|
|
114
|
+
- `PickerItem.picture`: a drawn picture of the caller's (an SVG the kit has no icon for) in the same 40px tile.
|
|
115
|
+
- `PickerItem.drill`: a row that opens a list of its own ends with a chevron instead of the check; picking it is the caller's
|
|
116
|
+
step into that list. Current, it is marked by the chosen row's tint and `aria-selected`, as every current row.
|
|
117
|
+
- `search.autoFocus` (PickerList and PickerGrid): the box takes the focus as the list appears, so a popover that opens on a
|
|
118
|
+
picker does not reach into the kit's markup for its input.
|
|
119
|
+
- Icon `chevronRight`, the stroked chevron the drill row ends with (it drew a filled one of its own).
|
|
120
|
+
|
|
121
|
+
**PickerGrid: PickerList's search and states for things chosen by their picture** (24/10/2026, picker standard slice 3). The
|
|
122
|
+
image picker drew its own grid, search box and loading / empty lines in the admin's CSS, the icon library the editor's ChoiceTiles
|
|
123
|
+
with a search of its own.
|
|
124
|
+
|
|
125
|
+
Added
|
|
126
|
+
- `PickerGrid` (`@gemboss/ui/editor`, editor/picker-grid.tsx): tiles as many to a row as fit (`photo`: square pictures at 120px+,
|
|
127
|
+
the name and a line; `icon`: a 26px drawing over its name on up to two lines at 88px+, 56px+ tall), the chosen tile with the accent edge and a check.
|
|
128
|
+
↓ ↑ move the highlight by a row (the columns read from the layout), to the tile nearest the column in the next row holding a
|
|
129
|
+
choice (a short last row, a row of uploads); ← → Home End along it, in the search box once ↓ or ↑ has stepped into the grid
|
|
130
|
+
(the WAI-ARIA grid combobox: before that, and after the next keystroke typed, they move the caret); a click or Space selects,
|
|
131
|
+
a double click or Enter uses at once where the caller has `onActivate` (the image picker's Use image). A tile being uploaded
|
|
132
|
+
(`status.busy`, a spinner) or that failed (`status.error`, said in red) shows, cannot be chosen, and is announced from live
|
|
133
|
+
regions outside the grid. The search box, the highlight and the states (loading skeletons, the danger notice with Try again,
|
|
134
|
+
no match with Clear search, empty, reloading, Show more) are PickerList's, shared from picker.tsx (`PickSearch`,
|
|
135
|
+
`usePickHighlight`, `PickNothing`). `PickerTile.tooltip` (the title when left out): the image picker's file address.
|
|
136
|
+
- `editor-picker-grid.css` (`@gemboss/ui/editor-picker-grid.css`), its own entry, 1.1 KB gzip (its ceiling in weight-budget.json
|
|
137
|
+
is that plus 512 B, as every entry's).
|
|
138
|
+
- `PickerItem.titleStyle`: a title drawn as what it names (a font's name in its own face).
|
|
139
|
+
- `editor-picker-grid-browser.test.tsx` in Chromium, each case beside the one the old code failed.
|
|
140
|
+
|
|
141
|
+
Fixed
|
|
142
|
+
- PickerList (and PickerGrid): the highlight is scrolled into view when the keys move it, not when the pointer does (a pointer
|
|
143
|
+
resting on a half-shown row scrolled the list under itself).
|
|
144
|
+
- PickerList and PickerGrid: `more` shows after "no results" and an empty list too (the next page may hold it), and "no
|
|
145
|
+
results" offers the empty state's action (a library with nothing in it, searched, hid Upload).
|
|
146
|
+
|
|
147
|
+
**ColorControl `onDraft`; Popover beside the card that holds the column** (24/10/2026, gemboss #5323, the page editor's section
|
|
148
|
+
Background color on the kit's control).
|
|
149
|
+
|
|
150
|
+
Added
|
|
151
|
+
- `ColorControl.onDraft(text)`: the text box as it is typed, each key, before the commit (blur / Enter). A host that keeps unsaved
|
|
152
|
+
edits (a claims queue, a flush when its panel switches) holds the typing with it; kept only in the control, a value landing from
|
|
153
|
+
elsewhere replaced the half-typed one unseen.
|
|
154
|
+
|
|
155
|
+
Fixed
|
|
156
|
+
- Popover: placed beside the card AROUND the settings column (each edge within 24px of the column's), not the column itself (it
|
|
157
|
+
overlapped the page editor's card edge, 372 vs 389); a box that does not hold the column (`display: contents`, a narrower
|
|
158
|
+
wrapper) is passed over instead of taken as the card.
|
|
159
|
+
|
|
160
|
+
**PickerList: the body of every "choose one" popup in the editors** (24/10/2026). Chris, on the admin's link picker: the
|
|
161
|
+
pickers look bare and should follow the kit. Each of them drew its own list in the admin's CSS: the link and video pickers one
|
|
162
|
+
way, media, fonts, pages and the catalog four others (survey of 24/10/2026), with their own search box, rows, empty and loading
|
|
163
|
+
lines.
|
|
164
|
+
|
|
165
|
+
Added
|
|
166
|
+
- `PickerList` (`@gemboss/ui/editor`, editor/picker.tsx), Polaris' Combobox over a Listbox at the kit's numbers. The search box
|
|
167
|
+
keeps the focus while ↑ ↓ move the highlighted row and Enter picks it (Escape clears the box first, then is the popup's); with
|
|
168
|
+
no box the list takes the keys. A row is a 40px picture (a photo, or an icon for a page or a section), the title on a 20px
|
|
169
|
+
line at 650 with a `ui-tag` pill, and a second line whose NOTE comes first in a box the ellipsis never reaches (gemboss #5283:
|
|
170
|
+
"Opens the popup" was cut off at the end of a long line). The chosen row has a check and `aria-selected`; a row that cannot be
|
|
171
|
+
picked shows and says why (`disabledReason`). Loading keeps the rows' place with skeletons; `reloading` keeps the last answer's
|
|
172
|
+
rows dimmed and `aria-busy` and picks nothing from them (an Enter typed before a search's answer wrote the previous search's
|
|
173
|
+
row); an error is the kit's danger notice with Try again; a search that finds nothing offers Clear search; an empty list says
|
|
174
|
+
the caller's words; `more` adds Show more. The highlight is kept by row, moves with the pointer, and an Enter or Escape that
|
|
175
|
+
ends an IME composition is the typing's.
|
|
176
|
+
- `editor-picker.css` (`@gemboss/ui/editor-picker.css`), its own entry, 1.0 KB gzip: only a surface that draws a picker loads it.
|
|
177
|
+
- `editor-picker-browser.test.tsx`: the rows' numbers, the keys, a click, a locked row, the states and the 44px clear button
|
|
178
|
+
under a finger, in Chromium; a negative control where a note that may shrink is cut by the same line.
|
|
179
|
+
|
|
180
|
+
**Popover and the colour picker: a setting's panel beside the column; ColorControl's swatch opens the kit's picker** (24/10/2026).
|
|
181
|
+
Chris: the editor lacks the small panels GemPages opens from a setting, and the colour picker should be standard and easy to use
|
|
182
|
+
("tham khảo cái gì hợp lý… ưu tiên ui ux dễ dùng"). ColorControl's swatch was `<input type="color">`: the operating system's
|
|
183
|
+
picker, a different window on every machine, with no opacity and none of the theme's colours.
|
|
184
|
+
|
|
185
|
+
Added
|
|
186
|
+
- `Popover` (`@gemboss/ui/editor`, editor/popover.tsx): in the top layer, BESIDE the settings column the anchor scrolls in, on the
|
|
187
|
+
side with room, its top at the anchor's row; under the anchor when neither side has room; a sheet along the bottom at phone width.
|
|
188
|
+
A head with its title, ← Back for a nested panel and ✕; Escape (only it) or a press outside closes it; the focus goes in, and
|
|
189
|
+
back to `returnTo` on Escape or ✕. `editor-popover.css`, 0.6 KB gzip.
|
|
190
|
+
- `ColorPicker` (editor/color-picker.tsx): a saturation × brightness square that works with the pointer and the keys (← → ↑ ↓,
|
|
191
|
+
Shift for 10), hue and opacity as native ranges (the opacity over a checkerboard), a hex box, an eyedropper where the browser has
|
|
192
|
+
`EyeDropper`, the theme's colours under "Theme", the recent ones under "Recent" (`ColorChoice.group`), and None. A pick keeps the
|
|
193
|
+
value's transparency and way of writing (`pickSwatch`); a drag writes at most every 80 ms and once at its end, a key at once.
|
|
194
|
+
`editor-color.css`, 1.2 KB gzip. Not copied from GemPages: its square hides on desktop until a second click and is mouse-only,
|
|
195
|
+
and it offers no theme colours.
|
|
196
|
+
- `eyedropper` in the icon set.
|
|
197
|
+
|
|
198
|
+
Changed
|
|
199
|
+
- ColorControl's swatch is a `button.gemboss-ei-swatch` (`aria-haspopup="dialog"`, `aria-expanded`) that opens the picker in a
|
|
200
|
+
Popover; it paints the colour with its opacity over a checkerboard (`--sw` on `.gemboss-ei-swatch-fill`), and nothing for a value
|
|
201
|
+
it cannot show (the native swatch painted those black, a colour nobody chose); disabled with its reason as before. The text box,
|
|
202
|
+
the opacity box and the chips while the field is in use are unchanged. editor-plain.js (pages without React) keeps the native one.
|
|
203
|
+
|
|
7
204
|
## 0.50.0 (24/10/2026)
|
|
8
205
|
|
|
9
206
|
**Continue with GemBoss says which name the page is on** (24/10/2026). Every internal tool answers to a flat name and an .ops
|
package/README.md
CHANGED
|
@@ -58,6 +58,9 @@ its CSS out of the build with it (`sideEffects`). gzip of the minified file, as
|
|
|
58
58
|
| menu | `@gemboss/ui/menu.css` | `packages/ui/src/menu.css` | the ⋯ menu and its icon button (23/10/2026, moved out of `kit-plain.css`, same rules): part of the core (components, just before `kit-plain.css`, where its rules stood) AND its own file | 0.6 KB | `Menu` imports it, so a surface without the core draws the menu: the admin loads `ui.css` and the shell, never `kit-plain.css` |
|
|
59
59
|
| shell | `@gemboss/ui/shell.css` | `parts/shell.css` | rail, topbar, main, mobile drawer, the thread rail, topbar slots, base text, page widths (`app-shell.css`) | 5.5 KB | every surface, third |
|
|
60
60
|
| auth | `@gemboss/ui/auth.css` | `packages/ui/src/auth.css` | the sign-in screen (+ the grid backdrop, 0.30.0) | 2.8 KB | `AuthLayout` & co. import it |
|
|
61
|
+
| auth-extras | `@gemboss/ui/auth-extras.css` | `packages/ui/src/auth-extras.css` | what the sign-in screen gained after the bundle froze (24/10/2026): the panel's screenshot window, "Forgot password?" on the Password row, the place of the row under the card | 0.7 KB | auth.tsx imports it beside auth.css; a plain page links it after auth.css |
|
|
62
|
+
| auth-footer | `@gemboss/ui/auth-footer.css` | `packages/ui/src/auth-footer.css` | `AuthFooter`: theme, language, Help · Terms · Privacy under the sign-in card (24/10/2026) | 0.5 KB | `AuthFooter` imports it (and, through ThemeToggle and LanguageSwitcher, portal.css, theme-dark.css, language-switcher.css) |
|
|
63
|
+
| auth-steps | `@gemboss/ui/auth-steps.css` | `packages/ui/src/auth-steps.css` | `AuthSteps`, `AuthStepActions`, `AuthChoices`, `AuthChips`: a sign-up of several steps (24/10/2026) | 1.0 KB | those components import it, with auth.css |
|
|
61
64
|
| assistant | `@gemboss/ui/assistant.css` | `packages/ui/src/assistant.css` | the dock and the launcher | 2.2 KB | `AssistantHost`, the launcher import it |
|
|
62
65
|
| portal | `@gemboss/ui/portal.css` | `packages/ui/src/portal.css` | `TopbarNav`, `SearchDialog`, `Avatar`, `Leaderboard`, `Podium`, the `ThemeToggle` button | 2.1 KB | those components import it |
|
|
63
66
|
| topnav-fold | `@gemboss/ui/topnav-fold.css` | `packages/ui/src/topnav-fold.css` | `TopbarNav`'s folded menu after the frozen bundle (unreleased): `foot`, `foldAt={760}`, `gb-topnav-unfolded`, the open tab's ellipsis | 0.3 KB | `TopbarNav` imports it (after portal.css) |
|
|
@@ -265,6 +268,56 @@ that writes the markup puts `gb-auth-panel--grid` (or `--none`) beside `gb-auth-
|
|
|
265
268
|
panel={{ eyebrow: "gemform · GemBoss Ops", heading: "Every Gem registration, in one place." }}>…</AuthLayout>
|
|
266
269
|
```
|
|
267
270
|
|
|
271
|
+
### The standard sign-in and sign-up (24/10/2026)
|
|
272
|
+
|
|
273
|
+
Chris's design canvas (24/10/2026) gives GemBoss, GemCommunity and GemBoss Affiliates one sign-in and one sign-up. The
|
|
274
|
+
card keeps its mark, name and tagline, Email, Password, the button, "or" and the GemBoss / Google doors and one switch
|
|
275
|
+
line; four things are new:
|
|
276
|
+
|
|
277
|
+
- **`panel.shot`**: a real screenshot of the product (`{ src, alt, caption?, width?, height? }`) in a white window under
|
|
278
|
+
the panel's words: 12px corners, a 28px bar with three grey dots, a soft shadow. Lazy, so a phone (no panel) never
|
|
279
|
+
downloads it; cropped from the top-left before the panel would cut it; gone under 600px of height. Re-tune it with
|
|
280
|
+
`--gb-shot-bg`, `--gb-shot-bar`, `--gb-shot-line`, `--gb-shot-dot`, `--gb-shot-shadow` on `.gb-auth`.
|
|
281
|
+
- **`PasswordField` `forgot`** (`{ href, label?, onClick? }`, and `AuthSignIn` `forgot`): "Forgot password?" on the
|
|
282
|
+
Password label's row, at its right end. It comes AFTER the field in the page, so Tab goes Email, Password, then the link.
|
|
283
|
+
- **`footer` + `AuthFooter`**: the row at the bottom of the form's column, outside the card: the kit's `ThemeToggle`
|
|
284
|
+
(`followsSystem`, because the screen follows the OS until a choice is made), the kit's `LanguageSwitcher` (the ghost
|
|
285
|
+
`topbar` variant; pass `language.variant` for another), then Help · Terms · Privacy. Every control and link 44 x 44.
|
|
286
|
+
Gone with the keyboard up (under 400px of height). Put `themeScript` in `<head>` so a stored choice is on before the
|
|
287
|
+
first paint; `theme={false}` on a product with no dark theme behind its sign-in.
|
|
288
|
+
- **A sign-up of several steps** (auth-steps.tsx): `AuthSteps` ("Step 1 of 3", the step's name, one segment a step, the
|
|
289
|
+
current one `aria-current="step"`), `AuthChoices` (one answer: radio cards with a title, a line and an iris note; the
|
|
290
|
+
chosen one has a 2px ink edge), `AuthChips` (several answers: checkboxes in 44px pills) and `AuthStepActions` (Back
|
|
291
|
+
beside Continue; Continue is the step form's submit, and on the last step its words say what it sends).
|
|
292
|
+
|
|
293
|
+
```tsx
|
|
294
|
+
import { AuthChoices, AuthFooter, AuthForm, AuthLayout, AuthSignIn, AuthStepActions, AuthSteps } from "@gemboss/ui";
|
|
295
|
+
|
|
296
|
+
const footer = <AuthFooter language={{ value: lang, onChange: setLang }} help="/help" terms="/terms" privacy="/privacy" />;
|
|
297
|
+
|
|
298
|
+
<AuthLayout brand="GemBoss Affiliates" tagline="Earn 30% for every merchant you bring." backdrop="grid" footer={footer}
|
|
299
|
+
panel={{ eyebrow: "GemBoss Affiliates", heading: "Every sale you send, counted.", body: "Your links, your clicks and what they earned.",
|
|
300
|
+
shot: { src: "/auth/earnings.png", alt: "This month's earnings, day by day", width: 1200, height: 750 } }}>
|
|
301
|
+
<AuthSignIn onSignIn={signIn} forgot={{ href: "/forgot" }} foot={<>Not an affiliate yet? <a href="/apply">Apply →</a></>} />
|
|
302
|
+
</AuthLayout>
|
|
303
|
+
|
|
304
|
+
// A step of the sign-up: one question, Back + Continue.
|
|
305
|
+
<AuthForm onSubmit={(e) => { e.preventDefault(); next(); }}>
|
|
306
|
+
<AuthSteps steps={["Account", "About you", "Payout"]} step={2} />
|
|
307
|
+
<AuthChoices name="role" legend="You join as" value={role} onChange={setRole} options={[
|
|
308
|
+
{ value: "affiliate", title: "Affiliate", line: "You share your link with your audience.", note: "30% recurring for 12 months" },
|
|
309
|
+
{ value: "agency", title: "Agency", line: "You set up GemBoss for the stores you run.", note: "From 3 client stores" }]} />
|
|
310
|
+
<AuthStepActions onBack={back}>Continue</AuthStepActions>
|
|
311
|
+
</AuthForm>
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Their CSS is in three entries of their own (auth.css rides in the frozen bundle, which had no room): the components bring
|
|
315
|
+
them. A plain-HTML page links `auth-extras.css` (and `auth-footer.css`, `auth-steps.css`, `language-switcher.css` when it
|
|
316
|
+
draws those) after `auth.css` and writes the markup each file's header shows; the catalog's "Đăng nhập" section renders
|
|
317
|
+
all of it. `initSignIn()` (auth-signin-plain.js) draws the forgot link from `data-forgot` (`data-forgot-label` for its
|
|
318
|
+
words). The footer's theme button has no plain twin yet (kit-plain.js carries no ThemeToggle): a plain page wires its
|
|
319
|
+
button to `data-theme` and the `gemboss-theme` key itself, or leaves it out.
|
|
320
|
+
|
|
268
321
|
## The assistant frame
|
|
269
322
|
|
|
270
323
|
```tsx
|
|
@@ -859,7 +912,7 @@ import { ColorControl, EdgeBox, Field, ImageControl, InspectorGroup, PanelAction
|
|
|
859
912
|
| `InspectorGroup` | `.gemboss-ei-grp` › `button.gemboss-ei-gh` (13px / 650, the chevron at its end, `note` as `.gemboss-ei-gh-note`) + the body | `aria-expanded`, `data-open`; closed, CSS hides everything after the header (the body stays mounted; an inline `display` on the body's first element would win over that, so give it a bare wrapper). Controlled (`open` + `onOpenChange`, which receives the NEXT state) or not (`defaultOpen`). `attrs`: `data-*` on the group itself, so a page that finds groups by an attribute needs no wrapper (a wrapper drops the divider between groups). `collapsible={false}`: the schema form's static group, `section.gemboss-ei-group` › `h4.gemboss-ei-grouphead` + `hint`. |
|
|
860
913
|
| `Field` | `.gemboss-ei-fld` › `label` (13px / 500; `htmlFor`; `labelValue` as `.gemboss-ei-rangeval` at its right edge) · control · `hint` | No label when `label` is undefined / null. `className` (the admin's `togrow`), `style`. |
|
|
861
914
|
| `Seg` | `.gemboss-ei-seg[role=group]` › `button[aria-pressed][data-value]` (`.on`) | A click hands back the option's value; `label` names the group; `style` on the group. |
|
|
862
|
-
| `ColorControl` | `.gemboss-ei-color` › `
|
|
915
|
+
| `ColorControl` | `.gemboss-ei-color` › `button.gemboss-ei-swatch` + text box | The swatch opens the kit's picker (Popover + ColorPicker), which commits on every pick (a drag at most every 80 ms). The text box keeps a draft, each key sent to `onDraft` for a host that holds unsaved edits, and commits on blur (every blur) or Enter. A value the swatch cannot show (a token, a gradient) disables it and says why under it (`swatchState`). |
|
|
863
916
|
| `RangeControl` | `input[type=range].gemboss-ei-range` | Every change, as a number (drag, arrows, Home / End). Show the value with `Field`'s `labelValue`. |
|
|
864
917
|
| `EdgeBox` | `.gemboss-ei-edgebox` › four `.gemboss-ei-edge` (box + T / R / B / L) | `onChange(side, raw)` per keystroke, `onCommit()` on blur; Enter blurs. Boxes named "<label> top / right / bottom / left". `narrow` (default) adds `gemboss-field--narrow`; `placeholders`, `ids` per side. What an empty edge means is the caller's. |
|
|
865
918
|
| `ImageControl`, `ChipButton` | `.gemboss-ei-img` › 52px thumbnail (— when empty) · URL box · `.gemboss-ei-img-actions` (`actions`, then Clear while there is a value) | Commits on blur / Enter only when the box changed; Clear commits "". The box's text can be the caller's (`draft` + `onDraftChange`) to put a picked URL in it at once. The thumbnail's `url()` is quoted (`cssUrl`, 0.20.1), so a URL with ")" or a space still shows. |
|
|
@@ -1615,6 +1668,99 @@ import { ChoiceTiles } from "@gemboss/ui/editor";
|
|
|
1615
1668
|
rectangle drawn to fit 26px: wide by its width, tall by its height) · `.gemboss-ei-tile-label`. 4 to a row, 56px tall. The caller
|
|
1616
1669
|
owns the value; a click calls `onChange`. Its own part (`editor-tiles.css`).
|
|
1617
1670
|
|
|
1671
|
+
## Picker grid (24/10/2026): `PickerGrid`
|
|
1672
|
+
|
|
1673
|
+
PickerList's search box and states for things chosen by their picture: the shop's images, an icon library.
|
|
1674
|
+
|
|
1675
|
+
```tsx
|
|
1676
|
+
import { PickerGrid } from "@gemboss/ui/editor";
|
|
1677
|
+
|
|
1678
|
+
<PickerGrid label="Your images" tiles={tiles} selected={key} onSelect={setKey} onActivate={use}
|
|
1679
|
+
search={{ value: q, onChange: setQ, placeholder: "Search by name" }} state={rows ? "ready" : "loading"} />
|
|
1680
|
+
```
|
|
1681
|
+
|
|
1682
|
+
- `size="photo"` (default): square pictures 120px wide at least (two to a row at a phone's width), the name and a line at 12/16;
|
|
1683
|
+
`fit: "contain"` and `checker` for a logo or a cut-out. `size="icon"`: a 26px drawing (`picture`) over its name (two lines at most), 88px+, 56px+ tall.
|
|
1684
|
+
- ↓ ↑ move by a row (as many columns as are laid out) to the tile nearest the column in the next row holding a choice; ← → Home
|
|
1685
|
+
End along it. In the search box those three are the caret's until ↓ or ↑ steps into the grid, and again after the next keystroke
|
|
1686
|
+
typed (the WAI-ARIA grid combobox). Enter uses with `onActivate` (else selects), Space and a click select, a double click uses.
|
|
1687
|
+
`status: { busy }` / `{ error }`: an upload shown as a tile, not a choice, announced from live regions outside the grid (an
|
|
1688
|
+
option's children are presentational).
|
|
1689
|
+
- The states and the search box are PickerList's (see below). Its own part (`editor-picker-grid.css`, 1.1 KB gzip).
|
|
1690
|
+
|
|
1691
|
+
## Picker list (24/10/2026): `PickerList`
|
|
1692
|
+
|
|
1693
|
+
The body of a popup that picks one thing (a link's page or section, a video, a font): Polaris' Combobox over a Listbox. The
|
|
1694
|
+
caller owns the popup (the kit's `Dialog`), any tabs above (`Segmented`), the filtering, and what a pick does.
|
|
1695
|
+
|
|
1696
|
+
```tsx
|
|
1697
|
+
import { PickerList } from "@gemboss/ui/editor";
|
|
1698
|
+
|
|
1699
|
+
<PickerList label="Sections" current={stored} onPick={write}
|
|
1700
|
+
search={{ value: q, onChange: setQ, placeholder: "Search sections" }}
|
|
1701
|
+
state={failed ? "error" : rows === null ? "loading" : asking ? "reloading" : "ready"}
|
|
1702
|
+
error={{ message: "The page could not be read.", onRetry: reread }}
|
|
1703
|
+
empty={{ title: "This page has no sections yet." }}
|
|
1704
|
+
items={(rows ?? []).map((s) => ({ key: s.href, title: s.title, subtitle: s.href, icon: "layout",
|
|
1705
|
+
note: s.popup ? "Opens the popup" : undefined }))} />
|
|
1706
|
+
```
|
|
1707
|
+
|
|
1708
|
+
`.gemboss-ei-pick` › `.gemboss-ei-pick-search` (the `gemboss-field` box, a search icon, ✕ Clear search) · `ul.gemboss-ei-pick-list
|
|
1709
|
+
[role=listbox]` › `li.gemboss-ei-pick-row[role=option][aria-selected]` › `.gemboss-ei-pick-media` (an `img`, an empty square, or
|
|
1710
|
+
an icon) · `.gemboss-ei-pick-text` › `.gemboss-ei-pick-head` (`.gemboss-ei-pick-title` + `ui-tag`) and `.gemboss-ei-pick-sub`
|
|
1711
|
+
(`.gemboss-ei-pick-note` that never shrinks, then `.gemboss-ei-pick-rest` cut with "…") · `.gemboss-ei-pick-check`.
|
|
1712
|
+
|
|
1713
|
+
- The box and the list are 12 apart (the dialog's field→field rhythm); rows touch, as the kit Menu's do. A row is 56px:
|
|
1714
|
+
`--ui-space-2` around a 40px picture (the kit thumb), the title on a 20px line at `--ui-fs-body` / 650 and the second line
|
|
1715
|
+
20px muted (both the kit list's). 8 around, not a list page's 12: a Listbox option, not a ResourceItem. Every number is a
|
|
1716
|
+
`--ui-*` token, so the picker follows the kit's theme.
|
|
1717
|
+
- `note` is what to know before picking ("Draft: opens once it is active"); it comes first on the second line, so the ellipsis
|
|
1718
|
+
takes the path after it, never the note. `disabledReason` shows a row that cannot be picked and says why, in red.
|
|
1719
|
+
- `badge` is a short status as a pill, toned `neutral` · `info` · `success` · `warning` · `critical` (`ui-tag` modifiers).
|
|
1720
|
+
- `picture` is a drawn picture of the caller's (an SVG the kit has no icon for) in the 40px tile; `drill` marks a row that opens
|
|
1721
|
+
a list of its own (the page picker's Products), drawn with a chevron instead of the check; current, it has the chosen row's tint.
|
|
1722
|
+
- `search.autoFocus`: the box takes the focus as the list appears (a popover opening on a picker; a new `key` is a new list).
|
|
1723
|
+
- **One way to open a picker** (24/10/2026). Every picker in the editors opens in the kit's `Dialog` (link, video, font, image,
|
|
1724
|
+
icon) or `Popover` (the page picker, under its trigger), and every one sets `search.autoFocus`: the box carries
|
|
1725
|
+
`[data-autofocus]`, which both containers focus as they open (a `Dialog` without one gives the focus to its ✕). Under a finger
|
|
1726
|
+
(`(pointer: coarse)`) the box does not take the focus by itself: the on-screen keyboard would cover the list. Escape in a box
|
|
1727
|
+
with words clears them; in a list inside a list (the Popover's `onBack`) it steps back, as ← Back; otherwise the container
|
|
1728
|
+
closes and the focus goes back to what opened it.
|
|
1729
|
+
- Keys: ↑ ↓ move the highlight past locked rows, Enter picks; in the box Escape clears the words before the popup closes;
|
|
1730
|
+
with no box the list is one tab stop and Home / End work too. One click picks.
|
|
1731
|
+
- States: `loading` (skeleton rows, a first read), `reloading` (the last answer's rows kept, dimmed and `aria-busy`, nothing
|
|
1732
|
+
pickable from them while the next search is read), `error` (the kit's danger notice, Try again with `onRetry`), no match
|
|
1733
|
+
(Clear search, the focus back in the box), `empty`, `more` (Show more, after the list).
|
|
1734
|
+
|
|
1735
|
+
Its own part (`editor-picker.css`, 1.0 KB gzip).
|
|
1736
|
+
|
|
1737
|
+
## Popover and the colour picker (24/10/2026): `Popover`, `ColorPicker`
|
|
1738
|
+
|
|
1739
|
+
A setting that needs more room than its row opens a `Popover` beside the settings column, over the canvas, so the column does not
|
|
1740
|
+
grow. `ColorControl`'s swatch opens one holding the `ColorPicker`; nothing else is needed for a colour field.
|
|
1741
|
+
|
|
1742
|
+
```tsx
|
|
1743
|
+
import { Popover } from "@gemboss/ui/editor";
|
|
1744
|
+
|
|
1745
|
+
<Popover open={open} anchor={rowRef.current} returnTo={buttonRef.current} title="Shadow" onClose={() => setOpen(false)}>
|
|
1746
|
+
…the setting's controls…
|
|
1747
|
+
</Popover>
|
|
1748
|
+
```
|
|
1749
|
+
|
|
1750
|
+
- Placed beside the column the anchor scrolls in (its nearest vertically scrolling ancestor), on the side with room (right first),
|
|
1751
|
+
its top at the anchor's row and kept on screen; neither side has room: under the anchor. Placed again on a scroll or resize outside
|
|
1752
|
+
it. At phone width (`max-width: 47.9975em`) a sheet along the bottom.
|
|
1753
|
+
- `placement="below"`: under the anchor instead, from its left edge (a menu from a top bar, the editor's page picker). The sheet at
|
|
1754
|
+
phone width is the same.
|
|
1755
|
+
- Head: title (13/20/650), ← Back with `onBack` (a nested panel), ✕; 28px buttons under a mouse, 44 under a finger.
|
|
1756
|
+
- Escape steps back in a nested panel (`onBack`, as ← Back; the focus stays inside), else closes it and goes no further; a press
|
|
1757
|
+
outside it and its anchor closes it; the focus goes in (`[data-autofocus]`, else the
|
|
1758
|
+
layer) and back to `returnTo` (else the anchor) on Escape or ✕.
|
|
1759
|
+
- The `ColorPicker`: square (pointer and keys), hue, opacity, hex box, eyedropper (`EyeDropper`), Theme / Recent (`ColorChoice.group`),
|
|
1760
|
+
None. A pick keeps the value's alpha and format (`pickSwatch`); a drag writes at most every 80 ms and once at its end.
|
|
1761
|
+
|
|
1762
|
+
Their own parts: `editor-popover.css` (0.6 KB gzip), `editor-color.css` (1.2 KB gzip, the swatch button too).
|
|
1763
|
+
|
|
1618
1764
|
## Resizable panels
|
|
1619
1765
|
|
|
1620
1766
|
`ui-resizer` is the seam a person drags between two panels; `ui-resizing` on `<body>` is the drag in
|
|
@@ -1820,6 +1966,12 @@ import { Avatar, Dialog, Leaderboard, Podium, SearchDialog, ThemeToggle, themeSc
|
|
|
1820
1966
|
|
|
1821
1967
|
## The public site layer (0.40.0): `SiteHeader`, `SiteBrand`, links, buttons, footer
|
|
1822
1968
|
|
|
1969
|
+
**Deprecated (24/10/2026).** Public websites now use **`@gemboss/website-ui`** (source: [packages/website-ui](https://github.com/chriskoh26/gemboss-www/tree/main/packages/website-ui) in
|
|
1970
|
+
chriskoh26/gemboss-www, published on npm): the whole site kit (tokens from one `system.json`, header with the mega
|
|
1971
|
+
menu, footer, sections, the rules Claude Code follows in `AGENTS.md`, and a CLI that checks a site and reports gaps).
|
|
1972
|
+
Chris chose it on 24/10/2026 so GemPages, Gemians and every other GemCommerce website follow one kit. This layer stays
|
|
1973
|
+
until the pages still on it (news.gemboss.ai, the community home) move over; do not adopt it on a new page.
|
|
1974
|
+
|
|
1823
1975
|
**Which layer.** A PUBLIC page (gemboss.ai, the docs, news, a product's home page before sign-in) uses this layer. An APP
|
|
1824
1976
|
surface (the admin, a portal behind sign-in, GemFeedback's board) keeps `Topbar` + `BrandLockup`. Chris 20/10/2026: "có gemboss
|
|
1825
1977
|
ui thì có gemboss website ui"; measured the same day, the public pages had drifted on the same detail: the logo name 18px on
|