Skip to content

Commit

Permalink
Update html and add path
Browse files Browse the repository at this point in the history
  • Loading branch information
Alek Petuskey committed Nov 20, 2023
1 parent 6018965 commit 15f1124
Show file tree
Hide file tree
Showing 22 changed files with 57 additions and 9 deletions.
3 changes: 1 addition & 2 deletions reflex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
To signal to typecheckers that something should be reexported,
we use the Flask "import name as name" syntax.
"""

from . import el as el
from .admin import AdminDash as AdminDash
from .app import App as App
from .app import UploadFile as UploadFile
from .base import Base as Base
from .compiler.utils import get_asset_path
from .components import *
from .components import el as el
from .components.component import custom_component as memo
from .components.graphing import recharts as recharts
from .config import Config as Config
Expand Down
4 changes: 2 additions & 2 deletions reflex/components/datadisplay/dataeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def create(cls, *children, **props) -> Component:
Returns:
The DataEditor component.&
"""
from reflex.el.elements import Div
from reflex.components.el import Div

columns = props.get("columns", [])
data = props.get("data", [])
Expand Down Expand Up @@ -339,7 +339,7 @@ def _get_app_wrap_components(self) -> dict[tuple[int, str], Component]:
Returns:
The app wrap components.
"""
from reflex.el.elements import Div
from reflex.components.el import Div

class Portal(Div):
def get_ref(self):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@
Wbr,
)
from .metadata import Base, Head, Link, Meta, Style, Title
from .media import (
Area,
Audio,
Img,
Map,
Track,
Video,
Embed,
Iframe,
Object,
Picture,
Portal,
Source,
Svg,
Path,
)
from .other import Details, Dialog, Html, Math, Slot, Summary, Svg, Template
from .scripts import Canvas, Noscript, Script
from .sectioning import (
Expand Down Expand Up @@ -110,6 +126,22 @@
thead = Thead.create
tr = Tr.create

# Media
area = Area.create
audio = Audio.create
img = Img.create
map = Map.create
track = Track.create
video = Video.create
embed = Embed.create
iframe = Iframe.create
object = Object.create
picture = Picture.create
portal = Portal.create
source = Source.create
svg = Svg.create
path = Path.create

# Sectioning
address = Address.create
article = Article.create
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
from typing import Union

from reflex.el.element import Element
from reflex.components.el.element import Element
from reflex.vars import Var as Var_


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
from typing import Union

from reflex.el.element import Element
from reflex.components.el.element import Element
from reflex.vars import Var as Var_

from .base import BaseHTML
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,20 @@ class Source(BaseHTML):

# Media type of the source
type: Var_[Union[str, int, bool]]


class Svg(BaseHTML):
tag = "svg"

# Specifies the width of the element
width: Var_[Union[str, int, bool]]

# Specifies the height of the element
height: Var_[Union[str, int, bool]]


class Path(BaseHTML):
tag = "path"

# Defines the shape of the path
d: Var_[Union[str, int, bool]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Element classes. This is an auto-generated file. Do not edit. See ../generate.py."""
from typing import Union

from reflex.el.element import Element
from reflex.components.el.element import Element
from reflex.vars import Var as Var_

from .base import BaseHTML
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion reflex/components/radix/themes/components.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Interactive components provided by @radix-ui/themes."""
from typing import Any, Dict, Literal

from reflex import el
from reflex.components import el
from reflex.components.component import Component
from reflex.components.forms.debounce import DebounceInput
from reflex.constants import EventTriggers
Expand Down
2 changes: 1 addition & 1 deletion reflex/components/radix/themes/components.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.radix.themes.base import CommonMarginProps
from reflex.components.component import Component
from reflex.el.elements import Input
from reflex.components.el import Input
from reflex.components.radix.themes.base import RadixThemesComponent
from reflex.vars import Var, BaseVar, ComputedVar
from reflex.event import EventHandler, EventChain, EventSpec
Expand Down

0 comments on commit 15f1124

Please sign in to comment.