@jamadd/react-native-template-ui 0.8.7 → 0.9.2
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/README.md +8 -0
- package/lib/module/components/accordion/ThemedAccordion.js +270 -0
- package/lib/module/components/accordion/ThemedAccordion.js.map +1 -0
- package/lib/module/components/button/AnimatedPressable.js +6 -0
- package/lib/module/components/button/AnimatedPressable.js.map +1 -1
- package/lib/module/components/button/AnimatedThemedPressable.js +15 -0
- package/lib/module/components/button/AnimatedThemedPressable.js.map +1 -1
- package/lib/module/components/button/ThemedButton.js +15 -0
- package/lib/module/components/button/ThemedButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconButton.js +15 -0
- package/lib/module/components/button/ThemedIconButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconTextButton.js +16 -0
- package/lib/module/components/button/ThemedIconTextButton.js.map +1 -1
- package/lib/module/components/button/ThemedPressable.js +15 -0
- package/lib/module/components/button/ThemedPressable.js.map +1 -1
- package/lib/module/components/icon/ThemedIcon.js +14 -0
- package/lib/module/components/icon/ThemedIcon.js.map +1 -1
- package/lib/module/components/list/List.js +15 -0
- package/lib/module/components/list/List.js.map +1 -1
- package/lib/module/components/loading/ThemedLoading.js +13 -0
- package/lib/module/components/loading/ThemedLoading.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.js +32 -3
- package/lib/module/components/overlay/actionSheet/ActionSheet.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js +4 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js +17 -2
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js +7 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js +6 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js +6 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js +6 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js +7 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js +7 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js +6 -0
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js +8 -2
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js.map +1 -1
- package/lib/module/components/overlay/alert/Alert.js +19 -0
- package/lib/module/components/overlay/alert/Alert.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButton.js +6 -0
- package/lib/module/components/overlay/alert/AlertButton.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButtons.js +6 -0
- package/lib/module/components/overlay/alert/AlertButtons.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertContent.js +6 -0
- package/lib/module/components/overlay/alert/AlertContent.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertWrap.js +7 -1
- package/lib/module/components/overlay/alert/AlertWrap.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js +15 -0
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedModal.js +18 -0
- package/lib/module/components/overlay/modal/ThemedModal.js.map +1 -1
- package/lib/module/components/overlay/toast/ThemedToast.js +17 -2
- package/lib/module/components/overlay/toast/ThemedToast.js.map +1 -1
- package/lib/module/components/provider/GestureProvider.js +11 -0
- package/lib/module/components/provider/GestureProvider.js.map +1 -1
- package/lib/module/components/provider/InsetsProvider.js +12 -0
- package/lib/module/components/provider/InsetsProvider.js.map +1 -1
- package/lib/module/components/provider/ReactNativeTemplateProviders.js +12 -0
- package/lib/module/components/provider/ReactNativeTemplateProviders.js.map +1 -1
- package/lib/module/components/provider/ThemeProvider.js +11 -0
- package/lib/module/components/provider/ThemeProvider.js.map +1 -1
- package/lib/module/components/separator/ThemedSeparator.js +19 -0
- package/lib/module/components/separator/ThemedSeparator.js.map +1 -1
- package/lib/module/components/slider/Slider.js +162 -213
- package/lib/module/components/slider/Slider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.js +24 -2
- package/lib/module/components/slider/ThemedSlider.js.map +1 -1
- package/lib/module/components/slider/ThemedSliderStepIndicator.js +6 -0
- package/lib/module/components/slider/ThemedSliderStepIndicator.js.map +1 -1
- package/lib/module/components/switch/ThemedSwitch.js +14 -0
- package/lib/module/components/switch/ThemedSwitch.js.map +1 -1
- package/lib/module/components/text/Text.js +5 -0
- package/lib/module/components/text/Text.js.map +1 -1
- package/lib/module/components/text/ThemedIconText.js +22 -0
- package/lib/module/components/text/ThemedIconText.js.map +1 -1
- package/lib/module/components/text/ThemedText.js +15 -0
- package/lib/module/components/text/ThemedText.js.map +1 -1
- package/lib/module/components/view/AnimatedThemedView.js +16 -0
- package/lib/module/components/view/AnimatedThemedView.js.map +1 -1
- package/lib/module/components/view/AnimatedView.js +6 -0
- package/lib/module/components/view/AnimatedView.js.map +1 -1
- package/lib/module/components/view/Box.js +5 -0
- package/lib/module/components/view/Box.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.js +79 -88
- package/lib/module/components/view/ThemedScreenWrap.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.web.js +84 -59
- package/lib/module/components/view/ThemedScreenWrap.web.js.map +1 -1
- package/lib/module/components/view/ThemedScrollView.js +17 -0
- package/lib/module/components/view/ThemedScrollView.js.map +1 -1
- package/lib/module/components/view/ThemedView.js +16 -0
- package/lib/module/components/view/ThemedView.js.map +1 -1
- package/lib/module/hooks/button.js +46 -0
- package/lib/module/hooks/button.js.map +1 -1
- package/lib/module/hooks/list.js +29 -0
- package/lib/module/hooks/list.js.map +1 -1
- package/lib/module/hooks/react.js +41 -0
- package/lib/module/hooks/react.js.map +1 -1
- package/lib/module/hooks/reanimated.js +10 -0
- package/lib/module/hooks/reanimated.js.map +1 -1
- package/lib/module/hooks/separator.js +18 -1
- package/lib/module/hooks/separator.js.map +1 -1
- package/lib/module/hooks/style.js +72 -0
- package/lib/module/hooks/style.js.map +1 -1
- package/lib/module/hooks/theme.js +93 -0
- package/lib/module/hooks/theme.js.map +1 -1
- package/lib/module/hooks/view.js +122 -1
- package/lib/module/hooks/view.js.map +1 -1
- package/lib/module/index.js +4 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/accordion.js +4 -0
- package/lib/module/types/accordion.js.map +1 -0
- package/lib/module/utils/button/const.js +28 -0
- package/lib/module/utils/button/const.js.map +1 -1
- package/lib/module/utils/overlay/const.js +72 -0
- package/lib/module/utils/overlay/const.js.map +1 -1
- package/lib/module/utils/overlay/func.js +101 -0
- package/lib/module/utils/overlay/func.js.map +1 -1
- package/lib/module/utils/slider/const.js +52 -0
- package/lib/module/utils/slider/const.js.map +1 -1
- package/lib/module/utils/style/const.js +14 -0
- package/lib/module/utils/style/const.js.map +1 -1
- package/lib/module/utils/style/func.js +102 -0
- package/lib/module/utils/style/func.js.map +1 -1
- package/lib/module/utils/theme/const.js +180 -0
- package/lib/module/utils/theme/const.js.map +1 -1
- package/lib/module/utils/theme/restyle.js +124 -0
- package/lib/module/utils/theme/restyle.js.map +1 -1
- package/lib/typescript/src/components/accordion/ThemedAccordion.d.ts +20 -0
- package/lib/typescript/src/components/accordion/ThemedAccordion.d.ts.map +1 -0
- package/lib/typescript/src/components/button/AnimatedPressable.d.ts +0 -1
- package/lib/typescript/src/components/button/AnimatedPressable.d.ts.map +1 -1
- package/lib/typescript/src/components/button/AnimatedThemedPressable.d.ts +14 -0
- package/lib/typescript/src/components/button/AnimatedThemedPressable.d.ts.map +1 -1
- package/lib/typescript/src/components/button/ThemedButton.d.ts +14 -0
- package/lib/typescript/src/components/button/ThemedButton.d.ts.map +1 -1
- package/lib/typescript/src/components/button/ThemedIconButton.d.ts +14 -0
- package/lib/typescript/src/components/button/ThemedIconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/button/ThemedIconTextButton.d.ts +15 -0
- package/lib/typescript/src/components/button/ThemedIconTextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/button/ThemedPressable.d.ts +15 -0
- package/lib/typescript/src/components/button/ThemedPressable.d.ts.map +1 -1
- package/lib/typescript/src/components/icon/ThemedIcon.d.ts +13 -0
- package/lib/typescript/src/components/icon/ThemedIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/list/List.d.ts +14 -0
- package/lib/typescript/src/components/list/List.d.ts.map +1 -1
- package/lib/typescript/src/components/loading/ThemedLoading.d.ts +12 -0
- package/lib/typescript/src/components/loading/ThemedLoading.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.d.ts +18 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetContentGesture.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetContentGesture.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListView.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListView.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListViewContent.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetListViewContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionList.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionList.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionListItem.d.ts +0 -3
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptionListItem.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptions.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetOptions.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollView.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollViewContent.d.ts +0 -3
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetScrollViewContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetWrap.d.ts +0 -2
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetWrap.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/alert/Alert.d.ts +18 -0
- package/lib/typescript/src/components/overlay/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/alert/AlertButton.d.ts +0 -3
- package/lib/typescript/src/components/overlay/alert/AlertButton.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/alert/AlertButtons.d.ts +0 -3
- package/lib/typescript/src/components/overlay/alert/AlertButtons.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/alert/AlertContent.d.ts +0 -3
- package/lib/typescript/src/components/overlay/alert/AlertContent.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/alert/AlertWrap.d.ts +0 -8
- package/lib/typescript/src/components/overlay/alert/AlertWrap.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/modal/ThemedLoadingModal.d.ts +14 -0
- package/lib/typescript/src/components/overlay/modal/ThemedLoadingModal.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/modal/ThemedModal.d.ts +17 -0
- package/lib/typescript/src/components/overlay/modal/ThemedModal.d.ts.map +1 -1
- package/lib/typescript/src/components/overlay/toast/ThemedToast.d.ts +14 -0
- package/lib/typescript/src/components/overlay/toast/ThemedToast.d.ts.map +1 -1
- package/lib/typescript/src/components/provider/GestureProvider.d.ts +11 -0
- package/lib/typescript/src/components/provider/GestureProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/provider/InsetsProvider.d.ts +11 -0
- package/lib/typescript/src/components/provider/InsetsProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/provider/ReactNativeTemplateProviders.d.ts +11 -0
- package/lib/typescript/src/components/provider/ReactNativeTemplateProviders.d.ts.map +1 -1
- package/lib/typescript/src/components/provider/ThemeProvider.d.ts +11 -0
- package/lib/typescript/src/components/provider/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/separator/ThemedSeparator.d.ts +18 -0
- package/lib/typescript/src/components/separator/ThemedSeparator.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/Slider.d.ts +20 -0
- package/lib/typescript/src/components/slider/Slider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSlider.d.ts +15 -0
- package/lib/typescript/src/components/slider/ThemedSlider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts +0 -2
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/ThemedSwitch.d.ts +13 -0
- package/lib/typescript/src/components/switch/ThemedSwitch.d.ts.map +1 -1
- package/lib/typescript/src/components/text/Text.d.ts +0 -2021
- package/lib/typescript/src/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/text/ThemedIconText.d.ts +21 -0
- package/lib/typescript/src/components/text/ThemedIconText.d.ts.map +1 -1
- package/lib/typescript/src/components/text/ThemedText.d.ts +14 -0
- package/lib/typescript/src/components/text/ThemedText.d.ts.map +1 -1
- package/lib/typescript/src/components/view/AnimatedThemedView.d.ts +15 -0
- package/lib/typescript/src/components/view/AnimatedThemedView.d.ts.map +1 -1
- package/lib/typescript/src/components/view/AnimatedView.d.ts +0 -1
- package/lib/typescript/src/components/view/AnimatedView.d.ts.map +1 -1
- package/lib/typescript/src/components/view/Box.d.ts +0 -2071
- package/lib/typescript/src/components/view/Box.d.ts.map +1 -1
- package/lib/typescript/src/components/view/ThemedScreenWrap.d.ts +16 -0
- package/lib/typescript/src/components/view/ThemedScreenWrap.d.ts.map +1 -1
- package/lib/typescript/src/components/view/ThemedScreenWrap.web.d.ts +14 -0
- package/lib/typescript/src/components/view/ThemedScreenWrap.web.d.ts.map +1 -1
- package/lib/typescript/src/components/view/ThemedScrollView.d.ts +16 -0
- package/lib/typescript/src/components/view/ThemedScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/view/ThemedView.d.ts +15 -0
- package/lib/typescript/src/components/view/ThemedView.d.ts.map +1 -1
- package/lib/typescript/src/hooks/button.d.ts +41 -0
- package/lib/typescript/src/hooks/button.d.ts.map +1 -1
- package/lib/typescript/src/hooks/list.d.ts +27 -0
- package/lib/typescript/src/hooks/list.d.ts.map +1 -1
- package/lib/typescript/src/hooks/react.d.ts +38 -0
- package/lib/typescript/src/hooks/react.d.ts.map +1 -1
- package/lib/typescript/src/hooks/reanimated.d.ts +10 -0
- package/lib/typescript/src/hooks/reanimated.d.ts.map +1 -1
- package/lib/typescript/src/hooks/separator.d.ts +16 -0
- package/lib/typescript/src/hooks/separator.d.ts.map +1 -1
- package/lib/typescript/src/hooks/style.d.ts +65 -0
- package/lib/typescript/src/hooks/style.d.ts.map +1 -1
- package/lib/typescript/src/hooks/theme.d.ts +82 -0
- package/lib/typescript/src/hooks/theme.d.ts.map +1 -1
- package/lib/typescript/src/hooks/view.d.ts +40 -2
- package/lib/typescript/src/hooks/view.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/accordion.d.ts +42 -0
- package/lib/typescript/src/types/accordion.d.ts.map +1 -0
- package/lib/typescript/src/types/button.d.ts +92 -0
- package/lib/typescript/src/types/button.d.ts.map +1 -1
- package/lib/typescript/src/types/icon.d.ts +43 -0
- package/lib/typescript/src/types/icon.d.ts.map +1 -1
- package/lib/typescript/src/types/list.d.ts +84 -0
- package/lib/typescript/src/types/list.d.ts.map +1 -1
- package/lib/typescript/src/types/loading.d.ts +38 -0
- package/lib/typescript/src/types/loading.d.ts.map +1 -1
- package/lib/typescript/src/types/overlay.d.ts +222 -0
- package/lib/typescript/src/types/overlay.d.ts.map +1 -1
- package/lib/typescript/src/types/provider.d.ts +21 -0
- package/lib/typescript/src/types/provider.d.ts.map +1 -1
- package/lib/typescript/src/types/react.d.ts +32 -0
- package/lib/typescript/src/types/react.d.ts.map +1 -1
- package/lib/typescript/src/types/reanimated.d.ts +32 -1
- package/lib/typescript/src/types/reanimated.d.ts.map +1 -1
- package/lib/typescript/src/types/separator.d.ts +26 -0
- package/lib/typescript/src/types/separator.d.ts.map +1 -1
- package/lib/typescript/src/types/slider.d.ts +88 -0
- package/lib/typescript/src/types/slider.d.ts.map +1 -1
- package/lib/typescript/src/types/style.d.ts +43 -0
- package/lib/typescript/src/types/style.d.ts.map +1 -1
- package/lib/typescript/src/types/switch.d.ts +50 -0
- package/lib/typescript/src/types/switch.d.ts.map +1 -1
- package/lib/typescript/src/types/text.d.ts +72 -0
- package/lib/typescript/src/types/text.d.ts.map +1 -1
- package/lib/typescript/src/types/theme.d.ts +111 -0
- package/lib/typescript/src/types/theme.d.ts.map +1 -1
- package/lib/typescript/src/types/view.d.ts +137 -0
- package/lib/typescript/src/types/view.d.ts.map +1 -1
- package/lib/typescript/src/utils/button/const.d.ts +27 -0
- package/lib/typescript/src/utils/button/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/overlay/const.d.ts +67 -0
- package/lib/typescript/src/utils/overlay/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/overlay/func.d.ts +93 -0
- package/lib/typescript/src/utils/overlay/func.d.ts.map +1 -1
- package/lib/typescript/src/utils/slider/const.d.ts +47 -0
- package/lib/typescript/src/utils/slider/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/style/const.d.ts +14 -0
- package/lib/typescript/src/utils/style/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/style/func.d.ts +95 -0
- package/lib/typescript/src/utils/style/func.d.ts.map +1 -1
- package/lib/typescript/src/utils/theme/const.d.ts +170 -0
- package/lib/typescript/src/utils/theme/const.d.ts.map +1 -1
- package/lib/typescript/src/utils/theme/restyle.d.ts +1 -1977
- package/lib/typescript/src/utils/theme/restyle.d.ts.map +1 -1
- package/package.json +4 -4
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js +0 -76
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js.map +0 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js +0 -113
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js.map +0 -1
- package/lib/module/components/slider/ThemedSlider.web.js +0 -206
- package/lib/module/components/slider/ThemedSlider.web.js.map +0 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.web.d.ts +0 -5
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheet.web.d.ts.map +0 -1
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.web.d.ts +0 -4
- package/lib/typescript/src/components/overlay/actionSheet/ActionSheetHeader.web.d.ts.map +0 -1
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts +0 -5
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts.map +0 -1
|
@@ -1,18 +1,61 @@
|
|
|
1
1
|
import type { ImageStyle, StyleProp as RNStyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
2
|
import type { ThemeSpacing } from './theme';
|
|
3
|
+
/**
|
|
4
|
+
* Union type for all React Native style objects.
|
|
5
|
+
*
|
|
6
|
+
* Combines ViewStyle, TextStyle, and ImageStyle into a single type.
|
|
7
|
+
*/
|
|
3
8
|
export type Style = ViewStyle | TextStyle | ImageStyle;
|
|
9
|
+
/**
|
|
10
|
+
* React Native StyleProp type alias.
|
|
11
|
+
*
|
|
12
|
+
* Allows for single style objects, arrays of styles, or falsy values.
|
|
13
|
+
* Generic parameter T defaults to Style but can be narrowed to specific style types.
|
|
14
|
+
*/
|
|
4
15
|
export type StyleProp<T = Style> = RNStyleProp<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Style or style prop type.
|
|
18
|
+
*
|
|
19
|
+
* Accepts either a direct style object or a StyleProp (array/conditional styles).
|
|
20
|
+
* Useful for component props that accept flexible style inputs.
|
|
21
|
+
*/
|
|
5
22
|
export type StyleOrStyleProp<T = Style> = T | StyleProp<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for safe area inset padding.
|
|
25
|
+
*
|
|
26
|
+
* Allows components to automatically apply padding for device safe areas
|
|
27
|
+
* (notches, status bars, home indicators, etc.) with optional customization per edge.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const config: InsetsStyleConfig = {
|
|
32
|
+
* insets: true, // Apply to all edges
|
|
33
|
+
* insetTop: false, // Exclude top
|
|
34
|
+
* insetsPadding: 'md', // Use 'md' spacing for all edges
|
|
35
|
+
* insetPaddingBottom: 'lg' // Override bottom with 'lg'
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
6
39
|
export type InsetsStyleConfig = {
|
|
40
|
+
/** Apply safe area insets to all edges */
|
|
7
41
|
insets?: boolean;
|
|
42
|
+
/** Apply safe area inset to top edge */
|
|
8
43
|
insetTop?: boolean;
|
|
44
|
+
/** Apply safe area inset to bottom edge */
|
|
9
45
|
insetBottom?: boolean;
|
|
46
|
+
/** Apply safe area inset to left edge */
|
|
10
47
|
insetLeft?: boolean;
|
|
48
|
+
/** Apply safe area inset to right edge */
|
|
11
49
|
insetRight?: boolean;
|
|
50
|
+
/** Default spacing value for all inset edges */
|
|
12
51
|
insetsPadding?: ThemeSpacing;
|
|
52
|
+
/** Spacing value for top inset (overrides insetsPadding) */
|
|
13
53
|
insetPaddingTop?: ThemeSpacing;
|
|
54
|
+
/** Spacing value for bottom inset (overrides insetsPadding) */
|
|
14
55
|
insetPaddingBottom?: ThemeSpacing;
|
|
56
|
+
/** Spacing value for left inset (overrides insetsPadding) */
|
|
15
57
|
insetPaddingLeft?: ThemeSpacing;
|
|
58
|
+
/** Spacing value for right inset (overrides insetsPadding) */
|
|
16
59
|
insetPaddingRight?: ThemeSpacing;
|
|
17
60
|
};
|
|
18
61
|
//# sourceMappingURL=style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/types/style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,IAAI,WAAW,EACxB,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvD,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,k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AAC;CAClC,CAAC"}
|
|
@@ -3,22 +3,72 @@ import type { AnimatedThemedPressableProps, OnPressDelayConfig } from './button'
|
|
|
3
3
|
import type { CustomAnimation } from './reanimated';
|
|
4
4
|
import type { ThemeColors } from './theme';
|
|
5
5
|
import type { AnimatedThemedViewProps } from './view';
|
|
6
|
+
/**
|
|
7
|
+
* Custom color configuration for switch component states.
|
|
8
|
+
*
|
|
9
|
+
* Allows customization of colors for both enabled and disabled states.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const colors: CustomSwitchColors = {
|
|
14
|
+
* border: 'gray',
|
|
15
|
+
* borderEnabled: 'primary',
|
|
16
|
+
* background: 'lightgray',
|
|
17
|
+
* backgroundEnabled: 'primaryLight',
|
|
18
|
+
* thumb: 'white',
|
|
19
|
+
* thumbEnabled: 'white'
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
6
23
|
export type CustomSwitchColors = {
|
|
24
|
+
/** Border color when switch is disabled/off */
|
|
7
25
|
border?: ThemeColors;
|
|
26
|
+
/** Border color when switch is enabled/on */
|
|
8
27
|
borderEnabled?: ThemeColors;
|
|
28
|
+
/** Background color when switch is disabled/off */
|
|
9
29
|
background?: ThemeColors;
|
|
30
|
+
/** Background color when switch is enabled/on */
|
|
10
31
|
backgroundEnabled?: ThemeColors;
|
|
32
|
+
/** Thumb color when switch is disabled/off */
|
|
11
33
|
thumb?: ThemeColors;
|
|
34
|
+
/** Thumb color when switch is enabled/on */
|
|
12
35
|
thumbEnabled?: ThemeColors;
|
|
13
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Props for themed switch component.
|
|
39
|
+
*
|
|
40
|
+
* A toggle switch component with smooth animations and customizable appearance.
|
|
41
|
+
* Supports custom colors, sizes, and animation behaviors for enabled/disabled states.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <ThemedSwitch
|
|
46
|
+
* enabled={isEnabled}
|
|
47
|
+
* onPress={(enabled) => setIsEnabled(enabled)}
|
|
48
|
+
* size="lg"
|
|
49
|
+
* customColors={{
|
|
50
|
+
* borderEnabled: 'primary',
|
|
51
|
+
* backgroundEnabled: 'primaryLight'
|
|
52
|
+
* }}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
14
56
|
export type ThemedSwitchProps = Omit<AnimatedThemedPressableProps, 'onPress' | 'children'> & {
|
|
57
|
+
/** Callback invoked when switch is toggled, receives new enabled state */
|
|
15
58
|
onPress: (enabled: boolean) => void;
|
|
59
|
+
/** Current enabled/on state of the switch */
|
|
16
60
|
enabled?: boolean;
|
|
61
|
+
/** Size of the switch (predefined size or custom number) */
|
|
17
62
|
size?: SwitchSize | number;
|
|
63
|
+
/** Configuration for debouncing or throttling press events */
|
|
18
64
|
onPressDelayConfig?: OnPressDelayConfig;
|
|
65
|
+
/** Custom animation when enabling the switch (animates to 1) */
|
|
19
66
|
customEnableAnimation?: CustomAnimation<1>;
|
|
67
|
+
/** Custom animation when disabling the switch (animates to 0) */
|
|
20
68
|
customDisableAnimation?: CustomAnimation<0>;
|
|
69
|
+
/** Custom colors for different switch states */
|
|
21
70
|
customColors?: CustomSwitchColors;
|
|
71
|
+
/** Props for the thumb (sliding button) component */
|
|
22
72
|
thumbProps?: AnimatedThemedViewProps;
|
|
23
73
|
};
|
|
24
74
|
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/types/switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CA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MAAM,kBAAkB,GAAG;IAC/B,+CAA+C;IAC/C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,mDAAmD;IACnD,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,4BAA4B,EAC5B,SAAS,GAAG,UAAU,CACvB,GAAG;IACF,0EAA0E;IAC1E,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,gEAAgE;IAChE,qBAAqB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3C,iEAAiE;IACjE,sBAAsB,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5C,gDAAgD;IAChD,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,qDAAqD;IACrD,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC,CAAC"}
|
|
@@ -3,18 +3,90 @@ import type { TextProps as RNTextProps } from 'react-native';
|
|
|
3
3
|
import type { CustomThemedIconProps } from './icon';
|
|
4
4
|
import type { Theme } from './theme';
|
|
5
5
|
import type { ThemedViewProps } from './view';
|
|
6
|
+
/**
|
|
7
|
+
* Props for themed text component.
|
|
8
|
+
*
|
|
9
|
+
* Combines React Native TextProps with Restyle theme-based styling capabilities.
|
|
10
|
+
* Supports text variants, colors, spacing, and typography from the theme.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ThemedText
|
|
15
|
+
* variant="heading"
|
|
16
|
+
* color="primary"
|
|
17
|
+
* fontSize={18}
|
|
18
|
+
* fontWeight="bold"
|
|
19
|
+
* >
|
|
20
|
+
* Hello World
|
|
21
|
+
* </ThemedText>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
6
24
|
export type ThemedTextProps = RNTextProps & TextProps<Theme>;
|
|
25
|
+
/**
|
|
26
|
+
* Customizable themed text props with prefixed property names.
|
|
27
|
+
*
|
|
28
|
+
* Useful when embedding text within other components to avoid prop name conflicts.
|
|
29
|
+
* All text-related props are prefixed with 'text' for clarity.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Button
|
|
34
|
+
* text="Click Me"
|
|
35
|
+
* textVariant="button"
|
|
36
|
+
* textColor="white"
|
|
37
|
+
* textFontSize={16}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
7
41
|
export type CustomThemedTextProps = {
|
|
42
|
+
/** Text content to display */
|
|
8
43
|
text: ThemedTextProps['children'];
|
|
44
|
+
/** Text style variant from theme */
|
|
9
45
|
textVariant?: ThemedTextProps['variant'];
|
|
46
|
+
/** Font size (from theme or custom number) */
|
|
10
47
|
textFontSize?: ThemedTextProps['fontSize'];
|
|
48
|
+
/** Font weight (e.g., 'normal', 'bold', '600') */
|
|
11
49
|
textFontWeight?: ThemedTextProps['fontWeight'];
|
|
50
|
+
/** Text color from theme colors */
|
|
12
51
|
textColor?: ThemedTextProps['color'];
|
|
52
|
+
/** Custom style overrides for text */
|
|
13
53
|
textStyle?: ThemedTextProps['style'];
|
|
54
|
+
/** Additional text props (excluding specified ones) */
|
|
14
55
|
textProps?: Omit<ThemedTextProps, 'children' | 'variant' | 'fontSize' | 'fontWeight' | 'color' | 'style'>;
|
|
15
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Combined icon and text props.
|
|
59
|
+
*
|
|
60
|
+
* Used for components that display an icon alongside text.
|
|
61
|
+
* Includes a flip option to control icon placement (left/right of text).
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* const props: IconTextProps = {
|
|
66
|
+
* iconName: 'check',
|
|
67
|
+
* text: 'Confirmed',
|
|
68
|
+
* flip: false // Icon on left
|
|
69
|
+
* };
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
16
72
|
export type IconTextProps = CustomThemedIconProps & CustomThemedTextProps & {
|
|
73
|
+
/** Whether to flip icon and text positions (default: icon left, text right) */
|
|
17
74
|
flip?: boolean;
|
|
18
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Themed icon-text combination with view wrapper.
|
|
78
|
+
*
|
|
79
|
+
* Combines icon and text with a themed container that supports spacing and layout props.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```tsx
|
|
83
|
+
* <ThemedIconText
|
|
84
|
+
* iconName="star"
|
|
85
|
+
* text="Favorite"
|
|
86
|
+
* gap="sm"
|
|
87
|
+
* padding="md"
|
|
88
|
+
* />
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
19
91
|
export type ThemedIconTextProps = IconTextProps & ThemedViewProps;
|
|
20
92
|
//# sourceMappingURL=text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/types/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAA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,eAAe,CAAC,UAAU,CAAC,CAAC;IAClC,oCAAoC;IACpC,WAAW,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACzC,8CAA8C;IAC9C,YAAY,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAC3C,kDAAkD;IAClD,cAAc,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IAC/C,mCAAmC;IACnC,SAAS,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACrC,sCAAsC;IACtC,SAAS,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACrC,uDAAuD;IACvD,SAAS,CAAC,EAAE,IAAI,CACd,eAAe,EACf,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CACvE,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,GAAG,qBAAqB,GAC/C,qBAAqB,GAAG;IACtB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEJ;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,eAAe,CAAC"}
|
|
@@ -1,14 +1,125 @@
|
|
|
1
1
|
import type { BackgroundColorProps, BackgroundColorShorthandProps, BoxProps, ColorProps, LayoutProps, PositionProps, SpacingProps, SpacingShorthandProps } from '@shopify/restyle';
|
|
2
|
+
/**
|
|
3
|
+
* Global theme type for the UI library.
|
|
4
|
+
*
|
|
5
|
+
* References the globally augmented ReactNativeTemplateTheme interface.
|
|
6
|
+
* This type is defined in your theme configuration file.
|
|
7
|
+
*/
|
|
2
8
|
export type Theme = globalThis.ReactNativeTemplateTheme;
|
|
9
|
+
/**
|
|
10
|
+
* Union type of all available theme color keys.
|
|
11
|
+
*
|
|
12
|
+
* Provides type-safe color selection from the theme's color palette.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const color: ThemeColors = 'primary'; // Type-safe
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
3
19
|
export type ThemeColors = keyof Theme['colors'];
|
|
20
|
+
/**
|
|
21
|
+
* Union type of all available theme spacing keys.
|
|
22
|
+
*
|
|
23
|
+
* Provides type-safe spacing values from the theme's spacing scale.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const spacing: ThemeSpacing = 'md'; // Type-safe
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
4
30
|
export type ThemeSpacing = keyof Theme['spacing'];
|
|
31
|
+
/**
|
|
32
|
+
* Union type of all available theme breakpoint keys.
|
|
33
|
+
*
|
|
34
|
+
* Provides type-safe responsive breakpoint selection.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* const breakpoint: ThemeBreakpoints = 'tablet'; // Type-safe
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
5
41
|
export type ThemeBreakpoints = keyof Theme['breakpoints'];
|
|
42
|
+
/**
|
|
43
|
+
* Union type of all available theme z-index keys.
|
|
44
|
+
*
|
|
45
|
+
* Provides type-safe z-index layer selection for stacking contexts.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* const zIndex: ThemeZIndices = 'modal'; // Type-safe
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
6
52
|
export type ThemeZIndices = keyof Theme['zIndices'];
|
|
53
|
+
/**
|
|
54
|
+
* Union type of all available theme border radius keys.
|
|
55
|
+
*
|
|
56
|
+
* Provides type-safe border radius selection from the theme.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* const radius: ThemeBorderRadii = 'md'; // Type-safe
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
7
63
|
export type ThemeBorderRadii = keyof Theme['borderRadii'];
|
|
64
|
+
/**
|
|
65
|
+
* Union type of all available theme text variant keys.
|
|
66
|
+
*
|
|
67
|
+
* Provides type-safe text style variant selection.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* const variant: ThemeTextVariants = 'heading'; // Type-safe
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
8
74
|
export type ThemeTextVariants = keyof Theme['textVariants'];
|
|
75
|
+
/**
|
|
76
|
+
* Theme-aware view/box props from Restyle.
|
|
77
|
+
*
|
|
78
|
+
* Provides comprehensive styling props including spacing, layout, position, etc.
|
|
79
|
+
* All props automatically resolve values from the theme.
|
|
80
|
+
*/
|
|
9
81
|
export type ThemeViewProps = BoxProps<Theme>;
|
|
82
|
+
/**
|
|
83
|
+
* Theme-aware color props from Restyle.
|
|
84
|
+
*
|
|
85
|
+
* Provides color-related styling props that resolve from the theme color palette.
|
|
86
|
+
*/
|
|
10
87
|
export type ThemeColorProps = ColorProps<Theme>;
|
|
88
|
+
/**
|
|
89
|
+
* Theme-aware spacing props from Restyle.
|
|
90
|
+
*
|
|
91
|
+
* Provides margin and padding props with both full names and shorthand notation.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```tsx
|
|
95
|
+
* const props: ThemeSpacingProps = {
|
|
96
|
+
* padding: 'md', // Full name
|
|
97
|
+
* p: 'md', // Shorthand
|
|
98
|
+
* marginTop: 'lg', // Full name
|
|
99
|
+
* mt: 'lg' // Shorthand
|
|
100
|
+
* };
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
11
103
|
export type ThemeSpacingProps = SpacingProps<Theme> & SpacingShorthandProps<Theme>;
|
|
104
|
+
/**
|
|
105
|
+
* Theme-aware background color props from Restyle.
|
|
106
|
+
*
|
|
107
|
+
* Provides background color styling with both full names and shorthand notation.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* const props: ThemeBackgroundColorProps = {
|
|
112
|
+
* backgroundColor: 'primary', // Full name
|
|
113
|
+
* bg: 'primary' // Shorthand
|
|
114
|
+
* };
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
12
117
|
export type ThemeBackgroundColorProps = BackgroundColorProps<Theme> & BackgroundColorShorthandProps<Theme>;
|
|
118
|
+
/**
|
|
119
|
+
* Base theme props combining spacing, color, layout, and position.
|
|
120
|
+
*
|
|
121
|
+
* Common props used across most themed components in the library.
|
|
122
|
+
* Includes spacing, background color, layout, and positioning capabilities.
|
|
123
|
+
*/
|
|
13
124
|
export type ThemeBaseProps = ThemeSpacingProps & ThemeBackgroundColorProps & LayoutProps<Theme> & PositionProps<Theme>;
|
|
14
125
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/types/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,6BAA6B,EAC7B,QAAQ,EACR,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG,UAAU,CAAC,wBAAwB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,CAAC;AAE5D,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE7C,MAAM,MA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AG,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,KAAK,CAAC,GACjD,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,KAAK,CAAC,GACjE,6BAA6B,CAAC,KAAK,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAC5C,yBAAyB,GACzB,WAAW,CAAC,KAAK,CAAC,GAClB,aAAa,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -5,28 +5,165 @@ import type { AnimatedRef } from 'react-native-reanimated';
|
|
|
5
5
|
import type AnimatedView from '../components/view/AnimatedView';
|
|
6
6
|
import type { InsetsStyleConfig } from './style';
|
|
7
7
|
import type { Theme } from './theme';
|
|
8
|
+
/**
|
|
9
|
+
* RefObject for a React Native View component.
|
|
10
|
+
*
|
|
11
|
+
* Used to store and access view references in React components.
|
|
12
|
+
*/
|
|
8
13
|
export type ViewRefObj = RefObject<View | null>;
|
|
14
|
+
/**
|
|
15
|
+
* RefObject for a React Native ScrollView component.
|
|
16
|
+
*
|
|
17
|
+
* Used to store and access scroll view references for programmatic scrolling.
|
|
18
|
+
*/
|
|
9
19
|
export type ScrollViewRefObj = RefObject<ScrollView | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Animated RefObject for a ScrollView component.
|
|
22
|
+
*
|
|
23
|
+
* Used with Reanimated for animated scroll operations and gesture handling.
|
|
24
|
+
*/
|
|
10
25
|
export type ScrollViewAnimatedRefObj = AnimatedRef<ScrollView>;
|
|
26
|
+
/**
|
|
27
|
+
* Callback handler for scroll events.
|
|
28
|
+
*
|
|
29
|
+
* Invoked when a ScrollView is scrolled, providing scroll position and metrics.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const handleScroll: OnScroll = (event) => {
|
|
34
|
+
* const offsetY = event.nativeEvent.contentOffset.y;
|
|
35
|
+
* console.log(`Scrolled to: ${offsetY}`);
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
11
39
|
export type OnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Callback handler for content size changes.
|
|
42
|
+
*
|
|
43
|
+
* Invoked when a ScrollView's content dimensions change.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const handleContentSizeChange: OnContentSizeChange = (width, height) => {
|
|
48
|
+
* console.log(`Content size: ${width}x${height}`);
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
12
52
|
export type OnContentSizeChange = (width: number, height: number) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Props for themed view component.
|
|
55
|
+
*
|
|
56
|
+
* Combines React Native ViewProps with Restyle theme-based styling capabilities.
|
|
57
|
+
* The foundation for most container components in the library.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <ThemedView
|
|
62
|
+
* padding="md"
|
|
63
|
+
* backgroundColor="surface"
|
|
64
|
+
* borderRadius="lg"
|
|
65
|
+
* >
|
|
66
|
+
* <Text>Content</Text>
|
|
67
|
+
* </ThemedView>
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
13
70
|
export type ThemedViewProps = ViewProps & BoxProps<Theme> & {
|
|
71
|
+
/** Reference to the underlying View component */
|
|
14
72
|
ref?: ViewRefObj;
|
|
15
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* Props for the AnimatedView component.
|
|
76
|
+
*
|
|
77
|
+
* Inferred from the AnimatedView component implementation for Reanimated support.
|
|
78
|
+
*/
|
|
16
79
|
export type AnimatedViewProps = ComponentProps<typeof AnimatedView>;
|
|
80
|
+
/**
|
|
81
|
+
* Themed view with Reanimated animation support.
|
|
82
|
+
*
|
|
83
|
+
* Merges themed view capabilities with Reanimated animations for complex interactions.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* <AnimatedThemedView
|
|
88
|
+
* padding="md"
|
|
89
|
+
* animatedStyle={animatedStyles}
|
|
90
|
+
* entering={FadeIn}
|
|
91
|
+
* >
|
|
92
|
+
* <Text>Animated Content</Text>
|
|
93
|
+
* </AnimatedThemedView>
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
17
96
|
export type AnimatedThemedViewProps = Omit<ThemedViewProps, 'ref'> & Omit<AnimatedViewProps, 'key' | 'style'> & {
|
|
97
|
+
/** Animated style object for Reanimated animations */
|
|
18
98
|
animatedStyle?: AnimatedViewProps['style'];
|
|
19
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Props for themed screen wrapper component.
|
|
102
|
+
*
|
|
103
|
+
* Extends themed view with safe area inset support and lifecycle hooks.
|
|
104
|
+
* Typically used as the root container for screen components.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```tsx
|
|
108
|
+
* <ThemedScreenWrap
|
|
109
|
+
* insets
|
|
110
|
+
* insetsPadding="md"
|
|
111
|
+
* effectSetup={setupAnalytics}
|
|
112
|
+
* effectCleanup={cleanupAnalytics}
|
|
113
|
+
* >
|
|
114
|
+
* <ScreenContent />
|
|
115
|
+
* </ThemedScreenWrap>
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
20
118
|
export type ThemedScreenWrapProps = ThemedViewProps & InsetsStyleConfig & {
|
|
119
|
+
/** Setup function called in useEffect on mount */
|
|
21
120
|
effectSetup?: () => void;
|
|
121
|
+
/** Cleanup function called in useEffect on unmount */
|
|
22
122
|
effectCleanup?: () => void;
|
|
123
|
+
/** Dependency array for the effect (like useEffect deps) */
|
|
23
124
|
effectDependencies?: DependencyList;
|
|
24
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* Props for ScrollView component with inset support.
|
|
128
|
+
*
|
|
129
|
+
* Extends React Native ScrollViewProps with safe area inset configuration.
|
|
130
|
+
*/
|
|
25
131
|
export type ScrollViewProps = RNScrollViewProps & InsetsStyleConfig & {
|
|
132
|
+
/** Reference to the ScrollView component */
|
|
26
133
|
ref?: ScrollViewRefObj;
|
|
27
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Themed ScrollView component props.
|
|
137
|
+
*
|
|
138
|
+
* Combines ScrollView functionality with theme-based styling capabilities.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```tsx
|
|
142
|
+
* <ThemedScrollView
|
|
143
|
+
* padding="md"
|
|
144
|
+
* insets
|
|
145
|
+
* showsVerticalScrollIndicator={false}
|
|
146
|
+
* >
|
|
147
|
+
* <Content />
|
|
148
|
+
* </ThemedScrollView>
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
28
151
|
export type ThemedScrollViewProps = ScrollViewProps & Omit<ThemedViewProps, 'ref'>;
|
|
152
|
+
/**
|
|
153
|
+
* Props with required children.
|
|
154
|
+
*
|
|
155
|
+
* Utility type that ensures children prop is non-nullable.
|
|
156
|
+
* Useful for components that must have children content.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```tsx
|
|
160
|
+
* type ButtonProps = PropsWithRequiredChildren<{
|
|
161
|
+
* onPress: () => void;
|
|
162
|
+
* }>;
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
29
165
|
export type PropsWithRequiredChildren<P = unknown> = P & {
|
|
166
|
+
/** Required non-null children */
|
|
30
167
|
children: NonNullable<ReactNode>;
|
|
31
168
|
};
|
|
32
169
|
//# sourceMappingURL=view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/types/view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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C,GAAG;IACvD,iCAAiC;IACjC,QAAQ,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CAClC,CAAC"}
|
|
@@ -1,10 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scale ratios applied to buttons during press animations.
|
|
3
|
+
* These values determine how much a button shrinks when pressed, creating visual feedback.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <Button scaleRatio={ButtonScaleRatio.Square}>
|
|
8
|
+
* Press Me
|
|
9
|
+
* </Button>
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
1
12
|
export declare enum ButtonScaleRatio {
|
|
13
|
+
/** Scale to 90% - suitable for square or circular buttons */
|
|
2
14
|
Square = 0.9,
|
|
15
|
+
/** Scale to 98% - subtle effect for rectangular buttons */
|
|
3
16
|
Rectangle = 0.98,
|
|
17
|
+
/** No scaling animation */
|
|
4
18
|
None = 1
|
|
5
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Delay strategies for handling rapid button press events.
|
|
22
|
+
* Controls how multiple press events are processed over time.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Button onPressDelayConfig={{ type: OnPressDelayType.Throttle, delay: 1000 }}>
|
|
27
|
+
* Submit
|
|
28
|
+
* </Button>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
6
31
|
export declare enum OnPressDelayType {
|
|
32
|
+
/** Throttle - Execute the first press, then ignore subsequent presses for the delay period */
|
|
7
33
|
Throttle = 0,
|
|
34
|
+
/** Debounce - Wait for the delay period after the last press before executing */
|
|
8
35
|
Debounce = 1
|
|
9
36
|
}
|
|
10
37
|
//# sourceMappingURL=const.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../../src/utils/button/const.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,MAAM,MAAM;IACZ,SAAS,OAAO;IAChB,IAAI,IAAI;CACT;AAED,oBAAY,gBAAgB;IAC1B,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT"}
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../../src/utils/button/const.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,oBAAY,gBAAgB;IAC1B,6DAA6D;IAC7D,MAAM,MAAM;IACZ,2DAA2D;IAC3D,SAAS,OAAO;IAChB,2BAA2B;IAC3B,IAAI,IAAI;CACT;AAED;;;;;;;;;;GAUG;AACH,oBAAY,gBAAgB;IAC1B,8FAA8F;IAC9F,QAAQ,IAAA;IACR,iFAAiF;IACjF,QAAQ,IAAA;CACT"}
|