reflex 0.8.15a1__py3-none-any.whl → 0.8.16a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of reflex might be problematic. Click here for more details.

Files changed (139) hide show
  1. reflex/.templates/web/utils/state.js +68 -8
  2. reflex/app.py +45 -51
  3. reflex/app_mixins/lifespan.py +12 -5
  4. reflex/base.py +1 -0
  5. reflex/compiler/compiler.py +4 -6
  6. reflex/compiler/templates.py +25 -31
  7. reflex/compiler/utils.py +6 -5
  8. reflex/components/base/body.pyi +1 -195
  9. reflex/components/base/link.pyi +1 -407
  10. reflex/components/base/meta.pyi +1 -405
  11. reflex/components/base/script.pyi +1 -237
  12. reflex/components/component.py +41 -46
  13. reflex/components/core/auto_scroll.pyi +1 -195
  14. reflex/components/core/banner.pyi +1 -391
  15. reflex/components/core/breakpoints.py +14 -18
  16. reflex/components/core/html.pyi +1 -197
  17. reflex/components/core/match.py +2 -2
  18. reflex/components/core/sticky.py +11 -15
  19. reflex/components/core/sticky.pyi +0 -788
  20. reflex/components/core/upload.py +1 -3
  21. reflex/components/datadisplay/code.pyi +1 -0
  22. reflex/components/datadisplay/dataeditor.py +4 -6
  23. reflex/components/datadisplay/shiki_code_block.py +106 -110
  24. reflex/components/dynamic.py +4 -6
  25. reflex/components/el/elements/__init__.py +5 -7
  26. reflex/components/el/elements/__init__.pyi +5 -7
  27. reflex/components/el/elements/base.py +1 -1
  28. reflex/components/el/elements/base.pyi +1 -195
  29. reflex/components/el/elements/forms.py +7 -9
  30. reflex/components/el/elements/forms.pyi +12 -3112
  31. reflex/components/el/elements/inline.pyi +0 -5481
  32. reflex/components/el/elements/media.pyi +0 -10280
  33. reflex/components/el/elements/metadata.pyi +1 -835
  34. reflex/components/el/elements/other.pyi +1 -1365
  35. reflex/components/el/elements/scripts.pyi +1 -625
  36. reflex/components/el/elements/sectioning.pyi +1 -2911
  37. reflex/components/el/elements/tables.pyi +1 -1973
  38. reflex/components/el/elements/typography.pyi +1 -3125
  39. reflex/components/lucide/icon.py +4 -4
  40. reflex/components/lucide/icon.pyi +0 -4
  41. reflex/components/markdown/markdown.py +15 -19
  42. reflex/components/markdown/markdown.pyi +1 -0
  43. reflex/components/moment/moment.pyi +0 -49
  44. reflex/components/props.py +3 -3
  45. reflex/components/radix/primitives/accordion.py +4 -6
  46. reflex/components/radix/primitives/accordion.pyi +0 -14
  47. reflex/components/radix/primitives/base.pyi +0 -5
  48. reflex/components/radix/primitives/dialog.py +2 -0
  49. reflex/components/radix/primitives/dialog.pyi +1 -233
  50. reflex/components/radix/primitives/drawer.pyi +0 -18
  51. reflex/components/radix/primitives/form.pyi +30 -632
  52. reflex/components/radix/primitives/progress.pyi +0 -10
  53. reflex/components/radix/primitives/slider.pyi +0 -10
  54. reflex/components/radix/themes/color_mode.pyi +1 -284
  55. reflex/components/radix/themes/components/alert_dialog.pyi +0 -207
  56. reflex/components/radix/themes/components/aspect_ratio.pyi +0 -2
  57. reflex/components/radix/themes/components/avatar.pyi +0 -80
  58. reflex/components/radix/themes/components/badge.pyi +1 -270
  59. reflex/components/radix/themes/components/button.pyi +1 -274
  60. reflex/components/radix/themes/components/callout.pyi +0 -1197
  61. reflex/components/radix/themes/components/card.pyi +1 -209
  62. reflex/components/radix/themes/components/checkbox.pyi +0 -261
  63. reflex/components/radix/themes/components/checkbox_cards.pyi +1 -96
  64. reflex/components/radix/themes/components/checkbox_group.pyi +1 -80
  65. reflex/components/radix/themes/components/context_menu.pyi +13 -321
  66. reflex/components/radix/themes/components/data_list.pyi +1 -107
  67. reflex/components/radix/themes/components/dialog.pyi +1 -210
  68. reflex/components/radix/themes/components/dropdown_menu.pyi +0 -209
  69. reflex/components/radix/themes/components/hover_card.pyi +1 -246
  70. reflex/components/radix/themes/components/icon_button.pyi +1 -195
  71. reflex/components/radix/themes/components/inset.pyi +0 -252
  72. reflex/components/radix/themes/components/popover.pyi +1 -234
  73. reflex/components/radix/themes/components/progress.pyi +1 -84
  74. reflex/components/radix/themes/components/radio.pyi +1 -72
  75. reflex/components/radix/themes/components/radio_cards.pyi +1 -123
  76. reflex/components/radix/themes/components/scroll_area.pyi +1 -11
  77. reflex/components/radix/themes/components/select.pyi +1 -376
  78. reflex/components/radix/themes/components/separator.pyi +0 -77
  79. reflex/components/radix/themes/components/skeleton.pyi +0 -30
  80. reflex/components/radix/themes/components/slider.py +3 -5
  81. reflex/components/radix/themes/components/spinner.pyi +0 -5
  82. reflex/components/radix/themes/components/switch.pyi +0 -89
  83. reflex/components/radix/themes/components/table.pyi +0 -1453
  84. reflex/components/radix/themes/components/text_area.pyi +7 -282
  85. reflex/components/radix/themes/components/text_field.pyi +6 -392
  86. reflex/components/radix/themes/components/tooltip.pyi +0 -42
  87. reflex/components/radix/themes/layout/box.pyi +1 -195
  88. reflex/components/radix/themes/layout/center.pyi +0 -194
  89. reflex/components/radix/themes/layout/container.pyi +0 -178
  90. reflex/components/radix/themes/layout/flex.pyi +0 -194
  91. reflex/components/radix/themes/layout/grid.pyi +0 -194
  92. reflex/components/radix/themes/layout/list.pyi +0 -978
  93. reflex/components/radix/themes/layout/section.pyi +0 -194
  94. reflex/components/radix/themes/layout/spacer.pyi +0 -194
  95. reflex/components/radix/themes/layout/stack.pyi +0 -582
  96. reflex/components/radix/themes/typography/blockquote.pyi +0 -196
  97. reflex/components/radix/themes/typography/code.pyi +0 -194
  98. reflex/components/radix/themes/typography/heading.pyi +0 -194
  99. reflex/components/radix/themes/typography/link.pyi +0 -237
  100. reflex/components/radix/themes/typography/text.pyi +0 -1360
  101. reflex/components/react_router/dom.pyi +0 -237
  102. reflex/components/recharts/cartesian.py +12 -18
  103. reflex/components/recharts/general.py +12 -18
  104. reflex/constants/installer.py +5 -5
  105. reflex/custom_components/custom_components.py +6 -5
  106. reflex/environment.py +30 -7
  107. reflex/event.py +14 -12
  108. reflex/experimental/client_state.py +11 -12
  109. reflex/istate/data.py +8 -10
  110. reflex/istate/manager/__init__.py +3 -0
  111. reflex/istate/manager/disk.py +151 -5
  112. reflex/model.py +1 -1
  113. reflex/plugins/_screenshot.py +2 -2
  114. reflex/plugins/shared_tailwind.py +9 -14
  115. reflex/reflex.py +7 -9
  116. reflex/state.py +30 -37
  117. reflex/style.py +6 -6
  118. reflex/testing.py +54 -30
  119. reflex/utils/codespaces.py +31 -2
  120. reflex/utils/compat.py +1 -0
  121. reflex/utils/decorator.py +3 -3
  122. reflex/utils/format.py +18 -22
  123. reflex/utils/prerequisites.py +1 -1
  124. reflex/utils/pyi_generator.py +51 -57
  125. reflex/utils/serializers.py +1 -1
  126. reflex/utils/telemetry.py +1 -1
  127. reflex/utils/templates.py +4 -4
  128. reflex/utils/types.py +11 -4
  129. reflex/vars/base.py +26 -29
  130. reflex/vars/color.py +6 -8
  131. reflex/vars/dep_tracking.py +5 -3
  132. reflex/vars/function.py +3 -3
  133. reflex/vars/object.py +9 -13
  134. reflex/vars/sequence.py +18 -24
  135. {reflex-0.8.15a1.dist-info → reflex-0.8.16a1.dist-info}/METADATA +1 -1
  136. {reflex-0.8.15a1.dist-info → reflex-0.8.16a1.dist-info}/RECORD +139 -139
  137. {reflex-0.8.15a1.dist-info → reflex-0.8.16a1.dist-info}/WHEEL +0 -0
  138. {reflex-0.8.15a1.dist-info → reflex-0.8.16a1.dist-info}/entry_points.txt +0 -0
  139. {reflex-0.8.15a1.dist-info → reflex-0.8.16a1.dist-info}/licenses/LICENSE +0 -0
@@ -96,13 +96,13 @@ class DynamicIcon(LucideIconComponent):
96
96
  size: Var[int]
97
97
 
98
98
  def _get_imports(self):
99
- _imports = super()._get_imports()
99
+ imports_ = super()._get_imports()
100
100
  if self.library:
101
- _imports.pop(self.library)
102
- _imports[LUCIDE_LIBRARY] = [
101
+ imports_.pop(self.library)
102
+ imports_[LUCIDE_LIBRARY] = [
103
103
  ImportVar("DynamicIcon", package_path="/dynamic.mjs")
104
104
  ]
105
- return _imports
105
+ return imports_
106
106
 
107
107
 
108
108
  LUCIDE_ICON_LIST = [
@@ -67,7 +67,6 @@ class Icon(LucideIconComponent):
67
67
  def create(
68
68
  cls,
69
69
  *children,
70
- size: Var[int] | int | None = None,
71
70
  style: Sequence[Mapping[str, Any]]
72
71
  | Mapping[str, Any]
73
72
  | Var[Mapping[str, Any]]
@@ -102,7 +101,6 @@ class Icon(LucideIconComponent):
102
101
 
103
102
  Args:
104
103
  *children: The positional arguments
105
- size: The size of the icon in pixels.
106
104
  style: The style of the component.
107
105
  key: A unique key for the component.
108
106
  id: The id for the component.
@@ -124,8 +122,6 @@ class DynamicIcon(LucideIconComponent):
124
122
  def create(
125
123
  cls,
126
124
  *children,
127
- name: Var[str] | str | None = None,
128
- size: Var[int] | int | None = None,
129
125
  style: Sequence[Mapping[str, Any]]
130
126
  | Mapping[str, Any]
131
127
  | Var[Mapping[str, Any]]
@@ -335,13 +335,11 @@ class Markdown(Component):
335
335
  self._get_map_fn_custom_code_from_children(self.get_component("code"))
336
336
  )
337
337
 
338
- var_data = VarData.merge(
339
- *[
340
- code._get_all_var_data()
341
- for code in custom_code_list
342
- if isinstance(code, Var)
343
- ]
344
- )
338
+ var_data = VarData.merge(*[
339
+ code._get_all_var_data()
340
+ for code in custom_code_list
341
+ if isinstance(code, Var)
342
+ ])
345
343
 
346
344
  codeblock_custom_code = "\n".join(map(str, custom_code_list))
347
345
 
@@ -477,18 +475,16 @@ let {_LANGUAGE!s} = match ? match[1] : '';
477
475
 
478
476
  @staticmethod
479
477
  def _component_map_hash(component_map: dict) -> str:
480
- inp = str(
481
- {
482
- tag: (
483
- f"{component.__module__}.{component.__qualname__}"
484
- if (
485
- "<" not in component.__name__
486
- ) # simple way to check against lambdas
487
- else component(_MOCK_ARG)
488
- )
489
- for tag, component in component_map.items()
490
- }
491
- ).encode()
478
+ inp = str({
479
+ tag: (
480
+ f"{component.__module__}.{component.__qualname__}"
481
+ if (
482
+ "<" not in component.__name__
483
+ ) # simple way to check against lambdas
484
+ else component(_MOCK_ARG)
485
+ )
486
+ for tag, component in component_map.items()
487
+ }).encode()
492
488
  return md5(inp).hexdigest()
493
489
 
494
490
  def _get_component_map_name(self) -> str:
@@ -30,6 +30,7 @@ NO_PROPS_TAGS = ("ul", "ol", "li")
30
30
 
31
31
  @lru_cache
32
32
  def get_base_component_map() -> dict[str, Callable]: ...
33
+
33
34
  @dataclasses.dataclass()
34
35
  class MarkdownComponentMap:
35
36
  @classmethod
@@ -5,7 +5,6 @@
5
5
  # ------------------------------------------------------
6
6
  import dataclasses
7
7
  from collections.abc import Mapping, Sequence
8
- from datetime import date, datetime, time, timedelta
9
8
  from typing import Any
10
9
 
11
10
  from reflex.components.component import NoSSRComponent
@@ -32,33 +31,6 @@ class Moment(NoSSRComponent):
32
31
  def create(
33
32
  cls,
34
33
  *children,
35
- interval: Var[int] | int | None = None,
36
- format: Var[str] | str | None = None,
37
- trim: Var[bool] | bool | None = None,
38
- parse: Var[str] | str | None = None,
39
- add: MomentDelta | Var[MomentDelta] | None = None,
40
- subtract: MomentDelta | Var[MomentDelta] | None = None,
41
- from_now: Var[bool] | bool | None = None,
42
- from_now_during: Var[int] | int | None = None,
43
- to_now: Var[bool] | bool | None = None,
44
- with_title: Var[bool] | bool | None = None,
45
- title_format: Var[str] | str | None = None,
46
- diff: Var[str] | str | None = None,
47
- decimal: Var[bool] | bool | None = None,
48
- unit: Var[str] | str | None = None,
49
- duration: Var[str] | str | None = None,
50
- date: Var[date | datetime | str | time | timedelta]
51
- | date
52
- | datetime
53
- | str
54
- | time
55
- | timedelta
56
- | None = None,
57
- duration_from_now: Var[bool] | bool | None = None,
58
- unix: Var[bool] | bool | None = None,
59
- local: Var[bool] | bool | None = None,
60
- tz: Var[str] | str | None = None,
61
- locale: Var[str] | str | None = None,
62
34
  style: Sequence[Mapping[str, Any]]
63
35
  | Mapping[str, Any]
64
36
  | Var[Mapping[str, Any]]
@@ -92,27 +64,6 @@ class Moment(NoSSRComponent):
92
64
 
93
65
  Args:
94
66
  *children: The children of the component.
95
- interval: How often the date update (how often time update / 0 to disable).
96
- format: Formats the date according to the given format string.
97
- trim: When formatting duration time, the largest-magnitude tokens are automatically trimmed when they have no value.
98
- parse: Use the parse attribute to tell moment how to parse the given date when non-standard.
99
- add: Add a delta to the base date (keys are "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds")
100
- subtract: Subtract a delta to the base date (keys are "years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds")
101
- from_now: Displays the date as the time from now, e.g. "5 minutes ago".
102
- from_now_during: Setting fromNowDuring will display the relative time as with fromNow but just during its value in milliseconds, after that format will be used instead.
103
- to_now: Similar to fromNow, but gives the opposite interval.
104
- with_title: Adds a title attribute to the element with the complete date.
105
- title_format: How the title date is formatted when using the withTitle attribute.
106
- diff: Show the different between this date and the rendered child.
107
- decimal: Display the diff as decimal.
108
- unit: Display the diff in given unit.
109
- duration: Shows the duration (elapsed time) between two dates. duration property should be behind date property time-wise.
110
- date: The date to display (also work if passed as children).
111
- duration_from_now: Shows the duration (elapsed time) between now and the provided datetime.
112
- unix: Tells Moment to parse the given date value as a unix timestamp.
113
- local: Outputs the result in local time.
114
- tz: Display the date in the given timezone.
115
- locale: The locale to use when rendering.
116
67
  on_change: Fires when the date changes.
117
68
  style: The style of the component.
118
69
  key: A unique key for the component.
@@ -301,9 +301,9 @@ class PropsBase(metaclass=PropsBaseMeta):
301
301
  Returns:
302
302
  The object as a Javascript Object literal.
303
303
  """
304
- return LiteralObjectVar.create(
305
- {format.to_camel_case(key): value for key, value in self.dict().items()}
306
- ).json()
304
+ return LiteralObjectVar.create({
305
+ format.to_camel_case(key): value for key, value in self.dict().items()
306
+ }).json()
307
307
 
308
308
  def dict(
309
309
  self,
@@ -43,12 +43,10 @@ def _inherited_variant_selector(
43
43
  selectors = ("&",)
44
44
  # Prefer the `data-variant` that is set directly on the selector,
45
45
  # but also inherit the `data-variant` from any parent element.
46
- return ", ".join(
47
- [
48
- f"{selector}[data-variant='{variant}'], *:where([data-variant='{variant}']) {selector}"
49
- for selector in selectors
50
- ]
51
- )
46
+ return ", ".join([
47
+ f"{selector}[data-variant='{variant}'], *:where([data-variant='{variant}']) {selector}"
48
+ for selector in selectors
49
+ ])
52
50
 
53
51
 
54
52
  class AccordionComponent(RadixPrimitiveComponent):
@@ -88,7 +88,6 @@ class AccordionComponent(RadixPrimitiveComponent):
88
88
  variant: Literal["classic", "ghost", "outline", "soft", "surface"]
89
89
  | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
90
90
  | None = None,
91
- as_child: Var[bool] | bool | None = None,
92
91
  style: Sequence[Mapping[str, Any]]
93
92
  | Mapping[str, Any]
94
93
  | Var[Mapping[str, Any]]
@@ -123,7 +122,6 @@ class AccordionComponent(RadixPrimitiveComponent):
123
122
  *children: The children of the component.
124
123
  color_scheme: The color scheme of the component.
125
124
  variant: The variant of the component.
126
- as_child: Change the default rendered element for the one passed as a child.
127
125
  style: The style of the component.
128
126
  key: A unique key for the component.
129
127
  id: The id for the component.
@@ -223,7 +221,6 @@ class AccordionRoot(AccordionComponent):
223
221
  variant: Literal["classic", "ghost", "outline", "soft", "surface"]
224
222
  | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
225
223
  | None = None,
226
- as_child: Var[bool] | bool | None = None,
227
224
  style: Sequence[Mapping[str, Any]]
228
225
  | Mapping[str, Any]
229
226
  | Var[Mapping[str, Any]]
@@ -271,7 +268,6 @@ class AccordionRoot(AccordionComponent):
271
268
  on_value_change: Fired when the opened the accordions changes.
272
269
  color_scheme: The color scheme of the component.
273
270
  variant: The variant of the component.
274
- as_child: Change the default rendered element for the one passed as a child.
275
271
  style: The style of the component.
276
272
  key: A unique key for the component.
277
273
  id: The id for the component.
@@ -355,7 +351,6 @@ class AccordionItem(AccordionComponent):
355
351
  variant: Literal["classic", "ghost", "outline", "soft", "surface"]
356
352
  | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
357
353
  | None = None,
358
- as_child: Var[bool] | bool | None = None,
359
354
  style: Sequence[Mapping[str, Any]]
360
355
  | Mapping[str, Any]
361
356
  | Var[Mapping[str, Any]]
@@ -394,7 +389,6 @@ class AccordionItem(AccordionComponent):
394
389
  content: The content of the accordion item.
395
390
  color_scheme: The color scheme of the component.
396
391
  variant: The variant of the component.
397
- as_child: Change the default rendered element for the one passed as a child.
398
392
  style: The style of the component.
399
393
  key: A unique key for the component.
400
394
  id: The id for the component.
@@ -476,7 +470,6 @@ class AccordionHeader(AccordionComponent):
476
470
  variant: Literal["classic", "ghost", "outline", "soft", "surface"]
477
471
  | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
478
472
  | None = None,
479
- as_child: Var[bool] | bool | None = None,
480
473
  style: Sequence[Mapping[str, Any]]
481
474
  | Mapping[str, Any]
482
475
  | Var[Mapping[str, Any]]
@@ -511,7 +504,6 @@ class AccordionHeader(AccordionComponent):
511
504
  *children: The children of the component.
512
505
  color_scheme: The color scheme of the component.
513
506
  variant: The variant of the component.
514
- as_child: Change the default rendered element for the one passed as a child.
515
507
  style: The style of the component.
516
508
  key: A unique key for the component.
517
509
  id: The id for the component.
@@ -593,7 +585,6 @@ class AccordionTrigger(AccordionComponent):
593
585
  variant: Literal["classic", "ghost", "outline", "soft", "surface"]
594
586
  | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
595
587
  | None = None,
596
- as_child: Var[bool] | bool | None = None,
597
588
  style: Sequence[Mapping[str, Any]]
598
589
  | Mapping[str, Any]
599
590
  | Var[Mapping[str, Any]]
@@ -628,7 +619,6 @@ class AccordionTrigger(AccordionComponent):
628
619
  *children: The children of the component.
629
620
  color_scheme: The color scheme of the component.
630
621
  variant: The variant of the component.
631
- as_child: Change the default rendered element for the one passed as a child.
632
622
  style: The style of the component.
633
623
  key: A unique key for the component.
634
624
  id: The id for the component.
@@ -648,7 +638,6 @@ class AccordionIcon(Icon):
648
638
  def create(
649
639
  cls,
650
640
  *children,
651
- size: Var[int] | int | None = None,
652
641
  style: Sequence[Mapping[str, Any]]
653
642
  | Mapping[str, Any]
654
643
  | Var[Mapping[str, Any]]
@@ -681,7 +670,6 @@ class AccordionIcon(Icon):
681
670
 
682
671
  Args:
683
672
  *children: The children of the component.
684
- size: The size of the icon in pixels.
685
673
  style: The style of the component.
686
674
  key: A unique key for the component.
687
675
  id: The id for the component.
@@ -769,7 +757,6 @@ class AccordionContent(AccordionComponent):
769
757
  variant: Literal["classic", "ghost", "outline", "soft", "surface"]
770
758
  | Var[Literal["classic", "ghost", "outline", "soft", "surface"]]
771
759
  | None = None,
772
- as_child: Var[bool] | bool | None = None,
773
760
  style: Sequence[Mapping[str, Any]]
774
761
  | Mapping[str, Any]
775
762
  | Var[Mapping[str, Any]]
@@ -804,7 +791,6 @@ class AccordionContent(AccordionComponent):
804
791
  *children: The children of the component.
805
792
  color_scheme: The color scheme of the component.
806
793
  variant: The variant of the component.
807
- as_child: Change the default rendered element for the one passed as a child.
808
794
  style: The style of the component.
809
795
  key: A unique key for the component.
810
796
  id: The id for the component.
@@ -16,7 +16,6 @@ class RadixPrimitiveComponent(Component):
16
16
  def create(
17
17
  cls,
18
18
  *children,
19
- as_child: Var[bool] | bool | None = None,
20
19
  style: Sequence[Mapping[str, Any]]
21
20
  | Mapping[str, Any]
22
21
  | Var[Mapping[str, Any]]
@@ -49,7 +48,6 @@ class RadixPrimitiveComponent(Component):
49
48
 
50
49
  Args:
51
50
  *children: The children of the component.
52
- as_child: Change the default rendered element for the one passed as a child.
53
51
  style: The style of the component.
54
52
  key: A unique key for the component.
55
53
  id: The id for the component.
@@ -67,7 +65,6 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
67
65
  def create(
68
66
  cls,
69
67
  *children,
70
- as_child: Var[bool] | bool | None = None,
71
68
  style: Sequence[Mapping[str, Any]]
72
69
  | Mapping[str, Any]
73
70
  | Var[Mapping[str, Any]]
@@ -100,7 +97,6 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
100
97
 
101
98
  Args:
102
99
  *children: The children of the component.
103
- as_child: Change the default rendered element for the one passed as a child.
104
100
  style: The style of the component.
105
101
  key: A unique key for the component.
106
102
  id: The id for the component.
@@ -118,7 +114,6 @@ class RadixPrimitiveTriggerComponent(RadixPrimitiveComponent):
118
114
  def create(
119
115
  cls,
120
116
  *children,
121
- as_child: Var[bool] | bool | None = None,
122
117
  style: Sequence[Mapping[str, Any]]
123
118
  | Mapping[str, Any]
124
119
  | Var[Mapping[str, Any]]
@@ -73,6 +73,8 @@ class DialogTrigger(DialogElement, RadixPrimitiveTriggerComponent):
73
73
 
74
74
  _memoization_mode = MemoizationMode(recursive=False)
75
75
 
76
+ _valid_parents = ["DialogRoot"]
77
+
76
78
 
77
79
  class DialogContent(elements.Div, DialogElement):
78
80
  """Content component to display inside a Dialog modal."""