pytech-ui 1.0.30 → 1.0.32
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.
- package/LICENSE +21 -21
- package/README.md +40 -40
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/nb-cache/trust/8732A504261C070E1F639E78DF65F8E6DC6FFC865B3D7178A7609BB57105805F +1 -1
- package/android/build.gradle +48 -47
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/expo/modules/pytechui/Dialog.kt +39 -39
- package/android/src/main/java/expo/modules/pytechui/ForEach/ForEachRecords.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/ForEach/index.kt +82 -82
- package/android/src/main/java/expo/modules/pytechui/Gradient/GradientView.kt +124 -124
- package/android/src/main/java/expo/modules/pytechui/Icon/index.kt +36 -36
- package/android/src/main/java/expo/modules/pytechui/Icon/utils.kt +42 -42
- package/android/src/main/java/expo/modules/pytechui/ListItem/Data/ListItemDataRecords.kt +84 -84
- package/android/src/main/java/expo/modules/pytechui/ListItem/Data/ListItemFromData.kt +127 -127
- package/android/src/main/java/expo/modules/pytechui/ListItem/Slots/ListItemFromSlots.kt +60 -60
- package/android/src/main/java/expo/modules/pytechui/ListItem/Slots/types.kt +42 -42
- package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Decorator/Decorator.kt +79 -79
- package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Decorator/Divider.kt +36 -36
- package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Decorator/utilsDecorator.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Dynamic/Dynamic.kt +163 -163
- package/android/src/main/java/expo/modules/pytechui/ListItem/_shared/Dynamic/Row.kt +136 -136
- package/android/src/main/java/expo/modules/pytechui/Navigation/NavigationWrapperView.kt +80 -0
- package/android/src/main/java/expo/modules/pytechui/PytechUiModifiers.kt +93 -93
- package/android/src/main/java/expo/modules/pytechui/PytechUiModule.kt +186 -168
- package/android/src/main/java/expo/modules/pytechui/SearchBar.kt +213 -213
- package/android/src/main/java/expo/modules/pytechui/Section/SectionHost.kt +81 -81
- package/android/src/main/java/expo/modules/pytechui/Section/SectionHostView.kt +65 -65
- package/android/src/main/java/expo/modules/pytechui/TextField.kt +251 -251
- package/android/src/main/java/expo/modules/pytechui/TypographySlot/TypographySlotBridge.kt +120 -120
- package/android/src/main/java/expo/modules/pytechui/TypographySlot/constants.kt +47 -47
- package/android/src/main/java/expo/modules/pytechui/extended-theme/ExtendedThemeView.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Colors/ExtendedColorBridge.kt +76 -76
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Constants/Constants.kt +10 -10
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarLargeFlexibleTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarLargeTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarMediumFlexibleTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarMediumTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarSmallTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AppBarTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/AssistChipTokens.kt +25 -25
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/BadgeTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/BaselineButtonTokens.kt +26 -26
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/BottomAppBarTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonGroupSmallTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonLargeTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonMediumTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonSmallTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonXLargeTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ButtonXSmallTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/CheckboxTokens.kt +35 -35
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/CircularProgressIndicatorTokens.kt +25 -25
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ConnectedButtonGroupSmallTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DateInputModalTokens.kt +22 -22
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DatePickerModalTokens.kt +33 -33
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DialogTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DividerTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DockedToolbarTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/DragHandleTokens.kt +25 -25
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ElevatedButtonTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ElevatedCardTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ElevationTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExpressiveMotionTokens.kt +28 -28
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabLargeTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabMediumTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabPrimaryTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ExtendedFabSmallTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabBaselineTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabLargeTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabMediumTokens.kt +22 -22
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabMenuBaselineTokens.kt +28 -28
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FabSmallTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledAutocompleteTokens.kt +31 -31
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledButtonTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledCardTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledIconButtonTokens.kt +18 -18
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledTextFieldTokens.kt +31 -31
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledTonalButtonTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilledTonalIconButtonTokens.kt +18 -18
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FilterChipTokens.kt +28 -28
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/FloatingToolbarTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/IconButtonTokens.kt +17 -17
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/InputChipTokens.kt +30 -30
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/LargeIconButtonTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/LinearProgressIndicatorTokens.kt +28 -28
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ListTokens.kt +57 -57
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/LoadingIndicatorTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/MediumIconButtonTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/MotionTokens.kt +44 -44
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationBarHorizontalItemTokens.kt +22 -22
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationBarTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationBarVerticalItemTokens.kt +22 -22
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationDrawerTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailBaselineItemTokens.kt +25 -25
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailCollapsedTokens.kt +23 -23
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailExpandedTokens.kt +22 -22
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailHorizontalItemTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/NavigationRailVerticalItemTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedAutocompleteTokens.kt +30 -30
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedButtonTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedCardTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedIconButtonTokens.kt +18 -18
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedSegmentedButtonTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/OutlinedTextFieldTokens.kt +31 -31
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/PrimaryNavigationTabTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/RadioButtonTokens.kt +22 -22
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ScrimTokens.kt +17 -17
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SearchBarTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SearchViewTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SecondaryNavigationTabTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SegmentedMenuTokens.kt +42 -42
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/ShapeTokens.kt +74 -74
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SheetBottomTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SliderTokens.kt +39 -39
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SmallIconButtonTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SnackbarTokens.kt +21 -21
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonLargeTokens.kt +26 -26
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonMediumTokens.kt +26 -26
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonSmallTokens.kt +26 -26
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonXLargeTokens.kt +26 -26
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SplitButtonXSmallTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/StandardMenuTokens.kt +25 -25
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/StandardMotionTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/StateTokens.kt +20 -20
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SuggestionChipTokens.kt +25 -25
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/SwitchTokens.kt +37 -37
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TextButtonTokens.kt +18 -18
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TimeInputTokens.kt +24 -24
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TimePickerTokens.kt +30 -30
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TonalButtonTokens.kt +19 -19
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/TypeScaleTokens.kt +72 -72
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/VibrantMenuTokens.kt +26 -26
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/XLargeIconButtonTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/assets/XSmallIconButtonTokens.kt +27 -27
- package/android/src/main/java/expo/modules/pytechui/extended-theme/assets/Tokens/index.kt +216 -216
- package/android/src/main/java/expo/modules/pytechui/extended-theme/index.kt +38 -38
- package/android/src/main/java/expo/modules/pytechui/utils/children.kt +126 -126
- package/android/src/main/java/expo/modules/pytechui/utils/modifiers.kt +44 -44
- package/build/constants/utils.d.ts +1 -1
- package/build/contexts/alert/components/Alert/index.js +16 -16
- package/build/contexts/alert/components/Button/index.js +5 -5
- package/build/contexts/alert/components/Provider/index.ios.js +2 -2
- package/build/contexts/alert/components/Provider/index.js +3 -3
- package/build/contexts/alert/context/provider.d.ts +1 -1
- package/build/contexts/alert/context/provider.js +1 -1
- package/build/contexts/app/context.d.ts +1 -1
- package/build/contexts/app/context.js +15 -15
- package/build/contexts/app/index.d.ts +2 -2
- package/build/contexts/app/index.js +2 -2
- package/build/contexts/app/src/Head/index.d.ts +1 -1
- package/build/contexts/app/src/Head/index.web.js +12 -12
- package/build/contexts/app/src/Wrapper/index.d.ts +1 -1
- package/build/contexts/app/src/Wrapper/index.js +2 -2
- package/build/contexts/app/src/styles.css +16 -16
- package/build/contexts/app/types.d.ts +1 -1
- package/build/contexts/router/index.d.ts +1 -1
- package/build/contexts/router/index.js +3 -3
- package/build/jetpack-compose/components/Columns/CommonColumn/index.js +2 -2
- package/build/jetpack-compose/components/Columns/CommonColumn/types.d.ts +1 -1
- package/build/jetpack-compose/components/Columns/CommonColumn/utils.d.ts +1 -1
- package/build/jetpack-compose/components/Columns/CommonColumn/utils.js +1 -1
- package/build/jetpack-compose/components/DropdownMenu/index.d.ts +1 -1
- package/build/jetpack-compose/components/DropdownMenu/index.js +3 -3
- package/build/jetpack-compose/components/DropdownPicker/Picker.d.ts +3 -3
- package/build/jetpack-compose/components/DropdownPicker/Picker.js +24 -24
- package/build/jetpack-compose/components/DropdownPicker/PickerItem.js +5 -5
- package/build/jetpack-compose/components/DropdownPicker/context.d.ts +4 -10
- package/build/jetpack-compose/components/ForEach/src/ForEach.d.ts +1 -1
- package/build/jetpack-compose/components/ForEach/src/ForEach.js +5 -5
- package/build/jetpack-compose/components/ForEach/src/ListItem.d.ts +1 -1
- package/build/jetpack-compose/components/ForEach/src/types.d.ts +1 -1
- package/build/jetpack-compose/components/Gradient/Gradient.js +1 -1
- package/build/jetpack-compose/components/Gradient/types.d.ts +1 -1
- package/build/jetpack-compose/components/Host.d.ts +4 -3
- package/build/jetpack-compose/components/Host.js +6 -2
- package/build/jetpack-compose/components/Icon/Icon/Icon.js +1 -1
- package/build/jetpack-compose/components/Icon/index.d.ts +1 -1
- package/build/jetpack-compose/components/IconSection/IconSection.js +19 -19
- package/build/jetpack-compose/components/IconSection/types.d.ts +1 -1
- package/build/jetpack-compose/components/IconSection/utils.js +1 -1
- package/build/jetpack-compose/components/List/CommonColumn.js +3 -3
- package/build/jetpack-compose/components/List/index.d.ts +1 -1
- package/build/jetpack-compose/components/List/index.js +11 -11
- package/build/jetpack-compose/components/ListItem/SlotListItem.d.ts +2 -2
- package/build/jetpack-compose/components/ListItem/SlotListItem.js +9 -9
- package/build/jetpack-compose/components/Menu/src/components/Divider.js +2 -2
- package/build/jetpack-compose/components/Menu/src/components/Icon.d.ts +1 -1
- package/build/jetpack-compose/components/Menu/src/components/Icon.js +1 -1
- package/build/jetpack-compose/components/Menu/src/components/Item.d.ts +2 -3
- package/build/jetpack-compose/components/Menu/src/components/Item.js +26 -26
- package/build/jetpack-compose/components/Menu/src/components/Label.d.ts +4 -1
- package/build/jetpack-compose/components/Menu/src/components/Label.js +3 -3
- package/build/jetpack-compose/components/Menu/src/components/Menu.d.ts +2 -2
- package/build/jetpack-compose/components/Menu/src/components/Menu.js +26 -26
- package/build/jetpack-compose/components/Menu/src/components/Trigger.js +7 -7
- package/build/jetpack-compose/components/Menu/src/context.d.ts +8 -6
- package/build/jetpack-compose/components/Menu/src/utils.js +3 -3
- package/build/jetpack-compose/components/NavigationButton.d.ts +7 -0
- package/build/jetpack-compose/components/NavigationButton.js +16 -0
- package/build/jetpack-compose/components/NavigationWrapper.d.ts +10 -0
- package/build/jetpack-compose/components/NavigationWrapper.js +16 -0
- package/build/jetpack-compose/components/PagePicker/Item.js +11 -11
- package/build/jetpack-compose/components/PagePicker/Picker.js +5 -5
- package/build/jetpack-compose/components/PagePicker/context/index.d.ts +1 -1
- package/build/jetpack-compose/components/PagePicker/context/index.js +8 -8
- package/build/jetpack-compose/components/PullToRefreshBox.js +1 -1
- package/build/jetpack-compose/components/SearchBar.d.ts +1 -1
- package/build/jetpack-compose/components/SearchBar.js +1 -1
- package/build/jetpack-compose/components/Section/components/Column.d.ts +1 -1
- package/build/jetpack-compose/components/Section/components/Column.js +3 -3
- package/build/jetpack-compose/components/Section/components/Section.js +18 -18
- package/build/jetpack-compose/components/Section/components/Slot.d.ts +1 -1
- package/build/jetpack-compose/components/Section/components/Slot.js +3 -3
- package/build/jetpack-compose/components/SectionHost/index.d.ts +1 -1
- package/build/jetpack-compose/components/SectionHost/index.js +3 -3
- package/build/jetpack-compose/components/TextField.d.ts +1 -1
- package/build/jetpack-compose/components/TextField.js +1 -1
- package/build/jetpack-compose/components/TextSlot.js +2 -3
- package/build/jetpack-compose/extended-theme/assets/Colors/index.js +2 -2
- package/build/jetpack-compose/index.d.ts +2 -0
- package/build/jetpack-compose/index.js +2 -0
- package/build/jetpack-compose/modifiers/flexWeight.d.ts +1 -1
- package/build/jetpack-compose/modifiers/heightIn.d.ts +1 -1
- package/build/swift-ui/Image.js +2 -2
- package/build/swift-ui/ListItem.js +2 -2
- package/build/swift-ui/Slot.js +2 -2
- package/build/swift-ui/Text.js +2 -2
- package/build/universal/Column/index.android.js +2 -2
- package/build/universal/Column/index.ios.js +2 -2
- package/build/universal/Column/index.js +2 -2
- package/build/universal/Host/index.ios.js +2 -2
- package/build/universal/Row/index.android.js +2 -2
- package/build/universal/Row/index.ios.js +2 -2
- package/build/universal/Row/index.js +2 -2
- package/expo-module.config.json +11 -11
- package/ios/ChevronForwardView.swift +21 -21
- package/ios/GradientView.swift +40 -40
- package/ios/ImageView.swift +32 -32
- package/ios/ListItem.swift +161 -161
- package/ios/PytechUi.podspec +24 -24
- package/ios/PytechUiModule.swift +15 -15
- package/ios/SlotView.swift +107 -107
- package/ios/_shared/utils.swift +58 -58
- package/package.json +19 -15
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
package expo.modules.pytechui.gradient
|
|
2
|
-
|
|
3
|
-
import android.graphics.Color
|
|
4
|
-
import androidx.compose.foundation.background
|
|
5
|
-
import androidx.compose.foundation.layout.Box
|
|
6
|
-
import androidx.compose.foundation.layout.size
|
|
7
|
-
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
8
|
-
import androidx.compose.material3.Icon
|
|
9
|
-
import androidx.compose.material3.Text
|
|
10
|
-
import androidx.compose.runtime.Composable
|
|
11
|
-
import androidx.compose.ui.Alignment
|
|
12
|
-
import androidx.compose.ui.Modifier
|
|
13
|
-
import androidx.compose.ui.draw.clip
|
|
14
|
-
import androidx.compose.ui.graphics.Brush
|
|
15
|
-
import androidx.compose.ui.graphics.Color as ComposeColor
|
|
16
|
-
import androidx.compose.ui.text.font.FontWeight
|
|
17
|
-
import androidx.compose.ui.unit.Dp
|
|
18
|
-
import androidx.compose.ui.unit.dp
|
|
19
|
-
import androidx.compose.ui.unit.sp
|
|
20
|
-
import expo.modules.kotlin.records.Field
|
|
21
|
-
import expo.modules.kotlin.records.Record
|
|
22
|
-
import expo.modules.kotlin.views.ComposeProps
|
|
23
|
-
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
24
|
-
import expo.modules.pytechui.components.Icon.parseIconSource
|
|
25
|
-
import expo.modules.pytechui.getModifier
|
|
26
|
-
import expo.modules.pytechui.theme.ExtendedTheme
|
|
27
|
-
import expo.modules.ui.ModifierList
|
|
28
|
-
import expo.modules.ui.compose
|
|
29
|
-
|
|
30
|
-
data class GradientPaletteRecord(
|
|
31
|
-
@Field val light: Color? = null,
|
|
32
|
-
@Field val dark: Color? = null,
|
|
33
|
-
) : Record
|
|
34
|
-
|
|
35
|
-
data class GradientProps(
|
|
36
|
-
val text: String? = null,
|
|
37
|
-
val fontSize: Double? = null,
|
|
38
|
-
val size: Double? = null,
|
|
39
|
-
val colors: GradientPaletteRecord? = null,
|
|
40
|
-
val source: String? = null,
|
|
41
|
-
val iconSize: Double? = null,
|
|
42
|
-
val modifiers: ModifierList = emptyList(),
|
|
43
|
-
) : ComposeProps
|
|
44
|
-
|
|
45
|
-
@Composable
|
|
46
|
-
internal fun FunctionalComposableScope.GradientViewContent(props: GradientProps) {
|
|
47
|
-
GradientCircle(
|
|
48
|
-
modifier = getModifier(props.modifiers),
|
|
49
|
-
text = props.text,
|
|
50
|
-
fontSize = props.fontSize?.toFloat(),
|
|
51
|
-
sizeDp = props.size?.toFloat(),
|
|
52
|
-
lightColor = props.colors?.light?.compose,
|
|
53
|
-
darkColor = props.colors?.dark?.compose,
|
|
54
|
-
source = props.source,
|
|
55
|
-
iconSize = props.iconSize?.toFloat(),
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@Composable
|
|
60
|
-
internal fun GradientCircle(
|
|
61
|
-
modifier: Modifier = Modifier,
|
|
62
|
-
text: String? = null,
|
|
63
|
-
fontSize: Float? = null,
|
|
64
|
-
sizeDp: Float? = null,
|
|
65
|
-
lightColor: ComposeColor? = null,
|
|
66
|
-
darkColor: ComposeColor? = null,
|
|
67
|
-
source: String? = null,
|
|
68
|
-
iconSize: Float? = null,
|
|
69
|
-
) {
|
|
70
|
-
val diameter = sizeDp?.dp ?: return
|
|
71
|
-
val gradientColors = resolveGradientColors(lightColor, darkColor)
|
|
72
|
-
|
|
73
|
-
Box(
|
|
74
|
-
modifier = modifier
|
|
75
|
-
.size(diameter)
|
|
76
|
-
.clip(RoundedCornerShape(percent = 50)),
|
|
77
|
-
contentAlignment = Alignment.Center,
|
|
78
|
-
) {
|
|
79
|
-
Box(
|
|
80
|
-
modifier = Modifier
|
|
81
|
-
.matchParentSize()
|
|
82
|
-
.background(Brush.verticalGradient(gradientColors)),
|
|
83
|
-
)
|
|
84
|
-
when {
|
|
85
|
-
!text.isNullOrBlank() -> {
|
|
86
|
-
Text(
|
|
87
|
-
text = text,
|
|
88
|
-
color = ComposeColor.White,
|
|
89
|
-
fontWeight = FontWeight.Bold,
|
|
90
|
-
letterSpacing = (-0.5).sp,
|
|
91
|
-
fontSize = (fontSize ?: 24f).sp,
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
!source.isNullOrBlank() -> {
|
|
95
|
-
parseIconSource(source)?.let { imageVector ->
|
|
96
|
-
Icon(
|
|
97
|
-
imageVector = imageVector,
|
|
98
|
-
contentDescription = null,
|
|
99
|
-
tint = ComposeColor.White,
|
|
100
|
-
modifier = Modifier.size(iconSizeDp(iconSize, diameter)),
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
private fun iconSizeDp(iconSize: Float?, diameter: Dp): Dp {
|
|
109
|
-
return (iconSize ?: (diameter.value / 2f)).dp
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@Composable
|
|
113
|
-
private fun resolveGradientColors(
|
|
114
|
-
light: ComposeColor?,
|
|
115
|
-
dark: ComposeColor?,
|
|
116
|
-
): List<ComposeColor> = when {
|
|
117
|
-
light != null && dark != null -> listOf(light, dark)
|
|
118
|
-
light != null -> listOf(light, light)
|
|
119
|
-
dark != null -> listOf(dark, dark)
|
|
120
|
-
else -> listOf(
|
|
121
|
-
ExtendedTheme.colorScheme.link.copy(alpha = 0.85f),
|
|
122
|
-
ExtendedTheme.colorScheme.link,
|
|
123
|
-
)
|
|
124
|
-
}
|
|
1
|
+
package expo.modules.pytechui.gradient
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color
|
|
4
|
+
import androidx.compose.foundation.background
|
|
5
|
+
import androidx.compose.foundation.layout.Box
|
|
6
|
+
import androidx.compose.foundation.layout.size
|
|
7
|
+
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
8
|
+
import androidx.compose.material3.Icon
|
|
9
|
+
import androidx.compose.material3.Text
|
|
10
|
+
import androidx.compose.runtime.Composable
|
|
11
|
+
import androidx.compose.ui.Alignment
|
|
12
|
+
import androidx.compose.ui.Modifier
|
|
13
|
+
import androidx.compose.ui.draw.clip
|
|
14
|
+
import androidx.compose.ui.graphics.Brush
|
|
15
|
+
import androidx.compose.ui.graphics.Color as ComposeColor
|
|
16
|
+
import androidx.compose.ui.text.font.FontWeight
|
|
17
|
+
import androidx.compose.ui.unit.Dp
|
|
18
|
+
import androidx.compose.ui.unit.dp
|
|
19
|
+
import androidx.compose.ui.unit.sp
|
|
20
|
+
import expo.modules.kotlin.records.Field
|
|
21
|
+
import expo.modules.kotlin.records.Record
|
|
22
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
23
|
+
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
24
|
+
import expo.modules.pytechui.components.Icon.parseIconSource
|
|
25
|
+
import expo.modules.pytechui.getModifier
|
|
26
|
+
import expo.modules.pytechui.theme.ExtendedTheme
|
|
27
|
+
import expo.modules.ui.ModifierList
|
|
28
|
+
import expo.modules.ui.compose
|
|
29
|
+
|
|
30
|
+
data class GradientPaletteRecord(
|
|
31
|
+
@Field val light: Color? = null,
|
|
32
|
+
@Field val dark: Color? = null,
|
|
33
|
+
) : Record
|
|
34
|
+
|
|
35
|
+
data class GradientProps(
|
|
36
|
+
val text: String? = null,
|
|
37
|
+
val fontSize: Double? = null,
|
|
38
|
+
val size: Double? = null,
|
|
39
|
+
val colors: GradientPaletteRecord? = null,
|
|
40
|
+
val source: String? = null,
|
|
41
|
+
val iconSize: Double? = null,
|
|
42
|
+
val modifiers: ModifierList = emptyList(),
|
|
43
|
+
) : ComposeProps
|
|
44
|
+
|
|
45
|
+
@Composable
|
|
46
|
+
internal fun FunctionalComposableScope.GradientViewContent(props: GradientProps) {
|
|
47
|
+
GradientCircle(
|
|
48
|
+
modifier = getModifier(props.modifiers),
|
|
49
|
+
text = props.text,
|
|
50
|
+
fontSize = props.fontSize?.toFloat(),
|
|
51
|
+
sizeDp = props.size?.toFloat(),
|
|
52
|
+
lightColor = props.colors?.light?.compose,
|
|
53
|
+
darkColor = props.colors?.dark?.compose,
|
|
54
|
+
source = props.source,
|
|
55
|
+
iconSize = props.iconSize?.toFloat(),
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@Composable
|
|
60
|
+
internal fun GradientCircle(
|
|
61
|
+
modifier: Modifier = Modifier,
|
|
62
|
+
text: String? = null,
|
|
63
|
+
fontSize: Float? = null,
|
|
64
|
+
sizeDp: Float? = null,
|
|
65
|
+
lightColor: ComposeColor? = null,
|
|
66
|
+
darkColor: ComposeColor? = null,
|
|
67
|
+
source: String? = null,
|
|
68
|
+
iconSize: Float? = null,
|
|
69
|
+
) {
|
|
70
|
+
val diameter = sizeDp?.dp ?: return
|
|
71
|
+
val gradientColors = resolveGradientColors(lightColor, darkColor)
|
|
72
|
+
|
|
73
|
+
Box(
|
|
74
|
+
modifier = modifier
|
|
75
|
+
.size(diameter)
|
|
76
|
+
.clip(RoundedCornerShape(percent = 50)),
|
|
77
|
+
contentAlignment = Alignment.Center,
|
|
78
|
+
) {
|
|
79
|
+
Box(
|
|
80
|
+
modifier = Modifier
|
|
81
|
+
.matchParentSize()
|
|
82
|
+
.background(Brush.verticalGradient(gradientColors)),
|
|
83
|
+
)
|
|
84
|
+
when {
|
|
85
|
+
!text.isNullOrBlank() -> {
|
|
86
|
+
Text(
|
|
87
|
+
text = text,
|
|
88
|
+
color = ComposeColor.White,
|
|
89
|
+
fontWeight = FontWeight.Bold,
|
|
90
|
+
letterSpacing = (-0.5).sp,
|
|
91
|
+
fontSize = (fontSize ?: 24f).sp,
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
!source.isNullOrBlank() -> {
|
|
95
|
+
parseIconSource(source)?.let { imageVector ->
|
|
96
|
+
Icon(
|
|
97
|
+
imageVector = imageVector,
|
|
98
|
+
contentDescription = null,
|
|
99
|
+
tint = ComposeColor.White,
|
|
100
|
+
modifier = Modifier.size(iconSizeDp(iconSize, diameter)),
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private fun iconSizeDp(iconSize: Float?, diameter: Dp): Dp {
|
|
109
|
+
return (iconSize ?: (diameter.value / 2f)).dp
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@Composable
|
|
113
|
+
private fun resolveGradientColors(
|
|
114
|
+
light: ComposeColor?,
|
|
115
|
+
dark: ComposeColor?,
|
|
116
|
+
): List<ComposeColor> = when {
|
|
117
|
+
light != null && dark != null -> listOf(light, dark)
|
|
118
|
+
light != null -> listOf(light, light)
|
|
119
|
+
dark != null -> listOf(dark, dark)
|
|
120
|
+
else -> listOf(
|
|
121
|
+
ExtendedTheme.colorScheme.link.copy(alpha = 0.85f),
|
|
122
|
+
ExtendedTheme.colorScheme.link,
|
|
123
|
+
)
|
|
124
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
package expo.modules.pytechui
|
|
2
|
-
|
|
3
|
-
import android.graphics.Color
|
|
4
|
-
import androidx.compose.material3.Icon
|
|
5
|
-
import androidx.compose.material3.LocalContentColor
|
|
6
|
-
import androidx.compose.runtime.Composable
|
|
7
|
-
import androidx.compose.ui.Modifier
|
|
8
|
-
import expo.modules.kotlin.views.ComposeProps
|
|
9
|
-
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
10
|
-
import expo.modules.pytechui.components.Icon.parseIconSource
|
|
11
|
-
import expo.modules.ui.ModifierList
|
|
12
|
-
import expo.modules.ui.compose
|
|
13
|
-
import androidx.compose.material3.MaterialTheme
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Props del icono. `View("IconView")` usa [kotlin.reflect.full.createInstance]: todos los
|
|
18
|
-
* parámetros del constructor primario deben tener valor por defecto.
|
|
19
|
-
*/
|
|
20
|
-
data class IconProps(
|
|
21
|
-
val source: String? = null,
|
|
22
|
-
val contentDescription: String? = null,
|
|
23
|
-
val tint: Color? = null,
|
|
24
|
-
val modifiers: ModifierList = emptyList()
|
|
25
|
-
) : ComposeProps
|
|
26
|
-
|
|
27
|
-
@Composable
|
|
28
|
-
internal fun FunctionalComposableScope.IconViewContent(props: IconProps) {
|
|
29
|
-
val imageVector = parseIconSource(props.source) ?: return
|
|
30
|
-
Icon(
|
|
31
|
-
imageVector = imageVector,
|
|
32
|
-
contentDescription = props.contentDescription,
|
|
33
|
-
tint = props.tint?.compose ?: LocalContentColor.current,
|
|
34
|
-
modifier = getModifier(props.modifiers),
|
|
35
|
-
)
|
|
36
|
-
}
|
|
1
|
+
package expo.modules.pytechui
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color
|
|
4
|
+
import androidx.compose.material3.Icon
|
|
5
|
+
import androidx.compose.material3.LocalContentColor
|
|
6
|
+
import androidx.compose.runtime.Composable
|
|
7
|
+
import androidx.compose.ui.Modifier
|
|
8
|
+
import expo.modules.kotlin.views.ComposeProps
|
|
9
|
+
import expo.modules.kotlin.views.FunctionalComposableScope
|
|
10
|
+
import expo.modules.pytechui.components.Icon.parseIconSource
|
|
11
|
+
import expo.modules.ui.ModifierList
|
|
12
|
+
import expo.modules.ui.compose
|
|
13
|
+
import androidx.compose.material3.MaterialTheme
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Props del icono. `View("IconView")` usa [kotlin.reflect.full.createInstance]: todos los
|
|
18
|
+
* parámetros del constructor primario deben tener valor por defecto.
|
|
19
|
+
*/
|
|
20
|
+
data class IconProps(
|
|
21
|
+
val source: String? = null,
|
|
22
|
+
val contentDescription: String? = null,
|
|
23
|
+
val tint: Color? = null,
|
|
24
|
+
val modifiers: ModifierList = emptyList()
|
|
25
|
+
) : ComposeProps
|
|
26
|
+
|
|
27
|
+
@Composable
|
|
28
|
+
internal fun FunctionalComposableScope.IconViewContent(props: IconProps) {
|
|
29
|
+
val imageVector = parseIconSource(props.source) ?: return
|
|
30
|
+
Icon(
|
|
31
|
+
imageVector = imageVector,
|
|
32
|
+
contentDescription = props.contentDescription,
|
|
33
|
+
tint = props.tint?.compose ?: LocalContentColor.current,
|
|
34
|
+
modifier = getModifier(props.modifiers),
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
package expo.modules.pytechui.components.Icon
|
|
2
|
-
|
|
3
|
-
import androidx.compose.material.icons.Icons
|
|
4
|
-
import androidx.compose.ui.graphics.vector.ImageVector
|
|
5
|
-
|
|
6
|
-
private fun getMaterialIconByName(name: String, theme: String = "Filled"): ImageVector? {
|
|
7
|
-
return try {
|
|
8
|
-
val (packagePath, themeInstance) = when (theme.lowercase()) {
|
|
9
|
-
"filled", "default" -> "filled" to Icons.Filled
|
|
10
|
-
"outlined" -> "outlined" to Icons.Outlined
|
|
11
|
-
"rounded" -> "rounded" to Icons.Rounded
|
|
12
|
-
"twotone", "two_tone", "two-tone" -> "twotone" to Icons.TwoTone
|
|
13
|
-
"sharp" -> "sharp" to Icons.Sharp
|
|
14
|
-
else -> "filled" to Icons.Filled
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
val className = "androidx.compose.material.icons.${packagePath}.${name}Kt"
|
|
18
|
-
val cl = Class.forName(className)
|
|
19
|
-
val method = cl.declaredMethods.first()
|
|
20
|
-
method.invoke(null, themeInstance) as ImageVector
|
|
21
|
-
} catch (e: Exception) {
|
|
22
|
-
null
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
fun parseIconSource(source: String?): ImageVector? {
|
|
27
|
-
if (source.isNullOrBlank()) return null
|
|
28
|
-
|
|
29
|
-
// Quita el prefijo "Icons." si viene
|
|
30
|
-
val withoutPrefix = if (source.startsWith("Icons.")) source.removePrefix("Icons.") else source
|
|
31
|
-
// withoutPrefix puede ser: "Filled.Favorite"
|
|
32
|
-
|
|
33
|
-
val parts = withoutPrefix.split(".")
|
|
34
|
-
return when {
|
|
35
|
-
parts.size >= 2 -> {
|
|
36
|
-
// "Filled.Favorite"
|
|
37
|
-
val theme = parts[0] // "Filled"
|
|
38
|
-
val name = parts.drop(1).joinToString("") // "Favorite"
|
|
39
|
-
getMaterialIconByName(name, theme)
|
|
40
|
-
}
|
|
41
|
-
else -> null
|
|
42
|
-
}
|
|
1
|
+
package expo.modules.pytechui.components.Icon
|
|
2
|
+
|
|
3
|
+
import androidx.compose.material.icons.Icons
|
|
4
|
+
import androidx.compose.ui.graphics.vector.ImageVector
|
|
5
|
+
|
|
6
|
+
private fun getMaterialIconByName(name: String, theme: String = "Filled"): ImageVector? {
|
|
7
|
+
return try {
|
|
8
|
+
val (packagePath, themeInstance) = when (theme.lowercase()) {
|
|
9
|
+
"filled", "default" -> "filled" to Icons.Filled
|
|
10
|
+
"outlined" -> "outlined" to Icons.Outlined
|
|
11
|
+
"rounded" -> "rounded" to Icons.Rounded
|
|
12
|
+
"twotone", "two_tone", "two-tone" -> "twotone" to Icons.TwoTone
|
|
13
|
+
"sharp" -> "sharp" to Icons.Sharp
|
|
14
|
+
else -> "filled" to Icons.Filled
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
val className = "androidx.compose.material.icons.${packagePath}.${name}Kt"
|
|
18
|
+
val cl = Class.forName(className)
|
|
19
|
+
val method = cl.declaredMethods.first()
|
|
20
|
+
method.invoke(null, themeInstance) as ImageVector
|
|
21
|
+
} catch (e: Exception) {
|
|
22
|
+
null
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
fun parseIconSource(source: String?): ImageVector? {
|
|
27
|
+
if (source.isNullOrBlank()) return null
|
|
28
|
+
|
|
29
|
+
// Quita el prefijo "Icons." si viene
|
|
30
|
+
val withoutPrefix = if (source.startsWith("Icons.")) source.removePrefix("Icons.") else source
|
|
31
|
+
// withoutPrefix puede ser: "Filled.Favorite"
|
|
32
|
+
|
|
33
|
+
val parts = withoutPrefix.split(".")
|
|
34
|
+
return when {
|
|
35
|
+
parts.size >= 2 -> {
|
|
36
|
+
// "Filled.Favorite"
|
|
37
|
+
val theme = parts[0] // "Filled"
|
|
38
|
+
val name = parts.drop(1).joinToString("") // "Favorite"
|
|
39
|
+
getMaterialIconByName(name, theme)
|
|
40
|
+
}
|
|
41
|
+
else -> null
|
|
42
|
+
}
|
|
43
43
|
}
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
package expo.modules.pytechui.ListItem
|
|
2
|
-
|
|
3
|
-
import android.graphics.Color
|
|
4
|
-
import expo.modules.kotlin.records.Field
|
|
5
|
-
import expo.modules.kotlin.records.Record
|
|
6
|
-
import expo.modules.pytechui.gradient.GradientPaletteRecord
|
|
7
|
-
import expo.modules.ui.ModifierList
|
|
8
|
-
import expo.modules.ui.TextAlignType
|
|
9
|
-
import expo.modules.ui.TextDecorationType
|
|
10
|
-
import expo.modules.ui.TextFontStyle
|
|
11
|
-
import expo.modules.ui.TextFontWeight
|
|
12
|
-
import expo.modules.ui.TextOverflowType
|
|
13
|
-
|
|
14
|
-
/** Props serializables de un slot según su [ListItemSlotContentRecord.type]. */
|
|
15
|
-
data class ListItemSlotPropsRecord(
|
|
16
|
-
// Text
|
|
17
|
-
@Field val text: String? = null,
|
|
18
|
-
@Field val color: Color? = null,
|
|
19
|
-
@Field val fontSize: Float? = null,
|
|
20
|
-
@Field val fontWeight: TextFontWeight? = null,
|
|
21
|
-
@Field val fontStyle: TextFontStyle? = null,
|
|
22
|
-
@Field val fontFamily: String? = null,
|
|
23
|
-
@Field val textDecoration: TextDecorationType? = null,
|
|
24
|
-
@Field val letterSpacing: Float? = null,
|
|
25
|
-
@Field val lineHeight: Float? = null,
|
|
26
|
-
@Field val textAlign: TextAlignType? = null,
|
|
27
|
-
@Field val overflow: TextOverflowType? = null,
|
|
28
|
-
@Field val maxLines: Int? = null,
|
|
29
|
-
// Icon
|
|
30
|
-
@Field val source: String? = null,
|
|
31
|
-
@Field val contentDescription: String? = null,
|
|
32
|
-
@Field val tint: Color? = null,
|
|
33
|
-
// Gradient
|
|
34
|
-
@Field val size: Double? = null,
|
|
35
|
-
@Field val colors: GradientPaletteRecord? = null,
|
|
36
|
-
@Field val iconSize: Double? = null,
|
|
37
|
-
@Field val modifiers: ModifierList = emptyList(),
|
|
38
|
-
) : Record
|
|
39
|
-
|
|
40
|
-
data class ListItemSlotContentRecord(
|
|
41
|
-
@Field val type: String = "text",
|
|
42
|
-
@Field val props: ListItemSlotPropsRecord? = null,
|
|
43
|
-
) : Record
|
|
44
|
-
|
|
45
|
-
/** Slots serializables de la fila. */
|
|
46
|
-
data class ListItemContentRecord(
|
|
47
|
-
@Field val leadingContent: ListItemSlotContentRecord? = null,
|
|
48
|
-
@Field val headlineContent: ListItemSlotContentRecord? = null,
|
|
49
|
-
@Field val trailingContent: ListItemSlotContentRecord? = null,
|
|
50
|
-
@Field val overlineContent: ListItemSlotContentRecord? = null,
|
|
51
|
-
@Field val supportingContent: ListItemSlotContentRecord? = null,
|
|
52
|
-
) : Record
|
|
53
|
-
|
|
54
|
-
/** Misma forma que [ListItemProps], serializable para el bridge. */
|
|
55
|
-
data class ListItemPropsRecord(
|
|
56
|
-
@Field val showDivider: Boolean = true,
|
|
57
|
-
@Field val isFirst: Boolean? = null,
|
|
58
|
-
@Field val isLast: Boolean? = null,
|
|
59
|
-
@Field val hasNavigationLink: Boolean? = null,
|
|
60
|
-
@Field val tonalElevation: Float? = null,
|
|
61
|
-
@Field val shadowElevation: Float? = null,
|
|
62
|
-
@Field val colors: ListItemColorsRecord? = null,
|
|
63
|
-
@Field val modifiers: ModifierList = emptyList(),
|
|
64
|
-
) : Record
|
|
65
|
-
|
|
66
|
-
data class ListItemDataRecord(
|
|
67
|
-
@Field val id: String = "",
|
|
68
|
-
@Field val content: ListItemContentRecord = ListItemContentRecord(),
|
|
69
|
-
@Field val listItemProps: ListItemPropsRecord = ListItemPropsRecord(),
|
|
70
|
-
) : Record
|
|
71
|
-
|
|
72
|
-
internal fun ListItemPropsRecord.toListItemProps(
|
|
73
|
-
isFirst: Boolean,
|
|
74
|
-
isLast: Boolean,
|
|
75
|
-
) = ListItemProps(
|
|
76
|
-
showDivider = showDivider,
|
|
77
|
-
isFirst = isFirst,
|
|
78
|
-
isLast = isLast,
|
|
79
|
-
hasNavigationLink = hasNavigationLink,
|
|
80
|
-
tonalElevation = tonalElevation,
|
|
81
|
-
shadowElevation = shadowElevation,
|
|
82
|
-
colors = colors,
|
|
83
|
-
modifiers = modifiers,
|
|
84
|
-
)
|
|
1
|
+
package expo.modules.pytechui.ListItem
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color
|
|
4
|
+
import expo.modules.kotlin.records.Field
|
|
5
|
+
import expo.modules.kotlin.records.Record
|
|
6
|
+
import expo.modules.pytechui.gradient.GradientPaletteRecord
|
|
7
|
+
import expo.modules.ui.ModifierList
|
|
8
|
+
import expo.modules.ui.TextAlignType
|
|
9
|
+
import expo.modules.ui.TextDecorationType
|
|
10
|
+
import expo.modules.ui.TextFontStyle
|
|
11
|
+
import expo.modules.ui.TextFontWeight
|
|
12
|
+
import expo.modules.ui.TextOverflowType
|
|
13
|
+
|
|
14
|
+
/** Props serializables de un slot según su [ListItemSlotContentRecord.type]. */
|
|
15
|
+
data class ListItemSlotPropsRecord(
|
|
16
|
+
// Text
|
|
17
|
+
@Field val text: String? = null,
|
|
18
|
+
@Field val color: Color? = null,
|
|
19
|
+
@Field val fontSize: Float? = null,
|
|
20
|
+
@Field val fontWeight: TextFontWeight? = null,
|
|
21
|
+
@Field val fontStyle: TextFontStyle? = null,
|
|
22
|
+
@Field val fontFamily: String? = null,
|
|
23
|
+
@Field val textDecoration: TextDecorationType? = null,
|
|
24
|
+
@Field val letterSpacing: Float? = null,
|
|
25
|
+
@Field val lineHeight: Float? = null,
|
|
26
|
+
@Field val textAlign: TextAlignType? = null,
|
|
27
|
+
@Field val overflow: TextOverflowType? = null,
|
|
28
|
+
@Field val maxLines: Int? = null,
|
|
29
|
+
// Icon
|
|
30
|
+
@Field val source: String? = null,
|
|
31
|
+
@Field val contentDescription: String? = null,
|
|
32
|
+
@Field val tint: Color? = null,
|
|
33
|
+
// Gradient
|
|
34
|
+
@Field val size: Double? = null,
|
|
35
|
+
@Field val colors: GradientPaletteRecord? = null,
|
|
36
|
+
@Field val iconSize: Double? = null,
|
|
37
|
+
@Field val modifiers: ModifierList = emptyList(),
|
|
38
|
+
) : Record
|
|
39
|
+
|
|
40
|
+
data class ListItemSlotContentRecord(
|
|
41
|
+
@Field val type: String = "text",
|
|
42
|
+
@Field val props: ListItemSlotPropsRecord? = null,
|
|
43
|
+
) : Record
|
|
44
|
+
|
|
45
|
+
/** Slots serializables de la fila. */
|
|
46
|
+
data class ListItemContentRecord(
|
|
47
|
+
@Field val leadingContent: ListItemSlotContentRecord? = null,
|
|
48
|
+
@Field val headlineContent: ListItemSlotContentRecord? = null,
|
|
49
|
+
@Field val trailingContent: ListItemSlotContentRecord? = null,
|
|
50
|
+
@Field val overlineContent: ListItemSlotContentRecord? = null,
|
|
51
|
+
@Field val supportingContent: ListItemSlotContentRecord? = null,
|
|
52
|
+
) : Record
|
|
53
|
+
|
|
54
|
+
/** Misma forma que [ListItemProps], serializable para el bridge. */
|
|
55
|
+
data class ListItemPropsRecord(
|
|
56
|
+
@Field val showDivider: Boolean = true,
|
|
57
|
+
@Field val isFirst: Boolean? = null,
|
|
58
|
+
@Field val isLast: Boolean? = null,
|
|
59
|
+
@Field val hasNavigationLink: Boolean? = null,
|
|
60
|
+
@Field val tonalElevation: Float? = null,
|
|
61
|
+
@Field val shadowElevation: Float? = null,
|
|
62
|
+
@Field val colors: ListItemColorsRecord? = null,
|
|
63
|
+
@Field val modifiers: ModifierList = emptyList(),
|
|
64
|
+
) : Record
|
|
65
|
+
|
|
66
|
+
data class ListItemDataRecord(
|
|
67
|
+
@Field val id: String = "",
|
|
68
|
+
@Field val content: ListItemContentRecord = ListItemContentRecord(),
|
|
69
|
+
@Field val listItemProps: ListItemPropsRecord = ListItemPropsRecord(),
|
|
70
|
+
) : Record
|
|
71
|
+
|
|
72
|
+
internal fun ListItemPropsRecord.toListItemProps(
|
|
73
|
+
isFirst: Boolean,
|
|
74
|
+
isLast: Boolean,
|
|
75
|
+
) = ListItemProps(
|
|
76
|
+
showDivider = showDivider,
|
|
77
|
+
isFirst = isFirst,
|
|
78
|
+
isLast = isLast,
|
|
79
|
+
hasNavigationLink = hasNavigationLink,
|
|
80
|
+
tonalElevation = tonalElevation,
|
|
81
|
+
shadowElevation = shadowElevation,
|
|
82
|
+
colors = colors,
|
|
83
|
+
modifiers = modifiers,
|
|
84
|
+
)
|