pytech-ui 1.0.29 → 1.0.31

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 (234) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +40 -40
  3. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  4. package/android/.gradle/nb-cache/trust/8732A504261C070E1F639E78DF65F8E6DC6FFC865B3D7178A7609BB57105805F +1 -1
  5. package/android/build.gradle +47 -47
  6. package/android/src/main/AndroidManifest.xml +2 -2
  7. package/android/src/main/java/expo/modules/pytechui/Dialog.kt +39 -39
  8. package/android/src/main/java/expo/modules/pytechui/ForEach/ForEachRecords.kt +23 -23
  9. package/android/src/main/java/expo/modules/pytechui/ForEach/index.kt +82 -82
  10. package/android/src/main/java/expo/modules/pytechui/Gradient/GradientView.kt +124 -124
  11. package/android/src/main/java/expo/modules/pytechui/Icon/index.kt +36 -36
  12. package/android/src/main/java/expo/modules/pytechui/Icon/utils.kt +42 -42
  13. package/android/src/main/java/expo/modules/pytechui/ListItem/Data/ListItemDataRecords.kt +84 -84
  14. package/android/src/main/java/expo/modules/pytechui/ListItem/Data/ListItemFromData.kt +127 -127
  15. package/android/src/main/java/expo/modules/pytechui/ListItem/Slots/ListItemFromSlots.kt +60 -60
  16. package/android/src/main/java/expo/modules/pytechui/ListItem/Slots/types.kt +42 -42
  17. package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Decorator/Decorator.kt +79 -79
  18. package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Decorator/Divider.kt +36 -36
  19. package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Decorator/utilsDecorator.kt +19 -19
  20. package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Dynamic/Dynamic.kt +163 -163
  21. package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Dynamic/Row.kt +136 -136
  22. package/android/src/main/java/expo/modules/pytechui/PytechUiModifiers.kt +93 -93
  23. package/android/src/main/java/expo/modules/pytechui/PytechUiModule.kt +168 -168
  24. package/android/src/main/java/expo/modules/pytechui/SearchBar.kt +213 -213
  25. package/android/src/main/java/expo/modules/pytechui/Section/SectionHost.kt +81 -81
  26. package/android/src/main/java/expo/modules/pytechui/Section/SectionHostView.kt +65 -65
  27. package/android/src/main/java/expo/modules/pytechui/TextField.kt +251 -251
  28. package/android/src/main/java/expo/modules/pytechui/TypographySlot/TypographySlotBridge.kt +120 -120
  29. package/android/src/main/java/expo/modules/pytechui/TypographySlot/constants.kt +47 -47
  30. package/android/src/main/java/expo/modules/pytechui/extended-theme/ExtendedThemeView.kt +19 -19
  31. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Colors/ExtendedColorBridge.kt +76 -76
  32. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Constants/Constants.kt +10 -10
  33. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarLargeFlexibleTokens.kt +20 -20
  34. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarLargeTokens.kt +19 -19
  35. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarMediumFlexibleTokens.kt +20 -20
  36. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarMediumTokens.kt +19 -19
  37. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarSmallTokens.kt +19 -19
  38. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarTokens.kt +23 -23
  39. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AssistChipTokens.kt +25 -25
  40. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/BadgeTokens.kt +20 -20
  41. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/BaselineButtonTokens.kt +26 -26
  42. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/BottomAppBarTokens.kt +19 -19
  43. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonGroupSmallTokens.kt +20 -20
  44. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonLargeTokens.kt +24 -24
  45. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonMediumTokens.kt +24 -24
  46. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonSmallTokens.kt +24 -24
  47. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonXLargeTokens.kt +24 -24
  48. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonXSmallTokens.kt +24 -24
  49. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/CheckboxTokens.kt +35 -35
  50. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/CircularProgressIndicatorTokens.kt +25 -25
  51. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ConnectedButtonGroupSmallTokens.kt +21 -21
  52. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DateInputModalTokens.kt +22 -22
  53. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DatePickerModalTokens.kt +33 -33
  54. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DialogTokens.kt +19 -19
  55. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DividerTokens.kt +19 -19
  56. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DockedToolbarTokens.kt +23 -23
  57. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DragHandleTokens.kt +25 -25
  58. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ElevatedButtonTokens.kt +19 -19
  59. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ElevatedCardTokens.kt +20 -20
  60. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ElevationTokens.kt +24 -24
  61. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExpressiveMotionTokens.kt +28 -28
  62. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabLargeTokens.kt +23 -23
  63. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabMediumTokens.kt +24 -24
  64. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabPrimaryTokens.kt +20 -20
  65. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabSmallTokens.kt +23 -23
  66. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabBaselineTokens.kt +21 -21
  67. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabLargeTokens.kt +21 -21
  68. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabMediumTokens.kt +22 -22
  69. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabMenuBaselineTokens.kt +28 -28
  70. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabSmallTokens.kt +21 -21
  71. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledAutocompleteTokens.kt +31 -31
  72. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledButtonTokens.kt +19 -19
  73. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledCardTokens.kt +20 -20
  74. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledIconButtonTokens.kt +18 -18
  75. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledTextFieldTokens.kt +31 -31
  76. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledTonalButtonTokens.kt +23 -23
  77. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledTonalIconButtonTokens.kt +18 -18
  78. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilterChipTokens.kt +28 -28
  79. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FloatingToolbarTokens.kt +23 -23
  80. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/IconButtonTokens.kt +17 -17
  81. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/InputChipTokens.kt +30 -30
  82. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/LargeIconButtonTokens.kt +27 -27
  83. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/LinearProgressIndicatorTokens.kt +28 -28
  84. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ListTokens.kt +57 -57
  85. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/LoadingIndicatorTokens.kt +21 -21
  86. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/MediumIconButtonTokens.kt +27 -27
  87. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/MotionTokens.kt +44 -44
  88. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationBarHorizontalItemTokens.kt +22 -22
  89. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationBarTokens.kt +23 -23
  90. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationBarVerticalItemTokens.kt +22 -22
  91. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationDrawerTokens.kt +23 -23
  92. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailBaselineItemTokens.kt +25 -25
  93. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailCollapsedTokens.kt +23 -23
  94. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailExpandedTokens.kt +22 -22
  95. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailHorizontalItemTokens.kt +24 -24
  96. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailVerticalItemTokens.kt +24 -24
  97. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedAutocompleteTokens.kt +30 -30
  98. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedButtonTokens.kt +19 -19
  99. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedCardTokens.kt +21 -21
  100. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedIconButtonTokens.kt +18 -18
  101. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedSegmentedButtonTokens.kt +24 -24
  102. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedTextFieldTokens.kt +31 -31
  103. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/PrimaryNavigationTabTokens.kt +24 -24
  104. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/RadioButtonTokens.kt +22 -22
  105. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ScrimTokens.kt +17 -17
  106. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SearchBarTokens.kt +20 -20
  107. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SearchViewTokens.kt +20 -20
  108. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SecondaryNavigationTabTokens.kt +21 -21
  109. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SegmentedMenuTokens.kt +42 -42
  110. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ShapeTokens.kt +74 -74
  111. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SheetBottomTokens.kt +20 -20
  112. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SliderTokens.kt +39 -39
  113. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SmallIconButtonTokens.kt +27 -27
  114. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SnackbarTokens.kt +21 -21
  115. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonLargeTokens.kt +26 -26
  116. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonMediumTokens.kt +26 -26
  117. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonSmallTokens.kt +26 -26
  118. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonXLargeTokens.kt +26 -26
  119. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonXSmallTokens.kt +27 -27
  120. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/StandardMenuTokens.kt +25 -25
  121. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/StandardMotionTokens.kt +27 -27
  122. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/StateTokens.kt +20 -20
  123. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SuggestionChipTokens.kt +25 -25
  124. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SwitchTokens.kt +37 -37
  125. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TextButtonTokens.kt +18 -18
  126. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TimeInputTokens.kt +24 -24
  127. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TimePickerTokens.kt +30 -30
  128. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TonalButtonTokens.kt +19 -19
  129. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TypeScaleTokens.kt +72 -72
  130. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/VibrantMenuTokens.kt +26 -26
  131. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/XLargeIconButtonTokens.kt +27 -27
  132. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/XSmallIconButtonTokens.kt +27 -27
  133. package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/index.kt +216 -216
  134. package/android/src/main/java/expo/modules/pytechui/extended-theme/index.kt +38 -38
  135. package/android/src/main/java/expo/modules/pytechui/utils/children.kt +126 -126
  136. package/android/src/main/java/expo/modules/pytechui/utils/modifiers.kt +44 -44
  137. package/build/constants/utils.d.ts +1 -1
  138. package/build/contexts/alert/components/Alert/index.js +16 -16
  139. package/build/contexts/alert/components/Button/index.js +5 -5
  140. package/build/contexts/alert/components/Provider/index.ios.js +2 -2
  141. package/build/contexts/alert/components/Provider/index.js +3 -3
  142. package/build/contexts/alert/context/provider.d.ts +1 -1
  143. package/build/contexts/alert/context/provider.js +1 -1
  144. package/build/contexts/app/context.d.ts +1 -1
  145. package/build/contexts/app/context.js +15 -15
  146. package/build/contexts/app/index.d.ts +2 -2
  147. package/build/contexts/app/index.js +2 -2
  148. package/build/contexts/app/src/Head/index.d.ts +1 -1
  149. package/build/contexts/app/src/Head/index.web.js +12 -12
  150. package/build/contexts/app/src/Wrapper/index.d.ts +1 -1
  151. package/build/contexts/app/src/Wrapper/index.js +2 -2
  152. package/build/contexts/app/src/styles.css +16 -16
  153. package/build/contexts/app/types.d.ts +1 -1
  154. package/build/contexts/router/index.d.ts +1 -1
  155. package/build/contexts/router/index.js +3 -3
  156. package/build/jetpack-compose/components/Columns/CommonColumn/index.js +2 -2
  157. package/build/jetpack-compose/components/Columns/CommonColumn/types.d.ts +1 -1
  158. package/build/jetpack-compose/components/Columns/CommonColumn/utils.d.ts +1 -1
  159. package/build/jetpack-compose/components/Columns/CommonColumn/utils.js +1 -1
  160. package/build/jetpack-compose/components/DropdownMenu/index.d.ts +1 -1
  161. package/build/jetpack-compose/components/DropdownMenu/index.js +3 -3
  162. package/build/jetpack-compose/components/DropdownPicker/Picker.d.ts +3 -3
  163. package/build/jetpack-compose/components/DropdownPicker/Picker.js +24 -24
  164. package/build/jetpack-compose/components/DropdownPicker/PickerItem.js +5 -5
  165. package/build/jetpack-compose/components/DropdownPicker/context.d.ts +4 -10
  166. package/build/jetpack-compose/components/ForEach/src/ForEach.d.ts +1 -1
  167. package/build/jetpack-compose/components/ForEach/src/ForEach.js +5 -5
  168. package/build/jetpack-compose/components/ForEach/src/ListItem.d.ts +1 -1
  169. package/build/jetpack-compose/components/ForEach/src/types.d.ts +1 -1
  170. package/build/jetpack-compose/components/Gradient/Gradient.js +1 -1
  171. package/build/jetpack-compose/components/Gradient/types.d.ts +1 -1
  172. package/build/jetpack-compose/components/Icon/Icon/Icon.js +1 -1
  173. package/build/jetpack-compose/components/Icon/index.d.ts +1 -1
  174. package/build/jetpack-compose/components/IconSection/IconSection.js +19 -19
  175. package/build/jetpack-compose/components/IconSection/types.d.ts +1 -1
  176. package/build/jetpack-compose/components/IconSection/utils.js +1 -1
  177. package/build/jetpack-compose/components/List/CommonColumn.js +3 -3
  178. package/build/jetpack-compose/components/List/index.d.ts +1 -1
  179. package/build/jetpack-compose/components/List/index.js +11 -11
  180. package/build/jetpack-compose/components/ListItem/SlotListItem.d.ts +2 -2
  181. package/build/jetpack-compose/components/ListItem/SlotListItem.js +9 -9
  182. package/build/jetpack-compose/components/Menu/src/components/Divider.js +2 -2
  183. package/build/jetpack-compose/components/Menu/src/components/Icon.d.ts +1 -1
  184. package/build/jetpack-compose/components/Menu/src/components/Icon.js +1 -1
  185. package/build/jetpack-compose/components/Menu/src/components/Item.d.ts +2 -3
  186. package/build/jetpack-compose/components/Menu/src/components/Item.js +26 -26
  187. package/build/jetpack-compose/components/Menu/src/components/Label.d.ts +4 -1
  188. package/build/jetpack-compose/components/Menu/src/components/Label.js +3 -3
  189. package/build/jetpack-compose/components/Menu/src/components/Menu.d.ts +2 -2
  190. package/build/jetpack-compose/components/Menu/src/components/Menu.js +26 -26
  191. package/build/jetpack-compose/components/Menu/src/components/Trigger.js +7 -7
  192. package/build/jetpack-compose/components/Menu/src/context.d.ts +8 -6
  193. package/build/jetpack-compose/components/Menu/src/utils.js +3 -3
  194. package/build/jetpack-compose/components/PagePicker/Item.js +11 -11
  195. package/build/jetpack-compose/components/PagePicker/Picker.js +5 -5
  196. package/build/jetpack-compose/components/PagePicker/context/index.d.ts +1 -1
  197. package/build/jetpack-compose/components/PagePicker/context/index.js +8 -8
  198. package/build/jetpack-compose/components/PullToRefreshBox.js +1 -1
  199. package/build/jetpack-compose/components/SearchBar.d.ts +1 -1
  200. package/build/jetpack-compose/components/SearchBar.js +1 -1
  201. package/build/jetpack-compose/components/Section/components/Column.d.ts +1 -1
  202. package/build/jetpack-compose/components/Section/components/Column.js +3 -3
  203. package/build/jetpack-compose/components/Section/components/Section.js +18 -18
  204. package/build/jetpack-compose/components/Section/components/Slot.d.ts +1 -1
  205. package/build/jetpack-compose/components/Section/components/Slot.js +3 -3
  206. package/build/jetpack-compose/components/SectionHost/index.d.ts +1 -1
  207. package/build/jetpack-compose/components/SectionHost/index.js +3 -3
  208. package/build/jetpack-compose/components/TextField.d.ts +1 -1
  209. package/build/jetpack-compose/components/TextField.js +1 -1
  210. package/build/jetpack-compose/components/TextSlot.js +2 -3
  211. package/build/jetpack-compose/extended-theme/assets/Colors/index.js +2 -2
  212. package/build/jetpack-compose/modifiers/flexWeight.d.ts +1 -1
  213. package/build/jetpack-compose/modifiers/heightIn.d.ts +1 -1
  214. package/build/swift-ui/Image.js +2 -2
  215. package/build/swift-ui/ListItem.js +2 -2
  216. package/build/swift-ui/Slot.js +2 -2
  217. package/build/swift-ui/Text.js +2 -2
  218. package/build/universal/Column/index.android.js +2 -2
  219. package/build/universal/Column/index.ios.js +2 -2
  220. package/build/universal/Column/index.js +2 -2
  221. package/build/universal/Host/index.ios.js +2 -2
  222. package/build/universal/Row/index.android.js +2 -2
  223. package/build/universal/Row/index.ios.js +2 -2
  224. package/build/universal/Row/index.js +2 -2
  225. package/expo-module.config.json +11 -11
  226. package/ios/ChevronForwardView.swift +21 -21
  227. package/ios/GradientView.swift +40 -40
  228. package/ios/ImageView.swift +32 -32
  229. package/ios/ListItem.swift +161 -161
  230. package/ios/PytechUi.podspec +24 -24
  231. package/ios/PytechUiModule.swift +15 -15
  232. package/ios/SlotView.swift +107 -107
  233. package/ios/_shared/utils.swift +58 -58
  234. package/package.json +19 -15
@@ -1,136 +1,136 @@
1
- package expo.modules.pytechui.ListItem
2
-
3
- import androidx.compose.foundation.layout.Box
4
- import androidx.compose.foundation.layout.fillMaxWidth
5
- import androidx.compose.foundation.layout.wrapContentWidth
6
- import androidx.compose.runtime.Composable
7
- import androidx.compose.ui.Alignment
8
- import androidx.compose.ui.Modifier
9
- import androidx.compose.ui.layout.SubcomposeLayout
10
- import androidx.compose.ui.unit.Constraints
11
- import androidx.compose.ui.unit.Dp
12
- import kotlin.math.max
13
-
14
- import expo.modules.pytechui.theme.tokens.ListTokens
15
-
16
-
17
-
18
- /**
19
- * Headline + trailing en una fila.
20
- *
21
- * - Caben con ancho natural: headline al inicio, trailing al final.
22
- * - No caben: el que no supera la mitad queda en su ancho natural; el otro ocupa el resto.
23
- * - Si ambos superan la mitad: reparto 50/50.
24
- */
25
-
26
- @Composable
27
- internal fun DynamicRow(
28
- modifier: Modifier = Modifier,
29
- spacing: Dp = ListTokens.ItemBetweenSpace,
30
- first: @Composable () -> Unit,
31
- second: @Composable () -> Unit,
32
- ) {
33
- SubcomposeLayout(
34
- modifier = modifier.fillMaxWidth(),
35
- ) { constraints ->
36
- val spacingPx = spacing.roundToPx()
37
- val maxWidth = constraints.maxWidth
38
-
39
- val naturalConstraints = Constraints(
40
- minWidth = 0,
41
- maxWidth = maxWidth,
42
- minHeight = 0,
43
- maxHeight = constraints.maxHeight,
44
- )
45
-
46
- val firstNatural = subcompose(Slot.FirstMeasure) {
47
- Box(Modifier.wrapContentWidth(Alignment.Start)) { first() }
48
- }.first().measure(naturalConstraints)
49
-
50
- val secondNatural = subcompose(Slot.SecondMeasure) {
51
- Box(Modifier.wrapContentWidth(Alignment.End)) { second() }
52
- }.first().measure(naturalConstraints)
53
-
54
- val needsSplit = firstNatural.width + spacingPx + secondNatural.width > maxWidth
55
-
56
- if (needsSplit) {
57
- val available = max(0, maxWidth - spacingPx)
58
- val halfWidth = available / 2
59
- val firstExceedsHalf = firstNatural.width > halfWidth
60
- val secondExceedsHalf = secondNatural.width > halfWidth
61
-
62
- val firstWidth: Int
63
- val secondWidth: Int
64
- when {
65
- firstExceedsHalf && !secondExceedsHalf -> {
66
- secondWidth = secondNatural.width
67
- firstWidth = available - secondWidth
68
- }
69
- secondExceedsHalf && !firstExceedsHalf -> {
70
- firstWidth = firstNatural.width
71
- secondWidth = available - firstWidth
72
- }
73
- else -> {
74
- firstWidth = halfWidth
75
- secondWidth = halfWidth
76
- }
77
- }
78
-
79
- val firstConstraints = Constraints(
80
- minWidth = firstWidth,
81
- maxWidth = firstWidth,
82
- minHeight = 0,
83
- maxHeight = constraints.maxHeight,
84
- )
85
- val secondConstraints = Constraints(
86
- minWidth = secondWidth,
87
- maxWidth = secondWidth,
88
- minHeight = 0,
89
- maxHeight = constraints.maxHeight,
90
- )
91
-
92
- val firstSplit = subcompose(Slot.FirstSplit) {
93
- Box(
94
- modifier = Modifier.fillMaxWidth(),
95
- contentAlignment = Alignment.CenterStart,
96
- ) {
97
- first()
98
- }
99
- }.first().measure(firstConstraints)
100
-
101
- val secondSplit = subcompose(Slot.SecondSplit) {
102
- Box(
103
- modifier = Modifier.fillMaxWidth(),
104
- contentAlignment = Alignment.CenterEnd,
105
- ) {
106
- second()
107
- }
108
- }.first().measure(secondConstraints)
109
-
110
- val height = max(firstSplit.height, secondSplit.height).coerceAtLeast(constraints.minHeight)
111
-
112
- layout(maxWidth, height) {
113
- val firstY = (height - firstSplit.height) / 2
114
- val secondY = (height - secondSplit.height) / 2
115
- firstSplit.placeRelative(0, firstY)
116
- secondSplit.placeRelative(firstWidth + spacingPx, secondY)
117
- }
118
- } else {
119
- val height = max(firstNatural.height, secondNatural.height).coerceAtLeast(constraints.minHeight)
120
-
121
- layout(maxWidth, height) {
122
- val firstY = (height - firstNatural.height) / 2
123
- val secondY = (height - secondNatural.height) / 2
124
- firstNatural.placeRelative(0, firstY)
125
- secondNatural.placeRelative(maxWidth - secondNatural.width, secondY)
126
- }
127
- }
128
- }
129
- }
130
-
131
- private enum class Slot {
132
- FirstMeasure,
133
- SecondMeasure,
134
- FirstSplit,
135
- SecondSplit,
136
- }
1
+ package expo.modules.pytechui.ListItem
2
+
3
+ import androidx.compose.foundation.layout.Box
4
+ import androidx.compose.foundation.layout.fillMaxWidth
5
+ import androidx.compose.foundation.layout.wrapContentWidth
6
+ import androidx.compose.runtime.Composable
7
+ import androidx.compose.ui.Alignment
8
+ import androidx.compose.ui.Modifier
9
+ import androidx.compose.ui.layout.SubcomposeLayout
10
+ import androidx.compose.ui.unit.Constraints
11
+ import androidx.compose.ui.unit.Dp
12
+ import kotlin.math.max
13
+
14
+ import expo.modules.pytechui.theme.tokens.ListTokens
15
+
16
+
17
+
18
+ /**
19
+ * Headline + trailing en una fila.
20
+ *
21
+ * - Caben con ancho natural: headline al inicio, trailing al final.
22
+ * - No caben: el que no supera la mitad queda en su ancho natural; el otro ocupa el resto.
23
+ * - Si ambos superan la mitad: reparto 50/50.
24
+ */
25
+
26
+ @Composable
27
+ internal fun DynamicRow(
28
+ modifier: Modifier = Modifier,
29
+ spacing: Dp = ListTokens.ItemBetweenSpace,
30
+ first: @Composable () -> Unit,
31
+ second: @Composable () -> Unit,
32
+ ) {
33
+ SubcomposeLayout(
34
+ modifier = modifier.fillMaxWidth(),
35
+ ) { constraints ->
36
+ val spacingPx = spacing.roundToPx()
37
+ val maxWidth = constraints.maxWidth
38
+
39
+ val naturalConstraints = Constraints(
40
+ minWidth = 0,
41
+ maxWidth = maxWidth,
42
+ minHeight = 0,
43
+ maxHeight = constraints.maxHeight,
44
+ )
45
+
46
+ val firstNatural = subcompose(Slot.FirstMeasure) {
47
+ Box(Modifier.wrapContentWidth(Alignment.Start)) { first() }
48
+ }.first().measure(naturalConstraints)
49
+
50
+ val secondNatural = subcompose(Slot.SecondMeasure) {
51
+ Box(Modifier.wrapContentWidth(Alignment.End)) { second() }
52
+ }.first().measure(naturalConstraints)
53
+
54
+ val needsSplit = firstNatural.width + spacingPx + secondNatural.width > maxWidth
55
+
56
+ if (needsSplit) {
57
+ val available = max(0, maxWidth - spacingPx)
58
+ val halfWidth = available / 2
59
+ val firstExceedsHalf = firstNatural.width > halfWidth
60
+ val secondExceedsHalf = secondNatural.width > halfWidth
61
+
62
+ val firstWidth: Int
63
+ val secondWidth: Int
64
+ when {
65
+ firstExceedsHalf && !secondExceedsHalf -> {
66
+ secondWidth = secondNatural.width
67
+ firstWidth = available - secondWidth
68
+ }
69
+ secondExceedsHalf && !firstExceedsHalf -> {
70
+ firstWidth = firstNatural.width
71
+ secondWidth = available - firstWidth
72
+ }
73
+ else -> {
74
+ firstWidth = halfWidth
75
+ secondWidth = halfWidth
76
+ }
77
+ }
78
+
79
+ val firstConstraints = Constraints(
80
+ minWidth = firstWidth,
81
+ maxWidth = firstWidth,
82
+ minHeight = 0,
83
+ maxHeight = constraints.maxHeight,
84
+ )
85
+ val secondConstraints = Constraints(
86
+ minWidth = secondWidth,
87
+ maxWidth = secondWidth,
88
+ minHeight = 0,
89
+ maxHeight = constraints.maxHeight,
90
+ )
91
+
92
+ val firstSplit = subcompose(Slot.FirstSplit) {
93
+ Box(
94
+ modifier = Modifier.fillMaxWidth(),
95
+ contentAlignment = Alignment.CenterStart,
96
+ ) {
97
+ first()
98
+ }
99
+ }.first().measure(firstConstraints)
100
+
101
+ val secondSplit = subcompose(Slot.SecondSplit) {
102
+ Box(
103
+ modifier = Modifier.fillMaxWidth(),
104
+ contentAlignment = Alignment.CenterEnd,
105
+ ) {
106
+ second()
107
+ }
108
+ }.first().measure(secondConstraints)
109
+
110
+ val height = max(firstSplit.height, secondSplit.height).coerceAtLeast(constraints.minHeight)
111
+
112
+ layout(maxWidth, height) {
113
+ val firstY = (height - firstSplit.height) / 2
114
+ val secondY = (height - secondSplit.height) / 2
115
+ firstSplit.placeRelative(0, firstY)
116
+ secondSplit.placeRelative(firstWidth + spacingPx, secondY)
117
+ }
118
+ } else {
119
+ val height = max(firstNatural.height, secondNatural.height).coerceAtLeast(constraints.minHeight)
120
+
121
+ layout(maxWidth, height) {
122
+ val firstY = (height - firstNatural.height) / 2
123
+ val secondY = (height - secondNatural.height) / 2
124
+ firstNatural.placeRelative(0, firstY)
125
+ secondNatural.placeRelative(maxWidth - secondNatural.width, secondY)
126
+ }
127
+ }
128
+ }
129
+ }
130
+
131
+ private enum class Slot {
132
+ FirstMeasure,
133
+ SecondMeasure,
134
+ FirstSplit,
135
+ SecondSplit,
136
+ }
@@ -1,94 +1,94 @@
1
- package expo.modules.pytechui
2
-
3
- import android.graphics.Color as AndroidColor
4
- import androidx.compose.foundation.layout.heightIn
5
- import androidx.compose.ui.Modifier
6
- import androidx.compose.ui.draw.drawBehind
7
- import androidx.compose.ui.geometry.Offset
8
- import androidx.compose.ui.graphics.Brush
9
- import androidx.compose.ui.graphics.Color as ComposeColor
10
- import androidx.compose.ui.platform.LocalConfiguration
11
- import androidx.compose.ui.unit.Dp
12
- import androidx.compose.ui.unit.dp
13
- import expo.modules.ui.ModifierRegistry
14
- import expo.modules.ui.columnScope
15
- import expo.modules.ui.rowScope
16
-
17
- private fun normalizeColorString(s: String): String {
18
- val t = s.trim()
19
- return if (t.startsWith("#")) t else "#$t"
20
- }
21
-
22
- /**
23
- * Registra modificadores extra para Jetpack Compose (p. ej. degradados con [Brush]).
24
- * Debe llamarse al crear el módulo nativo; [ModifierRegistry] es el mismo que usa @expo/ui.
25
- */
26
- fun registerModifiers() {
27
-
28
- // --------------------------- backgroundLinearGradient---------------------------
29
-
30
- ModifierRegistry.register("backgroundLinearGradient") { map, _, _, _ ->
31
- val raw = map["colors"] as? List<*> ?: return@register Modifier
32
- val composeColors = raw.mapNotNull { item ->
33
- val hex = (item as? String)?.trim()?.takeIf { it.isNotEmpty() } ?: return@mapNotNull null
34
- runCatching {
35
- val argb = AndroidColor.parseColor(normalizeColorString(hex))
36
- ComposeColor(argb)
37
- }.getOrNull()
38
- }
39
- if (composeColors.size < 2) return@register Modifier
40
-
41
- val sx = (map["startX"] as? Number)?.toFloat() ?: 0f
42
- val sy = (map["startY"] as? Number)?.toFloat() ?: 0f
43
- val ex = (map["endX"] as? Number)?.toFloat() ?: 0f
44
- val ey = (map["endY"] as? Number)?.toFloat() ?: 1f
45
-
46
- Modifier.drawBehind {
47
- val brush = Brush.linearGradient(
48
- colors = composeColors,
49
- start = Offset(size.width * sx, size.height * sy),
50
- end = Offset(size.width * ex, size.height * ey)
51
- )
52
- drawRect(brush = brush, size = size)
53
- }
54
- }
55
-
56
- // --------------------------- heightIn ------------------------------------------
57
-
58
- ModifierRegistry.register("heightIn") { map, _, _, _ ->
59
- val minDp = (map["min"] as? Number)?.toFloat()
60
- val maxDp = (map["max"] as? Number)?.toFloat()
61
- val minFraction = (map["minFraction"] as? Number)?.toFloat()
62
- val maxFraction = (map["maxFraction"] as? Number)?.toFloat()
63
-
64
- val screenHeightDp = LocalConfiguration.current.screenHeightDp.toFloat()
65
-
66
- val resolvedMin = when {
67
- minDp != null -> minDp.dp
68
- minFraction != null -> (screenHeightDp * minFraction).dp
69
- else -> Dp.Unspecified
70
- }
71
- val resolvedMax = when {
72
- maxFraction != null -> (screenHeightDp * maxFraction).dp
73
- maxDp != null -> maxDp.dp
74
- else -> Dp.Unspecified
75
- }
76
-
77
- Modifier.heightIn(min = resolvedMin, max = resolvedMax)
78
- }
79
-
80
- // --------------------------- flexWeight ----------------------------------------
81
-
82
- ModifierRegistry.register("flexWeight") { map, scope, _, _ ->
83
- val weight = (map["weight"] as? Number)?.toFloat() ?: 1f
84
- val fill = map["fill"] as? Boolean ?: false
85
-
86
- scope?.rowScope?.run {
87
- Modifier.weight(weight, fill = fill)
88
- } ?: scope?.columnScope?.run {
89
- Modifier.weight(weight, fill = fill)
90
- } ?: Modifier
91
- }
92
-
93
- // -------------------------------------------------------------------------------
1
+ package expo.modules.pytechui
2
+
3
+ import android.graphics.Color as AndroidColor
4
+ import androidx.compose.foundation.layout.heightIn
5
+ import androidx.compose.ui.Modifier
6
+ import androidx.compose.ui.draw.drawBehind
7
+ import androidx.compose.ui.geometry.Offset
8
+ import androidx.compose.ui.graphics.Brush
9
+ import androidx.compose.ui.graphics.Color as ComposeColor
10
+ import androidx.compose.ui.platform.LocalConfiguration
11
+ import androidx.compose.ui.unit.Dp
12
+ import androidx.compose.ui.unit.dp
13
+ import expo.modules.ui.ModifierRegistry
14
+ import expo.modules.ui.columnScope
15
+ import expo.modules.ui.rowScope
16
+
17
+ private fun normalizeColorString(s: String): String {
18
+ val t = s.trim()
19
+ return if (t.startsWith("#")) t else "#$t"
20
+ }
21
+
22
+ /**
23
+ * Registra modificadores extra para Jetpack Compose (p. ej. degradados con [Brush]).
24
+ * Debe llamarse al crear el módulo nativo; [ModifierRegistry] es el mismo que usa @expo/ui.
25
+ */
26
+ fun registerModifiers() {
27
+
28
+ // --------------------------- backgroundLinearGradient---------------------------
29
+
30
+ ModifierRegistry.register("backgroundLinearGradient") { map, _, _, _ ->
31
+ val raw = map["colors"] as? List<*> ?: return@register Modifier
32
+ val composeColors = raw.mapNotNull { item ->
33
+ val hex = (item as? String)?.trim()?.takeIf { it.isNotEmpty() } ?: return@mapNotNull null
34
+ runCatching {
35
+ val argb = AndroidColor.parseColor(normalizeColorString(hex))
36
+ ComposeColor(argb)
37
+ }.getOrNull()
38
+ }
39
+ if (composeColors.size < 2) return@register Modifier
40
+
41
+ val sx = (map["startX"] as? Number)?.toFloat() ?: 0f
42
+ val sy = (map["startY"] as? Number)?.toFloat() ?: 0f
43
+ val ex = (map["endX"] as? Number)?.toFloat() ?: 0f
44
+ val ey = (map["endY"] as? Number)?.toFloat() ?: 1f
45
+
46
+ Modifier.drawBehind {
47
+ val brush = Brush.linearGradient(
48
+ colors = composeColors,
49
+ start = Offset(size.width * sx, size.height * sy),
50
+ end = Offset(size.width * ex, size.height * ey)
51
+ )
52
+ drawRect(brush = brush, size = size)
53
+ }
54
+ }
55
+
56
+ // --------------------------- heightIn ------------------------------------------
57
+
58
+ ModifierRegistry.register("heightIn") { map, _, _, _ ->
59
+ val minDp = (map["min"] as? Number)?.toFloat()
60
+ val maxDp = (map["max"] as? Number)?.toFloat()
61
+ val minFraction = (map["minFraction"] as? Number)?.toFloat()
62
+ val maxFraction = (map["maxFraction"] as? Number)?.toFloat()
63
+
64
+ val screenHeightDp = LocalConfiguration.current.screenHeightDp.toFloat()
65
+
66
+ val resolvedMin = when {
67
+ minDp != null -> minDp.dp
68
+ minFraction != null -> (screenHeightDp * minFraction).dp
69
+ else -> Dp.Unspecified
70
+ }
71
+ val resolvedMax = when {
72
+ maxFraction != null -> (screenHeightDp * maxFraction).dp
73
+ maxDp != null -> maxDp.dp
74
+ else -> Dp.Unspecified
75
+ }
76
+
77
+ Modifier.heightIn(min = resolvedMin, max = resolvedMax)
78
+ }
79
+
80
+ // --------------------------- flexWeight ----------------------------------------
81
+
82
+ ModifierRegistry.register("flexWeight") { map, scope, _, _ ->
83
+ val weight = (map["weight"] as? Number)?.toFloat() ?: 1f
84
+ val fill = map["fill"] as? Boolean ?: false
85
+
86
+ scope?.rowScope?.run {
87
+ Modifier.weight(weight, fill = fill)
88
+ } ?: scope?.columnScope?.run {
89
+ Modifier.weight(weight, fill = fill)
90
+ } ?: Modifier
91
+ }
92
+
93
+ // -------------------------------------------------------------------------------
94
94
  }