Module: StimulusPlumbers::Themes::Tailwind::Indicator

Included in:
StimulusPlumbers::Themes::TailwindTheme
Defined in:
lib/stimulus_plumbers/themes/tailwind/indicator.rb

Constant Summary collapse

VARIANTS =
{
  primary:     "bg-(--sp-color-primary)",
  secondary:   "bg-(--sp-color-secondary)",
  tertiary:    "bg-(--sp-color-muted-fg)",
  success:     "bg-(--sp-color-success)",
  destructive: "bg-(--sp-color-destructive)",
  warning:     "bg-(--sp-color-warning)",
  info:        "bg-(--sp-color-info)"
}.freeze
DOT =
%w[inline-flex size-2.5 rounded-full].freeze
BADGE =
%w[
  inline-flex items-center justify-center
  min-w-5 h-5 px-1
  rounded-full text-(length:--sp-text-xs) font-medium text-white
].freeze
WRAPPER =

Establishes the positioning context the pulse ring overlays onto — no margin needed.

%w[relative inline-flex items-center justify-center].freeze
PULSE_RING =
%w[
  absolute inset-0 rounded-full
  bg-(--sp-color-indicator) opacity-75
  animate-ping motion-reduce:animate-none
].freeze