@@ -128,7 +128,7 @@ class Link(pydantic.BaseModel, extra='forbid'):
128
128
components : '_t.List[AnyComponent]'
129
129
on_click : _t .Union [events .AnyEvent , None ] = pydantic .Field (default = None , serialization_alias = 'onClick' )
130
130
mode : _t .Union [_t .Literal ['navbar' , 'tabs' , 'vertical' , 'pagination' ], None ] = None
131
- active : _t .Union [bool , str , None ] = None
131
+ active : _t .Union [str , bool , None ] = None
132
132
locked : _t .Union [bool , None ] = None
133
133
class_name : _class_name .ClassName = None
134
134
type : _t .Literal ['Link' ] = 'Link'
@@ -154,7 +154,7 @@ class Modal(pydantic.BaseModel, extra='forbid'):
154
154
body : '_t.List[AnyComponent]'
155
155
footer : '_t.Union[_t.List[AnyComponent], None]' = None
156
156
open_trigger : _t .Union [events .PageEvent , None ] = pydantic .Field (default = None , serialization_alias = 'openTrigger' )
157
- open_context : _t .Union [events .EventContext , None ] = pydantic .Field (default = None , serialization_alias = 'openContext' )
157
+ open_context : _t .Union [events .ContextType , None ] = pydantic .Field (default = None , serialization_alias = 'openContext' )
158
158
class_name : _class_name .ClassName = None
159
159
type : _t .Literal ['Modal' ] = 'Modal'
160
160
@@ -174,9 +174,9 @@ class ServerLoad(pydantic.BaseModel, extra='forbid'):
174
174
class Image (pydantic .BaseModel , extra = 'forbid' ):
175
175
src : str
176
176
alt : _t .Union [str , None ] = None
177
- width : _t .Union [int , float , str , None ] = None
178
- height : _t .Union [int , float , str , None ] = None
179
- referrerpolicy : _t .Union [
177
+ width : _t .Union [str , int , None ] = None
178
+ height : _t .Union [str , int , None ] = None
179
+ referrer_policy : _t .Union [
180
180
_t .Literal [
181
181
'no-referrer' ,
182
182
'no-referrer-when-downgrade' ,
@@ -188,7 +188,7 @@ class Image(pydantic.BaseModel, extra='forbid'):
188
188
'unsafe-url' ,
189
189
],
190
190
None ,
191
- ] = None
191
+ ] = pydantic . Field ( None , serialization_alias = 'referrerPolicy' )
192
192
loading : _t .Union [_t .Literal ['eager' , 'lazy' ], None ] = None
193
193
on_click : _t .Union [events .AnyEvent , None ] = pydantic .Field (default = None , serialization_alias = 'onClick' )
194
194
class_name : _class_name .ClassName = None
@@ -200,37 +200,32 @@ class Iframe(pydantic.BaseModel, extra='forbid'):
200
200
title : _t .Union [str , None ] = None
201
201
width : _t .Union [str , int , None ] = None
202
202
height : _t .Union [str , int , None ] = None
203
+ class_name : _class_name .ClassName = None
203
204
type : _t .Literal ['Iframe' ] = 'Iframe'
204
205
205
206
206
- AnyComponent = _te .TypeAliasType (
207
- 'AnyComponent' ,
208
- _te .Annotated [
209
- _t .Union [
210
- Text ,
211
- Paragraph ,
212
- PageTitle ,
213
- Div ,
214
- Page ,
215
- Heading ,
216
- Markdown ,
217
- Code ,
218
- Button ,
219
- Link ,
220
- LinkList ,
221
- Navbar ,
222
- Modal ,
223
- ServerLoad ,
224
- Table ,
225
- Pagination ,
226
- Display ,
227
- Details ,
228
- Form ,
229
- ModelForm ,
230
- Image ,
231
- Iframe ,
232
- FormField ,
233
- ],
234
- pydantic .Field (discriminator = 'type' ),
235
- ],
236
- )
207
+ AnyComponent = _t .Union [
208
+ Text ,
209
+ Paragraph ,
210
+ PageTitle ,
211
+ Div ,
212
+ Page ,
213
+ Heading ,
214
+ Markdown ,
215
+ Code ,
216
+ Button ,
217
+ Link ,
218
+ LinkList ,
219
+ Navbar ,
220
+ Modal ,
221
+ ServerLoad ,
222
+ Table ,
223
+ Pagination ,
224
+ Display ,
225
+ Details ,
226
+ Form ,
227
+ ModelForm ,
228
+ Image ,
229
+ Iframe ,
230
+ FormField ,
231
+ ]
0 commit comments