rn-custom-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +477 -0
- package/lib/module/assets/images/close.png +0 -0
- package/lib/module/components/CustomCheckbox/index.js +99 -0
- package/lib/module/components/CustomCheckbox/index.js.map +1 -0
- package/lib/module/components/CustomCheckbox/styles.js +213 -0
- package/lib/module/components/CustomCheckbox/styles.js.map +1 -0
- package/lib/module/components/CustomCheckbox/types.js +4 -0
- package/lib/module/components/CustomCheckbox/types.js.map +1 -0
- package/lib/module/components/closeButton/index.js +45 -0
- package/lib/module/components/closeButton/index.js.map +1 -0
- package/lib/module/components/closeButton/types.js +4 -0
- package/lib/module/components/closeButton/types.js.map +1 -0
- package/lib/module/components/customButton/index.js +176 -0
- package/lib/module/components/customButton/index.js.map +1 -0
- package/lib/module/components/customButton/styles.js +282 -0
- package/lib/module/components/customButton/styles.js.map +1 -0
- package/lib/module/components/customButton/types.js +4 -0
- package/lib/module/components/customButton/types.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownBottomSheet.js +57 -0
- package/lib/module/components/customDropDown/DropDownBottomSheet.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownList.js +51 -0
- package/lib/module/components/customDropDown/DropDownList.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownListItem.js +38 -0
- package/lib/module/components/customDropDown/DropDownListItem.js.map +1 -0
- package/lib/module/components/customDropDown/DropDownListModal.js +63 -0
- package/lib/module/components/customDropDown/DropDownListModal.js.map +1 -0
- package/lib/module/components/customDropDown/index.js +143 -0
- package/lib/module/components/customDropDown/index.js.map +1 -0
- package/lib/module/components/customDropDown/styles.js +189 -0
- package/lib/module/components/customDropDown/styles.js.map +1 -0
- package/lib/module/components/customDropDown/types.js +4 -0
- package/lib/module/components/customDropDown/types.js.map +1 -0
- package/lib/module/components/customDropDown/utils.js +17 -0
- package/lib/module/components/customDropDown/utils.js.map +1 -0
- package/lib/module/components/customList/ListEmpty.js +33 -0
- package/lib/module/components/customList/ListEmpty.js.map +1 -0
- package/lib/module/components/customList/ListFooterLoader.js +14 -0
- package/lib/module/components/customList/ListFooterLoader.js.map +1 -0
- package/lib/module/components/customList/defaultKeyExtractor.js +9 -0
- package/lib/module/components/customList/defaultKeyExtractor.js.map +1 -0
- package/lib/module/components/customList/getFlashList.js +19 -0
- package/lib/module/components/customList/getFlashList.js.map +1 -0
- package/lib/module/components/customList/index.js +117 -0
- package/lib/module/components/customList/index.js.map +1 -0
- package/lib/module/components/customList/styles.js +45 -0
- package/lib/module/components/customList/styles.js.map +1 -0
- package/lib/module/components/customList/types.js +4 -0
- package/lib/module/components/customList/types.js.map +1 -0
- package/lib/module/components/customModal/ModalFooter.js +44 -0
- package/lib/module/components/customModal/ModalFooter.js.map +1 -0
- package/lib/module/components/customModal/index.js +132 -0
- package/lib/module/components/customModal/index.js.map +1 -0
- package/lib/module/components/customModal/styles.js +123 -0
- package/lib/module/components/customModal/styles.js.map +1 -0
- package/lib/module/components/customModal/types.js +4 -0
- package/lib/module/components/customModal/types.js.map +1 -0
- package/lib/module/components/customModal/useCustomModal.js +23 -0
- package/lib/module/components/customModal/useCustomModal.js.map +1 -0
- package/lib/module/components/customNumberPad/NumberPadKey.js +39 -0
- package/lib/module/components/customNumberPad/NumberPadKey.js.map +1 -0
- package/lib/module/components/customNumberPad/index.js +156 -0
- package/lib/module/components/customNumberPad/index.js.map +1 -0
- package/lib/module/components/customNumberPad/styles.js +131 -0
- package/lib/module/components/customNumberPad/styles.js.map +1 -0
- package/lib/module/components/customNumberPad/types.js +4 -0
- package/lib/module/components/customNumberPad/types.js.map +1 -0
- package/lib/module/components/customNumberPad/useNumberPadInput.js +44 -0
- package/lib/module/components/customNumberPad/useNumberPadInput.js.map +1 -0
- package/lib/module/components/customNumberPad/utils.js +38 -0
- package/lib/module/components/customNumberPad/utils.js.map +1 -0
- package/lib/module/components/customSlideTabs/AnimatedTabIndicator.js +66 -0
- package/lib/module/components/customSlideTabs/AnimatedTabIndicator.js.map +1 -0
- package/lib/module/components/customSlideTabs/TabBarItem.js +61 -0
- package/lib/module/components/customSlideTabs/TabBarItem.js.map +1 -0
- package/lib/module/components/customSlideTabs/TabScene.js +88 -0
- package/lib/module/components/customSlideTabs/TabScene.js.map +1 -0
- package/lib/module/components/customSlideTabs/index.js +277 -0
- package/lib/module/components/customSlideTabs/index.js.map +1 -0
- package/lib/module/components/customSlideTabs/styles.js +132 -0
- package/lib/module/components/customSlideTabs/styles.js.map +1 -0
- package/lib/module/components/customSlideTabs/tabBarScroll.js +65 -0
- package/lib/module/components/customSlideTabs/tabBarScroll.js.map +1 -0
- package/lib/module/components/customSlideTabs/types.js +4 -0
- package/lib/module/components/customSlideTabs/types.js.map +1 -0
- package/lib/module/components/loading/index.js +34 -0
- package/lib/module/components/loading/index.js.map +1 -0
- package/lib/module/customFunctions/array.js +61 -0
- package/lib/module/customFunctions/array.js.map +1 -0
- package/lib/module/customFunctions/async.js +62 -0
- package/lib/module/customFunctions/async.js.map +1 -0
- package/lib/module/customFunctions/date.js +109 -0
- package/lib/module/customFunctions/date.js.map +1 -0
- package/lib/module/customFunctions/general.js +29 -0
- package/lib/module/customFunctions/general.js.map +1 -0
- package/lib/module/customFunctions/id.js +20 -0
- package/lib/module/customFunctions/id.js.map +1 -0
- package/lib/module/customFunctions/index.js +29 -0
- package/lib/module/customFunctions/index.js.map +1 -0
- package/lib/module/customFunctions/number.js +94 -0
- package/lib/module/customFunctions/number.js.map +1 -0
- package/lib/module/customFunctions/object.js +39 -0
- package/lib/module/customFunctions/object.js.map +1 -0
- package/lib/module/customFunctions/string.js +63 -0
- package/lib/module/customFunctions/string.js.map +1 -0
- package/lib/module/customFunctions/types.js +2 -0
- package/lib/module/customFunctions/types.js.map +1 -0
- package/lib/module/customFunctions/validation.js +34 -0
- package/lib/module/customFunctions/validation.js.map +1 -0
- package/lib/module/customHooks/errors.js +61 -0
- package/lib/module/customHooks/errors.js.map +1 -0
- package/lib/module/customHooks/fetchJson.js +36 -0
- package/lib/module/customHooks/fetchJson.js.map +1 -0
- package/lib/module/customHooks/index.js +10 -0
- package/lib/module/customHooks/index.js.map +1 -0
- package/lib/module/customHooks/internal.js +49 -0
- package/lib/module/customHooks/internal.js.map +1 -0
- package/lib/module/customHooks/types.js +2 -0
- package/lib/module/customHooks/types.js.map +1 -0
- package/lib/module/customHooks/useApi.js +91 -0
- package/lib/module/customHooks/useApi.js.map +1 -0
- package/lib/module/customHooks/useLazyApi.js +80 -0
- package/lib/module/customHooks/useLazyApi.js.map +1 -0
- package/lib/module/customHooks/useMutation.js +69 -0
- package/lib/module/customHooks/useMutation.js.map +1 -0
- package/lib/module/customHooks/usePaginatedApi.js +127 -0
- package/lib/module/customHooks/usePaginatedApi.js.map +1 -0
- package/lib/module/customHooks/usePollingApi.js +37 -0
- package/lib/module/customHooks/usePollingApi.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/multiply.js +6 -0
- package/lib/module/multiply.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/CustomCheckbox/index.d.ts +5 -0
- package/lib/typescript/src/components/CustomCheckbox/index.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomCheckbox/styles.d.ts +67 -0
- package/lib/typescript/src/components/CustomCheckbox/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/CustomCheckbox/types.d.ts +28 -0
- package/lib/typescript/src/components/CustomCheckbox/types.d.ts.map +1 -0
- package/lib/typescript/src/components/closeButton/index.d.ts +4 -0
- package/lib/typescript/src/components/closeButton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/closeButton/types.d.ts +8 -0
- package/lib/typescript/src/components/closeButton/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customButton/index.d.ts +5 -0
- package/lib/typescript/src/components/customButton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customButton/styles.d.ts +231 -0
- package/lib/typescript/src/components/customButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customButton/types.d.ts +46 -0
- package/lib/typescript/src/components/customButton/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownBottomSheet.d.ts +18 -0
- package/lib/typescript/src/components/customDropDown/DropDownBottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownList.d.ts +17 -0
- package/lib/typescript/src/components/customDropDown/DropDownList.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownListItem.d.ts +15 -0
- package/lib/typescript/src/components/customDropDown/DropDownListItem.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/DropDownListModal.d.ts +19 -0
- package/lib/typescript/src/components/customDropDown/DropDownListModal.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/index.d.ts +5 -0
- package/lib/typescript/src/components/customDropDown/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/styles.d.ts +190 -0
- package/lib/typescript/src/components/customDropDown/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/types.d.ts +37 -0
- package/lib/typescript/src/components/customDropDown/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customDropDown/utils.d.ts +4 -0
- package/lib/typescript/src/components/customDropDown/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/ListEmpty.d.ts +10 -0
- package/lib/typescript/src/components/customList/ListEmpty.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/ListFooterLoader.d.ts +3 -0
- package/lib/typescript/src/components/customList/ListFooterLoader.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/defaultKeyExtractor.d.ts +2 -0
- package/lib/typescript/src/components/customList/defaultKeyExtractor.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/getFlashList.d.ts +6 -0
- package/lib/typescript/src/components/customList/getFlashList.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/index.d.ts +11 -0
- package/lib/typescript/src/components/customList/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/styles.d.ts +42 -0
- package/lib/typescript/src/components/customList/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customList/types.d.ts +33 -0
- package/lib/typescript/src/components/customList/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/ModalFooter.d.ts +12 -0
- package/lib/typescript/src/components/customModal/ModalFooter.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/index.d.ts +6 -0
- package/lib/typescript/src/components/customModal/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/styles.d.ts +83 -0
- package/lib/typescript/src/components/customModal/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/types.d.ts +36 -0
- package/lib/typescript/src/components/customModal/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customModal/useCustomModal.d.ts +8 -0
- package/lib/typescript/src/components/customModal/useCustomModal.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/NumberPadKey.d.ts +23 -0
- package/lib/typescript/src/components/customNumberPad/NumberPadKey.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/index.d.ts +7 -0
- package/lib/typescript/src/components/customNumberPad/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/styles.d.ts +37 -0
- package/lib/typescript/src/components/customNumberPad/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/types.d.ts +47 -0
- package/lib/typescript/src/components/customNumberPad/types.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/useNumberPadInput.d.ts +16 -0
- package/lib/typescript/src/components/customNumberPad/useNumberPadInput.d.ts.map +1 -0
- package/lib/typescript/src/components/customNumberPad/utils.d.ts +4 -0
- package/lib/typescript/src/components/customNumberPad/utils.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/AnimatedTabIndicator.d.ts +16 -0
- package/lib/typescript/src/components/customSlideTabs/AnimatedTabIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/TabBarItem.d.ts +23 -0
- package/lib/typescript/src/components/customSlideTabs/TabBarItem.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/TabScene.d.ts +21 -0
- package/lib/typescript/src/components/customSlideTabs/TabScene.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/index.d.ts +5 -0
- package/lib/typescript/src/components/customSlideTabs/index.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/styles.d.ts +130 -0
- package/lib/typescript/src/components/customSlideTabs/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/tabBarScroll.d.ts +15 -0
- package/lib/typescript/src/components/customSlideTabs/tabBarScroll.d.ts.map +1 -0
- package/lib/typescript/src/components/customSlideTabs/types.d.ts +68 -0
- package/lib/typescript/src/components/customSlideTabs/types.d.ts.map +1 -0
- package/lib/typescript/src/components/loading/index.d.ts +7 -0
- package/lib/typescript/src/components/loading/index.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/array.d.ts +7 -0
- package/lib/typescript/src/customFunctions/array.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/async.d.ts +9 -0
- package/lib/typescript/src/customFunctions/async.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/date.d.ts +18 -0
- package/lib/typescript/src/customFunctions/date.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/general.d.ts +7 -0
- package/lib/typescript/src/customFunctions/general.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/id.d.ts +4 -0
- package/lib/typescript/src/customFunctions/id.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/index.d.ts +26 -0
- package/lib/typescript/src/customFunctions/index.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/number.d.ts +15 -0
- package/lib/typescript/src/customFunctions/number.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/object.d.ts +6 -0
- package/lib/typescript/src/customFunctions/object.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/string.d.ts +20 -0
- package/lib/typescript/src/customFunctions/string.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/types.d.ts +22 -0
- package/lib/typescript/src/customFunctions/types.d.ts.map +1 -0
- package/lib/typescript/src/customFunctions/validation.d.ts +11 -0
- package/lib/typescript/src/customFunctions/validation.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/errors.d.ts +16 -0
- package/lib/typescript/src/customHooks/errors.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/fetchJson.d.ts +5 -0
- package/lib/typescript/src/customHooks/fetchJson.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/index.d.ts +9 -0
- package/lib/typescript/src/customHooks/index.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/internal.d.ts +12 -0
- package/lib/typescript/src/customHooks/internal.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/types.d.ts +49 -0
- package/lib/typescript/src/customHooks/types.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/useApi.d.ts +13 -0
- package/lib/typescript/src/customHooks/useApi.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/useLazyApi.d.ts +14 -0
- package/lib/typescript/src/customHooks/useLazyApi.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/useMutation.d.ts +15 -0
- package/lib/typescript/src/customHooks/useMutation.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/usePaginatedApi.d.ts +19 -0
- package/lib/typescript/src/customHooks/usePaginatedApi.d.ts.map +1 -0
- package/lib/typescript/src/customHooks/usePollingApi.d.ts +13 -0
- package/lib/typescript/src/customHooks/usePollingApi.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +11 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/multiply.d.ts +2 -0
- package/lib/typescript/src/multiply.d.ts.map +1 -0
- package/package.json +181 -0
- package/src/assets/images/close.png +0 -0
- package/src/components/CustomCheckbox/index.tsx +143 -0
- package/src/components/CustomCheckbox/styles.ts +146 -0
- package/src/components/CustomCheckbox/types.ts +33 -0
- package/src/components/closeButton/index.tsx +40 -0
- package/src/components/closeButton/types.ts +13 -0
- package/src/components/customButton/index.tsx +288 -0
- package/src/components/customButton/styles.ts +247 -0
- package/src/components/customButton/types.ts +71 -0
- package/src/components/customDropDown/DropDownBottomSheet.tsx +70 -0
- package/src/components/customDropDown/DropDownList.tsx +88 -0
- package/src/components/customDropDown/DropDownListItem.tsx +74 -0
- package/src/components/customDropDown/DropDownListModal.tsx +86 -0
- package/src/components/customDropDown/index.tsx +213 -0
- package/src/components/customDropDown/styles.ts +184 -0
- package/src/components/customDropDown/types.ts +48 -0
- package/src/components/customDropDown/utils.ts +24 -0
- package/src/components/customList/ListEmpty.tsx +36 -0
- package/src/components/customList/ListFooterLoader.tsx +11 -0
- package/src/components/customList/defaultKeyExtractor.ts +7 -0
- package/src/components/customList/getFlashList.ts +26 -0
- package/src/components/customList/index.tsx +142 -0
- package/src/components/customList/styles.ts +43 -0
- package/src/components/customList/types.ts +60 -0
- package/src/components/customModal/ModalFooter.tsx +57 -0
- package/src/components/customModal/index.tsx +166 -0
- package/src/components/customModal/styles.ts +131 -0
- package/src/components/customModal/types.ts +48 -0
- package/src/components/customModal/useCustomModal.ts +25 -0
- package/src/components/customNumberPad/NumberPadKey.tsx +81 -0
- package/src/components/customNumberPad/index.tsx +204 -0
- package/src/components/customNumberPad/styles.ts +146 -0
- package/src/components/customNumberPad/types.ts +53 -0
- package/src/components/customNumberPad/useNumberPadInput.ts +56 -0
- package/src/components/customNumberPad/utils.ts +54 -0
- package/src/components/customSlideTabs/AnimatedTabIndicator.tsx +103 -0
- package/src/components/customSlideTabs/TabBarItem.tsx +118 -0
- package/src/components/customSlideTabs/TabScene.tsx +136 -0
- package/src/components/customSlideTabs/index.tsx +385 -0
- package/src/components/customSlideTabs/styles.ts +136 -0
- package/src/components/customSlideTabs/tabBarScroll.ts +92 -0
- package/src/components/customSlideTabs/types.ts +87 -0
- package/src/components/loading/index.tsx +34 -0
- package/src/customFunctions/array.ts +83 -0
- package/src/customFunctions/async.ts +85 -0
- package/src/customFunctions/date.ts +158 -0
- package/src/customFunctions/general.ts +35 -0
- package/src/customFunctions/id.ts +25 -0
- package/src/customFunctions/index.ts +91 -0
- package/src/customFunctions/number.ts +139 -0
- package/src/customFunctions/object.ts +59 -0
- package/src/customFunctions/string.ts +119 -0
- package/src/customFunctions/types.ts +25 -0
- package/src/customFunctions/validation.ts +49 -0
- package/src/customHooks/errors.ts +87 -0
- package/src/customHooks/fetchJson.ts +49 -0
- package/src/customHooks/index.ts +20 -0
- package/src/customHooks/internal.ts +67 -0
- package/src/customHooks/types.ts +71 -0
- package/src/customHooks/useApi.ts +107 -0
- package/src/customHooks/useLazyApi.ts +92 -0
- package/src/customHooks/useMutation.ts +97 -0
- package/src/customHooks/usePaginatedApi.ts +168 -0
- package/src/customHooks/usePollingApi.ts +48 -0
- package/src/index.tsx +63 -0
- package/src/multiply.tsx +3 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import { Modal, Pressable, ScrollView, Text, View } from 'react-native';
|
|
5
|
+
import CloseButton from "../closeButton/index.js";
|
|
6
|
+
import ModalFooter from "./ModalFooter.js";
|
|
7
|
+
import { presentationStyles, styles } from "./styles.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
+
const CustomModal = ({
|
|
10
|
+
visible,
|
|
11
|
+
onClose,
|
|
12
|
+
title,
|
|
13
|
+
description,
|
|
14
|
+
children,
|
|
15
|
+
presentation = 'center',
|
|
16
|
+
showCloseButton = true,
|
|
17
|
+
closeOnBackdropPress = true,
|
|
18
|
+
animationType,
|
|
19
|
+
scrollable = false,
|
|
20
|
+
containerStyle,
|
|
21
|
+
backdropStyle,
|
|
22
|
+
contentStyle,
|
|
23
|
+
headerStyle,
|
|
24
|
+
titleStyle,
|
|
25
|
+
descriptionStyle,
|
|
26
|
+
bodyStyle,
|
|
27
|
+
footerStyle,
|
|
28
|
+
footer,
|
|
29
|
+
primaryAction,
|
|
30
|
+
secondaryAction,
|
|
31
|
+
closeImage,
|
|
32
|
+
supportedOrientations = ['landscape', 'portrait'],
|
|
33
|
+
statusBarTranslucent,
|
|
34
|
+
testID
|
|
35
|
+
}) => {
|
|
36
|
+
const presentationStyle = presentationStyles[presentation];
|
|
37
|
+
const resolvedAnimationType = animationType ?? presentationStyle.animationType;
|
|
38
|
+
const contentInnerStyle = useMemo(() => {
|
|
39
|
+
if (presentation === 'fullscreen') {
|
|
40
|
+
return styles.fullscreenContentInner;
|
|
41
|
+
}
|
|
42
|
+
if (presentation === 'bottom') {
|
|
43
|
+
return styles.bottomContentInner;
|
|
44
|
+
}
|
|
45
|
+
return styles.contentInner;
|
|
46
|
+
}, [presentation]);
|
|
47
|
+
const showHeader = Boolean(title || description || showCloseButton);
|
|
48
|
+
const handleBackdropPress = () => {
|
|
49
|
+
if (closeOnBackdropPress) {
|
|
50
|
+
onClose();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const renderBody = () => {
|
|
54
|
+
if (!children) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (scrollable) {
|
|
58
|
+
return /*#__PURE__*/_jsx(ScrollView, {
|
|
59
|
+
style: [styles.body, styles.scrollBody, bodyStyle],
|
|
60
|
+
showsVerticalScrollIndicator: false,
|
|
61
|
+
bounces: false,
|
|
62
|
+
children: children
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return /*#__PURE__*/_jsx(View, {
|
|
66
|
+
style: [styles.body, bodyStyle],
|
|
67
|
+
children: children
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const renderContent = () => /*#__PURE__*/_jsx(Pressable, {
|
|
71
|
+
style: [presentationStyle.content, contentStyle],
|
|
72
|
+
onPress: () => {},
|
|
73
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
74
|
+
style: contentInnerStyle,
|
|
75
|
+
children: [presentation === 'bottom' && /*#__PURE__*/_jsx(View, {
|
|
76
|
+
style: styles.handle
|
|
77
|
+
}), showHeader && /*#__PURE__*/_jsxs(View, {
|
|
78
|
+
style: [styles.header, headerStyle],
|
|
79
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
80
|
+
style: styles.headerText,
|
|
81
|
+
children: [!!title && /*#__PURE__*/_jsx(Text, {
|
|
82
|
+
style: [styles.title, titleStyle],
|
|
83
|
+
children: title
|
|
84
|
+
}), !!description && /*#__PURE__*/_jsx(Text, {
|
|
85
|
+
style: [styles.description, descriptionStyle],
|
|
86
|
+
children: description
|
|
87
|
+
})]
|
|
88
|
+
}), showCloseButton && /*#__PURE__*/_jsx(CloseButton, {
|
|
89
|
+
closeImage: closeImage,
|
|
90
|
+
containerStyle: styles.closeButton,
|
|
91
|
+
onPress: onClose
|
|
92
|
+
})]
|
|
93
|
+
}), renderBody(), /*#__PURE__*/_jsx(ModalFooter, {
|
|
94
|
+
footer: footer,
|
|
95
|
+
footerStyle: footerStyle,
|
|
96
|
+
primaryAction: primaryAction,
|
|
97
|
+
secondaryAction: secondaryAction
|
|
98
|
+
})]
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
102
|
+
transparent: presentation !== 'fullscreen',
|
|
103
|
+
visible: visible,
|
|
104
|
+
animationType: resolvedAnimationType,
|
|
105
|
+
supportedOrientations: supportedOrientations,
|
|
106
|
+
statusBarTranslucent: statusBarTranslucent,
|
|
107
|
+
testID: testID,
|
|
108
|
+
onRequestClose: onClose,
|
|
109
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
110
|
+
style: [presentationStyle.backdrop, backdropStyle, containerStyle],
|
|
111
|
+
children: presentation === 'bottom' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
112
|
+
children: [closeOnBackdropPress && /*#__PURE__*/_jsx(Pressable, {
|
|
113
|
+
style: styles.backdropDismiss,
|
|
114
|
+
onPress: handleBackdropPress
|
|
115
|
+
}), renderContent()]
|
|
116
|
+
}) : presentation === 'center' ? /*#__PURE__*/_jsx(Pressable, {
|
|
117
|
+
style: [styles.backdropDismiss, {
|
|
118
|
+
justifyContent: 'center',
|
|
119
|
+
alignItems: 'center'
|
|
120
|
+
}],
|
|
121
|
+
onPress: handleBackdropPress,
|
|
122
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
123
|
+
onPress: () => {},
|
|
124
|
+
children: renderContent()
|
|
125
|
+
})
|
|
126
|
+
}) : renderContent()
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
export default CustomModal;
|
|
131
|
+
export { useCustomModal } from "./useCustomModal.js";
|
|
132
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","Modal","Pressable","ScrollView","Text","View","CloseButton","ModalFooter","presentationStyles","styles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","CustomModal","visible","onClose","title","description","children","presentation","showCloseButton","closeOnBackdropPress","animationType","scrollable","containerStyle","backdropStyle","contentStyle","headerStyle","titleStyle","descriptionStyle","bodyStyle","footerStyle","footer","primaryAction","secondaryAction","closeImage","supportedOrientations","statusBarTranslucent","testID","presentationStyle","resolvedAnimationType","contentInnerStyle","fullscreenContentInner","bottomContentInner","contentInner","showHeader","Boolean","handleBackdropPress","renderBody","style","body","scrollBody","showsVerticalScrollIndicator","bounces","renderContent","content","onPress","handle","header","headerText","closeButton","transparent","onRequestClose","backdrop","backdropDismiss","justifyContent","alignItems","useCustomModal"],"sourceRoot":"../../../../src","sources":["components/customModal/index.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEvE,OAAOC,WAAW,MAAM,yBAAgB;AACxC,OAAOC,WAAW,MAAM,kBAAe;AACvC,SAASC,kBAAkB,EAAEC,MAAM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CAAC,CACD;QACFV,OAAO,EAAET,mBAAoB;QAAA7B,QAAA,eAE7BV,IAAA,CAACT,SAAS;UAACyD,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAE;UAAAtC,QAAA,EAAEoC,aAAa,CAAC;QAAC,CAAY;MAAC,CAClD,CAAC,GAEZA,aAAa,CAAC;IACf,CACG;EAAC,CACF,CAAC;AAEZ,CAAC;AAED,eAAezC,WAAW;AAC1B,SAASsD,cAAc,QAAQ,qBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
export const presentationStyles = {
|
|
5
|
+
center: {
|
|
6
|
+
backdrop: {
|
|
7
|
+
flex: 1,
|
|
8
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
padding: 20
|
|
12
|
+
},
|
|
13
|
+
content: {
|
|
14
|
+
width: '100%',
|
|
15
|
+
maxWidth: 400,
|
|
16
|
+
maxHeight: '80%',
|
|
17
|
+
backgroundColor: '#FFFFFF',
|
|
18
|
+
borderRadius: 12,
|
|
19
|
+
overflow: 'hidden'
|
|
20
|
+
},
|
|
21
|
+
animationType: 'fade'
|
|
22
|
+
},
|
|
23
|
+
bottom: {
|
|
24
|
+
backdrop: {
|
|
25
|
+
flex: 1,
|
|
26
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
27
|
+
justifyContent: 'flex-end'
|
|
28
|
+
},
|
|
29
|
+
content: {
|
|
30
|
+
width: '100%',
|
|
31
|
+
maxHeight: '85%',
|
|
32
|
+
backgroundColor: '#FFFFFF',
|
|
33
|
+
borderTopLeftRadius: 16,
|
|
34
|
+
borderTopRightRadius: 16,
|
|
35
|
+
overflow: 'hidden'
|
|
36
|
+
},
|
|
37
|
+
animationType: 'slide'
|
|
38
|
+
},
|
|
39
|
+
fullscreen: {
|
|
40
|
+
backdrop: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
backgroundColor: '#FFFFFF'
|
|
43
|
+
},
|
|
44
|
+
content: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
width: '100%',
|
|
47
|
+
backgroundColor: '#FFFFFF'
|
|
48
|
+
},
|
|
49
|
+
animationType: 'slide'
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export const styles = StyleSheet.create({
|
|
53
|
+
backdropDismiss: {
|
|
54
|
+
...StyleSheet.absoluteFill
|
|
55
|
+
},
|
|
56
|
+
contentInner: {
|
|
57
|
+
paddingHorizontal: 20,
|
|
58
|
+
paddingTop: 20,
|
|
59
|
+
paddingBottom: 16
|
|
60
|
+
},
|
|
61
|
+
bottomContentInner: {
|
|
62
|
+
paddingHorizontal: 20,
|
|
63
|
+
paddingTop: 12,
|
|
64
|
+
paddingBottom: 24
|
|
65
|
+
},
|
|
66
|
+
fullscreenContentInner: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
paddingHorizontal: 20,
|
|
69
|
+
paddingTop: 56,
|
|
70
|
+
paddingBottom: 20
|
|
71
|
+
},
|
|
72
|
+
handle: {
|
|
73
|
+
alignSelf: 'center',
|
|
74
|
+
width: 40,
|
|
75
|
+
height: 4,
|
|
76
|
+
borderRadius: 2,
|
|
77
|
+
backgroundColor: '#DEE2E6',
|
|
78
|
+
marginTop: 12,
|
|
79
|
+
marginBottom: 8
|
|
80
|
+
},
|
|
81
|
+
header: {
|
|
82
|
+
flexDirection: 'row',
|
|
83
|
+
alignItems: 'flex-start',
|
|
84
|
+
justifyContent: 'space-between',
|
|
85
|
+
gap: 12,
|
|
86
|
+
marginBottom: 12
|
|
87
|
+
},
|
|
88
|
+
headerText: {
|
|
89
|
+
flex: 1,
|
|
90
|
+
gap: 6
|
|
91
|
+
},
|
|
92
|
+
title: {
|
|
93
|
+
fontSize: 18,
|
|
94
|
+
fontWeight: '700',
|
|
95
|
+
color: '#212529'
|
|
96
|
+
},
|
|
97
|
+
description: {
|
|
98
|
+
fontSize: 14,
|
|
99
|
+
color: '#6C757D',
|
|
100
|
+
lineHeight: 20
|
|
101
|
+
},
|
|
102
|
+
closeButton: {
|
|
103
|
+
position: 'relative',
|
|
104
|
+
top: 0,
|
|
105
|
+
right: 0
|
|
106
|
+
},
|
|
107
|
+
body: {
|
|
108
|
+
flexGrow: 0
|
|
109
|
+
},
|
|
110
|
+
scrollBody: {
|
|
111
|
+
maxHeight: 320
|
|
112
|
+
},
|
|
113
|
+
footer: {
|
|
114
|
+
flexDirection: 'row',
|
|
115
|
+
gap: 10,
|
|
116
|
+
marginTop: 16
|
|
117
|
+
},
|
|
118
|
+
footerButton: {
|
|
119
|
+
flex: 1,
|
|
120
|
+
alignSelf: 'auto'
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","presentationStyles","center","backdrop","flex","backgroundColor","justifyContent","alignItems","padding","content","width","maxWidth","maxHeight","borderRadius","overflow","animationType","bottom","borderTopLeftRadius","borderTopRightRadius","fullscreen","styles","create","backdropDismiss","absoluteFill","contentInner","paddingHorizontal","paddingTop","paddingBottom","bottomContentInner","fullscreenContentInner","handle","alignSelf","height","marginTop","marginBottom","header","flexDirection","gap","headerText","title","fontSize","fontWeight","color","description","lineHeight","closeButton","position","top","right","body","flexGrow","scrollBody","footer","footerButton"],"sourceRoot":"../../../../src","sources":["components/customModal/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,cAAc;AAIzD,OAAO,MAAMC,kBAOZ,GAAG;EACFC,MAAM,EAAE;IACNC,QAAQ,EAAE;MACRC,IAAI,EAAE,CAAC;MACPC,eAAe,EAAE,oBAAoB;MACrCC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,OAAO,EAAE;IACX,CAAC;IACDC,OAAO,EAAE;MACPC,KAAK,EAAE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,EAAE,EAAE;IACTsB,MAAM,EAAE,CAAC;IACTnB,YAAY,EAAE,CAAC;IACfR,eAAe,EAAE,SAAS;IAC1B4B,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE;EAChB,CAAC;EACDC,MAAM,EAAE;IACNC,aAAa,EAAE,KAAK;IACpB7B,UAAU,EAAE,YAAY;IACxBD,cAAc,EAAE,eAAe;IAC/B+B,GAAG,EAAE,EAAE;IACPH,YAAY,EAAE;EAChB,CAAC;EACDI,UAAU,EAAE;IACVlC,IAAI,EAAE,CAAC;IACPiC,GAAG,EAAE;EACP,CAAC;EACDE,KAAK,EAAE;IACLC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAE;EACT,CAAC;EACDC,WAAW,EAAE;IACXH,QAAQ,EAAE,EAAE;IACZE,KAAK,EAAE,SAAS;IAChBE,UAAU,EAAE;EACd,CAAC;EACDC,WAAW,EAAE;IACXC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE;EACT,CAAC;EACDC,IAAI,EAAE;IACJC,QAAQ,EAAE;EACZ,CAAC;EACDC,UAAU,EAAE;IACVvC,SAAS,EAAE;EACb,CAAC;EACDwC,MAAM,EAAE;IACNhB,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAE,EAAE;IACPJ,SAAS,EAAE;EACb,CAAC;EACDoB,YAAY,EAAE;IACZjD,IAAI,EAAE,CAAC;IACP2B,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/customModal/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useState } from 'react';
|
|
4
|
+
export const useCustomModal = (initialVisible = false) => {
|
|
5
|
+
const [visible, setVisible] = useState(initialVisible);
|
|
6
|
+
const open = useCallback(() => {
|
|
7
|
+
setVisible(true);
|
|
8
|
+
}, []);
|
|
9
|
+
const close = useCallback(() => {
|
|
10
|
+
setVisible(false);
|
|
11
|
+
}, []);
|
|
12
|
+
const toggle = useCallback(() => {
|
|
13
|
+
setVisible(current => !current);
|
|
14
|
+
}, []);
|
|
15
|
+
return {
|
|
16
|
+
visible,
|
|
17
|
+
setVisible,
|
|
18
|
+
open,
|
|
19
|
+
close,
|
|
20
|
+
toggle
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=useCustomModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useState","useCustomModal","initialVisible","visible","setVisible","open","close","toggle","current"],"sourceRoot":"../../../../src","sources":["components/customModal/useCustomModal.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAE7C,OAAO,MAAMC,cAAc,GAAGA,CAACC,cAAc,GAAG,KAAK,KAAK;EACxD,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGJ,QAAQ,CAACE,cAAc,CAAC;EAEtD,MAAMG,IAAI,GAAGN,WAAW,CAAC,MAAM;IAC7BK,UAAU,CAAC,IAAI,CAAC;EAClB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,KAAK,GAAGP,WAAW,CAAC,MAAM;IAC9BK,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,MAAM,GAAGR,WAAW,CAAC,MAAM;IAC/BK,UAAU,CAAEI,OAAO,IAAK,CAACA,OAAO,CAAC;EACnC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLL,OAAO;IACPC,UAAU;IACVC,IAAI;IACJC,KAAK;IACLC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Pressable, Text } from 'react-native';
|
|
5
|
+
import { styles } from "./styles.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const NumberPadKey = ({
|
|
8
|
+
config,
|
|
9
|
+
onPress,
|
|
10
|
+
keyStyle,
|
|
11
|
+
keyTextStyle,
|
|
12
|
+
theme,
|
|
13
|
+
sizeStyle,
|
|
14
|
+
disabled = false
|
|
15
|
+
}) => {
|
|
16
|
+
const [pressed, setPressed] = useState(false);
|
|
17
|
+
const isDisabled = disabled || config.disabled;
|
|
18
|
+
const isMuted = config.type === 'backspace' || config.type === 'decimal';
|
|
19
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
20
|
+
accessibilityRole: "keyboardkey",
|
|
21
|
+
accessibilityLabel: config.accessibilityLabel ?? (typeof config.label === 'string' ? config.label : config.id),
|
|
22
|
+
accessibilityState: {
|
|
23
|
+
disabled: isDisabled
|
|
24
|
+
},
|
|
25
|
+
disabled: isDisabled,
|
|
26
|
+
onPress: onPress,
|
|
27
|
+
onPressIn: () => setPressed(true),
|
|
28
|
+
onPressOut: () => setPressed(false),
|
|
29
|
+
style: [styles.key, sizeStyle.key, theme.key, {
|
|
30
|
+
flex: config.flex ?? 1
|
|
31
|
+
}, pressed && !isDisabled && theme.keyPressed, isDisabled && theme.keyDisabled, keyStyle],
|
|
32
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
33
|
+
style: [styles.keyText, sizeStyle.keyText, isMuted ? theme.keyTextMuted : theme.keyText, keyTextStyle],
|
|
34
|
+
children: config.label
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export default NumberPadKey;
|
|
39
|
+
//# sourceMappingURL=NumberPadKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","Pressable","Text","styles","jsx","_jsx","NumberPadKey","config","onPress","keyStyle","keyTextStyle","theme","sizeStyle","disabled","pressed","setPressed","isDisabled","isMuted","type","accessibilityRole","accessibilityLabel","label","id","accessibilityState","onPressIn","onPressOut","style","key","flex","keyPressed","keyDisabled","children","keyText","keyTextMuted"],"sourceRoot":"../../../../src","sources":["components/customNumberPad/NumberPadKey.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SACEC,SAAS,EACTC,IAAI,QAIC,cAAc;AAErB,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAsBlC,MAAMC,YAAY,GAAGA,CAAC;EACpBC,MAAM;EACNC,OAAO;EACPC,QAAQ;EACRC,YAAY;EACZC,KAAK;EACLC,SAAS;EACTC,QAAQ,GAAG;AACM,CAAC,KAAK;EACvB,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGf,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAMgB,UAAU,GAAGH,QAAQ,IAAIN,MAAM,CAACM,QAAQ;EAC9C,MAAMI,OAAO,GAAGV,MAAM,CAACW,IAAI,KAAK,WAAW,IAAIX,MAAM,CAACW,IAAI,KAAK,SAAS;EAExE,oBACEb,IAAA,CAACJ,SAAS;IACRkB,iBAAiB,EAAC,aAAa;IAC/BC,kBAAkB,EAChBb,MAAM,CAACa,kBAAkB,KACxB,OAAOb,MAAM,CAACc,KAAK,KAAK,QAAQ,GAAGd,MAAM,CAACc,KAAK,GAAGd,MAAM,CAACe,EAAE,CAC7D;IACDC,kBAAkB,EAAE;MAAEV,QAAQ,EAAEG;IAAW,CAAE;IAC7CH,QAAQ,EAAEG,UAAW;IACrBR,OAAO,EAAEA,OAAQ;IACjBgB,SAAS,EAAEA,CAAA,KAAMT,UAAU,CAAC,IAAI,CAAE;IAClCU,UAAU,EAAEA,CAAA,KAAMV,UAAU,CAAC,KAAK,CAAE;IACpCW,KAAK,EAAE,CACLvB,MAAM,CAACwB,GAAG,EACVf,SAAS,CAACe,GAAG,EACbhB,KAAK,CAACgB,GAAG,EACT;MAAEC,IAAI,EAAErB,MAAM,CAACqB,IAAI,IAAI;IAAE,CAAC,EAC1Bd,OAAO,IAAI,CAACE,UAAU,IAAIL,KAAK,CAACkB,UAAU,EAC1Cb,UAAU,IAAIL,KAAK,CAACmB,WAAW,EAC/BrB,QAAQ,CACR;IAAAsB,QAAA,eAEF1B,IAAA,CAACH,IAAI;MACHwB,KAAK,EAAE,CACLvB,MAAM,CAAC6B,OAAO,EACdpB,SAAS,CAACoB,OAAO,EACjBf,OAAO,GAAGN,KAAK,CAACsB,YAAY,GAAGtB,KAAK,CAACqB,OAAO,EAC5CtB,YAAY,CACZ;MAAAqB,QAAA,EAEDxB,MAAM,CAACc;IAAK,CACT;EAAC,CACE,CAAC;AAEhB,CAAC;AAED,eAAef,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import NumberPadKey from "./NumberPadKey.js";
|
|
6
|
+
import { sizeStyles, styles, variantTheme } from "./styles.js";
|
|
7
|
+
import { applyNumberPadKey, NUMBER_PAD_ROWS } from "./utils.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const CustomNumberPad = ({
|
|
10
|
+
onKeyPress,
|
|
11
|
+
onBackspace,
|
|
12
|
+
value,
|
|
13
|
+
onChange,
|
|
14
|
+
maxLength,
|
|
15
|
+
allowDecimal = false,
|
|
16
|
+
decimalPlaces,
|
|
17
|
+
variant = 'default',
|
|
18
|
+
size = 'md',
|
|
19
|
+
disabled = false,
|
|
20
|
+
containerStyle,
|
|
21
|
+
rowStyle,
|
|
22
|
+
keyStyle,
|
|
23
|
+
keyTextStyle,
|
|
24
|
+
backspaceLabel = '⌫',
|
|
25
|
+
bottomLeftKey,
|
|
26
|
+
renderKey
|
|
27
|
+
}) => {
|
|
28
|
+
const theme = variantTheme[variant];
|
|
29
|
+
const sizing = sizeStyles[size];
|
|
30
|
+
const inputRules = useMemo(() => ({
|
|
31
|
+
maxLength,
|
|
32
|
+
allowDecimal,
|
|
33
|
+
decimalPlaces
|
|
34
|
+
}), [allowDecimal, decimalPlaces, maxLength]);
|
|
35
|
+
const handleKey = useCallback((key, customPress) => {
|
|
36
|
+
if (disabled) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (customPress) {
|
|
40
|
+
customPress();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (key === 'backspace') {
|
|
44
|
+
onBackspace?.();
|
|
45
|
+
if (onChange) {
|
|
46
|
+
onChange(applyNumberPadKey(value ?? '', 'backspace', inputRules) ?? '');
|
|
47
|
+
}
|
|
48
|
+
onKeyPress?.('backspace');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
onKeyPress?.(key);
|
|
52
|
+
if (onChange) {
|
|
53
|
+
const next = applyNumberPadKey(value ?? '', key, inputRules);
|
|
54
|
+
if (next != null) {
|
|
55
|
+
onChange(next);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, [disabled, inputRules, onBackspace, onChange, onKeyPress, value]);
|
|
59
|
+
const digitRows = useMemo(() => NUMBER_PAD_ROWS.map(row => row.map(digit => ({
|
|
60
|
+
id: digit,
|
|
61
|
+
label: digit,
|
|
62
|
+
value: digit,
|
|
63
|
+
type: 'digit',
|
|
64
|
+
accessibilityLabel: `Number ${digit}`
|
|
65
|
+
}))), []);
|
|
66
|
+
const bottomRow = useMemo(() => {
|
|
67
|
+
const keys = [];
|
|
68
|
+
if (bottomLeftKey) {
|
|
69
|
+
keys.push({
|
|
70
|
+
id: 'custom-bottom-left',
|
|
71
|
+
label: bottomLeftKey.label,
|
|
72
|
+
type: 'custom',
|
|
73
|
+
onPress: bottomLeftKey.onPress,
|
|
74
|
+
disabled: bottomLeftKey.disabled,
|
|
75
|
+
accessibilityLabel: bottomLeftKey.accessibilityLabel
|
|
76
|
+
});
|
|
77
|
+
} else if (allowDecimal) {
|
|
78
|
+
keys.push({
|
|
79
|
+
id: 'decimal',
|
|
80
|
+
label: '.',
|
|
81
|
+
value: '.',
|
|
82
|
+
type: 'decimal',
|
|
83
|
+
accessibilityLabel: 'Decimal point'
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
keys.push({
|
|
87
|
+
id: 'spacer',
|
|
88
|
+
label: '',
|
|
89
|
+
type: 'custom',
|
|
90
|
+
flex: 1
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
keys.push({
|
|
94
|
+
id: '0',
|
|
95
|
+
label: '0',
|
|
96
|
+
value: '0',
|
|
97
|
+
type: 'digit',
|
|
98
|
+
accessibilityLabel: 'Number 0'
|
|
99
|
+
});
|
|
100
|
+
keys.push({
|
|
101
|
+
id: 'backspace',
|
|
102
|
+
label: backspaceLabel,
|
|
103
|
+
value: 'backspace',
|
|
104
|
+
type: 'backspace',
|
|
105
|
+
accessibilityLabel: 'Backspace'
|
|
106
|
+
});
|
|
107
|
+
return keys;
|
|
108
|
+
}, [allowDecimal, backspaceLabel, bottomLeftKey]);
|
|
109
|
+
const rows = [...digitRows, bottomRow];
|
|
110
|
+
const renderPadKey = config => {
|
|
111
|
+
if (config.id === 'spacer') {
|
|
112
|
+
return /*#__PURE__*/_jsx(View, {
|
|
113
|
+
style: styles.spacer
|
|
114
|
+
}, config.id);
|
|
115
|
+
}
|
|
116
|
+
const onPress = () => {
|
|
117
|
+
if (config.type === 'custom') {
|
|
118
|
+
handleKey('', config.onPress);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
handleKey(config.value ?? '');
|
|
122
|
+
};
|
|
123
|
+
if (renderKey) {
|
|
124
|
+
return /*#__PURE__*/_jsx(View, {
|
|
125
|
+
style: {
|
|
126
|
+
flex: config.flex ?? 1
|
|
127
|
+
},
|
|
128
|
+
children: renderKey(config, onPress)
|
|
129
|
+
}, config.id);
|
|
130
|
+
}
|
|
131
|
+
return /*#__PURE__*/_jsx(NumberPadKey, {
|
|
132
|
+
config: config,
|
|
133
|
+
disabled: disabled,
|
|
134
|
+
keyStyle: keyStyle,
|
|
135
|
+
keyTextStyle: keyTextStyle,
|
|
136
|
+
onPress: onPress,
|
|
137
|
+
sizeStyle: sizing,
|
|
138
|
+
theme: theme
|
|
139
|
+
}, config.id);
|
|
140
|
+
};
|
|
141
|
+
return /*#__PURE__*/_jsx(View, {
|
|
142
|
+
style: [styles.container, theme.container, {
|
|
143
|
+
gap: sizing.gap
|
|
144
|
+
}, containerStyle],
|
|
145
|
+
children: rows.map((row, rowIndex) => /*#__PURE__*/_jsx(View, {
|
|
146
|
+
style: [styles.row, {
|
|
147
|
+
gap: sizing.gap
|
|
148
|
+
}, rowStyle],
|
|
149
|
+
children: row.map(renderPadKey)
|
|
150
|
+
}, `row-${rowIndex}`))
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
export default CustomNumberPad;
|
|
154
|
+
export { applyNumberPadKey, NUMBER_PAD_ROWS } from "./utils.js";
|
|
155
|
+
export { useNumberPadInput } from "./useNumberPadInput.js";
|
|
156
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","View","NumberPadKey","sizeStyles","styles","variantTheme","applyNumberPadKey","NUMBER_PAD_ROWS","jsx","_jsx","CustomNumberPad","onKeyPress","onBackspace","value","onChange","maxLength","allowDecimal","decimalPlaces","variant","size","disabled","containerStyle","rowStyle","keyStyle","keyTextStyle","backspaceLabel","bottomLeftKey","renderKey","theme","sizing","inputRules","handleKey","key","customPress","next","digitRows","map","row","digit","id","label","type","accessibilityLabel","bottomRow","keys","push","onPress","flex","rows","renderPadKey","config","style","spacer","children","sizeStyle","container","gap","rowIndex","useNumberPadInput"],"sourceRoot":"../../../../src","sources":["components/customNumberPad/index.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,YAAY,MAAM,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AEZ,CAAC;IAEX;IAEA,oBACE9B,IAAA,CAACP,YAAY;MAEXgD,MAAM,EAAEA,MAAO;MACf9B,QAAQ,EAAEA,QAAS;MACnBG,QAAQ,EAAEA,QAAS;MACnBC,YAAY,EAAEA,YAAa;MAC3BsB,OAAO,EAAEA,OAAQ;MACjBQ,SAAS,EAAEzB,MAAO;MAClBD,KAAK,EAAEA;IAAM,GAPRsB,MAAM,CAACX,EAQb,CAAC;EAEN,CAAC;EAED,oBACE9B,IAAA,CAACR,IAAI;IACHkD,KAAK,EAAE,CACL/C,MAAM,CAACmD,SAAS,EAChB3B,KAAK,CAAC2B,SAAS,EACf;MAAEC,GAAG,EAAE3B,MAAM,CAAC2B;IAAI,CAAC,EACnBnC,cAAc,CACd;IAAAgC,QAAA,EAEDL,IAAI,CAACZ,GAAG,CAAC,CAACC,GAAG,EAAEoB,QAAQ,kBACtBhD,IAAA,CAACR,IAAI;MAEHkD,KAAK,EAAE,CAAC/C,MAAM,CAACiC,GAAG,EAAE;QAAEmB,GAAG,EAAE3B,MAAM,CAAC2B;MAAI,CAAC,EAAElC,QAAQ,CAAE;MAAA+B,QAAA,EAElDhB,GAAG,CAACD,GAAG,CAACa,YAAY;IAAC,GAHjB,OAAOQ,QAAQ,EAIhB,CACP;EAAC,CACE,CAAC;AAEX,CAAC;AAED,eAAe/C,eAAe;AAC9B,SAASJ,iBAAiB,EAAEC,eAAe,QAAQ,YAAS;AAC5D,SAASmD,iBAAiB,QAAQ,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
export const sizeStyles = {
|
|
5
|
+
sm: {
|
|
6
|
+
key: {
|
|
7
|
+
minHeight: 44,
|
|
8
|
+
borderRadius: 8
|
|
9
|
+
},
|
|
10
|
+
keyText: {
|
|
11
|
+
fontSize: 20
|
|
12
|
+
},
|
|
13
|
+
gap: 8
|
|
14
|
+
},
|
|
15
|
+
md: {
|
|
16
|
+
key: {
|
|
17
|
+
minHeight: 52,
|
|
18
|
+
borderRadius: 10
|
|
19
|
+
},
|
|
20
|
+
keyText: {
|
|
21
|
+
fontSize: 24
|
|
22
|
+
},
|
|
23
|
+
gap: 10
|
|
24
|
+
},
|
|
25
|
+
lg: {
|
|
26
|
+
key: {
|
|
27
|
+
minHeight: 60,
|
|
28
|
+
borderRadius: 12
|
|
29
|
+
},
|
|
30
|
+
keyText: {
|
|
31
|
+
fontSize: 28
|
|
32
|
+
},
|
|
33
|
+
gap: 12
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const variantTheme = {
|
|
37
|
+
default: {
|
|
38
|
+
container: {
|
|
39
|
+
backgroundColor: '#F8F9FA'
|
|
40
|
+
},
|
|
41
|
+
key: {
|
|
42
|
+
backgroundColor: '#FFFFFF',
|
|
43
|
+
borderWidth: 1,
|
|
44
|
+
borderColor: '#E9ECEF'
|
|
45
|
+
},
|
|
46
|
+
keyPressed: {
|
|
47
|
+
backgroundColor: '#E9ECEF'
|
|
48
|
+
},
|
|
49
|
+
keyText: {
|
|
50
|
+
color: '#212529',
|
|
51
|
+
fontWeight: '600'
|
|
52
|
+
},
|
|
53
|
+
keyTextMuted: {
|
|
54
|
+
color: '#6C757D',
|
|
55
|
+
fontWeight: '600'
|
|
56
|
+
},
|
|
57
|
+
keyDisabled: {
|
|
58
|
+
opacity: 0.45
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
primary: {
|
|
62
|
+
container: {
|
|
63
|
+
backgroundColor: '#E7F1FF'
|
|
64
|
+
},
|
|
65
|
+
key: {
|
|
66
|
+
backgroundColor: '#FFFFFF',
|
|
67
|
+
borderWidth: 1,
|
|
68
|
+
borderColor: '#B6D4FE'
|
|
69
|
+
},
|
|
70
|
+
keyPressed: {
|
|
71
|
+
backgroundColor: '#CFE2FF'
|
|
72
|
+
},
|
|
73
|
+
keyText: {
|
|
74
|
+
color: '#0D6EFD',
|
|
75
|
+
fontWeight: '700'
|
|
76
|
+
},
|
|
77
|
+
keyTextMuted: {
|
|
78
|
+
color: '#6EA8FE',
|
|
79
|
+
fontWeight: '700'
|
|
80
|
+
},
|
|
81
|
+
keyDisabled: {
|
|
82
|
+
opacity: 0.45
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
dark: {
|
|
86
|
+
container: {
|
|
87
|
+
backgroundColor: '#212529'
|
|
88
|
+
},
|
|
89
|
+
key: {
|
|
90
|
+
backgroundColor: '#343A40',
|
|
91
|
+
borderWidth: 1,
|
|
92
|
+
borderColor: '#495057'
|
|
93
|
+
},
|
|
94
|
+
keyPressed: {
|
|
95
|
+
backgroundColor: '#495057'
|
|
96
|
+
},
|
|
97
|
+
keyText: {
|
|
98
|
+
color: '#F8F9FA',
|
|
99
|
+
fontWeight: '600'
|
|
100
|
+
},
|
|
101
|
+
keyTextMuted: {
|
|
102
|
+
color: '#ADB5BD',
|
|
103
|
+
fontWeight: '600'
|
|
104
|
+
},
|
|
105
|
+
keyDisabled: {
|
|
106
|
+
opacity: 0.45
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
export const styles = StyleSheet.create({
|
|
111
|
+
container: {
|
|
112
|
+
padding: 12,
|
|
113
|
+
borderRadius: 16
|
|
114
|
+
},
|
|
115
|
+
row: {
|
|
116
|
+
flexDirection: 'row',
|
|
117
|
+
alignItems: 'stretch'
|
|
118
|
+
},
|
|
119
|
+
key: {
|
|
120
|
+
flex: 1,
|
|
121
|
+
alignItems: 'center',
|
|
122
|
+
justifyContent: 'center'
|
|
123
|
+
},
|
|
124
|
+
keyText: {
|
|
125
|
+
textAlign: 'center'
|
|
126
|
+
},
|
|
127
|
+
spacer: {
|
|
128
|
+
flex: 1
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","sizeStyles","sm","key","minHeight","borderRadius","keyText","fontSize","gap","md","lg","variantTheme","default","container","backgroundColor","borderWidth","borderColor","keyPressed","color","fontWeight","keyTextMuted","keyDisabled","opacity","primary","dark","styles","create","padding","row","flexDirection","alignItems","flex","justifyContent","textAlign","spacer"],"sourceRoot":"../../../../src","sources":["components/customNumberPad/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAwC,cAAc;AAIzE,OAAO,MAAMC,UAGZ,GAAG;EACFC,EAAE,EAAE;IACFC,GAAG,EAAE;MACHC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,QAAQ,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;EACP,CAAC;EACDC,EAAE,EAAE;IACFN,GAAG,EAAE;MACHC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,QAAQ,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;EACP,CAAC;EACDE,EAAE,EAAE;IACFP,GAAG,EAAE;MACHC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,QAAQ,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;EACP;AACF,CAAC;AAED,OAAO,MAAMG,YAUZ,GAAG;EACFC,OAAO,EAAE;IACPC,SAAS,EAAE;MACTC,eAAe,EAAE;IACnB,CAAC;IACDX,GAAG,EAAE;MACHW,eAAe,EAAE,SAAS;MAC1BC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE;IACf,CAAC;IACDC,UAAU,EAAE;MACVH,eAAe,EAAE;IACnB,CAAC;IACDR,OAAO,EAAE;MACPY,KAAK,EAAE,SAAS;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACZF,KAAK,EAAE,SAAS;MAChBC,UAAU,EAAE;IACd,CAAC;IACDE,WAAW,EAAE;MACXC,OAAO,EAAE;IACX;EACF,CAAC;EACDC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ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/customNumberPad/types.ts"],"mappings":"","ignoreList":[]}
|