@coorpacademy/components 10.28.4 → 10.28.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAcA,kDA0KC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAcA,kDAgLC"}
@@ -115,7 +115,7 @@ const CMPopin = props => {
115
115
  size: "small",
116
116
  icon: "close"
117
117
  }) : null), /*#__PURE__*/React.createElement("div", {
118
- className: style.titleContainer
118
+ className: mode === 'cookie' || mode === 'information' ? style.cookieTitleContainer : style.titleContainer
119
119
  }, /*#__PURE__*/React.createElement("div", {
120
120
  className: style.contentSection
121
121
  }, LogoComponent ? /*#__PURE__*/React.createElement(LogoComponent, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","map","Cta","ButtonLinkIconOnly","InputSwitch","style","propTypes","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div className={style.titleContainer}>\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>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EAAEvD,WAAW,CAACwD,aAFvB;IAGE,aAAW,cAHb;IAIE,cAAYxD,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAACgC,IALpB;IAME,WAAW,EAAEhC,WAAW,CAACyD;EAN3B,EADF,CADU,GAWR,IAZN,EAaGxD,YAAY,gBACX;IAAK,SAAS,EAAEA,YAAY,CAACoD,WAAb,GAA2B3D,KAAK,CAAC2D,WAAjC,GAA+C3D,KAAK,CAAC4D;EAArE,gBACE,oBAAC,GAAD;IACE,KAAK,EAAErD,YAAY,CAACsD,KADtB;IAEE,OAAO,EAAEtD,YAAY,CAACuD,aAFxB;IAGE,aAAY,gBAAevD,YAAY,CAAC+B,IAAK,EAH/C;IAIE,cAAY/B,YAAY,CAAC,YAAD,CAJ1B;IAKE,IAAI,EAAEA,YAAY,CAAC+B;EALrB,EADF,CADW,GAUT,IAvBN,EAwBGzB,WAAW,gBACV;IAAK,SAAS,EAAEA,WAAW,CAAC8C,WAAZ,GAA0B3D,KAAK,CAAC2D,WAAhC,GAA8C3D,KAAK,CAAC4D;EAApE,gBACE,oBAAC,GAAD;IACE,KAAK,EAAE/C,WAAW,CAACgD,KADrB;IAEE,OAAO,EAAEhD,WAAW,CAACiD,aAFvB;IAGE,aAAY,gBAAejD,WAAW,CAACyB,IAAK,EAH9C;IAIE,cAAYzB,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAACyB,IALpB;IAME,WAAW,EAAEzB,WAAW,CAACkD;EAN3B,EADF,CADU,GAWR,IAnCN,CAnCF,CALF,CADF;AAiFD,CA1KD;;AA4KA7D,OAAO,CAACD,SAAR,2CAAoBA,SAApB;AAEA,eAAeC,OAAf"}
1
+ {"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","map","Cta","ButtonLinkIconOnly","InputSwitch","style","propTypes","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,kCAAkC,IAAIC,YAFxC,EAGEC,sBAAsB,IAAIC,MAH5B,EAIEC,wBAAwB,IAAIC,UAJ9B,QAKO,0BALP;AAMA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,GAAP,MAAgB,wBAAhB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,SAAtB;;AAEA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFb,KAdJ;EAgBA,MAA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AZ,GAA0B5D,KAAK,CAAC4D,WAAhC,GAA8C5D,KAAK,CAAC6D;EAApE,gBACE,oBAAC,GAAD;IACE,KAAK,EAAEhD,WAAW,CAACiD,KADrB;IAEE,OAAO,EAAEjD,WAAW,CAACkD,aAFvB;IAGE,aAAY,gBAAelD,WAAW,CAACyB,IAAK,EAH9C;IAIE,cAAYzB,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAACyB,IALpB;IAME,WAAW,EAAEzB,WAAW,CAACmD;EAN3B,EADF,CADU,GAWR,IAnCN,CAzCF,CALF,CADF;AAuFD,CAhLD;;AAkLA9D,OAAO,CAACD,SAAR,2CAAoBA,SAApB;AAEA,eAAeC,OAAf"}
@@ -48,7 +48,6 @@
48
48
  .popin {
49
49
  overflow: auto;
50
50
  width: 500px;
51
- height: 414px;
52
51
  flex-grow: 0;
53
52
  margin: 16px;
54
53
  padding: 16px 16px 20px 16px;
@@ -150,7 +149,16 @@
150
149
  white-space: pre-line;
151
150
  margin-top: 0px;
152
151
  }
152
+
153
+ .cookieTitleContainer {
154
+ align-items: center;
155
+ display: flex;
156
+ flex-direction: column;
157
+ width: 100%;
158
+ }
159
+
153
160
  .titleContainer {
161
+ padding-top: 40px;
154
162
  align-items: center;
155
163
  display: flex;
156
164
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  .toolTip {
140
140
  visibility: hidden;
141
141
  opacity: 0;
142
- transition: opacity 0.8s;
142
+ transition: opacity 0.4s;
143
143
  position: absolute;
144
144
  width: 142%;
145
145
  border-radius: 15px;
@@ -157,7 +157,7 @@
157
157
  width: 15px;
158
158
  height: 15px;
159
159
  transform: rotate(-45deg);
160
- transition: opacity 0.8s;
160
+ transition: opacity 0.4s;
161
161
  background-color: white;
162
162
  position: inherit;
163
163
  bottom: -7px;
@@ -34,11 +34,11 @@ const createStyleSheet = (theme, windowHeight) => {
34
34
  fill: theme.colors.podcast.primary
35
35
  },
36
36
  button: {
37
- width: '40%',
38
37
  height: 44,
39
38
  backgroundColor: theme.colors.podcast.primary,
40
39
  borderRadius: 7,
41
- justifyContent: 'center'
40
+ justifyContent: 'center',
41
+ paddingHorizontal: 12
42
42
  },
43
43
  buttonText: {
44
44
  alignSelf: 'center',
@@ -60,7 +60,7 @@ const createStyleSheet = (theme, windowHeight) => {
60
60
  lineHeight: 19,
61
61
  fontWeight: '300',
62
62
  fontSize: 16,
63
- paddingHorizontal: 40
63
+ paddingHorizontal: 35
64
64
  }
65
65
  });
66
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["React","useState","useEffect","useWindowDimensions","StyleSheet","Text","View","Modal","NovaSolidAudioHeadphone","Headphone","useTemplateContext","Touchable","createStyleSheet","theme","windowHeight","popinHeight","create","container","position","top","height","backgroundColor","justifyContent","alignSelf","alignItems","borderRadius","padding","headphonesWrapper","width","headphones","fill","colors","podcast","primary","button","buttonText","color","fontWeight","bold","fontFamily","fontSize","lineHeight","title","textAlign","paddingHorizontal","message","PodcastPopinIntro","props","templateContext","styleSheet","setStylesheet","translations","isVisible","onValidate","_stylesheet","appPodcast","infoNewFeature","cta"],"sources":["../../../src/organism/podcast-popin-intro/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {\n useWindowDimensions,\n StyleSheet,\n ViewStyle,\n Text,\n TextStyle,\n View,\n GestureResponderEvent\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport {NovaSolidAudioHeadphone as Headphone} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isVisible: boolean;\n onValidate: (event: GestureResponderEvent) => void;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n headphones: ViewStyle;\n headphonesWrapper: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n title: TextStyle;\n message: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme, windowHeight: number) => {\n const popinHeight = 368;\n return StyleSheet.create({\n container: {\n position: 'absolute',\n top: (windowHeight - popinHeight) / 2,\n height: popinHeight,\n backgroundColor: '#fff',\n justifyContent: 'space-between',\n alignSelf: 'center',\n alignItems: 'center',\n borderRadius: 8,\n // width: '90%',\n padding: 24\n },\n headphonesWrapper: {\n width: 115,\n height: 115,\n backgroundColor: '#FFEFEB',\n justifyContent: 'center',\n borderRadius: 60\n },\n headphones: {\n alignSelf: 'center',\n width: 60,\n height: 60,\n fill: theme.colors.podcast.primary\n },\n button: {\n width: '40%',\n height: 44,\n backgroundColor: theme.colors.podcast.primary,\n borderRadius: 7,\n justifyContent: 'center'\n },\n buttonText: {\n alignSelf: 'center',\n color: '#FFFFFF',\n fontWeight: theme.fontWeight.bold,\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20\n },\n title: {\n textAlign: 'center',\n lineHeight: 24,\n fontWeight: '700',\n fontSize: 20,\n paddingHorizontal: 40\n },\n message: {\n textAlign: 'center',\n lineHeight: 19,\n fontWeight: '300',\n fontSize: 16,\n paddingHorizontal: 40\n }\n });\n};\n\nconst PodcastPopinIntro = (props: Props) => {\n const {height: windowHeight} = useWindowDimensions();\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme, translations} = templateContext;\n const {isVisible, onValidate} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, windowHeight);\n setStylesheet(_stylesheet);\n }, [theme, windowHeight]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Modal isVisible={isVisible} style={styleSheet.container} testID=\"podcast-popin-intro\">\n <View style={styleSheet.headphonesWrapper}>\n <Headphone style={styleSheet.headphones} />\n </View>\n <Text style={styleSheet.title}>{translations.appPodcast.infoNewFeature.title}</Text>\n <Text style={styleSheet.message}>{translations.appPodcast.infoNewFeature.message}</Text>\n <Touchable\n style={styleSheet.button}\n onPress={onValidate}\n testID=\"podcast-popin-intro-validate-button\"\n >\n <Text style={styleSheet.buttonText}>{translations.appPodcast.infoNewFeature.cta}</Text>\n </Touchable>\n </Modal>\n );\n};\n\nexport type PodcastPopinIntroProps = Props;\nexport default PodcastPopinIntro;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SACEC,mBADF,EAEEC,UAFF,EAIEC,IAJF,EAMEC,IANF,QAQO,cARP;AASA,OAAOC,KAAP,MAAkB,oBAAlB;AACA,SAAQC,uBAAuB,IAAIC,SAAnC,QAAmD,0BAAnD;AAEA,SAAQC,kBAAR,QAAiC,4CAAjC;AACA,OAAOC,SAAP,MAAsB,kCAAtB;;AAkBA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAeC,YAAf,KAAwC;EAC/D,MAAMC,WAAW,GAAG,GAApB;EACA,OAAOX,UAAU,CAACY,MAAX,CAAkB;IACvBC,SAAS,EAAE;MACTC,QAAQ,EAAE,UADD;MAETC,GAAG,EAAE,CAACL,YAAY,GAAGC,WAAhB,IAA+B,CAF3B;MAGTK,MAAM,EAAEL,WAHC;MAITM,eAAe,EAAE,MAJR;MAKTC,cAAc,EAAE,eALP;MAMTC,SAAS,EAAE,QANF;MAOTC,UAAU,EAAE,QAPH;MAQTC,YAAY,EAAE,CARL;MAST;MACAC,OAAO,EAAE;IAVA,CADY;IAavBC,iBAAiB,EAAE;MACjBC,KAAK,EAAE,GADU;MAEjBR,MAAM,EAAE,GAFS;MAGjBC,eAAe,EAAE,SAHA;MAIjBC,cAAc,EAAE,QAJC;MAKjBG,YAAY,EAAE;IALG,CAbI;IAoBvBI,UAAU,EAAE;MACVN,SAAS,EAAE,QADD;MAEVK,KAAK,EAAE,EAFG;MAGVR,MAAM,EAAE,EAHE;MAIVU,IAAI,EAAEjB,KAAK,CAACkB,MAAN,CAAaC,OAAb,CAAqBC;IAJjB,CApBW;IA0BvBC,MAAM,EAAE;MACNN,KAAK,EAAE,KADD;MAENR,MAAM,EAAE,EAFF;MAGNC,eA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D;;EAED,oBACE,oBAAC,KAAD;IAAO,SAAS,EAAEG,SAAlB;IAA6B,KAAK,EAAEH,UAAU,CAAChC,SAA/C;IAA0D,MAAM,EAAC;EAAjE,gBACE,oBAAC,IAAD;IAAM,KAAK,EAAEgC,UAAU,CAACtB;EAAxB,gBACE,oBAAC,SAAD;IAAW,KAAK,EAAEsB,UAAU,CAACpB;EAA7B,EADF,CADF,eAIE,oBAAC,IAAD;IAAM,KAAK,EAAEoB,UAAU,CAACP;EAAxB,GAAgCS,YAAY,CAACI,UAAb,CAAwBC,cAAxB,CAAuCd,KAAvE,CAJF,eAKE,oBAAC,IAAD;IAAM,KAAK,EAAEO,UAAU,CAACJ;EAAxB,GAAkCM,YAAY,CAACI,UAAb,CAAwBC,cAAxB,CAAuCX,OAAzE,CALF,eAME,oBAAC,SAAD;IACE,KAAK,EAAEI,UAAU,CAACf,MADpB;IAEE,OAAO,EAAEmB,UAFX;IAGE,MAAM,EAAC;EAHT,gBAKE,oBAAC,IAAD;IAAM,KAAK,EAAEJ,UAAU,CAACd;EAAxB,GAAqCgB,YAAY,CAACI,UAAb,CAAwBC,cAAxB,CAAuCC,GAA5E,CALF,CANF,CADF;AAgBD,CAhCD;;AAmCA,eAAeX,iBAAf"}
1
+ {"version":3,"file":"index.native.js","names":["React","useState","useEffect","useWindowDimensions","StyleSheet","Text","View","Modal","NovaSolidAudioHeadphone","Headphone","useTemplateContext","Touchable","createStyleSheet","theme","windowHeight","popinHeight","create","container","position","top","height","backgroundColor","justifyContent","alignSelf","alignItems","borderRadius","padding","headphonesWrapper","width","headphones","fill","colors","podcast","primary","button","paddingHorizontal","buttonText","color","fontWeight","bold","fontFamily","fontSize","lineHeight","title","textAlign","message","PodcastPopinIntro","props","templateContext","styleSheet","setStylesheet","translations","isVisible","onValidate","_stylesheet","appPodcast","infoNewFeature","cta"],"sources":["../../../src/organism/podcast-popin-intro/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {\n useWindowDimensions,\n StyleSheet,\n ViewStyle,\n Text,\n TextStyle,\n View,\n GestureResponderEvent\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport {NovaSolidAudioHeadphone as Headphone} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isVisible: boolean;\n onValidate: (event: GestureResponderEvent) => void;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n headphones: ViewStyle;\n headphonesWrapper: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n title: TextStyle;\n message: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme, windowHeight: number) => {\n const popinHeight = 368;\n return StyleSheet.create({\n container: {\n position: 'absolute',\n top: (windowHeight - popinHeight) / 2,\n height: popinHeight,\n backgroundColor: '#fff',\n justifyContent: 'space-between',\n alignSelf: 'center',\n alignItems: 'center',\n borderRadius: 8,\n // width: '90%',\n padding: 24\n },\n headphonesWrapper: {\n width: 115,\n height: 115,\n backgroundColor: '#FFEFEB',\n justifyContent: 'center',\n borderRadius: 60\n },\n headphones: {\n alignSelf: 'center',\n width: 60,\n height: 60,\n fill: theme.colors.podcast.primary\n },\n button: {\n height: 44,\n backgroundColor: theme.colors.podcast.primary,\n borderRadius: 7,\n justifyContent: 'center',\n paddingHorizontal: 12\n },\n buttonText: {\n alignSelf: 'center',\n color: '#FFFFFF',\n fontWeight: theme.fontWeight.bold,\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20\n },\n title: {\n textAlign: 'center',\n lineHeight: 24,\n fontWeight: '700',\n fontSize: 20,\n paddingHorizontal: 40\n },\n message: {\n textAlign: 'center',\n lineHeight: 19,\n fontWeight: '300',\n fontSize: 16,\n paddingHorizontal: 35\n }\n });\n};\n\nconst PodcastPopinIntro = (props: Props) => {\n const {height: windowHeight} = useWindowDimensions();\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme, translations} = templateContext;\n const {isVisible, onValidate} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, windowHeight);\n setStylesheet(_stylesheet);\n }, [theme, windowHeight]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Modal isVisible={isVisible} style={styleSheet.container} testID=\"podcast-popin-intro\">\n <View style={styleSheet.headphonesWrapper}>\n <Headphone style={styleSheet.headphones} />\n </View>\n <Text style={styleSheet.title}>{translations.appPodcast.infoNewFeature.title}</Text>\n <Text style={styleSheet.message}>{translations.appPodcast.infoNewFeature.message}</Text>\n <Touchable\n style={styleSheet.button}\n onPress={onValidate}\n testID=\"podcast-popin-intro-validate-button\"\n >\n <Text style={styleSheet.buttonText}>{translations.appPodcast.infoNewFeature.cta}</Text>\n </Touchable>\n </Modal>\n );\n};\n\nexport type PodcastPopinIntroProps = Props;\nexport default PodcastPopinIntro;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,QAAyC,OAAzC;AACA,SACEC,mBADF,EAEEC,UAFF,EAIEC,IAJF,EAMEC,IANF,QAQO,cARP;AASA,OAAOC,KAAP,MAAkB,oBAAlB;AACA,SAAQC,uBAAuB,IAAIC,SAAnC,QAAmD,0BAAnD;AAEA,SAAQC,kBAAR,QAAiC,4CAAjC;AACA,OAAOC,SAAP,MAAsB,kCAAtB;;AAkBA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAeC,YAAf,KAAwC;EAC/D,MAAMC,WAAW,GAAG,GAApB;EACA,OAAOX,UAAU,CAACY,MAAX,CAAkB;IACvBC,SAAS,EAAE;MACTC,QAAQ,EAAE,UADD;MAETC,GAAG,EAAE,CAACL,YAAY,GAAGC,WAAhB,IAA+B,CAF3B;MAGTK,MAAM,EAAEL,WAHC;MAITM,eAAe,EAAE,MAJR;MAKTC,cAAc,EAAE,eALP;MAMTC,SAAS,EAAE,QANF;MAOTC,UAAU,EAAE,QAPH;MAQTC,YA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@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAcA,kDA0KC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAcA,kDAgLC"}
@@ -129,7 +129,7 @@ const CMPopin = props => {
129
129
  size: "small",
130
130
  icon: "close"
131
131
  }) : null), /*#__PURE__*/_react.default.createElement("div", {
132
- className: _style.default.titleContainer
132
+ className: mode === 'cookie' || mode === 'information' ? _style.default.cookieTitleContainer : _style.default.titleContainer
133
133
  }, /*#__PURE__*/_react.default.createElement("div", {
134
134
  className: _style.default.contentSection
135
135
  }, LogoComponent ? /*#__PURE__*/_react.default.createElement(LogoComponent, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div className={style.titleContainer}>\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAG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IAIE,cAAYpC,YAAY,CAAC,YAAD,CAJ1B;IAKE,IAAI,EAAEA,YAAY,CAACoC;EALrB,EADF,CADW,GAUT,IAvBN,EAwBG9B,WAAW,gBACV;IAAK,SAAS,EAAEA,WAAW,CAACmD,WAAZ,GAA0BtC,cAAA,CAAMsC,WAAhC,GAA8CtC,cAAA,CAAMuC;EAApE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAEpD,WAAW,CAACqD,KADrB;IAEE,OAAO,EAAErD,WAAW,CAACsD,aAFvB;IAGE,aAAY,gBAAetD,WAAW,CAAC8B,IAAK,EAH9C;IAIE,cAAY9B,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAAC8B,IALpB;IAME,WAAW,EAAE9B,WAAW,CAACuD;EAN3B,EADF,CADU,GAWR,IAnCN,CAnCF,CALF,CADF;AAiFD,CA1KD;;AA4KAlE,OAAO,CAACmE,SAAR,2CAAoBA,cAApB;eAEenE,O"}
1
+ {"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPop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S,EAAEA,YAAY,CAAC0D,WAAb,GAA2BvC,cAAA,CAAMuC,WAAjC,GAA+CvC,cAAA,CAAMwC;EAArE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAE3D,YAAY,CAAC4D,KADtB;IAEE,OAAO,EAAE5D,YAAY,CAAC6D,aAFxB;IAGE,aAAY,gBAAe7D,YAAY,CAACoC,IAAK,EAH/C;IAIE,cAAYpC,YAAY,CAAC,YAAD,CAJ1B;IAKE,IAAI,EAAEA,YAAY,CAACoC;EALrB,EADF,CADW,GAUT,IAvBN,EAwBG9B,WAAW,gBACV;IAAK,SAAS,EAAEA,WAAW,CAACoD,WAAZ,GAA0BvC,cAAA,CAAMuC,WAAhC,GAA8CvC,cAAA,CAAMwC;EAApE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAErD,WAAW,CAACsD,KADrB;IAEE,OAAO,EAAEtD,WAAW,CAACuD,aAFvB;IAGE,aAAY,gBAAevD,WAAW,CAAC8B,IAAK,EAH9C;IAIE,cAAY9B,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAAC8B,IALpB;IAME,WAAW,EAAE9B,WAAW,CAACwD;EAN3B,EADF,CADU,GAWR,IAnCN,CAzCF,CALF,CADF;AAuFD,CAhLD;;AAkLAnE,OAAO,CAACoE,SAAR,2CAAoBA,cAApB;eAEepE,O"}
@@ -48,7 +48,6 @@
48
48
  .popin {
49
49
  overflow: auto;
50
50
  width: 500px;
51
- height: 414px;
52
51
  flex-grow: 0;
53
52
  margin: 16px;
54
53
  padding: 16px 16px 20px 16px;
@@ -150,7 +149,16 @@
150
149
  white-space: pre-line;
151
150
  margin-top: 0px;
152
151
  }
152
+
153
+ .cookieTitleContainer {
154
+ align-items: center;
155
+ display: flex;
156
+ flex-direction: column;
157
+ width: 100%;
158
+ }
159
+
153
160
  .titleContainer {
161
+ padding-top: 40px;
154
162
  align-items: center;
155
163
  display: flex;
156
164
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  .toolTip {
140
140
  visibility: hidden;
141
141
  opacity: 0;
142
- transition: opacity 0.8s;
142
+ transition: opacity 0.4s;
143
143
  position: absolute;
144
144
  width: 142%;
145
145
  border-radius: 15px;
@@ -157,7 +157,7 @@
157
157
  width: 15px;
158
158
  height: 15px;
159
159
  transform: rotate(-45deg);
160
- transition: opacity 0.8s;
160
+ transition: opacity 0.4s;
161
161
  background-color: white;
162
162
  position: inherit;
163
163
  bottom: -7px;
@@ -50,11 +50,11 @@ const createStyleSheet = (theme, windowHeight) => {
50
50
  fill: theme.colors.podcast.primary
51
51
  },
52
52
  button: {
53
- width: '40%',
54
53
  height: 44,
55
54
  backgroundColor: theme.colors.podcast.primary,
56
55
  borderRadius: 7,
57
- justifyContent: 'center'
56
+ justifyContent: 'center',
57
+ paddingHorizontal: 12
58
58
  },
59
59
  buttonText: {
60
60
  alignSelf: 'center',
@@ -76,7 +76,7 @@ const createStyleSheet = (theme, windowHeight) => {
76
76
  lineHeight: 19,
77
77
  fontWeight: '300',
78
78
  fontSize: 16,
79
- paddingHorizontal: 40
79
+ paddingHorizontal: 35
80
80
  }
81
81
  });
82
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","windowHeight","popinHeight","StyleSheet","create","container","position","top","height","backgroundColor","justifyContent","alignSelf","alignItems","borderRadius","padding","headphonesWrapper","width","headphones","fill","colors","podcast","primary","button","buttonText","color","fontWeight","bold","fontFamily","fontSize","lineHeight","title","textAlign","paddingHorizontal","message","PodcastPopinIntro","props","useWindowDimensions","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","translations","isVisible","onValidate","useEffect","_stylesheet","appPodcast","infoNewFeature","cta"],"sources":["../../../src/organism/podcast-popin-intro/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {\n useWindowDimensions,\n StyleSheet,\n ViewStyle,\n Text,\n TextStyle,\n View,\n GestureResponderEvent\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport {NovaSolidAudioHeadphone as Headphone} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isVisible: boolean;\n onValidate: (event: GestureResponderEvent) => void;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n headphones: ViewStyle;\n headphonesWrapper: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n title: TextStyle;\n message: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme, windowHeight: number) => {\n const popinHeight = 368;\n return StyleSheet.create({\n container: {\n position: 'absolute',\n top: (windowHeight - popinHeight) / 2,\n height: popinHeight,\n backgroundColor: '#fff',\n justifyContent: 'space-between',\n alignSelf: 'center',\n alignItems: 'center',\n borderRadius: 8,\n // width: '90%',\n padding: 24\n },\n headphonesWrapper: {\n width: 115,\n height: 115,\n backgroundColor: '#FFEFEB',\n justifyContent: 'center',\n borderRadius: 60\n },\n headphones: {\n alignSelf: 'center',\n width: 60,\n height: 60,\n fill: theme.colors.podcast.primary\n },\n button: {\n width: '40%',\n height: 44,\n backgroundColor: theme.colors.podcast.primary,\n borderRadius: 7,\n justifyContent: 'center'\n },\n buttonText: {\n alignSelf: 'center',\n color: '#FFFFFF',\n fontWeight: theme.fontWeight.bold,\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20\n },\n title: {\n textAlign: 'center',\n lineHeight: 24,\n fontWeight: '700',\n fontSize: 20,\n paddingHorizontal: 40\n },\n message: {\n textAlign: 'center',\n lineHeight: 19,\n fontWeight: '300',\n fontSize: 16,\n paddingHorizontal: 40\n }\n });\n};\n\nconst PodcastPopinIntro = (props: Props) => {\n const {height: windowHeight} = useWindowDimensions();\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme, translations} = templateContext;\n const {isVisible, onValidate} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, windowHeight);\n setStylesheet(_stylesheet);\n }, [theme, windowHeight]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Modal isVisible={isVisible} style={styleSheet.container} testID=\"podcast-popin-intro\">\n <View style={styleSheet.headphonesWrapper}>\n <Headphone style={styleSheet.headphones} />\n </View>\n <Text style={styleSheet.title}>{translations.appPodcast.infoNewFeature.title}</Text>\n <Text style={styleSheet.message}>{translations.appPodcast.infoNewFeature.message}</Text>\n <Touchable\n style={styleSheet.button}\n onPress={onValidate}\n testID=\"podcast-popin-intro-validate-button\"\n >\n <Text style={styleSheet.buttonText}>{translations.appPodcast.infoNewFeature.cta}</Text>\n </Touchable>\n </Modal>\n );\n};\n\nexport type PodcastPopinIntroProps = Props;\nexport default PodcastPopinIntro;\n"],"mappings":";;;;;AAAA;;AACA;;AASA;;AACA;;AAEA;;AACA;;;;;;;;AAkBA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAeC,YAAf,KAAwC;EAC/D,MAAMC,WAAW,GAAG,GAApB;EACA,OAAOC,uBAAA,CAAWC,MAAX,CAAkB;IACvBC,SAAS,EAAE;MACTC,QAAQ,EAAE,UADD;MAETC,GAAG,EAAE,CAACN,YAAY,GAAGC,WAAhB,IAA+B,CAF3B;MAGTM,MAAM,EAAEN,WAHC;MAITO,eAAe,EAAE,MAJR;MAKTC,cAAc,EAAE,eALP;MAMTC,SAAS,EAAE,QANF;MAOTC,UAAU,EAAE,QAPH;MAQTC,YAAY,EAAE,CARL;MAST;MACAC,OAAO,EAAE;IAVA,CADY;IAavBC,iBAAiB,EAAE;MACjBC,KAAK,EAAE,GADU;MAEjBR,MAAM,EAAE,GAFS;MAGjBC,eAAe,EAAE,SAHA;MAIjBC,cAAc,EAAE,QAJC;MAKjBG,YAAY,EAAE;IALG,CAbI;IAoBvBI,UAAU,EAAE;MACVN,SAAS,EAAE,QADD;MAEVK,KAAK,EAAE,EAFG;MAGVR,MAAM,EAAE,EAHE;MAIVU,IAAI,EAAElB,KAAK,CAACmB,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uC,aAAa,CAACM,WAAD,CAAb;EACD,CAHD,EAGG,CAAC9C,KAAD,EAAQC,YAAR,CAHH;;EAKA,IAAI,CAACsC,UAAL,EAAiB;IACf,OAAO,IAAP;EACD;;EAED,oBACE,6BAAC,yBAAD;IAAO,SAAS,EAAEI,SAAlB;IAA6B,KAAK,EAAEJ,UAAU,CAAClC,SAA/C;IAA0D,MAAM,EAAC;EAAjE,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEkC,UAAU,CAACxB;EAAxB,gBACE,6BAAC,kCAAD;IAAW,KAAK,EAAEwB,UAAU,CAACtB;EAA7B,EADF,CADF,eAIE,6BAAC,iBAAD;IAAM,KAAK,EAAEsB,UAAU,CAACT;EAAxB,GAAgCY,YAAY,CAACK,UAAb,CAAwBC,cAAxB,CAAuClB,KAAvE,CAJF,eAKE,6BAAC,iBAAD;IAAM,KAAK,EAAES,UAAU,CAACN;EAAxB,GAAkCS,YAAY,CAACK,UAAb,CAAwBC,cAAxB,CAAuCf,OAAzE,CALF,eAME,6BAAC,cAAD;IACE,KAAK,EAAEM,UAAU,CAACjB,MADpB;IAEE,OAAO,EAAEsB,UAFX;IAGE,MAAM,EAAC;EAHT,gBAKE,6BAAC,iBAAD;IAAM,KAAK,EAAEL,UAAU,CAAChB;EAAxB,GAAqCmB,YAAY,CAACK,UAAb,CAAwBC,cAAxB,CAAuCC,GAA5E,CALF,CANF,CADF;AAgBD,CAhCD;;eAmCef,iB"}
1
+ {"version":3,"file":"index.native.js","names":["createStyleSheet","theme","windowHeight","popinHeight","StyleSheet","create","container","position","top","height","backgroundColor","justifyContent","alignSelf","alignItems","borderRadius","padding","headphonesWrapper","width","headphones","fill","colors","podcast","primary","button","paddingHorizontal","buttonText","color","fontWeight","bold","fontFamily","fontSize","lineHeight","title","textAlign","message","PodcastPopinIntro","props","useWindowDimensions","templateContext","useTemplateContext","styleSheet","setStylesheet","useState","translations","isVisible","onValidate","useEffect","_stylesheet","appPodcast","infoNewFeature","cta"],"sources":["../../../src/organism/podcast-popin-intro/index.native.tsx"],"sourcesContent":["import React, {useState, useEffect} from 'react';\nimport {\n useWindowDimensions,\n StyleSheet,\n ViewStyle,\n Text,\n TextStyle,\n View,\n GestureResponderEvent\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport {NovaSolidAudioHeadphone as Headphone} from '@coorpacademy/nova-icons';\n\nimport {useTemplateContext} from '../../template/app-review/template-context';\nimport Touchable from '../../hoc/touchable/index.native';\nimport {Theme} from '../../variables/theme.native';\n\nexport type Props = {\n isVisible: boolean;\n onValidate: (event: GestureResponderEvent) => void;\n};\n\ntype StyleSheetType = {\n container: ViewStyle;\n headphones: ViewStyle;\n headphonesWrapper: ViewStyle;\n button: ViewStyle;\n buttonText: TextStyle;\n title: TextStyle;\n message: TextStyle;\n};\n\nconst createStyleSheet = (theme: Theme, windowHeight: number) => {\n const popinHeight = 368;\n return StyleSheet.create({\n container: {\n position: 'absolute',\n top: (windowHeight - popinHeight) / 2,\n height: popinHeight,\n backgroundColor: '#fff',\n justifyContent: 'space-between',\n alignSelf: 'center',\n alignItems: 'center',\n borderRadius: 8,\n // width: '90%',\n padding: 24\n },\n headphonesWrapper: {\n width: 115,\n height: 115,\n backgroundColor: '#FFEFEB',\n justifyContent: 'center',\n borderRadius: 60\n },\n headphones: {\n alignSelf: 'center',\n width: 60,\n height: 60,\n fill: theme.colors.podcast.primary\n },\n button: {\n height: 44,\n backgroundColor: theme.colors.podcast.primary,\n borderRadius: 7,\n justifyContent: 'center',\n paddingHorizontal: 12\n },\n buttonText: {\n alignSelf: 'center',\n color: '#FFFFFF',\n fontWeight: theme.fontWeight.bold,\n fontFamily: 'System',\n fontSize: 14,\n lineHeight: 20\n },\n title: {\n textAlign: 'center',\n lineHeight: 24,\n fontWeight: '700',\n fontSize: 20,\n paddingHorizontal: 40\n },\n message: {\n textAlign: 'center',\n lineHeight: 19,\n fontWeight: '300',\n fontSize: 16,\n paddingHorizontal: 35\n }\n });\n};\n\nconst PodcastPopinIntro = (props: Props) => {\n const {height: windowHeight} = useWindowDimensions();\n const templateContext = useTemplateContext();\n const [styleSheet, setStylesheet] = useState<StyleSheetType | null>(null);\n const {theme, translations} = templateContext;\n const {isVisible, onValidate} = props;\n\n useEffect(() => {\n const _stylesheet = createStyleSheet(theme, windowHeight);\n setStylesheet(_stylesheet);\n }, [theme, windowHeight]);\n\n if (!styleSheet) {\n return null;\n }\n\n return (\n <Modal isVisible={isVisible} style={styleSheet.container} testID=\"podcast-popin-intro\">\n <View style={styleSheet.headphonesWrapper}>\n <Headphone style={styleSheet.headphones} />\n </View>\n <Text style={styleSheet.title}>{translations.appPodcast.infoNewFeature.title}</Text>\n <Text style={styleSheet.message}>{translations.appPodcast.infoNewFeature.message}</Text>\n <Touchable\n style={styleSheet.button}\n onPress={onValidate}\n testID=\"podcast-popin-intro-validate-button\"\n >\n <Text style={styleSheet.buttonText}>{translations.appPodcast.infoNewFeature.cta}</Text>\n </Touchable>\n </Modal>\n );\n};\n\nexport type PodcastPopinIntroProps = Props;\nexport default PodcastPopinIntro;\n"],"mappings":";;;;;AAAA;;AACA;;AASA;;AACA;;AAEA;;AACA;;;;;;;;AAkBA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAeC,YAAf,KAAwC;EAC/D,MAAMC,WAAW,GAAG,GAApB;EACA,OAAOC,uBAAA,CAAWC,MAAX,CAAkB;IACvBC,SAAS,EAAE;MACTC,QAAQ,EAAE,UADD;MAETC,GAAG,EAAE,CAACN,YAAY,GAAGC,WAAhB,IAA+B,CAF3B;MAGTM,MAAM,EAAEN,WAHC;MAITO,eAAe,EAAE,MAJR;MAKTC,cAAc,EAAE,eALP;MAMTC,SAAS,EAAE,QANF;MAOTC,UAAU,EAAE,QAPH;MAQTC,YAAY,EAAE,CARL;MAST;MACAC,OAAO,EAAE;IAVA,CADY;IAavBC,iBAAiB,EAAE;MACjBC,KAAK,EAAE,GADU;MAEjBR,MAAM,EAAE,GAFS;MAGjBC,eAAe,EAAE,SAHA;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D;IAAQ0C;EAAR,IAAwBL,eAA9B;EACA,MAAM;IAACM,SAAD;IAAYC;EAAZ,IAA0BT,KAAhC;EAEA,IAAAU,gBAAA,EAAU,MAAM;IACd,MAAMC,WAAW,GAAG/C,gBAAgB,CAACC,KAAD,EAAQC,YAAR,CAApC;;IACAuC,aAAa,CAACM,WAAD,CAAb;EACD,CAHD,EAGG,CAAC9C,KAAD,EAAQC,YAAR,CAHH;;EAKA,IAAI,CAACsC,UAAL,EAAiB;IACf,OAAO,IAAP;EACD;;EAED,oBACE,6BAAC,yBAAD;IAAO,SAAS,EAAEI,SAAlB;IAA6B,KAAK,EAAEJ,UAAU,CAAClC,SAA/C;IAA0D,MAAM,EAAC;EAAjE,gBACE,6BAAC,iBAAD;IAAM,KAAK,EAAEkC,UAAU,CAACxB;EAAxB,gBACE,6BAAC,kCAAD;IAAW,KAAK,EAAEwB,UAAU,CAACtB;EAA7B,EADF,CADF,eAIE,6BAAC,iBAAD;IAAM,KAAK,EAAEsB,UAAU,CAACR;EAAxB,GAAgCW,YAAY,CAACK,UAAb,CAAwBC,cAAxB,CAAuCjB,KAAvE,CAJF,eAKE,6BAAC,iBAAD;IAAM,KAAK,EAAEQ,UAAU,CAACN;EAAxB,GAAkCS,YAAY,CAACK,UAAb,CAAwBC,cAAxB,CAAuCf,OAAzE,CALF,eAME,6BAAC,cAAD;IACE,KAAK,EAAEM,UAAU,CAACjB,MADpB;IAEE,OAAO,EAAEsB,UAFX;IAGE,MAAM,EAAC;EAHT,gBAKE,6BAAC,iBAAD;IAAM,KAAK,EAAEL,UAAU,CAACf;EAAxB,GAAqCkB,YAAY,CAACK,UAAb,CAAwBC,cAAxB,CAAuCC,GAA5E,CALF,CANF,CADF;AAgBD,CAhCD;;eAmCef,iB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "10.28.4",
3
+ "version": "10.28.6",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -157,5 +157,5 @@
157
157
  "last 2 versions",
158
158
  "IE 11"
159
159
  ],
160
- "gitHead": "34de8b295faa3bfc8e3b00bb9ffcf40e0b1e9796"
160
+ "gitHead": "702f62dcce3302ab5ea30e6b378bb15004417d0a"
161
161
  }