Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
e86440b
Call useListingState's onValueChange only on real state changes (#66,…
Nov 18, 2026
00d6584
Ignore row clicks that come from the row's portalled menu or dialog (…
Nov 18, 2026
5273494
Keep SignaturePad's drawing when the translator changes identity (#66…
Nov 18, 2026
8c13685
Let a NumberInput stepper be cleared and step one way from keys and b…
Nov 18, 2026
2ce3c12
Turn typed spaces into separators in a manual SlugInput (#66, 2.2)
Nov 18, 2026
a2116bb
Build Pagination links from the paginator's own URLs (#66, 5.2)
Nov 18, 2026
f446b09
Keep editor content across rebuilds and follow the locale in the plac…
Nov 18, 2026
243964d
Only cancel page drops that carry files while a dropzone is mounted (…
Nov 18, 2026
c9c4bfa
Skip disabled suggestions in TagsInput and never add one (#66, 2.3)
Nov 18, 2026
f698e86
Filter Autocomplete suggestions by a controlled value set from outsid…
Nov 18, 2026
a352a06
Call React 19 ref cleanups in useMergedRef (#66, 4.5)
Nov 18, 2026
a6fd17b
Drop results of aborted uploads even when the uploader ignores the si…
Nov 18, 2026
3eaa03a
Leave focus where the user moved it when InlineEdit saves on blur (#6…
Nov 18, 2026
d1c0b28
Merge Form's forwarded ref with useMergedRef (#66, 4.5)
Nov 18, 2026
c0f608e
Drop an abandoned custom range when ReportingPeriodPicker commits (#6…
Nov 18, 2026
9194803
Scope FilterPanel's count and Clear all to its own filters (#66, 5.5)
Nov 18, 2026
2b14969
Merge ValidationSummary's forwarded ref with useMergedRef (#66, 4.5)
Nov 18, 2026
a94b567
Label custom filter controls with a real label and pass labelId (#66,…
Nov 18, 2026
ac2173e
Stop DateCalendar keyboard paging at min and max in the zoomed views …
Nov 18, 2026
117ae86
Focus a timed date on the last day of the month in HijriDatePicker (#…
Nov 18, 2026
0422b3a
Keep the record column out of the Columns menu and always visible (#6…
Nov 18, 2026
27f2536
Keep Wizard busy until onComplete settles so Finish runs it once (#66…
Nov 18, 2026
7056cce
Search once when SearchBox's clear button is clicked (#66, 2.10)
Nov 18, 2026
9152c48
Make AppSidebar's nested onSelect items, third level and zero badges …
Nov 18, 2026
1db377b
Render TopNav items with only onSelect as buttons (#66, 5.9)
Nov 18, 2026
9b03fe0
Read host:port as a host in normalizeUrl (#66, 5.10)
Nov 18, 2026
fd1d094
Keep dir on a Sidebar with collapsible=none (#66, 5.11)
Nov 18, 2026
ea5dd9e
Return focus to RecordActionsMenu's More actions button after a confi…
Nov 18, 2026
bf88978
Read the stored theme with useSyncExternalStore so hydration matches …
Nov 18, 2026
551a218
Make themeScript agree with ThemeProvider on junk values and forcedTh…
Nov 18, 2026
50c2041
Attach the Thaana keyboard through a callback ref so it follows the e…
Nov 18, 2026
75dde1e
Seed a thaana select's search with the Thaana letter (#66, 3.2)
Nov 18, 2026
b250881
Transliterate multi-line pastes (#66, 3.3)
Nov 18, 2026
49b72bc
Let the Thaana shortcut ask the owner instead of flipping itself (#66…
Nov 18, 2026
f59243e
Register the common English strings in the format hooks (#66, 3.6)
Nov 18, 2026
a9f1830
Fix Dhivehi day periods and short weekday parsing (#66, 3.7)
Nov 18, 2026
3eaf4b3
Word the action confirm question through the locale (#66, 3.8)
Nov 18, 2026
216caca
Format DataTable dates and chart tooltip numbers with Onu's locale (#…
Nov 18, 2026
d301f7b
Retry a failed on-demand locale load (#66, 3.10)
Nov 18, 2026
a45b44c
Fill the page URL into ShareButtons links after hydration (#66, 7.3)
Nov 18, 2026
5e789a4
Open FullCalendar on the agenda on phones after hydration (#66, 7.4)
Nov 18, 2026
88f248c
Match page paths and CamelCase title words in MCP docs search (#66, 9.1)
Nov 18, 2026
1572a05
Move the editor toolbar's tab stop off a disabled control (#66, 6.2)
Nov 18, 2026
602b1f2
Keep focus in BulkActionBar when an action's form opens or is cancell…
Nov 18, 2026
fc5cade
Focus AdditionalFilesUpload's picker after a removal at maxFiles (#66…
Nov 18, 2026
6a52fe6
Keep focus on ExportMenu's button while exporting (#66, 6.5)
Nov 18, 2026
5e069c2
Write Excel dates in local time (#66, 8.1)
Nov 18, 2026
dd0b29c
Leave invalid timestamp dates empty in exports (#66, 8.2)
Nov 18, 2026
6b4c761
Mark the browser's today in calendars after hydration (#66, 7.5)
Nov 18, 2026
9b1be31
Group TimeSeriesChart rows by interval instead of dropping them (#66,…
Nov 18, 2026
8803edd
Load the new media when MediaPlayer's src changes (#66, 8.4)
Nov 18, 2026
310a7e0
Fall back to the bundled docs when the project docs fail to load (#66…
Nov 18, 2026
9e8faa8
Keep test files out of the npm tarball and check it in CI (#66, 9.3)
Nov 18, 2026
8d707ff
Export SignaturePad with dark ink and keep a saved signature on resiz…
Nov 18, 2026
62dafb2
Fill JPEG crops white and name avatar files by output type (#66, 8.6)
Nov 18, 2026
156f01d
Fix QrCode downloads: dark-mode transparent tone, embedded logo, fail…
Nov 18, 2026
77cc5d9
Emit "use client" only on modules that need it (#66, 7.6)
Nov 18, 2026
3e5ee6e
Check the stored theme, ShareButtons and a phone-width FullCalendar i…
Nov 18, 2026
d406661
Report a QrCodeScanner code once in continuous mode and retry a faile…
Nov 18, 2026
a2a3aff
Keep keyboard shapes, let LiveMap props win and remove markers, geoco…
Nov 18, 2026
9534fe1
Keep MapChart's selected read-out in step with the data (#66, 8.10)
Nov 18, 2026
ffbe89d
Follow a changed ImageCropper aspect prop (#66, 8.11)
Nov 18, 2026
07ee776
Catch rejected callbacks in Wizard, LoadMore and the comment composer…
Nov 18, 2026
6e2d907
Mark useFocusAfterRender as a client module
Nov 18, 2026
a57916d
Merge pull request #69 from Javaabu/fix/66-part4-stable-effects
n4ff4h Nov 18, 2026
c00b852
Merge branch 'dev' of https://github.com/Javaabu/onu into fix/66-part…
Nov 18, 2026
1bb3df1
Merge pull request #72 from Javaabu/fix/66-part3-thaana-locale
n4ff4h Nov 18, 2026
382c1ec
Merge branch 'dev' of https://github.com/Javaabu/onu into fix/66-part…
Nov 18, 2026
93af61f
Merge pull request #71 from Javaabu/fix/66-part5-listing-nav
n4ff4h Nov 18, 2026
baeae7d
Merge pull request #75 from Javaabu/fix/66-part7-ssr
n4ff4h Nov 18, 2026
edb3668
Merge branch 'dev' of https://github.com/Javaabu/onu into fix/66-part…
Nov 18, 2026
a1667e4
Merge pull request #70 from Javaabu/fix/66-part2-inputs
n4ff4h Nov 18, 2026
5e9807c
Merge pull request #73 from Javaabu/fix/66-part6-focus
n4ff4h Nov 18, 2026
77701cd
Merge branch 'dev' of https://github.com/Javaabu/onu into fix/66-part…
Nov 18, 2026
5acf4ac
Merge pull request #76 from Javaabu/fix/66-part8-media-export
n4ff4h Nov 18, 2026
ee2fd38
Merge pull request #74 from Javaabu/fix/66-part9-mcp-packaging
n4ff4h Nov 18, 2026
c7dc663
Read a numberLocale's own digits in NumberInput (#66, 2.1)
Nov 18, 2026
bac2b04
Build apps without MapChart's optional peers (#66, 8.12)
Nov 18, 2026
7243381
Add real-browser checks for behaviour jsdom can't show (#66)
Nov 18, 2026
51847f4
Keep focus in Form and the comment composer while they process (#66, …
Nov 18, 2026
892d43e
Portal the slash menu into its dialog (#66, 6.7)
Nov 18, 2026
0fe4713
Reset TimeSeriesChart's zoom when the data covers other dates (#66, 8…
Nov 18, 2026
2dc8d6f
Create the e2e harness pages once, outside render
Nov 18, 2026
a8ab629
Merge pull request #77 from Javaabu/fix/66-browser-checks
n4ff4h Nov 18, 2026
b0f83a3
Release v0.4.0
Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
run: node scripts/check-docs.mjs
- name: Boost guidelines, skills and llms.txt
run: node scripts/boost.mjs --check
- name: No test files in the npm tarballs
run: node scripts/check-pack.mjs
- name: Licences
run: node scripts/check-licenses.mjs
- name: Audit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm build:web
- run: pnpm e2e:chromium e2e/a11y.spec.ts e2e/thaana.spec.ts
- run: pnpm e2e:chromium e2e/a11y.spec.ts e2e/thaana.spec.ts e2e/browser.spec.ts
- uses: actions/upload-artifact@v4
if: failure()
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ssr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ on:
paths:
- packages/onu/**
- e2e/nextjs/**
- e2e/optional-peers/**
- scripts/check-optional-peers.mjs
- pnpm-lock.yaml
- pnpm-workspace.yaml
- .github/workflows/ssr.yml
pull_request:
paths:
- packages/onu/**
- e2e/nextjs/**
- e2e/optional-peers/**
- scripts/check-optional-peers.mjs
- pnpm-lock.yaml
- pnpm-workspace.yaml
- .github/workflows/ssr.yml
Expand Down Expand Up @@ -50,3 +54,5 @@ jobs:
run: pnpm --filter onu-nextjs-fixture build
- name: Check the server HTML and hydration
run: pnpm --filter onu-nextjs-fixture test:ssr
- name: Build an app without the optional peers (webpack and Turbopack)
run: node scripts/check-optional-peers.mjs
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pnpm --filter @javaabu/onu-mcp test # MCP server tests
pnpm build && pnpm --filter @javaabu/onu size # build + bundle budgets
pnpm build:web # docs site
node scripts/check-docs.mjs # every component has a docs page with Props + Accessibility
node scripts/check-pack.mjs # no test files in the npm tarballs
node scripts/check-optional-peers.mjs # an app without the optional peers still builds (after pnpm build)
pnpm e2e:chromium # Playwright (a11y with axe, visual)
```

Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ A component is done only when it meets REQUIREMENTS §21: light/dark, LTR/RTL, `
- Use `<Icon name="…">` (from `src/icons/icon`) with semantic names, so `OnuProvider icons` overrides apply. Never render a Lucide component directly. When a component always shows the same glyph (a spinner, a close button, a chevron), also pass that Lucide icon as `fallback`, e.g. `<Icon name="loading" fallback={Loader2Icon} />`: overrides still win, and the component keeps its glyph outside `OnuProvider`.
- Never import `src/icons/lucide-map` in a component. `OnuProvider` loads the default set on demand, so neither a single component nor the provider ships ~250 icons. ESLint and `src/icons/icon-imports.test.ts` enforce this, and `pnpm --filter @javaabu/onu size` checks the bundle budgets.
- Built-in strings: a module that uses `t("form.…")` registers the English namespaces it uses at the top level, e.g. `registerEnglish({ form: en_form })` with `import { form as en_form } from "../../locales/en/form"`. Never import the whole locale (`src/locales`, `locales/en/messages`) in a component, so a bundle carries only the English text of the components it uses. `src/i18n/english-registry.test.ts` checks this.
- Start a module with `"use client"` when it uses state, effects or context (its own hooks or Onu's, such as `useTranslation`). The build keeps the directive only on those modules, so pure helpers (`cn`, `themeScript`, `/thaana` conversion, `/export`) stay callable from React Server Components. `src/use-client.test.ts` checks this.
- Every `package.json` export has a `size-limit` budget (`pnpm --filter @javaabu/onu size`, run in CI). When a change grows an entry on purpose, raise its budget in the same PR and say why; keep budgets a little above the measured size.
- Prefer shadcn/ui or an approved library (REQUIREMENTS §4) before building from scratch. Record new dependencies in `DEPENDENCIES.md`.
- Add a changeset: `pnpm changeset`.
Expand All @@ -57,10 +58,12 @@ The files in `packages/onu/src/ui` started as shadcn/ui's components (Radix base

E2E (Playwright) runs in two tiers:

- **Smoke, on pull requests.** The **E2E smoke** workflow runs `e2e/a11y.spec.ts` and `e2e/thaana.spec.ts` in Chromium, with no screenshots, when a pull request touches `packages/onu/**`, `web/**` or `e2e/**`.
- **Smoke, on pull requests.** The **E2E smoke** workflow runs `e2e/a11y.spec.ts`, `e2e/thaana.spec.ts` and `e2e/browser.spec.ts` in Chromium, with no screenshots, when a pull request touches `packages/onu/**`, `web/**` or `e2e/**`.
- **Full, on demand.** The **E2E** workflow (accessibility in five browsers, and Chromium screenshots) is slow, so CI runs it only when the last commit pushed to `main` starts with `e2e` (for example `e2e: new date picker`), or when you run it by hand from the Actions tab.

Run either locally with `pnpm e2e:chromium`, adding the two spec files for the smoke tier.
Run either locally with `pnpm e2e:chromium`, adding the three spec files for the smoke tier.

`e2e/browser.spec.ts` covers behaviour jsdom can't show (focus after re-renders, inert modal backgrounds, `IntersectionObserver`, downloads, chart layout). Each scenario is a small page in `web/src/e2e/<name>.harness.tsx`, served at `#/e2e/<name>` and left out of the navigation and the a11y and visual runs.

Server rendering has its own check. The **Server rendering** workflow builds the Next.js app in `e2e/nextjs` against the workspace copy of Onu, then checks its server HTML and hydration in English and Dhivehi, when a pull request touches `packages/onu/**` or `e2e/nextjs/**`. Run it locally with `pnpm build && pnpm --filter onu-nextjs-fixture build && pnpm --filter onu-nextjs-fixture test:ssr`.

Expand Down
2 changes: 1 addition & 1 deletion docs/charts/category-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Reduced motion still wins inside `<ChartAnimationProvider animate>`. `useChartAn

## Primitives

The shadcn primitives are exported from the same entry for custom charts: `ChartContainer`, `ChartTooltip`, `ChartTooltipContent` (with an Onu `valueFormatter` prop), `ChartLegend`, `ChartLegendContent`, `ChartStyle` and the `ChartConfig` type. They are not exported from the package root, so `recharts` stays optional.
The shadcn primitives are exported from the same entry for custom charts: `ChartContainer`, `ChartTooltip`, `ChartTooltipContent` (with an Onu `valueFormatter` prop; without it, numbers use Onu's number locale), `ChartLegend`, `ChartLegendContent`, `ChartStyle` and the `ChartConfig` type. They are not exported from the package root, so `recharts` stays optional.

## RTL

Expand Down
2 changes: 1 addition & 1 deletion docs/charts/map-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 9
A choropleth map: regions shaded by value on Google Maps, drawn with a deck.gl `GeoJsonLayer` (`GoogleMapsOverlay`). It has a stepped legend, a tap/hover read-out and a data table. Without a Google Maps API key it shows an accessible notice and the table instead.

:::info
Needs the optional peers `@vis.gl/react-google-maps`, `@deck.gl/core`, `@deck.gl/layers` and `@deck.gl/google-maps`. The map code is loaded lazily, only when an API key is configured.
Needs the optional peers `@vis.gl/react-google-maps`, `@deck.gl/core`, `@deck.gl/layers` and `@deck.gl/google-maps`. The map code is loaded lazily, only when an API key is configured. If those peers are not installed, the app still builds (with webpack or Turbopack) and the chart shows a note and the data table instead of the map.
:::

```tsx
Expand Down
7 changes: 5 additions & 2 deletions docs/charts/time-series-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Rows may come in any order; they are sorted oldest first. Dates can be `Date` ob

`null` values break the line. With `interval` (`"hour" | "day" | "week" | "month"`), missing steps are inserted too (3 September above), so a missing day is a visible gap rather than a straight line across it. `connectNulls` bridges gaps instead.

`interval` also groups the data: each point sits at the start of its hour, day, week (counted from the first date) or month, and rows that fall in the same step are added up, so no row is dropped. Set `aggregate="mean"` to average them instead (for rates or temperatures). A range longer than 10,000 steps is drawn without the gap rows rather than cut short.

## Stacked areas and bars

`stacked` adds the series up, so the top edge is the total: use `variant="area"` for stacked areas or `variant="bar"` for stacked bars (a stacked `"line"` chart is drawn as stacked areas). Bars are centred on their date, and the axis is padded by half a step so the first and last bars are whole. The data table and summary still list each series on its own, and the time axis is mirrored in RTL as usual.
Expand Down Expand Up @@ -93,7 +95,8 @@ Also takes the common chart props (`title` (required), `description`, `hideTitle
| ------------------- | -------------------------------------- | ----------- | --------------------------------------- |
| `data` | `Record<string, unknown>[]` | required | One object per point in time |
| `dateKey` | `string` | `"date"` | Key of the date |
| `interval` | `"hour" \| "day" \| "week" \| "month"` | | Fill missing steps with gaps |
| `interval` | `"hour" \| "day" \| "week" \| "month"` | | Group by step and fill missing steps with gaps |
| `aggregate` | `"sum" \| "mean"` | `"sum"` | With `interval`, how rows in one step combine |
| `dateFormat` | `string` (date-fns) | by interval | Tick format (`d MMM`, `MMM yyyy`, time) |
| `tooltipDateFormat` | `string` (date-fns) | by interval | Tooltip and table format |
| `variant` | `"line" \| "area" \| "bar"` | `"line"` | How series are drawn |
Expand All @@ -104,7 +107,7 @@ Also takes the common chart props (`title` (required), `description`, `hideTitle
| `gradient` | `boolean` | `true` | Gradient area and bar fills |
| `comparison` | `ChartComparison` | | This period against the previous one; see [Comparison](#comparison) |

Hourly data uses the locale's `hourCycle`. `normalizeTimeSeries(data, dateKey, interval)` and `toTimestamp(value)` are exported.
Hourly data uses the locale's `hourCycle`. `normalizeTimeSeries(data, dateKey, interval, aggregate)` and `toTimestamp(value)` are exported.

## RTL

Expand Down
4 changes: 3 additions & 1 deletion docs/date-and-time/date-calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ import { DateCalendar } from "@javaabu/onu"

`DEFAULT_WEEKEND_DAYS` (`[5, 6]`, Friday and Saturday) is exported.

Without `today`, "today" is the browser's date. When server-rendered, no day is marked as today until hydration (a server in another time zone can be on a different day); pass `today` to have it in the server's HTML.

## Accessibility

See the [DatePicker keyboard table](./date-picker#accessibility). The caption is a button ("March 2026: choose a month"); page changes are announced through a polite live region; the current month/year/range has `aria-current="date"`.
See the [DatePicker keyboard table](./date-picker#accessibility); in every view, Page Up/Down and arrows past the edge stop at `min` and `max` like the Previous and Next buttons. The caption is a button ("March 2026: choose a month"); page changes are announced through a polite live region; the current month/year/range has `aria-current="date"`.

- With `events`, each day's accessible name includes its event count, so the dots (hidden from screen readers) aren't the only signal.
- With `readOnly`, the clicked day's event list is a polite live region, so it is read out when it changes. <kbd>Enter</kbd> or <kbd>Space</kbd> on a day lists its events.
Expand Down
2 changes: 1 addition & 1 deletion docs/date-and-time/full-calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const events: CalendarEvent[] = [
```

- `color` takes a theme colour (`primary`, `success`, `warning`, `destructive`, `info`, `secondary`, `chart-1`…`chart-8`), so events follow dark mode and `--onu-primary`. Any other FullCalendar event field (`backgroundColor`, `extendedProps`, `url`, …) passes through.
- The toolbar (‹ Today › · title · view switch) wraps on narrow containers; on phones the calendar opens on the agenda. No view scrolls the page sideways at 375px, in LTR or RTL: the agenda's screen-reader header is hidden in place (FullCalendar's `left: -10000px` would otherwise add 10,000px of overflow in RTL) and month events clip inside their day cell.
- The toolbar (‹ Today › · title · view switch) wraps on narrow containers; on phones the calendar opens on the agenda (also when server-rendered: it switches once hydrated), until a view is picked. No view scrolls the page sideways at 375px, in LTR or RTL: the agenda's screen-reader header is hidden in place (FullCalendar's `left: -10000px` would otherwise add 10,000px of overflow in RTL) and month events clip inside their day cell.
- Weekend days (Friday and Saturday by default) are shaded; today is marked.
- `apiRef` gives FullCalendar's `CalendarApi`; `options` passes any other FullCalendar option (Onu's props win); `hideToolbar` lets you build your own.

Expand Down
2 changes: 2 additions & 0 deletions docs/date-and-time/hijri-date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Plus the shared picker field props.

`selected`, `onSelect`, `min`, `max`, `weekStartsOn`, `weekendDays`, `showGregorian` (default `true`), `today`, `initialFocus`, `className`, `ref`.

As with `DateCalendar`, without `today` the browser's date is marked once hydrated, not the server's.

## Accessibility

The days view is an in-house APG grid (react-day-picker has no Hijri support). Day buttons are named with both calendars ("Today, 23 Ramadan 1447 AH, Thursday, March 12th, 2026"); today has `aria-current="date"`; days outside `min`/`max` are `aria-disabled`.
Expand Down
2 changes: 2 additions & 0 deletions docs/display-and-feedback/comment-thread.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import { CommentThread } from "@javaabu/onu"

As in the thread, only the author may delete a note; pass `canDelete={() => true}` to let anyone delete.

If `onAdd` or `onEdit` returns a promise that rejects, the composer keeps the text and shows "Couldn’t save. Try again." as an alert.

## Props

| Prop | Type | Default | Description |
Expand Down
2 changes: 2 additions & 0 deletions docs/display-and-feedback/share-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { ShareButtons } from "@javaabu/onu"

`shareUrl(network, url, title?, text?)` builds the share links.

When server-rendered without `url`, the links start without a URL (the server doesn't know the page's address) and get the current page's URL straight after hydration. Pass `url` to have it in the server's HTML too.

:::info Brand icons
Onu's icon sets (Lucide, FontAwesome Free solid) don't include brand logos, so networks use generic icons with their names as text. Pass `icons` (e.g. from Simple Icons via the Iconify adapter) for logos.
:::
Expand Down
2 changes: 1 addition & 1 deletion docs/files-and-media/additional-files-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Set `name` to also render native fields: `name[removed][]` (hidden ids), `name[a

- Each file's buttons are named with the file ("Remove Lease agreement.pdf", "Restore …").
- Marking a file for removal shows "Will be removed" as text (not only a strike-through), announces it, and moves focus to the Restore button.
- Removing a new file returns focus to the "Add files" picker.
- Removing a new file returns focus to the "Add files" picker, also when the picker was disabled at `maxFiles`.

| Key | Action |
| -------------------------------------------- | ------------------------------------------------------ |
Expand Down
2 changes: 1 addition & 1 deletion docs/files-and-media/avatar-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { AvatarUpload } from "@javaabu/onu/media"
</FormField>
```

The cropped image is a square JPEG, 512px by default (`cropOptions`), returned as a `File` through `onValueChange` and kept on the hidden file input for plain form submits. If cropping fails (for example a cross-origin image), the original file is used.
The cropped image is a square JPEG, 512px by default (`cropOptions`), with transparent areas filled white; pass `cropOptions={{ type: "image/png" }}` to keep transparency. The file is named after the picked one with the output type's extension (`me.png` → `me.jpg`). It is returned as a `File` through `onValueChange` and kept on the hidden file input for plain form submits. If cropping fails (for example a cross-origin image), the original file is used.

## Props

Expand Down
2 changes: 1 addition & 1 deletion docs/files-and-media/image-cropper.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The canvas helpers are exported for use without the component: `cropImage(src, p
| --------------------- | -------------------------------------- | ---------- | -------------------------------------------------------------------- |
| `src` | `string \| Blob` | | Image URL or picked file |
| `alt` | `string` | (required) | Names the crop area |
| `aspect` | `number` | `1` | Initial aspect ratio |
| `aspect` | `number` | `1` | Aspect ratio; a new value replaces the one in use |
| `aspectOptions` | `{ label, value }[]` | | Aspect presets (`undefined` = free, image ratio) |
| `onAspectChange` | `(aspect) => void` | | A preset was chosen |
| `cropShape` | `"rect" \| "round"` | `"rect"` | Crop shape |
Expand Down
6 changes: 3 additions & 3 deletions docs/files-and-media/qr-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ The code never mirrors and is rendered with tokens through the `tone` variant (`
| `theme` | Follows the theme: light modules on a dark ground in dark mode. Most phone cameras scan this, some older readers do not |
| `transparent` | No background; modules use the current text colour. Keep enough contrast with what is behind |

Recolour with `classNames.svg`, e.g. `classNames={{ svg: "text-primary" }}`. Downloads use the colours as rendered (read with `getComputedStyle`).
Recolour with `classNames.svg`, e.g. `classNames={{ svg: "text-primary" }}`. Downloads use the colours as rendered (read with `getComputedStyle`). Without a background of its own (`tone="transparent"`) the file gets a white one, and light modules (such as the text colour in dark mode) are saved black so the file still scans.

## Logo

`logo` takes a URL or `{ src, size?, excavate? }`. `size` is the logo width as a fraction of the code (0.1–0.3, default 0.22). The modules behind it are cleared unless `excavate={false}`. A logo always uses error-correction level H, so the code still scans with the centre covered. For the PNG download the image must allow CORS; otherwise the PNG has the cleared area without the logo.
`logo` takes a URL or `{ src, size?, excavate? }`. `size` is the logo width as a fraction of the code (0.1–0.3, default 0.22). The modules behind it are cleared unless `excavate={false}`. A logo always uses error-correction level H, so the code still scans with the centre covered. For downloads the image must allow CORS: the SVG download embeds it as a data URL so the saved file stands alone, and the PNG draws it. When it cannot be fetched, the file has the cleared area without the logo.

## Props

Expand Down Expand Up @@ -74,7 +74,7 @@ Also exported for custom rendering: `encodeQrCode(value, level)`, `qrCodePath(mo

- The code is an `img` named by `label` (default "QR code"); give it a label that says what it is for, e.g. "QR code to verify licence BL-2026-04417".
- Put the information in text as well (`showValue`, `caption` or nearby text) for people who cannot scan.
- Download and copy buttons have visible, translated labels and are 44px tall on touch screens. Copying is announced in a polite live region.
- Download and copy buttons have visible, translated labels and are 44px tall on touch screens. Copying is announced in a polite live region. A failed download shows "Could not download the QR code" as an alert under the buttons.
- Text that is too long is reported with `role="alert"`.

| Key | Action |
Expand Down
Loading
Loading