Skip to content

Commit 09b03a0

Browse files
authored
Bump to Base UI 4 and Hugeicons (#46)
1 parent 58d3ec1 commit 09b03a0

File tree

18 files changed

+295
-213
lines changed

18 files changed

+295
-213
lines changed

.cursorignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pyi

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.14.0
5+
rev: v0.14.1
66
hooks:
77
- id: ruff-check
88
files: ^reflex_ui/

reflex_ui/components/base/accordion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class AccordionRoot(AccordionBaseComponent):
5959
hidden_until_found: Var[bool]
6060

6161
# Whether multiple items can be open at the same time. Defaults to True.
62-
open_multiple: Var[bool]
62+
multiple: Var[bool]
6363

6464
# Whether the component should ignore user interaction. Defaults to False.
6565
disabled: Var[bool]

reflex_ui/components/base/accordion.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class AccordionRoot(AccordionBaseComponent):
8686
default_value: Var[list[Any]] | list[Any] | None = None,
8787
value: Var[list[Any]] | list[Any] | None = None,
8888
hidden_until_found: Var[bool] | bool | None = None,
89-
open_multiple: Var[bool] | bool | None = None,
89+
multiple: Var[bool] | bool | None = None,
9090
disabled: Var[bool] | bool | None = None,
9191
loop: Var[bool] | bool | None = None,
9292
orientation: Literal["horizontal", "vertical"]
@@ -291,7 +291,7 @@ class HighLevelAccordion(AccordionRoot):
291291
default_value: Var[list[Any]] | list[Any] | None = None,
292292
value: Var[list[Any]] | list[Any] | None = None,
293293
hidden_until_found: Var[bool] | bool | None = None,
294-
open_multiple: Var[bool] | bool | None = None,
294+
multiple: Var[bool] | bool | None = None,
295295
disabled: Var[bool] | bool | None = None,
296296
loop: Var[bool] | bool | None = None,
297297
orientation: Literal["horizontal", "vertical"]
@@ -337,7 +337,7 @@ class HighLevelAccordion(AccordionRoot):
337337
value: The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the `default_value` prop instead.
338338
on_value_change: Event handler called when an accordion item is expanded or collapsed. Provides the new value as an argument.
339339
hidden_until_found: Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` prop and uses `hidden="until-found"` to hide the element without removing it from the DOM. Defaults to False.
340-
open_multiple: Whether multiple items can be open at the same time. Defaults to True.
340+
multiple: Whether multiple items can be open at the same time. Defaults to True.
341341
disabled: Whether the component should ignore user interaction. Defaults to False.
342342
loop: Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
343343
orientation: The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'.
@@ -373,7 +373,7 @@ class Accordion(ComponentNamespace):
373373
default_value: Var[list[Any]] | list[Any] | None = None,
374374
value: Var[list[Any]] | list[Any] | None = None,
375375
hidden_until_found: Var[bool] | bool | None = None,
376-
open_multiple: Var[bool] | bool | None = None,
376+
multiple: Var[bool] | bool | None = None,
377377
disabled: Var[bool] | bool | None = None,
378378
loop: Var[bool] | bool | None = None,
379379
orientation: Literal["horizontal", "vertical"]
@@ -419,7 +419,7 @@ class Accordion(ComponentNamespace):
419419
value: The controlled value of the item(s) that should be expanded. To render an uncontrolled accordion, use the `default_value` prop instead.
420420
on_value_change: Event handler called when an accordion item is expanded or collapsed. Provides the new value as an argument.
421421
hidden_until_found: Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` prop and uses `hidden="until-found"` to hide the element without removing it from the DOM. Defaults to False.
422-
open_multiple: Whether multiple items can be open at the same time. Defaults to True.
422+
multiple: Whether multiple items can be open at the same time. Defaults to True.
423423
disabled: Whether the component should ignore user interaction. Defaults to False.
424424
loop: Whether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys. Defaults to True.
425425
orientation: The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'.

reflex_ui/components/base/badge.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ class Badge(Span, CoreComponent):
123123
]
124124
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
125125
| None = None,
126-
content_editable: Literal["inherit", "plaintext-only", False, True]
127-
| Var[Literal["inherit", "plaintext-only", False, True]]
126+
content_editable: Literal["inherit", "plaintext-only"]
127+
| Var[Literal["inherit", "plaintext-only"] | bool]
128+
| bool
128129
| None = None,
129130
context_menu: Var[str] | str | None = None,
130131
dir: Var[str] | str | None = None,

reflex_ui/components/base/button.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ class Button(BaseButton, CoreComponent):
111111
]
112112
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
113113
| None = None,
114-
content_editable: Literal["inherit", "plaintext-only", False, True]
115-
| Var[Literal["inherit", "plaintext-only", False, True]]
114+
content_editable: Literal["inherit", "plaintext-only"]
115+
| Var[Literal["inherit", "plaintext-only"] | bool]
116+
| bool
116117
| None = None,
117118
context_menu: Var[str] | str | None = None,
118119
dir: Var[str] | str | None = None,

reflex_ui/components/base/card.pyi

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ class CardComponent(Div, CoreComponent):
3333
]
3434
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
3535
| None = None,
36-
content_editable: Literal["inherit", "plaintext-only", False, True]
37-
| Var[Literal["inherit", "plaintext-only", False, True]]
36+
content_editable: Literal["inherit", "plaintext-only"]
37+
| Var[Literal["inherit", "plaintext-only"] | bool]
38+
| bool
3839
| None = None,
3940
context_menu: Var[str] | str | None = None,
4041
dir: Var[str] | str | None = None,
@@ -278,8 +279,9 @@ class CardRoot(CardComponent):
278279
]
279280
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
280281
| None = None,
281-
content_editable: Literal["inherit", "plaintext-only", False, True]
282-
| Var[Literal["inherit", "plaintext-only", False, True]]
282+
content_editable: Literal["inherit", "plaintext-only"]
283+
| Var[Literal["inherit", "plaintext-only"] | bool]
284+
| bool
283285
| None = None,
284286
context_menu: Var[str] | str | None = None,
285287
dir: Var[str] | str | None = None,
@@ -492,8 +494,9 @@ class CardHeader(CardComponent):
492494
]
493495
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
494496
| None = None,
495-
content_editable: Literal["inherit", "plaintext-only", False, True]
496-
| Var[Literal["inherit", "plaintext-only", False, True]]
497+
content_editable: Literal["inherit", "plaintext-only"]
498+
| Var[Literal["inherit", "plaintext-only"] | bool]
499+
| bool
497500
| None = None,
498501
context_menu: Var[str] | str | None = None,
499502
dir: Var[str] | str | None = None,
@@ -706,8 +709,9 @@ class CardTitle(CardComponent):
706709
]
707710
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
708711
| None = None,
709-
content_editable: Literal["inherit", "plaintext-only", False, True]
710-
| Var[Literal["inherit", "plaintext-only", False, True]]
712+
content_editable: Literal["inherit", "plaintext-only"]
713+
| Var[Literal["inherit", "plaintext-only"] | bool]
714+
| bool
711715
| None = None,
712716
context_menu: Var[str] | str | None = None,
713717
dir: Var[str] | str | None = None,
@@ -920,8 +924,9 @@ class CardDescription(CardComponent):
920924
]
921925
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
922926
| None = None,
923-
content_editable: Literal["inherit", "plaintext-only", False, True]
924-
| Var[Literal["inherit", "plaintext-only", False, True]]
927+
content_editable: Literal["inherit", "plaintext-only"]
928+
| Var[Literal["inherit", "plaintext-only"] | bool]
929+
| bool
925930
| None = None,
926931
context_menu: Var[str] | str | None = None,
927932
dir: Var[str] | str | None = None,
@@ -1134,8 +1139,9 @@ class CardContent(CardComponent):
11341139
]
11351140
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
11361141
| None = None,
1137-
content_editable: Literal["inherit", "plaintext-only", False, True]
1138-
| Var[Literal["inherit", "plaintext-only", False, True]]
1142+
content_editable: Literal["inherit", "plaintext-only"]
1143+
| Var[Literal["inherit", "plaintext-only"] | bool]
1144+
| bool
11391145
| None = None,
11401146
context_menu: Var[str] | str | None = None,
11411147
dir: Var[str] | str | None = None,
@@ -1348,8 +1354,9 @@ class CardFooter(CardComponent):
13481354
]
13491355
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
13501356
| None = None,
1351-
content_editable: Literal["inherit", "plaintext-only", False, True]
1352-
| Var[Literal["inherit", "plaintext-only", False, True]]
1357+
content_editable: Literal["inherit", "plaintext-only"]
1358+
| Var[Literal["inherit", "plaintext-only"] | bool]
1359+
| bool
13531360
| None = None,
13541361
context_menu: Var[str] | str | None = None,
13551362
dir: Var[str] | str | None = None,
@@ -1566,8 +1573,9 @@ class HighLevelCard(CardComponent):
15661573
]
15671574
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
15681575
| None = None,
1569-
content_editable: Literal["inherit", "plaintext-only", False, True]
1570-
| Var[Literal["inherit", "plaintext-only", False, True]]
1576+
content_editable: Literal["inherit", "plaintext-only"]
1577+
| Var[Literal["inherit", "plaintext-only"] | bool]
1578+
| bool
15711579
| None = None,
15721580
context_menu: Var[str] | str | None = None,
15731581
dir: Var[str] | str | None = None,
@@ -1790,8 +1798,9 @@ class Card(ComponentNamespace):
17901798
]
17911799
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
17921800
| None = None,
1793-
content_editable: Literal["inherit", "plaintext-only", False, True]
1794-
| Var[Literal["inherit", "plaintext-only", False, True]]
1801+
content_editable: Literal["inherit", "plaintext-only"]
1802+
| Var[Literal["inherit", "plaintext-only"] | bool]
1803+
| bool
17951804
| None = None,
17961805
context_menu: Var[str] | str | None = None,
17971806
dir: Var[str] | str | None = None,

reflex_ui/components/base/input.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ class InputRoot(InputBaseComponent, ReflexInput):
9797
alt: Var[str] | str | None = None,
9898
auto_complete: Var[str] | str | None = None,
9999
auto_focus: Var[bool] | bool | None = None,
100-
capture: Literal["environment", "user", False, True]
101-
| Var[Literal["environment", "user", False, True]]
100+
capture: Literal["environment", "user"]
101+
| Var[Literal["environment", "user"] | bool]
102+
| bool
102103
| None = None,
103104
checked: Var[bool] | bool | None = None,
104105
default_checked: Var[bool] | bool | None = None,
@@ -182,8 +183,9 @@ class InputRoot(InputBaseComponent, ReflexInput):
182183
]
183184
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
184185
| None = None,
185-
content_editable: Literal["inherit", "plaintext-only", False, True]
186-
| Var[Literal["inherit", "plaintext-only", False, True]]
186+
content_editable: Literal["inherit", "plaintext-only"]
187+
| Var[Literal["inherit", "plaintext-only"] | bool]
188+
| bool
187189
| None = None,
188190
context_menu: Var[str] | str | None = None,
189191
dir: Var[str] | str | None = None,

reflex_ui/components/base/link.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ class Link(ReactRouterLink):
8181
]
8282
| Var[Literal["characters", "none", "off", "on", "sentences", "words"]]
8383
| None = None,
84-
content_editable: Literal["inherit", "plaintext-only", False, True]
85-
| Var[Literal["inherit", "plaintext-only", False, True]]
84+
content_editable: Literal["inherit", "plaintext-only"]
85+
| Var[Literal["inherit", "plaintext-only"] | bool]
86+
| bool
8687
| None = None,
8788
context_menu: Var[str] | str | None = None,
8889
dir: Var[str] | str | None = None,

reflex_ui/components/base/select.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,21 @@ def create(cls, *children, **props) -> BaseUIComponent:
254254
return super().create(*children, **props)
255255

256256

257+
class SelectList(SelectBaseComponent):
258+
"""A list component that wraps select items. Renders a <div> element."""
259+
260+
tag = "Select.List"
261+
262+
# The render prop
263+
render_: Var[Component]
264+
265+
@classmethod
266+
def create(cls, *children, **props) -> BaseUIComponent:
267+
"""Create the select list component."""
268+
props["data-slot"] = "select-list"
269+
return super().create(*children, **props)
270+
271+
257272
class SelectItem(SelectBaseComponent):
258273
"""An individual option in the select menu."""
259274

@@ -576,6 +591,7 @@ class Select(ComponentNamespace):
576591
portal = staticmethod(SelectPortal.create)
577592
positioner = staticmethod(SelectPositioner.create)
578593
popup = staticmethod(SelectPopup.create)
594+
list = staticmethod(SelectList.create)
579595
arrow = staticmethod(SelectArrow.create)
580596
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
581597
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)

0 commit comments

Comments
 (0)