|
|
from __future__ import annotations |
|
|
from collections.abc import Iterable |
|
|
from gradio.themes.base import Base |
|
|
from gradio.themes.utils import colors, fonts, sizes |
|
|
|
|
|
custom_primary = colors.Color( |
|
|
c50="#FCE8E0", |
|
|
c100="#F9D0C1", |
|
|
c200="#F5B8A3", |
|
|
c300="#F0A184", |
|
|
c400="#EB8965", |
|
|
c500="#E65F2B", |
|
|
c600="#C94F24", |
|
|
c700="#A03F1D", |
|
|
c800="#782F16", |
|
|
c900="#4F1F0F", |
|
|
c950="#2A1208", |
|
|
) |
|
|
|
|
|
class Claude(Base): |
|
|
def __init__( |
|
|
self, |
|
|
*, |
|
|
primary_hue=custom_primary, |
|
|
secondary_hue=colors.amber, |
|
|
neutral_hue=colors.zinc, |
|
|
spacing_size=sizes.spacing_md, |
|
|
radius_size=sizes.radius_xxl, |
|
|
text_size=sizes.text_md, |
|
|
font=( |
|
|
fonts.GoogleFont("Inter"), |
|
|
"ui-sans-serif", |
|
|
"system-ui", |
|
|
"sans-serif", |
|
|
), |
|
|
font_mono=( |
|
|
fonts.GoogleFont("IBM Plex Mono"), |
|
|
"ui-monospace", |
|
|
"Consolas", |
|
|
"monospace", |
|
|
), |
|
|
): |
|
|
super().__init__( |
|
|
primary_hue=primary_hue, |
|
|
secondary_hue=secondary_hue, |
|
|
neutral_hue=neutral_hue, |
|
|
spacing_size=spacing_size, |
|
|
radius_size=radius_size, |
|
|
text_size=text_size, |
|
|
font=font, |
|
|
font_mono=font_mono, |
|
|
) |
|
|
|
|
|
self.name = "claude" |
|
|
|
|
|
super().set( |
|
|
|
|
|
body_background_fill="#F8F5F2", |
|
|
block_background_fill="#FFFFFF", |
|
|
block_border_width="0px", |
|
|
block_shadow="none", |
|
|
block_title_text_color="black", |
|
|
block_label_border_width="0px", |
|
|
|
|
|
|
|
|
input_background_fill="white", |
|
|
input_border_color="#D8D6D2", |
|
|
input_border_width="1px", |
|
|
input_shadow="none", |
|
|
input_shadow_focus="0 0 0 2px rgba(230,95,43,0.25)", |
|
|
|
|
|
|
|
|
button_border_width="0px", |
|
|
button_transform_hover="scale(1.02)", |
|
|
button_transition="all 0.15s ease-in-out", |
|
|
|
|
|
|
|
|
button_primary_background_fill="#E65F2B", |
|
|
button_primary_background_fill_hover="#D75423", |
|
|
button_primary_text_color="white", |
|
|
|
|
|
|
|
|
button_secondary_background_fill="#EFECEA", |
|
|
button_secondary_background_fill_hover="#E8E6E4", |
|
|
button_secondary_text_color="#2A2A2A", |
|
|
|
|
|
) |
|
|
|