@coorpacademy/components 11.9.0 → 11.9.2-alpha.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/es/atom/loader/index.native.d.ts.map +1 -1
- package/es/atom/loader/index.native.js +11 -9
- package/es/atom/loader/index.native.js.map +1 -1
- package/es/atom/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +12 -62
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/index.native.d.ts.map +1 -1
- package/es/atom/review-presentation/index.native.js +7 -2
- package/es/atom/review-presentation/index.native.js.map +1 -1
- package/es/atom/review-presentation/style.css +7 -67
- package/es/atom/tooltip/index.d.ts +22 -0
- package/es/atom/tooltip/index.d.ts.map +1 -0
- package/es/atom/tooltip/index.js +117 -0
- package/es/atom/tooltip/index.js.map +1 -0
- package/es/atom/tooltip/style.css +96 -0
- package/es/template/activity/engine-stars.css +16 -33
- package/es/template/activity/engine-stars.d.ts +15 -17
- package/es/template/activity/engine-stars.d.ts.map +1 -1
- package/es/template/activity/engine-stars.js +128 -115
- package/es/template/activity/engine-stars.js.map +1 -1
- package/es/template/activity/index.d.ts +1 -0
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +18 -9
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/progression-item.js +1 -1
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +1 -0
- package/es/template/activity/stars-summary.d.ts.map +1 -1
- package/es/template/activity/stars-summary.js +10 -5
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/app-review/index.native.d.ts.map +1 -1
- package/es/template/app-review/index.native.js +48 -20
- package/es/template/app-review/index.native.js.map +1 -1
- package/es/template/app-review/skills/index.native.d.ts.map +1 -1
- package/es/template/app-review/skills/index.native.js +26 -5
- package/es/template/app-review/skills/index.native.js.map +1 -1
- package/lib/atom/loader/index.native.d.ts.map +1 -1
- package/lib/atom/loader/index.native.js +11 -9
- package/lib/atom/loader/index.native.js.map +1 -1
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +13 -66
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/index.native.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.native.js +7 -2
- package/lib/atom/review-presentation/index.native.js.map +1 -1
- package/lib/atom/review-presentation/style.css +7 -67
- package/lib/atom/tooltip/index.d.ts +22 -0
- package/lib/atom/tooltip/index.d.ts.map +1 -0
- package/lib/atom/tooltip/index.js +137 -0
- package/lib/atom/tooltip/index.js.map +1 -0
- package/lib/atom/tooltip/style.css +96 -0
- package/lib/template/activity/engine-stars.css +16 -33
- package/lib/template/activity/engine-stars.d.ts +15 -17
- package/lib/template/activity/engine-stars.d.ts.map +1 -1
- package/lib/template/activity/engine-stars.js +135 -116
- package/lib/template/activity/engine-stars.js.map +1 -1
- package/lib/template/activity/index.d.ts +1 -0
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +21 -9
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.js +1 -1
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +1 -0
- package/lib/template/activity/stars-summary.d.ts.map +1 -1
- package/lib/template/activity/stars-summary.js +10 -5
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/app-review/index.native.d.ts.map +1 -1
- package/lib/template/app-review/index.native.js +49 -19
- package/lib/template/app-review/index.native.js.map +1 -1
- package/lib/template/app-review/skills/index.native.d.ts.map +1 -1
- package/lib/template/app-review/skills/index.native.js +30 -7
- package/lib/template/app-review/skills/index.native.js.map +1 -1
- package/locales/en/global.json +1 -0
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/loader/index.native.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA0C,UAAU,EAAC,MAAM,cAAc,CAAC;AAoCjF,oBAAY,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/loader/index.native.tsx"],"names":[],"mappings":";AAEA,OAAO,EAA0C,UAAU,EAAC,MAAM,cAAc,CAAC;AAoCjF,oBAAY,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,uBAsK3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -34,14 +34,17 @@ const Loader = props => {
|
|
|
34
34
|
theme
|
|
35
35
|
} = templateContext;
|
|
36
36
|
const [styleSheet, setStylesheet] = useState(null);
|
|
37
|
-
const [
|
|
37
|
+
const [hidden, setHidden] = useState(false);
|
|
38
38
|
const [minTimeIsSpent, setMinTimeSpent] = useState(false);
|
|
39
39
|
const rotation = useRef(new Animated.Value(0)).current;
|
|
40
40
|
const scale = useRef(new Animated.Value(0)).current;
|
|
41
41
|
const hideAnimation = useAnimateProp({
|
|
42
42
|
property: 'opacity',
|
|
43
43
|
fromValue: 1,
|
|
44
|
-
toValue: 0
|
|
44
|
+
toValue: 0,
|
|
45
|
+
onComplete: () => {
|
|
46
|
+
setHidden(true);
|
|
47
|
+
}
|
|
45
48
|
});
|
|
46
49
|
const {
|
|
47
50
|
height = 60,
|
|
@@ -54,15 +57,10 @@ const Loader = props => {
|
|
|
54
57
|
setStylesheet(_stylesheet);
|
|
55
58
|
}, [theme]);
|
|
56
59
|
useEffect(() => {
|
|
57
|
-
if (readyToHide && minTimeIsSpent) {
|
|
58
|
-
setVisible(false);
|
|
59
|
-
}
|
|
60
|
-
}, [readyToHide, minTimeIsSpent]);
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (!visible) {
|
|
60
|
+
if (readyToHide && minTimeIsSpent && !hidden) {
|
|
63
61
|
hideAnimation.start();
|
|
64
62
|
}
|
|
65
|
-
}, [
|
|
63
|
+
}, [hidden, hideAnimation, readyToHide, minTimeIsSpent]);
|
|
66
64
|
useEffect(() => {
|
|
67
65
|
setTimeout(() => {
|
|
68
66
|
setMinTimeSpent(true);
|
|
@@ -110,6 +108,10 @@ const Loader = props => {
|
|
|
110
108
|
return null;
|
|
111
109
|
}
|
|
112
110
|
|
|
111
|
+
if (hidden) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
|
|
113
115
|
const interpolatedScale = scale.interpolate({
|
|
114
116
|
inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],
|
|
115
117
|
outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["useAnimateProp","React","useEffect","useRef","useState","Animated","StyleSheet","Easing","useTemplateContext","createStyleSheet","theme","create","container","alignItems","justifyContent","dot","position","blue","backgroundColor","colors","cta","red","negative","green","positive","yellow","battle","CYCLE_DURATION","MIN_TIME","Loader","props","templateContext","styleSheet","setStylesheet","visible","setVisible","minTimeIsSpent","setMinTimeSpent","rotation","Value","current","scale","hideAnimation","property","fromValue","toValue","height","color","readyToHide","_stylesheet","start","setTimeout","_animation","parallel","loop","sequence","timing","duration","useNativeDriver","easing","inOut","sin","stop","interpolatedScale","interpolate","inputRange","outputRange","interpolatedRotation","dotWidth","dotTranslate","dotStyle","width","borderRadius","animatedStyle","transform","scaleX","scaleY","rotateZ","translateX"],"sources":["../../../src/atom/loader/index.native.tsx"],"sourcesContent":["import {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Easing, ViewStyle, ColorValue} from 'react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\ntype StyleSheetType = {\n container: ViewStyle;\n dot: ViewStyle;\n blue: ViewStyle;\n red: ViewStyle;\n green: ViewStyle;\n yellow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n dot: {\n position: 'absolute'\n },\n blue: {\n backgroundColor: theme.colors.cta\n },\n red: {\n backgroundColor: theme.colors.negative\n },\n green: {\n backgroundColor: theme.colors.positive\n },\n yellow: {\n backgroundColor: theme.colors.battle\n }\n });\n\nexport type Props = {\n color?: ColorValue;\n height?: number;\n readyToHide: boolean;\n};\n\nconst CYCLE_DURATION = 3000;\nconst MIN_TIME = 1000;\n\nconst Loader = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [visible, setVisible] = useState<boolean>(true);\n const [minTimeIsSpent, setMinTimeSpent] = useState<boolean>(false);\n\n const rotation = useRef<Animated.Value>(new Animated.Value(0)).current;\n const scale = useRef<Animated.Value>(new Animated.Value(0)).current;\n\n const hideAnimation = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0\n });\n\n const {height = 60, color, readyToHide} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n if (readyToHide && minTimeIsSpent) {\n setVisible(false);\n }\n }, [readyToHide, minTimeIsSpent]);\n\n useEffect(() => {\n if (!visible) {\n hideAnimation.start();\n }\n }, [visible, hideAnimation]);\n\n useEffect(() => {\n setTimeout(() => {\n setMinTimeSpent(true);\n }, MIN_TIME);\n\n const _animation = Animated.parallel([\n Animated.loop(\n Animated.sequence([\n Animated.timing(scale, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(scale, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 2,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 3,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n ),\n Animated.loop(\n Animated.sequence([\n Animated.timing(rotation, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(rotation, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n )\n ]);\n\n _animation.start();\n\n return () => {\n _animation.stop();\n };\n // eslint bad warning --> effect only onmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n const interpolatedScale = scale.interpolate({\n inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],\n outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]\n });\n\n const interpolatedRotation = rotation.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg']\n });\n const dotWidth = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [height / 2, height / 6, height / 2]\n });\n const dotTranslate = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [-25 * (height / 60), -35 * (height / 60), -25 * (height / 60)]\n });\n const dotStyle = {\n width: dotWidth,\n height: height / 6,\n borderRadius: height / 12\n };\n\n return (\n <Animated.View style={hideAnimation.animatedStyle}>\n <Animated.View\n style={[\n styleSheet.container,\n {\n height,\n width: height,\n transform: [\n {scaleX: interpolatedScale},\n {scaleY: interpolatedScale},\n {rotateZ: interpolatedRotation}\n ]\n }\n ]}\n >\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.red,\n dotStyle,\n {transform: [{rotateZ: '45deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.green,\n dotStyle,\n {transform: [{rotateZ: '135deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.yellow,\n dotStyle,\n {transform: [{rotateZ: '225deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.blue,\n dotStyle,\n {transform: [{rotateZ: '315deg'}, {translateX: dotTranslate}]}\n ]}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Loader;\n"],"mappings":"AAAA,SAAQA,cAAR,QAA6B,sCAA7B;AACA,OAAOC,KAAP,IAAeC,SAAf,EAA0BC,MAA1B,EAAkCC,QAAlC,QAAiD,OAAjD;AACA,SAAQC,QAAR,EAAkBC,UAAlB,EAA8BC,MAA9B,QAAkE,cAAlE;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;;AAYA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBJ,UAAU,CAACK,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,cAAc,EAAE;EAFP,CADK;EAKhBC,GAAG,EAAE;IACHC,QAAQ,EAAE;EADP,CALW;EAQhBC,IAAI,EAAE;IACJC,eAAe,EAAER,KAAK,CAACS,MAAN,CAAaC;EAD1B,CARU;EAWhBC,GAAG,EAAE;IACHH,eAAe,EAAER,KAAK,CAACS,MAAN,CAAaG;EAD3B,CAXW;EAchBC,KAAK,EAAE;IACLL,eAAe,EAAER,KAAK,CAACS,MAAN,CAAaK;EADzB,CAdS;EAiBhBC,MAAM,EAAE;IACNP,eAAe,EAAER,KAAK,CAACS,MAAN,CAAaO;EADxB;AAjBQ,CAAlB,CADF;;AA6BA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AAC,QAAD,CAAU,IAAV;IACE,KAAK,EAAE,CACLrC,UAAU,CAACjB,GADN,EAELgC,KAAK,GAAG;MAAC7B,eAAe,EAAE6B;IAAlB,CAAH,GAA8Bf,UAAU,CAACT,KAFzC,EAGL+C,QAHK,EAIL;MAACI,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAV,CAAD,EAAsB;QAACC,UAAU,EAAET;MAAb,CAAtB;IAAZ,CAJK;EADT,EAtBF,eA8BE,oBAAC,QAAD,CAAU,IAAV;IACE,KAAK,EAAE,CACLrC,UAAU,CAACjB,GADN,EAELgC,KAAK,GAAG;MAAC7B,eAAe,EAAE6B;IAAlB,CAAH,GAA8Bf,UAAU,CAACP,MAFzC,EAGL6C,QAHK,EAIL;MAACI,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAV,CAAD,EAAsB;QAACC,UAAU,EAAET;MAAb,CAAtB;IAAZ,CAJK;EADT,EA9BF,eAsCE,oBAAC,QAAD,CAAU,IAAV;IACE,KAAK,EAAE,CACLrC,UAAU,CAACjB,GADN,EAELgC,KAAK,GAAG;MAAC7B,eAAe,EAAE6B;IAAlB,CAAH,GAA8Bf,UAAU,CAACf,IAFzC,EAGLqD,QAHK,EAIL;MAACI,SAAS,EAAE,CAAC;QAACG,OAAO,EAAE;MAAV,CAAD,EAAsB;QAACC,UAAU,EAAET;MAAb,CAAtB;IAAZ,CAJK;EADT,EAtCF,CADF,CADF;AAmDD,CArKD;;AAuKA,eAAexC,MAAf"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["useAnimateProp","React","useEffect","useRef","useState","Animated","StyleSheet","Easing","useTemplateContext","createStyleSheet","theme","create","container","alignItems","justifyContent","dot","position","blue","backgroundColor","colors","cta","red","negative","green","positive","yellow","battle","CYCLE_DURATION","MIN_TIME","Loader","props","templateContext","styleSheet","setStylesheet","hidden","setHidden","minTimeIsSpent","setMinTimeSpent","rotation","Value","current","scale","hideAnimation","property","fromValue","toValue","onComplete","height","color","readyToHide","_stylesheet","start","setTimeout","_animation","parallel","loop","sequence","timing","duration","useNativeDriver","easing","inOut","sin","stop","interpolatedScale","interpolate","inputRange","outputRange","interpolatedRotation","dotWidth","dotTranslate","dotStyle","width","borderRadius","animatedStyle","transform","scaleX","scaleY","rotateZ","translateX"],"sources":["../../../src/atom/loader/index.native.tsx"],"sourcesContent":["import {useAnimateProp} from '@coorpacademy/react-native-animation';\nimport React, {useEffect, useRef, useState} from 'react';\nimport {Animated, StyleSheet, Easing, ViewStyle, ColorValue} from 'react-native';\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\n\ntype StyleSheetType = {\n container: ViewStyle;\n dot: ViewStyle;\n blue: ViewStyle;\n red: ViewStyle;\n green: ViewStyle;\n yellow: ViewStyle;\n};\n\nconst createStyleSheet = (theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n dot: {\n position: 'absolute'\n },\n blue: {\n backgroundColor: theme.colors.cta\n },\n red: {\n backgroundColor: theme.colors.negative\n },\n green: {\n backgroundColor: theme.colors.positive\n },\n yellow: {\n backgroundColor: theme.colors.battle\n }\n });\n\nexport type Props = {\n color?: ColorValue;\n height?: number;\n readyToHide: boolean;\n};\n\nconst CYCLE_DURATION = 3000;\nconst MIN_TIME = 1000;\n\nconst Loader = (props: Props) => {\n const templateContext = useTemplateContext();\n const {theme} = templateContext;\n\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const [hidden, setHidden] = useState<boolean>(false);\n const [minTimeIsSpent, setMinTimeSpent] = useState<boolean>(false);\n\n const rotation = useRef<Animated.Value>(new Animated.Value(0)).current;\n const scale = useRef<Animated.Value>(new Animated.Value(0)).current;\n\n const hideAnimation = useAnimateProp({\n property: 'opacity',\n fromValue: 1,\n toValue: 0,\n onComplete: () => {\n setHidden(true);\n }\n });\n\n const {height = 60, color, readyToHide} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme);\n setStylesheet(_stylesheet);\n }, [theme]);\n\n useEffect(() => {\n if (readyToHide && minTimeIsSpent && !hidden) {\n hideAnimation.start();\n }\n }, [hidden, hideAnimation, readyToHide, minTimeIsSpent]);\n\n useEffect(() => {\n setTimeout(() => {\n setMinTimeSpent(true);\n }, MIN_TIME);\n\n const _animation = Animated.parallel([\n Animated.loop(\n Animated.sequence([\n Animated.timing(scale, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(scale, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 2,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n }),\n Animated.timing(scale, {\n toValue: 3,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n ),\n Animated.loop(\n Animated.sequence([\n Animated.timing(rotation, {toValue: 0, duration: 0, useNativeDriver: false}),\n Animated.timing(rotation, {\n toValue: 1,\n duration: CYCLE_DURATION,\n useNativeDriver: false,\n easing: Easing.inOut(Easing.sin)\n })\n ])\n )\n ]);\n\n _animation.start();\n\n return () => {\n _animation.stop();\n };\n // eslint bad warning --> effect only onmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!styleSheet) {\n return null;\n }\n\n if (hidden) {\n return null;\n }\n\n const interpolatedScale = scale.interpolate({\n inputRange: [0, 0.45, 1, 1.32, 1.5, 2, 2.3, 2.64, 3],\n outputRange: [0.5, 0.2, 0.5, 0.5, 0.8, 0.5, 0.5, 0.3, 0.5]\n });\n\n const interpolatedRotation = rotation.interpolate({\n inputRange: [0, 1],\n outputRange: ['0deg', '360deg']\n });\n const dotWidth = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [height / 2, height / 6, height / 2]\n });\n const dotTranslate = rotation.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [-25 * (height / 60), -35 * (height / 60), -25 * (height / 60)]\n });\n const dotStyle = {\n width: dotWidth,\n height: height / 6,\n borderRadius: height / 12\n };\n\n return (\n <Animated.View style={hideAnimation.animatedStyle}>\n <Animated.View\n style={[\n styleSheet.container,\n {\n height,\n width: height,\n transform: [\n {scaleX: interpolatedScale},\n {scaleY: interpolatedScale},\n {rotateZ: interpolatedRotation}\n ]\n }\n ]}\n >\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.red,\n dotStyle,\n {transform: [{rotateZ: '45deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.green,\n dotStyle,\n {transform: [{rotateZ: '135deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.yellow,\n dotStyle,\n {transform: [{rotateZ: '225deg'}, {translateX: dotTranslate}]}\n ]}\n />\n <Animated.View\n style={[\n styleSheet.dot,\n color ? {backgroundColor: color} : styleSheet.blue,\n dotStyle,\n {transform: [{rotateZ: '315deg'}, {translateX: dotTranslate}]}\n ]}\n />\n </Animated.View>\n </Animated.View>\n );\n};\n\nexport default Loader;\n"],"mappings":"AAAA,SAAQA,cAAR,QAA6B,sCAA7B;AACA,OAAOC,KAAP,IAAeC,SAAf,EAA0BC,MAA1B,EAAkCC,QAAlC,QAAiD,OAAjD;AACA,SAAQC,QAAR,EAAkBC,UAAlB,EAA8BC,MAA9B,QAAkE,cAAlE;AACA,SAAQC,kBAAR,QAAiC,4CAAjC;;AAYA,MAAMC,gBAAgB,GAAIC,KAAD,IACvBJ,UAAU,CAACK,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,UAAU,EAAE,QADH;IAETC,cAAc,EAAE;EAFP,CADK;EAKhBC,GAAG,EAAE;IACHC,QAAQ,EAAE;EADP,CALW;EAQhBC,IAAI,EAAE;IACJC,eAAe,EAAER,KAAK,CAACS,M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
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AA+CA,6DA+BC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React, { useState, useCallback } from 'react';
|
|
1
|
+
import React from 'react';
|
|
4
2
|
import PropTypes from 'prop-types';
|
|
5
3
|
import getOr from 'lodash/fp/getOr';
|
|
6
4
|
import map from 'lodash/fp/map';
|
|
7
|
-
import { NovaSolidStatusCheckCircle2 as CheckIcon, NovaSolidVoteRewardsVoteHeart as HeartIcon,
|
|
5
|
+
import { NovaSolidStatusCheckCircle2 as CheckIcon, NovaSolidVoteRewardsVoteHeart as HeartIcon, NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon, NovaLineSelectionCursorsCursorArrowTarget as TargetIcon } from '@coorpacademy/nova-icons';
|
|
6
|
+
import ToolTip from '../tooltip';
|
|
8
7
|
import style from './style.css';
|
|
9
8
|
import propTypes from './prop-types';
|
|
10
9
|
const ICONS = {
|
|
@@ -31,50 +30,6 @@ const ReviewIcon = ({
|
|
|
31
30
|
});
|
|
32
31
|
};
|
|
33
32
|
|
|
34
|
-
const ToolTip = ({
|
|
35
|
-
tooltipText,
|
|
36
|
-
'aria-label': moreDetailsAriaLabel,
|
|
37
|
-
'data-testid': dataTestId,
|
|
38
|
-
closeToolTipInformationTextAriaLabel
|
|
39
|
-
}) => {
|
|
40
|
-
const [toolTipIsVisible, setToolTipIsVisible] = useState(false);
|
|
41
|
-
const handleKeyPress = useCallback(event => {
|
|
42
|
-
if (event.key === 'Enter') {
|
|
43
|
-
setToolTipIsVisible(!toolTipIsVisible);
|
|
44
|
-
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
45
|
-
setToolTipIsVisible(false);
|
|
46
|
-
}
|
|
47
|
-
}, [setToolTipIsVisible, toolTipIsVisible]);
|
|
48
|
-
const handleMouseOver = useCallback(() => {
|
|
49
|
-
setToolTipIsVisible(true);
|
|
50
|
-
}, [setToolTipIsVisible]);
|
|
51
|
-
const handleMouseLeave = useCallback(() => {
|
|
52
|
-
setToolTipIsVisible(false);
|
|
53
|
-
}, [setToolTipIsVisible]);
|
|
54
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: style.tooltipContainer,
|
|
56
|
-
onMouseLeave: handleMouseLeave,
|
|
57
|
-
onMouseOver: handleMouseOver
|
|
58
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
59
|
-
type: "button",
|
|
60
|
-
className: style.tooltipIconContainer,
|
|
61
|
-
"data-testid": dataTestId,
|
|
62
|
-
onKeyDown: handleKeyPress,
|
|
63
|
-
tabIndex: 0
|
|
64
|
-
}, /*#__PURE__*/React.createElement(InformationIcon, {
|
|
65
|
-
className: style.informationIcon,
|
|
66
|
-
width: 12,
|
|
67
|
-
height: 12,
|
|
68
|
-
"aria-label": moreDetailsAriaLabel
|
|
69
|
-
})), toolTipIsVisible ? /*#__PURE__*/React.createElement("div", {
|
|
70
|
-
className: style.toolTip,
|
|
71
|
-
"data-testid": "review-presentation-tooltip",
|
|
72
|
-
"aria-label": closeToolTipInformationTextAriaLabel
|
|
73
|
-
}, /*#__PURE__*/React.createElement("p", {
|
|
74
|
-
className: style.tooltipText
|
|
75
|
-
}, tooltipText)) : null);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
33
|
const ReviewListItemWrapper = ({
|
|
79
34
|
iconKey,
|
|
80
35
|
label
|
|
@@ -89,10 +44,10 @@ const ReviewListItemWrapper = ({
|
|
|
89
44
|
}, /*#__PURE__*/React.createElement(ReviewIcon, {
|
|
90
45
|
icon: iconKey
|
|
91
46
|
}), " ", label.text), /*#__PURE__*/React.createElement(ToolTip, {
|
|
92
|
-
|
|
93
|
-
"aria-label": label.moreDetailsAriaLabel,
|
|
47
|
+
TooltipContent: label.tooltipText,
|
|
94
48
|
closeToolTipInformationTextAriaLabel: label.closeToolTipInformationTextAriaLabel,
|
|
95
|
-
"data-testid": `review-list-item-tooltip-button-${iconKey}
|
|
49
|
+
"data-testid": `review-list-item-tooltip-button-${iconKey}`,
|
|
50
|
+
"aria-label": label.moreDetailsAriaLabel
|
|
96
51
|
}));
|
|
97
52
|
};
|
|
98
53
|
|
|
@@ -135,23 +90,18 @@ const ReviewPresentation = props => {
|
|
|
135
90
|
}, labelsList)));
|
|
136
91
|
};
|
|
137
92
|
|
|
138
|
-
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
139
|
-
tooltipText: PropTypes.string,
|
|
140
|
-
'aria-label': PropTypes.string,
|
|
141
|
-
'data-testid': PropTypes.string,
|
|
142
|
-
closeToolTipInformationTextAriaLabel: PropTypes.string
|
|
143
|
-
} : {};
|
|
144
93
|
ReviewIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
145
94
|
icon: PropTypes.string
|
|
146
95
|
} : {};
|
|
147
|
-
ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ?
|
|
96
|
+
ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
148
97
|
iconKey: PropTypes.string,
|
|
149
98
|
label: PropTypes.shape({
|
|
150
|
-
tooltipText:
|
|
151
|
-
moreDetailsAriaLabel:
|
|
152
|
-
closeToolTipInformationTextAriaLabel:
|
|
99
|
+
tooltipText: ToolTip.propTypes.tooltipText,
|
|
100
|
+
moreDetailsAriaLabel: ToolTip.propTypes['aria-label'],
|
|
101
|
+
closeToolTipInformationTextAriaLabel: ToolTip.propTypes.closeToolTipInformationTextAriaLabel,
|
|
102
|
+
text: PropTypes.string
|
|
153
103
|
})
|
|
154
|
-
}
|
|
104
|
+
} : {};
|
|
155
105
|
ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
156
106
|
export default ReviewPresentation;
|
|
157
107
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","ToolTip","style","propTypes","ICONS","skills","questions","lifes","allright","ReviewIcon","icon","Icon","labelIcon","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","reviewListText","text","tooltipText","closeToolTipInformationTextAriaLabel","moreDetailsAriaLabel","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","convert","cap","key","reviewList","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip from '../tooltip';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst ReviewIcon = ({icon}) => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n TooltipContent={label.tooltipText}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n aria-label={label.moreDetailsAriaLabel}\n />\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: ToolTip.propTypes.tooltipText,\n moreDetailsAriaLabel: ToolTip.propTypes['aria-label'],\n closeToolTipInformationTextAriaLabel: ToolTip.propTypes.closeToolTipInformationTextAriaLabel,\n text: PropTypes.string\n })\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,6BAA6B,IAAIC,SAFnC,EAGEC,+CAA+C,IAAIC,YAHrD,EAIEC,yCAAyC,IAAIC,UAJ/C,QAKO,0BALP;AAMA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;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","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.native.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAC,eAAe,EAAW,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.native.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAC,eAAe,EAAW,MAAM,cAAc,CAAC;AAwGvD,QAAA,MAAM,UAAU,UAAW,eAAe,uBA+CzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -23,6 +23,9 @@ const createStyleSheet = (brandTheme, theme) => StyleSheet.create({
|
|
|
23
23
|
color: theme.colors.text.primary,
|
|
24
24
|
marginBottom: 32
|
|
25
25
|
},
|
|
26
|
+
textContainer: {
|
|
27
|
+
marginTop: 8
|
|
28
|
+
},
|
|
26
29
|
text: {
|
|
27
30
|
fontSize: theme.fontSize.large,
|
|
28
31
|
color: theme.colors.text.primary,
|
|
@@ -125,9 +128,11 @@ const Onboarding = props => {
|
|
|
125
128
|
style: styleSheet.container
|
|
126
129
|
}, /*#__PURE__*/React.createElement(Html, {
|
|
127
130
|
style: styleSheet.title
|
|
128
|
-
}, translations.appReview.presentation.title), /*#__PURE__*/React.createElement(
|
|
131
|
+
}, translations.appReview.presentation.title), /*#__PURE__*/React.createElement(View, {
|
|
132
|
+
style: styleSheet.textContainer
|
|
133
|
+
}, /*#__PURE__*/React.createElement(Html, {
|
|
129
134
|
style: styleSheet.text
|
|
130
|
-
}, translations.appReview.presentation.text), /*#__PURE__*/React.createElement(View, {
|
|
135
|
+
}, translations.appReview.presentation.text)), /*#__PURE__*/React.createElement(View, {
|
|
131
136
|
style: styleSheet.tips
|
|
132
137
|
}, /*#__PURE__*/React.createElement(Tip, {
|
|
133
138
|
Icon: TargetIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","View","StyleSheet","Text","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionMarkIcon","NovaSolidStatusCheckCircle2","CheckCircle2Icon","NovaCompositionCoorpacademyVoteHeartOutline","HeartIcon","useTemplateContext","Touchable","Html","createStyleSheet","brandTheme","theme","create","container","backgroundColor","colors","white","justifyContent","flex","padding","paddingTop","paddingBottom","title","height","width","fontSize","xxlarge","fontWeight","bold","lineHeight","color","text","primary","marginBottom","large","opacity","tips","marginTop","tip","flexDirection","overflow","alignItems","borderRadius","gray","extra","spacing","micro","tipText","icon","margin","button","cta","buttonText","alignSelf","Tip","props","templateContext","styleSheet","setStylesheet","Icon","_stylesheet","Onboarding","translations","onPress","appReview","presentation","labelList","skills","questions","lifes","allright","ok"],"sources":["../../../src/atom/review-presentation/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {View, StyleSheet, Text, ViewStyle, TextStyle} from 'react-native';\nimport {\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionMarkIcon,\n NovaSolidStatusCheckCircle2 as CheckCircle2Icon,\n NovaCompositionCoorpacademyVoteHeartOutline as HeartIcon\n} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport Html from '../html/index.native';\nimport {Brand} from '../../variables/brand.native';\nimport {OnboardingProps, TipProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n title: TextStyle;\n text: TextStyle;\n tips: ViewStyle;\n tip: ViewStyle;\n tipText: TextStyle;\n icon: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n backgroundColor: theme.colors.white,\n justifyContent: 'space-between',\n flex: 1,\n padding: 20,\n paddingTop: 20,\n paddingBottom: 100\n },\n title: {\n height: 72,\n width: 268,\n fontSize: theme.fontSize.xxlarge,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 36,\n color: theme.colors.text.primary,\n marginBottom: 32\n },\n text: {\n fontSize: theme.fontSize.large,\n color: theme.colors.text.primary,\n opacity: 0.7\n },\n tips: {\n marginTop: 32,\n height: 230,\n justifyContent: 'center'\n },\n tip: {\n flexDirection: 'row',\n overflow: 'hidden',\n alignItems: 'center',\n height: 54,\n borderRadius: 8,\n backgroundColor: theme.colors.gray.extra,\n marginTop: theme.spacing.micro,\n marginBottom: theme.spacing.micro\n },\n tipText: {\n fontSize: 16,\n lineHeight: 22,\n color: theme.colors.text.primary\n },\n icon: {\n margin: 10\n },\n button: {\n height: 52,\n borderRadius: 7,\n marginBottom: 32,\n marginTop: 16,\n backgroundColor: brandTheme?.colors?.primary || theme.colors.cta,\n justifyContent: 'center'\n },\n buttonText: {\n alignSelf: 'center',\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.large,\n color: '#fff'\n }\n });\n\nconst Tip = (props: TipProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme} = templateContext;\n const {Icon, text} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.tip}>\n <Icon height={16} width={16} style={styleSheet.icon} color={theme.colors.text.primary} />\n <Text style={styleSheet.tipText}>{text}</Text>\n </View>\n );\n};\n\nconst Onboarding = (props: OnboardingProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme, translations} = templateContext;\n const {onPress} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n // ------------------------------------\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.container}>\n <Html style={styleSheet.title}>{translations.appReview.presentation.title}</Html>\n <Html style={styleSheet.text}>{translations.appReview.presentation.text}</Html>\n\n <View style={styleSheet.tips}>\n <Tip Icon={TargetIcon} text={translations.appReview.presentation.labelList.skills.text} />\n <Tip\n Icon={QuestionMarkIcon}\n text={translations.appReview.presentation.labelList.questions.text}\n />\n <Tip Icon={HeartIcon} text={translations.appReview.presentation.labelList.lifes.text} />\n <Tip\n Icon={CheckCircle2Icon}\n text={translations.appReview.presentation.labelList.allright.text}\n />\n </View>\n <Touchable\n testID=\"button-quit-revision-onboarding\"\n onPress={onPress}\n analyticsID=\"button-start\"\n style={styleSheet.button}\n >\n <Text style={styleSheet.buttonText}>{translations.ok}</Text>\n </Touchable>\n </View>\n );\n};\n\nexport default Onboarding;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,IAA1B,QAA2D,cAA3D;AACA,SACEC,yCAAyC,IAAIC,UAD/C,EAEEC,+CAA+C,IAAIC,gBAFrD,EAGEC,2BAA2B,IAAIC,gBAHjC,EAIEC,2CAA2C,IAAIC,SAJjD,QAKO,0BALP;AAOA,SAAQC,kBAAR,QAAiC,4CAAjC;AAEA,OAAOC,SAAP,MAAsB,kCAAtB;AACA,OAAOC,IAAP,MAAiB,sBAAjB;;AAgBA,MAAMC,gBAAgB,GAAG,CAACC,UAAD,EAAoBC,KAApB,KACvBf,UAAU,CAACgB,MAAX,CAAkB;EAChBC,SAAS,EAAE;IACTC,eAAe,EAAEH,KAAK,CAACI,MAAN,CAAaC,KADrB;IAETC,cAAc,EAAE,eAFP;IAGTC,IAAI,EAAE,CAHG;IAITC,OAAO,EAAE,EAJA;IAKTC,UAAU,EAAE,EALH;IAMTC,aAAa,EAAE;EANN,CADK;EAShBC,KAAK,EAAE;IACLC,MAAM,EAAE,EADH;IAELC,KAAK,EAAE,GAFF;I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tC;EAAhF,EANF,eAOE,oBAAC,GAAD;IACE,IAAI,EAAE5B,gBADR;IAEE,IAAI,EAAE2D,YAAY,CAACE,SAAb,CAAuBC,YAAvB,CAAoCC,SAApC,CAA8CI,QAA9C,CAAuDvC;EAF/D,EAPF,CAJF,eAgBE,oBAAC,SAAD;IACE,MAAM,EAAC,iCADT;IAEE,OAAO,EAAEgC,OAFX;IAGE,WAAW,EAAC,cAHd;IAIE,KAAK,EAAEN,UAAU,CAACP;EAJpB,gBAME,oBAAC,IAAD;IAAM,KAAK,EAAEO,UAAU,CAACL;EAAxB,GAAqCU,YAAY,CAACS,EAAlD,CANF,CAhBF,CADF;AA2BD,CA5CD;;AA8CA,eAAeV,UAAf"}
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["React","useState","useEffect","View","StyleSheet","Text","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionMarkIcon","NovaSolidStatusCheckCircle2","CheckCircle2Icon","NovaCompositionCoorpacademyVoteHeartOutline","HeartIcon","useTemplateContext","Touchable","Html","createStyleSheet","brandTheme","theme","create","container","backgroundColor","colors","white","justifyContent","flex","padding","paddingTop","paddingBottom","title","height","width","fontSize","xxlarge","fontWeight","bold","lineHeight","color","text","primary","marginBottom","textContainer","marginTop","large","opacity","tips","tip","flexDirection","overflow","alignItems","borderRadius","gray","extra","spacing","micro","tipText","icon","margin","button","cta","buttonText","alignSelf","Tip","props","templateContext","styleSheet","setStylesheet","Icon","_stylesheet","Onboarding","translations","onPress","appReview","presentation","labelList","skills","questions","lifes","allright","ok"],"sources":["../../../src/atom/review-presentation/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {View, StyleSheet, Text, ViewStyle, TextStyle} from 'react-native';\nimport {\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionMarkIcon,\n NovaSolidStatusCheckCircle2 as CheckCircle2Icon,\n NovaCompositionCoorpacademyVoteHeartOutline as HeartIcon\n} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport {Theme} from '../../variables/theme.native';\nimport Touchable from '../../hoc/touchable/index.native';\nimport Html from '../html/index.native';\nimport {Brand} from '../../variables/brand.native';\nimport {OnboardingProps, TipProps} from './prop-types';\n\ntype StyleSheetType = {\n container: ViewStyle;\n title: TextStyle;\n text: TextStyle;\n textContainer: ViewStyle;\n tips: ViewStyle;\n tip: ViewStyle;\n tipText: TextStyle;\n icon: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n};\n\nconst createStyleSheet = (brandTheme: Brand, theme: Theme): StyleSheetType =>\n StyleSheet.create({\n container: {\n backgroundColor: theme.colors.white,\n justifyContent: 'space-between',\n flex: 1,\n padding: 20,\n paddingTop: 20,\n paddingBottom: 100\n },\n title: {\n height: 72,\n width: 268,\n fontSize: theme.fontSize.xxlarge,\n fontWeight: theme.fontWeight.bold,\n lineHeight: 36,\n color: theme.colors.text.primary,\n marginBottom: 32\n },\n textContainer: {\n marginTop: 8\n },\n text: {\n fontSize: theme.fontSize.large,\n color: theme.colors.text.primary,\n opacity: 0.7\n },\n tips: {\n marginTop: 32,\n height: 230,\n justifyContent: 'center'\n },\n tip: {\n flexDirection: 'row',\n overflow: 'hidden',\n alignItems: 'center',\n height: 54,\n borderRadius: 8,\n backgroundColor: theme.colors.gray.extra,\n marginTop: theme.spacing.micro,\n marginBottom: theme.spacing.micro\n },\n tipText: {\n fontSize: 16,\n lineHeight: 22,\n color: theme.colors.text.primary\n },\n icon: {\n margin: 10\n },\n button: {\n height: 52,\n borderRadius: 7,\n marginBottom: 32,\n marginTop: 16,\n backgroundColor: brandTheme?.colors?.primary || theme.colors.cta,\n justifyContent: 'center'\n },\n buttonText: {\n alignSelf: 'center',\n fontWeight: theme.fontWeight.bold,\n fontSize: theme.fontSize.large,\n color: '#fff'\n }\n });\n\nconst Tip = (props: TipProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme} = templateContext;\n const {Icon, text} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.tip}>\n <Icon height={16} width={16} style={styleSheet.icon} color={theme.colors.text.primary} />\n <Text style={styleSheet.tipText}>{text}</Text>\n </View>\n );\n};\n\nconst Onboarding = (props: OnboardingProps) => {\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {brandTheme, theme, translations} = templateContext;\n const {onPress} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(brandTheme, theme);\n setStylesheet(_stylesheet);\n }, [brandTheme, theme]);\n\n // ------------------------------------\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <View style={styleSheet.container}>\n <Html style={styleSheet.title}>{translations.appReview.presentation.title}</Html>\n\n <View style={styleSheet.textContainer}>\n <Html style={styleSheet.text}>{translations.appReview.presentation.text}</Html>\n </View>\n\n <View style={styleSheet.tips}>\n <Tip Icon={TargetIcon} text={translations.appReview.presentation.labelList.skills.text} />\n <Tip\n Icon={QuestionMarkIcon}\n text={translations.appReview.presentation.labelList.questions.text}\n />\n <Tip Icon={HeartIcon} text={translations.appReview.presentation.labelList.lifes.text} />\n <Tip\n Icon={CheckCircle2Icon}\n text={translations.appReview.presentation.labelList.allright.text}\n />\n </View>\n <Touchable\n testID=\"button-quit-revision-onboarding\"\n onPress={onPress}\n analyticsID=\"button-start\"\n style={styleSheet.button}\n >\n <Text style={styleSheet.buttonText}>{translations.ok}</Text>\n </Touchable>\n </View>\n );\n};\n\nexport default Onboarding;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SAAQC,IAAR,EAAcC,UAAd,EAA0BC,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akpoints;
|
|
4
4
|
@value colors: "../../variables/colors.css";
|
|
5
5
|
@value xtraLightGrey from colors;
|
|
6
|
-
@value cm_blue_900 from colors;
|
|
7
6
|
@value cm_grey_75 from colors;
|
|
8
|
-
@value cm_grey_500 from colors;
|
|
9
|
-
@value cm_grey_700 from colors;
|
|
10
|
-
@value white from colors;
|
|
11
7
|
|
|
8
|
+
.reviewWrapper {
|
|
9
|
+
width: 100%;
|
|
10
|
+
border-radius: 16px;
|
|
11
|
+
background-color: xtraLightGrey;
|
|
12
|
+
padding-bottom: 40px;
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
.textBase {
|
|
14
16
|
font-family: "Gilroy";
|
|
@@ -17,13 +19,6 @@
|
|
|
17
19
|
user-select: none;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
.reviewWrapper {
|
|
21
|
-
width: 100%;
|
|
22
|
-
border-radius: 16px;
|
|
23
|
-
background-color: xtraLightGrey;
|
|
24
|
-
padding-bottom: 40px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
22
|
.reviewTitle {
|
|
28
23
|
composes: textBase;
|
|
29
24
|
font-weight: 700;
|
|
@@ -77,61 +72,6 @@
|
|
|
77
72
|
width: 16px;
|
|
78
73
|
}
|
|
79
74
|
|
|
80
|
-
.informationIcon {
|
|
81
|
-
color: cm_grey_500;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.toolTip {
|
|
85
|
-
transition: opacity 0.8s;
|
|
86
|
-
position: absolute;
|
|
87
|
-
height: auto;
|
|
88
|
-
width: 200px;
|
|
89
|
-
border-radius: 7px;
|
|
90
|
-
background-color: cm_grey_700;
|
|
91
|
-
right: -81px;
|
|
92
|
-
bottom: 32px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.toolTip::before {
|
|
96
|
-
content: '';
|
|
97
|
-
display: inline-block;
|
|
98
|
-
visibility: inherit;
|
|
99
|
-
opacity: inherit;
|
|
100
|
-
width: 15px;
|
|
101
|
-
height: 15px;
|
|
102
|
-
transform: rotate(-45deg);
|
|
103
|
-
background-color: cm_grey_700;
|
|
104
|
-
position: inherit;
|
|
105
|
-
bottom: -5px;
|
|
106
|
-
right: 40%;
|
|
107
|
-
border-radius: 2px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.tooltipText {
|
|
111
|
-
composes: textBase;
|
|
112
|
-
font-weight: 500;
|
|
113
|
-
font-size: 14px;
|
|
114
|
-
display: inline-block;
|
|
115
|
-
border-radius: 3px;
|
|
116
|
-
word-wrap: break-word;
|
|
117
|
-
color: white;
|
|
118
|
-
padding: 8px 14px;
|
|
119
|
-
text-align: center;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.tooltipContainer {
|
|
123
|
-
overflow: visible;
|
|
124
|
-
position: relative;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.tooltipIconContainer {
|
|
128
|
-
display: flex;
|
|
129
|
-
justify-content: flex-end;
|
|
130
|
-
border: none;
|
|
131
|
-
background: cm_grey_75;
|
|
132
|
-
height: 25px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
75
|
@media tablet {
|
|
136
76
|
.reviewWrapper{
|
|
137
77
|
width: 100%;
|
|
@@ -142,4 +82,4 @@
|
|
|
142
82
|
.reviewWrapper{
|
|
143
83
|
width: 100%;
|
|
144
84
|
}
|
|
145
|
-
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function toggleStateOnKeyPress(state: any, setState: any, ref: any): (event: any) => void;
|
|
2
|
+
export default ToolTip;
|
|
3
|
+
declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "data-testid": dataTestId, closeToolTipInformationTextAriaLabel, toolTipIsVisible: _toolTipIsVisible }: {
|
|
4
|
+
anchorId: any;
|
|
5
|
+
TooltipContent: any;
|
|
6
|
+
"aria-label": any;
|
|
7
|
+
"data-testid": any;
|
|
8
|
+
closeToolTipInformationTextAriaLabel: any;
|
|
9
|
+
toolTipIsVisible: any;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
declare namespace ToolTip {
|
|
12
|
+
const propTypes: {
|
|
13
|
+
TooltipContent: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
|
|
14
|
+
'data-testid': PropTypes.Requireable<string>;
|
|
15
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
16
|
+
closeToolTipInformationTextAriaLabel: PropTypes.Validator<string>;
|
|
17
|
+
anchorId: PropTypes.Requireable<string>;
|
|
18
|
+
toolTipIsVisible: PropTypes.Requireable<boolean>;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
import PropTypes from "prop-types";
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AA+CO,iGASN;;AAED;;;;;;;gBA2EC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React, { isValidElement, useState, useCallback, useMemo } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import ReactTooltip from 'react-tooltip';
|
|
4
|
+
import isString from 'lodash/fp/isString';
|
|
5
|
+
import { NovaCompositionCoorpacademyInformationIcon as InformationIcon } from '@coorpacademy/nova-icons';
|
|
6
|
+
import style from './style.css';
|
|
7
|
+
|
|
8
|
+
const ToolTipWrapper = ({
|
|
9
|
+
toolTipIsVisible,
|
|
10
|
+
anchorId,
|
|
11
|
+
closeToolTipInformationTextAriaLabel,
|
|
12
|
+
content
|
|
13
|
+
}) => {
|
|
14
|
+
if (!toolTipIsVisible) return null;
|
|
15
|
+
|
|
16
|
+
if (anchorId) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(ReactTooltip, {
|
|
18
|
+
id: anchorId,
|
|
19
|
+
className: style.toolTipReact,
|
|
20
|
+
"data-event-off": "click",
|
|
21
|
+
place: "left",
|
|
22
|
+
effect: "solid",
|
|
23
|
+
"aria-label": closeToolTipInformationTextAriaLabel
|
|
24
|
+
}, content);
|
|
25
|
+
} else {
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: style.toolTip,
|
|
28
|
+
"data-testid": "tooltip",
|
|
29
|
+
"aria-label": closeToolTipInformationTextAriaLabel
|
|
30
|
+
}, content);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
ToolTipWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
35
|
+
toolTipIsVisible: PropTypes.bool,
|
|
36
|
+
anchorId: PropTypes.string,
|
|
37
|
+
closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,
|
|
38
|
+
content: PropTypes.node
|
|
39
|
+
} : {};
|
|
40
|
+
export const toggleStateOnKeyPress = (state, setState, ref) => event => {
|
|
41
|
+
if (event.key === 'Enter') {
|
|
42
|
+
if (ref) ref.current.focus();
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
setState(!state);
|
|
46
|
+
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
47
|
+
setState(false);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const ToolTip = ({
|
|
52
|
+
anchorId,
|
|
53
|
+
TooltipContent,
|
|
54
|
+
'aria-label': ariaLabel,
|
|
55
|
+
'data-testid': dataTestId,
|
|
56
|
+
closeToolTipInformationTextAriaLabel,
|
|
57
|
+
toolTipIsVisible: _toolTipIsVisible
|
|
58
|
+
}) => {
|
|
59
|
+
const isComponent = useMemo(() => !isString(TooltipContent) && /*#__PURE__*/isValidElement(TooltipContent()), [TooltipContent]);
|
|
60
|
+
const [toolTipIsVisible, setToolTipIsVisible] = useState(false);
|
|
61
|
+
const handleKeyPress = useCallback(event => {
|
|
62
|
+
toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);
|
|
63
|
+
}, [toolTipIsVisible]);
|
|
64
|
+
const handleMouseOver = useCallback(() => {
|
|
65
|
+
setToolTipIsVisible(true);
|
|
66
|
+
}, []);
|
|
67
|
+
const handleMouseLeave = useCallback(() => {
|
|
68
|
+
setToolTipIsVisible(false);
|
|
69
|
+
}, []);
|
|
70
|
+
const content = useMemo(() => {
|
|
71
|
+
return isComponent ? /*#__PURE__*/React.createElement(TooltipContent, null) : /*#__PURE__*/React.createElement("p", {
|
|
72
|
+
className: style.tooltipContent
|
|
73
|
+
}, TooltipContent);
|
|
74
|
+
}, [TooltipContent, isComponent]);
|
|
75
|
+
return anchorId ? /*#__PURE__*/React.createElement(ToolTipWrapper, {
|
|
76
|
+
toolTipIsVisible: _toolTipIsVisible,
|
|
77
|
+
anchorId: anchorId,
|
|
78
|
+
closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
|
|
79
|
+
content: content,
|
|
80
|
+
onMouseLeave: handleMouseLeave,
|
|
81
|
+
onMouseOver: handleMouseOver
|
|
82
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: style.tooltipContainer,
|
|
84
|
+
onMouseLeave: handleMouseLeave,
|
|
85
|
+
onMouseOver: handleMouseOver
|
|
86
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
87
|
+
type: "button",
|
|
88
|
+
className: style.tooltipIconContainer,
|
|
89
|
+
"data-testid": dataTestId,
|
|
90
|
+
onKeyDown: handleKeyPress,
|
|
91
|
+
tabIndex: 0
|
|
92
|
+
}, /*#__PURE__*/React.createElement(InformationIcon, {
|
|
93
|
+
className: style.informationIcon,
|
|
94
|
+
width: 12,
|
|
95
|
+
height: 12,
|
|
96
|
+
"aria-label": ariaLabel
|
|
97
|
+
})), /*#__PURE__*/React.createElement(ToolTipWrapper, {
|
|
98
|
+
toolTipIsVisible: toolTipIsVisible,
|
|
99
|
+
anchorId: anchorId,
|
|
100
|
+
closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
|
|
101
|
+
content: content
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
106
|
+
TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),
|
|
107
|
+
'data-testid': PropTypes.string,
|
|
108
|
+
'aria-label': PropTypes.string,
|
|
109
|
+
closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,
|
|
110
|
+
// ---------- externalHandling --------------
|
|
111
|
+
// if passed down, React Tooltip is used instead, due to limitations on
|
|
112
|
+
// parents overflow hidden controls
|
|
113
|
+
anchorId: PropTypes.string,
|
|
114
|
+
toolTipIsVisible: PropTypes.bool
|
|
115
|
+
} : {};
|
|
116
|
+
export default ToolTip;
|
|
117
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","isValidElement","useState","useCallback","useMemo","PropTypes","ReactTooltip","isString","NovaCompositionCoorpacademyInformationIcon","InformationIcon","style","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","toolTipReact","toolTip","propTypes","bool","string","isRequired","node","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","isComponent","setToolTipIsVisible","handleKeyPress","handleMouseOver","handleMouseLeave","tooltipContent","tooltipContainer","tooltipIconContainer","informationIcon","oneOfType","func"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content\n}) => {\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={style.toolTip}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleMouseOver = useCallback(() => {\n setToolTipIsVisible(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setToolTipIsVisible(false);\n }, []);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={style.tooltipContent}>{TooltipContent}</p>\n );\n }, [TooltipContent, isComponent]);\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={ariaLabel}\n />\n </button>\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- externalHandling --------------\n // if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,cAAf,EAA+BC,QAA/B,EAAyCC,WAAzC,EAAsDC,OAAtD,QAAoE,OAApE;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,YAAP,MAAyB,eAAzB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,SAAQC,0CAA0C,IAAIC,eAAtD,QAA4E,0BAA5E;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC;AAJsB,CAAD,KAKjB;EACJ,IAAI,CAACH,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,oBAAC,YAAD;MACE,EAAE,EAAEA,QADN;MAEE,SAAS,EAAEH,KAAK,CAACM,YAFnB;MAGE,kBAAe,OAHjB;MAIE,KAAK,EA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