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