@coorpacademy/components 10.1.1 → 10.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/es/atom/bullet-point-menu-button/test/fixtures.js +27 -0
  2. package/es/atom/bullet-point-menu-button/test/fixtures.js.map +1 -0
  3. package/es/atom/button/index.js +3 -1
  4. package/es/atom/button/index.js.map +1 -1
  5. package/es/atom/content-badge/index.js +4 -4
  6. package/es/atom/content-badge/index.js.map +1 -1
  7. package/es/atom/input-checkbox/test/fixtures.js +0 -2
  8. package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
  9. package/es/atom/input-text/index.js +1 -1
  10. package/es/atom/input-text/index.js.map +1 -1
  11. package/es/atom/input-text/style.css +16 -11
  12. package/es/atom/input-textarea/index.js +36 -11
  13. package/es/atom/input-textarea/index.js.map +1 -1
  14. package/es/atom/input-textarea/style.css +265 -0
  15. package/es/atom/input-textarea/test/fixtures/cm-default.js +17 -0
  16. package/es/atom/input-textarea/test/fixtures/cm-default.js.map +1 -0
  17. package/es/atom/input-textarea/test/fixtures/cm-empty.js +17 -0
  18. package/es/atom/input-textarea/test/fixtures/cm-empty.js.map +1 -0
  19. package/es/atom/title/test/fixtures.js +2 -6
  20. package/es/atom/title/test/fixtures.js.map +1 -1
  21. package/es/molecule/banner/index.js +46 -0
  22. package/es/molecule/banner/index.js.map +1 -0
  23. package/es/molecule/banner/style.css +63 -0
  24. package/es/molecule/banner/test/fixtures/default.js +11 -0
  25. package/es/molecule/banner/test/fixtures/default.js.map +1 -0
  26. package/es/molecule/banner/test/fixtures/error-banner.js +7 -0
  27. package/es/molecule/banner/test/fixtures/error-banner.js.map +1 -0
  28. package/es/molecule/brand-form-group/test/fixtures/cm-default.js +51 -0
  29. package/es/molecule/brand-form-group/test/fixtures/cm-default.js.map +1 -0
  30. package/es/molecule/brand-form-group/test/fixtures/default.js +12 -3
  31. package/es/molecule/brand-form-group/test/fixtures/default.js.map +1 -1
  32. package/es/molecule/card/index.js +16 -5
  33. package/es/molecule/card/index.js.map +1 -1
  34. package/es/molecule/card/selectable.css +71 -0
  35. package/es/molecule/card/selectable.js +32 -0
  36. package/es/molecule/card/selectable.js.map +1 -0
  37. package/es/molecule/card/test/fixtures/default.js +1 -0
  38. package/es/molecule/card/test/fixtures/default.js.map +1 -1
  39. package/es/molecule/card/test/fixtures/selectable-false.js +16 -0
  40. package/es/molecule/card/test/fixtures/selectable-false.js.map +1 -0
  41. package/es/molecule/card/test/fixtures/selectable-true.js +17 -0
  42. package/es/molecule/card/test/fixtures/selectable-true.js.map +1 -0
  43. package/es/molecule/card-content/index.js +13 -3
  44. package/es/molecule/card-content/index.js.map +1 -1
  45. package/es/molecule/card-content/style.css +13 -3
  46. package/es/molecule/cm-popin/index.js +76 -0
  47. package/es/molecule/cm-popin/index.js.map +1 -0
  48. package/es/molecule/cm-popin/style.css +157 -0
  49. package/es/molecule/cm-popin/test/fixtures/dangerous.js +16 -0
  50. package/es/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -0
  51. package/es/molecule/cm-popin/test/fixtures/default.js +16 -0
  52. package/es/molecule/cm-popin/test/fixtures/default.js.map +1 -0
  53. package/es/molecule/cm-popin/test/fixtures/warning-with-close.js +17 -0
  54. package/es/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -0
  55. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  56. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  57. package/es/molecule/wizard-summary/index.js +44 -17
  58. package/es/molecule/wizard-summary/index.js.map +1 -1
  59. package/es/molecule/wizard-summary/style.css +104 -7
  60. package/es/molecule/wizard-summary/test/fixtures/default.js +9 -3
  61. package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
  62. package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js +117 -0
  63. package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -0
  64. package/es/organism/accordion/coorp-manager/part/test/fixtures.js +0 -4
  65. package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
  66. package/es/organism/brand-dashboard/test/fixtures.js +0 -2
  67. package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
  68. package/es/template/back-office/brand-update/test/fixtures.js +2 -2
  69. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  70. package/es/variables/colors.css +9 -3
  71. package/lib/atom/bullet-point-menu-button/test/fixtures.js +43 -0
  72. package/lib/atom/bullet-point-menu-button/test/fixtures.js.map +1 -0
  73. package/lib/atom/button/index.js +3 -1
  74. package/lib/atom/button/index.js.map +1 -1
  75. package/lib/atom/content-badge/index.js +4 -4
  76. package/lib/atom/content-badge/index.js.map +1 -1
  77. package/lib/atom/input-checkbox/test/fixtures.js +0 -3
  78. package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
  79. package/lib/atom/input-text/index.js +1 -1
  80. package/lib/atom/input-text/index.js.map +1 -1
  81. package/lib/atom/input-text/style.css +16 -11
  82. package/lib/atom/input-textarea/index.js +38 -11
  83. package/lib/atom/input-textarea/index.js.map +1 -1
  84. package/lib/atom/input-textarea/style.css +265 -0
  85. package/lib/atom/input-textarea/test/fixtures/cm-default.js +22 -0
  86. package/lib/atom/input-textarea/test/fixtures/cm-default.js.map +1 -0
  87. package/lib/atom/input-textarea/test/fixtures/cm-empty.js +22 -0
  88. package/lib/atom/input-textarea/test/fixtures/cm-empty.js.map +1 -0
  89. package/lib/atom/title/test/fixtures.js +2 -8
  90. package/lib/atom/title/test/fixtures.js.map +1 -1
  91. package/lib/molecule/banner/index.js +59 -0
  92. package/lib/molecule/banner/index.js.map +1 -0
  93. package/lib/molecule/banner/style.css +63 -0
  94. package/lib/molecule/banner/test/fixtures/default.js +16 -0
  95. package/lib/molecule/banner/test/fixtures/default.js.map +1 -0
  96. package/lib/molecule/banner/test/fixtures/error-banner.js +12 -0
  97. package/lib/molecule/banner/test/fixtures/error-banner.js.map +1 -0
  98. package/lib/molecule/brand-form-group/test/fixtures/cm-default.js +56 -0
  99. package/lib/molecule/brand-form-group/test/fixtures/cm-default.js.map +1 -0
  100. package/lib/molecule/brand-form-group/test/fixtures/default.js +12 -3
  101. package/lib/molecule/brand-form-group/test/fixtures/default.js.map +1 -1
  102. package/lib/molecule/card/index.js +17 -5
  103. package/lib/molecule/card/index.js.map +1 -1
  104. package/lib/molecule/card/selectable.css +71 -0
  105. package/lib/molecule/card/selectable.js +45 -0
  106. package/lib/molecule/card/selectable.js.map +1 -0
  107. package/lib/molecule/card/test/fixtures/default.js +1 -0
  108. package/lib/molecule/card/test/fixtures/default.js.map +1 -1
  109. package/lib/molecule/card/test/fixtures/selectable-false.js +26 -0
  110. package/lib/molecule/card/test/fixtures/selectable-false.js.map +1 -0
  111. package/lib/molecule/card/test/fixtures/selectable-true.js +27 -0
  112. package/lib/molecule/card/test/fixtures/selectable-true.js.map +1 -0
  113. package/lib/molecule/card-content/index.js +14 -3
  114. package/lib/molecule/card-content/index.js.map +1 -1
  115. package/lib/molecule/card-content/style.css +13 -3
  116. package/lib/molecule/cm-popin/index.js +89 -0
  117. package/lib/molecule/cm-popin/index.js.map +1 -0
  118. package/lib/molecule/cm-popin/style.css +157 -0
  119. package/lib/molecule/cm-popin/test/fixtures/dangerous.js +21 -0
  120. package/lib/molecule/cm-popin/test/fixtures/dangerous.js.map +1 -0
  121. package/lib/molecule/cm-popin/test/fixtures/default.js +21 -0
  122. package/lib/molecule/cm-popin/test/fixtures/default.js.map +1 -0
  123. package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js +22 -0
  124. package/lib/molecule/cm-popin/test/fixtures/warning-with-close.js.map +1 -0
  125. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  126. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  127. package/lib/molecule/wizard-summary/index.js +41 -13
  128. package/lib/molecule/wizard-summary/index.js.map +1 -1
  129. package/lib/molecule/wizard-summary/style.css +104 -7
  130. package/lib/molecule/wizard-summary/test/fixtures/default.js +9 -3
  131. package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
  132. package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js +122 -0
  133. package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -0
  134. package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +0 -6
  135. package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
  136. package/lib/organism/brand-dashboard/test/fixtures.js +0 -3
  137. package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
  138. package/lib/template/back-office/brand-update/test/fixtures.js +3 -3
  139. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  140. package/lib/variables/colors.css +9 -3
  141. package/package.json +3 -3
  142. package/es/atom/chips/test/fixtures.js +0 -15
  143. package/es/atom/chips/test/fixtures.js.map +0 -1
  144. package/es/atom/content-badge/test/fixtures.js +0 -27
  145. package/es/atom/content-badge/test/fixtures.js.map +0 -1
  146. package/es/atom/wizard-steps/test/fixtures.js +0 -17
  147. package/es/atom/wizard-steps/test/fixtures.js.map +0 -1
  148. package/es/molecule/coorp-manager-roles/test/fixtures.js +0 -13
  149. package/es/molecule/coorp-manager-roles/test/fixtures.js.map +0 -1
  150. package/es/molecule/quick-access-card/test/fixtures.js +0 -21
  151. package/es/molecule/quick-access-card/test/fixtures.js.map +0 -1
  152. package/es/molecule/quick-access-cards-group/test/fixtures.js +0 -21
  153. package/es/molecule/quick-access-cards-group/test/fixtures.js.map +0 -1
  154. package/es/molecule/vertical-tabs/test/fixtures.js +0 -15
  155. package/es/molecule/vertical-tabs/test/fixtures.js.map +0 -1
  156. package/es/molecule/wizard-summary/test/fixtures.js +0 -19
  157. package/es/molecule/wizard-summary/test/fixtures.js.map +0 -1
  158. package/lib/atom/chips/test/fixtures.js +0 -25
  159. package/lib/atom/chips/test/fixtures.js.map +0 -1
  160. package/lib/atom/content-badge/test/fixtures.js +0 -43
  161. package/lib/atom/content-badge/test/fixtures.js.map +0 -1
  162. package/lib/atom/wizard-steps/test/fixtures.js +0 -28
  163. package/lib/atom/wizard-steps/test/fixtures.js.map +0 -1
  164. package/lib/molecule/coorp-manager-roles/test/fixtures.js +0 -22
  165. package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +0 -1
  166. package/lib/molecule/quick-access-card/test/fixtures.js +0 -34
  167. package/lib/molecule/quick-access-card/test/fixtures.js.map +0 -1
  168. package/lib/molecule/quick-access-cards-group/test/fixtures.js +0 -34
  169. package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +0 -1
  170. package/lib/molecule/vertical-tabs/test/fixtures.js +0 -25
  171. package/lib/molecule/vertical-tabs/test/fixtures.js.map +0 -1
  172. package/lib/molecule/wizard-summary/test/fixtures.js +0 -31
  173. package/lib/molecule/wizard-summary/test/fixtures.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/card-content/index.js"],"names":["MODES","HERO","CARD","ContentTypeInfo","mode","type","externalContent","context","translate","style","microLearningIcon","microLearninglabel","EXTERNAL_CONTENT_ICONS","textColor","color","contentTypeInfo","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","bool","string","CardTitle","title","empty","courseContent","innerHTML","lightTitle","darkTitle","__html","AuthorName","author","certifiedAuthor","checkIcon","authorIcon","iconShadow","darkAuthorTitle","ContentInfo","adaptiv","disabled","progress","progressBarColor","inlineProgressValueStyle","backgroundColor","width","chapterContent","progressBar","progressWrapper","hideProgressBar","adaptiveIcon","infoWrapper","hero","card","progressBarDisabled","cardInfo","microLearningCardInfo","number"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,KAAK,GAAG;AACnBC,EAAAA,IAAI,EAAE,MADa;AAEnBC,EAAAA,IAAI,EAAE;AAFa,CAAd;;;AAKP,MAAMC,eAAe,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,IAAP;AAAaC,EAAAA;AAAb,CAAD,EAAgCC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,CAACnB,SAAZ,2CAAwB;AACtBoB,EAAAA,OAAO,EAAEnB,mBAAUC,IADG;AAEtBW,EAAAA,MAAM,EAAEZ,mBAAUE,MAFI;AAGtBW,EAAAA,eAAe,EAAEb,mBAAUC,IAHL;AAItBmB,EAAAA,QAAQ,EAAEpB,mBAAUC,IAJE;AAKtBI,EAAAA,KAAK,EAAEL,mBAAUC,IALK;AAMtBoB,EAAAA,QAAQ,EAAErB,mBAAUqC,MANE;AAOtBjC,EAAAA,KAAK,EAAEJ,mBAAUE,MAPK;AAQtBlB,EAAAA,IAAI,EAAEgB,mBAAUE,MARM;AAStBnB,EAAAA,IAAI,EAAEiB,mBAAUE;AATM,CAAxB;eAYegB,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isNil} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyAdaptive as AdaptivIcon,\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport {innerHTML} from '../../atom/label/style.css';\nimport style from './style.css';\n\nexport const MODES = {\n HERO: 'hero',\n CARD: 'card'\n};\n\nconst ContentTypeInfo = ({mode, type, externalContent}, context) => {\n const {translate} = context;\n if (mode !== MODES.CARD) {\n return null;\n }\n\n if (type === 'chapter') {\n return (\n <div className={style.microLearningIcon}>\n <TimerIcon height={40} width={40} />\n <span className={style.microLearninglabel}>{\"5' learning\"}</span>\n </div>\n );\n }\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const textColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n return (\n <div className={style.contentTypeInfo} style={{color: textColor}}>\n {type === 'scorm' ? translate('external_content_scorm') : ''}\n {type === 'video' ? translate('external_content_video') : ''}\n {type === 'article' ? translate('external_content_article') : ''}\n {type === 'podcast' ? translate('external_content_podcast') : ''}\n </div>\n );\n }\n\n return null;\n};\n\nContentTypeInfo.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContentTypeInfo.propTypes = {\n externalContent: PropTypes.bool,\n type: PropTypes.string,\n mode: PropTypes.string\n};\n\nconst CardTitle = ({title, empty, courseContent}) => {\n return (\n <div\n className={classnames(\n style.title,\n innerHTML,\n courseContent ? style.lightTitle : style.darkTitle,\n empty ? style.empty : null\n )}\n data-name=\"title\"\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n};\n\nCardTitle.propTypes = {\n title: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool\n};\n\nconst AuthorName = ({author, empty, courseContent, certifiedAuthor}) => {\n const checkIcon = certifiedAuthor ? (\n <CheckIcon\n className={classnames(style.authorIcon, courseContent ? style.iconShadow : null)}\n color=\"inherit\"\n />\n ) : null;\n\n return (\n <div\n data-name=\"author\"\n title={author}\n className={classnames(\n style.author,\n courseContent ? style.lightTitle : style.darkAuthorTitle,\n empty ? style.empty : null\n )}\n >\n <span>{author}</span>\n {checkIcon}\n </div>\n );\n};\n\nAuthorName.propTypes = {\n author: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool,\n certifiedAuthor: PropTypes.bool\n};\n\nconst ContentInfo = ({\n adaptiv,\n author,\n certifiedAuthor = false,\n disabled = false,\n empty = false,\n mode = MODES.CARD,\n progress,\n title,\n type\n}) => {\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${progress * 100}%`\n };\n const externalContent = isExternalContent(type);\n const courseContent = type === 'course';\n const chapterContent = type === 'chapter';\n\n const progressBar =\n mode === MODES.HERO || (!empty && !disabled) ? (\n <div className={!isNil(progress) ? style.progressWrapper : style.hideProgressBar}>\n {!disabled ? (\n <div data-name=\"progress\" className={style.progress} style={inlineProgressValueStyle} />\n ) : null}\n </div>\n ) : null;\n\n const adaptiveIcon = adaptiv ? (\n <div className={classnames(style.adaptiveIcon, courseContent ? style.iconShadow : null)}>\n <AdaptivIcon height={25} />\n </div>\n ) : null;\n\n return (\n <div\n data-name=\"info\"\n className={classnames(\n style.infoWrapper,\n mode === MODES.HERO ? style.hero : style.card,\n disabled ? style.progressBarDisabled : null,\n externalContent ? style.externalContent : null\n )}\n >\n <ContentTypeInfo mode={mode} type={type} externalContent={externalContent} />\n <div\n className={classnames(style.cardInfo, chapterContent ? style.microLearningCardInfo : null)}\n >\n {adaptiveIcon}\n <CardTitle title={title} empty={empty} courseContent={courseContent} />\n <AuthorName\n author={author}\n empty={empty}\n courseContent={courseContent}\n certifiedAuthor={certifiedAuthor}\n />\n </div>\n {progressBar}\n </div>\n );\n};\n\nContentInfo.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentInfo.propTypes = {\n adaptiv: PropTypes.bool,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n disabled: PropTypes.bool,\n empty: PropTypes.bool,\n progress: PropTypes.number,\n title: PropTypes.string,\n type: PropTypes.string,\n mode: PropTypes.string\n};\n\nexport default ContentInfo;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/card-content/index.js"],"names":["MODES","HERO","CARD","ContentTypeInfo","mode","type","externalContent","context","translate","style","microLearningIcon","microLearninglabel","EXTERNAL_CONTENT_ICONS","textColor","color","contentTypeInfo","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","bool","string","CardTitle","title","empty","courseContent","innerHTML","lightTitle","darkTitle","__html","AuthorName","author","certifiedAuthor","checkIcon","authorIcon","iconShadow","darkAuthorTitle","ContentInfo","adaptiv","disabled","progress","badgeCategory","badgeLabel","progressBarColor","inlineProgressValueStyle","backgroundColor","width","chapterContent","progressBar","progressWrapper","hideProgressBar","adaptiveIcon","infoWrapper","hero","card","progressBarDisabled","cardInfo","microLearningCardInfo","iconWrapper","number","ContentBadge","category","label"],"mappings":";;;;;;;A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AC,qBAAD;AAAc,IAAA,QAAQ,EAAEgB,aAAxB;AAAuC,IAAA,KAAK,EAAEC;AAA9C,IADD,GAEG,IAJN,CAHF,eASE,6BAAC,SAAD;AAAW,IAAA,KAAK,EAAEnB,KAAlB;AAAyB,IAAA,KAAK,EAAEC,KAAhC;AAAuC,IAAA,aAAa,EAAEC;AAAtD,IATF,eAUE,6BAAC,UAAD;AACE,IAAA,MAAM,EAAEM,MADV;AAEE,IAAA,KAAK,EAAEP,KAFT;AAGE,IAAA,aAAa,EAAEC,aAHjB;AAIE,IAAA,eAAe,EAAEO;AAJnB,IAVF,CAVF,EA2BGgB,WA3BH,CADF;AA+BD,CApED;;AAsEAX,WAAW,CAACvB,YAAZ,GAA2B;AACzBC,EAAAA,IAAI,EAAEC,kBAASC,iBAAT,CAA2BF;AADR,CAA3B;AAIAsB,WAAW,CAACnB,SAAZ,2CAAwB;AACtBoB,EAAAA,OAAO,EAAEnB,mBAAUC,IADG;AAEtBW,EAAAA,MAAM,EAAEZ,mBAAUE,MAFI;AAGtBW,EAAAA,eAAe,EAAEb,mBAAUC,IAHL;AAItBmB,EAAAA,QAAQ,EAAEpB,mBAAUC,IAJE;AAKtBI,EAAAA,KAAK,EAAEL,mBAAUC,IALK;AAMtBoB,EAAAA,QAAQ,EAAErB,mBAAUwC,MANE;AAOtBpC,EAAAA,KAAK,EAAEJ,mBAAUE,MAPK;AAQtBlB,EAAAA,IAAI,EAAEgB,mBAAUE,MARM;AAStBnB,EAAAA,IAAI,EAAEiB,mBAAUE,MATM;AAUtBoB,EAAAA,aAAa,EAAEmB,sBAAa1C,SAAb,CAAuB2C,QAVhB;AAWtBnB,EAAAA,UAAU,EAAEkB,sBAAa1C,SAAb,CAAuB4C;AAXb,CAAxB;eAcezB,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isNil} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyAdaptive as AdaptivIcon,\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaCompositionCoorpacademyTimer as TimerIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport ContentBadge from '../../atom/content-badge';\nimport {innerHTML} from '../../atom/label/style.css';\nimport style from './style.css';\n\nexport const MODES = {\n HERO: 'hero',\n CARD: 'card'\n};\n\nconst ContentTypeInfo = ({mode, type, externalContent}, context) => {\n const {translate} = context;\n if (mode !== MODES.CARD) {\n return null;\n }\n\n if (type === 'chapter') {\n return (\n <div className={style.microLearningIcon}>\n <TimerIcon height={40} width={40} />\n <span className={style.microLearninglabel}>{\"5' learning\"}</span>\n </div>\n );\n }\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const textColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n return (\n <div className={style.contentTypeInfo} style={{color: textColor}}>\n {type === 'scorm' ? translate('external_content_scorm') : ''}\n {type === 'video' ? translate('external_content_video') : ''}\n {type === 'article' ? translate('external_content_article') : ''}\n {type === 'podcast' ? translate('external_content_podcast') : ''}\n </div>\n );\n }\n\n return null;\n};\n\nContentTypeInfo.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContentTypeInfo.propTypes = {\n externalContent: PropTypes.bool,\n type: PropTypes.string,\n mode: PropTypes.string\n};\n\nconst CardTitle = ({title, empty, courseContent}) => {\n return (\n <div\n className={classnames(\n style.title,\n innerHTML,\n courseContent ? style.lightTitle : style.darkTitle,\n empty ? style.empty : null\n )}\n data-name=\"title\"\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n );\n};\n\nCardTitle.propTypes = {\n title: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool\n};\n\nconst AuthorName = ({author, empty, courseContent, certifiedAuthor}) => {\n const checkIcon = certifiedAuthor ? (\n <CheckIcon\n className={classnames(style.authorIcon, courseContent ? style.iconShadow : null)}\n color=\"inherit\"\n />\n ) : null;\n\n return (\n <div\n data-name=\"author\"\n title={author}\n className={classnames(\n style.author,\n courseContent ? style.lightTitle : style.darkAuthorTitle,\n empty ? style.empty : null\n )}\n >\n <span>{author}</span>\n {checkIcon}\n </div>\n );\n};\n\nAuthorName.propTypes = {\n author: PropTypes.string,\n empty: PropTypes.bool,\n courseContent: PropTypes.bool,\n certifiedAuthor: PropTypes.bool\n};\n\nconst ContentInfo = ({\n adaptiv,\n author,\n certifiedAuthor = false,\n disabled = false,\n empty = false,\n mode = MODES.CARD,\n progress,\n title,\n type,\n badgeCategory,\n badgeLabel\n}) => {\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${progress * 100}%`\n };\n const externalContent = isExternalContent(type);\n const courseContent = type === 'course';\n const chapterContent = type === 'chapter';\n\n const progressBar =\n mode === MODES.HERO || (!empty && !disabled) ? (\n <div className={!isNil(progress) ? style.progressWrapper : style.hideProgressBar}>\n {!disabled ? (\n <div data-name=\"progress\" className={style.progress} style={inlineProgressValueStyle} />\n ) : null}\n </div>\n ) : null;\n\n const adaptiveIcon = adaptiv ? (\n <div className={classnames(style.adaptiveIcon, courseContent ? style.iconShadow : null)}>\n <AdaptivIcon height={25} />\n </div>\n ) : null;\n\n return (\n <div\n data-name=\"info\"\n className={classnames(\n style.infoWrapper,\n mode === MODES.HERO ? style.hero : style.card,\n disabled ? style.progressBarDisabled : null,\n externalContent ? style.externalContent : null\n )}\n >\n <ContentTypeInfo mode={mode} type={type} externalContent={externalContent} />\n <div\n className={classnames(style.cardInfo, chapterContent ? style.microLearningCardInfo : null)}\n >\n <div className={style.iconWrapper}>\n {adaptiveIcon}\n {!empty && badgeLabel && badgeCategory && courseContent ? (\n <ContentBadge category={badgeCategory} label={badgeLabel} />\n ) : null}\n </div>\n <CardTitle title={title} empty={empty} courseContent={courseContent} />\n <AuthorName\n author={author}\n empty={empty}\n courseContent={courseContent}\n certifiedAuthor={certifiedAuthor}\n />\n </div>\n {progressBar}\n </div>\n );\n};\n\nContentInfo.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentInfo.propTypes = {\n adaptiv: PropTypes.bool,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n disabled: PropTypes.bool,\n empty: PropTypes.bool,\n progress: PropTypes.number,\n title: PropTypes.string,\n type: PropTypes.string,\n mode: PropTypes.string,\n badgeCategory: ContentBadge.propTypes.category,\n badgeLabel: ContentBadge.propTypes.label\n};\n\nexport default ContentInfo;\n"],"file":"index.js"}
@@ -13,20 +13,23 @@
13
13
  .microLearningCardInfo {
14
14
  flex: 1 0 auto;
15
15
  }
16
+
16
17
  .microLearningIcon {
17
18
  display: flex;
18
19
  flex-direction: column;
19
20
  align-self: center;
20
21
  margin-top: 53px;
21
22
  }
23
+
22
24
  .microLearningIcon svg {
23
25
  background:white;
24
26
  border-radius: 50%;
25
- margin: 0px auto;
27
+ margin: 0 auto;
26
28
  padding: 3px;
27
29
  box-sizing: content-box;
28
30
  color: lightBlack;
29
31
  }
32
+
30
33
  .microLearninglabel {
31
34
  font-family: 'Open Sans';
32
35
  font-size: 10px;
@@ -34,6 +37,7 @@
34
37
  color: lightBlack;
35
38
  text-transform: uppercase;
36
39
  }
40
+
37
41
  .infoWrapper {
38
42
  display: flex;
39
43
  flex-direction: column;
@@ -60,7 +64,7 @@
60
64
  }
61
65
 
62
66
  .darkTitle {
63
- color: lightBlack
67
+ color: lightBlack;
64
68
  }
65
69
 
66
70
  .darkAuthorTitle {
@@ -138,8 +142,13 @@
138
142
  font-size: 5px;
139
143
  width: 25px;
140
144
  height: 25px;
141
- margin-top: -25px;
142
145
  color: lightBlack;
146
+ margin-right: 5px;
147
+ }
148
+
149
+ .iconWrapper {
150
+ display: flex;
151
+ align-items: center;
143
152
  }
144
153
 
145
154
  .authorIcon {
@@ -183,6 +192,7 @@
183
192
  font-size: 10px;
184
193
  font-weight: 700;
185
194
  }
195
+
186
196
  .externalContent .cardInfo {
187
197
  flex-grow: 2;
188
198
  max-height: 115px;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _react = _interopRequireDefault(require("react"));
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ var _novaIcons = require("@coorpacademy/nova-icons");
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _button = _interopRequireDefault(require("../../atom/button"));
15
+
16
+ var _style = _interopRequireDefault(require("./style.css"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ const CMPopin = props => {
21
+ const {
22
+ content,
23
+ firstButton,
24
+ secondButton,
25
+ onClose,
26
+ icon
27
+ } = props;
28
+ const logo = {
29
+ AlertDiamond: _novaIcons.NovaSolidInterfaceFeedbackInterfaceAlertDiamond,
30
+ WindowUpload: _novaIcons.NovaSolidApplicationsWindowUpload3
31
+ };
32
+ const LogoComponent = logo[icon];
33
+ return /*#__PURE__*/_react.default.createElement("div", {
34
+ className: _style.default.background
35
+ }, /*#__PURE__*/_react.default.createElement("div", {
36
+ className: _style.default.popin
37
+ }, /*#__PURE__*/_react.default.createElement("header", {
38
+ className: _style.default.popinHeader
39
+ }, onClose ? /*#__PURE__*/_react.default.createElement("div", {
40
+ className: _style.default.headerCloseIconContainer,
41
+ onClick: onClose,
42
+ "data-name": 'close-icon'
43
+ }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidStatusClose, {
44
+ className: _style.default.headerCloseIcon
45
+ })) : null), /*#__PURE__*/_react.default.createElement("div", {
46
+ className: _style.default.contentSection
47
+ }, LogoComponent ? /*#__PURE__*/_react.default.createElement(LogoComponent, {
48
+ className: _style.default.icon
49
+ }) : null, /*#__PURE__*/_react.default.createElement("p", {
50
+ className: _style.default.content,
51
+ "data-name": `cm-popin-content` // eslint-disable-next-line react/no-danger
52
+ ,
53
+ dangerouslySetInnerHTML: {
54
+ __html: content
55
+ }
56
+ })), /*#__PURE__*/_react.default.createElement("div", {
57
+ className: _style.default.buttonContainer
58
+ }, firstButton ? /*#__PURE__*/_react.default.createElement(_button.default, {
59
+ submitValue: firstButton.label,
60
+ onClick: firstButton.handleOnclick,
61
+ name: `cm-popin-cta`,
62
+ className: _style.default.button,
63
+ buttonContentClassName: _style.default.buttonContent
64
+ }) : null, secondButton ? /*#__PURE__*/_react.default.createElement(_button.default, {
65
+ submitValue: secondButton.label,
66
+ onClick: secondButton.handleOnclick,
67
+ name: `cm-popin-cta-${secondButton.type}`,
68
+ className: _style.default.button,
69
+ buttonContentClassName: (0, _classnames.default)([_style.default.buttonContent, secondButton.type === 'dangerous' ? _style.default.dangerousButton : _style.default.coloredButton])
70
+ }) : null)), ")");
71
+ };
72
+
73
+ CMPopin.propTypes = process.env.NODE_ENV !== "production" ? {
74
+ content: _propTypes.default.string,
75
+ firstButton: _propTypes.default.shape({
76
+ label: _propTypes.default.string,
77
+ handleOnclick: _propTypes.default.func
78
+ }),
79
+ secondButton: _propTypes.default.shape({
80
+ label: _propTypes.default.string,
81
+ handleOnclick: _propTypes.default.func,
82
+ type: _propTypes.default.oneOf(['warning', 'warningWithClose', 'dangerous', 'default'])
83
+ }),
84
+ onClose: _propTypes.default.func,
85
+ icon: _propTypes.default.string
86
+ } : {};
87
+ var _default = CMPopin;
88
+ exports.default = _default;
89
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["CMPopin","props","content","firstButton","secondButton","onClose","icon","logo","AlertDiamond","WindowUpload","LogoComponent","style","background","popin","popinHeader","headerCloseIconContainer","headerCloseIcon","contentSection","__html","buttonContainer","label","handleOnclick","button","buttonContent","type","dangerousButton","coloredButton","propTypes","PropTypes","string","shape","func","oneOf"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAKA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GA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UGnB,YAAY,gBACX,6BAAC,eAAD;AACE,IAAA,WAAW,EAAEA,YAAY,CAACgB,KAD5B;AAEE,IAAA,OAAO,EAAEhB,YAAY,CAACiB,aAFxB;AAGE,IAAA,IAAI,EAAG,gBAAejB,YAAY,CAACoB,IAAK,EAH1C;AAIE,IAAA,SAAS,EAAEb,eAAMW,MAJnB;AAKE,IAAA,sBAAsB,EAAE,yBAAW,CACjCX,eAAMY,aAD2B,EAEjCnB,YAAY,CAACoB,IAAb,KAAsB,WAAtB,GAAoCb,eAAMc,eAA1C,GAA4Dd,eAAMe,aAFjC,CAAX;AAL1B,IADW,GAWT,IArBN,CAtBF,CADF,MADF;AAmDD,CA5DD;;AA8DA1B,OAAO,CAAC2B,SAAR,2CAAoB;AAClBzB,EAAAA,OAAO,EAAE0B,mBAAUC,MADD;AAElB1B,EAAAA,WAAW,EAAEyB,mBAAUE,KAAV,CAAgB;AAC3BV,IAAAA,KAAK,EAAEQ,mBAAUC,MADU;AAE3BR,IAAAA,aAAa,EAAEO,mBAAUG;AAFE,GAAhB,CAFK;AAMlB3B,EAAAA,YAAY,EAAEwB,mBAAUE,KAAV,CAAgB;AAC5BV,IAAAA,KAAK,EAAEQ,mBAAUC,MADW;AAE5BR,IAAAA,aAAa,EAAEO,mBAAUG,IAFG;AAG5BP,IAAAA,IAAI,EAAEI,mBAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,kBAAZ,EAAgC,WAAhC,EAA6C,SAA7C,CAAhB;AAHsB,GAAhB,CANI;AAWlB3B,EAAAA,OAAO,EAAEuB,mBAAUG,IAXD;AAYlBzB,EAAAA,IAAI,EAAEsB,mBAAUC;AAZE,CAApB;eAee7B,O","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaSolidStatusClose as Close\n} from '@coorpacademy/nova-icons';\nimport classNames from 'classnames';\nimport Cta from '../../atom/button';\nimport style from './style.css';\n\nconst CMPopin = props => {\n const {content, firstButton, secondButton, onClose, icon} = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload\n };\n const LogoComponent = logo[icon];\n\n return (\n <div className={style.background}>\n <div className={style.popin}>\n <header className={style.popinHeader}>\n {onClose ? (\n <div\n className={style.headerCloseIconContainer}\n onClick={onClose}\n data-name={'close-icon'}\n >\n <Close className={style.headerCloseIcon} />\n </div>\n ) : null}\n </header>\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n <p\n className={style.content}\n data-name={`cm-popin-content`}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n </div>\n\n <div className={style.buttonContainer}>\n {firstButton ? (\n <Cta\n submitValue={firstButton.label}\n onClick={firstButton.handleOnclick}\n name={`cm-popin-cta`}\n className={style.button}\n buttonContentClassName={style.buttonContent}\n />\n ) : null}\n {secondButton ? (\n <Cta\n submitValue={secondButton.label}\n onClick={secondButton.handleOnclick}\n name={`cm-popin-cta-${secondButton.type}`}\n className={style.button}\n buttonContentClassName={classNames([\n style.buttonContent,\n secondButton.type === 'dangerous' ? style.dangerousButton : style.coloredButton\n ])}\n />\n ) : null}\n </div>\n </div>\n )\n </div>\n );\n};\n\nCMPopin.propTypes = {\n content: PropTypes.string,\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['warning', 'warningWithClose', 'dangerous', 'default'])\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string\n};\n\nexport default CMPopin;\n"],"file":"index.js"}
@@ -0,0 +1,157 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value dark from colors;
3
+ @value brand from colors;
4
+ @value light from colors;
5
+ @value black from colors;
6
+ @value cm_grey_800 from colors;
7
+ @value negative from colors;
8
+ @value lightGreen from colors;
9
+ @value cm_grey_50 from colors;
10
+ @value cm_negative_100 from colors;
11
+ @value cm_negative_200 from colors;
12
+ @value cm_primary_blue from colors;
13
+ @value cm_grey_100 from colors;
14
+ @value cm_grey_200 from colors;
15
+ @value cm_blue_600 from colors;
16
+
17
+
18
+ .background {
19
+ top: 0px;
20
+ width: 100%;
21
+ height: 100%;
22
+ margin: 0;
23
+ padding: 15% 25%;
24
+ background-color: rgba(0, 0, 0, 0.2);
25
+ align-items: center;
26
+ justify-content: center;
27
+ box-sizing: border-box;
28
+ overflow: hidden;
29
+ display: flex;
30
+ }
31
+
32
+ .popin {
33
+ position: absolute;
34
+ overflow: auto;
35
+ width: 500px;
36
+ height: 414px;
37
+ flex-grow: 0;
38
+ margin: 16px;
39
+ padding: 16px 16px 20px 16px;
40
+ border-radius: 20px;
41
+ background-color: cm_grey_50;
42
+ display: flex;
43
+ flex-direction: column;
44
+ align-items: center;
45
+ justify-content: space-between;
46
+ }
47
+
48
+ .contentSection {
49
+ display: flex;
50
+ flex-direction: column;
51
+ align-items: center;
52
+ justify-content: center;
53
+ width: 65%;
54
+ }
55
+
56
+ .content {
57
+ font-family: Gilroy;
58
+ font-size: 20px;
59
+ font-weight: bold;
60
+ font-stretch: normal;
61
+ font-style: normal;
62
+ line-height: 1.4;
63
+ letter-spacing: normal;
64
+ text-align: center;
65
+ color: cm_grey_800;
66
+ }
67
+
68
+ .buttonContainer {
69
+ width: 100%;
70
+ height: 80px;
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ }
75
+
76
+ .button {
77
+ min-width: auto;
78
+ margin: 0px 8px;
79
+ border-radius: 7px;
80
+ transform: none;
81
+ }
82
+
83
+ .dangerousButton {
84
+ background-color: cm_negative_100;
85
+ color: white;
86
+ }
87
+
88
+ .coloredButton {
89
+ background-color: cm_primary_blue;
90
+ color: white;
91
+ }
92
+
93
+ .dangerousButton:hover {
94
+ background-color: cm_negative_200;
95
+ }
96
+
97
+ .coloredButton:hover {
98
+ background-color: cm_blue_600;
99
+ }
100
+
101
+ .button::after,
102
+ .button:hover::after,
103
+ .button:focus::after,
104
+ .button:active::after {
105
+ transform: none;
106
+ }
107
+
108
+
109
+ .buttonContent {
110
+ width: 180px;
111
+ padding: 12px 24px;
112
+ line-height: 1.43;
113
+ font-size: 14px;
114
+ font-weight: bold;
115
+ display: block;
116
+ text-transform: inherit;
117
+ font-family: Gilroy;
118
+ text-align: center;
119
+ box-sizing: border-box;
120
+ border: none;
121
+ cursor: pointer;
122
+ }
123
+ .icon {
124
+ width: 60px;
125
+ height: 60px;
126
+ color: cm_grey_800;
127
+ }
128
+
129
+ .headerCloseIconContainer {
130
+ width: 44px;
131
+ height: 44px;
132
+ display: flex;
133
+ flex-direction: row;
134
+ justify-content: center;
135
+ align-items: center;
136
+ margin-top: 16px;
137
+ margin-right: 16px;
138
+ border-radius: 7px;
139
+ cursor: pointer;
140
+ background-color: cm_grey_100;
141
+ }
142
+
143
+ .headerCloseIconContainer:hover {
144
+ background-color: cm_grey_200;
145
+ }
146
+
147
+ .headerCloseIcon {
148
+ width: 18px;
149
+ height: 18px;
150
+ color: cm_grey_800;
151
+ }
152
+
153
+ .popinHeader {
154
+ width: 100%;
155
+ display: flex;
156
+ justify-content: flex-end;
157
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ props: {
7
+ content: 'Are you sure to undo this changes? This will be permanent',
8
+ icon: 'AlertDiamond',
9
+ firstButton: {
10
+ label: 'Cancel',
11
+ handleOnClick: () => {}
12
+ },
13
+ secondButton: {
14
+ label: 'Undo',
15
+ type: 'dangerous',
16
+ handleOnClick: () => {}
17
+ }
18
+ }
19
+ };
20
+ exports.default = _default;
21
+ //# sourceMappingURL=dangerous.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/dangerous.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,2DADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,MADK;AAEZG,MAAAA,IAAI,EAAE,WAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX;AAPT;AADM,C","sourcesContent":["export default {\n props: {\n content: 'Are you sure to undo this changes? This will be permanent',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Cancel',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'dangerous',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"dangerous.js"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ props: {
7
+ content: 'Do you want to publish the custom playlist?',
8
+ icon: 'WindowUpload',
9
+ firstButton: {
10
+ label: 'Cancel',
11
+ handleOnClick: () => {}
12
+ },
13
+ secondButton: {
14
+ label: 'Undo',
15
+ type: 'warning',
16
+ handleOnClick: () => {}
17
+ }
18
+ }
19
+ };
20
+ exports.default = _default;
21
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/default.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,6CADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,QADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,MADK;AAEZG,MAAAA,IAAI,EAAE,SAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX;AAPT;AADM,C","sourcesContent":["export default {\n props: {\n content: 'Do you want to publish the custom playlist?',\n icon: 'WindowUpload',\n firstButton: {\n label: 'Cancel',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Undo',\n type: 'warning',\n handleOnClick: () => {}\n }\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _default = {
6
+ props: {
7
+ content: 'Do you want to save changes before quiting?',
8
+ icon: 'AlertDiamond',
9
+ firstButton: {
10
+ label: 'Quit without saving',
11
+ handleOnClick: () => {}
12
+ },
13
+ secondButton: {
14
+ label: 'Save & Quit',
15
+ type: 'warningWithClose',
16
+ handleOnClick: () => {}
17
+ },
18
+ onClose: () => console.log('onClose')
19
+ }
20
+ };
21
+ exports.default = _default;
22
+ //# sourceMappingURL=warning-with-close.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/cm-popin/test/fixtures/warning-with-close.js"],"names":["props","content","icon","firstButton","label","handleOnClick","secondButton","type","onClose","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,6CADJ;AAELC,IAAAA,IAAI,EAAE,cAFD;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,qBADI;AAEXC,MAAAA,aAAa,EAAE,MAAM,CAAE;AAFZ,KAHR;AAOLC,IAAAA,YAAY,EAAE;AACZF,MAAAA,KAAK,EAAE,aADK;AAEZG,MAAAA,IAAI,EAAE,kBAFM;AAGZF,MAAAA,aAAa,EAAE,MAAM,CAAE;AAHX,KAPT;AAYLG,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,SAAZ;AAZV;AADM,C","sourcesContent":["export default {\n props: {\n content: 'Do you want to save changes before quiting?',\n icon: 'AlertDiamond',\n firstButton: {\n label: 'Quit without saving',\n handleOnClick: () => {}\n },\n secondButton: {\n label: 'Save & Quit',\n type: 'warningWithClose',\n handleOnClick: () => {}\n },\n onClose: () => console.log('onClose')\n }\n};\n"],"file":"warning-with-close.js"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ var _loading = _interopRequireDefault(require("./fixtures/loading"));
14
+
15
+ var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
16
+
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+
19
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
20
+ t.pass();
21
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
22
+ t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
23
+ });
24
+ });
25
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
27
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
28
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
@@ -7,6 +7,8 @@ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
10
12
  var _novaIcons = require("@coorpacademy/nova-icons");
11
13
 
12
14
  var _link = _interopRequireDefault(require("../../atom/link"));
@@ -43,7 +45,8 @@ const buildItemsOfSection = items => {
43
45
  category,
44
46
  label,
45
47
  title,
46
- author
48
+ author,
49
+ unsaved = false
47
50
  } = item;
48
51
  return /*#__PURE__*/_react.default.createElement("li", {
49
52
  className: _style.default.contentWrapper,
@@ -58,7 +61,7 @@ const buildItemsOfSection = items => {
58
61
  category: category,
59
62
  label: label
60
63
  }), /*#__PURE__*/_react.default.createElement("span", {
61
- className: _style.default.contentTitle,
64
+ className: (0, _classnames.default)(_style.default.contentTitle, unsaved && _style.default.unsaved),
62
65
  title: title // eslint-disable-next-line react/no-danger
63
66
  ,
64
67
  dangerouslySetInnerHTML: {
@@ -71,11 +74,17 @@ const buildItemsOfSection = items => {
71
74
 
72
75
  case 'text':
73
76
  default:
74
- return /*#__PURE__*/_react.default.createElement("li", {
75
- key: `${item.text}-${index}`
76
- }, /*#__PURE__*/_react.default.createElement("span", {
77
- className: _style.default.valueSimpleText
78
- }, item.text));
77
+ {
78
+ const {
79
+ text,
80
+ unsaved = false
81
+ } = item;
82
+ return /*#__PURE__*/_react.default.createElement("li", {
83
+ key: `${item.text}-${index}`
84
+ }, /*#__PURE__*/_react.default.createElement("span", {
85
+ className: (0, _classnames.default)(_style.default.valueSimpleText, unsaved && _style.default.unsaved)
86
+ }, text));
87
+ }
79
88
  }
80
89
  });
81
90
  };
@@ -133,15 +142,32 @@ const WizardSummary = props => {
133
142
  sections,
134
143
  action
135
144
  } = props;
136
- const sectionView = buildSections(sections);
145
+ const sectionsView = buildSections(sections);
137
146
  const actionView = buildAction(action);
147
+ const idSwitch = 'open-summary-wizard';
138
148
  return /*#__PURE__*/_react.default.createElement("div", {
139
149
  className: _style.default.container
140
150
  }, /*#__PURE__*/_react.default.createElement("span", {
141
- className: _style.default.summaryTitle
142
- }, title), /*#__PURE__*/_react.default.createElement("div", {
151
+ className: _style.default.desktopSummaryTitle
152
+ }, title), /*#__PURE__*/_react.default.createElement("input", {
153
+ type: "checkbox",
154
+ id: idSwitch,
155
+ name: "toogle",
156
+ title: idSwitch,
157
+ className: _style.default.checkbox
158
+ }), /*#__PURE__*/_react.default.createElement("div", {
143
159
  className: _style.default.summary
144
- }, sectionView), /*#__PURE__*/_react.default.createElement("div", {
160
+ }, /*#__PURE__*/_react.default.createElement("div", {
161
+ className: _style.default.tabletSummaryHeader
162
+ }, /*#__PURE__*/_react.default.createElement("label", {
163
+ htmlFor: idSwitch
164
+ }, /*#__PURE__*/_react.default.createElement("span", {
165
+ className: _style.default.tabletSummaryTitle
166
+ }, title), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
167
+ className: _style.default.tabletSummaryIcon
168
+ }))), /*#__PURE__*/_react.default.createElement("div", {
169
+ className: _style.default.summarySections
170
+ }, sectionsView)), /*#__PURE__*/_react.default.createElement("div", {
145
171
  className: _style.default.actionZone
146
172
  }, actionView));
147
173
  };
@@ -156,13 +182,15 @@ WizardSummary.propTypes = process.env.NODE_ENV !== "production" ? {
156
182
  value: _propTypes.default.string
157
183
  }), _propTypes.default.shape({
158
184
  type: _propTypes.default.string,
159
- text: _propTypes.default.string
185
+ text: _propTypes.default.string,
186
+ unsaved: _propTypes.default.bool
160
187
  }), _propTypes.default.shape({
161
188
  type: _propTypes.default.string,
162
189
  category: _propTypes.default.oneOf(['base', 'advanced', 'coach', 'chapter', 'scorm', 'video', 'article', 'podcast']),
163
190
  title: _propTypes.default.string,
164
191
  label: _propTypes.default.string,
165
- author: _propTypes.default.string
192
+ author: _propTypes.default.string,
193
+ unsaved: _propTypes.default.bool
166
194
  })])),
167
195
  counterText: _propTypes.default.string
168
196
  })),