@aiquants/auth-react-router 0.29.0 → 0.31.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/README.md CHANGED
@@ -227,6 +227,44 @@ export default () => <AuthUserAdminAppView basePath="/users" />
227
227
  deep-link note are rows of the vertical stack outside the wrapping row, so they span the whole width in both
228
228
  arrangements. Long addresses wrap inside a member row.
229
229
 
230
+ ### Colour scheme
231
+
232
+ Every colour the console draws is a pair of a light value and a dark value written as CSS `light-dark()`, so it follows
233
+ the `color-scheme` the host sets on an ancestor: `color-scheme: dark` (on `html.dark`, for example) shows the dark
234
+ values, and a page that sets none keeps the light ones. The package reads neither a `.dark` class nor
235
+ `prefers-color-scheme`, and it declares no colour property for a host to bind.
236
+
237
+ The shell (`AuthUserAdminAppView`, or `UserAdminShell` around your own views) is the console's colour root: it paints
238
+ the console's surface and text, every button, field and select carries its own palette text and surface, and every link
239
+ its own palette text, so none falls back to the browser's control colours, which follow the page rather than the
240
+ console's surfaces. No inline style reaches a placeholder, so the shell carries `data-aqar-user-admin` on its root and
241
+ renders one `<style>` element whose rule draws every placeholder under that root in the muted text colour, opaque; the
242
+ rule reaches no field of the host. The colour contract holds under the shell only: a view rendered without it draws on
243
+ whatever the host paints. A header rendered through `renderHeader` sits on the shell's surface and keeps the host's own
244
+ colours; the annotation the shell hands it carries the palette's.
245
+
246
+ | Tone | Used for |
247
+ | --- | --- |
248
+ | emerald | an active user and the activate button, an enabled sync, a member's row, an exact match, an editable permission |
249
+ | amber | warnings and notes (the directory sync banner, a queued sync request, an unset provider, a stale or unavailable catalog, unresolved members), a fuzzy match, a domain entry, an unknown permission |
250
+ | blue | the active tab, the links to a group's members, a read-only permission |
251
+ | red | errors, the deactivate and remove buttons, an inactive user, a paused sync, a delete-only permission |
252
+ | indigo | the group key, the chosen "create from" mode, the selected group of the members tab |
253
+ | violet | a group owned upstream (its badge, marker and notes), a group entry |
254
+ | sky | an e-mail entry, the header annotation |
255
+ | neutral | text, surfaces, lines, a control's outline, the primary button, no permission |
256
+
257
+ Each text colour reaches 7:1 and each non-text mark (a control's outline, a tone's accent) 3:1 against every surface
258
+ the console draws (the neutral surfaces and every tone's tint), in both schemes (WCAG 2.2 AAA, SC 1.4.6 and 1.4.11);
259
+ the package's tests check every pair. The console draws nothing translucent (no `opacity` below 1, no SVG
260
+ `*-opacity`), so the colours on screen are those pairs themselves rather than mixes with whatever lies behind; a test
261
+ scans every admin source for it, and another renders the five tabs and the dialogs and checks that every button, field
262
+ and link carries palette colours of its own and every text inherits one. The pickers of `@aiquants/select-box` colour
263
+ themselves, their placeholder included.
264
+
265
+ **Browser support**: `light-dark()` needs Chrome / Edge 123, Firefox 120 or Safari 17.5. An older browser drops every
266
+ colour declaration of the package and draws its own defaults.
267
+
230
268
  ### Localization (`labels.locale` vs `labels.formatLocale`)
231
269
 
232
270
  Every string this package draws lives in `UserAdminLabels`, and a host picks the language by injecting a whole catalog