Skip to content

Commit 7a1bf18

Browse files
authored
bump base ui to 1.0.0 (#53)
1 parent 6d8f9d6 commit 7a1bf18

33 files changed

+194
-167
lines changed

reflex_ui/components/base/accordion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class AccordionRoot(AccordionBaseComponent):
6565
disabled: Var[bool]
6666

6767
# 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.
68-
loop: Var[bool]
68+
loop_focus: Var[bool]
6969

7070
# The visual orientation of the accordion. Controls whether roving focus uses left/right or up/down arrow keys. Defaults to 'vertical'.
7171
orientation: Var[LiteralOrientation]

reflex_ui/components/base/accordion.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class AccordionRoot(AccordionBaseComponent):
8888
hidden_until_found: Var[bool] | bool | None = None,
8989
multiple: Var[bool] | bool | None = None,
9090
disabled: Var[bool] | bool | None = None,
91-
loop: Var[bool] | bool | None = None,
91+
loop_focus: Var[bool] | bool | None = None,
9292
orientation: Literal["horizontal", "vertical"]
9393
| Var[Literal["horizontal", "vertical"]]
9494
| None = None,
@@ -293,7 +293,7 @@ class HighLevelAccordion(AccordionRoot):
293293
hidden_until_found: Var[bool] | bool | None = None,
294294
multiple: Var[bool] | bool | None = None,
295295
disabled: Var[bool] | bool | None = None,
296-
loop: Var[bool] | bool | None = None,
296+
loop_focus: Var[bool] | bool | None = None,
297297
orientation: Literal["horizontal", "vertical"]
298298
| Var[Literal["horizontal", "vertical"]]
299299
| None = None,
@@ -339,7 +339,7 @@ class HighLevelAccordion(AccordionRoot):
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.
340340
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.
342-
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.
342+
loop_focus: 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'.
344344
keep_mounted: Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hidden_until_found is used. Defaults to False.
345345
render_: The render prop.
@@ -375,7 +375,7 @@ class Accordion(ComponentNamespace):
375375
hidden_until_found: Var[bool] | bool | None = None,
376376
multiple: Var[bool] | bool | None = None,
377377
disabled: Var[bool] | bool | None = None,
378-
loop: Var[bool] | bool | None = None,
378+
loop_focus: Var[bool] | bool | None = None,
379379
orientation: Literal["horizontal", "vertical"]
380380
| Var[Literal["horizontal", "vertical"]]
381381
| None = None,
@@ -421,7 +421,7 @@ class Accordion(ComponentNamespace):
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.
422422
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.
424-
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.
424+
loop_focus: 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'.
426426
keep_mounted: Whether to keep the element in the DOM while the panel is closed. This prop is ignored when hidden_until_found is used. Defaults to False.
427427
render_: The render prop.

reflex_ui/components/base/avatar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def create(cls, *children, **props) -> BaseUIComponent:
4444

4545

4646
class AvatarImage(AvatarBaseComponent):
47-
"""The image to be displayed in the avatar."""
47+
"""The image to be displayed in the avatar. Renders an <img> element."""
4848

4949
tag = "Avatar.Image"
5050

reflex_ui/components/base/button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl"
1717
]
1818

19-
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 shrink-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-medium cursor-pointer box-border"
19+
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 cursor-pointer box-border"
2020

2121
BUTTON_VARIANTS = {
2222
"variant": {

reflex_ui/components/base/button.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LiteralButtonVariant = Literal[
1919
LiteralButtonSize = Literal[
2020
"xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl"
2121
]
22-
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 shrink-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-medium cursor-pointer box-border"
22+
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 cursor-pointer box-border"
2323
BUTTON_VARIANTS = {
2424
"variant": {
2525
"primary": "bg-primary-9 text-primary-contrast hover:bg-primary-10",

reflex_ui/components/base/checkbox.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ class CheckboxRoot(CheckboxBaseComponent):
6969
# Whether the user should be unable to tick or untick the checkbox. Defaults to False.
7070
read_only: Var[bool]
7171

72+
# The value of the checkbox when it is unchecked. Used for form submission when unchecked. Defaults to not submitting any value.
73+
unchecked_value: Var[str]
74+
7275
@classmethod
7376
def create(cls, *children, **props) -> BaseUIComponent:
7477
"""Create the checkbox root component."""

reflex_ui/components/base/checkbox.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class CheckboxRoot(CheckboxBaseComponent):
8787
native_button: Var[bool] | bool | None = None,
8888
parent: Var[bool] | bool | None = None,
8989
read_only: Var[bool] | bool | None = None,
90+
unchecked_value: Var[str] | str | None = None,
9091
unstyled: Var[bool] | bool | None = None,
9192
style: Sequence[Mapping[str, Any]]
9293
| Mapping[str, Any]
@@ -173,6 +174,7 @@ class HighLevelCheckbox(CheckboxRoot):
173174
native_button: Var[bool] | bool | None = None,
174175
parent: Var[bool] | bool | None = None,
175176
read_only: Var[bool] | bool | None = None,
177+
unchecked_value: Var[str] | str | None = None,
176178
unstyled: Var[bool] | bool | None = None,
177179
style: Sequence[Mapping[str, Any]]
178180
| Mapping[str, Any]
@@ -221,6 +223,7 @@ class HighLevelCheckbox(CheckboxRoot):
221223
native_button: Whether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (e.g. <div>). Defaults to True.
222224
parent: Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False.
223225
read_only: Whether the user should be unable to tick or untick the checkbox. Defaults to False.
226+
unchecked_value: The value of the checkbox when it is unchecked. Used for form submission when unchecked. Defaults to not submitting any value.
224227
unstyled: Whether the component should be unstyled
225228
style: The style of the component.
226229
key: A unique key for the component.
@@ -253,6 +256,7 @@ class CheckboxNamespace(ComponentNamespace):
253256
native_button: Var[bool] | bool | None = None,
254257
parent: Var[bool] | bool | None = None,
255258
read_only: Var[bool] | bool | None = None,
259+
unchecked_value: Var[str] | str | None = None,
256260
unstyled: Var[bool] | bool | None = None,
257261
style: Sequence[Mapping[str, Any]]
258262
| Mapping[str, Any]
@@ -301,6 +305,7 @@ class CheckboxNamespace(ComponentNamespace):
301305
native_button: Whether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (e.g. <div>). Defaults to True.
302306
parent: Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False.
303307
read_only: Whether the user should be unable to tick or untick the checkbox. Defaults to False.
308+
unchecked_value: The value of the checkbox when it is unchecked. Used for form submission when unchecked. Defaults to not submitting any value.
304309
unstyled: Whether the component should be unstyled
305310
style: The style of the component.
306311
key: A unique key for the component.

reflex_ui/components/base/context_menu.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class ContextMenuRoot(ContextMenuBaseComponent):
9191
# Whether the component should ignore user interaction. Defaults to False.
9292
disabled: Var[bool]
9393

94-
# Whether keyboard navigation should loop around when reaching the end of the items. Defaults to True.
95-
loop: Var[bool]
94+
# 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.
95+
loop_focus: Var[bool]
9696

9797
# The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
9898
orientation: Var[LiteralMenuOrientation]
@@ -190,8 +190,8 @@ class ContextMenuPositioner(ContextMenuBaseComponent):
190190
# Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False.
191191
sticky: Var[bool]
192192

193-
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to True.
194-
track_anchor: Var[bool]
193+
# Whether to disable the popup tracking any layout shift of its positioning anchor. Defaults to False.
194+
disable_anchor_tracking: Var[bool]
195195

196196
# Determines which CSS position property to use. Defaults to "absolute".
197197
position_method: Var[LiteralPositionMethod]
@@ -487,7 +487,7 @@ class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
487487
close_delay: Var[int]
488488

489489
# 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.
490-
loop: Var[bool]
490+
loop_focus: Var[bool]
491491

492492
# The visual orientation of the submenu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
493493
orientation: Var[LiteralMenuOrientation]
@@ -546,7 +546,7 @@ class HighLevelContextMenu(ContextMenuRoot):
546546
"collision_padding",
547547
"sticky",
548548
"position_method",
549-
"track_anchor",
549+
"disable_anchor_tracking",
550550
"side_offset",
551551
"collision_avoidance",
552552
"collision_boundary",

reflex_ui/components/base/context_menu.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class ContextMenuRoot(ContextMenuBaseComponent):
114114
actions_ref: Var[str] | str | None = None,
115115
close_parent_on_esc: Var[bool] | bool | None = None,
116116
disabled: Var[bool] | bool | None = None,
117-
loop: Var[bool] | bool | None = None,
117+
loop_focus: Var[bool] | bool | None = None,
118118
orientation: Literal["horizontal", "vertical"]
119119
| Var[Literal["horizontal", "vertical"]]
120120
| None = None,
@@ -287,7 +287,7 @@ class ContextMenuPositioner(ContextMenuBaseComponent):
287287
collision_padding: Var[int] | int | None = None,
288288
collision_boundary: Var[str] | str | None = None,
289289
sticky: Var[bool] | bool | None = None,
290-
track_anchor: Var[bool] | bool | None = None,
290+
disable_anchor_tracking: Var[bool] | bool | None = None,
291291
position_method: Literal["absolute", "fixed"]
292292
| Var[Literal["absolute", "fixed"]]
293293
| None = None,
@@ -774,7 +774,7 @@ class ContextMenuSubmenuRoot(ContextMenuBaseComponent):
774774
open_on_hover: Var[bool] | bool | None = None,
775775
delay: Var[int] | int | None = None,
776776
close_delay: Var[int] | int | None = None,
777-
loop: Var[bool] | bool | None = None,
777+
loop_focus: Var[bool] | bool | None = None,
778778
orientation: Literal["horizontal", "vertical"]
779779
| Var[Literal["horizontal", "vertical"]]
780780
| None = None,
@@ -871,7 +871,7 @@ class HighLevelContextMenu(ContextMenuRoot):
871871
actions_ref: Var[str] | str | None = None,
872872
close_parent_on_esc: Var[bool] | bool | None = None,
873873
disabled: Var[bool] | bool | None = None,
874-
loop: Var[bool] | bool | None = None,
874+
loop_focus: Var[bool] | bool | None = None,
875875
orientation: Literal["horizontal", "vertical"]
876876
| Var[Literal["horizontal", "vertical"]]
877877
| None = None,
@@ -923,7 +923,7 @@ class HighLevelContextMenu(ContextMenuRoot):
923923
close_parent_on_esc: When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
924924
on_open_change_complete: Event handler called after any animations complete when the context menu is closed.
925925
disabled: Whether the component should ignore user interaction. Defaults to False.
926-
loop: Whether keyboard navigation should loop around when reaching the end of the items. Defaults to True.
926+
loop_focus: 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.
927927
orientation: The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
928928
unstyled: Whether the component should be unstyled
929929
style: The style of the component.
@@ -974,7 +974,7 @@ class ContextMenu(ComponentNamespace):
974974
actions_ref: Var[str] | str | None = None,
975975
close_parent_on_esc: Var[bool] | bool | None = None,
976976
disabled: Var[bool] | bool | None = None,
977-
loop: Var[bool] | bool | None = None,
977+
loop_focus: Var[bool] | bool | None = None,
978978
orientation: Literal["horizontal", "vertical"]
979979
| Var[Literal["horizontal", "vertical"]]
980980
| None = None,
@@ -1026,7 +1026,7 @@ class ContextMenu(ComponentNamespace):
10261026
close_parent_on_esc: When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
10271027
on_open_change_complete: Event handler called after any animations complete when the context menu is closed.
10281028
disabled: Whether the component should ignore user interaction. Defaults to False.
1029-
loop: Whether keyboard navigation should loop around when reaching the end of the items. Defaults to True.
1029+
loop_focus: 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.
10301030
orientation: The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
10311031
unstyled: Whether the component should be unstyled
10321032
style: The style of the component.

reflex_ui/components/base/dialog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class DialogRoot(DialogBaseComponent):
5151
# Event handler called when the dialog is opened or closed
5252
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
5353

54-
# Determines whether the dialog should close on outside clicks. Defaults to True.
55-
dismissible: Var[bool]
54+
# Determines whether pointer dismissal (clicking outside) is disabled. Defaults to False.
55+
disable_pointer_dismissal: Var[bool]
5656

5757
# Determines if the dialog enters a modal state when open.
5858
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.

0 commit comments

Comments
 (0)