# `Macaw.Builtin.Sort`
[🔗](https://github.com/dcoai/macaw/blob/v0.6.0/lib/macaw/builtin/sort.ex#L1)

The built-in sort (spec/05 §6.7), `"macaw.sort"`: a choice of the field a table sorts by
and its order, of kind `:control`, `:pure` (#452).

  * **parameters:** `label` (text, `"Sort"`), the choices' legend; `field` (text,
    `"Sort by"`) and `order` (text, `"Order"`), the labels of the field's and the
    order's selects;
  * **declarations:** the event `"sort"`, its value `%{"sort" => field, "order" =>
    order}` as the table's own sort event carries it; its placement's actions set the
    table cell's per-cell state, declared on the surface with its legal values:
    `%{on: "sort", set: "birds.sort", value: {:event, [:value, "sort"]}}` and the same
    of `"order"`. Either may be left out, and the control offers the one it sets;
  * **choices** (`Macaw.Control`): the field's options are its state's legal values, the
    order's its own (`"asc"` and `"desc"`, written `Ascending` and `Descending`);
  * **markup:** a `<fieldset>` of two labeled native `<select>`s under its legend, or
    one labeled select, as the filter's (`Macaw.Builtin.Filter`);
  * **stylesheet:** `stylesheet/0`, the controls' own, served at `stylesheet_path/0`.

# `stylesheet`

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

The sort's one static stylesheet, the controls' own (the shared controls sheet).

# `stylesheet_path`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
