(default-icon-for-type t)Return the default icon glyph for a type keyword.
Return the default icon glyph for a type keyword.
(dismiss-detail {:keys [type text]} reason)Build the event detail map for an x-alert-dismiss event.
Build the event detail map for an x-alert-dismiss event.
(dismiss-eligible? {:keys [dismissible? disabled?]})Return true when the alert can currently be dismissed (dismissible and not disabled).
Return true when the alert can currently be dismissed (dismissible and not disabled).
(normalize {:keys [type-raw text icon-present? icon-raw dismissible-attr
disabled-present? timeout-ms-raw]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :type-raw string | nil :text string | nil :icon-present? boolean :icon-raw string | nil :dismissible-attr string | nil :disabled-present? boolean :timeout-ms-raw string | nil
Output keys: :type keyword — :info | :success | :warning | :error :text string :icon-mode keyword — :default | :custom | :hidden :icon string | nil (only meaningful when :custom) :dismissible? boolean :disabled? boolean :timeout-ms int | nil
Normalise raw attribute inputs into a stable view-model map. Input keys: :type-raw string | nil :text string | nil :icon-present? boolean :icon-raw string | nil :dismissible-attr string | nil :disabled-present? boolean :timeout-ms-raw string | nil Output keys: :type keyword — :info | :success | :warning | :error :text string :icon-mode keyword — :default | :custom | :hidden :icon string | nil (only meaningful when :custom) :dismissible? boolean :disabled? boolean :timeout-ms int | nil
(normalize-icon s)Normalise icon attribute: empty strings and "none" become nil.
Normalise icon attribute: empty strings and "none" become nil.
(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".
(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.
(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.
(role-for-type t)Return the ARIA live-region role for a given alert type. warning/error use role=alert (assertive); info/success use role=status (polite).
Return the ARIA live-region role for a given alert type. warning/error use role=alert (assertive); info/success use role=status (polite).
(type->attr t)Convert an internal type keyword back to its attribute string.
Convert an internal type keyword back to its attribute string.
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 |