@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
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":"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","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export { default as ThemedAccordion } from
|
|
3
|
+
export { default as ThemedAccordion } from "./components/accordion/ThemedAccordion.js";
|
|
4
4
|
export { default as AnimatedThemedPressable } from "./components/button/AnimatedThemedPressable.js";
|
|
5
5
|
export { default as ThemedButton } from "./components/button/ThemedButton.js";
|
|
6
6
|
export { default as ThemedIconButton } from "./components/button/ThemedIconButton.js";
|
|
@@ -9,7 +9,7 @@ export { default as ThemedPressable } from "./components/button/ThemedPressable.
|
|
|
9
9
|
export { default as ThemedIcon } from "./components/icon/ThemedIcon.js";
|
|
10
10
|
export { default as List } from "./components/list/List.js";
|
|
11
11
|
export { default as ThemedLoading } from "./components/loading/ThemedLoading.js";
|
|
12
|
-
export { default as ActionSheet } from
|
|
12
|
+
export { default as ActionSheet } from "./components/overlay/actionSheet/ActionSheet.js";
|
|
13
13
|
export { default as Alert } from "./components/overlay/alert/Alert.js";
|
|
14
14
|
export { default as ThemedLoadingModal } from "./components/overlay/modal/ThemedLoadingModal.js";
|
|
15
15
|
export { default as ThemedModal } from "./components/overlay/modal/ThemedModal.js";
|
|
@@ -19,7 +19,7 @@ export { default as InsetsProvider } from "./components/provider/InsetsProvider.
|
|
|
19
19
|
export { default as ReactNativeTemplateProviders } from "./components/provider/ReactNativeTemplateProviders.js";
|
|
20
20
|
export { default as ThemeProvider } from "./components/provider/ThemeProvider.js";
|
|
21
21
|
export { default as ThemedSeparator } from "./components/separator/ThemedSeparator.js";
|
|
22
|
-
export { default as ThemedSlider } from
|
|
22
|
+
export { default as ThemedSlider } from "./components/slider/ThemedSlider.js";
|
|
23
23
|
export { default as ThemedSwitch } from "./components/switch/ThemedSwitch.js";
|
|
24
24
|
export { default as ThemedIconText } from "./components/text/ThemedIconText.js";
|
|
25
25
|
export { default as ThemedText } from "./components/text/ThemedText.js";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,eAAe,QAAQ,
|
|
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.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,eAAe,QAAQ,2CAAwC;AACnF,SAASD,OAAO,IAAIE,uBAAuB,QAAQ,gDAA6C;AAChG,SAASF,OAAO,IAAIG,YAAY,QAAQ,qCAAkC;AAC1E,SAASH,OAAO,IAAII,gBAAgB,QAAQ,yCAAsC;AAClF,SAASJ,OAAO,IAAIK,oBAAoB,QAAQ,6CAA0C;AAC1F,SAASL,OAAO,IAAIM,eAAe,QAAQ,wCAAqC;AAChF,SAASN,OAAO,IAAIO,UAAU,QAAQ,iCAA8B;AACpE,SAASP,OAAO,IAAIQ,IAAI,QAAQ,2BAAwB;AACxD,SAASR,OAAO,IAAIS,aAAa,QAAQ,uCAAoC;AAC7E,SAAST,OAAO,IAAIU,WAAW,QAAQ,iDAA8C;AACrF,SAASV,OAAO,IAAIW,KAAK,QAAQ,qCAAkC;AACnE,SAASX,OAAO,IAAIY,kBAAkB,QAAQ,kDAA+C;AAC7F,SAASZ,OAAO,IAAIa,WAAW,QAAQ,2CAAwC;AAC/E,SAASb,OAAO,IAAIc,WAAW,QAAQ,2CAAwC;AAC/E,SAASd,OAAO,IAAIe,eAAe,QAAQ,0CAAuC;AAClF,SAASf,OAAO,IAAIgB,cAAc,QAAQ,yCAAsC;AAChF,SAAShB,OAAO,IAAIiB,4BAA4B,QAAQ,uDAAoD;AAC5G,SAASjB,OAAO,IAAIkB,aAAa,QAAQ,wCAAqC;AAC9E,SAASlB,OAAO,IAAImB,eAAe,QAAQ,2CAAwC;AACnF,SAASnB,OAAO,IAAIoB,YAAY,QAAQ,qCAAkC;AAC1E,SAASpB,OAAO,IAAIqB,YAAY,QAAQ,qCAAkC;AAC1E,SAASrB,OAAO,IAAIsB,cAAc,QAAQ,qCAAkC;AAC5E,SAAStB,OAAO,IAAIuB,UAAU,QAAQ,iCAA8B;AACpE,SAASvB,OAAO,IAAIwB,kBAAkB,QAAQ,yCAAsC;AACpF,SAASxB,OAAO,IAAIyB,gBAAgB,QAAQ,oCAAoC;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":[]}
|
|
@@ -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,eAAe;EAGzB;EAHUA,eAAe;EAKzB;EALUA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAS3B;AACA,OAAO,MAAMC,kBAAkB,gBAAGR,aAAa,CAC7C,CAAC,CACH,CAAC;;AAED;AACA,OAAO,MAAMS,uBAAuB,GAAG,GAAG;;AAE1C;AACA,OAAO,MAAMC,uBAAuB,GAAG,GAAG;;AAE1C;AACA,OAAO,MAAMC,0BAA0B,GAAG,GAAG;;AAE7C;AACA,OAAO,MAAMC,yBAAyB,GAAG,GAAG;;AAE5C;AACA,WAAYC,gCAAgC,0BAAhCA,gCAAgC;EAAhCA,gCAAgC,CAAhCA,gCAAgC;EAAhCA,gCAAgC,CAAhCA,gCAAgC;EAAhCA,gCAAgC,CAAhCA,gCAAgC;EAAA,OAAhCA,gCAAgC;AAAA;;AAM5C;AACA,OAAO,MAAMC,yBAAmC,GAAGf,QAAQ,CAACgB,CAAC;;AAE7D;AACA,OAAO,MAAMC,wBAAsC,GAAG,GAAG;;AAEzD;AACA,OAAO,MAAMC,gCAA8C,GAAG,GAAG;;AAEjE;AACA,OAAO,MAAMC,oCAAuD,GAAG,OAAO","ignoreList":[]}
|
|
@@ -3,21 +3,79 @@
|
|
|
3
3
|
import { use as reactUse } from 'react';
|
|
4
4
|
import { getWindowDimensionsHeight } from "../style/func.js";
|
|
5
5
|
import { ActionSheetContext, ActionSheetExpandableHeightRatio, actionSheetMaxHeightRatio, AlertContext } from "./const.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Hook to access the Alert context.
|
|
9
|
+
* Provides access to alert state and control functions.
|
|
10
|
+
*
|
|
11
|
+
* @returns The alert context value
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const alertContext = getAlertContext();
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
6
18
|
export function getAlertContext() {
|
|
7
19
|
return reactUse(AlertContext);
|
|
8
20
|
}
|
|
9
21
|
function getActionSheetExpandableHeightByRatio(ratio) {
|
|
10
22
|
return getWindowDimensionsHeight() * ratio;
|
|
11
23
|
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Calculates the maximum height for an action sheet.
|
|
27
|
+
*
|
|
28
|
+
* @param expandable - Whether the action sheet is expandable (supports multiple height positions)
|
|
29
|
+
* @returns The maximum height in pixels
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const maxHeight = getActionSheetMaxHeight(true);
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
12
36
|
export function getActionSheetMaxHeight(expandable = false) {
|
|
13
37
|
return expandable ? getActionSheetExpandableHeightByRatio(ActionSheetExpandableHeightRatio.Top) : getWindowDimensionsHeight() * actionSheetMaxHeightRatio;
|
|
14
38
|
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Constrains an action sheet height to not exceed the maximum allowed height.
|
|
42
|
+
*
|
|
43
|
+
* @param height - The desired height in pixels
|
|
44
|
+
* @returns The constrained height in pixels, capped at maximum
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* const constrainedHeight = getActionSheetHeight(800);
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
15
51
|
export function getActionSheetHeight(height) {
|
|
16
52
|
return Math.min(height, getActionSheetMaxHeight());
|
|
17
53
|
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Gets the maximum height for an expandable action sheet.
|
|
57
|
+
*
|
|
58
|
+
* @returns The maximum expandable height in pixels (90% of screen height)
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* const expandableHeight = getActionSheetExpandableHeight();
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
18
65
|
export function getActionSheetExpandableHeight() {
|
|
19
66
|
return getActionSheetMaxHeight(true);
|
|
20
67
|
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Gets the initial height for an expandable action sheet when first shown.
|
|
71
|
+
*
|
|
72
|
+
* @returns The initial height in pixels (60% of screen height)
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* const initialHeight = getActionSheetExpandableInitHeight();
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
21
79
|
export function getActionSheetExpandableInitHeight() {
|
|
22
80
|
return getActionSheetExpandableHeightByRatio(ActionSheetExpandableHeightRatio.Middle);
|
|
23
81
|
}
|
|
@@ -27,9 +85,40 @@ function getActionSheetDismiss(height, currentHeight) {
|
|
|
27
85
|
function getActionSheetExpandableDismiss(currentHight) {
|
|
28
86
|
return currentHight < getActionSheetExpandableHeightByRatio(ActionSheetExpandableHeightRatio.Bottom) / 2;
|
|
29
87
|
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Calculates the snap height for a non-expandable action sheet after user drag gesture ends.
|
|
91
|
+
* Determines whether the sheet should dismiss or snap back to its original height.
|
|
92
|
+
*
|
|
93
|
+
* @param height - The original height of the action sheet in pixels
|
|
94
|
+
* @param currentHeight - The current height after user drag in pixels
|
|
95
|
+
* @param forceDismiss - Whether to force dismissal regardless of current height
|
|
96
|
+
* @returns The target snap height - either the original height (dismissed) or 0 (visible)
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```tsx
|
|
100
|
+
* const snapHeight = getActionSheetSnapHeight(400, 200, false);
|
|
101
|
+
* // Returns 400 to dismiss if dragged past threshold
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
30
104
|
export function getActionSheetSnapHeight(height, currentHeight, forceDismiss) {
|
|
31
105
|
return forceDismiss || getActionSheetDismiss(height, currentHeight) ? height : 0;
|
|
32
106
|
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Calculates the snap height for an expandable action sheet after user drag gesture ends.
|
|
110
|
+
* Determines which height position (top/middle/bottom) the sheet should snap to, or if it should dismiss.
|
|
111
|
+
*
|
|
112
|
+
* @param currentHight - The current height after user drag in pixels
|
|
113
|
+
* @param forceDismiss - Whether to force dismissal regardless of current height
|
|
114
|
+
* @returns The target snap height - 0 for dismissed, or one of the defined snap positions (90%/60%/30% of screen)
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```tsx
|
|
118
|
+
* const snapHeight = getActionSheetExpandableSnapHeight(500, false);
|
|
119
|
+
* // Returns closest snap position based on current height
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
33
122
|
export function getActionSheetExpandableSnapHeight(currentHight, forceDismiss) {
|
|
34
123
|
if (forceDismiss || getActionSheetExpandableDismiss(currentHight)) {
|
|
35
124
|
return 0;
|
|
@@ -46,6 +135,18 @@ export function getActionSheetExpandableSnapHeight(currentHight, forceDismiss) {
|
|
|
46
135
|
return bottomHeight;
|
|
47
136
|
}
|
|
48
137
|
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Hook to access the ActionSheet context.
|
|
141
|
+
* Provides access to action sheet state and control functions.
|
|
142
|
+
*
|
|
143
|
+
* @returns The action sheet context value
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* const actionSheetContext = getActionSheetContext();
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
49
150
|
export function getActionSheetContext() {
|
|
50
151
|
return reactUse(ActionSheetContext);
|
|
51
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["use","reactUse","getWindowDimensionsHeight","ActionSheetContext","ActionSheetExpandableHeightRatio","actionSheetMaxHeightRatio","AlertContext","getAlertContext","getActionSheetExpandableHeightByRatio","ratio","getActionSheetMaxHeight","expandable","Top","getActionSheetHeight","height","Math","min","getActionSheetExpandableHeight","getActionSheetExpandableInitHeight","Middle","getActionSheetDismiss","currentHeight","getActionSheetExpandableDismiss","currentHight","Bottom","getActionSheetSnapHeight","forceDismiss","getActionSheetExpandableSnapHeight","topHeight","middleHeight","bottomHeight","getActionSheetContext"],"sourceRoot":"../../../../src","sources":["utils/overlay/func.ts"],"mappings":";;AAAA,SAASA,GAAG,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,yBAAyB,QAAQ,kBAAe;AACzD,SACEC,kBAAkB,EAClBC,gCAAgC,EAChCC,yBAAyB,EACzBC,YAAY,QACP,YAAS;
|
|
1
|
+
{"version":3,"names":["use","reactUse","getWindowDimensionsHeight","ActionSheetContext","ActionSheetExpandableHeightRatio","actionSheetMaxHeightRatio","AlertContext","getAlertContext","getActionSheetExpandableHeightByRatio","ratio","getActionSheetMaxHeight","expandable","Top","getActionSheetHeight","height","Math","min","getActionSheetExpandableHeight","getActionSheetExpandableInitHeight","Middle","getActionSheetDismiss","currentHeight","getActionSheetExpandableDismiss","currentHight","Bottom","getActionSheetSnapHeight","forceDismiss","getActionSheetExpandableSnapHeight","topHeight","middleHeight","bottomHeight","getActionSheetContext"],"sourceRoot":"../../../../src","sources":["utils/overlay/func.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,24 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { BorderSize } from "../theme/const.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Display modes for showing the current slider value.
|
|
7
|
+
* Controls whether and where the value label is displayed.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Slider
|
|
12
|
+
* valueDisplayMode={SliderValueDisplayMode.Top}
|
|
13
|
+
* value={50}
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
4
17
|
export let SliderValueDisplayMode = /*#__PURE__*/function (SliderValueDisplayMode) {
|
|
18
|
+
/** No value display */
|
|
5
19
|
SliderValueDisplayMode["None"] = "none";
|
|
20
|
+
/** Display value above the slider */
|
|
6
21
|
SliderValueDisplayMode["Top"] = "top";
|
|
22
|
+
/** Display value below the slider */
|
|
7
23
|
SliderValueDisplayMode["Bottom"] = "bottom";
|
|
8
24
|
return SliderValueDisplayMode;
|
|
9
25
|
}({});
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Size options for the slider track (the rail along which the thumb moves).
|
|
29
|
+
* Values are in pixels representing the track height.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Slider trackSize={SliderTrackSize.L} />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
10
36
|
export let SliderTrackSize = /*#__PURE__*/function (SliderTrackSize) {
|
|
37
|
+
/** Small track - 8px height */
|
|
11
38
|
SliderTrackSize[SliderTrackSize["S"] = 8] = "S";
|
|
39
|
+
/** Medium track - 10px height */
|
|
12
40
|
SliderTrackSize[SliderTrackSize["M"] = 10] = "M";
|
|
41
|
+
/** Large track - 12px height */
|
|
13
42
|
SliderTrackSize[SliderTrackSize["L"] = 12] = "L";
|
|
14
43
|
return SliderTrackSize;
|
|
15
44
|
}({});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Size options for the slider thumb (the draggable knob).
|
|
48
|
+
* Values are in pixels representing the thumb diameter.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <Slider thumbSize={SliderThumbSize.L} />
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
16
55
|
export let SliderThumbSize = /*#__PURE__*/function (SliderThumbSize) {
|
|
56
|
+
/** Small thumb - 20px diameter */
|
|
17
57
|
SliderThumbSize[SliderThumbSize["S"] = 20] = "S";
|
|
58
|
+
/** Medium thumb - 24px diameter */
|
|
18
59
|
SliderThumbSize[SliderThumbSize["M"] = 24] = "M";
|
|
60
|
+
/** Large thumb - 28px diameter */
|
|
19
61
|
SliderThumbSize[SliderThumbSize["L"] = 28] = "L";
|
|
20
62
|
return SliderThumbSize;
|
|
21
63
|
}({});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Default thumb size used when no size is specified.
|
|
67
|
+
* Set to medium (24px).
|
|
68
|
+
*/
|
|
22
69
|
export const sliderThumbDefaultSize = SliderThumbSize.M;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Default width for slider step indicators.
|
|
73
|
+
* Uses medium border size from theme constants.
|
|
74
|
+
*/
|
|
23
75
|
export const sliderStepIndicatorDefaultWidth = BorderSize.M;
|
|
24
76
|
//# sourceMappingURL=const.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BorderSize","SliderValueDisplayMode","SliderTrackSize","SliderThumbSize","sliderThumbDefaultSize","M","sliderStepIndicatorDefaultWidth"],"sourceRoot":"../../../../src","sources":["utils/slider/const.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,mBAAgB;
|
|
1
|
+
{"version":3,"names":["BorderSize","SliderValueDisplayMode","SliderTrackSize","SliderThumbSize","sliderThumbDefaultSize","M","sliderStepIndicatorDefaultWidth"],"sourceRoot":"../../../../src","sources":["utils/slider/const.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,mBAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,sBAAsB,0BAAtBA,sBAAsB;EAChC;EADUA,sBAAsB;EAGhC;EAHUA,sBAAsB;EAKhC;EALUA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;;AASlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,eAAe,0BAAfA,eAAe;EACzB;EADUA,eAAe,CAAfA,eAAe;EAGzB;EAHUA,eAAe,CAAfA,eAAe;EAKzB;EALUA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAS3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,eAAe,0BAAfA,eAAe;EACzB;EADUA,eAAe,CAAfA,eAAe;EAGzB;EAHUA,eAAe,CAAfA,eAAe;EAKzB;EALUA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;;AAS3B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGD,eAAe,CAACE,CAAC;;AAEvD;AACA;AACA;AACA;AACA,OAAO,MAAMC,+BAA+B,GAAGN,UAAU,CAACK,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Device screen orientation types.
|
|
5
|
+
* Used for responsive layouts and orientation-specific styling.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const orientation = useOrientation();
|
|
10
|
+
* if (orientation === Orientation.Landscape) {
|
|
11
|
+
* // Apply landscape-specific layout
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
3
15
|
export let Orientation = /*#__PURE__*/function (Orientation) {
|
|
16
|
+
/** Portrait orientation - height is greater than width */
|
|
4
17
|
Orientation["Portrait"] = "portrait";
|
|
18
|
+
/** Landscape orientation - width is greater than height */
|
|
5
19
|
Orientation["Landscape"] = "landscape";
|
|
6
20
|
return Orientation;
|
|
7
21
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Orientation"],"sourceRoot":"../../../../src","sources":["utils/style/const.ts"],"mappings":";;AAAA,WAAYA,WAAW,0BAAXA,WAAW;
|
|
1
|
+
{"version":3,"names":["Orientation"],"sourceRoot":"../../../../src","sources":["utils/style/const.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,WAAW,0BAAXA,WAAW;EACrB;EADUA,WAAW;EAGrB;EAHUA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
|