@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
|
@@ -5,6 +5,28 @@ import { useWindowDimensions as useRNWindowDimensions } from 'react-native';
|
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { Orientation } from "../utils/style/const.js";
|
|
7
7
|
import { useThemeSpacing } from "./theme.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Hook to calculate padding styles based on safe area insets.
|
|
11
|
+
* @param config - Configuration object specifying which insets to apply and optional padding values
|
|
12
|
+
* @param config.insets - If true, applies all insets (top, bottom, left, right)
|
|
13
|
+
* @param config.insetTop - If true, applies top inset
|
|
14
|
+
* @param config.insetBottom - If true, applies bottom inset
|
|
15
|
+
* @param config.insetLeft - If true, applies left inset
|
|
16
|
+
* @param config.insetRight - If true, applies right inset
|
|
17
|
+
* @param config.insetsPadding - Additional padding to apply to all insets
|
|
18
|
+
* @param config.insetPaddingTop - Additional padding to apply to top inset
|
|
19
|
+
* @param config.insetPaddingBottom - Additional padding to apply to bottom inset
|
|
20
|
+
* @param config.insetPaddingLeft - Additional padding to apply to left inset
|
|
21
|
+
* @param config.insetPaddingRight - Additional padding to apply to right inset
|
|
22
|
+
* @returns ViewStyle object with calculated padding values for safe areas
|
|
23
|
+
* @example
|
|
24
|
+
* const insetsStyle = useInsetsStyle({
|
|
25
|
+
* insets: true,
|
|
26
|
+
* insetsPadding: 'm'
|
|
27
|
+
* });
|
|
28
|
+
* // Returns: { paddingTop: 44 + 16, paddingBottom: 34 + 16, ... }
|
|
29
|
+
*/
|
|
8
30
|
export function useInsetsStyle(t0) {
|
|
9
31
|
const $ = _c(16);
|
|
10
32
|
const {
|
|
@@ -56,21 +78,71 @@ export function useInsetsStyle(t0) {
|
|
|
56
78
|
const insetsStyle = t1;
|
|
57
79
|
return insetsStyle;
|
|
58
80
|
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Hook to get the window dimensions including width, height, scale, and fontScale.
|
|
84
|
+
* @returns Object containing window dimensions { width, height, scale, fontScale }
|
|
85
|
+
* @example
|
|
86
|
+
* const { width, height } = useWindowDimensions();
|
|
87
|
+
* console.log(`Screen size: ${width}x${height}`);
|
|
88
|
+
*/
|
|
59
89
|
export function useWindowDimensions() {
|
|
60
90
|
return useRNWindowDimensions();
|
|
61
91
|
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Hook to get the current window width in pixels.
|
|
95
|
+
* @returns The width of the window in pixels
|
|
96
|
+
* @example
|
|
97
|
+
* const width = useWindowDimensionsWidth();
|
|
98
|
+
* console.log(`Window width: ${width}px`);
|
|
99
|
+
*/
|
|
62
100
|
export function useWindowDimensionsWidth() {
|
|
63
101
|
return useWindowDimensions().width;
|
|
64
102
|
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Hook to get the current window height in pixels.
|
|
106
|
+
* @returns The height of the window in pixels
|
|
107
|
+
* @example
|
|
108
|
+
* const height = useWindowDimensionsHeight();
|
|
109
|
+
* console.log(`Window height: ${height}px`);
|
|
110
|
+
*/
|
|
65
111
|
export function useWindowDimensionsHeight() {
|
|
66
112
|
return useWindowDimensions().height;
|
|
67
113
|
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Hook to get the pixel density scale of the device.
|
|
117
|
+
* @returns The scale factor (e.g., 2 for @2x, 3 for @3x displays)
|
|
118
|
+
* @example
|
|
119
|
+
* const scale = useWindowDimensionsScale();
|
|
120
|
+
* console.log(`Device scale: ${scale}x`);
|
|
121
|
+
*/
|
|
68
122
|
export function useWindowDimensionsScale() {
|
|
69
123
|
return useWindowDimensions().scale;
|
|
70
124
|
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Hook to get the font scaling factor set by the user in device settings.
|
|
128
|
+
* @returns The font scale factor (1.0 is default, >1.0 means larger text is enabled)
|
|
129
|
+
* @example
|
|
130
|
+
* const fontScale = useWindowDimensionsFontScale();
|
|
131
|
+
* const adjustedFontSize = 16 * fontScale;
|
|
132
|
+
*/
|
|
71
133
|
export function useWindowDimensionsFontScale() {
|
|
72
134
|
return useWindowDimensions().fontScale;
|
|
73
135
|
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Hook to determine the current device orientation.
|
|
139
|
+
* @returns The current orientation ('portrait' or 'landscape')
|
|
140
|
+
* @example
|
|
141
|
+
* const orientation = useOrientation();
|
|
142
|
+
* if (orientation === Orientation.Landscape) {
|
|
143
|
+
* // Render landscape layout
|
|
144
|
+
* }
|
|
145
|
+
*/
|
|
74
146
|
export function useOrientation() {
|
|
75
147
|
const {
|
|
76
148
|
width,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useWindowDimensions","useRNWindowDimensions","useSafeAreaInsets","Orientation","useThemeSpacing","useInsetsStyle","t0","$","_c","insets","insetTop","insetBottom","insetLeft","insetRight","insetsPadding","insetPaddingTop","insetPaddingBottom","insetPaddingLeft","insetPaddingRight","top","bottom","left","right","spacing","t1","JSON","parse","stringify","paddingTop","undefined","paddingBottom","paddingLeft","paddingRight","insetsStyle","useWindowDimensionsWidth","width","useWindowDimensionsHeight","height","useWindowDimensionsScale","scale","useWindowDimensionsFontScale","fontScale","useOrientation","orientation","Landscape","Portrait"],"sourceRoot":"../../../src","sources":["hooks/style.ts"],"mappings":";;;AAAA,SACEA,mBAAmB,IAAIC,qBAAqB,QAEvC,cAAc;AACrB,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,WAAW,QAAQ,yBAAsB;AAClD,SAASC,eAAe,QAAQ,YAAS;
|
|
1
|
+
{"version":3,"names":["useWindowDimensions","useRNWindowDimensions","useSafeAreaInsets","Orientation","useThemeSpacing","useInsetsStyle","t0","$","_c","insets","insetTop","insetBottom","insetLeft","insetRight","insetsPadding","insetPaddingTop","insetPaddingBottom","insetPaddingLeft","insetPaddingRight","top","bottom","left","right","spacing","t1","JSON","parse","stringify","paddingTop","undefined","paddingBottom","paddingLeft","paddingRight","insetsStyle","useWindowDimensionsWidth","width","useWindowDimensionsHeight","height","useWindowDimensionsScale","scale","useWindowDimensionsFontScale","fontScale","useOrientation","orientation","Landscape","Portrait"],"sourceRoot":"../../../src","sources":["hooks/style.ts"],"mappings":";;;AAAA,SACEA,mBAAmB,IAAIC,qBAAqB,QAEvC,cAAc;AACrB,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,W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A;AACA;AACA;AACA,OAAO,SAAAC,yBAAA;EAAA,OACEtC,mBAAmB,CAAC,CAAC,CAAAuC,KAAM;AAAA;;AAGpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,6BAAA;EAAA,OACExC,mBAAmB,CAAC,CAAC,CAAAyC,SAAU;AAAA;;AAGxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,eAAA;EACL;IAAAP,KAAA;IAAAE;EAAA,IAA0BrC,mBAAmB,CAAC,CAAC;EAE/C,MAAA2C,WAAA,GACER,KAAK,GAAGE,MAAqD,GAA5ClC,WAAW,CAAAyC,SAAiC,GAApBzC,WAAW,CAAA0C,QAAS;EAAC,OAEzDF,WAAW;AAAA","ignoreList":[]}
|
|
@@ -4,21 +4,72 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { useResponsiveProp, useTheme as useRestyleTheme } from '@shopify/restyle';
|
|
5
5
|
import { useColorScheme } from 'react-native';
|
|
6
6
|
import { darkTheme, lightTheme } from "../utils/theme/const.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Hook to access the current theme object.
|
|
10
|
+
* @returns The current theme configuration including colors, spacing, breakpoints, etc.
|
|
11
|
+
* @example
|
|
12
|
+
* const theme = useTheme();
|
|
13
|
+
* console.log(theme.colors.themePri);
|
|
14
|
+
*/
|
|
7
15
|
export function useTheme() {
|
|
8
16
|
return useRestyleTheme();
|
|
9
17
|
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Hook to access the theme's color palette.
|
|
21
|
+
* @returns Object containing all theme colors (themePri, themeSec, background, text, etc.).
|
|
22
|
+
* @example
|
|
23
|
+
* const colors = useThemeColors();
|
|
24
|
+
* console.log(colors.themePri); // '#7ccf6b'
|
|
25
|
+
*/
|
|
10
26
|
export function useThemeColors() {
|
|
11
27
|
return useTheme().colors;
|
|
12
28
|
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Hook to access the theme's spacing scale.
|
|
32
|
+
* @returns Object containing spacing values (none, xxxs, xxs, xs, s, m, l, xl, xxl, xxxl).
|
|
33
|
+
* @example
|
|
34
|
+
* const spacing = useThemeSpacing();
|
|
35
|
+
* console.log(spacing.m); // 16
|
|
36
|
+
*/
|
|
13
37
|
export function useThemeSpacing() {
|
|
14
38
|
return useTheme().spacing;
|
|
15
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Hook to access the theme's responsive breakpoints.
|
|
43
|
+
* @returns Object containing breakpoint values (smallPhone, phone, smallTablet, tablet, desktop).
|
|
44
|
+
* @example
|
|
45
|
+
* const breakpoints = useThemeBreakpoints();
|
|
46
|
+
* console.log(breakpoints.tablet); // 900
|
|
47
|
+
*/
|
|
16
48
|
export function useThemeBreakpoints() {
|
|
17
49
|
return useTheme().breakpoints;
|
|
18
50
|
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Hook to resolve a responsive prop value based on the current breakpoint.
|
|
54
|
+
* @template T - The type of the prop value
|
|
55
|
+
* @param propValue - A responsive value object with breakpoint keys
|
|
56
|
+
* @returns The resolved value for the current breakpoint
|
|
57
|
+
* @example
|
|
58
|
+
* const fontSize = useThemeBreakpointValues({ phone: 14, tablet: 16, desktop: 18 });
|
|
59
|
+
*/
|
|
19
60
|
export function useThemeBreakpointValues(propValue) {
|
|
20
61
|
return useResponsiveProp(propValue);
|
|
21
62
|
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Hook to get the current active breakpoint name.
|
|
66
|
+
* @returns The name of the current breakpoint ('smallPhone' | 'phone' | 'smallTablet' | 'tablet' | 'desktop')
|
|
67
|
+
* @example
|
|
68
|
+
* const breakpoint = useThemeBreakpoint();
|
|
69
|
+
* if (breakpoint === 'phone') {
|
|
70
|
+
* // Render mobile layout
|
|
71
|
+
* }
|
|
72
|
+
*/
|
|
22
73
|
export function useThemeBreakpoint() {
|
|
23
74
|
const $ = _c(1);
|
|
24
75
|
let t0;
|
|
@@ -37,19 +88,61 @@ export function useThemeBreakpoint() {
|
|
|
37
88
|
const responsiveVal = t0;
|
|
38
89
|
return useThemeBreakpointValues(responsiveVal);
|
|
39
90
|
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Hook to access the theme's z-index scale.
|
|
94
|
+
* @returns Object containing z-index values (base, bottom, middle, top).
|
|
95
|
+
* @example
|
|
96
|
+
* const zIndices = useThemeZIndices();
|
|
97
|
+
* console.log(zIndices.top); // 3
|
|
98
|
+
*/
|
|
40
99
|
export function useThemeZIndices() {
|
|
41
100
|
return useTheme().zIndices;
|
|
42
101
|
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Hook to access the theme's border radius scale.
|
|
105
|
+
* @returns Object containing border radius values (none, s, m, l, round).
|
|
106
|
+
* @example
|
|
107
|
+
* const borderRadii = useThemeBorderRadii();
|
|
108
|
+
* console.log(borderRadii.m); // 24
|
|
109
|
+
*/
|
|
43
110
|
export function useThemeBorderRadii() {
|
|
44
111
|
return useTheme().borderRadii;
|
|
45
112
|
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Hook to access the theme's text style variants.
|
|
116
|
+
* @returns Object containing text variant definitions (textXS, textS, textM, textL, textXL and their bold versions).
|
|
117
|
+
* @example
|
|
118
|
+
* const textVariants = useThemeTextVariants();
|
|
119
|
+
* console.log(textVariants.textM);
|
|
120
|
+
*/
|
|
46
121
|
export function useThemeTextVariants() {
|
|
47
122
|
return useTheme().textVariants;
|
|
48
123
|
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Hook to determine if the current color scheme is dark mode.
|
|
127
|
+
* @param overrideColorScheme - Optional color scheme to override the system's color scheme
|
|
128
|
+
* @returns True if the color scheme is 'dark', false otherwise
|
|
129
|
+
* @example
|
|
130
|
+
* const isDark = useIsDarkColorScheme();
|
|
131
|
+
* const backgroundColor = isDark ? '#000' : '#fff';
|
|
132
|
+
*/
|
|
49
133
|
export function useIsDarkColorScheme(overrideColorScheme) {
|
|
50
134
|
const colorScheme = useColorScheme();
|
|
51
135
|
return (overrideColorScheme ?? colorScheme) === "dark";
|
|
52
136
|
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Hook to get the appropriate theme (light or dark) based on the current color scheme.
|
|
140
|
+
* @param overrideColorScheme - Optional color scheme to override the system's color scheme
|
|
141
|
+
* @returns The dark theme if in dark mode, otherwise the light theme
|
|
142
|
+
* @example
|
|
143
|
+
* const theme = useColorSchemeTheme();
|
|
144
|
+
* // Returns darkTheme or lightTheme based on system preference
|
|
145
|
+
*/
|
|
53
146
|
export function useColorSchemeTheme(overrideColorScheme) {
|
|
54
147
|
return useIsDarkColorScheme(overrideColorScheme) ? darkTheme : lightTheme;
|
|
55
148
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useResponsiveProp","useTheme","useRestyleTheme","useColorScheme","darkTheme","lightTheme","useThemeColors","colors","useThemeSpacing","spacing","useThemeBreakpoints","breakpoints","useThemeBreakpointValues","propValue","useThemeBreakpoint","$","_c","t0","Symbol","for","smallPhone","phone","smallTablet","tablet","desktop","responsiveVal","useThemeZIndices","zIndices","useThemeBorderRadii","borderRadii","useThemeTextVariants","textVariants","useIsDarkColorScheme","overrideColorScheme","colorScheme","useColorSchemeTheme"],"sourceRoot":"../../../src","sources":["hooks/theme.ts"],"mappings":";;;AAAA,SACEA,iBAAiB,EACjBC,QAAQ,IAAIC,eAAe,QAGtB,kBAAkB;AACzB,SAASC,cAAc,QAA8B,cAAc;AAEnE,SAASC,SAAS,EAAEC,UAAU,QAAQ,yBAAsB;
|
|
1
|
+
{"version":3,"names":["useResponsiveProp","useTheme","useRestyleTheme","useColorScheme","darkTheme","lightTheme","useThemeColors","colors","useThemeSpacing","spacing","useThemeBreakpoints","breakpoints","useThemeBreakpointValues","propValue","useThemeBreakpoint","$","_c","t0","Symbol","for","smallPhone","phone","smallTablet","tablet","desktop","responsiveVal","useThemeZIndices","zIndices","useThemeBorderRadii","borderRadii","useThemeTextVariants","textVariants","useIsDarkColorScheme","overrideColorScheme","colorScheme","useColorSchemeTheme"],"sourceRoot":"../../../src","sources":["hooks/theme.ts"],"mappings":";;;AAAA,SACEA,iBAAiB,EACjBC,QAAQ,IAAIC,eAAe,QAGtB,kBAAkB;AACzB,SAASC,cAAc,QAA8B,cAAc;AAEnE,SAASC,SAAS,EAAEC,UAAU,QAAQ,yBAAsB;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAJ,SAAA;EAAA,OACEC,eAAe,CAAQ,CAAC;AAAA;;AAGjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAI,eAAA;EAAA,OACEL,QAAQ,CAAC,CAAC,CAAAM,MAAO;AAAA;;AAG1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,gBAAA;EAAA,OACEP,QAAQ,CAAC,CAAC,CAAAQ,OAAQ;AAAA;;AAG3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,oBAAA;EAAA,OACET,QAAQ,CAAC,CAAC,CAAAU,WAAY;AAAA;;AAG/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,yBAAAC,SAAA;EAAA,OAGEb,iBAAiB,CAACa,SAAS,CAAC;AAAA;;AAGrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,mBAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAF,CAAA,QAAAG,MAAA,CAAAC,GAAA;IACmEF,EAAA;MAAAG,UAAA,EAC1D,YAAY;MAAAC,KAAA,EACjB,OAAO;MAAAC,WAAA,EACD,aAAa;MAAAC,MAAA,EAClB,QAAQ;MAAAC,OAAA,EACP;IACX,CAAC;IAAAT,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAND,MAAAU,aAAA,GAAwER,EAMvE;EAAC,OAEKL,wBAAwB,CAACa,aAAa,CAAC;AAAA;;AAGhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,iBAAA;EAAA,OACEzB,QAAQ,CAAC,CAAC,CAAA0B,QAAS;AAAA;;AAG5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,oBAAA;EAAA,OACE3B,QAAQ,CAAC,CAAC,CAAA4B,WAAY;AAAA;;AAG/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,qBAAA;EAAA,OACE7B,QAAQ,CAAC,CAAC,CAAA8B,YAAa;AAAA;;AAGhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,qBAAAC,mBAAA;EACL,MAAAC,WAAA,GAAoB/B,cAAc,CAAC,CAAC;EAAC,OAE9B,CAAC8B,mBAAkC,IAAlCC,WAAkC,MAAM,MAAM;AAAA;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,oBAAAF,mBAAA;EAAA,OACED,oBAAoB,CAACC,mBAA4C,CAAC,GAAlE7B,SAAkE,GAAlEC,UAAkE;AAAA","ignoreList":[]}
|
package/lib/module/hooks/view.js
CHANGED
|
@@ -2,11 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { useRestyle } from '@shopify/restyle';
|
|
5
|
-
import { useRef } from 'react';
|
|
5
|
+
import { useEffect, useRef } from 'react';
|
|
6
|
+
import { composeStyles } from "../utils/style/func.js";
|
|
6
7
|
import { animatedThemedViewRestyleFuncs } from "../utils/theme/restyle.js";
|
|
8
|
+
import { useInsetsStyle } from "./style.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Hook to create a ref for a View component.
|
|
12
|
+
* @returns A mutable ref object for accessing the View instance
|
|
13
|
+
* @example
|
|
14
|
+
* const viewRef = useViewRef();
|
|
15
|
+
* <View ref={viewRef} />
|
|
16
|
+
* // Later: viewRef.current?.measure(...)
|
|
17
|
+
*/
|
|
7
18
|
export function useViewRef() {
|
|
8
19
|
return useRef(null);
|
|
9
20
|
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Hook to create animated themed view props with reanimated support.
|
|
24
|
+
* @param props - Animated themed view properties including theme props and animatedStyle
|
|
25
|
+
* @param props.animatedStyle - Reanimated style object to apply to the view
|
|
26
|
+
* @returns Object containing all animated view props with applied theme styles and animations
|
|
27
|
+
* @example
|
|
28
|
+
* const animatedStyle = useAnimatedStyle(() => ({
|
|
29
|
+
* transform: [{ translateX: progress.value * 100 }]
|
|
30
|
+
* }));
|
|
31
|
+
* const viewProps = useAnimatedThemedView({
|
|
32
|
+
* backgroundColor: 'themePri',
|
|
33
|
+
* padding: 'm',
|
|
34
|
+
* borderRadius: 'm',
|
|
35
|
+
* animatedStyle
|
|
36
|
+
* });
|
|
37
|
+
*/
|
|
10
38
|
export function useAnimatedThemedView(t0) {
|
|
11
39
|
const $ = _c(12);
|
|
12
40
|
let animatedStyle;
|
|
@@ -64,4 +92,97 @@ export function useAnimatedThemedView(t0) {
|
|
|
64
92
|
const animatedThemedViewProps = t3;
|
|
65
93
|
return animatedThemedViewProps;
|
|
66
94
|
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Hook to create themed screen wrap styles with safe area inset support and effect management.
|
|
98
|
+
* @param props - Themed screen wrap properties including effect setup/cleanup and inset styles
|
|
99
|
+
* @returns Style object combining themed screen wrap styles with calculated inset styles
|
|
100
|
+
* @example
|
|
101
|
+
* const style = useThemedScreenWrap({
|
|
102
|
+
* effectSetup: () => console.log('Mounted'),
|
|
103
|
+
* effectCleanup: () => console.log('Unmounted'),
|
|
104
|
+
* insets: true,
|
|
105
|
+
* insetPaddingTop: 'm',
|
|
106
|
+
* });
|
|
107
|
+
*/
|
|
108
|
+
export function useThemedScreenWrap(t0) {
|
|
109
|
+
const $ = _c(19);
|
|
110
|
+
const {
|
|
111
|
+
effectSetup,
|
|
112
|
+
effectCleanup,
|
|
113
|
+
effectDependencies: t1,
|
|
114
|
+
style: themedScreenWrapStyle,
|
|
115
|
+
insets,
|
|
116
|
+
insetTop,
|
|
117
|
+
insetBottom,
|
|
118
|
+
insetLeft,
|
|
119
|
+
insetRight,
|
|
120
|
+
insetsPadding,
|
|
121
|
+
insetPaddingTop,
|
|
122
|
+
insetPaddingBottom,
|
|
123
|
+
insetPaddingLeft,
|
|
124
|
+
insetPaddingRight
|
|
125
|
+
} = t0;
|
|
126
|
+
let t2;
|
|
127
|
+
if ($[0] !== t1) {
|
|
128
|
+
t2 = t1 === undefined ? [] : t1;
|
|
129
|
+
$[0] = t1;
|
|
130
|
+
$[1] = t2;
|
|
131
|
+
} else {
|
|
132
|
+
t2 = $[1];
|
|
133
|
+
}
|
|
134
|
+
const effectDependencies = t2;
|
|
135
|
+
let t3;
|
|
136
|
+
if ($[2] !== insetBottom || $[3] !== insetLeft || $[4] !== insetPaddingBottom || $[5] !== insetPaddingLeft || $[6] !== insetPaddingRight || $[7] !== insetPaddingTop || $[8] !== insetRight || $[9] !== insetTop || $[10] !== insets || $[11] !== insetsPadding) {
|
|
137
|
+
t3 = {
|
|
138
|
+
insets,
|
|
139
|
+
insetTop,
|
|
140
|
+
insetBottom,
|
|
141
|
+
insetLeft,
|
|
142
|
+
insetRight,
|
|
143
|
+
insetsPadding,
|
|
144
|
+
insetPaddingTop,
|
|
145
|
+
insetPaddingBottom,
|
|
146
|
+
insetPaddingLeft,
|
|
147
|
+
insetPaddingRight
|
|
148
|
+
};
|
|
149
|
+
$[2] = insetBottom;
|
|
150
|
+
$[3] = insetLeft;
|
|
151
|
+
$[4] = insetPaddingBottom;
|
|
152
|
+
$[5] = insetPaddingLeft;
|
|
153
|
+
$[6] = insetPaddingRight;
|
|
154
|
+
$[7] = insetPaddingTop;
|
|
155
|
+
$[8] = insetRight;
|
|
156
|
+
$[9] = insetTop;
|
|
157
|
+
$[10] = insets;
|
|
158
|
+
$[11] = insetsPadding;
|
|
159
|
+
$[12] = t3;
|
|
160
|
+
} else {
|
|
161
|
+
t3 = $[12];
|
|
162
|
+
}
|
|
163
|
+
const insetsStyle = useInsetsStyle(t3);
|
|
164
|
+
let t4;
|
|
165
|
+
if ($[13] !== effectCleanup || $[14] !== effectSetup) {
|
|
166
|
+
t4 = () => {
|
|
167
|
+
effectSetup?.();
|
|
168
|
+
return effectCleanup;
|
|
169
|
+
};
|
|
170
|
+
$[13] = effectCleanup;
|
|
171
|
+
$[14] = effectSetup;
|
|
172
|
+
$[15] = t4;
|
|
173
|
+
} else {
|
|
174
|
+
t4 = $[15];
|
|
175
|
+
}
|
|
176
|
+
useEffect(t4, effectDependencies);
|
|
177
|
+
let t5;
|
|
178
|
+
if ($[16] !== insetsStyle || $[17] !== themedScreenWrapStyle) {
|
|
179
|
+
t5 = composeStyles(themedScreenWrapStyle, insetsStyle);
|
|
180
|
+
$[16] = insetsStyle;
|
|
181
|
+
$[17] = themedScreenWrapStyle;
|
|
182
|
+
$[18] = t5;
|
|
183
|
+
} else {
|
|
184
|
+
t5 = $[18];
|
|
185
|
+
}
|
|
186
|
+
return t5;
|
|
187
|
+
}
|
|
67
188
|
//# sourceMappingURL=view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRestyle","useRef","animatedThemedViewRestyleFuncs","useViewRef","useAnimatedThemedView","t0","$","_c","animatedStyle","props","t1","restyle","style","t2","t3","accessible","role","animatedThemedViewProps"],"sourceRoot":"../../../src","sources":["hooks/view.ts"],"mappings":";;;AAAA,SAASA,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,MAAM,QAAQ,OAAO;
|
|
1
|
+
{"version":3,"names":["useRestyle","useEffect","useRef","composeStyles","animatedThemedViewRestyleFuncs","useInsetsStyle","useViewRef","useAnimatedThemedView","t0","$","_c","animatedStyle","props","t1","restyle","style","t2","t3","accessible","role","animatedThemedViewProps","useThemedScreenWrap","effectSetup","effectCleanup","effectDependencies","themedScreenWrapStyle","insets","insetTop","insetBottom","insetLeft","insetRight","insetsPadding","insetPaddingTop","insetPaddingBottom","insetPaddingLeft","insetPaddingRight","undefined","insetsStyle","t4","t5"],"sourceRoot":"../../../src","sources":["hooks/view.ts"],"mappings":";;;AAAA,SAASA,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAQzC,SAASC,aAAa,QAAQ,wBAAqB;AACnD,SAASC,8BAA8B,QAAQ,2BAAwB;AACvE,SAASC,cAAc,QAAQ,YAAS;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAC,WAAA;EAAA,OACEJ,MAAM,CAAO,IAAI,CAAC;AAAA;;AAG3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAAK,sBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAA,IAAAC,aAAA;EAAA,IAAAC,KAAA;EAAA,IAAAH,CAAA,QAAAD,EAAA;IAA+B;MAAAG,aAAA;MAAA,GAAAC;IAAA,IAAAJ,EAGZ;IAAAC,CAAA,MAAAD,EAAA;IAAAC,CAAA,MAAAE,aAAA;IAAAF,CAAA,MAAAG,KAAA;EAAA;IAAAD,aAAA,GAAAF,CAAA;IAAAG,KAAA,GAAAH,CAAA;EAAA;EACM,MAAAI,EAAA,GAAAb,UAAU,CACtCI,8BAA8B,EAC9BQ,KACF,CAAC;EAAA,IAAAE,OAAA;EAAA,IAAAC,KAAA;EAAA,IAAAN,CAAA,QAAAI,EAAA;IAHD;MAAAE,KAAA;MAAA,GAAAD;IAAA,IAA8BD,EAG7B;IAACJ,CAAA,MAAAI,EAAA;IAAAJ,CAAA,MAAAK,OAAA;IAAAL,CAAA,MAAAM,KAAA;EAAA;IAAAD,OAAA,GAAAL,CAAA;IAAAM,KAAA,GAAAN,CAAA;EA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AAA,IAAAe,EAAA;EAAA,IAAA9B,CAAA,SAAA4B,WAAA,IAAA5B,CAAA,SAAAgB,qBAAA;IAEfc,EAAA,GAAApC,aAAa,CAAYsB,qBAAqB,EAAEY,WAAW,CAAC;IAAA5B,CAAA,OAAA4B,WAAA;IAAA5B,CAAA,OAAAgB,qBAAA;IAAAhB,CAAA,OAAA8B,EAAA;EAAA;IAAAA,EAAA,GAAA9B,CAAA;EAAA;EAAA,OAA5D8B,EAA4D;AAAA","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
export { default as ThemedAccordion } from "./components/accordion/ThemedAccordion.js";
|
|
3
4
|
export { default as AnimatedThemedPressable } from "./components/button/AnimatedThemedPressable.js";
|
|
4
5
|
export { default as ThemedButton } from "./components/button/ThemedButton.js";
|
|
5
6
|
export { default as ThemedIconButton } from "./components/button/ThemedIconButton.js";
|
|
@@ -8,7 +9,7 @@ export { default as ThemedPressable } from "./components/button/ThemedPressable.
|
|
|
8
9
|
export { default as ThemedIcon } from "./components/icon/ThemedIcon.js";
|
|
9
10
|
export { default as List } from "./components/list/List.js";
|
|
10
11
|
export { default as ThemedLoading } from "./components/loading/ThemedLoading.js";
|
|
11
|
-
export { default as ActionSheet } from
|
|
12
|
+
export { default as ActionSheet } from "./components/overlay/actionSheet/ActionSheet.js";
|
|
12
13
|
export { default as Alert } from "./components/overlay/alert/Alert.js";
|
|
13
14
|
export { default as ThemedLoadingModal } from "./components/overlay/modal/ThemedLoadingModal.js";
|
|
14
15
|
export { default as ThemedModal } from "./components/overlay/modal/ThemedModal.js";
|
|
@@ -18,7 +19,7 @@ export { default as InsetsProvider } from "./components/provider/InsetsProvider.
|
|
|
18
19
|
export { default as ReactNativeTemplateProviders } from "./components/provider/ReactNativeTemplateProviders.js";
|
|
19
20
|
export { default as ThemeProvider } from "./components/provider/ThemeProvider.js";
|
|
20
21
|
export { default as ThemedSeparator } from "./components/separator/ThemedSeparator.js";
|
|
21
|
-
export { default as ThemedSlider } from
|
|
22
|
+
export { default as ThemedSlider } from "./components/slider/ThemedSlider.js";
|
|
22
23
|
export { default as ThemedSwitch } from "./components/switch/ThemedSwitch.js";
|
|
23
24
|
export { default as ThemedIconText } from "./components/text/ThemedIconText.js";
|
|
24
25
|
export { default as ThemedText } from "./components/text/ThemedText.js";
|
|
@@ -35,6 +36,7 @@ export * from "./hooks/separator.js";
|
|
|
35
36
|
export * from "./hooks/style.js";
|
|
36
37
|
export * from "./hooks/theme.js";
|
|
37
38
|
export * from "./hooks/view.js";
|
|
39
|
+
export * from "./types/accordion.js";
|
|
38
40
|
export * from "./types/button.js";
|
|
39
41
|
export * from "./types/icon.js";
|
|
40
42
|
export * from "./types/list.js";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","AnimatedThemedPressable","ThemedButton","ThemedIconButton","ThemedIconTextButton","ThemedPressable","ThemedIcon","List","ThemedLoading","ActionSheet","Alert","ThemedLoadingModal","ThemedModal","ThemedToast","GestureProvider","InsetsProvider","ReactNativeTemplateProviders","ThemeProvider","ThemedSeparator","ThemedSlider","ThemedSwitch","ThemedIconText","ThemedText","AnimatedThemedView","ThemedScreenWrap","ThemedScrollView","ThemedView"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,uBAAuB,QAAQ,gDAA6C;AAChG,
|
|
1
|
+
{"version":3,"names":["default","ThemedAccordion","AnimatedThemedPressable","ThemedButton","ThemedIconButton","ThemedIconTextButton","ThemedPressable","ThemedIcon","List","ThemedLoading","ActionSheet","Alert","ThemedLoadingModal","ThemedModal","ThemedToast","GestureProvider","InsetsProvider","ReactNativeTemplateProviders","ThemeProvider","ThemedSeparator","ThemedSlider","ThemedSwitch","ThemedIconText","ThemedText","AnimatedThemedView","ThemedScreenWrap","ThemedScrollView","ThemedView"],"sourceRoot":"../../src","sources":["index.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CAAoC;AAChF,SAASzB,OAAO,IAAI0B,gBAAgB,QAAQ,uCAAoC;AAChF,SAAS1B,OAAO,IAAI2B,UAAU,QAAQ,iCAA8B;AAEpE,cAAc,mBAAgB;AAC9B,cAAc,iBAAc;AAC5B,cAAc,oBAAiB;AAC/B,cAAc,kBAAe;AAC7B,cAAc,uBAAoB;AAClC,cAAc,sBAAmB;AACjC,cAAc,kBAAe;AAC7B,cAAc,kBAAe;AAC7B,cAAc,iBAAc;AAE5B,cAAc,sBAAmB;AACjC,cAAc,mBAAgB;AAC9B,cAAc,iBAAc;AAC5B,cAAc,iBAAc;AAC5B,cAAc,oBAAiB;AAC/B,cAAc,oBAAiB;AAC/B,cAAc,qBAAkB;AAChC,cAAc,kBAAe;AAC7B,cAAc,uBAAoB;AAClC,cAAc,sBAAmB;AACjC,cAAc,mBAAgB;AAC9B,cAAc,kBAAe;AAC7B,cAAc,mBAAgB;AAC9B,cAAc,iBAAc;AAC5B,cAAc,kBAAe;AAC7B,cAAc,iBAAc;AAE5B,cAAc,yBAAsB;AACpC,cAAc,0BAAuB;AACrC,cAAc,yBAAsB;AACpC,cAAc,wBAAqB;AACnC,cAAc,uBAAoB;AAClC,cAAc,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/accordion.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,13 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Scale ratios applied to buttons during press animations.
|
|
5
|
+
* These values determine how much a button shrinks when pressed, creating visual feedback.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Button scaleRatio={ButtonScaleRatio.Square}>
|
|
10
|
+
* Press Me
|
|
11
|
+
* </Button>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
3
14
|
export let ButtonScaleRatio = /*#__PURE__*/function (ButtonScaleRatio) {
|
|
15
|
+
/** Scale to 90% - suitable for square or circular buttons */
|
|
4
16
|
ButtonScaleRatio[ButtonScaleRatio["Square"] = 0.9] = "Square";
|
|
17
|
+
/** Scale to 98% - subtle effect for rectangular buttons */
|
|
5
18
|
ButtonScaleRatio[ButtonScaleRatio["Rectangle"] = 0.98] = "Rectangle";
|
|
19
|
+
/** No scaling animation */
|
|
6
20
|
ButtonScaleRatio[ButtonScaleRatio["None"] = 1] = "None";
|
|
7
21
|
return ButtonScaleRatio;
|
|
8
22
|
}({});
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Delay strategies for handling rapid button press events.
|
|
26
|
+
* Controls how multiple press events are processed over time.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <Button onPressDelayConfig={{ type: OnPressDelayType.Throttle, delay: 1000 }}>
|
|
31
|
+
* Submit
|
|
32
|
+
* </Button>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
9
35
|
export let OnPressDelayType = /*#__PURE__*/function (OnPressDelayType) {
|
|
36
|
+
/** Throttle - Execute the first press, then ignore subsequent presses for the delay period */
|
|
10
37
|
OnPressDelayType[OnPressDelayType["Throttle"] = 0] = "Throttle";
|
|
38
|
+
/** Debounce - Wait for the delay period after the last press before executing */
|
|
11
39
|
OnPressDelayType[OnPressDelayType["Debounce"] = 1] = "Debounce";
|
|
12
40
|
return OnPressDelayType;
|
|
13
41
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ButtonScaleRatio","OnPressDelayType"],"sourceRoot":"../../../../src","sources":["utils/button/const.ts"],"mappings":";;AAAA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;
|
|
1
|
+
{"version":3,"names":["ButtonScaleRatio","OnPressDelayType"],"sourceRoot":"../../../../src","sources":["utils/button/const.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAC1B;EADUA,gBAAgB,CAAhBA,gBAAgB;EAG1B;EAHUA,gBAAgB,CAAhBA,gBAAgB;EAK1B;EALUA,gBAAgB,CAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAS5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAC1B;EADUA,gBAAgB,CAAhBA,gBAAgB;EAG1B;EAHUA,gBAAgB,CAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA","ignoreList":[]}
|
|
@@ -4,33 +4,105 @@ import { IconSize } from '@jamadd/react-native-template-icons';
|
|
|
4
4
|
import { createContext } from 'react';
|
|
5
5
|
/** @internal */
|
|
6
6
|
export const overlayMaxWidthPercent = '80%';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Types of overlay components that can be dismissed.
|
|
10
|
+
* Used to identify which overlay component triggered a dismiss result.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const result = {
|
|
15
|
+
* type: OverlayDismissResultType.Alert,
|
|
16
|
+
* text: 'User cancelled'
|
|
17
|
+
* };
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
7
20
|
export let OverlayDismissResultType = /*#__PURE__*/function (OverlayDismissResultType) {
|
|
21
|
+
/** Toast notification overlay */
|
|
8
22
|
OverlayDismissResultType["Toast"] = "toast";
|
|
23
|
+
/** Alert dialog overlay */
|
|
9
24
|
OverlayDismissResultType["Alert"] = "alert";
|
|
25
|
+
/** Action sheet overlay */
|
|
10
26
|
OverlayDismissResultType["ActionSheet"] = "actionSheet";
|
|
11
27
|
return OverlayDismissResultType;
|
|
12
28
|
}({});
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Default text returned when an overlay is dismissed by user action.
|
|
32
|
+
* Used as the dismiss result text when no custom text is provided.
|
|
33
|
+
*/
|
|
13
34
|
export const overlayDismissResultDefaultText = 'cancelByUser';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Position types for toast notifications.
|
|
38
|
+
* Determines where on the screen a toast will appear.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* showToast({
|
|
43
|
+
* type: ToastType.TopRight,
|
|
44
|
+
* message: 'Success!'
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
14
48
|
export let ToastType = /*#__PURE__*/function (ToastType) {
|
|
49
|
+
/** Center top of screen */
|
|
15
50
|
ToastType["Top"] = "top";
|
|
51
|
+
/** Top left corner */
|
|
16
52
|
ToastType["TopLeft"] = "topLeft";
|
|
53
|
+
/** Top right corner */
|
|
17
54
|
ToastType["TopRight"] = "topRight";
|
|
55
|
+
/** Center bottom of screen */
|
|
18
56
|
ToastType["Bottom"] = "bottom";
|
|
57
|
+
/** Bottom left corner */
|
|
19
58
|
ToastType["BottomLeft"] = "bottomLeft";
|
|
59
|
+
/** Bottom right corner */
|
|
20
60
|
ToastType["BottomRight"] = "bottomRight";
|
|
21
61
|
return ToastType;
|
|
22
62
|
}({});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Duration constants for toast notifications in milliseconds.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* showToast({
|
|
70
|
+
* message: 'Saved',
|
|
71
|
+
* duration: ToastDuration.Short
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
23
75
|
export let ToastDuration = /*#__PURE__*/function (ToastDuration) {
|
|
76
|
+
/** Short duration - 3 seconds */
|
|
24
77
|
ToastDuration[ToastDuration["Short"] = 3000] = "Short";
|
|
78
|
+
/** Long duration - 5 seconds */
|
|
25
79
|
ToastDuration[ToastDuration["Long"] = 5000] = "Long";
|
|
26
80
|
return ToastDuration;
|
|
27
81
|
}({});
|
|
28
82
|
|
|
29
83
|
/** @internal */
|
|
30
84
|
export const AlertContext = /*#__PURE__*/createContext({});
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Visual styles for alert dialog buttons.
|
|
88
|
+
* Determines the appearance and emphasis level of buttons in alert dialogs.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* showAlert({
|
|
93
|
+
* buttons: [
|
|
94
|
+
* { text: 'Cancel', type: AlertButtonType.Secondary },
|
|
95
|
+
* { text: 'Delete', type: AlertButtonType.Destructive }
|
|
96
|
+
* ]
|
|
97
|
+
* });
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
31
100
|
export let AlertButtonType = /*#__PURE__*/function (AlertButtonType) {
|
|
101
|
+
/** Primary action button - emphasized appearance */
|
|
32
102
|
AlertButtonType["Primary"] = "primary";
|
|
103
|
+
/** Secondary action button - normal appearance */
|
|
33
104
|
AlertButtonType["Secondary"] = "secondary";
|
|
105
|
+
/** Destructive action button - warning appearance (typically red) */
|
|
34
106
|
AlertButtonType["Destructive"] = "destructive";
|
|
35
107
|
return AlertButtonType;
|
|
36
108
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconSize","createContext","overlayMaxWidthPercent","OverlayDismissResultType","overlayDismissResultDefaultText","ToastType","ToastDuration","AlertContext","AlertButtonType","ActionSheetContext","actionSheetOpenDuration","actionSheetSnapDuration","actionSheetDismissDuration","actionSheetMaxHeightRatio","ActionSheetExpandableHeightRatio","actionSheetHeaderIconSize","M","actionSheetHeaderPadding","actionSheetOptionListItemPadding","actionSheetOptionListItemTextVariant"],"sourceRoot":"../../../../src","sources":["utils/overlay/const.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,qCAAqC;AAC9D,SAASC,aAAa,QAAQ,OAAO;AAOrC;AACA,OAAO,MAAMC,sBAAsB,GAAG,KAAK;
|
|
1
|
+
{"version":3,"names":["IconSize","createContext","overlayMaxWidthPercent","OverlayDismissResultType","overlayDismissResultDefaultText","ToastType","ToastDuration","AlertContext","AlertButtonType","ActionSheetContext","actionSheetOpenDuration","actionSheetSnapDuration","actionSheetDismissDuration","actionSheetMaxHeightRatio","ActionSheetExpandableHeightRatio","actionSheetHeaderIconSize","M","actionSheetHeaderPadding","actionSheetOptionListItemPadding","actionSheetOptionListItemTextVariant"],"sourceRoot":"../../../../src","sources":["utils/overlay/const.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,qCAAqC;AAC9D,SAASC,aAAa,QAAQ,OAAO;AAOrC;AACA,OAAO,MAAMC,sBAAsB,GAAG,KAAK;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAClC;EADUA,wBAAwB;EAGlC;EAHUA,wBAAwB;EAKlC;EALUA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;;AASpC;AACA;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,GAAG,cAAc;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,SAAS,0BAATA,SAAS;EACnB;EADUA,SAAS;EAGnB;EAHUA,SAAS;EAKnB;EALUA,SAAS;EAOnB;EAPUA,SAAS;EASnB;EATUA,SAAS;EAWnB;EAXUA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAerB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,aAAa,0BAAbA,aAAa;EACvB;EADUA,aAAa,CAAbA,aAAa;EAGvB;EAHUA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAOzB;AACA,OAAO,MAAMC,YAAY,gBAAGN,aAAa,CAAkB,CAAC,CAAC,CAAC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYO,eAAe,0BAAfA,eAAe;EACzB;EADUA,eAA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