{# Shadcn-style Card and Container Components for FastAPI Shadcn Admin #} {# Card component #} {% macro card(class="") %}
{{ caller() }}
{% endmacro %} {% macro card_header(class="") %}
{{ caller() }}
{% endmacro %} {% macro card_title(text, class="") %}

{{ text }}

{% endmacro %} {% macro card_description(text, class="") %}

{{ text }}

{% endmacro %} {% macro card_content(class="") %}
{{ caller() }}
{% endmacro %} {% macro card_footer(class="") %}
{{ caller() }}
{% endmacro %} {# Alert/Badge component #} {% set badge_variants = { "default": "bg-primary text-primary-foreground hover:bg-primary/80", "secondary": "bg-secondary text-secondary-foreground hover:bg-secondary/80", "destructive": "bg-destructive text-destructive-foreground hover:bg-destructive/80", "outline": "text-foreground border border-input" } %} {% macro badge(text, variant="default", class="") %} {{ text }} {% endmacro %} {# Alert component #} {% set alert_variants = { "default": "bg-background text-foreground", "destructive": "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive" } %} {% macro alert(title="", description="", variant="default", class="") %} {% endmacro %} {# Separator/Divider #} {% macro separator(orientation="horizontal", class="") %} {% if orientation == "horizontal" %}
{% else %}
{% endif %} {% endmacro %} {# Empty state #} {% macro empty_state(title, description="", icon="inbox", action_url="", action_text="") %}
{% if icon == "inbox" %} {% endif %}

{{ title }}

{% if description %}

{{ description }}

{% endif %} {% if action_url %} {{ action_text }} {% endif %}
{% endmacro %} {# Skeleton loader #} {% macro skeleton(class="h-4 w-full") %}
{% endmacro %}