(aria-multiselectable selectable)Return "true" for multi-select, nil otherwise (attribute should be removed).
Return "true" for multi-select, nil otherwise (attribute should be removed).
(normalize {:keys [columns-raw caption-raw selectable-raw striped? bordered?
full-width? compact? row-count-raw]})Produce a canonical view-model map from raw attribute inputs.
Input keys: :columns-raw string | nil :caption-raw string | nil :selectable-raw string | nil :striped? boolean :bordered? boolean :full-width? boolean :compact? boolean :row-count-raw string | nil
Output keys mirror the attribute semantics with parsed/normalised values.
Produce a canonical view-model map from raw attribute inputs. Input keys: :columns-raw string | nil :caption-raw string | nil :selectable-raw string | nil :striped? boolean :bordered? boolean :full-width? boolean :compact? boolean :row-count-raw string | nil Output keys mirror the attribute semantics with parsed/normalised values.
(parse-columns s)Parse columns attribute to a CSS grid-template-columns string.
A positive integer string (e.g. "4") becomes "repeat(4,minmax(0,1fr))"
— equal-width tracks that can shrink below their content's intrinsic
minimum. Plain 1fr keeps a min-content floor, so a wide/unbreakable
cell makes its column bulge past its share and the columns come out
uneven; minmax(0,1fr) is what authors actually mean by "N equal
columns". For per-column sizing, pass an explicit template string instead.
Any other non-empty string is returned as-is.
Nil or blank → nil (no explicit template).
Parse `columns` attribute to a CSS grid-template-columns string. A positive integer string (e.g. "4") becomes "repeat(4,minmax(0,1fr))" — equal-width tracks that can shrink below their content's intrinsic minimum. Plain `1fr` keeps a `min-content` floor, so a wide/unbreakable cell makes its column bulge past its share and the columns come out uneven; `minmax(0,1fr)` is what authors actually mean by "N equal columns". For per-column sizing, pass an explicit template string instead. Any other non-empty string is returned as-is. Nil or blank → nil (no explicit template).
(parse-row-count s)Parse row-count to a positive integer, or nil if absent/invalid.
Parse row-count to a positive integer, or nil if absent/invalid.
(parse-selectable s)Normalise selectable attribute. Unknown/nil → "none".
Normalise selectable attribute. Unknown/nil → "none".
(role-for-selectable selectable)Return ARIA role string. "none" → "table"; any selection mode → "grid".
Return ARIA role string. "none" → "table"; any selection mode → "grid".
(row-select-detail row-index selected? selectable)Build event detail for x-table-row-select.
Build event detail for x-table-row-select.
(sort-detail col-index direction previous-direction)Build event detail for x-table-sort.
Build event detail for x-table-sort.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |