@jamadd/react-native-template-ui 0.9.1 → 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/lib/module/components/accordion/ThemedAccordion.js +85 -60
- package/lib/module/components/accordion/ThemedAccordion.js.map +1 -1
- 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 +89 -61
- package/lib/module/components/slider/Slider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.js +25 -3
- 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 +3 -3
- package/lib/module/index.js.map +1 -1
- 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 +15 -0
- package/lib/typescript/src/components/accordion/ThemedAccordion.d.ts.map +1 -1
- 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/types/accordion.d.ts +26 -0
- package/lib/typescript/src/types/accordion.d.ts.map +1 -1
- 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/accordion/ThemedAccordion.web.js +0 -245
- package/lib/module/components/accordion/ThemedAccordion.web.js.map +0 -1
- 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/Slider.web.js +0 -595
- package/lib/module/components/slider/Slider.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/accordion/ThemedAccordion.web.d.ts +0 -5
- package/lib/typescript/src/components/accordion/ThemedAccordion.web.d.ts.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/Slider.web.d.ts +0 -5
- package/lib/typescript/src/components/slider/Slider.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
|
@@ -7,63 +7,236 @@ import type { CustomAnimation } from './reanimated';
|
|
|
7
7
|
import type { InsetsStyleConfig } from './style';
|
|
8
8
|
import type { CustomThemedTextProps, ThemedTextProps } from './text';
|
|
9
9
|
import type { AnimatedThemedViewProps, PropsWithRequiredChildren, ScrollViewAnimatedRefObj, ScrollViewProps, ThemedViewProps } from './view';
|
|
10
|
+
/**
|
|
11
|
+
* Base props for overlay components.
|
|
12
|
+
*
|
|
13
|
+
* Provides common functionality for dismissable overlay components like modals, toasts, and alerts.
|
|
14
|
+
*/
|
|
10
15
|
type OverlayProps = {
|
|
16
|
+
/** Callback invoked when the overlay is dismissed */
|
|
11
17
|
onDismiss: () => void;
|
|
18
|
+
/** Whether the overlay can be dismissed by user interaction (e.g., tapping backdrop) */
|
|
12
19
|
dismissable?: boolean;
|
|
13
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Base result type for overlay dismissal.
|
|
23
|
+
*
|
|
24
|
+
* All overlay dismiss results extend this type with a resultType discriminator.
|
|
25
|
+
*/
|
|
14
26
|
type OverlayDismissBaseResult = {
|
|
27
|
+
/** Type discriminator for the dismiss result */
|
|
15
28
|
resultType: OverlayDismissResultType;
|
|
16
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Callback handler for overlay dismissal events.
|
|
32
|
+
*
|
|
33
|
+
* Generic type parameter T allows for type-safe dismiss result handling.
|
|
34
|
+
*/
|
|
17
35
|
export type OverlayOnDismiss<T> = (result: T) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Result type when a toast is dismissed.
|
|
38
|
+
*
|
|
39
|
+
* Contains toast-specific information like type, text, and duration.
|
|
40
|
+
*/
|
|
18
41
|
type OverlayDismissToastResult = OverlayDismissBaseResult & Pick<ThemedToastProps, 'type' | 'text' | 'duration'> & {
|
|
19
42
|
resultType: OverlayDismissResultType.Toast;
|
|
20
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Result type when an alert is dismissed.
|
|
46
|
+
*
|
|
47
|
+
* Contains alert-specific information including which button was pressed.
|
|
48
|
+
*/
|
|
21
49
|
export type OverlayDismissAlertResult = OverlayDismissBaseResult & Pick<AlertProps, 'title' | 'description'> & Pick<AlertButtonProps, 'text' | 'type'> & {
|
|
22
50
|
resultType: OverlayDismissResultType.Alert;
|
|
23
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Props for themed toast notification component.
|
|
54
|
+
*
|
|
55
|
+
* Toasts are temporary, non-blocking notification messages that appear on screen.
|
|
56
|
+
* Supports customizable appearance, duration, and dismiss behavior.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <ThemedToast
|
|
61
|
+
* type="success"
|
|
62
|
+
* text="Operation completed successfully"
|
|
63
|
+
* duration={3000}
|
|
64
|
+
* dismissable
|
|
65
|
+
* />
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
24
68
|
export type ThemedToastProps = Omit<OverlayProps, 'onDismiss'> & Omit<AnimatedThemedViewProps, 'children'> & CustomThemedTextProps & Pick<InsetsStyleConfig, 'insetsPadding' | 'insetPaddingTop' | 'insetPaddingBottom' | 'insetPaddingLeft' | 'insetPaddingRight'> & {
|
|
69
|
+
/** Visual style of the toast (e.g., 'success', 'error', 'info') */
|
|
25
70
|
type?: ToastType;
|
|
71
|
+
/** Duration in milliseconds before the toast auto-dismisses */
|
|
26
72
|
duration?: ToastDuration;
|
|
73
|
+
/** Callback invoked when the toast is dismissed */
|
|
27
74
|
onDismiss?: OverlayOnDismiss<OverlayDismissToastResult>;
|
|
28
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Props for themed modal component.
|
|
78
|
+
*
|
|
79
|
+
* Modals are full-screen or centered overlays that block interaction with the underlying content.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```tsx
|
|
83
|
+
* <ThemedModal
|
|
84
|
+
* visible={isVisible}
|
|
85
|
+
* dismissable
|
|
86
|
+
* onDismiss={handleDismiss}
|
|
87
|
+
* contentWrapProps={{ padding: 'lg' }}
|
|
88
|
+
* >
|
|
89
|
+
* <Text>Modal content</Text>
|
|
90
|
+
* </ThemedModal>
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
29
93
|
export type ThemedModalProps = Partial<OverlayProps> & ModalProps & {
|
|
94
|
+
/** Props for the content container wrapper */
|
|
30
95
|
contentWrapProps?: ThemedViewProps;
|
|
31
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Props for themed loading modal component.
|
|
99
|
+
*
|
|
100
|
+
* Displays a loading indicator in a modal overlay, optionally with descriptive text.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```tsx
|
|
104
|
+
* <ThemedLoadingModal
|
|
105
|
+
* visible={isLoading}
|
|
106
|
+
* loadingSize="large"
|
|
107
|
+
* text="Loading data..."
|
|
108
|
+
* />
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
32
111
|
export type ThemedLoadingModalProps = Omit<ThemedModalProps, 'children'> & CustomThemedLoadingProps & Partial<CustomThemedTextProps>;
|
|
112
|
+
/**
|
|
113
|
+
* Context value for alert components.
|
|
114
|
+
*
|
|
115
|
+
* Provides shared state and callbacks for alert button interactions.
|
|
116
|
+
*/
|
|
33
117
|
export type AlertContextVal = Partial<Pick<AlertProps, 'buttonProps'> & {
|
|
118
|
+
/** Callback to dismiss the alert with optional result data */
|
|
34
119
|
onDismiss: (result?: Partial<OverlayDismissAlertResult>) => void;
|
|
35
120
|
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Props for themed alert dialog component.
|
|
123
|
+
*
|
|
124
|
+
* Alerts are modal dialogs that display important information and require user acknowledgment.
|
|
125
|
+
* Supports customizable animations, multiple button groups, and styled content.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* <Alert
|
|
130
|
+
* visible={showAlert}
|
|
131
|
+
* title="Confirm Action"
|
|
132
|
+
* description="Are you sure you want to continue?"
|
|
133
|
+
* buttons={[
|
|
134
|
+
* [{ text: 'Cancel', type: 'cancel' }],
|
|
135
|
+
* [{ text: 'Confirm', type: 'default' }]
|
|
136
|
+
* ]}
|
|
137
|
+
* onDismiss={handleAlertDismiss}
|
|
138
|
+
* />
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
36
141
|
export type AlertProps = Omit<OverlayProps, 'onDismiss'> & Pick<ModalProps, 'visible'> & {
|
|
142
|
+
/** Custom animation for showing the alert */
|
|
37
143
|
customShowAnimation?: CustomAnimation<1>;
|
|
144
|
+
/** Custom animation for hiding the alert */
|
|
38
145
|
customHideAnimation?: CustomAnimation<0>;
|
|
146
|
+
/** Props for the alert container wrapper */
|
|
39
147
|
wrapProps?: Omit<AnimatedThemedViewProps, 'children'>;
|
|
148
|
+
/** Alert title text (required) */
|
|
40
149
|
title: string;
|
|
150
|
+
/** Props for styling the title text */
|
|
41
151
|
titleTextProps?: Omit<CustomThemedTextProps, 'text'>;
|
|
152
|
+
/** Optional description/message text */
|
|
42
153
|
description?: string;
|
|
154
|
+
/** Props for styling the description text */
|
|
43
155
|
descriptionTextProps?: Omit<CustomThemedTextProps, 'text'>;
|
|
156
|
+
/** Array of button groups, each group is an array of buttons */
|
|
44
157
|
buttons?: AlertButtonProps[][];
|
|
158
|
+
/** Props for the buttons container wrapper */
|
|
45
159
|
buttonsWrapProps?: Omit<ThemedViewProps, 'children'>;
|
|
160
|
+
/** Default props applied to all buttons */
|
|
46
161
|
buttonProps?: Omit<ThemedButtonProps, 'onPress' | 'text'>;
|
|
162
|
+
/** Callback invoked when the alert is dismissed */
|
|
47
163
|
onDismiss?: OverlayOnDismiss<OverlayDismissAlertResult>;
|
|
48
164
|
};
|
|
165
|
+
/**
|
|
166
|
+
* Props for alert button groups.
|
|
167
|
+
*
|
|
168
|
+
* Used to render button arrays within alert dialogs.
|
|
169
|
+
*/
|
|
49
170
|
export type AlertButtonsProps = Pick<AlertProps, 'buttons' | 'buttonsWrapProps'>;
|
|
171
|
+
/**
|
|
172
|
+
* Props for individual alert buttons.
|
|
173
|
+
*
|
|
174
|
+
* Defines the appearance and behavior of buttons within alert dialogs.
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```tsx
|
|
178
|
+
* const button: AlertButtonProps = {
|
|
179
|
+
* text: 'OK',
|
|
180
|
+
* type: 'default',
|
|
181
|
+
* onPress: () => console.log('OK pressed')
|
|
182
|
+
* };
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
50
185
|
export type AlertButtonProps = Pick<ThemedButtonProps, 'text'> & {
|
|
186
|
+
/** Type of button (e.g., 'default', 'cancel', 'destructive') */
|
|
51
187
|
type?: AlertButtonType;
|
|
188
|
+
/** Callback invoked when the button is pressed */
|
|
52
189
|
onPress?: ThemedButtonProps['onPress'];
|
|
190
|
+
/** Additional props for customizing the button appearance */
|
|
53
191
|
props?: Omit<ThemedButtonProps, 'onPress' | 'text'>;
|
|
54
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Props for themed action sheet component.
|
|
195
|
+
*
|
|
196
|
+
* Action sheets are bottom-sheet style modals that present a set of options or custom content.
|
|
197
|
+
* Supports three modes: options list, custom children with ScrollView, or custom list component.
|
|
198
|
+
* Can be expandable to fill the screen height.
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```tsx
|
|
202
|
+
* // With options
|
|
203
|
+
* <ActionSheet
|
|
204
|
+
* title="Choose Action"
|
|
205
|
+
* options={[
|
|
206
|
+
* { text: 'Edit', onPress: handleEdit },
|
|
207
|
+
* { text: 'Delete', onPress: handleDelete }
|
|
208
|
+
* ]}
|
|
209
|
+
* expandable
|
|
210
|
+
* />
|
|
211
|
+
*
|
|
212
|
+
* // With custom content
|
|
213
|
+
* <ActionSheet
|
|
214
|
+
* title="Details"
|
|
215
|
+
* scrollViewProps={{ ...scrollProps }}
|
|
216
|
+
* >
|
|
217
|
+
* <CustomContent />
|
|
218
|
+
* </ActionSheet>
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
55
221
|
export type ActionSheetProps = (Omit<OverlayProps, 'onDismiss'> & Omit<ActionSheetWrapProps, 'children'> & ActionSheetHeaderProps & {
|
|
222
|
+
/** Optional title text for the action sheet header */
|
|
56
223
|
title?: string;
|
|
224
|
+
/** Whether the action sheet can expand to full screen height */
|
|
57
225
|
expandable?: boolean;
|
|
226
|
+
/** Callback invoked when the action sheet is dismissed */
|
|
58
227
|
onDismiss?: OverlayOnDismiss<OverlayDismissActionSheetResult>;
|
|
59
228
|
}) & ({
|
|
229
|
+
/** Array of selectable options */
|
|
60
230
|
options: ActionSheetOptions;
|
|
231
|
+
/** Props for the options list component */
|
|
61
232
|
optionListProps?: ActionSheetOptionListProps;
|
|
233
|
+
/** Props applied to each option item */
|
|
62
234
|
optionListItemProps?: ActionSheetOptionListItemProps;
|
|
63
235
|
scrollViewProps?: never;
|
|
64
236
|
children?: never;
|
|
65
237
|
listProps?: never;
|
|
66
238
|
} | PropsWithRequiredChildren<{
|
|
239
|
+
/** Props for the scrollable content wrapper */
|
|
67
240
|
scrollViewProps?: Omit<ScrollViewProps, 'ref'> & {
|
|
68
241
|
ref?: ScrollViewAnimatedRefObj;
|
|
69
242
|
};
|
|
@@ -72,6 +245,7 @@ export type ActionSheetProps = (Omit<OverlayProps, 'onDismiss'> & Omit<ActionShe
|
|
|
72
245
|
optionListItemProps?: never;
|
|
73
246
|
listProps?: never;
|
|
74
247
|
}> | {
|
|
248
|
+
/** Props for custom list component implementation */
|
|
75
249
|
listProps: Omit<ListProps<any>, 'ref'> & {
|
|
76
250
|
ref?: ListAnimatedRefObj<any>;
|
|
77
251
|
};
|
|
@@ -81,26 +255,74 @@ export type ActionSheetProps = (Omit<OverlayProps, 'onDismiss'> & Omit<ActionShe
|
|
|
81
255
|
scrollViewProps?: never;
|
|
82
256
|
children?: never;
|
|
83
257
|
});
|
|
258
|
+
/**
|
|
259
|
+
* Props for action sheet wrapper component.
|
|
260
|
+
*
|
|
261
|
+
* Controls the visibility and container styling of the action sheet.
|
|
262
|
+
*/
|
|
84
263
|
export type ActionSheetWrapProps = PropsWithRequiredChildren<Pick<ModalProps, 'visible'> & {
|
|
264
|
+
/** Props for the animated wrapper view */
|
|
85
265
|
wrapViewProps?: Omit<AnimatedThemedViewProps, 'children' | 'style'> & {
|
|
86
266
|
style?: ViewStyle;
|
|
87
267
|
};
|
|
88
268
|
}>;
|
|
269
|
+
/**
|
|
270
|
+
* Props for action sheet header configuration.
|
|
271
|
+
*
|
|
272
|
+
* Controls the appearance of the action sheet header including title and close icon.
|
|
273
|
+
*/
|
|
89
274
|
export type ActionSheetHeaderProps = {
|
|
275
|
+
/** Whether to show the close icon button in the header */
|
|
90
276
|
headerShowIcon?: boolean;
|
|
277
|
+
/** Props for the header container wrapper */
|
|
91
278
|
headerWrapProps?: Omit<ThemedViewProps, 'children'>;
|
|
279
|
+
/** Props for the header title text */
|
|
92
280
|
headerTextProps?: Omit<ThemedTextProps, 'children'>;
|
|
281
|
+
/** Props for the header close icon button */
|
|
93
282
|
headerIconButtonProps?: Omit<ThemedButtonProps, 'onPress'>;
|
|
94
283
|
};
|
|
284
|
+
/**
|
|
285
|
+
* Props for the action sheet options list component.
|
|
286
|
+
*
|
|
287
|
+
* Extends list props with action sheet-specific configuration.
|
|
288
|
+
*/
|
|
95
289
|
export type ActionSheetOptionListProps = Omit<ListProps<ActionSheetOption>, 'ref' | 'data' | 'Item' | 'keyExtractor' | 'extraData'> & {
|
|
290
|
+
/** Reference to the options list */
|
|
96
291
|
ref?: ActionSheetOptionListRefObj;
|
|
97
292
|
};
|
|
293
|
+
/**
|
|
294
|
+
* Props for individual action sheet option items.
|
|
295
|
+
*
|
|
296
|
+
* Customizes the appearance of each option button in the list.
|
|
297
|
+
*/
|
|
98
298
|
export type ActionSheetOptionListItemProps = Omit<ThemedButtonProps, 'onPress' | 'text'>;
|
|
299
|
+
/**
|
|
300
|
+
* Reference type for action sheet option list.
|
|
301
|
+
*/
|
|
99
302
|
export type ActionSheetOptionListRefObj = ListAnimatedRefObj<ActionSheetOption>;
|
|
303
|
+
/**
|
|
304
|
+
* Configuration for a single action sheet option.
|
|
305
|
+
*
|
|
306
|
+
* Defines the text, optional press handler, and styling for an option.
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```tsx
|
|
310
|
+
* const option: ActionSheetOption = {
|
|
311
|
+
* text: 'Share',
|
|
312
|
+
* onPress: () => handleShare(),
|
|
313
|
+
* props: { backgroundColor: 'primary' }
|
|
314
|
+
* };
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
100
317
|
export type ActionSheetOption = Partial<Pick<ThemedButtonProps, 'onPress'>> & {
|
|
318
|
+
/** Display text for the option */
|
|
101
319
|
text: string;
|
|
320
|
+
/** Additional props for customizing the option button */
|
|
102
321
|
props?: ActionSheetOptionListItemProps;
|
|
103
322
|
};
|
|
323
|
+
/**
|
|
324
|
+
* Array of action sheet options.
|
|
325
|
+
*/
|
|
104
326
|
export type ActionSheetOptions = ActionSheetOption[];
|
|
105
327
|
export {};
|
|
106
328
|
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/types/overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EACV,eAAe,EACf,wBAAwB,EACxB,aAAa,EACb,SAAS,EACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAE1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EA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 @@
|
|
|
1
1
|
import type { Theme } from './theme';
|
|
2
2
|
import type { PropsWithRequiredChildren } from './view';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the root ReactNativeTemplate providers wrapper.
|
|
5
|
+
*
|
|
6
|
+
* This component sets up all necessary providers (theme, etc.) for the UI library.
|
|
7
|
+
* Must wrap your application root to enable themed components.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { ReactNativeTemplateProviders } from '@jamadd/react-native-template-ui';
|
|
12
|
+
* import { theme } from './theme';
|
|
13
|
+
*
|
|
14
|
+
* function App() {
|
|
15
|
+
* return (
|
|
16
|
+
* <ReactNativeTemplateProviders theme={theme}>
|
|
17
|
+
* <YourApp />
|
|
18
|
+
* </ReactNativeTemplateProviders>
|
|
19
|
+
* );
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
3
23
|
export type ReactNativeTemplateProvidersProps = PropsWithRequiredChildren<{
|
|
24
|
+
/** Theme configuration object containing colors, spacing, and other design tokens */
|
|
4
25
|
theme: Theme;
|
|
5
26
|
}>;
|
|
6
27
|
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/types/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAExD,MAAM,MAAM,iCAAiC,GAAG,yBAAyB,CAAC;IACxE,KAAK,EAAE,KAAK,CAAC;CACd,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/types/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,iCAAiC,GAAG,yBAAyB,CAAC;IACxE,qFAAqF;IACrF,KAAK,EAAE,KAAK,CAAC;CACd,CAAC,CAAC"}
|
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import type { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import type { LayoutChangeEvent } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Type for setTimeout return value.
|
|
5
|
+
*
|
|
6
|
+
* Used for storing and managing timeout IDs that can be cleared with clearTimeout.
|
|
7
|
+
*/
|
|
3
8
|
export type Timeout = ReturnType<typeof setTimeout>;
|
|
9
|
+
/**
|
|
10
|
+
* Type for React setState function.
|
|
11
|
+
*
|
|
12
|
+
* Generic setter function returned by useState hook, supporting both direct values
|
|
13
|
+
* and updater functions.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const [count, setCount]: [number, SetState<number>] = useState(0);
|
|
18
|
+
* setCount(5); // Direct value
|
|
19
|
+
* setCount(prev => prev + 1); // Updater function
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
4
22
|
export type SetState<T> = Dispatch<SetStateAction<T>>;
|
|
23
|
+
/**
|
|
24
|
+
* Callback handler for layout change events.
|
|
25
|
+
*
|
|
26
|
+
* Invoked when a component's layout is measured or changes.
|
|
27
|
+
* Provides layout information like position and dimensions.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const handleLayout: OnLayout = (event) => {
|
|
32
|
+
* const { width, height } = event.nativeEvent.layout;
|
|
33
|
+
* console.log(`Size: ${width}x${height}`);
|
|
34
|
+
* };
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
5
37
|
export type OnLayout = (event: LayoutChangeEvent) => void;
|
|
6
38
|
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/types/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC"}
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../../src/types/react.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC"}
|
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import type { SharedValue } from 'react-native-reanimated';
|
|
2
|
+
/**
|
|
3
|
+
* Animation state values.
|
|
4
|
+
*
|
|
5
|
+
* Binary animation states: 0 (hidden/collapsed/off) and 1 (visible/expanded/on).
|
|
6
|
+
*/
|
|
2
7
|
export type AnimationValue = 0 | 1;
|
|
8
|
+
/**
|
|
9
|
+
* Reanimated shared value for animation states.
|
|
10
|
+
*
|
|
11
|
+
* A shared value that holds animation state (0 or 1) for use in Reanimated animations.
|
|
12
|
+
*/
|
|
3
13
|
export type AnimationSharedValue = SharedValue<AnimationValue>;
|
|
4
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Custom animation function type.
|
|
16
|
+
*
|
|
17
|
+
* Allows implementing custom animation behaviors for components.
|
|
18
|
+
* The function receives a shared value, target value, and optional completion callback.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const customAnimation: CustomAnimation = (sharedValue, toValue, onComplete) => {
|
|
23
|
+
* sharedValue.value = withTiming(toValue, { duration: 300 }, () => {
|
|
24
|
+
* runOnJS(onComplete)();
|
|
25
|
+
* });
|
|
26
|
+
* };
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export type CustomAnimation<T = AnimationValue> = (
|
|
30
|
+
/** Shared value to animate */
|
|
31
|
+
sharedValue: AnimationSharedValue,
|
|
32
|
+
/** Target value for the animation */
|
|
33
|
+
toValue: T,
|
|
34
|
+
/** Optional callback invoked when animation completes */
|
|
35
|
+
animationCompletedCallback?: () => void) => void;
|
|
5
36
|
//# sourceMappingURL=reanimated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reanimated.d.ts","sourceRoot":"","sources":["../../../../src/types/reanimated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC;AAEnC,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;AAE/D,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,cAAc,IAAI,
|
|
1
|
+
{"version":3,"file":"reanimated.d.ts","sourceRoot":"","sources":["../../../../src/types/reanimated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,CAAC;AAEnC;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,cAAc,IAAI;AAChD,8BAA8B;AAC9B,WAAW,EAAE,oBAAoB;AACjC,qCAAqC;AACrC,OAAO,EAAE,CAAC;AACV,yDAAyD;AACzD,0BAA0B,CAAC,EAAE,MAAM,IAAI,KACpC,IAAI,CAAC"}
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import type { BorderSize } from '../utils/theme/const';
|
|
2
2
|
import type { ThemeBackgroundColorProps, ThemeSpacingProps } from './theme';
|
|
3
|
+
/**
|
|
4
|
+
* Props for themed separator component.
|
|
5
|
+
*
|
|
6
|
+
* A separator is a visual divider line used to separate content sections.
|
|
7
|
+
* Can be horizontal (default) or vertical, with customizable size, color, and margins.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // Horizontal separator
|
|
12
|
+
* <ThemedSeparator
|
|
13
|
+
* size="sm"
|
|
14
|
+
* backgroundColor="border"
|
|
15
|
+
* marginVertical="md"
|
|
16
|
+
* />
|
|
17
|
+
*
|
|
18
|
+
* // Vertical separator
|
|
19
|
+
* <ThemedSeparator
|
|
20
|
+
* vertical
|
|
21
|
+
* size={2}
|
|
22
|
+
* backgroundColor="divider"
|
|
23
|
+
* marginHorizontal="sm"
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
3
27
|
export type ThemedSeparatorProps = ThemeBackgroundColorProps & Pick<ThemeSpacingProps, 'margin' | 'marginVertical' | 'marginHorizontal' | 'marginTop' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginStart' | 'marginEnd' | 'm' | 'my' | 'mx' | 'mt' | 'mb' | 'ml' | 'mr' | 'ms' | 'me'> & {
|
|
28
|
+
/** Thickness of the separator (predefined size or custom number) */
|
|
4
29
|
size?: BorderSize | number;
|
|
30
|
+
/** Whether the separator is vertical (default is horizontal) */
|
|
5
31
|
vertical?: boolean;
|
|
6
32
|
};
|
|
7
33
|
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../../src/types/separator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5E,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAC1D,IAAI,CACF,iBAAiB,EACf,QAAQ,GACR,gBAAgB,GAChB,kBAAkB,GAClB,WAAW,GACX,cAAc,GACd,YAAY,GACZ,aAAa,GACb,aAAa,GACb,WAAW,GACX,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CACP,GAAG;IACF,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../../src/types/separator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAC1D,IAAI,CACF,iBAAiB,EACf,QAAQ,GACR,gBAAgB,GAChB,kBAAkB,GAClB,WAAW,GACX,cAAc,GACd,YAAY,GACZ,aAAa,GACb,aAAa,GACb,WAAW,GACX,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CACP,GAAG;IACF,oEAAoE;IACpE,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -4,45 +4,133 @@ import type { SetState } from './react';
|
|
|
4
4
|
import type { ThemedTextProps } from './text';
|
|
5
5
|
import type { ThemeColors } from './theme';
|
|
6
6
|
import type { AnimatedThemedViewProps, ThemedViewProps } from './view';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for a numeric range slider.
|
|
9
|
+
*
|
|
10
|
+
* Defines a slider that operates on numeric values within a specified range and step count.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const config: NumberSlider = {
|
|
15
|
+
* range: [0, 100],
|
|
16
|
+
* steps: 10,
|
|
17
|
+
* defaultValue: 50
|
|
18
|
+
* };
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
7
21
|
export type NumberSlider = {
|
|
22
|
+
/** Minimum and maximum values [min, max] */
|
|
8
23
|
range: [number, number];
|
|
24
|
+
/** Number of discrete steps between min and max */
|
|
9
25
|
steps: number;
|
|
26
|
+
/** Initial value for the slider */
|
|
10
27
|
defaultValue?: number;
|
|
11
28
|
stepIndicator?: never;
|
|
12
29
|
stepIndicatorProps?: never;
|
|
13
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Configuration for a string-based slider.
|
|
33
|
+
*
|
|
34
|
+
* Defines a slider that operates on predefined string values (e.g., sizes: 'small', 'medium', 'large').
|
|
35
|
+
* Optionally displays step indicators for each value.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* const config: StringSlider = {
|
|
40
|
+
* range: ['XS', 'S', 'M', 'L', 'XL'],
|
|
41
|
+
* defaultValue: 'M',
|
|
42
|
+
* stepIndicator: true
|
|
43
|
+
* };
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
14
46
|
export type StringSlider = {
|
|
47
|
+
/** Array of string values to select from */
|
|
15
48
|
range: string[];
|
|
16
49
|
steps?: never;
|
|
50
|
+
/** Initial selected string value */
|
|
17
51
|
defaultValue?: string;
|
|
52
|
+
/** Whether to display visual indicators for each step */
|
|
18
53
|
stepIndicator?: boolean;
|
|
54
|
+
/** Props for customizing step indicator appearance */
|
|
19
55
|
stepIndicatorProps?: ThemedSliderStepIndicatorProps;
|
|
20
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Internal slider component props.
|
|
59
|
+
*
|
|
60
|
+
* Core slider functionality with state management through shared values.
|
|
61
|
+
* Used internally by ThemedSlider component.
|
|
62
|
+
*/
|
|
21
63
|
export type SliderProps = (NumberSlider | StringSlider) & {
|
|
64
|
+
/** Whether to animate when snapping to steps */
|
|
22
65
|
snapToStepAnimated?: boolean;
|
|
66
|
+
/** Callback invoked when the slider value changes */
|
|
23
67
|
onValueChange: (value: number | string) => void;
|
|
68
|
+
/** Props for the slider container wrapper */
|
|
24
69
|
sliderWrapProps?: ThemedViewProps;
|
|
70
|
+
/** Height/thickness of the slider track */
|
|
25
71
|
trackSize?: SliderTrackSize | number;
|
|
72
|
+
/** Color for the active (filled) portion of the track */
|
|
26
73
|
trackActiveColor?: ThemeColors;
|
|
74
|
+
/** Props for the active track portion */
|
|
27
75
|
trackActiveProps?: ThemedViewProps;
|
|
76
|
+
/** Color for the inactive (unfilled) portion of the track */
|
|
28
77
|
trackInactiveColor?: ThemeColors;
|
|
78
|
+
/** Props for the inactive track portion */
|
|
29
79
|
trackInactiveProps?: AnimatedThemedViewProps;
|
|
80
|
+
/** Size of the draggable thumb/handle */
|
|
30
81
|
thumbSize?: SliderThumbSize | number;
|
|
82
|
+
/** Color of the thumb/handle */
|
|
31
83
|
thumbColor?: ThemeColors;
|
|
84
|
+
/** Props for the thumb component */
|
|
32
85
|
thumbProps?: AnimatedThemedViewProps;
|
|
86
|
+
/** How to display the current value (e.g., 'none', 'above', 'inline') */
|
|
33
87
|
valueDisplayMode?: SliderValueDisplayMode;
|
|
88
|
+
/** Props for the value display container */
|
|
34
89
|
valueDisplayWrapProps?: ThemedViewProps;
|
|
90
|
+
/** Props for the value text */
|
|
35
91
|
valueTextProps?: Omit<ThemedTextProps, 'children'>;
|
|
92
|
+
/** Optional description text shown with the value */
|
|
36
93
|
valueDescription?: string;
|
|
94
|
+
/** Props for the value description text */
|
|
37
95
|
valueDescriptionTextProps?: Omit<ThemedTextProps, 'children'>;
|
|
96
|
+
/** Duration in ms to activate gesture handling */
|
|
38
97
|
gestureActivateDuration?: number;
|
|
98
|
+
/** State setter for the selected value */
|
|
39
99
|
setSelectedVal: SetState<number | string | undefined>;
|
|
100
|
+
/** Shared value for the selected value (used in Reanimated) */
|
|
40
101
|
selectedValSharedVal: SharedValue<number | string | undefined>;
|
|
41
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* Props for themed slider component.
|
|
105
|
+
*
|
|
106
|
+
* Public API for the slider component, supports both numeric and string-based ranges.
|
|
107
|
+
* Provides extensive customization options for appearance and behavior.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* <ThemedSlider
|
|
112
|
+
* range={[0, 100]}
|
|
113
|
+
* steps={20}
|
|
114
|
+
* defaultValue={50}
|
|
115
|
+
* onValueChange={(value) => console.log(value)}
|
|
116
|
+
* trackActiveColor="primary"
|
|
117
|
+
* thumbSize="lg"
|
|
118
|
+
* valueDisplayMode="above"
|
|
119
|
+
* />
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
42
122
|
export type ThemedSliderProps = Omit<SliderProps, 'setSelectedVal' | 'selectedValSharedVal'> & {
|
|
123
|
+
/** Whether to animate when snapping to steps */
|
|
43
124
|
snapToStepAnimated?: boolean;
|
|
125
|
+
/** Callback invoked when the slider value changes */
|
|
44
126
|
onValueChange: (value: number | string) => void;
|
|
127
|
+
/** Props for the outer container wrapper */
|
|
45
128
|
wrapProps?: ThemedViewProps;
|
|
46
129
|
};
|
|
130
|
+
/**
|
|
131
|
+
* Props for slider step indicators.
|
|
132
|
+
*
|
|
133
|
+
* Customizes the visual markers displayed for each step in a string slider.
|
|
134
|
+
*/
|
|
47
135
|
export type ThemedSliderStepIndicatorProps = ThemedViewProps;
|
|
48
136
|
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../../src/types/slider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,kBAAkB,CAAC,EAAE,KAAK,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,8BAA8B,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,WA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