PureAdmin.Components.KpiEditorial (PureAdmin v1.2.0)

Copy Markdown View Source

KPI Editorial minimal showcase — magazine-restraint grid with hairline rules.

Tracks _kpi-editorial-minimal.scss from @keenmate/pure-admin-core 2.7.1+. Default layout is a cell-min-driven auto-fit grid; is_2_columns forces 2 columns; grid_layout="max_N" caps at N columns. Override the cell minimum per instance via cell_min_width.

No charts, no pills — the design's identity is the thin numeral.

Summary

Functions

kpi_editorial(assigns)

Attributes

  • title_text (:string) - Defaults to nil.
  • is_live (:boolean) - Defaults to false.
  • live_text (:string) - Defaults to "LIVE".
  • footer_text (:string) - Defaults to nil.
  • grid_layout (:string) - Defaults to nil.Must be one of nil, "2col", "max_2", "max_3", "max_4", "max_5", or "max_6".
  • is_2_columns (:boolean) - Force 2-col grid (pa-kpi-edit__grid--2col) — shorthand for grid_layout="2col". Defaults to false.
  • cell_min_width (:string) - CSS length for --pa-kpi-edit-cell-min (default upstream 14rem). Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)
  • footer

kpi_editorial_tile(assigns)

Renders one cell inside a kpi_editorial/1 grid.

The target_text attr is wrapped in <em>tgt</em> automatically in the meta row (matching upstream) — pass just the value (e.g. "90.0%"). Use the :meta slot to render the meta row from scratch.

Attributes

  • id (:string) - Defaults to nil.
  • label_text (:string) - Defaults to nil.
  • value_text (:string) - Defaults to nil.
  • unit_text (:string) - Defaults to nil.
  • prefix_text (:string) - Defaults to nil.
  • delta_text (:string) - Defaults to nil.
  • delta_variant (:string) - Defaults to nil.Must be one of nil, "positive", "negative", "neutral", "up_strong", or "down_strong".
  • target_text (:string) - Target value; auto-rendered as tgt <value> in the meta row. Defaults to nil.
  • detail_title_text (:string) - Defaults to nil.
  • previous_value_text (:string) - Defaults to nil.
  • delta_absolute_text (:string) - Defaults to nil.
  • delta_absolute_sentiment (:atom) - Defaults to nil.Must be one of nil, :pos, :neg, or :warn.
  • detail_rows (:list) - Defaults to nil.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • label - Override label cell — supports multi-line markup with <br>.
  • value
  • meta
  • detail