@expo/ui 55.0.2 → 55.0.3

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.
Files changed (193) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
  4. package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
  5. package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
  6. package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
  7. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +258 -70
  8. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +204 -57
  9. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +44 -1
  10. package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
  11. package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
  12. package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
  13. package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
  14. package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
  15. package/android/src/main/java/expo/modules/ui/SwitchView.kt +53 -161
  16. package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
  17. package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
  18. package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
  19. package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -86
  20. package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
  21. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
  22. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
  23. package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
  24. package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
  25. package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
  26. package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
  27. package/build/jetpack-compose/Button/index.d.ts +65 -51
  28. package/build/jetpack-compose/Button/index.d.ts.map +1 -1
  29. package/build/jetpack-compose/Card/index.d.ts +72 -14
  30. package/build/jetpack-compose/Card/index.d.ts.map +1 -1
  31. package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
  32. package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
  33. package/build/jetpack-compose/Chip/index.d.ts +247 -27
  34. package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
  35. package/build/jetpack-compose/DatePicker/index.d.ts +38 -3
  36. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  37. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
  38. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
  39. package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
  40. package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
  41. package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
  42. package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
  43. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
  44. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
  45. package/build/jetpack-compose/IconButton/index.d.ts +45 -29
  46. package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
  47. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
  48. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
  49. package/build/jetpack-compose/Progress/index.d.ts +78 -35
  50. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  51. package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
  52. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  53. package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
  54. package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
  55. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
  56. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
  57. package/build/jetpack-compose/Slider/index.d.ts +34 -10
  58. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  59. package/build/jetpack-compose/Switch/index.d.ts +10 -50
  60. package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
  61. package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
  62. package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
  63. package/build/jetpack-compose/index.d.ts +5 -4
  64. package/build/jetpack-compose/index.d.ts.map +1 -1
  65. package/build/jetpack-compose/modifiers/index.d.ts +18 -1
  66. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  67. package/build/swift-ui/ProgressView/index.d.ts +1 -5
  68. package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
  69. package/build/swift-ui/Stepper/index.d.ts +3 -3
  70. package/build/swift-ui/Stepper/index.d.ts.map +1 -1
  71. package/build/swift-ui/Text/index.d.ts +33 -1
  72. package/build/swift-ui/Text/index.d.ts.map +1 -1
  73. package/build/swift-ui/modifiers/index.d.ts +22 -1
  74. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  75. package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
  76. package/build/swift-ui/types.d.ts +7 -0
  77. package/build/swift-ui/types.d.ts.map +1 -1
  78. package/expo-module.config.json +1 -1
  79. package/ios/BottomSheetView.swift +1 -6
  80. package/ios/ClosedRangeDateRecord.swift +10 -0
  81. package/ios/ColorPickerView.swift +9 -8
  82. package/ios/ConfirmationDialog/ConfirmationDialog.swift +4 -6
  83. package/ios/DatePickerView.swift +7 -5
  84. package/ios/DisclosureGroupView.swift +5 -7
  85. package/ios/ListView.swift +6 -14
  86. package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
  87. package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
  88. package/ios/Modifiers/ViewModifierRegistry.swift +8 -0
  89. package/ios/Picker/PickerView.swift +6 -10
  90. package/ios/Popover/PopoverView.swift +3 -5
  91. package/ios/ProgressView.swift +0 -5
  92. package/ios/SectionView.swift +3 -5
  93. package/ios/SliderView.swift +8 -6
  94. package/ios/StepperView.swift +12 -16
  95. package/ios/TextView.swift +37 -1
  96. package/ios/Toggle/ToggleView.swift +5 -7
  97. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar +0 -0
  98. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.md5 +1 -0
  99. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha1 +1 -0
  100. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha256 +1 -0
  101. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha512 +1 -0
  102. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar +0 -0
  103. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.md5 +1 -0
  104. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha1 +1 -0
  105. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha256 +1 -0
  106. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha512 +1 -0
  107. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.module → 55.0.3/expo.modules.ui-55.0.3.module} +22 -22
  108. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5 +1 -0
  109. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1 +1 -0
  110. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256 +1 -0
  111. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512 +1 -0
  112. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.2/expo.modules.ui-55.0.2.pom → 55.0.3/expo.modules.ui-55.0.3.pom} +1 -1
  113. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5 +1 -0
  114. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1 +1 -0
  115. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256 +1 -0
  116. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha512 +1 -0
  117. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  118. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  119. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  120. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  121. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  122. package/package.json +5 -2
  123. package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
  124. package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
  125. package/src/jetpack-compose/Button/index.tsx +69 -92
  126. package/src/jetpack-compose/Card/index.tsx +105 -29
  127. package/src/jetpack-compose/Checkbox/index.tsx +126 -0
  128. package/src/jetpack-compose/Chip/index.tsx +391 -51
  129. package/src/jetpack-compose/DatePicker/index.tsx +112 -7
  130. package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
  131. package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
  132. package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
  133. package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
  134. package/src/jetpack-compose/IconButton/index.tsx +49 -56
  135. package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
  136. package/src/jetpack-compose/Progress/index.tsx +120 -62
  137. package/src/jetpack-compose/RadioButton/index.tsx +8 -9
  138. package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
  139. package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
  140. package/src/jetpack-compose/Slider/index.tsx +76 -29
  141. package/src/jetpack-compose/Switch/index.tsx +17 -87
  142. package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
  143. package/src/jetpack-compose/index.ts +5 -4
  144. package/src/jetpack-compose/modifiers/index.ts +26 -2
  145. package/src/swift-ui/ProgressView/index.tsx +1 -3
  146. package/src/swift-ui/Stepper/index.tsx +7 -7
  147. package/src/swift-ui/Text/index.tsx +66 -2
  148. package/src/swift-ui/modifiers/index.ts +40 -0
  149. package/src/swift-ui/types.ts +5 -0
  150. package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
  151. package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
  152. package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
  153. package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
  154. package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
  155. package/build/jetpack-compose/Button/types.d.ts +0 -5
  156. package/build/jetpack-compose/Button/types.d.ts.map +0 -1
  157. package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
  158. package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
  159. package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
  160. package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
  161. package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
  162. package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
  163. package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
  164. package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
  165. package/build/jetpack-compose/Picker/index.d.ts +0 -62
  166. package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
  167. package/build/jetpack-compose/TextButton/index.d.ts +0 -29
  168. package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
  169. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar +0 -0
  170. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.md5 +0 -1
  171. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha1 +0 -1
  172. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha256 +0 -1
  173. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2-sources.jar.sha512 +0 -1
  174. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar +0 -0
  175. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.md5 +0 -1
  176. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha1 +0 -1
  177. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha256 +0 -1
  178. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.aar.sha512 +0 -1
  179. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.md5 +0 -1
  180. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha1 +0 -1
  181. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha256 +0 -1
  182. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.module.sha512 +0 -1
  183. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.md5 +0 -1
  184. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha1 +0 -1
  185. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha256 +0 -1
  186. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.2/expo.modules.ui-55.0.2.pom.sha512 +0 -1
  187. package/src/jetpack-compose/Button/types.ts +0 -57
  188. package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
  189. package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
  190. package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
  191. package/src/jetpack-compose/FilterChip/index.tsx +0 -89
  192. package/src/jetpack-compose/Picker/index.tsx +0 -90
  193. package/src/jetpack-compose/TextButton/index.tsx +0 -55
@@ -0,0 +1,70 @@
1
+ package expo.modules.ui.menu
2
+
3
+ import android.graphics.Color
4
+ import androidx.compose.material3.DropdownMenuItem
5
+ import androidx.compose.material3.MenuDefaults
6
+ import androidx.compose.material3.Text
7
+ import androidx.compose.runtime.Composable
8
+ import expo.modules.kotlin.records.Field
9
+ import expo.modules.kotlin.records.Record
10
+ import expo.modules.kotlin.views.ComposableScope
11
+ import expo.modules.kotlin.views.ComposeProps
12
+ import expo.modules.kotlin.views.FunctionalComposableScope
13
+ import expo.modules.ui.ModifierList
14
+ import expo.modules.ui.ModifierRegistry
15
+ import expo.modules.ui.composeOrNull
16
+ import expo.modules.ui.findChildSlotView
17
+ import java.io.Serializable
18
+
19
+ class ItemPressedEvent : Record, Serializable
20
+
21
+ class DropdownMenuItemColors : Record {
22
+ @Field val textColor: Color? = null
23
+ @Field val leadingIconColor: Color? = null
24
+ @Field val trailingIconColor: Color? = null
25
+ @Field val disabledTextColor: Color? = null
26
+ @Field val disabledLeadingIconColor: Color? = null
27
+ @Field val disabledTrailingIconColor: Color? = null
28
+ }
29
+
30
+ data class DropdownMenuItemProps(
31
+ val enabled: Boolean = true,
32
+ val elementColors: DropdownMenuItemColors = DropdownMenuItemColors(),
33
+ val modifiers: ModifierList = emptyList()
34
+ ) : ComposeProps
35
+
36
+ @Composable
37
+ fun FunctionalComposableScope.DropdownMenuItemContent(
38
+ props: DropdownMenuItemProps,
39
+ onItemPressed: (ItemPressedEvent) -> Unit
40
+ ) {
41
+ val textSlotView = findChildSlotView(view, "text")
42
+ val leadingSlotView = findChildSlotView(view, "leadingIcon")
43
+ val trailingSlotView = findChildSlotView(view, "trailingIcon")
44
+
45
+ val colors = props.elementColors
46
+ val defaultColors = MenuDefaults.itemColors()
47
+
48
+ DropdownMenuItem(
49
+ text = { textSlotView?.let { with(ComposableScope()) { with(it) { Content() } } } ?: Unit },
50
+ enabled = props.enabled,
51
+ modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
52
+ colors = MenuDefaults.itemColors(
53
+ textColor = colors.textColor.composeOrNull ?: defaultColors.textColor,
54
+ leadingIconColor = colors.leadingIconColor.composeOrNull ?: defaultColors.leadingIconColor,
55
+ trailingIconColor = colors.trailingIconColor.composeOrNull ?: defaultColors.trailingIconColor,
56
+ disabledTextColor = colors.disabledTextColor.composeOrNull ?: defaultColors.disabledTextColor,
57
+ disabledLeadingIconColor = colors.disabledLeadingIconColor.composeOrNull ?: defaultColors.disabledLeadingIconColor,
58
+ disabledTrailingIconColor = colors.disabledTrailingIconColor.composeOrNull ?: defaultColors.disabledTrailingIconColor
59
+ ),
60
+ leadingIcon = leadingSlotView?.let {
61
+ { with(ComposableScope()) { with(it) { Content() } } }
62
+ },
63
+ trailingIcon = trailingSlotView?.let {
64
+ { with(ComposableScope()) { with(it) { Content() } } }
65
+ },
66
+ onClick = {
67
+ onItemPressed(ItemPressedEvent())
68
+ }
69
+ )
70
+ }
@@ -0,0 +1,18 @@
1
+ package expo.modules.ui.menu
2
+
3
+ import android.graphics.Color
4
+ import expo.modules.kotlin.types.Enumerable
5
+ import expo.modules.kotlin.views.ComposeProps
6
+ import expo.modules.ui.ModifierList
7
+
8
+ enum class ActivationMethod(val value: String) : Enumerable {
9
+ SINGLE_PRESS("singlePress"),
10
+ LONG_PRESS("longPress")
11
+ }
12
+
13
+ data class DropdownMenuProps(
14
+ val activationMethod: ActivationMethod = ActivationMethod.SINGLE_PRESS,
15
+ val expanded: Boolean = false,
16
+ val color: Color? = null,
17
+ val modifiers: ModifierList = emptyList()
18
+ ) : ComposeProps
@@ -0,0 +1,134 @@
1
+ import { PrimitiveBaseProps } from '../layout-types';
2
+ import { ENTER_TRANSITION_SYMBOL, EXIT_TRANSITION_SYMBOL } from './symbols';
3
+ type EnterTransitionRecord = {
4
+ type: 'fadeIn' | 'slideInHorizontally' | 'slideInVertically' | 'expandIn' | 'expandHorizontally' | 'expandVertically' | 'scaleIn';
5
+ initialAlpha?: number;
6
+ /** Fraction of width: -1.0 = full width left, 1.0 = full width right */
7
+ initialOffsetX?: number;
8
+ /** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
9
+ initialOffsetY?: number;
10
+ initialScale?: number;
11
+ };
12
+ type ExitTransitionRecord = {
13
+ type: 'fadeOut' | 'slideOutHorizontally' | 'slideOutVertically' | 'shrinkOut' | 'shrinkHorizontally' | 'shrinkVertically' | 'scaleOut';
14
+ targetAlpha?: number;
15
+ /** Fraction of width: -1.0 = full width left, 1.0 = full width right */
16
+ targetOffsetX?: number;
17
+ /** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
18
+ targetOffsetY?: number;
19
+ targetScale?: number;
20
+ };
21
+ /**
22
+ * Represents an enter transition that can be combined with other enter transitions using `.plus()`.
23
+ */
24
+ export type EnterTransitionType = {
25
+ /** Combines this transition with another enter transition (mirrors Compose's `+` operator). */
26
+ plus: (other: EnterTransitionType) => EnterTransitionType;
27
+ [ENTER_TRANSITION_SYMBOL]: () => EnterTransitionRecord[];
28
+ };
29
+ /**
30
+ * Represents an exit transition that can be combined with other exit transitions using `.plus()`.
31
+ */
32
+ export type ExitTransitionType = {
33
+ /** Combines this transition with another exit transition (mirrors Compose's `+` operator). */
34
+ plus: (other: ExitTransitionType) => ExitTransitionType;
35
+ [EXIT_TRANSITION_SYMBOL]: () => ExitTransitionRecord[];
36
+ };
37
+ /**
38
+ * Factory for enter transitions used with `AnimatedVisibility`.
39
+ * Transitions can be combined using `.plus()`.
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * // Single transition
44
+ * EnterTransition.fadeIn()
45
+ *
46
+ * // Combined transitions
47
+ * EnterTransition.fadeIn({ initialAlpha: 0.3 })
48
+ * .plus(EnterTransition.slideInHorizontally({ initialOffsetX: 1.0 }))
49
+ * ```
50
+ */
51
+ export declare const EnterTransition: {
52
+ /** Fades the content in. */
53
+ fadeIn: (params?: {
54
+ initialAlpha?: number;
55
+ }) => EnterTransitionType;
56
+ /** Slides the content in horizontally. */
57
+ slideInHorizontally: (params?: {
58
+ initialOffsetX?: number;
59
+ }) => EnterTransitionType;
60
+ /** Slides the content in vertically. */
61
+ slideInVertically: (params?: {
62
+ initialOffsetY?: number;
63
+ }) => EnterTransitionType;
64
+ /** Expands the content from the center. */
65
+ expandIn: () => EnterTransitionType;
66
+ /** Expands the content horizontally from the center. */
67
+ expandHorizontally: () => EnterTransitionType;
68
+ /** Expands the content vertically from the center. */
69
+ expandVertically: () => EnterTransitionType;
70
+ /** Scales the content in from a smaller size. */
71
+ scaleIn: (params?: {
72
+ initialScale?: number;
73
+ }) => EnterTransitionType;
74
+ };
75
+ /**
76
+ * Factory for exit transitions used with `AnimatedVisibility`.
77
+ * Transitions can be combined using `.plus()`.
78
+ *
79
+ * @example
80
+ * ```tsx
81
+ * // Single transition
82
+ * ExitTransition.fadeOut()
83
+ *
84
+ * // Combined transitions
85
+ * ExitTransition.fadeOut()
86
+ * .plus(ExitTransition.slideOutHorizontally({ targetOffsetX: 1.0 }))
87
+ * ```
88
+ */
89
+ export declare const ExitTransition: {
90
+ /** Fades the content out. */
91
+ fadeOut: (params?: {
92
+ targetAlpha?: number;
93
+ }) => ExitTransitionType;
94
+ /** Slides the content out horizontally. */
95
+ slideOutHorizontally: (params?: {
96
+ targetOffsetX?: number;
97
+ }) => ExitTransitionType;
98
+ /** Slides the content out vertically. */
99
+ slideOutVertically: (params?: {
100
+ targetOffsetY?: number;
101
+ }) => ExitTransitionType;
102
+ /** Shrinks the content towards the center. */
103
+ shrinkOut: () => ExitTransitionType;
104
+ /** Shrinks the content horizontally towards the center. */
105
+ shrinkHorizontally: () => ExitTransitionType;
106
+ /** Shrinks the content vertically towards the center. */
107
+ shrinkVertically: () => ExitTransitionType;
108
+ /** Scales the content out to a smaller size. */
109
+ scaleOut: (params?: {
110
+ targetScale?: number;
111
+ }) => ExitTransitionType;
112
+ };
113
+ export type AnimatedVisibilityProps = {
114
+ children?: React.ReactNode;
115
+ /**
116
+ * Whether the content is visible. When changed, the content will animate in or out.
117
+ */
118
+ visible: boolean;
119
+ /**
120
+ * The enter transition to use when `visible` changes to `true`.
121
+ * Use `EnterTransition` factory methods and combine with `.plus()`.
122
+ * Defaults to Compose's `fadeIn + expandIn` when not specified.
123
+ */
124
+ enterTransition?: EnterTransitionType;
125
+ /**
126
+ * The exit transition to use when `visible` changes to `false`.
127
+ * Use `ExitTransition` factory methods and combine with `.plus()`.
128
+ * Defaults to Compose's `fadeOut + shrinkOut` when not specified.
129
+ */
130
+ exitTransition?: ExitTransitionType;
131
+ } & PrimitiveBaseProps;
132
+ export declare function AnimatedVisibility(props: AnimatedVisibilityProps): import("react").JSX.Element;
133
+ export {};
134
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/AnimatedVisibility/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAE5E,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EACA,QAAQ,GACR,qBAAqB,GACrB,mBAAmB,GACnB,UAAU,GACV,oBAAoB,GACpB,kBAAkB,GAClB,SAAS,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EACA,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,WAAW,GACX,oBAAoB,GACpB,kBAAkB,GAClB,UAAU,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,+FAA+F;IAC/F,IAAI,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,mBAAmB,CAAC;IAC1D,CAAC,uBAAuB,CAAC,EAAE,MAAM,qBAAqB,EAAE,CAAC;CAC1D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,8FAA8F;IAC9F,IAAI,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,kBAAkB,CAAC;IACxD,CAAC,sBAAsB,C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.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/AnimatedVisibility/symbols.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB,eAA4B,CAAC;AACjE,eAAO,MAAM,sBAAsB,eAA2B,CAAC"}
@@ -1,85 +1,99 @@
1
1
  import { type ColorValue } from 'react-native';
2
- import { MaterialIcon } from './types';
3
- import { ExpoModifier, ViewEvent } from '../../types';
2
+ import type { ModifierConfig, ViewEvent } from '../../types';
4
3
  import { ShapeJSXElement, ShapeRecordProps } from '../Shape';
5
4
  /**
6
- * The built-in button styles available on Android.
7
- * - `outlined` - A button with an outline.
8
- * - `elevated` - A filled button with a shadow.
5
+ * Colors for button elements.
9
6
  */
10
- export type ButtonVariant = 'default' | 'bordered' | 'borderless' | 'outlined' | 'elevated';
11
- /**
12
- * Colors for button's core elements.
13
- */
14
- export type ButtonElementColors = {
7
+ export type ButtonColors = {
15
8
  containerColor?: ColorValue;
16
9
  contentColor?: ColorValue;
17
10
  disabledContainerColor?: ColorValue;
18
11
  disabledContentColor?: ColorValue;
19
12
  };
13
+ /**
14
+ * Content padding for the button's inner content.
15
+ * All values are in density-independent pixels (dp).
16
+ */
17
+ export type ButtonContentPadding = {
18
+ start?: number;
19
+ top?: number;
20
+ end?: number;
21
+ bottom?: number;
22
+ };
20
23
  export type ButtonProps = {
21
24
  /**
22
- * A callback that is called when the button is pressed.
23
- */
24
- onPress?: () => void;
25
- /**
26
- * A string describing the leading icon to display in the button.
27
- * Uses Material Icons on Android.
25
+ * Callback that is called when the button is clicked.
28
26
  */
29
- leadingIcon?: MaterialIcon;
27
+ onClick?: () => void;
30
28
  /**
31
- * A string describing the trailing icon to display in the button.
32
- * Uses Material Icons on Android.
29
+ * Whether the button is enabled for user interaction.
30
+ * @default true
33
31
  */
34
- trailingIcon?: MaterialIcon;
32
+ enabled?: boolean;
35
33
  /**
36
- * A string describing the system image to display in the button.
37
- * Uses Material Icons on Android.
38
- * @deprecated Use `leadingIcon` instead.
34
+ * Colors for button elements.
39
35
  */
40
- systemImage?: MaterialIcon;
36
+ colors?: ButtonColors;
41
37
  /**
42
- * The button variant.
38
+ * The padding between the button container and its content.
39
+ * Use this to adjust internal spacing, for example when adding a leading icon
43
40
  */
44
- variant?: ButtonVariant;
41
+ contentPadding?: ButtonContentPadding;
45
42
  /**
46
- * The text to display inside the button.
43
+ * The shape of the button.
47
44
  */
48
- children?: string | string[] | React.JSX.Element;
49
- /**
50
- * Colors for button's core elements.
51
- * @platform android
52
- */
53
- elementColors?: ButtonElementColors;
54
- /**
55
- * Button color.
56
- */
57
- color?: ColorValue;
58
45
  shape?: ShapeJSXElement;
59
46
  /**
60
- * Disabled state of the button.
47
+ * Modifiers for the component.
61
48
  */
62
- disabled?: boolean;
49
+ modifiers?: ModifierConfig[];
63
50
  /**
64
- * Modifiers for the component.
51
+ * Content to display inside the button.
65
52
  */
66
- modifiers?: ExpoModifier[];
53
+ children: React.ReactNode;
67
54
  };
68
- /**
69
- * @hidden
70
- */
71
- export type NativeButtonProps = Omit<ButtonProps, 'role' | 'onPress' | 'leadingIcon' | 'trailingIcon' | 'systemImage' | 'shape'> & {
72
- text: string;
73
- leadingIcon?: string;
74
- trailingIcon?: string;
55
+ type NativeButtonProps = Omit<ButtonProps, 'onClick' | 'shape' | 'children'> & {
75
56
  shape?: ShapeRecordProps;
57
+ children?: React.ReactNode;
76
58
  } & ViewEvent<'onButtonPressed', void>;
77
59
  /**
78
60
  * @hidden
79
61
  */
80
- export declare function transformButtonProps(props: ButtonProps): NativeButtonProps;
62
+ export declare function transformButtonProps(props: Omit<ButtonProps, 'children'>): NativeButtonProps;
63
+ /**
64
+ * A filled button component.
65
+ */
66
+ export declare const Button: {
67
+ (props: ButtonProps): import("react").JSX.Element;
68
+ displayName: string;
69
+ };
70
+ /**
71
+ * A filled tonal button component.
72
+ */
73
+ export declare const FilledTonalButton: {
74
+ (props: ButtonProps): import("react").JSX.Element;
75
+ displayName: string;
76
+ };
77
+ /**
78
+ * An outlined button component.
79
+ */
80
+ export declare const OutlinedButton: {
81
+ (props: ButtonProps): import("react").JSX.Element;
82
+ displayName: string;
83
+ };
81
84
  /**
82
- * Displays a native button component.
85
+ * An elevated button component.
83
86
  */
84
- export declare function Button(props: ButtonProps): import("react").JSX.Element;
87
+ export declare const ElevatedButton: {
88
+ (props: ButtonProps): import("react").JSX.Element;
89
+ displayName: string;
90
+ };
91
+ /**
92
+ * A text button component.
93
+ */
94
+ export declare const TextButton: {
95
+ (props: ButtonProps): import("react").JSX.Element;
96
+ displayName: string;
97
+ };
98
+ export {};
85
99
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Button/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAiB,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,oBAAoB,CAAC,EAAE,UAAU,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,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G;AACH,eAAO,MAAM,iBAAiB;YAhBF,WAAW;;CAgBoC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,cAAc;YArBC,WAAW;;CAqB8B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,cAAc;YA1BC,WAAW;;CA0B8B,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,UAAU;YA/BK,WAAW;;CA+BsB,CAAC"}
@@ -1,40 +1,98 @@
1
1
  import { type ColorValue } from 'react-native';
2
- import { ExpoModifier } from '../../types';
2
+ import { type ModifierConfig } from '../../types';
3
3
  /**
4
4
  * Colors for card's core elements.
5
5
  */
6
- export type CardElementColors = {
6
+ export type CardColors = {
7
7
  containerColor?: ColorValue;
8
8
  contentColor?: ColorValue;
9
9
  };
10
+ /**
11
+ * Border configuration for cards.
12
+ */
13
+ export type CardBorder = {
14
+ /**
15
+ * Border width in dp.
16
+ * @default 1
17
+ */
18
+ width?: number;
19
+ /**
20
+ * Border color.
21
+ */
22
+ color?: ColorValue;
23
+ };
10
24
  export type CardProps = {
11
25
  /**
12
26
  * The content to display inside the card.
13
27
  */
14
28
  children?: React.ReactNode;
15
29
  /**
16
- * The variant of the card.
17
- * - 'default' - A filled card with no outline.
18
- * - 'elevated' - A filled card with elevation/shadow.
19
- * - 'outlined' - A card with an outline border.
20
- * @default 'default'
30
+ * Colors for card's core elements.
21
31
  */
22
- variant?: 'default' | 'elevated' | 'outlined';
32
+ colors?: CardColors;
23
33
  /**
24
- * The background color of the card.
34
+ * Default elevation in dp.
25
35
  */
26
- color?: ColorValue;
36
+ elevation?: number;
37
+ /**
38
+ * Border configuration for the card.
39
+ */
40
+ border?: CardBorder;
41
+ /**
42
+ * Modifiers for the component.
43
+ */
44
+ modifiers?: ModifierConfig[];
45
+ };
46
+ /**
47
+ * A card component that renders a filled card surface for content.
48
+ */
49
+ export declare const Card: import("react").ComponentType<CardProps>;
50
+ export type ElevatedCardProps = {
51
+ /**
52
+ * The content to display inside the card.
53
+ */
54
+ children?: React.ReactNode;
55
+ /**
56
+ * Colors for card's core elements.
57
+ */
58
+ colors?: CardColors;
59
+ /**
60
+ * Default elevation in dp. Material 3 default is 1dp.
61
+ */
62
+ elevation?: number;
63
+ /**
64
+ * Modifiers for the component.
65
+ */
66
+ modifiers?: ModifierConfig[];
67
+ };
68
+ /**
69
+ * An elevated card component that provides a raised surface for content.
70
+ */
71
+ export declare const ElevatedCard: import("react").ComponentType<ElevatedCardProps>;
72
+ export type OutlinedCardProps = {
73
+ /**
74
+ * The content to display inside the card.
75
+ */
76
+ children?: React.ReactNode;
27
77
  /**
28
78
  * Colors for card's core elements.
29
79
  */
30
- elementColors?: CardElementColors;
80
+ colors?: CardColors;
81
+ /**
82
+ * Default elevation in dp.
83
+ */
84
+ elevation?: number;
85
+ /**
86
+ * Border configuration for the outlined card.
87
+ */
88
+ border?: CardBorder;
31
89
  /**
32
90
  * Modifiers for the component.
33
91
  */
34
- modifiers?: ExpoModifier[];
92
+ modifiers?: ModifierConfig[];
35
93
  };
36
94
  /**
37
- * A card component that provides a surface for content.
95
+ * An outlined card component that provides a bordered surface for content.
38
96
  */
39
- export declare function Card(props: CardProps): import("react").JSX.Element;
97
+ export declare const OutlinedCard: import("react").ComponentType<OutlinedCardProps>;
40
98
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Card/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,YAAY,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC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;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,kDAA6D,CAAC;AAMvF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,kDAA6D,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { type ColorValue } from 'react-native';
2
+ import { type ModifierConfig } from '../../types';
3
+ /**
4
+ * Colors for checkbox core elements.
5
+ */
6
+ export type CheckboxColors = {
7
+ checkedColor?: ColorValue;
8
+ disabledCheckedColor?: ColorValue;
9
+ uncheckedColor?: ColorValue;
10
+ disabledUncheckedColor?: ColorValue;
11
+ checkmarkColor?: ColorValue;
12
+ disabledIndeterminateColor?: ColorValue;
13
+ };
14
+ export type CheckboxProps = {
15
+ /**
16
+ * Indicates whether the checkbox is checked.
17
+ */
18
+ value: boolean;
19
+ /**
20
+ * Whether the checkbox is enabled.
21
+ * @default true
22
+ */
23
+ enabled?: boolean;
24
+ /**
25
+ * Callback function that is called when the checked state changes.
26
+ */
27
+ onCheckedChange?: (value: boolean) => void;
28
+ /**
29
+ * Colors for checkbox core elements.
30
+ */
31
+ colors?: CheckboxColors;
32
+ /**
33
+ * Modifiers for the component.
34
+ */
35
+ modifiers?: ModifierConfig[];
36
+ };
37
+ /**
38
+ * A checkbox component.
39
+ */
40
+ export declare function Checkbox(props: CheckboxProps): import("react").JSX.Element;
41
+ /**
42
+ * The toggleable state of a tri-state checkbox.
43
+ */
44
+ export type ToggleableState = 'on' | 'off' | 'indeterminate';
45
+ export type TriStateCheckboxProps = {
46
+ /**
47
+ * The toggleable state of the checkbox: `'on'`, `'off'`, or `'indeterminate'`.
48
+ */
49
+ state: ToggleableState;
50
+ /**
51
+ * Whether the checkbox is enabled.
52
+ * @default true
53
+ */
54
+ enabled?: boolean;
55
+ /**
56
+ * Callback function that is called when the checkbox is clicked.
57
+ */
58
+ onClick?: () => void;
59
+ /**
60
+ * Colors for checkbox core elements.
61
+ */
62
+ colors?: CheckboxColors;
63
+ /**
64
+ * Modifiers for the component.
65
+ */
66
+ modifiers?: ModifierConfig[];
67
+ };
68
+ /**
69
+ * A tri-state checkbox component that supports `'on'`, `'off'`, and `'indeterminate'` states.
70
+ * Useful for "select all" patterns where the parent checkbox reflects the state of its children.
71
+ */
72
+ export declare function TriStateCheckbox(props: TriStateCheckboxProps): import("react").JSX.Element;
73
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jetpack-compose/Checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,aAAa,CAAC;AAG7D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,0BAA0B,CAAC,EAAE,UAAU,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,KAAK,EAAE,OAAO,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