Macaw.Builtin.Record (macaw v0.6.0)

Copy Markdown View Source

The built-in record (spec/05 §6.5), "macaw.record": one row as a definition list, of kind :content, :pure.

  • parameters: label (text, ""), its heading, none when empty; identity (text, "", bindable), the row whose identity field has this value; pick ("first" or "last", "first"), the row in time order when identity is empty;
  • declarations: one slot, rows, with roles fields (the fields shown, in order, any type, many, optional; every column when unbound) and t (the window field, optional, which pick reads by); reading load :scan;
  • order and budget: picking asks for one row, first or last by t; an identity asks for every row up to the ceiling, in no order;
  • markup: the label as a heading, then a <dl>, each term the field's label and unit (Macaw.Builtin.Text.heading/3), each value as the table writes it, nil empty. No matching row draws no_data. last with no time field, or an identity with no single identity field, draws invalid. Handed a selection in its context (spec/03 §1.7.7), the record is mw-selected with aria-current when its row holds it, else mw-muted;
  • stylesheet: stylesheet/0, served at stylesheet_path/0, its content address.

Summary

Functions

The record's one static stylesheet, every color a theme custom property with the default theme's value as its fallback. It loads and imports nothing.

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).

Functions

stylesheet()

@spec stylesheet() :: String.t()

The record's one static stylesheet, every color a theme custom property with the default theme's value as its fallback. It loads and imports nothing.

stylesheet_path()

@spec stylesheet_path() :: String.t()

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).