@@ -138,7 +138,7 @@ class Heading(BaseModel, extra='forbid'):
138
138
level : _t .Literal [1 , 2 , 3 , 4 , 5 , 6 ] = 1
139
139
"""The level of the heading. 1 is the largest, 6 is the smallest."""
140
140
141
- html_id : _t .Union [str , None ] = _p . Field ( default = None )
141
+ html_id : _t .Union [str , None ] = None
142
142
"""Optional HTML ID to apply to the heading's HTML component."""
143
143
144
144
class_name : _class_name .ClassNameField = None
@@ -224,10 +224,10 @@ class Button(BaseModel, extra='forbid'):
224
224
text : str
225
225
"""The text to display on the button."""
226
226
227
- on_click : _t .Union [events .AnyEvent , None ] = _p . Field ( default = None )
227
+ on_click : _t .Union [events .AnyEvent , None ] = None
228
228
"""Optional event to trigger when the button is clicked."""
229
229
230
- html_type : _t .Union [_t .Literal ['button' , 'reset' , 'submit' ], None ] = _p . Field ( default = None )
230
+ html_type : _t .Union [_t .Literal ['button' , 'reset' , 'submit' ], None ] = None
231
231
"""Optional HTML type of the button. If None, defaults to 'button'."""
232
232
233
233
named_style : _class_name .NamedStyleField = None
@@ -246,7 +246,7 @@ class Link(BaseModel, extra='forbid'):
246
246
components : '_t.List[AnyComponent]'
247
247
"""List of components to render attached to the link."""
248
248
249
- on_click : _t .Union [events .AnyEvent , None ] = _p . Field ( default = None )
249
+ on_click : _t .Union [events .AnyEvent , None ] = None
250
250
"""Optional event to trigger when the link is clicked."""
251
251
252
252
mode : _t .Union [_t .Literal ['navbar' , 'footer' , 'tabs' , 'vertical' , 'pagination' ], None ] = None
@@ -287,13 +287,13 @@ class Navbar(BaseModel, extra='forbid'):
287
287
title : _t .Union [str , None ] = None
288
288
"""Optional title to display in the navbar."""
289
289
290
- title_event : _t .Union [events .AnyEvent , None ] = _p . Field ( default = None )
290
+ title_event : _t .Union [events .AnyEvent , None ] = None
291
291
"""Optional event to trigger when the title is clicked. Often used to navigate to the home page."""
292
292
293
- start_links : _t .List [Link ] = _p . Field ( default = [])
293
+ start_links : _t .List [Link ] = []
294
294
"""List of links to render at the start of the navbar."""
295
295
296
- end_links : _t .List [Link ] = _p . Field ( default = [])
296
+ end_links : _t .List [Link ] = []
297
297
"""List of links to render at the end of the navbar."""
298
298
299
299
class_name : _class_name .ClassNameField = None
@@ -318,7 +318,7 @@ class Footer(BaseModel, extra='forbid'):
318
318
links : _t .List [Link ]
319
319
"""List of links to render in the footer."""
320
320
321
- extra_text : _t .Union [str , None ] = _p . Field ( default = None )
321
+ extra_text : _t .Union [str , None ] = None
322
322
"""Optional extra text to display in the footer."""
323
323
324
324
class_name : _class_name .ClassNameField = None
@@ -340,10 +340,10 @@ class Modal(BaseModel, extra='forbid'):
340
340
footer : '_t.Union[_t.List[AnyComponent], None]' = None
341
341
"""Optional list of components to render in the modal footer."""
342
342
343
- open_trigger : _t .Union [events .PageEvent , None ] = _p . Field ( default = None )
343
+ open_trigger : _t .Union [events .PageEvent , None ] = None
344
344
"""Optional event to trigger when the modal is opened."""
345
345
346
- open_context : _t .Union [events .ContextType , None ] = _p . Field ( default = None )
346
+ open_context : _t .Union [events .ContextType , None ] = None
347
347
"""Optional context to pass to the open trigger event."""
348
348
349
349
class_name : _class_name .ClassNameField = None
@@ -359,7 +359,7 @@ class ServerLoad(BaseModel, extra='forbid'):
359
359
path : str
360
360
"""The URL to load the component from."""
361
361
362
- load_trigger : _t .Union [events .PageEvent , None ] = _p . Field ( default = None )
362
+ load_trigger : _t .Union [events .PageEvent , None ] = None
363
363
"""Optional event to trigger when the component is loaded."""
364
364
365
365
components : '_t.Union[_t.List[AnyComponent], None]' = None
@@ -368,7 +368,7 @@ class ServerLoad(BaseModel, extra='forbid'):
368
368
sse : _t .Union [bool , None ] = None
369
369
"""Optional flag to enable server-sent events (SSE) for the server load."""
370
370
371
- sse_retry : _t .Union [int , None ] = _p . Field ( default = None )
371
+ sse_retry : _t .Union [int , None ] = None
372
372
"""Optional time in milliseconds to retry the SSE connection."""
373
373
374
374
method : _t .Union [_t .Literal ['GET' , 'POST' , 'PATCH' , 'PUT' , 'DELETE' ], None ] = None
@@ -405,15 +405,15 @@ class Image(BaseModel, extra='forbid'):
405
405
'unsafe-url' ,
406
406
],
407
407
None ,
408
- ] = _p . Field ( None )
408
+ ] = None
409
409
"""Optional referrer policy for the image. Specifies what information to send when fetching the image.
410
410
411
411
For more info, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy."""
412
412
413
413
loading : _t .Union [_t .Literal ['eager' , 'lazy' ], None ] = None
414
414
"""Optional loading strategy for the image."""
415
415
416
- on_click : _t .Union [events .AnyEvent , None ] = _p . Field ( default = None )
416
+ on_click : _t .Union [events .AnyEvent , None ] = None
417
417
"""Optional event to trigger when the image is clicked."""
418
418
419
419
class_name : _class_name .ClassNameField = None
@@ -507,7 +507,7 @@ class Error(BaseModel, extra='forbid'):
507
507
description : str
508
508
"""The description of the error."""
509
509
510
- status_code : _t .Union [int , None ] = _p . Field ( None )
510
+ status_code : _t .Union [int , None ] = None
511
511
"""Optional status code of the error."""
512
512
513
513
class_name : _class_name .ClassNameField = None
@@ -565,10 +565,10 @@ class Toast(BaseModel, extra='forbid'):
565
565
] = None
566
566
"""Optional position of the toast."""
567
567
568
- open_trigger : _t .Union [events .PageEvent , None ] = _p . Field ( default = None )
568
+ open_trigger : _t .Union [events .PageEvent , None ] = None
569
569
"""Optional event to trigger when the toast is opened."""
570
570
571
- open_context : _t .Union [events .ContextType , None ] = _p . Field ( default = None )
571
+ open_context : _t .Union [events .ContextType , None ] = None
572
572
"""Optional context to pass to the open trigger event."""
573
573
574
574
class_name : _class_name .ClassNameField = None
0 commit comments