@coorpacademy/components 11.18.4-alpha.3 → 11.18.4

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 (89) hide show
  1. package/es/atom/picture-background/index.d.ts +1 -0
  2. package/es/atom/picture-background/index.js +10 -5
  3. package/es/atom/picture-background/index.js.map +1 -1
  4. package/es/molecule/card/index.d.ts.map +1 -1
  5. package/es/molecule/card/index.js +9 -10
  6. package/es/molecule/card/index.js.map +1 -1
  7. package/es/molecule/card/style.css +5 -41
  8. package/es/molecule/cm-popin/index.d.ts.map +1 -1
  9. package/es/molecule/cm-popin/index.js +9 -45
  10. package/es/molecule/cm-popin/index.js.map +1 -1
  11. package/es/molecule/cm-popin/style.css +0 -29
  12. package/es/molecule/cm-popin/types.d.ts +1 -31
  13. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  14. package/es/molecule/cm-popin/types.js +3 -13
  15. package/es/molecule/cm-popin/types.js.map +1 -1
  16. package/es/template/app-player/loading/index.d.ts +1 -19
  17. package/es/template/app-player/player/index.d.ts +2 -38
  18. package/es/template/app-player/player/slides/index.d.ts +1 -19
  19. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  20. package/es/template/app-player/popin-correction/index.d.ts +1 -19
  21. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  22. package/es/template/app-player/popin-end/index.d.ts +1 -19
  23. package/es/template/app-review/index.d.ts +1 -19
  24. package/es/template/app-review/index.d.ts.map +1 -1
  25. package/es/template/app-review/player/prop-types.d.ts +1 -19
  26. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  27. package/es/template/app-review/prop-types.d.ts +1 -19
  28. package/es/template/app-review/prop-types.d.ts.map +1 -1
  29. package/es/template/back-office/brand-update/index.d.ts +1 -19
  30. package/es/template/common/dashboard/index.d.ts +1 -89
  31. package/es/template/common/dashboard/index.d.ts.map +1 -1
  32. package/es/template/common/dashboard/index.js +2 -4
  33. package/es/template/common/dashboard/index.js.map +1 -1
  34. package/es/template/common/search-page/index.d.ts +0 -70
  35. package/es/template/common/search-page/index.d.ts.map +1 -1
  36. package/es/template/common/search-page/index.js +3 -8
  37. package/es/template/common/search-page/index.js.map +1 -1
  38. package/es/template/common/search-page/style.css +0 -5
  39. package/es/template/external-course/index.d.ts +1 -19
  40. package/es/variables/colors.css +1 -1
  41. package/lib/atom/picture-background/index.d.ts +1 -0
  42. package/lib/atom/picture-background/index.js +10 -5
  43. package/lib/atom/picture-background/index.js.map +1 -1
  44. package/lib/molecule/card/index.d.ts.map +1 -1
  45. package/lib/molecule/card/index.js +7 -9
  46. package/lib/molecule/card/index.js.map +1 -1
  47. package/lib/molecule/card/style.css +5 -41
  48. package/lib/molecule/cm-popin/index.d.ts.map +1 -1
  49. package/lib/molecule/cm-popin/index.js +8 -47
  50. package/lib/molecule/cm-popin/index.js.map +1 -1
  51. package/lib/molecule/cm-popin/style.css +0 -29
  52. package/lib/molecule/cm-popin/types.d.ts +1 -31
  53. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  54. package/lib/molecule/cm-popin/types.js +3 -15
  55. package/lib/molecule/cm-popin/types.js.map +1 -1
  56. package/lib/template/app-player/loading/index.d.ts +1 -19
  57. package/lib/template/app-player/player/index.d.ts +2 -38
  58. package/lib/template/app-player/player/slides/index.d.ts +1 -19
  59. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  60. package/lib/template/app-player/popin-correction/index.d.ts +1 -19
  61. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  62. package/lib/template/app-player/popin-end/index.d.ts +1 -19
  63. package/lib/template/app-review/index.d.ts +1 -19
  64. package/lib/template/app-review/index.d.ts.map +1 -1
  65. package/lib/template/app-review/player/prop-types.d.ts +1 -19
  66. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  67. package/lib/template/app-review/prop-types.d.ts +1 -19
  68. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  69. package/lib/template/back-office/brand-update/index.d.ts +1 -19
  70. package/lib/template/common/dashboard/index.d.ts +1 -89
  71. package/lib/template/common/dashboard/index.d.ts.map +1 -1
  72. package/lib/template/common/dashboard/index.js +2 -4
  73. package/lib/template/common/dashboard/index.js.map +1 -1
  74. package/lib/template/common/search-page/index.d.ts +0 -70
  75. package/lib/template/common/search-page/index.d.ts.map +1 -1
  76. package/lib/template/common/search-page/index.js +3 -9
  77. package/lib/template/common/search-page/index.js.map +1 -1
  78. package/lib/template/common/search-page/style.css +0 -5
  79. package/lib/template/external-course/index.d.ts +1 -19
  80. package/lib/variables/colors.css +1 -1
  81. package/package.json +2 -2
  82. package/es/atom/title/types.d.ts +0 -9
  83. package/es/atom/title/types.d.ts.map +0 -1
  84. package/es/atom/title/types.js +0 -2
  85. package/es/atom/title/types.js.map +0 -1
  86. package/lib/atom/title/types.d.ts +0 -9
  87. package/lib/atom/title/types.d.ts.map +0 -1
  88. package/lib/atom/title/types.js +0 -2
  89. package/lib/atom/title/types.js.map +0 -1
@@ -9,6 +9,7 @@ declare namespace PictureBackground {
9
9
  const style: PropTypes.Requireable<{
10
10
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
11
11
  }>;
12
+ const alt: PropTypes.Requireable<string>;
12
13
  }
13
14
  }
14
15
  import PropTypes from "prop-types";
@@ -13,7 +13,8 @@ const PictureBackground = props => {
13
13
  const {
14
14
  src,
15
15
  view,
16
- style
16
+ style,
17
+ alt = ''
17
18
  } = props;
18
19
  const mobile = src.mobile;
19
20
  const desktop = src.desktop;
@@ -24,15 +25,18 @@ const PictureBackground = props => {
24
25
  className: cssStyle.mobileContainer
25
26
  }, /*#__PURE__*/React.createElement("img", {
26
27
  className: classnames(cssStyle.picture, bgStyle),
27
- src: mobile
28
+ src: mobile,
29
+ alt: alt
28
30
  })), /*#__PURE__*/React.createElement("div", {
29
31
  className: cssStyle.desktopContainer
30
32
  }, /*#__PURE__*/React.createElement("img", {
31
33
  className: classnames(cssStyle.picture, bgStyle),
32
- src: desktop
34
+ src: desktop,
35
+ alt: alt
33
36
  }))) : /*#__PURE__*/React.createElement("img", {
34
37
  className: classnames(cssStyle.default, bgStyle),
35
- src: src
38
+ src: src,
39
+ alt: alt
36
40
  });
37
41
  return /*#__PURE__*/React.createElement("div", {
38
42
  className: cssStyle.wrapper,
@@ -43,7 +47,8 @@ const PictureBackground = props => {
43
47
  PictureBackground.propTypes = process.env.NODE_ENV !== "production" ? {
44
48
  view: PropTypes.oneOf(_keys(viewStyle)),
45
49
  src: PropTypes.oneOfType([PropTypes.objectOf(PropTypes.string), PropTypes.string.isRequired]),
46
- style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
50
+ style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
51
+ alt: PropTypes.string
47
52
  } : {};
48
53
  export default PictureBackground;
49
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classnames","cssStyle","viewStyle","cover","contain","PictureBackground","props","src","view","style","mobile","desktop","bgStyle","pictureView","deviceView","mobileContainer","picture","desktopContainer","default","wrapper","propTypes","oneOf","oneOfType","objectOf","string","isRequired","number"],"sources":["../../../src/atom/picture-background/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isObject, keys} from 'lodash/fp';\nimport cssStyle from './style.css';\n\nconst viewStyle = {\n cover: cssStyle.cover,\n contain: cssStyle.contain\n};\n\nconst PictureBackground = props => {\n const {src, view, style} = props;\n const mobile = src.mobile;\n const desktop = src.desktop;\n const bgStyle = viewStyle[view];\n\n const pictureView = isObject(src) ? (\n <div className={cssStyle.deviceView}>\n <div className={cssStyle.mobileContainer}>\n <img className={classnames(cssStyle.picture, bgStyle)} src={mobile} />\n </div>\n <div className={cssStyle.desktopContainer}>\n <img className={classnames(cssStyle.picture, bgStyle)} src={desktop} />\n </div>\n </div>\n ) : (\n <img className={classnames(cssStyle.default, bgStyle)} src={src} />\n );\n\n return (\n <div className={cssStyle.wrapper} style={style}>\n {pictureView}\n </div>\n );\n};\n\nPictureBackground.propTypes = {\n view: PropTypes.oneOf(keys(viewStyle)),\n src: PropTypes.oneOfType([PropTypes.objectOf(PropTypes.string), PropTypes.string.isRequired]),\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport default PictureBackground;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,aAArB;AAEA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEF,QAAQ,CAACE,KADA;EAEhBC,OAAO,EAAEH,QAAQ,CAACG;AAFF,CAAlB;;AAKA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC,GAAD;IAAMC,IAAN;IAAYC;EAAZ,IAAqBH,KAA3B;EACA,MAAMI,MAAM,GAAGH,GAAG,CAACG,MAAnB;EACA,MAAMC,OAAO,GAAGJ,GAAG,CAACI,OAApB;EACA,MAAMC,OAAO,GAAGV,SAAS,CAACM,IAAD,CAAzB;EAEA,MAAMK,WAAW,GAAG,UAASN,GAAT,iBAClB;IAAK,SAAS,EAAEN,QAAQ,CAACa;EAAzB,gBACE;IAAK,SAAS,EAAEb,QAAQ,CAACc;EAAzB,gBACE;IAAK,SAAS,EAAEf,UAAU,CAACC,QAAQ,CAACe,OAAV,EAAmBJ,OAAnB,CAA1B;IAAuD,GAAG,EAAEF;EAA5D,EADF,CADF,eAIE;IAAK,SAAS,EAAET,QAAQ,CAACgB;EAAzB,gBACE;IAAK,SAAS,EAAEjB,UAAU,CAACC,QAAQ,CAACe,OAAV,EAAmBJ,OAAnB,CAA1B;IAAuD,GAAG,EAAED;EAA5D,EADF,CAJF,CADkB,gBAUlB;IAAK,SAAS,EAAEX,UAAU,CAACC,QAAQ,CAACiB,OAAV,EAAmBN,OAAnB,CAA1B;IAAuD,GAAG,EAAEL;EAA5D,EAVF;EAaA,oBACE;IAAK,SAAS,EAAEN,QAAQ,CAACkB,OAAzB;IAAkC,KAAK,EAAEV;EAAzC,GACGI,WADH,CADF;AAKD,CAxBD;;AA0BAR,iBAAiB,CAACe,SAAlB,2CAA8B;EAC5BZ,IAAI,EAAET,SAAS,CAACsB,KAAV,CAAgB,MAAKnB,SAAL,CAAhB,CADsB;EAE5BK,GAAG,EAAER,SAAS,CAACuB,SAAV,CAAoB,CAACvB,SAAS,CAACwB,QAAV,CAAmBxB,SAAS,CAACyB,MAA7B,CAAD,EAAuCzB,SAAS,CAACyB,MAAV,CAAiBC,UAAxD,CAApB,CAFuB;EAG5BhB,KAAK,EAAEV,SAAS,CAACwB,QAAV,CAAmBxB,SAAS,CAACuB,SAAV,CAAoB,CAACvB,SAAS,CAACyB,MAAX,EAAmBzB,SAAS,CAAC2B,MAA7B,CAApB,CAAnB;AAHqB,CAA9B;AAMA,eAAerB,iBAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","classnames","cssStyle","viewStyle","cover","contain","PictureBackground","props","src","view","style","alt","mobile","desktop","bgStyle","pictureView","deviceView","mobileContainer","picture","desktopContainer","default","wrapper","propTypes","oneOf","oneOfType","objectOf","string","isRequired","number"],"sources":["../../../src/atom/picture-background/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isObject, keys} from 'lodash/fp';\nimport cssStyle from './style.css';\n\nconst viewStyle = {\n cover: cssStyle.cover,\n contain: cssStyle.contain\n};\n\nconst PictureBackground = props => {\n const {src, view, style, alt = ''} = props;\n const mobile = src.mobile;\n const desktop = src.desktop;\n const bgStyle = viewStyle[view];\n\n const pictureView = isObject(src) ? (\n <div className={cssStyle.deviceView}>\n <div className={cssStyle.mobileContainer}>\n <img className={classnames(cssStyle.picture, bgStyle)} src={mobile} alt={alt} />\n </div>\n <div className={cssStyle.desktopContainer}>\n <img className={classnames(cssStyle.picture, bgStyle)} src={desktop} alt={alt} />\n </div>\n </div>\n ) : (\n <img className={classnames(cssStyle.default, bgStyle)} src={src} alt={alt} />\n );\n\n return (\n <div className={cssStyle.wrapper} style={style}>\n {pictureView}\n </div>\n );\n};\n\nPictureBackground.propTypes = {\n view: PropTypes.oneOf(keys(viewStyle)),\n src: PropTypes.oneOfType([PropTypes.objectOf(PropTypes.string), PropTypes.string.isRequired]),\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n alt: PropTypes.string\n};\n\nexport default PictureBackground;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,aAArB;AAEA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAEF,QAAQ,CAACE,KADA;EAEhBC,OAAO,EAAEH,QAAQ,CAACG;AAFF,CAAlB;;AAKA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;EACjC,MAAM;IAACC,GAAD;IAAMC,IAAN;IAAYC,KAAZ;IAAmBC,GAAG,GAAG;EAAzB,IAA+BJ,KAArC;EACA,MAAMK,MAAM,GAAGJ,GAAG,CAACI,MAAnB;EACA,MAAMC,OAAO,GAAGL,GAAG,CAACK,OAApB;EACA,MAAMC,OAAO,GAAGX,SAAS,CAACM,IAAD,CAAzB;EAEA,MAAMM,WAAW,GAAG,UAASP,GAAT,iBAClB;IAAK,SAAS,EAAEN,QAAQ,CAACc;EAAzB,gBACE;IAAK,SAAS,EAAEd,QAAQ,CAACe;EAAzB,gBACE;IAAK,SAAS,EAAEhB,UAAU,CAACC,QAAQ,CAACgB,OAAV,EAAmBJ,OAAnB,CAA1B;IAAuD,GAAG,EAAEF,MAA5D;IAAoE,GAAG,EAAED;EAAzE,EADF,CADF,eAIE;IAAK,SAAS,EAAET,QAAQ,CAACiB;EAAzB,gBACE;IAAK,SAAS,EAAElB,UAAU,CAACC,QAAQ,CAACgB,OAAV,EAAmBJ,OAAnB,CAA1B;IAAuD,GAAG,EAAED,OAA5D;IAAqE,GAAG,EAAEF;EAA1E,EADF,CAJF,CADkB,gBAUlB;IAAK,SAAS,EAAEV,UAAU,CAACC,QAAQ,CAACkB,OAAV,EAAmBN,OAAnB,CAA1B;IAAuD,GAAG,EAAEN,GAA5D;IAAiE,GAAG,EAAEG;EAAtE,EAVF;EAaA,oBACE;IAAK,SAAS,EAAET,QAAQ,CAACmB,OAAzB;IAAkC,KAAK,EAAEX;EAAzC,GACGK,WADH,CADF;AAKD,CAxBD;;AA0BAT,iBAAiB,CAACgB,SAAlB,2CAA8B;EAC5Bb,IAAI,EAAET,SAAS,CAACuB,KAAV,CAAgB,MAAKpB,SAAL,CAAhB,CADsB;EAE5BK,GAAG,EAAER,SAAS,CAACwB,SAAV,CAAoB,CAACxB,SAAS,CAACyB,QAAV,CAAmBzB,SAAS,CAAC0B,MAA7B,CAAD,EAAuC1B,SAAS,CAAC0B,MAAV,CAAiBC,UAAxD,CAApB,CAFuB;EAG5BjB,KAAK,EAAEV,SAAS,CAACyB,QAAV,CAAmBzB,SAAS,CAACwB,SAAV,CAAoB,CAACxB,SAAS,CAAC0B,MAAX,EAAmB1B,SAAS,CAAC4B,MAA7B,CAApB,CAAnB,CAHqB;EAI5BjB,GAAG,EAAEX,SAAS,CAAC0B;AAJa,CAA9B;AAOA,eAAepB,iBAAf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;;AAuHA,uDA0HG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/index.js"],"names":[],"mappings":";;;;;;AAuHA,uDAuHG"}
@@ -9,7 +9,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
9
9
  import React, { useMemo, memo } from 'react';
10
10
  import PropTypes from 'prop-types';
11
11
  import classnames from 'classnames';
12
- import { NovaCompositionCoorpacademyPadlock as LockIcon, NovaCompositionCoorpacademyPictures as PicturesIcon } from '@coorpacademy/nova-icons';
12
+ import { NovaSolidLoginLocked as LockIcon, NovaCompositionCoorpacademyPictures as PicturesIcon } from '@coorpacademy/nova-icons';
13
13
  import { isExternalContent, EXTERNAL_CONTENT_ICONS } from '../../util/external-content';
14
14
  import Provider from '../../atom/provider';
15
15
  import CardContentInfo, { MODES } from '../card-content';
@@ -134,7 +134,6 @@ const Card = /*#__PURE__*/memo(function Card(props, context) {
134
134
  badgeCategory,
135
135
  badgeLabel,
136
136
  theme = 'default',
137
- disabledContent,
138
137
  'aria-label': cardArialabel,
139
138
  'background-aria-label': backgroundAriaLabel,
140
139
  'favorite-aria-label': favoriteAriaLabel,
@@ -149,19 +148,20 @@ const Card = /*#__PURE__*/memo(function Card(props, context) {
149
148
 
150
149
  const primaryColor = _get('common.primary', skin);
151
150
 
151
+ const whiteColor = _get('common.white', skin);
152
+
152
153
  const cardStyle = classnames(THEMES[theme], type === 'chapter' ? style.chapter : style.course, title ? null : style.lazy, style.grid, empty ? style.empty : null);
153
154
 
154
155
  const disabled = hidden && (!isSelected || _isUndefined(isSelected));
155
156
 
156
157
  const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);
157
- const lock = disabled ? /*#__PURE__*/React.createElement("div", {
158
- className: style.lockContent
159
- }, /*#__PURE__*/React.createElement(LockIcon, {
158
+ const lock = disabled ? /*#__PURE__*/React.createElement(LockIcon, {
160
159
  className: style.lockIcon,
161
- height: 48
162
- }), /*#__PURE__*/React.createElement("span", {
163
- "aria-label": disabledArialabel
164
- }, disabledContent)) : null;
160
+ style: {
161
+ color: whiteColor
162
+ },
163
+ height: 40
164
+ }) : null;
165
165
  const inlineBadgeStyle = {
166
166
  color: primaryColor
167
167
  };
@@ -256,7 +256,6 @@ Card.propTypes = process.env.NODE_ENV !== "production" ? {
256
256
  badgeCategory: CardContentInfo.propTypes.badgeCategory,
257
257
  badgeLabel: CardContentInfo.propTypes.badgeLabel,
258
258
  theme: PropTypes.oneOf(_keys(THEMES)),
259
- disabledContent: PropTypes.string,
260
259
  'aria-label': PropTypes.string,
261
260
  'background-aria-label': PropTypes.string,
262
261
  'favorite-aria-label': Favorite.propTypes['aria-label'],
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","memo","PropTypes","classnames","NovaCompositionCoorpacademyPadlock","LockIcon","NovaCompositionCoorpacademyPictures","PicturesIcon","isExternalContent","EXTERNAL_CONTENT_ICONS","Provider","CardContentInfo","MODES","Customer","Favorite","Selectable","Notification","style","THEMES","default","coorpmanager","CardBackground","type","image","empty","ariaLabel","skin","externalContent","primaryColor","whiteColor","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","childContextTypes","propTypes","string","bool","Card","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","disabledContent","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","cardStyle","chapter","course","lazy","grid","handleClick","e","lock","lockContent","lockIcon","inlineBadgeStyle","getType","contentType","CARD","lockWrapper","shape","number","func","oneOf"],"sources":["../../../src/molecule/card/index.js"],"sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default',\n disabledContent,\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <div className={style.lockContent}>\n <LockIcon className={style.lockIcon} height={48} />\n <span aria-label={disabledArialabel}>{disabledContent}</span>\n </div>\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n disabledContent: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\nexport default Card;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,IAAxB,QAAmC,OAAnC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,kCAAkC,IAAIC,QADxC,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAIA,SAAQC,iBAAR,EAA2BC,sBAA3B,QAAwD,6BAAxD;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,eAAP,IAAyBC,KAAzB,QAAqC,iBAArC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,OAAO,MAAMC,MAAM,GAAG;EACpBC,OAAO,EAAE,IADW;EAEpBC,YAAY,EAAEH,KAAK,CAACG;AAFA,CAAf;;AAKP,MAAMC,cAAc,GAAG,CAAC;EAACC,IAAD;EAAOC,KAAP;EAAcC,KAAd;EAAqB,cAAcC;AAAnC,CAAD,EAAgD;EAACC;AAAD,CAAhD,KAA2D;EAChF,MAAMC,eAAe,GAAGnB,iBAAiB,CAACc,IAAD,CAAzC;;EACA,MAAMM,YAAY,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAArB;;EACA,MAAMG,UAAU,GAAG,KAAI,cAAJ,EAAoBH,IAApB,CAAnB;;EAEA,IAAIC,eAAe,IAAIlB,sBAAsB,CAACa,IAAD,CAA7C,EAAqD;IACnD,MAAMQ,QAAQ,GAAGrB,sB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AAe,EAAElE,SAAS,CAACkG,IAfZ;EAgBf/B,UAAU,EAAEnE,SAAS,CAACiD,IAhBP;EAiBfmB,YAAY,EAAEpE,SAAS,CAACgG,KAAV,CAAgBlF,YAAY,CAACiC,SAA7B,CAjBC;EAkBfsB,aAAa,EAAE5D,eAAe,CAACsC,SAAhB,CAA0BsB,aAlB1B;EAmBfC,UAAU,EAAE7D,eAAe,CAACsC,SAAhB,CAA0BuB,UAnBvB;EAoBfC,KAAK,EAAEvE,SAAS,CAACmG,KAAV,CAAgB,MAAKnF,MAAL,CAAhB,CApBQ;EAqBfwD,eAAe,EAAExE,SAAS,CAACgD,MArBZ;EAsBf,cAAchD,SAAS,CAACgD,MAtBT;EAuBf,yBAAyBhD,SAAS,CAACgD,MAvBpB;EAwBf,uBAAuBpC,QAAQ,CAACmC,SAAT,CAAmB,YAAnB,CAxBR;EAyBf,yBAAyBlC,UAAU,CAACkC,SAAX,CAAqB,YAArB,CAzBV;EA0Bf,uBAAuBpC,QAAQ,CAACoC,SAAT,CAAmB,YAAnB,CA1BR;EA2Bf,oBAAoB/C,SAAS,CAACgD,MA3Bf;EA4Bf,uBAAuBhD,SAAS,CAACgD,MA5BlB;EA6Bf,2BAA2BvC,eAAe,CAACsC,SAAhB,CAA0B,YAA1B;AA7BZ,CAAjB;AA+BA,eAAeG,IAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","memo","PropTypes","classnames","NovaSolidLoginLocked","LockIcon","NovaCompositionCoorpacademyPictures","PicturesIcon","isExternalContent","EXTERNAL_CONTENT_ICONS","Provider","CardContentInfo","MODES","Customer","Favorite","Selectable","Notification","style","THEMES","default","coorpmanager","CardBackground","type","image","empty","ariaLabel","skin","externalContent","primaryColor","whiteColor","IconType","icon","iconColor","color","backgroundIcon","externalIconCircleWrapper","externalIcon","_backgroundIcon","externalIconCircleWithImageWrapper","backgroundColor","externalIconWithImage","imageWrapper","backgroundImage","externalContentHeader","externalBackground","emptyIcon","chapterImageWrapper","contextTypes","childContextTypes","propTypes","string","bool","Card","props","context","badge","adaptiv","disabled","hidden","title","author","customer","certifiedAuthor","progress","favorite","addFavoriteToolTip","removeFavoriteToolTip","onClick","onFavoriteClick","isSelected","notification","badgeCategory","badgeLabel","theme","cardArialabel","backgroundAriaLabel","favoriteAriaLabel","selectableAriaLabel","customerAriaLabel","badgeAriaLabel","disabledArialabel","cardContentLabelAriaLabel","cardStyle","chapter","course","lazy","grid","handleClick","e","lock","lockIcon","inlineBadgeStyle","getType","contentType","CARD","lockWrapper","shape","number","func","oneOf"],"sources":["../../../src/molecule/card/index.js"],"sourcesContent":["import React, {useMemo, memo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get, isEmpty, isUndefined, pick, keys} from 'lodash/fp';\nimport {\n NovaSolidLoginLocked as LockIcon,\n NovaCompositionCoorpacademyPictures as PicturesIcon\n} from '@coorpacademy/nova-icons';\nimport {isExternalContent, EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport CardContentInfo, {MODES} from '../card-content';\nimport Customer from './customer';\nimport Favorite from './favorite';\nimport Selectable from './selectable';\nimport Notification from './notification';\nimport style from './style.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst CardBackground = ({type, image, empty, 'aria-label': ariaLabel}, {skin}) => {\n const externalContent = isExternalContent(type);\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n\n if (externalContent && EXTERNAL_CONTENT_ICONS[type]) {\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const iconColor = EXTERNAL_CONTENT_ICONS[type].color;\n const backgroundIcon = (\n <div className={style.externalIconCircleWrapper}>\n <IconType className={style.externalIcon} />\n </div>\n );\n\n if (image) {\n const _backgroundIcon = (\n <div\n className={classnames(\n style.externalIconCircleWrapper,\n style.externalIconCircleWithImageWrapper\n )}\n style={{\n backgroundColor: iconColor\n }}\n >\n <IconType className={style.externalIconWithImage} />\n </div>\n );\n\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor,\n backgroundImage: `url('${image}')`\n }}\n className={classnames(style.externalContentHeader, style.externalBackground)}\n >\n {_backgroundIcon}\n </div>\n </div>\n );\n }\n return (\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n style={{\n backgroundColor: iconColor\n }}\n className={style.externalContentHeader}\n >\n {backgroundIcon}\n </div>\n </div>\n );\n }\n\n const emptyIcon = empty ? (\n <PicturesIcon className={style.emptyIcon} style={{color: whiteColor}} />\n ) : null;\n return (\n <div\n className={classnames(\n style.imageWrapper,\n type === 'chapter' ? style.chapterImageWrapper : null\n )}\n >\n <div\n data-name=\"cover\"\n aria-label={ariaLabel}\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n >\n {emptyIcon}\n </div>\n </div>\n );\n};\n\nCardBackground.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCardBackground.propTypes = {\n type: PropTypes.string,\n image: PropTypes.string,\n empty: PropTypes.bool,\n 'aria-label': PropTypes.string\n};\n\nconst Card = memo(function Card(props, context) {\n const {skin} = context;\n const {\n image,\n badge,\n adaptiv,\n disabled: hidden = false,\n type = 'course',\n title,\n author,\n customer,\n certifiedAuthor,\n progress,\n favorite,\n addFavoriteToolTip,\n removeFavoriteToolTip,\n onClick,\n onFavoriteClick,\n isSelected,\n notification,\n badgeCategory,\n badgeLabel,\n theme = 'default',\n 'aria-label': cardArialabel,\n 'background-aria-label': backgroundAriaLabel,\n 'favorite-aria-label': favoriteAriaLabel,\n 'selectable-aria-label': selectableAriaLabel,\n 'customer-aria-label': customerAriaLabel,\n 'badge-aria-label': badgeAriaLabel,\n 'disabled-aria-label': disabledArialabel,\n 'card-content-aria-label': cardContentLabelAriaLabel\n } = props;\n const empty = isEmpty(pick(['title', 'type', 'author', 'image'], props));\n const primaryColor = get('common.primary', skin);\n const whiteColor = get('common.white', skin);\n const cardStyle = classnames(\n THEMES[theme],\n type === 'chapter' ? style.chapter : style.course,\n title ? null : style.lazy,\n style.grid,\n empty ? style.empty : null\n );\n const disabled = hidden && (!isSelected || isUndefined(isSelected));\n const handleClick = useMemo(() => e => !disabled && onClick(e), [disabled, onClick]);\n const lock = disabled ? (\n <LockIcon className={style.lockIcon} style={{color: whiteColor}} height={40} />\n ) : null;\n const inlineBadgeStyle = {color: primaryColor};\n const getType = contentType => {\n switch (contentType) {\n case 'chapter':\n return 'microlearning';\n case 'course':\n return 'learner';\n default:\n return contentType;\n }\n };\n\n return (\n <div\n className={cardStyle}\n data-name=\"card\"\n data-lock={disabled}\n data-type={getType(type)}\n disabled={disabled}\n onClick={handleClick}\n aria-label={cardArialabel}\n >\n <CardBackground type={type} image={image} empty={empty} aria-label={backgroundAriaLabel} />\n {isUndefined(isSelected) && !isUndefined(favorite) ? (\n <Favorite\n className={style.favorite}\n favorite={favorite}\n disabled={disabled}\n onFavoriteClick={onFavoriteClick}\n addFavoriteToolTip={addFavoriteToolTip}\n removeFavoriteToolTip={removeFavoriteToolTip}\n aria-label={favoriteAriaLabel}\n />\n ) : null}\n <Selectable isSelected={isSelected} hidden={hidden} aria-label={selectableAriaLabel} />\n {notification ? <Notification {...notification} /> : null}\n {customer ? (\n <Customer\n {...customer}\n theme={theme}\n type={type}\n disabled={disabled}\n aria-label={customerAriaLabel}\n />\n ) : null}\n <CardContentInfo\n mode={MODES.CARD}\n adaptiv={adaptiv}\n author={author}\n certifiedAuthor={certifiedAuthor}\n disabled={disabled}\n empty={empty}\n progress={progress}\n title={title}\n type={type}\n badgeCategory={badgeCategory}\n badgeLabel={badgeLabel}\n theme={theme}\n aria-label={cardContentLabelAriaLabel}\n />\n {badge ? (\n <div className={style.badge} style={inlineBadgeStyle} aria-label={badgeAriaLabel}>\n {badge}\n </div>\n ) : null}\n {disabled ? (\n <div className={style.lockWrapper} aria-label={disabledArialabel}>\n {lock}\n </div>\n ) : null}\n </div>\n );\n});\n\nCard.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCard.propTypes = {\n badge: PropTypes.string,\n image: PropTypes.string,\n disabled: PropTypes.bool,\n adaptiv: PropTypes.bool,\n type: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n certifiedAuthor: PropTypes.bool,\n customer: PropTypes.shape(Customer.propTypes),\n progress: PropTypes.number,\n favorite: PropTypes.bool,\n addFavoriteToolTip: PropTypes.string,\n removeFavoriteToolTip: PropTypes.string,\n onClick: PropTypes.func,\n onFavoriteClick: PropTypes.func,\n isSelected: PropTypes.bool,\n notification: PropTypes.shape(Notification.propTypes),\n badgeCategory: CardContentInfo.propTypes.badgeCategory,\n badgeLabel: CardContentInfo.propTypes.badgeLabel,\n theme: PropTypes.oneOf(keys(THEMES)),\n 'aria-label': PropTypes.string,\n 'background-aria-label': PropTypes.string,\n 'favorite-aria-label': Favorite.propTypes['aria-label'],\n 'selectable-aria-label': Selectable.propTypes['aria-label'],\n 'customer-aria-label': Customer.propTypes['aria-label'],\n 'badge-aria-label': PropTypes.string,\n 'disabled-aria-label': PropTypes.string,\n 'card-content-aria-label': CardContentInfo.propTypes['aria-label']\n};\nexport default Card;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,IAAxB,QAAmC,OAAnC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,oBAAoB,IAAIC,QAD1B,EAEEC,mCAAmC,IAAIC,YAFzC,QAGO,0BAHP;AAIA,SAAQC,iBAAR,EAA2BC,sBAA3B,QAAwD,6BAAxD;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,eAAP,IAAyBC,KAAzB,QAAqC,iBAArC;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAC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bf,uBAAuBhD,SAAS,CAACgD,MA3BlB;EA4Bf,2BAA2BvC,eAAe,CAACsC,SAAhB,CAA0B,YAA1B;AA5BZ,CAAjB;AA8BA,eAAeG,IAAf"}
@@ -8,10 +8,9 @@
8
8
  @value dark from colors;
9
9
  @value xtraLightGrey from colors;
10
10
  @value white from colors;
11
- @value cm_negative_200 from colors;
12
- @value negative_100 from colors;
13
11
 
14
12
  .default[disabled] {
13
+ pointer-events: none;
15
14
  cursor: inherit;
16
15
  }
17
16
 
@@ -164,7 +163,7 @@
164
163
  }
165
164
 
166
165
  .default[disabled] .imageWrapper {
167
- opacity: 0.8;
166
+ opacity: 0.4;
168
167
  }
169
168
 
170
169
  .lockWrapper {
@@ -187,47 +186,12 @@
187
186
  bottom: 0;
188
187
  content: '';
189
188
  opacity: 0.4;
190
- background: linear-gradient(
191
- to bottom,
192
- black 50%
193
- );
194
- box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.2);
195
- z-index: 1;
196
- }
197
-
198
- .lockWrapper:hover .lockIcon {
199
- background-color: cm_negative_200;
200
- color: white;
201
- }
202
-
203
- .lockWrapper:hover span {
204
- font-weight: 600;
205
- width: 150px;
206
- }
207
-
208
- .lockContent {
209
- display: flex;
210
- gap: 8px;
211
- flex-direction: column;
212
- z-index: 2;
213
- }
214
-
215
- .lockContent span {
216
- width: 134px;
217
- height: 40px;
218
- color: white;
219
- text-align: center;
220
- font-family: 'Gilroy';
221
- font-size: 14px;
222
- line-height: 20px;
189
+ background: black;
223
190
  }
224
191
 
225
192
  .lockIcon {
226
- width: 48px;
227
- background-color: negative_100;
228
- align-self: center;
229
- border-radius: 16px;
230
- color: cm_negative_200;
193
+ font-size: 40px;
194
+ z-index: 1;
231
195
  }
232
196
 
233
197
  .imageWrapper {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAsBA,kDAyMC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAeA,kDAoLC"}
@@ -1,18 +1,11 @@
1
1
  import React from 'react';
2
- import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket, NovaCompositionCoorpacademyPadlock as LockIcon, NovaLineStatusCheckCircle1 as CheckCircle1 } from '@coorpacademy/nova-icons';
2
+ import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket, NovaLineStatusCheckCircle1 as CheckCircle1 } from '@coorpacademy/nova-icons';
3
3
  import map from 'lodash/fp/map';
4
4
  import Cta from '../../atom/button-link';
5
5
  import ButtonLinkIconOnly from '../../atom/button-link-icon-only';
6
6
  import InputSwitch from '../../atom/input-switch';
7
- import Title from '../../atom/title';
8
- import CardsGrid from '../../organism/cards-grid';
9
7
  import style from './style.css';
10
8
  import propTypes from './types';
11
- const IconType = {
12
- lockedContent: /*#__PURE__*/React.createElement(LockIcon, {
13
- className: style.lockIcon
14
- })
15
- };
16
9
 
17
10
  const CMPopin = props => {
18
11
  const {
@@ -28,8 +21,7 @@ const CMPopin = props => {
28
21
  thirdButton,
29
22
  cookieTitle,
30
23
  descriptionBtnTxt,
31
- listBtnSwicth,
32
- items
24
+ listBtnSwicth
33
25
  } = props;
34
26
  const logo = {
35
27
  AlertDiamond,
@@ -44,28 +36,10 @@ const CMPopin = props => {
44
36
  } : null;
45
37
 
46
38
  const renderHeader = () => {
47
- if (header) {
48
- const {
49
- title,
50
- headerIcon,
51
- backgroundImage
52
- } = header;
53
- const TopTitleIcon = IconType[headerIcon];
54
-
55
- if (title) {
56
- return /*#__PURE__*/React.createElement("div", {
57
- className: style.headerContent
58
- }, TopTitleIcon, /*#__PURE__*/React.createElement("div", {
59
- className: style.headerTitle
60
- }, /*#__PURE__*/React.createElement(Title, title)));
61
- }
62
-
63
- return /*#__PURE__*/React.createElement("img", {
64
- className: style.headerBackground,
65
- src: backgroundImage
66
- });
67
- }
68
-
39
+ if (header) return /*#__PURE__*/React.createElement("img", {
40
+ className: style.headerBackground,
41
+ src: header
42
+ });
69
43
  if (mode === 'cookie') return /*#__PURE__*/React.createElement("div", {
70
44
  className: style.cookieHeader
71
45
  }, /*#__PURE__*/React.createElement("div", {
@@ -127,14 +101,6 @@ const CMPopin = props => {
127
101
  })(listBtnSwicth);
128
102
  };
129
103
 
130
- const renderItems = () => {
131
- const {
132
- type,
133
- list
134
- } = items;
135
- return type === 'content' ? /*#__PURE__*/React.createElement(CardsGrid, list) : null;
136
- };
137
-
138
104
  return /*#__PURE__*/React.createElement("div", {
139
105
  className: mode !== 'cookie' ? style.background : null,
140
106
  style: backgroundImageStyle,
@@ -149,7 +115,7 @@ const CMPopin = props => {
149
115
  "aria-label": 'close-icon',
150
116
  size: "small",
151
117
  icon: "close"
152
- }) : null), mode !== 'items' ? /*#__PURE__*/React.createElement("div", {
118
+ }) : null), /*#__PURE__*/React.createElement("div", {
153
119
  className: mode === 'cookie' || mode === 'information' ? style.cookieTitleContainer : style.titleContainer
154
120
  }, /*#__PURE__*/React.createElement("div", {
155
121
  className: style.contentSection
@@ -168,11 +134,9 @@ const CMPopin = props => {
168
134
  dangerouslySetInnerHTML: {
169
135
  __html: descriptionText
170
136
  }
171
- }) : null) : null, descriptionBtnTxt ? /*#__PURE__*/React.createElement("div", {
137
+ }) : null), descriptionBtnTxt ? /*#__PURE__*/React.createElement("div", {
172
138
  className: style.descriptionBtn
173
- }, descriptionBtnTxt) : null, items ? /*#__PURE__*/React.createElement("div", {
174
- className: style.itemsContainer
175
- }, renderItems()) : null, renderBtnSwitch(), firstButton || secondButton || thirdButton ? /*#__PURE__*/React.createElement("div", {
139
+ }, descriptionBtnTxt) : null, renderBtnSwitch(), firstButton || secondButton || thirdButton ? /*#__PURE__*/React.createElement("div", {
176
140
  className: style.buttonContainer
177
141
  }, firstButton ? /*#__PURE__*/React.createElement("div", {
178
142
  className: firstButton.largeButton ? style.largeButton : style.button
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","NovaCompositionCoorpacademyPadlock","LockIcon","NovaLineStatusCheckCircle1","CheckCircle1","map","Cta","ButtonLinkIconOnly","InputSwitch","Title","CardsGrid","style","propTypes","IconType","lockedContent","lockIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","title","headerIcon","TopTitleIcon","headerContent","headerTitle","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","itemsContainer","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 NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1\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 Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />\n};\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 items\n } = props;\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\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) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n if (title) {\n return (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <div className={style.headerTitle}>\n <Title {...title} />\n </div>\n </div>\n );\n }\n return <img className={style.headerBackground} src={backgroundImage} />;\n }\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 const renderItems = () => {\n const {type, list} = items;\n return type === 'content' ? <CardsGrid {...list} /> : null;\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 {mode !== 'items' ? (\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 ) : null}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {items ? <div className={style.itemsContainer}>{renderItems()}</div> : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\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 customStyle={secondButton.customStyle}\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 ) : null}\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,EAKEC,kCAAkC,IAAIC,QALxC,EAMEC,0BAA0B,IAAIC,YANhC,QAOO,0BAPP;AAQA,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,kBAAlB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,SAAtB;AAEA,MAAMC,QAAQ,GAAG;EACfC,aAAa,eAAE,oBAAC,QAAD;IAAU,SAAS,EAAEH,KAAK,CAACI;EAA3B;AADA,CAAjB;;AAIA,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,aAbI;IAcJC;EAdI,IAeFd,KAfJ;EAgBA,MAAMe,IAAI,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js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","NovaLineStatusCheckCircle1","CheckCircle1","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 NovaLineStatusCheckCircle1 as CheckCircle1\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 CheckCircle1\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 {firstButton || secondButton || thirdButton ? (\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 customStyle={secondButton.customStyle}\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 ) : null}\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,EAKEC,0BAA0B,IAAIC,YALhC,QAMO,0BANP;AAOA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,GAAP,MAAgB,wBAAhB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KA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D,KAAK,CAAC4D,WAAjC,GAA+C5D,KAAK,CAAC6D;EAArE,gBACE,oBAAC,GAAD;IACE,KAAK,EAAEtD,YAAY,CAACuD,KADtB;IAEE,OAAO,EAAEvD,YAAY,CAACwD,aAFxB;IAGE,aAAY,gBAAexD,YAAY,CAAC+B,IAAK,EAH/C;IAIE,cAAY/B,YAAY,CAAC,YAAD,CAJ1B;IAKE,IAAI,EAAEA,YAAY,CAAC+B,IALrB;IAME,WAAW,EAAE/B,YAAY,CAACyD;EAN5B,EADF,CADW,GAWT,IAxBN,EAyBGnD,WAAW,gBACV;IAAK,SAAS,EAAEA,WAAW,CAAC+C,WAAZ,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,IApCN,CADD,GAuCG,IAhFN,CALF,CADF;AA0FD,CApLD;;AAsLA9D,OAAO,CAACD,SAAR,2CAAoBA,SAApB;AAEA,eAAeC,OAAf"}
@@ -22,7 +22,6 @@
22
22
  @value mobile from breakpoints;
23
23
  @value tablet from breakpoints;
24
24
  @value cm_grey_75 from colors;
25
- @value negative_100 from colors;
26
25
 
27
26
  .background {
28
27
  top: 0px;
@@ -138,26 +137,6 @@
138
137
  .popinHeader button {
139
138
  position: absolute;
140
139
  }
141
-
142
- .headerContent {
143
- display: flex;
144
- width: 100%;
145
- gap: 16px;
146
- padding: 8px;
147
- }
148
-
149
- .headerTitle {
150
- margin-bottom: 16px;
151
- padding: 2px 0px 2px;
152
- }
153
-
154
- .lockIcon {
155
- height: 48px;
156
- background-color: negative_100;
157
- border-radius: 16px;
158
- color: cm_negative_200;
159
- }
160
-
161
140
  .descriptionText {
162
141
  text-align: center;
163
142
  font-family: Gilroy;
@@ -301,14 +280,6 @@ a {
301
280
  padding: 0px 8px 0px 0px
302
281
  }
303
282
 
304
- .itemsContainer {
305
- height: 369px;
306
- overflow-y: auto;
307
- padding: inherit;
308
- width: 100%;
309
- border-top: 1px solid cm_grey_100;
310
- }
311
-
312
283
  @media tablet {
313
284
  .popin {
314
285
  width: 80%;
@@ -1,21 +1,8 @@
1
1
  import PropTypes from 'prop-types';
2
- import { TitleProps } from '../../atom/title/types';
3
- import CardsGrid from '../../organism/cards-grid';
4
2
  declare const propTypes: {
5
3
  content: PropTypes.Requireable<string>;
6
4
  mode: PropTypes.Requireable<string>;
7
- header: PropTypes.Requireable<PropTypes.InferProps<{
8
- title: PropTypes.Requireable<PropTypes.InferProps<{
9
- title: PropTypes.Requireable<string>;
10
- subtitle: PropTypes.Requireable<string>;
11
- type: PropTypes.Requireable<string>;
12
- 'data-name': PropTypes.Requireable<string>;
13
- titleSize: PropTypes.Requireable<string>;
14
- subtitleSize: PropTypes.Requireable<string>;
15
- }>>;
16
- headerIcon: PropTypes.Requireable<string>;
17
- backgroundImage: PropTypes.Requireable<string>;
18
- }>>;
5
+ header: PropTypes.Requireable<string>;
19
6
  firstButton: PropTypes.Requireable<PropTypes.InferProps<{
20
7
  label: PropTypes.Requireable<string>;
21
8
  handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -63,18 +50,6 @@ declare const propTypes: {
63
50
  'data-name': PropTypes.Requireable<string>;
64
51
  requiredSelection: PropTypes.Requireable<boolean>;
65
52
  }> | null | undefined)[]>;
66
- items: PropTypes.Requireable<PropTypes.InferProps<{
67
- type: PropTypes.Requireable<string>;
68
- list: PropTypes.Requireable<PropTypes.InferProps<{
69
- list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
70
- loading: PropTypes.Requireable<boolean>;
71
- }>>;
72
- }>>;
73
- };
74
- declare type PopinHeaderProps = {
75
- title: TitleProps;
76
- backgroundImage: string;
77
- headerIcon: string;
78
53
  };
79
54
  export declare type QuitPopinButton = {
80
55
  'aria-label'?: string;
@@ -90,14 +65,9 @@ export declare type CMPopinProps = {
90
65
  content: string;
91
66
  icon: string;
92
67
  mode: string;
93
- popinHeader?: PopinHeaderProps;
94
68
  descriptionText: string;
95
69
  firstButton?: QuitPopinButton;
96
70
  secondButton?: QuitPopinButton;
97
- items?: {
98
- type: string;
99
- list: PropTypes.InferProps<typeof CardsGrid.propTypes>;
100
- };
101
71
  };
102
72
  export default propTypes;
103
73
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Cd,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACxD,CAAC;CACH,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCd,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,16 +1,10 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import Cta from '../../atom/button-link';
3
3
  import InputSwitch from '../../atom/input-switch';
4
- import Title from '../../atom/title';
5
- import CardsGrid from '../../organism/cards-grid';
6
4
  const propTypes = {
7
5
  content: PropTypes.string,
8
- mode: PropTypes.oneOf(['alert', 'information', 'cookie', 'items']),
9
- header: PropTypes.shape({
10
- title: PropTypes.shape(Title.propTypes),
11
- headerIcon: PropTypes.string,
12
- backgroundImage: PropTypes.string
13
- }),
6
+ mode: PropTypes.oneOf(['alert', 'information', 'cookie']),
7
+ header: PropTypes.string,
14
8
  firstButton: PropTypes.shape({
15
9
  label: PropTypes.string,
16
10
  handleOnclick: PropTypes.func,
@@ -41,11 +35,7 @@ const propTypes = {
41
35
  descriptionText: PropTypes.string,
42
36
  cookieTitle: PropTypes.string,
43
37
  descriptionBtnTxt: PropTypes.string,
44
- listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes)),
45
- items: PropTypes.shape({
46
- type: PropTypes.string,
47
- list: PropTypes.shape(CardsGrid.propTypes)
48
- })
38
+ listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes))
49
39
  };
50
40
  export default propTypes;
51
41
  //# sourceMappingURL=types.js.map