Skip to content

Commit a9f0f87

Browse files
committed
use is not none for highlevel components
1 parent 611dd88 commit a9f0f87

32 files changed

+34
-254
lines changed

reflex_ui/components/base/accordion.pyi

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ class AccordionBaseComponent(BaseUIComponent):
4242
id: Any | None = None,
4343
ref: Var | None = None,
4444
class_name: Any | None = None,
45-
autofocus: bool | None = None,
4645
custom_attrs: dict[str, Var | Any] | None = None,
4746
on_blur: EventType[()] | None = None,
4847
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -72,7 +71,6 @@ class AccordionBaseComponent(BaseUIComponent):
7271
id: The id for the component.
7372
ref: The Var to pass as the ref to the component.
7473
class_name: The class name for the component.
75-
autofocus: Whether the component should take the focus once the page is loaded
7674
custom_attrs: custom attribute
7775
**props: The props of the component.
7876
@@ -106,7 +104,6 @@ class AccordionRoot(AccordionBaseComponent):
106104
id: Any | None = None,
107105
ref: Var | None = None,
108106
class_name: Any | None = None,
109-
autofocus: bool | None = None,
110107
custom_attrs: dict[str, Var | Any] | None = None,
111108
on_blur: EventType[()] | None = None,
112109
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -147,7 +144,6 @@ class AccordionItem(AccordionBaseComponent):
147144
id: Any | None = None,
148145
ref: Var | None = None,
149146
class_name: Any | None = None,
150-
autofocus: bool | None = None,
151147
custom_attrs: dict[str, Var | Any] | None = None,
152148
on_blur: EventType[()] | None = None,
153149
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -186,7 +182,6 @@ class AccordionHeader(AccordionBaseComponent):
186182
id: Any | None = None,
187183
ref: Var | None = None,
188184
class_name: Any | None = None,
189-
autofocus: bool | None = None,
190185
custom_attrs: dict[str, Var | Any] | None = None,
191186
on_blur: EventType[()] | None = None,
192187
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -225,7 +220,6 @@ class AccordionTrigger(AccordionBaseComponent):
225220
id: Any | None = None,
226221
ref: Var | None = None,
227222
class_name: Any | None = None,
228-
autofocus: bool | None = None,
229223
custom_attrs: dict[str, Var | Any] | None = None,
230224
on_blur: EventType[()] | None = None,
231225
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -265,7 +259,6 @@ class AccordionPanel(AccordionBaseComponent):
265259
id: Any | None = None,
266260
ref: Var | None = None,
267261
class_name: Any | None = None,
268-
autofocus: bool | None = None,
269262
custom_attrs: dict[str, Var | Any] | None = None,
270263
on_blur: EventType[()] | None = None,
271264
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -316,7 +309,6 @@ class HighLevelAccordion(AccordionRoot):
316309
id: Any | None = None,
317310
ref: Var | None = None,
318311
class_name: Any | None = None,
319-
autofocus: bool | None = None,
320312
custom_attrs: dict[str, Var | Any] | None = None,
321313
on_blur: EventType[()] | None = None,
322314
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -357,7 +349,6 @@ class HighLevelAccordion(AccordionRoot):
357349
id: The id for the component.
358350
ref: The Var to pass as the ref to the component.
359351
class_name: The class name for the component.
360-
autofocus: Whether the component should take the focus once the page is loaded
361352
custom_attrs: custom attribute
362353
**props: Additional properties to apply to the accordion component.
363354
@@ -399,7 +390,6 @@ class Accordion(ComponentNamespace):
399390
id: Any | None = None,
400391
ref: Var | None = None,
401392
class_name: Any | None = None,
402-
autofocus: bool | None = None,
403393
custom_attrs: dict[str, Var | Any] | None = None,
404394
on_blur: EventType[()] | None = None,
405395
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -440,7 +430,6 @@ class Accordion(ComponentNamespace):
440430
id: The id for the component.
441431
ref: The Var to pass as the ref to the component.
442432
class_name: The class name for the component.
443-
autofocus: Whether the component should take the focus once the page is loaded
444433
custom_attrs: custom attribute
445434
**props: Additional properties to apply to the accordion component.
446435

reflex_ui/components/base/avatar.pyi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class AvatarBaseComponent(BaseUIComponent):
3535
id: Any | None = None,
3636
ref: Var | None = None,
3737
class_name: Any | None = None,
38-
autofocus: bool | None = None,
3938
custom_attrs: dict[str, Var | Any] | None = None,
4039
on_blur: EventType[()] | None = None,
4140
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -65,7 +64,6 @@ class AvatarBaseComponent(BaseUIComponent):
6564
id: The id for the component.
6665
ref: The Var to pass as the ref to the component.
6766
class_name: The class name for the component.
68-
autofocus: Whether the component should take the focus once the page is loaded
6967
custom_attrs: custom attribute
7068
**props: The props of the component.
7169
@@ -89,7 +87,6 @@ class AvatarRoot(AvatarBaseComponent):
8987
id: Any | None = None,
9088
ref: Var | None = None,
9189
class_name: Any | None = None,
92-
autofocus: bool | None = None,
9390
custom_attrs: dict[str, Var | Any] | None = None,
9491
on_blur: EventType[()] | None = None,
9592
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -128,7 +125,6 @@ class AvatarImage(AvatarBaseComponent):
128125
id: Any | None = None,
129126
ref: Var | None = None,
130127
class_name: Any | None = None,
131-
autofocus: bool | None = None,
132128
custom_attrs: dict[str, Var | Any] | None = None,
133129
on_blur: EventType[()] | None = None,
134130
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -168,7 +164,6 @@ class AvatarFallback(AvatarBaseComponent):
168164
id: Any | None = None,
169165
ref: Var | None = None,
170166
class_name: Any | None = None,
171-
autofocus: bool | None = None,
172167
custom_attrs: dict[str, Var | Any] | None = None,
173168
on_blur: EventType[()] | None = None,
174169
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -208,7 +203,6 @@ class HighLevelAvatar(AvatarRoot):
208203
id: Any | None = None,
209204
ref: Var | None = None,
210205
class_name: Any | None = None,
211-
autofocus: bool | None = None,
212206
custom_attrs: dict[str, Var | Any] | None = None,
213207
on_blur: EventType[()] | None = None,
214208
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -252,7 +246,6 @@ class Avatar(ComponentNamespace):
252246
id: Any | None = None,
253247
ref: Var | None = None,
254248
class_name: Any | None = None,
255-
autofocus: bool | None = None,
256249
custom_attrs: dict[str, Var | Any] | None = None,
257250
on_blur: EventType[()] | None = None,
258251
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,

reflex_ui/components/base/badge.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ class Badge(Span, CoreComponent):
305305
id: Any | None = None,
306306
ref: Var | None = None,
307307
class_name: Any | None = None,
308-
autofocus: bool | None = None,
309308
custom_attrs: dict[str, Var | Any] | None = None,
310309
on_blur: EventType[()] | None = None,
311310
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,

reflex_ui/components/base/button.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ class Button(BaseButton, CoreComponent):
293293
id: Any | None = None,
294294
ref: Var | None = None,
295295
class_name: Any | None = None,
296-
autofocus: bool | None = None,
297296
custom_attrs: dict[str, Var | Any] | None = None,
298297
on_blur: EventType[()] | None = None,
299298
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,

reflex_ui/components/base/card.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,18 @@ def create(cls, *children, **props):
108108
return CardRoot.create(
109109
(
110110
CardHeader.create(
111-
CardTitle.create(title) if title else None,
112-
CardDescription.create(description) if description else None,
111+
CardTitle.create(title) if title is not None else None,
112+
(
113+
CardDescription.create(description)
114+
if description is not None
115+
else None
116+
),
113117
)
114118
if title or description
115119
else None
116120
),
117-
CardContent.create(content) if content else None,
118-
CardFooter.create(footer) if footer else None,
121+
CardContent.create(content) if content is not None else None,
122+
CardFooter.create(footer) if footer is not None else None,
119123
*children,
120124
**props,
121125
)

reflex_ui/components/base/card.pyi

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ class CardComponent(Div, CoreComponent):
215215
id: Any | None = None,
216216
ref: Var | None = None,
217217
class_name: Any | None = None,
218-
autofocus: bool | None = None,
219218
custom_attrs: dict[str, Var | Any] | None = None,
220219
on_blur: EventType[()] | None = None,
221220
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -261,7 +260,6 @@ class CardComponent(Div, CoreComponent):
261260
id: The id for the component.
262261
ref: The Var to pass as the ref to the component.
263262
class_name: The class name for the component.
264-
autofocus: Whether the component should take the focus once the page is loaded
265263
custom_attrs: custom attribute
266264
**props: The props of the component.
267265
@@ -462,7 +460,6 @@ class CardRoot(CardComponent):
462460
id: Any | None = None,
463461
ref: Var | None = None,
464462
class_name: Any | None = None,
465-
autofocus: bool | None = None,
466463
custom_attrs: dict[str, Var | Any] | None = None,
467464
on_blur: EventType[()] | None = None,
468465
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -677,7 +674,6 @@ class CardHeader(CardComponent):
677674
id: Any | None = None,
678675
ref: Var | None = None,
679676
class_name: Any | None = None,
680-
autofocus: bool | None = None,
681677
custom_attrs: dict[str, Var | Any] | None = None,
682678
on_blur: EventType[()] | None = None,
683679
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -892,7 +888,6 @@ class CardTitle(CardComponent):
892888
id: Any | None = None,
893889
ref: Var | None = None,
894890
class_name: Any | None = None,
895-
autofocus: bool | None = None,
896891
custom_attrs: dict[str, Var | Any] | None = None,
897892
on_blur: EventType[()] | None = None,
898893
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1107,7 +1102,6 @@ class CardDescription(CardComponent):
11071102
id: Any | None = None,
11081103
ref: Var | None = None,
11091104
class_name: Any | None = None,
1110-
autofocus: bool | None = None,
11111105
custom_attrs: dict[str, Var | Any] | None = None,
11121106
on_blur: EventType[()] | None = None,
11131107
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1322,7 +1316,6 @@ class CardContent(CardComponent):
13221316
id: Any | None = None,
13231317
ref: Var | None = None,
13241318
class_name: Any | None = None,
1325-
autofocus: bool | None = None,
13261319
custom_attrs: dict[str, Var | Any] | None = None,
13271320
on_blur: EventType[()] | None = None,
13281321
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1537,7 +1530,6 @@ class CardFooter(CardComponent):
15371530
id: Any | None = None,
15381531
ref: Var | None = None,
15391532
class_name: Any | None = None,
1540-
autofocus: bool | None = None,
15411533
custom_attrs: dict[str, Var | Any] | None = None,
15421534
on_blur: EventType[()] | None = None,
15431535
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1755,7 +1747,6 @@ class HighLevelCard(CardComponent):
17551747
id: Any | None = None,
17561748
ref: Var | None = None,
17571749
class_name: Any | None = None,
1758-
autofocus: bool | None = None,
17591750
custom_attrs: dict[str, Var | Any] | None = None,
17601751
on_blur: EventType[()] | None = None,
17611752
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -1979,7 +1970,6 @@ class Card(ComponentNamespace):
19791970
id: Any | None = None,
19801971
ref: Var | None = None,
19811972
class_name: Any | None = None,
1982-
autofocus: bool | None = None,
19831973
custom_attrs: dict[str, Var | Any] | None = None,
19841974
on_blur: EventType[()] | None = None,
19851975
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,

reflex_ui/components/base/checkbox.pyi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class CheckboxBaseComponent(BaseUIComponent):
3838
id: Any | None = None,
3939
ref: Var | None = None,
4040
class_name: Any | None = None,
41-
autofocus: bool | None = None,
4241
custom_attrs: dict[str, Var | Any] | None = None,
4342
on_blur: EventType[()] | None = None,
4443
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -68,7 +67,6 @@ class CheckboxBaseComponent(BaseUIComponent):
6867
id: The id for the component.
6968
ref: The Var to pass as the ref to the component.
7069
class_name: The class name for the component.
71-
autofocus: Whether the component should take the focus once the page is loaded
7270
custom_attrs: custom attribute
7371
**props: The props of the component.
7472
@@ -101,7 +99,6 @@ class CheckboxRoot(CheckboxBaseComponent):
10199
id: Any | None = None,
102100
ref: Var | None = None,
103101
class_name: Any | None = None,
104-
autofocus: bool | None = None,
105102
custom_attrs: dict[str, Var | Any] | None = None,
106103
on_blur: EventType[()] | None = None,
107104
on_checked_change: EventType[()]
@@ -142,7 +139,6 @@ class CheckboxIndicator(CheckboxBaseComponent):
142139
id: Any | None = None,
143140
ref: Var | None = None,
144141
class_name: Any | None = None,
145-
autofocus: bool | None = None,
146142
custom_attrs: dict[str, Var | Any] | None = None,
147143
on_blur: EventType[()] | None = None,
148144
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -189,7 +185,6 @@ class HighLevelCheckbox(CheckboxRoot):
189185
id: Any | None = None,
190186
ref: Var | None = None,
191187
class_name: Any | None = None,
192-
autofocus: bool | None = None,
193188
custom_attrs: dict[str, Var | Any] | None = None,
194189
on_blur: EventType[()] | None = None,
195190
on_checked_change: EventType[()]
@@ -234,7 +229,6 @@ class HighLevelCheckbox(CheckboxRoot):
234229
id: The id for the component.
235230
ref: The Var to pass as the ref to the component.
236231
class_name: The class name for the component.
237-
autofocus: Whether the component should take the focus once the page is loaded
238232
custom_attrs: custom attribute
239233
**props: Additional properties to apply to the checkbox component.
240234
@@ -270,7 +264,6 @@ class CheckboxNamespace(ComponentNamespace):
270264
id: Any | None = None,
271265
ref: Var | None = None,
272266
class_name: Any | None = None,
273-
autofocus: bool | None = None,
274267
custom_attrs: dict[str, Var | Any] | None = None,
275268
on_blur: EventType[()] | None = None,
276269
on_checked_change: EventType[()]
@@ -315,7 +308,6 @@ class CheckboxNamespace(ComponentNamespace):
315308
id: The id for the component.
316309
ref: The Var to pass as the ref to the component.
317310
class_name: The class name for the component.
318-
autofocus: Whether the component should take the focus once the page is loaded
319311
custom_attrs: custom attribute
320312
**props: Additional properties to apply to the checkbox component.
321313

reflex_ui/components/base/collapsible.pyi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class CollapsibleBaseComponent(BaseUIComponent):
3535
id: Any | None = None,
3636
ref: Var | None = None,
3737
class_name: Any | None = None,
38-
autofocus: bool | None = None,
3938
custom_attrs: dict[str, Var | Any] | None = None,
4039
on_blur: EventType[()] | None = None,
4140
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -65,7 +64,6 @@ class CollapsibleBaseComponent(BaseUIComponent):
6564
id: The id for the component.
6665
ref: The Var to pass as the ref to the component.
6766
class_name: The class name for the component.
68-
autofocus: Whether the component should take the focus once the page is loaded
6967
custom_attrs: custom attribute
7068
**props: The props of the component.
7169
@@ -92,7 +90,6 @@ class CollapsibleRoot(CollapsibleBaseComponent):
9290
id: Any | None = None,
9391
ref: Var | None = None,
9492
class_name: Any | None = None,
95-
autofocus: bool | None = None,
9693
custom_attrs: dict[str, Var | Any] | None = None,
9794
on_blur: EventType[()] | None = None,
9895
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -132,7 +129,6 @@ class CollapsibleTrigger(CollapsibleBaseComponent):
132129
id: Any | None = None,
133130
ref: Var | None = None,
134131
class_name: Any | None = None,
135-
autofocus: bool | None = None,
136132
custom_attrs: dict[str, Var | Any] | None = None,
137133
on_blur: EventType[()] | None = None,
138134
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -172,7 +168,6 @@ class CollapsiblePanel(CollapsibleBaseComponent):
172168
id: Any | None = None,
173169
ref: Var | None = None,
174170
class_name: Any | None = None,
175-
autofocus: bool | None = None,
176171
custom_attrs: dict[str, Var | Any] | None = None,
177172
on_blur: EventType[()] | None = None,
178173
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -215,7 +210,6 @@ class HighLevelCollapsible(CollapsibleRoot):
215210
id: Any | None = None,
216211
ref: Var | None = None,
217212
class_name: Any | None = None,
218-
autofocus: bool | None = None,
219213
custom_attrs: dict[str, Var | Any] | None = None,
220214
on_blur: EventType[()] | None = None,
221215
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,
@@ -262,7 +256,6 @@ class Collapsible(ComponentNamespace):
262256
id: Any | None = None,
263257
ref: Var | None = None,
264258
class_name: Any | None = None,
265-
autofocus: bool | None = None,
266259
custom_attrs: dict[str, Var | Any] | None = None,
267260
on_blur: EventType[()] | None = None,
268261
on_click: EventType[()] | EventType[PointerEventInfo] | None = None,

0 commit comments

Comments
 (0)