(change-detail from to)Build event detail map for an x-stepper-change event.
Build event detail map for an x-stepper-change event.
(clamp-current current-idx steps-count)Clamp current to [0, steps-count-1], or 0 when there are no steps.
Clamp current to [0, steps-count-1], or 0 when there are no steps.
(normalize {:keys [steps-raw current-raw orientation-raw size-raw disabled?]})Normalize raw attribute inputs into a stable view-model map.
Input keys: :steps-raw string | nil :current-raw string | nil :orientation-raw string | nil :size-raw string | nil :disabled? boolean
Output keys: :steps [{:label string :description string|nil} ...] :current int (clamped) :orientation :horizontal | :vertical :size :sm | :md | :lg :disabled? boolean
Normalize raw attribute inputs into a stable view-model map.
Input keys:
:steps-raw string | nil
:current-raw string | nil
:orientation-raw string | nil
:size-raw string | nil
:disabled? boolean
Output keys:
:steps [{:label string :description string|nil} ...]
:current int (clamped)
:orientation :horizontal | :vertical
:size :sm | :md | :lg
:disabled? boolean(orientation->attr o)(parse-current s)Parse current-step attribute to a non-negative integer, defaulting to 0.
Parse current-step attribute to a non-negative integer, defaulting to 0.
(parse-orientation s)(parse-size s)(parse-steps s)Parse the steps attribute value into a vector of {:label string :description string|nil}.
Accepted formats:
Parse the steps attribute value into a vector of {:label string :description string|nil}.
Accepted formats:
- Positive integer string "3" → [{:label "Step 1"} {:label "Step 2"} {:label "Step 3"}]
- JSON array string "[{\"label\":\"One\"}]"
Unrecognised / nil → [].(size->attr s)(state->attr state)(step-state i current-idx)Return :complete, :current, or :upcoming for the step at index i.
Return :complete, :current, or :upcoming for the step at index i.
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 |