L i4UddlmZddlmZddlmZmZmZmZddl m Z m Z ddl m Z ddlmZddlmZddlmZerdd lmZdd l mZdd lmZGd d eZeedzdzZded<eezdzZded<GddZ y)) annotations)Enum) TYPE_CHECKINGLiteral TypeAliascast) LayoutConfigvalidate_width)StreamlitAPIException)Heading)gather_metrics) clean_text)DeltaGenerator)Width) SupportsStrceZdZdZdZdZy)HeadingProtoTagh1h2h3N)__name__ __module__ __qualname__ TITLE_TAG HEADER_TAG SUBHEADER_TAG`/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/elements/heading.pyrr sIJMrrFNrAnchorDividerc eZdZed ddddd ddZed ddddd ddZed  dddd  dd Zedd Ze dd Z e d ddZ y) HeadingMixinheaderNFstretch)helpdividerwidthc t|dt|}|jjdtj t j|||||S)aF Display text in header formatting. Parameters ---------- body : str The text to display as GitHub-flavored Markdown. Syntax information can be found at: https://github.github.com/gfm. See the ``body`` parameter of |st.markdown|_ for additional, supported Markdown directives. .. |st.markdown| replace:: ``st.markdown`` .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown anchor : str or False The anchor name of the header that can be accessed with #anchor in the URL. If omitted, it generates an anchor using the body. If False, the anchor is not shown in the UI. help : str or None A tooltip that gets displayed next to the header. If this is ``None`` (default), no tooltip is displayed. The tooltip can optionally contain GitHub-flavored Markdown, including the Markdown directives described in the ``body`` parameter of ``st.markdown``. divider : bool, "blue", "green", "orange", "red", "violet", "yellow", "gray"/"grey", or "rainbow" Shows a colored divider below the header. If this is ``True``, successive headers will cycle through divider colors, except gray and rainbow. That is, the first header will have a blue line, the second header will have a green line, and so on. If this is a string, the color can be set to one of the following: blue, green, orange, red, violet, yellow, gray/grey, or rainbow. width : "stretch", "content", or int The width of the header element. This can be one of the following: - ``"stretch"`` (default): The width of the element matches the width of the parent container. - ``"content"``: The width of the element matches the width of its content, but doesn't exceed the width of the parent container. - An integer specifying the width in pixels: The element has a fixed width. If the specified width is greater than the width of the parent container, the width of the element matches the width of the parent container. Examples -------- >>> import streamlit as st >>> >>> st.header("_Streamlit_ is :blue[cool] :sunglasses:") >>> st.header("This is a header with a divider", divider="gray") >>> st.header("These headers have rotating dividers", divider=True) >>> st.header("One", divider=True) >>> st.header("Two", divider=True) >>> st.header("Three", divider=True) >>> st.header("Four", divider=True) .. output:: https://doc-header.streamlit.app/ height: 600px T allow_contentr(headingtagbodyanchorr&r' layout_config)r r dg_enqueuer#_create_heading_protorrselfr0r1r&r'r(r3s rr$zHeadingMixin.header+seT uD1$51 ww   . .#.. / (  r subheaderc t|dt|}|jjdtj t j|||||S)am Display text in subheader formatting. Parameters ---------- body : str The text to display as GitHub-flavored Markdown. Syntax information can be found at: https://github.github.com/gfm. See the ``body`` parameter of |st.markdown|_ for additional, supported Markdown directives. .. |st.markdown| replace:: ``st.markdown`` .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown anchor : str or False The anchor name of the header that can be accessed with #anchor in the URL. If omitted, it generates an anchor using the body. If False, the anchor is not shown in the UI. help : str or None A tooltip that gets displayed next to the subheader. If this is ``None`` (default), no tooltip is displayed. The tooltip can optionally contain GitHub-flavored Markdown, including the Markdown directives described in the ``body`` parameter of ``st.markdown``. divider : bool, "blue", "green", "orange", "red", "violet", "yellow", "gray"/"grey", or "rainbow" Shows a colored divider below the header. If this is ``True``, successive headers will cycle through divider colors, except gray and rainbow. That is, the first header will have a blue line, the second header will have a green line, and so on. If this is a string, the color can be set to one of the following: blue, green, orange, red, violet, yellow, gray/grey, or rainbow. width : "stretch", "content", or int The width of the subheader element. This can be one of the following: - ``"stretch"`` (default): The width of the element matches the width of the parent container. - ``"content"``: The width of the element matches the width of its content, but doesn't exceed the width of the parent container. - An integer specifying the width in pixels: The element has a fixed width. If the specified width is greater than the width of the parent container, the width of the element matches the width of the parent container. Examples -------- >>> import streamlit as st >>> >>> st.subheader("_Streamlit_ is :blue[cool] :sunglasses:") >>> st.subheader("This is a subheader with a divider", divider="gray") >>> st.subheader("These subheaders have rotating dividers", divider=True) >>> st.subheader("One", divider=True) >>> st.subheader("Two", divider=True) >>> st.subheader("Three", divider=True) >>> st.subheader("Four", divider=True) .. output:: https://doc-subheader.streamlit.app/ height: 500px Tr*r,r-r.r2)r r r4r5r#r6rrr7s rr9zHeadingMixin.subheaderseT uD1$51 ww   . .#11 / (  rtitle)r&r(c t|dt|}|jjdtj t j||||S)a[Display text in title formatting. Each document should have a single `st.title()`, although this is not enforced. Parameters ---------- body : str The text to display as GitHub-flavored Markdown. Syntax information can be found at: https://github.github.com/gfm. See the ``body`` parameter of |st.markdown|_ for additional, supported Markdown directives. .. |st.markdown| replace:: ``st.markdown`` .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown anchor : str or False The anchor name of the header that can be accessed with #anchor in the URL. If omitted, it generates an anchor using the body. If False, the anchor is not shown in the UI. help : str or None A tooltip that gets displayed next to the title. If this is ``None`` (default), no tooltip is displayed. The tooltip can optionally contain GitHub-flavored Markdown, including the Markdown directives described in the ``body`` parameter of ``st.markdown``. width : "stretch", "content", or int The width of the title element. This can be one of the following: - ``"stretch"`` (default): The width of the element matches the width of the parent container. - ``"content"``: The width of the element matches the width of its content, but doesn't exceed the width of the parent container. - An integer specifying the width in pixels: The element has a fixed width. If the specified width is greater than the width of the parent container, the width of the element matches the width of the parent container. Examples -------- >>> import streamlit as st >>> >>> st.title("This is a title") >>> st.title("_Streamlit_ is :blue[cool] :sunglasses:") .. output:: https://doc-title.streamlit.app/ height: 220px Tr*r,r-)r/r0r1r&r2)r r r4r5r#r6rr)r8r0r1r&r(r3s rr;zHeadingMixin.titles_~ uD1$51 ww   . .#--Dd / (    rctd|S)zGet our DeltaGenerator.r)r)r8s rr4zHeadingMixin.dg's$d++rcv|durygd}||vr td|Std|ddj|d) NTauto) redorangeyellowbluegreenvioletgraygreyrainbowstrz&Divider parameter has invalid value: `z`. Please choose from: z, .)rr join)r' valid_colorss r_handle_divider_colorz"HeadingMixin._handle_divider_color,sY d?   l "w' '#4WI=TUYU^U^_kUlTmmn o  rc\t}|j|_t||_|rt j ||_|Y|durd|_nMt|tr||_ n5|durtd|dtdt|jd|r||_|S)NFTz$Anchor parameter has invalid value: z-. Supported values: None, any string or Falsez#Anchor parameter has invalid type: ) HeadingProtovaluer/rr0r#rMr' hide_anchor isinstancerIr1r typerr&)r/r0r1r&r'protos rr6z"HeadingMixin._create_heading_protoAsII % (>>wGEM  $(!FC(% 4+:6(CBB ,9$v,:O:O9PQBB EJ r)N) r0rr1r r& str | Noner'r!r(rreturnr) r0rr1r r&rUr(rrVr)rVr)r'r!rVrI)NNF) r/rr0rr1r r&rUr'r!rVrO) rrrr r$r9r;propertyr4 staticmethodrMr6rrrr#r#*sHV    V V V  V  V V  V V pK V    V V V  V  V V  V !V pGG   G G G  G  G  G G R,,  (       rr#)! __future__renumrtypingrrrr#streamlit.elements.lib.layout_utilsr r streamlit.errorsr streamlit.proto.Heading_pb2r rOstreamlit.runtime.metrics_utilr streamlit.string_utilrstreamlit.delta_generatorrrstreamlit.type_utilrrrIr __annotations__boolr!r#rrrress#::L2?9,89/d '%.(4/ /CZ$&&vvr