{#- Shared, reusable Control Plane components. brand_mark(size) RAGCore's local, inline product mark badge(label, tone) tone: ok | warn | error | neutral | info identifier(value, id) human-secondary UUID/hash with a copy action pagination(total, limit, offset, base_url, query) empty_state(title, body, action_url=None, action_label=None) toolbar(...) search + filter form wrapper (caller renders fields) operations_journey(...) source -> document -> processing navigation kv(label, value) definition row for overview panels -#} {% macro brand_mark(size="md") -%} {%- endmacro %} {% macro badge(label, tone="neutral") -%} {%- set tones = { "ok": "bg-tertiary-container/10 border-tertiary-container/20 text-tertiary", "warn": "bg-primary-container/10 border-primary-container/30 text-primary", "error": "bg-error-container/10 border-error-container/20 text-error", "info": "bg-secondary-container/10 border-secondary-container/20 text-secondary", "neutral": "bg-surface-variant border-outline text-on-surface-variant", } -%} {%- set icons = {"ok": "check_circle", "warn": "warning", "error": "error", "info": "info", "neutral": "pending"} -%} {{ label }} {%- endmacro %} {% macro _journey_step(url, label, icon, key, current) -%}
  • {% if url %} {% else %} {% endif %} {{ label }} {% if url %}{% else %}{% endif %}
  • {%- endmacro %} {% macro operations_journey(source_url="/admin/sources", source_label="Sources", document_url="/admin/documents", document_label="Documents", job_url="/admin/jobs", job_label="Processing", current=None) -%} {%- endmacro %} {% macro identifier(value, id=None, short=8) -%} {%- set field_id = id or ("id-" ~ (value | string | replace("-", ""))[:12]) -%} {{ (value | string)[:short] }}… {%- endmacro %} {% macro pagination(total, limit, offset, base_url, query="") -%} {%- set shown_from = offset + 1 if total else 0 -%} {%- set shown_to = [offset + limit, total] | min -%} {%- endmacro %} {% macro empty_state(title, body, action_url=None, action_label=None, icon="inbox") -%}

    {{ title }}

    {{ body }}

    {% if action_url %} {{ action_label }} {% endif %}
    {%- endmacro %} {% macro toolbar(action, label="Filter") -%} {%- endmacro %} {% macro kv(label, value, mono=False) -%}
    {{ label }}
    {{ value if value is not none and value != "" else "—" }}
    {%- endmacro %} {% macro field(id, label, hint=None) -%}
    {{ caller() }} {% if hint %}

    {{ hint }}

    {% endif %}
    {%- endmacro %}