Skip to main content

Crate ferrohealth_ui

Crate ferrohealth_ui 

Source
Expand description

FerroUI: the shared UI components of the FerroHEALTH consoles.

The library renders HTML on the server. Every component is a Rust struct over an Askama template compiled into the crate, and returns html::Html, markup a console’s own template writes with {{ part }} or hands to the next component as its child. view holds the components; table is the one paging and sorting model every listing shares, calendar the days a date field counts in, highlight the tokenizers of YAML, JSON, XML and AQL, icon the vendored Lucide outlines, tone and theme the status tones and the theme choice, i18n the locale and the catalogs of every word the components draw, style the stylesheet and the brand themes as text, script the plain script modules as text, and serve the router a console mounts to serve them.

Every page works with no script: what a module adds is behaviour on top of complete server-rendered HTML, with a link or a form behind every action. No component writes a style attribute, a <style> element or an inline script, so a console keeps style-src 'self' and script-src 'self'; no component touches browser storage beyond what the tree keeps of its open items for the session. No specification governs the components: our own design (FerroUI #510).

Modules§

calendar
The calendar the date field and its picker count in: a day, a month, a week that starts on the reader’s first day, and a typed value read year first.
highlight
The syntax highlighting of YAML, JSON, XML, AQL and HL7 v2, compiled into both halves, so the server and the browser draw the same text the same way.
html
Rendered markup: what every component returns and what a page is built from.
i18n
The locale a page renders in, and the catalogs of the strings the components draw themselves.
icon
The Lucide icons, drawn as inline SVG beside the word they illustrate.
query
The query of an address, as the table model reads and writes it: the pairs in the order sent, form-encoded (WHATWG URL, the application/x-www-form-urlencoded serializer).
script
The script modules, as text a console serves: one plain ES module per job under the crate’s scripts/, and the loader that imports them.
serve
The library’s assets served by a console.
style
The stylesheet and the brand themes, as text a console serves.
table
The one table and paging model every listing shares.
theme
The family’s personal preferences: the theme, the density, reduced motion, the language, the first day of the week and the shortcut hints.
tone
The status tones: the ground, the text and the dot of a pill, a badge, a status indicator, a banner or a toast.
view
The components: each a plain function over an Askama template that returns crate::html::Html.