@tecsinapse/react-native-kit 1.16.1 → 1.17.1
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/CHANGELOG.md +34 -0
- package/dist/components/atoms/Avatar/Avatar.js +1 -3
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/index.js +4 -9
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +1 -3
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.js +5 -15
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js +3 -5
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/Item.js +1 -3
- package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/index.js +7 -21
- package/dist/components/atoms/BottomNavigator/index.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/styled.js +1 -3
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +2 -4
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +1 -3
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js +1 -3
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +1 -3
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js +8 -21
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/index.js +9 -33
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +1 -3
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.js +4 -9
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/Header/Header.js +9 -11
- package/dist/components/atoms/Header/Header.js.map +1 -1
- package/dist/components/atoms/Header/index.js +5 -15
- package/dist/components/atoms/Header/index.js.map +1 -1
- package/dist/components/atoms/Header/styled.js +1 -3
- package/dist/components/atoms/Header/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.js +7 -4
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.js +5 -15
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +1 -3
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.d.ts +8 -0
- package/dist/components/atoms/InputMask/InputMask.js +92 -0
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -0
- package/dist/components/atoms/InputMask/index.d.ts +1 -0
- package/dist/components/atoms/InputMask/index.js +14 -0
- package/dist/components/atoms/InputMask/index.js.map +1 -0
- package/dist/components/atoms/InputMask/styled.d.ts +5 -0
- package/dist/components/atoms/InputMask/styled.js +27 -0
- package/dist/components/atoms/InputMask/styled.js.map +1 -0
- package/dist/components/atoms/Modal/ModalGroupManager.js +1 -3
- package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/components/atoms/Modal/ModalLifecycleHandler.d.ts +1 -0
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js +30 -30
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/components/atoms/Modal/index.d.ts +1 -0
- package/dist/components/atoms/Modal/index.js +15 -39
- package/dist/components/atoms/Modal/index.js.map +1 -1
- package/dist/components/atoms/Modal/ui/BaseModalView.js +1 -3
- package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
- package/dist/components/atoms/Modal/ui/styled.js +1 -3
- package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ui/types.js +1 -3
- package/dist/components/atoms/Modal/useLazyModalManager.d.ts +1 -1
- package/dist/components/atoms/Modal/useLazyModalManager.js +3 -5
- package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalManager.d.ts +1 -1
- package/dist/components/atoms/Modal/useModalManager.js +3 -5
- package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.d.ts +4 -0
- package/dist/components/atoms/Modal/useModalRemoteControl.js +24 -0
- package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -0
- package/dist/components/atoms/Skeleton/Pulse.js +1 -3
- package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +3 -5
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/Wave.js +1 -3
- package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/components/atoms/Skeleton/animation.js +1 -3
- package/dist/components/atoms/Skeleton/animation.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.js +5 -15
- package/dist/components/atoms/Skeleton/index.js.map +1 -1
- package/dist/components/atoms/Skeleton/styled.js +1 -3
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/Skeleton/types.js +1 -3
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js +1 -3
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/index.js +5 -15
- package/dist/components/atoms/SnappingSlider/index.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +1 -3
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.js +5 -15
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +1 -3
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/index.js +5 -15
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +4 -6
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +1 -3
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/atoms/TextArea/index.js +5 -15
- package/dist/components/atoms/TextArea/index.js.map +1 -1
- package/dist/components/atoms/TextArea/styled.js +1 -3
- package/dist/components/atoms/TextArea/styled.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +1 -3
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/index.js +4 -9
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +2 -4
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.js +5 -15
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +1 -3
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +1 -3
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.js +5 -15
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +1 -3
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.js +4 -9
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +1 -3
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js +5 -15
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/Select/Modal.js +3 -5
- package/dist/components/molecules/Select/Modal.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +3 -5
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/index.js +5 -15
- package/dist/components/molecules/Select/index.js.map +1 -1
- package/dist/components/molecules/Select/styled.js +2 -4
- package/dist/components/molecules/Select/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +1 -3
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.js +5 -15
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +1 -3
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +75 -267
- package/dist/index.js.map +1 -1
- package/dist/utils/date.js +1 -3
- package/dist/utils/date.js.map +1 -1
- package/package.json +3 -3
- package/src/components/atoms/Input/Input.tsx +7 -1
- package/src/components/atoms/InputMask/InputMask.tsx +102 -0
- package/src/components/atoms/InputMask/index.ts +1 -0
- package/src/components/atoms/InputMask/styled.ts +25 -0
- package/src/components/atoms/Modal/ModalLifecycleHandler.ts +15 -4
- package/src/components/atoms/Modal/index.ts +2 -1
- package/src/components/atoms/Modal/useLazyModalManager.ts +2 -2
- package/src/components/atoms/Modal/useModalManager.ts +2 -2
- package/src/components/atoms/Modal/useModalRemoteControl.ts +26 -0
- package/src/components/atoms/Skeleton/Skeleton.tsx +6 -0
- package/src/index.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/atoms/Modal/ui/BaseModalView.tsx"],"names":["BACKDROP_ALPHA","INTERPOLATION_STEPS","INTERPOLATION_DURATION","OPACITY_DURATION","ModalView","children","visible","BoxComponent","BoxContent","frozen","isLastShown","showCloseBar","close","onClose","bottom","ready","setReady","keyboardOpened","setKeyboardOpened","boxHeight","setBoxHeight","backgroundCarrier","Animated","Value","current","translationCarrier","opacityCarrier","offset","getKeyboardHeight","keyboard","wHeight","Math","ceil","Dimensions","get","height","sHeight","StatusBar","currentHeight","show","sequence","timing","toValue","duration","easing","Easing","out","circle","useNativeDriver","start","hide","to","parallel","backgroundInterpolation","interpolate","inputRange","outputRange","handleBoxLayoutChanges","lce","boxHeightEvent","nativeEvent","layout","setValue","requestAnimationFrame","Keyboard","dismiss","showEvent","addListener","e","endCoordinates","hideEvent","remove","undefined","backgroundColor","paddingBottom","opacity","transform","translateY"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAGA,MAAMA,cAAc,GAAG,GAAvB;AACA,MAAMC,mBAAmB,GAAG,EAA5B;AACA,MAAMC,sBAAsB,GAAG,GAA/B;AACA,MAAMC,gBAAgB,GAAG,EAAzB;;AAEO,MAAMC,SAAyB,GAAG,CAAC;AACtCC,EAAAA,QADsC;AAEtCC,EAAAA,OAFsC;AAGtCC,EAAAA,YAAY,GAAGC,qBAHuB;AAItCC,EAAAA,MAJsC;AAKtCC,EAAAA,WALsC;AAMtCC,EAAAA,YAAY,GAAG,IANuB;AAOtCC,EAAAA,KAPsC;AAQtCC,EAAAA;AARsC,CAAD,KASnC;AAEF,QAAM;AAAEC,IAAAA;AAAF,MAAa,oDAAnB;AACA,QAAM,CAAEC,KAAF,EAASC,QAAT,IAAsB,qBAAS,KAAT,CAA5B;AACA,QAAM,CAAEC,cAAF,EAAkBC,iBAAlB,IAAwC,qBAAS,CAAT,CAA9C;AACA,QAAM,CAAEC,SAAF,EAAaC,YAAb,IAA8B,qBAAS,CAAT,CAApC;AACA,QAAMC,iBAAiB,GAAG,mBAAO,IAAIC,sBAASC,KAAb,CAAmB,CAAnB,CAAP,EAA8BC,OAAxD;AACA,QAAMC,kBAAkB,GAAG,mBAAO,IAAIH,sBAASC,KAAb,CAAmB,CAAnB,CAAP,EAA8BC,OAAzD;AACA,QAAME,cAAc,GAAG,mBAAO,IAAIJ,sBAASC,KAAb,CAAmB,CAAnB,CAAP,EAA8BC,OAArD;AACA,QAAMG,MAAM,GAAGjB,WAAW,IAAIO,cAAc,GAAG,CAAhC,GAAoC,CAApC,GAAwCH,MAAvD;;AAEA,QAAMc,iBAAiB,GAAIC,QAAD,IAAsB;AAC5C,QA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hE,WAAW,GAAGkB,iBAAiB,CAACX,cAAD,CAApB,GAAuC,CADnD;AAEd0D,MAAAA,OAAO,EAAEjD,cAFK;AAGdkD,MAAAA,SAAS,EAAE,CAAC;AAAEC,QAAAA,UAAU,EAAEpD;AAAd,OAAD;AAHG;AAAtB,KAKI,6BAAC,sBAAD,QACI,6BAAC,YAAD;AAAc,IAAA,QAAQ,EAAEgC,sBAAxB;AAAgD,IAAA,KAAK,EAAE;AAAEiB,MAAAA,aAAa,EAAE/C;AAAjB,KAAvD;AAAkF,IAAA,OAAO,EAAC;AAA1F,KACKhB,YAAY,IAAI,6BAAC,gBAAD,OADrB,EAEKN,QAFL,CADJ,CALJ,CADJ,CADJ,CADJ;AAkBH,CAhIM","sourcesContent":["import { BoxContent } from \"@tecsinapse/react-core\";\nimport React, { FC, useCallback, useEffect, useRef, useState } from \"react\";\nimport { Animated, Dimensions, Easing, Keyboard, LayoutChangeEvent, Pressable, StatusBar } from \"react-native\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { BackDropView, CloseBar, StyledPressableBackDrop } from \"./styled\";\nimport { IBaseModal } from \"./types\";\n\nconst BACKDROP_ALPHA = .65\nconst INTERPOLATION_STEPS = 10\nconst INTERPOLATION_DURATION = 195 //ms\nconst OPACITY_DURATION = 25 //ms\n\nexport const ModalView: FC<IBaseModal> = ({\n children,\n visible,\n BoxComponent = BoxContent,\n frozen,\n isLastShown,\n showCloseBar = true,\n close,\n onClose\n}) => {\n \n const { bottom } = useSafeAreaInsets()\n const [ ready, setReady ] = useState(false)\n const [ keyboardOpened, setKeyboardOpened ] = useState(0)\n const [ boxHeight, setBoxHeight ] = useState(0)\n const backgroundCarrier = useRef(new Animated.Value(0)).current\n const translationCarrier = useRef(new Animated.Value(0)).current\n const opacityCarrier = useRef(new Animated.Value(0)).current\n const offset = isLastShown && keyboardOpened > 0 ? 0 : bottom\n\n const getKeyboardHeight = (keyboard: number) => {\n if (keyboard === 0) return 0\n \n let wHeight = Math.ceil(Dimensions.get('window').height)\n let sHeight = Math.ceil(Dimensions.get('screen').height)\n if (wHeight !== sHeight) {\n return keyboard + (sHeight - wHeight - (StatusBar.currentHeight || 0))\n }\n return keyboard\n }\n\n const show = useCallback(() => {\n Animated.sequence([\n Animated.timing(backgroundCarrier, {\n toValue: INTERPOLATION_STEPS,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: false\n }),\n Animated.timing(opacityCarrier, {\n toValue: 1,\n duration: OPACITY_DURATION,\n useNativeDriver: true\n }),\n Animated.timing(translationCarrier, {\n toValue: 0,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: true\n })\n ]).start()\n }, [])\n\n const hide = useCallback((to: number) => {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(translationCarrier, {\n toValue: to,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: true\n }),\n Animated.timing(opacityCarrier, {\n toValue: 0,\n duration: INTERPOLATION_DURATION,\n useNativeDriver: true\n }) \n ]),\n Animated.timing(backgroundCarrier, {\n toValue: 0,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: false\n }),\n ]).start(onClose)\n }, [onClose])\n\n const backgroundInterpolation = backgroundCarrier.interpolate({\n inputRange: [0, INTERPOLATION_STEPS],\n outputRange: ['rgba(0, 0, 0, 0)', `rgba(0, 0, 0, ${BACKDROP_ALPHA})`]\n })\n\n const handleBoxLayoutChanges = useCallback((lce: LayoutChangeEvent) => {\n let boxHeightEvent = lce.nativeEvent.layout.height\n setBoxHeight(boxHeightEvent)\n \n if (visible && !ready) {\n translationCarrier.setValue(boxHeightEvent)\n setReady(true)\n }\n }, [show, ready, visible, setReady])\n\n useEffect(() => {\n if (visible && ready) requestAnimationFrame(() => show())\n if (!visible && !ready) {\n Keyboard.dismiss()\n requestAnimationFrame(() => hide(boxHeight))\n }\n if (!visible && ready) setReady(false)\n }, [ready, visible])\n\n useEffect(() => {\n const showEvent = Keyboard.addListener('keyboardDidShow', (e) => setKeyboardOpened(e.endCoordinates.height))\n const hideEvent = Keyboard.addListener('keyboardDidHide', () => setKeyboardOpened(0))\n return () => {\n showEvent.remove()\n hideEvent.remove()\n }\n }, [])\n\n return (\n <StyledPressableBackDrop onPress={!frozen ? close : undefined}>\n <BackDropView style={{ backgroundColor: backgroundInterpolation }}>\n <Animated.View style={{ \n paddingBottom: isLastShown ? getKeyboardHeight(keyboardOpened) : 0, \n opacity: opacityCarrier, \n transform: [{ translateY: translationCarrier }]\n }}>\n <Pressable>\n <BoxComponent onLayout={handleBoxLayoutChanges} style={{ paddingBottom: offset }} variant=\"bottom\">\n {showCloseBar && <CloseBar/>}\n {children}\n </BoxComponent>\n </Pressable>\n </Animated.View>\n </BackDropView>\n </StyledPressableBackDrop>\n )\n}"],"file":"BaseModalView.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/atoms/Modal/ui/BaseModalView.tsx"],"names":["BACKDROP_ALPHA","INTERPOLATION_STEPS","INTERPOLATION_DURATION","OPACITY_DURATION","ModalView","children","visible","BoxComponent","BoxContent","frozen","isLastShown","showCloseBar","close","onClose","bottom","ready","setReady","keyboardOpened","setKeyboardOpened","boxHeight","setBoxHeight","backgroundCarrier","Animated","Value","current","translationCarrier","opacityCarrier","offset","getKeyboardHeight","keyboard","wHeight","Math","ceil","Dimensions","get","height","sHeight","StatusBar","currentHeight","show","sequence","timing","toValue","duration","easing","Easing","out","circle","useNativeDriver","start","hide","to","parallel","backgroundInterpolation","interpolate","inputRange","outputRange","handleBoxLayoutChanges","lce","boxHeightEvent","nativeEvent","layout","setValue","requestAnimationFrame","Keyboard","dismiss","showEvent","addListener","e","endCoordinates","hideEvent","remove","undefined","backgroundColor","paddingBottom","opacity","transform","translateY"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAGA,MAAMA,cAAc,GAAG,GAAvB;AACA,MAAMC,mBAAmB,GA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;AAAgD,IAAA,KAAK,EAAE;AAAEiB,MAAAA,aAAa,EAAE/C;AAAjB,KAAvD;AAAkF,IAAA,OAAO,EAAC;AAA1F,KACKhB,YAAY,IAAI,6BAAC,gBAAD,OADrB,EAEKN,QAFL,CADJ,CALJ,CADJ,CADJ,CADJ;AAkBH,CAhIM","sourcesContent":["import { BoxContent } from \"@tecsinapse/react-core\";\nimport React, { FC, useCallback, useEffect, useRef, useState } from \"react\";\nimport { Animated, Dimensions, Easing, Keyboard, LayoutChangeEvent, Pressable, StatusBar } from \"react-native\";\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { BackDropView, CloseBar, StyledPressableBackDrop } from \"./styled\";\nimport { IBaseModal } from \"./types\";\n\nconst BACKDROP_ALPHA = .65\nconst INTERPOLATION_STEPS = 10\nconst INTERPOLATION_DURATION = 195 //ms\nconst OPACITY_DURATION = 25 //ms\n\nexport const ModalView: FC<IBaseModal> = ({\n children,\n visible,\n BoxComponent = BoxContent,\n frozen,\n isLastShown,\n showCloseBar = true,\n close,\n onClose\n}) => {\n \n const { bottom } = useSafeAreaInsets()\n const [ ready, setReady ] = useState(false)\n const [ keyboardOpened, setKeyboardOpened ] = useState(0)\n const [ boxHeight, setBoxHeight ] = useState(0)\n const backgroundCarrier = useRef(new Animated.Value(0)).current\n const translationCarrier = useRef(new Animated.Value(0)).current\n const opacityCarrier = useRef(new Animated.Value(0)).current\n const offset = isLastShown && keyboardOpened > 0 ? 0 : bottom\n\n const getKeyboardHeight = (keyboard: number) => {\n if (keyboard === 0) return 0\n \n let wHeight = Math.ceil(Dimensions.get('window').height)\n let sHeight = Math.ceil(Dimensions.get('screen').height)\n if (wHeight !== sHeight) {\n return keyboard + (sHeight - wHeight - (StatusBar.currentHeight || 0))\n }\n return keyboard\n }\n\n const show = useCallback(() => {\n Animated.sequence([\n Animated.timing(backgroundCarrier, {\n toValue: INTERPOLATION_STEPS,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: false\n }),\n Animated.timing(opacityCarrier, {\n toValue: 1,\n duration: OPACITY_DURATION,\n useNativeDriver: true\n }),\n Animated.timing(translationCarrier, {\n toValue: 0,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: true\n })\n ]).start()\n }, [])\n\n const hide = useCallback((to: number) => {\n Animated.sequence([\n Animated.parallel([\n Animated.timing(translationCarrier, {\n toValue: to,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: true\n }),\n Animated.timing(opacityCarrier, {\n toValue: 0,\n duration: INTERPOLATION_DURATION,\n useNativeDriver: true\n }) \n ]),\n Animated.timing(backgroundCarrier, {\n toValue: 0,\n duration: INTERPOLATION_DURATION,\n easing: Easing.out(Easing.circle),\n useNativeDriver: false\n }),\n ]).start(onClose)\n }, [onClose])\n\n const backgroundInterpolation = backgroundCarrier.interpolate({\n inputRange: [0, INTERPOLATION_STEPS],\n outputRange: ['rgba(0, 0, 0, 0)', `rgba(0, 0, 0, ${BACKDROP_ALPHA})`]\n })\n\n const handleBoxLayoutChanges = useCallback((lce: LayoutChangeEvent) => {\n let boxHeightEvent = lce.nativeEvent.layout.height\n setBoxHeight(boxHeightEvent)\n \n if (visible && !ready) {\n translationCarrier.setValue(boxHeightEvent)\n setReady(true)\n }\n }, [show, ready, visible, setReady])\n\n useEffect(() => {\n if (visible && ready) requestAnimationFrame(() => show())\n if (!visible && !ready) {\n Keyboard.dismiss()\n requestAnimationFrame(() => hide(boxHeight))\n }\n if (!visible && ready) setReady(false)\n }, [ready, visible])\n\n useEffect(() => {\n const showEvent = Keyboard.addListener('keyboardDidShow', (e) => setKeyboardOpened(e.endCoordinates.height))\n const hideEvent = Keyboard.addListener('keyboardDidHide', () => setKeyboardOpened(0))\n return () => {\n showEvent.remove()\n hideEvent.remove()\n }\n }, [])\n\n return (\n <StyledPressableBackDrop onPress={!frozen ? close : undefined}>\n <BackDropView style={{ backgroundColor: backgroundInterpolation }}>\n <Animated.View style={{ \n paddingBottom: isLastShown ? getKeyboardHeight(keyboardOpened) : 0, \n opacity: opacityCarrier, \n transform: [{ translateY: translationCarrier }]\n }}>\n <Pressable>\n <BoxComponent onLayout={handleBoxLayoutChanges} style={{ paddingBottom: offset }} variant=\"bottom\">\n {showCloseBar && <CloseBar/>}\n {children}\n </BoxComponent>\n </Pressable>\n </Animated.View>\n </BackDropView>\n </StyledPressableBackDrop>\n )\n}"],"file":"BaseModalView.js"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
6
4
|
exports.CloseBar = exports.BackDropView = exports.StyledPressableBackDrop = void 0;
|
|
7
5
|
|
|
8
6
|
var _native = _interopRequireDefault(require("@emotion/native"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/atoms/Modal/ui/styled.ts"],"names":["StyledPressableBackDrop","styled","Pressable","BackDropView","Animated","View","CloseBar","theme","color","secondary","light"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/atoms/Modal/ui/styled.ts"],"names":["StyledPressableBackDrop","styled","Pressable","BackDropView","Animated","View","CloseBar","theme","color","secondary","light"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAEO,MAAMA,uBAAuB,GAAGC,gBAAOC,SAA+B;AAC7E;AACA;AACA;AACA;AACA,CALO;;AAOA,MAAMC,YAAY,GAAG,qBAAOC,sBAASC,IAAhB,CAA2C;AACvE;AACA;AACA,CAHO;;AAKA,MAAMC,QAAQ,GAAGL,gBAAOI,IAA0B;AACzD,wBAAwB,CAAC;AAAEE,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,KAAN,CAAYC,SAAZ,CAAsBC,KAAM;AACnE,qBAAqB,2BAAW,MAAX,CAAmB;AACxC,cAAe,GAAE,2BAAW,KAAX,CAAkB,OAAO;AAC1C,aAAa,2BAAW,MAAX,CAAmB;AAChC,cAAc,2BAAW,KAAX,CAAkB;AAChC,CANO","sourcesContent":["import styled from \"@emotion/native\";\nimport { RFValueStr, StyleProps } from \"@tecsinapse/react-core\";\nimport { Animated } from \"react-native\";\n\nexport const StyledPressableBackDrop = styled.Pressable<Partial<StyleProps>>`\n flex: 1;\n position: absolute;\n width: 100%;\n height: 100%;\n`\n\nexport const BackDropView = styled(Animated.View)<Partial<StyleProps>>`\n justify-content: flex-end;\n flex: 1;\n`\n\nexport const CloseBar = styled.View<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.color.secondary.light};\n border-radius: ${RFValueStr('10px')};\n margin: ${`${RFValueStr('5px')} auto`};\n width: ${RFValueStr('42px')};\n height: ${RFValueStr('5px')};\n`"],"file":"styled.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { IBaseModal } from "./ui/types";
|
|
3
|
-
export declare const useLazyModalManager: () => {
|
|
3
|
+
export declare const useLazyModalManager: (modalId?: string | undefined) => {
|
|
4
4
|
requestUpdate: () => void;
|
|
5
5
|
sync: (modal: ReactElement<IBaseModal>) => null;
|
|
6
6
|
show: () => void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
6
4
|
exports.useLazyModalManager = void 0;
|
|
7
5
|
|
|
8
6
|
var _react = require("react");
|
|
@@ -11,8 +9,8 @@ var _uuid = require("uuid");
|
|
|
11
9
|
|
|
12
10
|
var _ModalGroupManager = require("./ModalGroupManager");
|
|
13
11
|
|
|
14
|
-
const useLazyModalManager =
|
|
15
|
-
const [id] = (0, _react.useState)((0, _uuid.v4)());
|
|
12
|
+
const useLazyModalManager = modalId => {
|
|
13
|
+
const [id] = (0, _react.useState)(modalId ?? (0, _uuid.v4)());
|
|
16
14
|
const requestUpdate = (0, _react.useCallback)(() => _ModalGroupManager.modalLifecycle.update(), []);
|
|
17
15
|
const sync = (0, _react.useCallback)(modal => {
|
|
18
16
|
_ModalGroupManager.modalLifecycle.sync(id, () => modal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Modal/useLazyModalManager.ts"],"names":["useLazyModalManager","id","requestUpdate","modalLifecycle","update","sync","modal","show","close","destroy"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Modal/useLazyModalManager.ts"],"names":["useLazyModalManager","modalId","id","requestUpdate","modalLifecycle","update","sync","modal","show","close","destroy"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAWO,MAAMA,mBAAmB,GAAIC,OAAD,IAAsB;AAErD,QAAM,CAACC,EAAD,IAAO,qBAASD,OAAO,IAAI,eAApB,CAAb;AAEA,QAAME,aAAa,GAAG,wBAAY,MAAMC,kCAAeC,MAAf,EAAlB,EAA2C,EAA3C,CAAtB;AAEA,QAAMC,IAAI,GAAG,wBAAaC,KAAD,IAAqC;AAC1DH,sCAAeE,IAAf,CAAoBJ,EAApB,EAAwB,MAAMK,KAA9B;;AACA,WAAO,IAAP;AACH,GAHY,EAGV,CAACL,EAAD,CAHU,CAAb;AAKA,QAAMM,IAAI,GAAG,wBAAY,MAAM;AAC3BJ,sCAAeI,IAAf,CAAoBN,EAApB;AACH,GAFY,EAEV,CAACA,EAAD,CAFU,CAAb;AAIA,QAAMO,KAAK,GAAG,wBAAY,MAAM;AAC5BL,sCAAeK,KAAf,CAAqBP,EAArB;AACH,GAFa,EAEX,CAACA,EAAD,CAFW,CAAd;AAIA,wBAAU,MAAM;AACZ,WAAO,MAAME,kCAAeM,OAAf,CAAuBR,EAAvB,CAAb;AACH,GAFD,EAEG,EAFH;AAIA,SAAO;AACHC,IAAAA,aADG;AAEHG,IAAAA,IAFG;AAGHE,IAAAA,IAHG;AAIHC,IAAAA;AAJG,GAAP;AAMH,CA7BM","sourcesContent":["import { ReactElement, useCallback, useEffect, useState } from \"react\"\nimport { v4 as uuidv4 } from 'uuid'\nimport { modalLifecycle } from \"./ModalGroupManager\"\nimport { IBaseModal } from \"./ui/types\"\n\n/**\n * Use this hook to tell the modal lifecycle handler that you want to add\n * a new modal component. \n * \n * @param id \n * @param modal \n * @returns\n */\nexport const useLazyModalManager = (modalId?: string) => {\n\n const [id] = useState(modalId ?? uuidv4())\n\n const requestUpdate = useCallback(() => modalLifecycle.update(), [])\n\n const sync = useCallback((modal: ReactElement<IBaseModal>) => {\n modalLifecycle.sync(id, () => modal)\n return null\n }, [id])\n\n const show = useCallback(() => {\n modalLifecycle.show(id)\n }, [id])\n\n const close = useCallback(() => {\n modalLifecycle.close(id)\n }, [id])\n \n useEffect(() => {\n return () => modalLifecycle.destroy(id)\n }, [])\n\n return {\n requestUpdate,\n sync,\n show,\n close\n }\n}"],"file":"useLazyModalManager.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { IBaseModal } from "./ui/types";
|
|
3
|
-
export declare const useModalManager: (modal: () => ReactElement<IBaseModal
|
|
3
|
+
export declare const useModalManager: (modal: () => ReactElement<IBaseModal>, modalId?: string | undefined) => {
|
|
4
4
|
show: () => void;
|
|
5
5
|
close: () => void;
|
|
6
6
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
6
4
|
exports.useModalManager = void 0;
|
|
7
5
|
|
|
8
6
|
var _react = require("react");
|
|
@@ -11,8 +9,8 @@ var _uuid = require("uuid");
|
|
|
11
9
|
|
|
12
10
|
var _ModalGroupManager = require("./ModalGroupManager");
|
|
13
11
|
|
|
14
|
-
const useModalManager = modal => {
|
|
15
|
-
const [id] = (0, _react.useState)((0, _uuid.v4)());
|
|
12
|
+
const useModalManager = (modal, modalId) => {
|
|
13
|
+
const [id] = (0, _react.useState)(modalId ?? (0, _uuid.v4)());
|
|
16
14
|
|
|
17
15
|
_ModalGroupManager.modalLifecycle.sync(id, modal);
|
|
18
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Modal/useModalManager.ts"],"names":["useModalManager","modal","id","modalLifecycle","sync","show","close","destroy"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Modal/useModalManager.ts"],"names":["useModalManager","modal","modalId","id","modalLifecycle","sync","show","close","destroy"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAWO,MAAMA,eAAe,GAAG,CAACC,KAAD,EAAwCC,OAAxC,KAA6D;AAExF,QAAM,CAACC,EAAD,IAAO,qBAASD,OAAO,IAAI,eAApB,CAAb;;AACAE,oCAAeC,IAAf,CAAoBF,EAApB,EAAwBF,KAAxB;;AAEA,QAAMK,IAAI,GAAG,wBAAY,MAAM;AAC3BF,sCAAeE,IAAf,CAAoBH,EAApB;AACH,GAFY,EAEV,CAACA,EAAD,CAFU,CAAb;AAIA,QAAMI,KAAK,GAAG,wBAAY,MAAM;AAC5BH,sCAAeG,KAAf,CAAqBJ,EAArB;AACH,GAFa,EAEX,CAACA,EAAD,CAFW,CAAd;AAIA,wBAAU,MAAM;AACZ,WAAO,MAAMC,kCAAeI,OAAf,CAAuBL,EAAvB,CAAb;AACH,GAFD,EAEG,EAFH;AAIA,SAAO;AACHG,IAAAA,IADG;AAEHC,IAAAA;AAFG,GAAP;AAIH,CArBM","sourcesContent":["import { ReactElement, useCallback, useEffect, useState } from \"react\"\nimport { v4 as uuidv4 } from 'uuid'\nimport { modalLifecycle } from \"./ModalGroupManager\"\nimport { IBaseModal } from \"./ui/types\"\n\n/**\n * Use this hook to tell the modal lifecycle handler that you want to add\n * a new modal component. \n * \n * @param id \n * @param modal \n * @returns\n */\nexport const useModalManager = (modal: () => ReactElement<IBaseModal>, modalId?: string) => {\n\n const [id] = useState(modalId ?? uuidv4())\n modalLifecycle.sync(id, modal)\n\n const show = useCallback(() => {\n modalLifecycle.show(id)\n }, [id])\n\n const close = useCallback(() => {\n modalLifecycle.close(id)\n }, [id])\n \n useEffect(() => {\n return () => modalLifecycle.destroy(id)\n }, [])\n\n return {\n show,\n close\n }\n}"],"file":"useModalManager.js"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.useModalRemoteControl = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = require("react");
|
|
7
|
+
|
|
8
|
+
var _ModalGroupManager = require("./ModalGroupManager");
|
|
9
|
+
|
|
10
|
+
const useModalRemoteControl = modalId => {
|
|
11
|
+
const show = (0, _react.useCallback)(() => {
|
|
12
|
+
_ModalGroupManager.modalLifecycle.show(modalId);
|
|
13
|
+
}, [modalId]);
|
|
14
|
+
const close = (0, _react.useCallback)(() => {
|
|
15
|
+
_ModalGroupManager.modalLifecycle.close(modalId);
|
|
16
|
+
}, [modalId]);
|
|
17
|
+
return {
|
|
18
|
+
show,
|
|
19
|
+
close
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.useModalRemoteControl = useModalRemoteControl;
|
|
24
|
+
//# sourceMappingURL=useModalRemoteControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Modal/useModalRemoteControl.ts"],"names":["useModalRemoteControl","modalId","show","modalLifecycle","close"],"mappings":";;;;;AAAA;;AACA;;AASO,MAAMA,qBAAqB,GAAIC,OAAD,IAAqB;AAEtD,QAAMC,IAAI,GAAG,wBAAY,MAAM;AAC3BC,sCAAeD,IAAf,CAAoBD,OAApB;AACH,GAFY,EAEV,CAACA,OAAD,CAFU,CAAb;AAIA,QAAMG,KAAK,GAAG,wBAAY,MAAM;AAC5BD,sCAAeC,KAAf,CAAqBH,OAArB;AACH,GAFa,EAEX,CAACA,OAAD,CAFW,CAAd;AAIA,SAAO;AACHC,IAAAA,IADG;AAEHE,IAAAA;AAFG,GAAP;AAKH,CAfM","sourcesContent":["import { useCallback } from \"react\"\nimport { modalLifecycle } from \"./ModalGroupManager\"\n\n/**\n * Use it to control a specific modal wherever it's.\n * Just provide an id of a specific instance.\n * \n * @param modalId \n * @returns \n */\nexport const useModalRemoteControl = (modalId: string) => {\n\n const show = useCallback(() => {\n modalLifecycle.show(modalId)\n }, [modalId])\n\n const close = useCallback(() => {\n modalLifecycle.close(modalId)\n }, [modalId])\n\n return {\n show,\n close\n }\n\n}"],"file":"useModalRemoteControl.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/Pulse.tsx"],"names":["Pulse","active","width","height","childrenLayout","animatedValue","Animated","Value","current","backgroundColor","position","top","x","left","y","zIndex","overflow","opacity"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/Pulse.tsx"],"names":["Pulse","active","width","height","childrenLayout","animatedValue","Animated","Value","current","backgroundColor","position","top","x","left","y","zIndex","overflow","opacity"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;;;AAGO,MAAMA,KAAK,GAAG,CAAC;AACpBC,EAAAA,MAAM,GAAG,IADW;AAEpBC,EAAAA,KAFoB;AAGpBC,EAAAA,MAHoB;AAIpBC,EAAAA;AAJoB,CAAD,KAKM;AACzB,QAAMC,aAAa,GAAG,mBAAO,IAAIC,sBAASC,KAAb,CAAmB,CAAnB,CAAP,EAA8BC,OAApD;AAEA,wBAAU,MAAM;AACd,mCAAeP,MAAf,EAAuBI,aAAvB;AACD,GAFD,EAEG,CAACJ,MAAD,CAFH;AAIA,SACE,6BAAC,qBAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAEA,KAAK,IAAIE,cAAc,CAACF,KAD1B;AAELC,MAAAA,MAAM,EAAEA,MAAM,IAAIC,cAAc,CAACD,MAF5B;AAGLM,MAAAA,eAAe,EAAE,kBAHZ;AAILC,MAAAA,QAAQ,EAAE,UAJL;AAKLC,MAAAA,GAAG,EAAEP,cAAc,CAACQ,CAAf,IAAoB,CALpB;AAMLC,MAAAA,IAAI,EAAET,cAAc,CAACU,CAAf,IAAoB,CANrB;AAOLC,MAAAA,MAAM,EAAE,CAPH;AAQLC,MAAAA,QAAQ,EAAE,QARL;AASLC,MAAAA,OAAO,EAAEZ;AATJ;AADT,IADF;AAeD,CA3BM","sourcesContent":["import { Animated } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\nimport { pulseAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nexport const Pulse = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n pulseAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <Animated.View\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n backgroundColor: 'rgba(0,0,0,0.05)',\n position: 'absolute',\n top: childrenLayout.x ?? 0,\n left: childrenLayout.y ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n opacity: animatedValue,\n }}\n />\n );\n};\n"],"file":"Pulse.js"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
6
4
|
exports.default = void 0;
|
|
7
5
|
|
|
8
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -54,12 +52,12 @@ const Skeleton = ({
|
|
|
54
52
|
width: width,
|
|
55
53
|
height: height,
|
|
56
54
|
childrenLayout: childrenLayout
|
|
57
|
-
}) : _react.default.createElement(_Pulse.Pulse, {
|
|
55
|
+
}) : _react.default.createElement(_react.default.Fragment, null), active && animation === 'pulse' ? _react.default.createElement(_Pulse.Pulse, {
|
|
58
56
|
active: active,
|
|
59
57
|
width: width,
|
|
60
58
|
height: height,
|
|
61
59
|
childrenLayout: childrenLayout
|
|
62
|
-
}), _react.default.createElement(_reactNative.View, {
|
|
60
|
+
}) : _react.default.createElement(_react.default.Fragment, null), _react.default.createElement(_reactNative.View, {
|
|
63
61
|
onLayout: event => getChildrenLayout(event),
|
|
64
62
|
style: {
|
|
65
63
|
opacity: active ? 0 : 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/Skeleton.tsx"],"names":["Skeleton","children","width","height","radius","active","animation","rest","childrenLayout","setChildrenLayout","y","x","Error","getChildrenLayout","event","nativeEvent","layout","opacity"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/Skeleton.tsx"],"names":["Skeleton","children","width","height","radius","active","animation","rest","childrenLayout","setChildrenLayout","y","x","Error","getChildrenLayout","event","nativeEvent","layout","opacity"],"mappings":";;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAWA,MAAMA,QAAiC,GAAG,CAAC;AACzCC,EAAAA,QADyC;AAEzCC,EAAAA,KAFyC;AAGzCC,EAAAA,MAHyC;AAIzCC,EAAAA,MAJyC;AAKzCC,EAAAA,MAAM,GAAG,IALgC;AAMzCC,EAAAA,SAAS,GAAG,MAN6B;AAOzC,KAAGC;AAPsC,CAAD,KAQpC;AACJ,QAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsC,qBAAyB;AACnEP,IAAAA,KAAK,EAAE,CAD4D;AAEnEC,IAAAA,MAAM,EAAE,CAF2D;AAGnEO,IAAAA,CAAC,EAAE,CAHgE;AAInEC,IAAAA,CAAC,EAAE;AAJgE,GAAzB,CAA5C;;AAOA,MAAI,CAACT,KAAD,IAAU,CAACC,MAAX,IAAqB,CAACF,QAA1B,EAAoC;AAClC,UAAM,IAAIW,KAAJ,CACJ,oEADI,CAAN;AAGD;;AAED,QAAMC,iBAAiB,GAAIC,KAAD,IAA8B;AACtDL,IAAAA,iBAAiB,CAACK,KAAK,CAACC,WAAN,CAAkBC,MAAnB,CAAjB;AACD,GAFD;;AAIA,SACE,6BAAC,eAAD;AAAS,IAAA,KAAK,EAAEd,KAAhB;AAAuB,IAAA,MAAM,EAAEC,MAA/B;AAAuC,IAAA,MAAM,EAAEC;AAA/C,KAA2DG,IAA3D,GACGF,MAAM,IAAIC,SAAS,KAAK,MAAxB,GACC,6BAAC,UAAD;AACE,IAAA,MAAM,EAAED,MADV;AAEE,IAAA,KAAK,EAAEH,KAFT;AAGE,IAAA,MAAM,EAAEC,MAHV;AAIE,IAAA,cAAc,EAAEK;AAJlB,IADD,GAQC,2DATJ,EAYGH,MAAM,IAAIC,SAAS,KAAK,OAAxB,GACC,6BAAC,YAAD;AACE,IAAA,MAAM,EAAED,MADV;AAEE,IAAA,KAAK,EAAEH,KAFT;AAGE,IAAA,MAAM,EAAEC,MAHV;AAIE,IAAA,cAAc,EAAEK;AAJlB,IADD,GAQC,2DApBJ,EAsBE,6BAAC,iBAAD;AACE,IAAA,QAAQ,EAAEM,KAAK,IAAID,iBAAiB,CAACC,KAAD,CADtC;AAEE,IAAA,KAAK,EAAE;AAAEG,MAAAA,OAAO,EAAEZ,MAAM,GAAG,CAAH,GAAO;AAAxB,KAFT;AAGE,IAAA,aAAa,EAAEA,MAAM,GAAG,MAAH,GAAY;AAHnC,KAKGJ,QALH,CAtBF,CADF;AAgCD,CA1DD;;eA4DeD,Q","sourcesContent":["import React, { useState } from 'react';\nimport { BorderRadiusType } from '@tecsinapse/react-core';\nimport { LayoutChangeEvent, View, ViewProps } from 'react-native';\nimport { Wrapper } from './styled';\nimport { Wave } from './Wave';\nimport { Pulse } from './Pulse';\nimport { ChildrenLayout } from './types';\n\nexport interface SkeletonProps extends ViewProps {\n width?: number;\n height?: number;\n radius?: BorderRadiusType;\n active?: boolean;\n animation?: 'wave' | 'pulse';\n}\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n children,\n width,\n height,\n radius,\n active = true,\n animation = 'wave',\n ...rest\n}) => {\n const [childrenLayout, setChildrenLayout] = useState<ChildrenLayout>({\n width: 0,\n height: 0,\n y: 0,\n x: 0,\n });\n\n if (!width && !height && !children) {\n throw new Error(\n '[Skeleton] You should provide children or specify width and height'\n );\n }\n\n const getChildrenLayout = (event: LayoutChangeEvent) => {\n setChildrenLayout(event.nativeEvent.layout);\n };\n\n return (\n <Wrapper width={width} height={height} radius={radius} {...rest}>\n {active && animation === 'wave' ? (\n <Wave\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n\n {active && animation === 'pulse' ? (\n <Pulse\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n <View\n onLayout={event => getChildrenLayout(event)}\n style={{ opacity: active ? 0 : 1 }}\n pointerEvents={active ? 'none' : 'auto'}\n >\n {children}\n </View>\n </Wrapper>\n );\n};\n\nexport default Skeleton;\n"],"file":"Skeleton.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/Wave.tsx"],"names":["AnimatedLinearGradient","Animated","createAnimatedComponent","LinearGradient","Wave","active","width","height","childrenLayout","range","animatedValue","Value","current","translateX","interpolate","inputRange","outputRange","x","y","position","top","left","zIndex","overflow","transform"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/Wave.tsx"],"names":["AnimatedLinearGradient","Animated","createAnimatedComponent","LinearGradient","Wave","active","width","height","childrenLayout","range","animatedValue","Value","current","translateX","interpolate","inputRange","outputRange","x","y","position","top","left","zIndex","overflow","transform"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAGA,MAAMA,sBAAsB,GAAGC,sBAASC,uBAAT,CAAiCC,kCAAjC,CAA/B;;AAEO,MAAMC,IAAI,GAAG,CAAC;AACnBC,EAAAA,MAAM,GAAG,IADU;AAEnBC,EAAAA,KAFmB;AAGnBC,EAAAA,MAHmB;AAInBC,EAA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Animated } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { waveAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nconst AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);\n\nexport const Wave = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const range = width ?? childrenLayout.width;\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const translateX = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [-range, range],\n });\n\n useEffect(() => {\n waveAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <AnimatedLinearGradient\n colors={[\n 'transparent',\n 'rgba(0,0,0,0.05)',\n 'rgba(0,0,0,0.1)',\n 'transparent',\n ]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n position: 'absolute',\n top: childrenLayout.y ?? 0,\n left: childrenLayout.x ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n transform: [\n {\n translateX: translateX,\n },\n ],\n }}\n />\n );\n};\n"],"file":"Wave.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/animation.ts"],"names":["waveAnimation","active","animatedValue","Animated","loop","timing","toValue","duration","easing","Easing","inOut","linear","useNativeDriver","start","pulseAnimation","sequence"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/animation.ts"],"names":["waveAnimation","active","animatedValue","Animated","loop","timing","toValue","duration","easing","Easing","inOut","linear","useNativeDriver","start","pulseAnimation","sequence"],"mappings":";;;;;AAAA;;AAEO,MAAMA,aAAa,GAAG,CAC3BC,MAD2B,EAE3BC,aAF2B,KAGlB;AACT,MAAID,MAAJ,EAAY;AACVE,0BAASC,IAAT,CACED,sBAASE,MAAT,CAAgBH,aAAhB,EAA+B;AAC7BI,MAAAA,OAAO,EAAE,CADoB;AAE7BC,MAAAA,QAAQ,EAAE,IAFmB;AAG7BC,MAAAA,MAAM,EAAEC,oBAAOC,KAAP,CAAaD,oBAAOE,MAApB,CAHqB;AAI7BC,MAAAA,eAAe,EAAE;AAJY,KAA/B,CADF,EAOEC,KAPF;;AAQA;AACD;;AACDV,wBAASE,MAAT,CAAgBH,aAAhB,EAA+B;AAC7BI,IAAAA,OAAO,EAAE,CADoB;AAE7BM,IAAAA,eAAe,EAAE;AAFY,GAA/B,EAGGC,KAHH;AAID,CAnBM;;;;AAqBA,MAAMC,cAAc,GAAG,CAC5Bb,MAD4B,EAE5BC,aAF4B,KAGnB;AACT,MAAID,MAAJ,EAAY;AACVE,0BAASC,IAAT,CACED,sBAASY,QAAT,CAAkB,CAChBZ,sBAASE,MAAT,CAAgBH,aAAhB,EAA+B;AAC7BI,MAAAA,OAAO,EAAE,CADoB;AAE7BC,MAAAA,QAAQ,EAAE,GAFmB;AAG7BK,MAAAA,eAAe,EAAE;AAHY,KAA/B,CADgB,EAMhBT,sBAASE,MAAT,CAAgBH,aAAhB,EAA+B;AAC7BI,MAAAA,OAAO,EAAE,CADoB;AAE7BC,MAAAA,QAAQ,EAAE,GAFmB;AAG7BK,MAAAA,eAAe,EAAE;AAHY,KAA/B,CANgB,CAAlB,CADF,EAaEC,KAbF;;AAcA;AACD;;AACDV,wBAASE,MAAT,CAAgBH,aAAhB,EAA+B;AAC7BI,IAAAA,OAAO,EAAE,CADoB;AAE7BM,IAAAA,eAAe,EAAE;AAFY,GAA/B,EAGGC,KAHH;AAID,CAzBM","sourcesContent":["import { Animated, Easing } from 'react-native';\n\nexport const waveAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 1600,\n easing: Easing.inOut(Easing.linear),\n useNativeDriver: true,\n })\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n\nexport const pulseAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 800,\n useNativeDriver: true,\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: 800,\n useNativeDriver: true,\n }),\n ])\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n"],"file":"animation.js"}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Skeleton", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Skeleton.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "SkeletonProps", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _Skeleton.SkeletonProps;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.SkeletonProps = exports.Skeleton = void 0;
|
|
18
5
|
|
|
19
6
|
var _Skeleton = _interopRequireWildcard(require("./Skeleton"));
|
|
20
7
|
|
|
8
|
+
exports.Skeleton = _Skeleton.default;
|
|
9
|
+
exports.SkeletonProps = _Skeleton.SkeletonProps;
|
|
10
|
+
|
|
21
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
12
|
|
|
23
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Skeleton, SkeletonProps } from './Skeleton';\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/styled.ts"],"names":["Wrapper","styled","View","width","height","theme","radius","borderRadius"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Skeleton/styled.ts"],"names":["Wrapper","styled","View","width","height","theme","radius","borderRadius"],"mappings":";;;;;AAAA;;AACA;;;;AAGO,MAAMA,OAAO,GAAGC,gBAAOC,IAA0C;AACxE,WAAW,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAgBA,KAAK,GAAI,GAAE,2BAAY,GAAEA,KAAM,IAApB,CAAyB,EAA/B,GAAmC,MAAQ;AAC3E,YAAY,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAAiBA,MAAM,GAAI,GAAE,2BAAY,GAAEA,MAAO,IAArB,CAA0B,EAAhC,GAAoC,MAAQ;AAC/E,mBAAmB,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAAD,KACfA,MAAM,GAAGD,KAAK,CAACE,YAAN,CAAmBD,MAAnB,CAAH,GAAgC,CAAE;AAC5C;AACA;AACA,CAPO","sourcesContent":["import styled from '@emotion/native';\nimport { RFValueStr, StyleProps } from '@tecsinapse/react-core';\nimport { SkeletonProps } from './Skeleton';\n\nexport const Wrapper = styled.View<Partial<StyleProps & SkeletonProps>>`\n width: ${({ width }) => (width ? `${RFValueStr(`${width}px`)}` : '100%')};\n height: ${({ height }) => (height ? `${RFValueStr(`${height}px`)}` : 'auto')};\n border-radius: ${({ theme, radius }: StyleProps & Partial<SkeletonProps>) =>\n radius ? theme.borderRadius[radius] : 0};\n overflow: hidden;\n position: relative;\n`;\n"],"file":"styled.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"names":["SnappingSlider","children","showAmount","scrollAmount","spacing","rest","theme","childCount","React","Children","count","screenWidth","Dimensions","get","width","totalSlideWidth","Math","round","horizontalPadding","snapToOffsets","Array","ceil","keys","map","index","offset","padCompensation","sign","child","isFirst","isLast","paddingHorizontal","paddingLeft","paddingRight"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"names":["SnappingSlider","children","showAmount","scrollAmount","spacing","rest","theme","childCount","React","Children","count","screenWidth","Dimensions","get","width","totalSlideWidth","Math","round","horizontalPadding","snapToOffsets","Array","ceil","keys","map","index","offset","padCompensation","sign","child","isFirst","isLast","paddingHorizontal","paddingLeft","paddingRight"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAKA;;;;;;;;AAuBA,MAAMA,cAA6C,GAAG,CAAC;AACrDC,EAAAA,QADqD;AAErDC,EAAAA,UAFqD;AAGrDC,EAAAA,YAHqD;AAIrDC,EAAAA,OAJqD;AAKrD,KAAGC;AALkD,CAAD,KAMhD;AACJ,QAAMC,KAAK,GAAG,uBAAd;AAEA,QAAMC,UAAU,GAAGC,KAAK,CAACC,QAAN,CAAeC,KAAf,CAAqBT,QAArB,CAAnB;;AACA,QAAMU,WAAW,GAAGC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;AACA,QAAMC,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sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"file":"SnappingSlider.js"}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "SnappingSlider", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _SnappingSlider.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "SnappingSliderProps", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _SnappingSlider.SnappingSliderProps;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.SnappingSliderProps = exports.SnappingSlider = void 0;
|
|
18
5
|
|
|
19
6
|
var _SnappingSlider = _interopRequireWildcard(require("./SnappingSlider"));
|
|
20
7
|
|
|
8
|
+
exports.SnappingSlider = _SnappingSlider.default;
|
|
9
|
+
exports.SnappingSliderProps = _SnappingSlider.SnappingSliderProps;
|
|
10
|
+
|
|
21
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
12
|
|
|
23
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/SnappingSlider/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/SnappingSlider/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export {\n default as SnappingSlider,\n SnappingSliderProps,\n} from './SnappingSlider';\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"names":["Tag","value","rest","variant"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"names":["Tag","value","rest","variant"],"mappings":";;;;;AAAA;;AACA;;AAIA;;;;;;AAMA,MAAMA,GAAuB,GAAG,CAAC;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CAAD,KAAqC;AACnE,SACE,6BAAC,cAAD;AACE,IAAA,KAAK,EACH,6BAAC,UAAD;AACE,MAAA,YAAY,EAAC,WADf;AAEE,MAAA,SAAS,EAAC,MAFZ;AAGE,MAAA,SAAS,EAAC,SAHZ;AAIE,MAAA,UAAU,EAAC,MAJb;AAKE,MAAA,UAAU,EAAEA,IAAI,CAACC,OAAL,KAAiB,OAAjB,GAA2B,KAA3B,GAAmC;AALjD,OAOGF,KAPH;AAFJ,KAYMC,IAZN,EADF;AAgBD,CAjBD;;eAmBeF,G","sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"file":"Tag.js"}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Tag", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Tag.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "TagProps", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _Tag.TagProps;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.TagProps = exports.Tag = void 0;
|
|
18
5
|
|
|
19
6
|
var _Tag = _interopRequireWildcard(require("./Tag"));
|
|
20
7
|
|
|
8
|
+
exports.Tag = _Tag.default;
|
|
9
|
+
exports.TagProps = _Tag.TagProps;
|
|
10
|
+
|
|
21
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
12
|
|
|
23
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Tag/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Tag/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Tag, TagProps } from './Tag';\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Text/Text.tsx"],"names":["Text","children","rest"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Text/Text.tsx"],"names":["Text","children","rest"],"mappings":";;;;;AACA;;AACA;;;;AAIA,MAAMA,IAAyB,GAAG,CAAC;AAAEC,EAAAA,QAAF;AAAY,KAAGC;AAAf,CAAD,KAAwC;AACxE,SAAO,6BAAC,wBAAD,EAAsBA,IAAtB,EAA6BD,QAA7B,CAAP;AACD,CAFD;;eAIeD,I","sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"file":"Text.js"}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Text", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Text.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "TextNativeProps", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _Text.TextNativeProps;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.TextNativeProps = exports.Text = void 0;
|
|
18
5
|
|
|
19
6
|
var _Text = _interopRequireWildcard(require("./Text"));
|
|
20
7
|
|
|
8
|
+
exports.Text = _Text.default;
|
|
9
|
+
exports.TextNativeProps = _Text.TextNativeProps;
|
|
10
|
+
|
|
21
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
12
|
|
|
23
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/atoms/Text/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/atoms/Text/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Text, TextNativeProps } from './Text';\n"],"file":"index.js"}
|