Liking cljdoc? Tell your friends :D

app.components.x-toast.model


attr-disabledcljs


attr-dismissiblecljs


attr-headingcljs


attr-iconcljs


attr-messagecljs


attr-show-progresscljs


attr-timeout-mscljs


attr-typecljs


default-icon-for-typecljs

(default-icon-for-type t)

Return the default icon glyph for a type keyword.

Return the default icon glyph for a type keyword.
raw docstring

dismiss-detailcljs

(dismiss-detail {:keys [type heading message]} reason)

Build the event detail map for an x-toast-dismiss event.

Build the event detail map for an x-toast-dismiss event.
raw docstring

dismiss-eligible?cljs

(dismiss-eligible? {:keys [dismissible? disabled?]})

Return true when the toast can currently be dismissed (dismissible and not disabled).

Return true when the toast can currently be dismissed (dismissible and not disabled).
raw docstring

event-dismisscljs


event-schemacljs


normalizecljs

(normalize {:keys [type-raw heading message icon-present? icon-raw
                   dismissible-attr disabled-present? timeout-ms-raw
                   show-progress-attr]})

Normalise raw attribute inputs into a stable view-model map.

Input keys: :type-raw string | nil :heading string | nil :message string | nil :icon-present? boolean :icon-raw string | nil :dismissible-attr string | nil :disabled-present? boolean :timeout-ms-raw string | nil :show-progress-attr string | nil

Output keys: :type keyword — :info | :success | :warning | :error :heading string — trimmed, may be "" :message string — trimmed, may be "" :icon-mode keyword — :default | :custom | :hidden :icon string | nil (only meaningful when :custom) :dismissible? boolean :disabled? boolean :timeout-ms int | nil :show-progress? boolean

Normalise raw attribute inputs into a stable view-model map.

Input keys:
  :type-raw            string | nil
  :heading             string | nil
  :message             string | nil
  :icon-present?       boolean
  :icon-raw            string | nil
  :dismissible-attr    string | nil
  :disabled-present?   boolean
  :timeout-ms-raw      string | nil
  :show-progress-attr  string | nil

Output keys:
  :type           keyword  — :info | :success | :warning | :error
  :heading        string   — trimmed, may be ""
  :message        string   — trimmed, may be ""
  :icon-mode      keyword  — :default | :custom | :hidden
  :icon           string | nil  (only meaningful when :custom)
  :dismissible?   boolean
  :disabled?      boolean
  :timeout-ms     int | nil
  :show-progress? boolean
raw docstring

normalize-iconcljs

(normalize-icon s)

Normalise icon attribute: empty strings and "none" become nil.

Normalise icon attribute: empty strings and "none" become nil.
raw docstring

observed-attributescljs


parse-bool-default-falsecljs

(parse-bool-default-false s)

Parse an attribute that is false when absent, true when present (any value except "false").

Parse an attribute that is false when absent, true when present (any value except "false").
raw docstring

parse-bool-default-truecljs

(parse-bool-default-true s)

Parse an attribute that is true when absent or empty, false only when "false".

Parse an attribute that is true when absent or empty, false only when "false".
raw docstring

parse-timeout-mscljs

(parse-timeout-ms s)

Parse timeout-ms attribute to a positive integer, or nil if absent/invalid.

Parse timeout-ms attribute to a positive integer, or nil if absent/invalid.
raw docstring

parse-typecljs

(parse-type s)

Normalise a raw type attribute string to a keyword. Unknown / nil values fall back to :info.

Normalise a raw type attribute string to a keyword.
Unknown / nil values fall back to :info.
raw docstring

progress-eligible?cljs

(progress-eligible? {:keys [show-progress? timeout-ms]})

Return true when both show-progress is set and timeout-ms is a valid positive integer.

Return true when both show-progress is set and timeout-ms is a valid positive integer.
raw docstring

property-apicljs


role-for-typecljs

(role-for-type t)

Return the ARIA live-region role for a given toast type. warning/error use role=alert (assertive); info/success use role=status (polite).

Return the ARIA live-region role for a given toast type.
warning/error use role=alert (assertive); info/success use role=status (polite).
raw docstring

tag-namecljs


type->attrcljs

(type->attr t)

Convert an internal type keyword back to its attribute string.

Convert an internal type keyword back to its attribute string.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close