Browse Source

add str support for some html components props (#5378)

Carlos 4 days ago
parent
commit
dcb4c04fcd
2 changed files with 13 additions and 13 deletions
  1. 2 2
      pyi_hashes.json
  2. 11 11
      reflex/components/el/elements/forms.py

+ 2 - 2
pyi_hashes.json

@@ -29,7 +29,7 @@
   "reflex/components/el/element.pyi": "323cfb5d67d8ccb58ac36c7cc7641dc3",
   "reflex/components/el/elements/__init__.pyi": "baeddd04d4d3a82799420b2a6df368f6",
   "reflex/components/el/elements/base.pyi": "697cd6716e3b1127b35299435c3d4e69",
-  "reflex/components/el/elements/forms.pyi": "21d7135b513bac72fd63b44c945932a5",
+  "reflex/components/el/elements/forms.pyi": "14f2ac656d37c4a5343c77e89ad9107b",
   "reflex/components/el/elements/inline.pyi": "ab31eec758f1cff8a9d51bf0935b9fca",
   "reflex/components/el/elements/media.pyi": "c191a9e00223a97e26a0d6ab99a1919b",
   "reflex/components/el/elements/metadata.pyi": "eda94a3283bae6a9b61b4cb1e20c1dbd",
@@ -91,7 +91,7 @@
   "reflex/components/radix/themes/components/switch.pyi": "61729a28148bc17acd20e48c12f60a54",
   "reflex/components/radix/themes/components/table.pyi": "81c77cecf78ddb3e931c9a5f0f8eccde",
   "reflex/components/radix/themes/components/tabs.pyi": "6facf7ebd344f8995934a167af01a9e5",
-  "reflex/components/radix/themes/components/text_area.pyi": "eef90fcc66990c44f3c0540862877cba",
+  "reflex/components/radix/themes/components/text_area.pyi": "4d5c343f24c71d89f3cb96c63cf9fc3a",
   "reflex/components/radix/themes/components/text_field.pyi": "92552297cc747dd3aae6f382699e319d",
   "reflex/components/radix/themes/components/tooltip.pyi": "5e17b67e50410f1124d2150237eab7cf",
   "reflex/components/radix/themes/layout/__init__.pyi": "9a52c5b283c864be70b51a8fd6120392",

+ 11 - 11
reflex/components/el/elements/forms.py

@@ -384,7 +384,7 @@ class BaseInput(BaseHTML):
     required: Var[bool]
 
     # Specifies the visible width of a text control
-    size: Var[int | float]
+    size: Var[str | int | float]
 
     # URL for image inputs
     src: Var[str]
@@ -504,22 +504,22 @@ class Meter(BaseHTML):
     form: Var[str]
 
     # High limit of range (above this is considered high value)
-    high: Var[int | float]
+    high: Var[str | int | float]
 
     # Low limit of range (below this is considered low value)
-    low: Var[int | float]
+    low: Var[str | int | float]
 
     # Maximum value of the range
-    max: Var[int | float]
+    max: Var[str | int | float]
 
     # Minimum value of the range
-    min: Var[int | float]
+    min: Var[str | int | float]
 
     # Optimum value in the range
-    optimum: Var[int | float]
+    optimum: Var[str | int | float]
 
     # Current value of the meter
-    value: Var[int | float]
+    value: Var[str | int | float]
 
 
 class Optgroup(BaseHTML):
@@ -666,7 +666,7 @@ class Textarea(BaseHTML):
     auto_height: Var[bool]
 
     # Visible width of the text control, in average character widths
-    cols: Var[int]
+    cols: Var[str | int]
 
     # The default value of the textarea when initially rendered
     default_value: Var[str]
@@ -684,10 +684,10 @@ class Textarea(BaseHTML):
     form: Var[str]
 
     # Maximum number of characters allowed in the textarea
-    max_length: Var[int]
+    max_length: Var[str | int]
 
     # Minimum number of characters required in the textarea
-    min_length: Var[int]
+    min_length: Var[str | int]
 
     # Name of the textarea, used when submitting the form
     name: Var[str]
@@ -702,7 +702,7 @@ class Textarea(BaseHTML):
     required: Var[bool]
 
     # Visible number of lines in the text control
-    rows: Var[int]
+    rows: Var[str | int]
 
     # The controlled value of the textarea, read only unless used with on_change
     value: Var[str]