@coorpacademy/components 10.1.9 → 10.1.12

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 (154) hide show
  1. package/es/atom/empty-search-result/index.js +24 -0
  2. package/es/atom/empty-search-result/index.js.map +1 -0
  3. package/es/atom/empty-search-result/style.css +25 -0
  4. package/es/atom/empty-search-result/test/fixtures/default.js +7 -0
  5. package/es/atom/empty-search-result/test/fixtures/default.js.map +1 -0
  6. package/es/atom/empty-search-result/test/fixtures.js +13 -0
  7. package/es/atom/empty-search-result/test/fixtures.js.map +1 -0
  8. package/es/atom/input-text/index.js +3 -2
  9. package/es/atom/input-text/index.js.map +1 -1
  10. package/es/atom/tag/test/fixtures.js +4 -2
  11. package/es/atom/tag/test/fixtures.js.map +1 -1
  12. package/es/molecule/banner/index.js +1 -1
  13. package/es/molecule/banner/index.js.map +1 -1
  14. package/es/molecule/banner/test/fixtures.js +4 -0
  15. package/es/molecule/banner/test/fixtures.js.map +1 -1
  16. package/es/molecule/brand-form-group/style.css +5 -0
  17. package/es/molecule/brand-tabs/style.css +0 -1
  18. package/es/molecule/short-lived-banner/test/fixtures.js +15 -0
  19. package/es/molecule/short-lived-banner/test/fixtures.js.map +1 -0
  20. package/es/molecule/vertical-tabs/style.css +2 -2
  21. package/es/organism/brand-dashboard/index.js +1 -3
  22. package/es/organism/brand-dashboard/index.js.map +1 -1
  23. package/es/organism/brand-dashboard/style.css +0 -10
  24. package/es/organism/course-selection/index.js +57 -0
  25. package/es/organism/course-selection/index.js.map +1 -0
  26. package/es/organism/course-selection/style.css +23 -0
  27. package/es/organism/course-selection/test/fixtures/default.js +34 -0
  28. package/es/organism/course-selection/test/fixtures/default.js.map +1 -0
  29. package/es/organism/course-selection/test/fixtures/empty.js +18 -0
  30. package/es/organism/course-selection/test/fixtures/empty.js.map +1 -0
  31. package/es/organism/course-selection/test/fixtures/filtered.js +24 -0
  32. package/es/organism/course-selection/test/fixtures/filtered.js.map +1 -0
  33. package/es/organism/course-selection/test/fixtures/sorted-selected.js +31 -0
  34. package/es/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -0
  35. package/es/organism/course-selection/test/fixtures/unsorted-selected.js +31 -0
  36. package/es/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -0
  37. package/es/organism/list-item/index.js +68 -0
  38. package/es/organism/list-item/index.js.map +1 -0
  39. package/es/organism/list-item/style.css +49 -0
  40. package/es/organism/list-item/test/fixtures/archived.js +39 -0
  41. package/es/organism/list-item/test/fixtures/archived.js.map +1 -0
  42. package/es/organism/list-item/test/fixtures/draft.js +39 -0
  43. package/es/organism/list-item/test/fixtures/draft.js.map +1 -0
  44. package/es/organism/list-item/test/fixtures/published.js +39 -0
  45. package/es/organism/list-item/test/fixtures/published.js.map +1 -0
  46. package/es/organism/list-item/test/fixtures/revised.js +41 -0
  47. package/es/organism/list-item/test/fixtures/revised.js.map +1 -0
  48. package/es/organism/list-item/test/fixtures.js +19 -0
  49. package/es/organism/list-item/test/fixtures.js.map +1 -0
  50. package/es/organism/playlist-translation/style.css +9 -2
  51. package/es/organism/search-and-chips-results/index.js +3 -8
  52. package/es/organism/search-and-chips-results/index.js.map +1 -1
  53. package/es/organism/search-and-chips-results/style.css +0 -22
  54. package/es/organism/setup-header/style.css +16 -7
  55. package/es/template/back-office/brand-update/index.js +106 -92
  56. package/es/template/back-office/brand-update/index.js.map +1 -1
  57. package/es/template/back-office/brand-update/style.css +22 -66
  58. package/es/template/back-office/brand-update/test/fixtures/default.js +1 -58
  59. package/es/template/back-office/brand-update/test/fixtures/default.js.map +1 -1
  60. package/es/template/back-office/brand-update/test/fixtures/general-settings.js +77 -3
  61. package/es/template/back-office/brand-update/test/fixtures/general-settings.js.map +1 -1
  62. package/es/template/back-office/brand-update/test/fixtures/loader.js +1 -1
  63. package/es/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
  64. package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js +1 -1
  65. package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
  66. package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js +1 -1
  67. package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
  68. package/es/template/back-office/brand-update/test/fixtures/uploadusers.js +1 -1
  69. package/es/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
  70. package/es/template/back-office/brand-update/test/fixtures.js +0 -2
  71. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  72. package/lib/atom/empty-search-result/index.js +34 -0
  73. package/lib/atom/empty-search-result/index.js.map +1 -0
  74. package/lib/atom/empty-search-result/style.css +25 -0
  75. package/lib/atom/empty-search-result/test/fixtures/default.js +12 -0
  76. package/lib/atom/empty-search-result/test/fixtures/default.js.map +1 -0
  77. package/lib/{molecule → atom}/empty-search-result/test/fixtures.js +3 -3
  78. package/lib/atom/empty-search-result/test/fixtures.js.map +1 -0
  79. package/lib/atom/input-text/index.js +3 -2
  80. package/lib/atom/input-text/index.js.map +1 -1
  81. package/lib/atom/tag/test/fixtures.js +5 -2
  82. package/lib/atom/tag/test/fixtures.js.map +1 -1
  83. package/lib/molecule/banner/index.js +1 -1
  84. package/lib/molecule/banner/index.js.map +1 -1
  85. package/lib/molecule/banner/test/fixtures.js +6 -0
  86. package/lib/molecule/banner/test/fixtures.js.map +1 -1
  87. package/lib/molecule/brand-form-group/style.css +5 -0
  88. package/lib/molecule/brand-tabs/style.css +0 -1
  89. package/lib/molecule/short-lived-banner/test/fixtures.js +25 -0
  90. package/lib/molecule/short-lived-banner/test/fixtures.js.map +1 -0
  91. package/lib/molecule/vertical-tabs/style.css +2 -2
  92. package/lib/organism/brand-dashboard/index.js +1 -3
  93. package/lib/organism/brand-dashboard/index.js.map +1 -1
  94. package/lib/organism/brand-dashboard/style.css +0 -10
  95. package/lib/organism/course-selection/index.js +70 -0
  96. package/lib/organism/course-selection/index.js.map +1 -0
  97. package/lib/organism/course-selection/style.css +23 -0
  98. package/lib/organism/course-selection/test/fixtures/default.js +47 -0
  99. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -0
  100. package/lib/organism/course-selection/test/fixtures/empty.js +23 -0
  101. package/lib/organism/course-selection/test/fixtures/empty.js.map +1 -0
  102. package/lib/organism/course-selection/test/fixtures/filtered.js +36 -0
  103. package/lib/organism/course-selection/test/fixtures/filtered.js.map +1 -0
  104. package/lib/organism/course-selection/test/fixtures/sorted-selected.js +44 -0
  105. package/lib/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -0
  106. package/lib/organism/course-selection/test/fixtures/unsorted-selected.js +44 -0
  107. package/lib/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -0
  108. package/lib/organism/list-item/index.js +82 -0
  109. package/lib/organism/list-item/index.js.map +1 -0
  110. package/lib/organism/list-item/style.css +49 -0
  111. package/lib/organism/list-item/test/fixtures/archived.js +44 -0
  112. package/lib/organism/list-item/test/fixtures/archived.js.map +1 -0
  113. package/lib/organism/list-item/test/fixtures/draft.js +44 -0
  114. package/lib/organism/list-item/test/fixtures/draft.js.map +1 -0
  115. package/lib/organism/list-item/test/fixtures/published.js +44 -0
  116. package/lib/organism/list-item/test/fixtures/published.js.map +1 -0
  117. package/lib/organism/list-item/test/fixtures/revised.js +46 -0
  118. package/lib/organism/list-item/test/fixtures/revised.js.map +1 -0
  119. package/lib/organism/list-item/test/fixtures.js +31 -0
  120. package/lib/organism/list-item/test/fixtures.js.map +1 -0
  121. package/lib/organism/playlist-translation/style.css +9 -2
  122. package/lib/organism/search-and-chips-results/index.js +4 -8
  123. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  124. package/lib/organism/search-and-chips-results/style.css +0 -22
  125. package/lib/organism/setup-header/style.css +16 -7
  126. package/lib/template/back-office/brand-update/index.js +106 -93
  127. package/lib/template/back-office/brand-update/index.js.map +1 -1
  128. package/lib/template/back-office/brand-update/style.css +22 -66
  129. package/lib/template/back-office/brand-update/test/fixtures/default.js +1 -58
  130. package/lib/template/back-office/brand-update/test/fixtures/default.js.map +1 -1
  131. package/lib/template/back-office/brand-update/test/fixtures/general-settings.js +76 -3
  132. package/lib/template/back-office/brand-update/test/fixtures/general-settings.js.map +1 -1
  133. package/lib/template/back-office/brand-update/test/fixtures/loader.js +2 -2
  134. package/lib/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
  135. package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js +2 -2
  136. package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
  137. package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js +2 -2
  138. package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
  139. package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js +2 -2
  140. package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
  141. package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
  142. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  143. package/package.json +2 -2
  144. package/es/molecule/empty-search-result/test/fixtures.js +0 -13
  145. package/es/molecule/empty-search-result/test/fixtures.js.map +0 -1
  146. package/es/molecule/search/test/fixtures.js +0 -15
  147. package/es/molecule/search/test/fixtures.js.map +0 -1
  148. package/es/template/back-office/brand-update/test/fixtures/manageusers.js +0 -11
  149. package/es/template/back-office/brand-update/test/fixtures/manageusers.js.map +0 -1
  150. package/lib/molecule/empty-search-result/test/fixtures.js.map +0 -1
  151. package/lib/molecule/search/test/fixtures.js +0 -25
  152. package/lib/molecule/search/test/fixtures.js.map +0 -1
  153. package/lib/template/back-office/brand-update/test/fixtures/manageusers.js +0 -25
  154. package/lib/template/back-office/brand-update/test/fixtures/manageusers.js.map +0 -1
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import style from './style.css';
4
+
5
+ const EmptySearchResult = props => {
6
+ const {
7
+ firstMessage,
8
+ secondMessage
9
+ } = props;
10
+ return /*#__PURE__*/React.createElement("div", {
11
+ className: style.container
12
+ }, /*#__PURE__*/React.createElement("span", {
13
+ className: style.firstMessage
14
+ }, firstMessage), /*#__PURE__*/React.createElement("span", {
15
+ className: style.secondMessage
16
+ }, secondMessage));
17
+ };
18
+
19
+ EmptySearchResult.propTypes = process.env.NODE_ENV !== "production" ? {
20
+ firstMessage: PropTypes.string.isRequired,
21
+ secondMessage: PropTypes.string.isRequired
22
+ } : {};
23
+ export default EmptySearchResult;
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/atom/empty-search-result/index.js"],"names":["React","PropTypes","style","EmptySearchResult","props","firstMessage","secondMessage","container","propTypes","string","isRequired"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,iBAAiB,GAAGC,KAAK,IAAI;AACjC,QAAM;AAACC,IAAAA,YAAD;AAAeC,IAAAA;AAAf,MAAgCF,KAAtC;AACA,sBACE;AAAK,IAAA,SAAS,EAAEF,KAAK,CAACK;AAAtB,kBACE;AAAM,IAAA,SAAS,EAAEL,KAAK,CAACG;AAAvB,KAAsCA,YAAtC,CADF,eAEE;AAAM,IAAA,SAAS,EAAEH,KAAK,CAACI;AAAvB,KAAuCA,aAAvC,CAFF,CADF;AAMD,CARD;;AAUAH,iBAAiB,CAACK,SAAlB,2CAA8B;AAC5BH,EAAAA,YAAY,EAAEJ,SAAS,CAACQ,MAAV,CAAiBC,UADH;AAE5BJ,EAAAA,aAAa,EAAEL,SAAS,CAACQ,MAAV,CAAiBC;AAFJ,CAA9B;AAKA,eAAeP,iBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './style.css';\n\nconst EmptySearchResult = props => {\n const {firstMessage, secondMessage} = props;\n return (\n <div className={style.container}>\n <span className={style.firstMessage}>{firstMessage}</span>\n <span className={style.secondMessage}>{secondMessage}</span>\n </div>\n );\n};\n\nEmptySearchResult.propTypes = {\n firstMessage: PropTypes.string.isRequired,\n secondMessage: PropTypes.string.isRequired\n};\n\nexport default EmptySearchResult;\n"],"file":"index.js"}
@@ -0,0 +1,25 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_primary_blue from colors;
3
+ @value cm_grey_900 from colors;
4
+
5
+ .container {
6
+ margin: 48px 0;
7
+ width: 100%;
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: center;
11
+ font-size: 16px;
12
+ font-weight: bold;
13
+ font-family: Gilroy;
14
+ font-size: 16px;
15
+ }
16
+
17
+ .firstMessage {
18
+ color: cm_grey_900;
19
+ display: block;
20
+ }
21
+
22
+ .secondMessage {
23
+ color: cm_primary_blue;
24
+ display: block;
25
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ props: {
3
+ firstMessage: 'No results...',
4
+ secondMessage: 'Try something else'
5
+ }
6
+ };
7
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/empty-search-result/test/fixtures/default.js"],"names":["props","firstMessage","secondMessage"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,YAAY,EAAE,eADT;AAELC,IAAAA,aAAa,EAAE;AAFV;AADM,CAAf","sourcesContent":["export default {\n props: {\n firstMessage: 'No results...',\n secondMessage: 'Try something else'\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1,13 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomEmptySearchResult from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ test('Atom › AtomEmptySearchResult > should have valid propTypes', t => {
7
+ t.pass();
8
+ forEach(AtomEmptySearchResult.propTypes, (value, key) => {
9
+ t.not(value, undefined, `PropType for "Atom.AtomEmptySearchResult.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
10
+ });
11
+ });
12
+ test('Atom › AtomEmptySearchResult › Default › should be rendered', renderComponentMacro, AtomEmptySearchResult, fixtureDefault);
13
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/empty-search-result/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomEmptySearchResult","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,4DAAD,EAA+DK,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,qBAAqB,CAACI,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,qBAAtF,EAA6GC,cAA7G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomEmptySearchResult from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomEmptySearchResult > should have valid propTypes', t => {\n t.pass();\n forEach(AtomEmptySearchResult.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomEmptySearchResult.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomEmptySearchResult › Default › should be rendered', renderComponentMacro, AtomEmptySearchResult, fixtureDefault);\n"],"file":"fixtures.js"}
@@ -32,6 +32,7 @@ const InputText = props => {
32
32
  modified = false,
33
33
  title: propsTitle
34
34
  } = props;
35
+ const isCMTheme = theme === 'coorpmanager';
35
36
  const title = `${propsTitle}${required ? '*' : ''}`;
36
37
  const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
37
38
  const mainClass = themeStyle[theme];
@@ -53,10 +54,10 @@ const InputText = props => {
53
54
  __html: error || hint
54
55
  }
55
56
  }) : null;
56
- const errorIconView = error ? /*#__PURE__*/React.createElement(ErrorIcon, {
57
+ const errorIconView = isCMTheme && error ? /*#__PURE__*/React.createElement(ErrorIcon, {
57
58
  className: style.leftIcon
58
59
  }) : null;
59
- const validIconView = valid ? /*#__PURE__*/React.createElement(CheckIcon, {
60
+ const validIconView = isCMTheme && valid ? /*#__PURE__*/React.createElement(CheckIcon, {
60
61
  className: style.leftIcon
61
62
  }) : null;
62
63
  return /*#__PURE__*/React.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/input-text/index.js"],"names":["React","useMemo","PropTypes","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","classnames","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","InputText","props","autoFocus","placeholder","value","hint","defaultValue","onChange","error","valid","theme","description","disabled","required","modified","title","propsTitle","handleChange","e","target","mainClass","className","descriptionView","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","errorIconView","leftIcon","validIconView","isNoTitle","noValue","input","propTypes","bool","string","oneOf","func"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,0CAA0C,IAAIC,QAHhD,QAIO,0BAJP;AAKA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EA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IAAA,KAAK,EAAEF,KART;AASE,IAAA,OAAO,EAAEa,YATX;AAUE,IAAA,QAAQ,EAAEL,QAVZ;AAWE,IAAA,QAAQ;AAXV,IANF,EAmBGiB,aAnBH,EAoBGE,aApBH,EAqBGJ,QArBH,CARF,EA+BGL,eA/BH,CADF;AAmCD,CA/ED;;AAiFAtB,SAAS,CAACmC,SAAV,2CAAsB;AACpBjC,EAAAA,SAAS,EAAEjB,SAAS,CAACmD,IADD;AAEpBrB,EAAAA,KAAK,EAAE9B,SAAS,CAACoD,MAFG;AAGpBlC,EAAAA,WAAW,EAAElB,SAAS,CAACoD,MAHH;AAIpB/B,EAAAA,YAAY,EAAErB,SAAS,CAACoD,MAJJ;AAKpB3B,EAAAA,KAAK,EAAEzB,SAAS,CAACqD,KAAV,CAAgB,MAAK3C,UAAL,CAAhB,CALa;AAMpBiB,EAAAA,QAAQ,EAAE3B,SAAS,CAACmD,IANA;AAOpBvB,EAAAA,QAAQ,EAAE5B,SAAS,CAACmD,IAPA;AAQpBhC,EAAAA,KAAK,EAAEnB,SAAS,CAACoD,MARG;AASpBhC,EAAAA,IAAI,EAAEpB,SAAS,CAACoD,MATI;AAUpB7B,EAAAA,KAAK,EAAEvB,SAAS,CAACoD,MAVG;AAWpB9B,EAAAA,QAAQ,EAAEtB,SAAS,CAACsD,IAXA;AAYpB5B,EAAAA,WAAW,EAAE1B,SAAS,CAACoD,MAZH;AAapBvB,EAAAA,QAAQ,EAAE7B,SAAS,CAACmD,IAbA;AAcpB3B,EAAAA,KAAK,EAAExB,SAAS,CAACmD;AAdG,CAAtB;AAgBA,eAAepC,SAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.default\n};\nconst InputText = props => {\n const {\n autoFocus = false,\n placeholder = '',\n value,\n hint,\n defaultValue,\n onChange = noop,\n error,\n valid,\n theme = 'default',\n description,\n disabled,\n required,\n modified = false,\n title: propsTitle\n } = props;\n\n const title = `${propsTitle}${required ? '*' : ''}`;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const mainClass = themeStyle[theme];\n const className = getClassState(style.default, style.modified, style.error, modified, error);\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n isNil(propsTitle) && style.isNoTitle\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {title}\n {toolTipView}\n </span>\n\n <input\n autoFocus={autoFocus}\n type=\"text\"\n name={title}\n className={style.input}\n placeholder={placeholder}\n defaultValue={defaultValue}\n autoComplete={'off'}\n value={value}\n onInput={handleChange}\n disabled={disabled}\n onChange={noop}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputText.propTypes = {\n autoFocus: PropTypes.bool,\n title: PropTypes.string,\n placeholder: PropTypes.string,\n defaultValue: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool\n};\nexport default InputText;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/input-text/index.js"],"names":["React","useMemo","PropTypes","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","classnames","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","InputText","props","autoFocus","placeholder","value","hint","defaultValue","onChange","error","valid","theme","description","disabled","required","modified","title","propsTitle","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","errorIconView","leftIcon","validIconView","isNoTitle","noValue","input","propTypes","bool","string","oneOf","func"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,0CAA0C,IAAIC,QAHhD,QAIO,0BAJP;AAKA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEF,KAAK,CAACE,KADI;AAEjBC,EAAAA,YAAY,EAAEH,KAAK,CAACG,YAFH;AAGjBC,EAAAA,OAAO,EAAEJ,KAAK,CAACI,OAHE;AAIjBC,EAAAA,OAAO,EAAEL,KAAK,CAACK;AAJE,CAAnB;;AAMA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AACzB,QAAM;AACJC,IAAAA,SAAS,GAAG,KADR;AAEJC,IAAAA,WAAW,GAAG,EAFV;AAGJC,IAAAA,KAHI;AAIJC,IAAAA,IAJI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AEjB,SAAS,CAACoD,IADD;AAEpBtB,EAAAA,KAAK,EAAE9B,SAAS,CAACqD,MAFG;AAGpBnC,EAAAA,WAAW,EAAElB,SAAS,CAACqD,MAHH;AAIpBhC,EAAAA,YAAY,EAAErB,SAAS,CAACqD,MAJJ;AAKpB5B,EAAAA,KAAK,EAAEzB,SAAS,CAACsD,KAAV,CAAgB,MAAK5C,UAAL,CAAhB,CALa;AAMpBiB,EAAAA,QAAQ,EAAE3B,SAAS,CAACoD,IANA;AAOpBxB,EAAAA,QAAQ,EAAE5B,SAAS,CAACoD,IAPA;AAQpBjC,EAAAA,KAAK,EAAEnB,SAAS,CAACqD,MARG;AASpBjC,EAAAA,IAAI,EAAEpB,SAAS,CAACqD,MATI;AAUpB9B,EAAAA,KAAK,EAAEvB,SAAS,CAACqD,MAVG;AAWpB/B,EAAAA,QAAQ,EAAEtB,SAAS,CAACuD,IAXA;AAYpB7B,EAAAA,WAAW,EAAE1B,SAAS,CAACqD,MAZH;AAapBxB,EAAAA,QAAQ,EAAE7B,SAAS,CAACoD,IAbA;AAcpB5B,EAAAA,KAAK,EAAExB,SAAS,CAACoD;AAdG,CAAtB;AAgBA,eAAerC,SAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.default\n};\nconst InputText = props => {\n const {\n autoFocus = false,\n placeholder = '',\n value,\n hint,\n defaultValue,\n onChange = noop,\n error,\n valid,\n theme = 'default',\n description,\n disabled,\n required,\n modified = false,\n title: propsTitle\n } = props;\n\n const isCMTheme = theme === 'coorpmanager';\n const title = `${propsTitle}${required ? '*' : ''}`;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const mainClass = themeStyle[theme];\n const className = getClassState(style.default, style.modified, style.error, modified, error);\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = isCMTheme && error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = isCMTheme && valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n isNil(propsTitle) && style.isNoTitle\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {title}\n {toolTipView}\n </span>\n\n <input\n autoFocus={autoFocus}\n type=\"text\"\n name={title}\n className={style.input}\n placeholder={placeholder}\n defaultValue={defaultValue}\n autoComplete={'off'}\n value={value}\n onInput={handleChange}\n disabled={disabled}\n onChange={noop}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputText.propTypes = {\n autoFocus: PropTypes.bool,\n title: PropTypes.string,\n placeholder: PropTypes.string,\n defaultValue: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool\n};\nexport default InputText;\n"],"file":"index.js"}
@@ -4,8 +4,9 @@ import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomTag from '..';
5
5
  import fixtureArchived from './fixtures/archived';
6
6
  import fixtureDefault from './fixtures/default';
7
+ import fixtureDraft from './fixtures/draft';
7
8
  import fixturePublished from './fixtures/published';
8
- import fixtureRevision from './fixtures/revision';
9
+ import fixtureRevised from './fixtures/revised';
9
10
  test('Atom › AtomTag > should have valid propTypes', t => {
10
11
  t.pass();
11
12
  forEach(AtomTag.propTypes, (value, key) => {
@@ -14,6 +15,7 @@ test('Atom › AtomTag > should have valid propTypes', t => {
14
15
  });
15
16
  test('Atom › AtomTag › Archived › should be rendered', renderComponentMacro, AtomTag, fixtureArchived);
16
17
  test('Atom › AtomTag › Default › should be rendered', renderComponentMacro, AtomTag, fixtureDefault);
18
+ test('Atom › AtomTag › Draft › should be rendered', renderComponentMacro, AtomTag, fixtureDraft);
17
19
  test('Atom › AtomTag › Published › should be rendered', renderComponentMacro, AtomTag, fixturePublished);
18
- test('Atom › AtomTag › Revision › should be rendered', renderComponentMacro, AtomTag, fixtureRevision);
20
+ test('Atom › AtomTag › Revised › should be rendered', renderComponentMacro, AtomTag, fixtureRevised);
19
21
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/tag/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTag","fixtureArchived","fixtureDefault","fixturePublished","fixtureRevision","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,OAAP,MAAoB,IAApB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAEAP,IAAI,CAAC,8CAAD,EAAiDQ,CAAC,IAAI;AACxDA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,OAAO,CAACO,SAAT,EAAoB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzCJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,wCAAuCF,GAAI,mEAApE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,gDAAD,EAAmDE,oBAAnD,EAAyEC,OAAzE,EAAkFC,eAAlF,CAAJ;AACAJ,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,OAAxE,EAAiFE,cAAjF,CAAJ;AACAL,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,OAA1E,EAAmFG,gBAAnF,CAAJ;AACAN,IAAI,CAAC,gDAAD,EAAmDE,oBAAnD,EAAyEC,OAAzE,EAAkFI,eAAlF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomTag from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDefault from './fixtures/default';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevision from './fixtures/revision';\n\ntest('Atom › AtomTag > should have valid propTypes', t => {\n t.pass();\n forEach(AtomTag.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomTag.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomTag › Archived › should be rendered', renderComponentMacro, AtomTag, fixtureArchived);\ntest('Atom › AtomTag › Default › should be rendered', renderComponentMacro, AtomTag, fixtureDefault);\ntest('Atom › AtomTag › Published › should be rendered', renderComponentMacro, AtomTag, fixturePublished);\ntest('Atom › AtomTag › Revision › should be rendered', renderComponentMacro, AtomTag, fixtureRevision);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/tag/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTag","fixtureArchived","fixtureDefault","fixtureDraft","fixturePublished","fixtureRevised","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,OAAP,MAAoB,IAApB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAR,IAAI,CAAC,8CAAD,EAAiDS,CAAC,IAAI;AACxDA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,OAAO,CAACQ,SAAT,EAAoB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzCJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,wCAAuCF,GAAI,mEAApE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,gDAAD,EAAmDE,oBAAnD,EAAyEC,OAAzE,EAAkFC,eAAlF,CAAJ;AACAJ,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,OAAxE,EAAiFE,cAAjF,CAAJ;AACAL,IAAI,CAAC,6CAAD,EAAgDE,oBAAhD,EAAsEC,OAAtE,EAA+EG,YAA/E,CAAJ;AACAN,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,OAA1E,EAAmFI,gBAAnF,CAAJ;AACAP,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,OAAxE,EAAiFK,cAAjF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomTag from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevised from './fixtures/revised';\n\ntest('Atom › AtomTag > should have valid propTypes', t => {\n t.pass();\n forEach(AtomTag.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomTag.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomTag › Archived › should be rendered', renderComponentMacro, AtomTag, fixtureArchived);\ntest('Atom › AtomTag › Default › should be rendered', renderComponentMacro, AtomTag, fixtureDefault);\ntest('Atom › AtomTag › Draft › should be rendered', renderComponentMacro, AtomTag, fixtureDraft);\ntest('Atom › AtomTag › Published › should be rendered', renderComponentMacro, AtomTag, fixturePublished);\ntest('Atom › AtomTag › Revised › should be rendered', renderComponentMacro, AtomTag, fixtureRevised);\n"],"file":"fixtures.js"}
@@ -44,7 +44,7 @@ const Banner = props => {
44
44
  };
45
45
 
46
46
  Banner.propTypes = process.env.NODE_ENV !== "production" ? {
47
- type: PropTypes.oneOf(['information', 'error']),
47
+ type: PropTypes.oneOf(['information', 'error', 'success']),
48
48
  message: PropTypes.string.isRequired,
49
49
  firstCTA: PropTypes.func,
50
50
  firstCTALabel: PropTypes.string,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/banner/index.js"],"names":["React","PropTypes","classnames","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","QuestionIcon","Link","style","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","banner","errorBanner","icon","button","buttonsBar","propTypes","oneOf","string","isRequired","func"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,+CAA+C,IAAIC,YAA3D,QAA8E,0BAA9E;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,IAAI;AACtB,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA,OAAP;AA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,EAAAA,QAAQ,EAAEV,SAAS,CAACuB,IAHH;AAIjBZ,EAAAA,aAAa,EAAEX,SAAS,CAACqB,MAJR;AAKjBT,EAAAA,cAAc,EAAEZ,SAAS,CAACqB,MALT;AAMjBR,EAAAA,SAAS,EAAEb,SAAS,CAACuB;AANJ,CAAnB;AASA,eAAejB,MAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/button-link';\nimport style from './style.css';\n\nconst Banner = props => {\n const {type, message, firstCTA, firstCTALabel, secondCTALabel, secondCTA} = props;\n return (\n <div\n className={classnames(style.banner, type === 'error' && style.errorBanner)}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <QuestionIcon className={style.icon} />\n {message}\n </div>\n {firstCTALabel ? (\n <div className={style.button}>\n <Link\n data-name=\"first-banner-cta\"\n aria-label={firstCTALabel}\n label={firstCTALabel}\n onClick={firstCTA}\n type=\"text\"\n />\n </div>\n ) : null}\n {firstCTALabel && secondCTALabel ? <div className={style.buttonsBar} /> : null}\n {secondCTALabel ? (\n <div className={style.button}>\n <Link\n data-name=\"second-banner-cta\"\n onClick={secondCTA}\n aria-label={secondCTALabel}\n label={secondCTALabel}\n type=\"text\"\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nBanner.propTypes = {\n type: PropTypes.oneOf(['information', 'error']),\n message: PropTypes.string.isRequired,\n firstCTA: PropTypes.func,\n firstCTALabel: PropTypes.string,\n secondCTALabel: PropTypes.string,\n secondCTA: PropTypes.func\n};\n\nexport default Banner;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/banner/index.js"],"names":["React","PropTypes","classnames","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","QuestionIcon","Link","style","Banner","props","type","message","firstCTA","firstCTALabel","secondCTALabel","secondCTA","banner","errorBanner","icon","button","buttonsB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AA,OAAO,EAAEJ,SAFX;AAGE,kBAAYD,cAHd;AAIE,IAAA,KAAK,EAAEA,cAJT;AAKE,IAAA,IAAI,EAAC;AALP,IADF,CADa,GAUX,IA9BN,CADF;AAkCD,CApCD;;AAsCAN,MAAM,CAACa,SAAP,2CAAmB;AACjBX,EAAAA,IAAI,EAAER,SAAS,CAACoB,KAAV,CAAgB,CAAC,aAAD,EAAgB,OAAhB,EAAyB,SAAzB,CAAhB,CADW;AAEjBX,EAAAA,OAAO,EAAET,SAAS,CAACqB,MAAV,CAAiBC,UAFT;AAGjBZ,EAAAA,QAAQ,EAAEV,SAAS,CAACuB,IAHH;AAIjBZ,EAAAA,aAAa,EAAEX,SAAS,CAACqB,MAJR;AAKjBT,EAAAA,cAAc,EAAEZ,SAAS,CAACqB,MALT;AAMjBR,EAAAA,SAAS,EAAEb,SAAS,CAACuB;AANJ,CAAnB;AASA,eAAejB,MAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/button-link';\nimport style from './style.css';\n\nconst Banner = props => {\n const {type, message, firstCTA, firstCTALabel, secondCTALabel, secondCTA} = props;\n return (\n <div\n className={classnames(style.banner, type === 'error' && style.errorBanner)}\n title={message}\n >\n <div data-name={`${type}-banner-message`} className={style.message}>\n <QuestionIcon className={style.icon} />\n {message}\n </div>\n {firstCTALabel ? (\n <div className={style.button}>\n <Link\n data-name=\"first-banner-cta\"\n aria-label={firstCTALabel}\n label={firstCTALabel}\n onClick={firstCTA}\n type=\"text\"\n />\n </div>\n ) : null}\n {firstCTALabel && secondCTALabel ? <div className={style.buttonsBar} /> : null}\n {secondCTALabel ? (\n <div className={style.button}>\n <Link\n data-name=\"second-banner-cta\"\n onClick={secondCTA}\n aria-label={secondCTALabel}\n label={secondCTALabel}\n type=\"text\"\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nBanner.propTypes = {\n type: PropTypes.oneOf(['information', 'error', 'success']),\n message: PropTypes.string.isRequired,\n firstCTA: PropTypes.func,\n firstCTALabel: PropTypes.string,\n secondCTALabel: PropTypes.string,\n secondCTA: PropTypes.func\n};\n\nexport default Banner;\n"],"file":"index.js"}
@@ -4,6 +4,8 @@ import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import MoleculeBanner from '..';
5
5
  import fixtureDefault from './fixtures/default';
6
6
  import fixtureErrorBanner from './fixtures/error-banner';
7
+ import fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';
8
+ import fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';
7
9
  test('Molecule › MoleculeBanner > should have valid propTypes', t => {
8
10
  t.pass();
9
11
  forEach(MoleculeBanner.propTypes, (value, key) => {
@@ -12,4 +14,6 @@ test('Molecule › MoleculeBanner > should have valid propTypes', t => {
12
14
  });
13
15
  test('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);
14
16
  test('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);
17
+ test('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);
18
+ test('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);
15
19
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AAEAL,IAAI,CAAC,yDAAD,EAA4DM,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,cAAvF,EAAuGE,kBAAvG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","fixtureErrorTemporaryBanner","fixtureSuccessTemporaryBanner","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,2BAAP,MAAwC,mCAAxC;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AAEAP,IAAI,CAAC,yDAAD,EAA4DQ,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,cAAc,CAACO,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,cAAvF,EAAuGE,kBAAvG,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,cAAhG,EAAgHG,2BAAhH,CAAJ;AACAN,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,cAAlG,EAAkHI,6BAAlH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\nimport fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';\nimport fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\ntest('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);\ntest('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);\n"],"file":"fixtures.js"}
@@ -11,6 +11,11 @@
11
11
  margin-bottom: 20px;
12
12
  }
13
13
 
14
+ .titleWrapper:first-child {
15
+ margin-top: 0;
16
+ margin-bottom: 20px;
17
+ }
18
+
14
19
  .grid {
15
20
  display: flex;
16
21
  flex-wrap: wrap;
@@ -8,7 +8,6 @@
8
8
 
9
9
  .wrapper {
10
10
  width: 100%;
11
- height: 72px;
12
11
  background-color: white;
13
12
  display: flex;
14
13
  }
@@ -0,0 +1,15 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import MoleculeShortLivedBanner from '..';
5
+ import fixtureErrorBanner from './fixtures/error-banner';
6
+ import fixtureSuccessBanner from './fixtures/success-banner';
7
+ test('Molecule › MoleculeShortLivedBanner > should have valid propTypes', t => {
8
+ t.pass();
9
+ forEach(MoleculeShortLivedBanner.propTypes, (value, key) => {
10
+ t.not(value, undefined, `PropType for "Molecule.MoleculeShortLivedBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
+ });
12
+ });
13
+ test('Molecule › MoleculeShortLivedBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeShortLivedBanner, fixtureErrorBanner);
14
+ test('Molecule › MoleculeShortLivedBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeShortLivedBanner, fixtureSuccessBanner);
15
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/short-lived-banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeShortLivedBanner","fixtureErrorBanner","fixtureSuccessBanner","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,wBAAP,MAAqC,IAArC;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AAEAL,IAAI,CAAC,mEAAD,EAAsEM,CAAC,IAAI;AAC7EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,wBAAwB,CAACK,SAA1B,EAAqC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC1DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,6DAA4DF,GAAI,mEAAzF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,wBAAjG,EAA2HC,kBAA3H,CAAJ;AACAJ,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,wBAAnG,EAA6HE,oBAA7H,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeShortLivedBanner from '..';\nimport fixtureErrorBanner from './fixtures/error-banner';\nimport fixtureSuccessBanner from './fixtures/success-banner';\n\ntest('Molecule › MoleculeShortLivedBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeShortLivedBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeShortLivedBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeShortLivedBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeShortLivedBanner, fixtureErrorBanner);\ntest('Molecule › MoleculeShortLivedBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeShortLivedBanner, fixtureSuccessBanner);\n"],"file":"fixtures.js"}
@@ -56,7 +56,7 @@
56
56
  color: cm_blue_50;
57
57
  }
58
58
 
59
- .tab:hover a {
59
+ .tab:hover span {
60
60
  color: cm_primary_blue;
61
61
  }
62
62
 
@@ -64,6 +64,6 @@
64
64
  background-color: cm_blue_50;
65
65
  }
66
66
 
67
- .tab.selected a {
67
+ .tab.selected span {
68
68
  color: cm_primary_blue;
69
69
  }
@@ -11,9 +11,7 @@ const Dashboard = props => {
11
11
  header,
12
12
  quickAccessCards
13
13
  } = props;
14
- return /*#__PURE__*/React.createElement("div", {
15
- className: style.wrapper
16
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Title, _extends({}, header, {
14
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Title, _extends({}, header, {
17
15
  type: 'page'
18
16
  }))), /*#__PURE__*/React.createElement("div", {
19
17
  className: style.sectionWrapper
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/brand-dashboard/index.js"],"names":["React","PropTypes","Title","QuickAccessCardGroup","style","Dashboard","props","header","quickAccessCards","wrapper","sectionWrapper","title","cardsWrapper","cards","propTypes","shape","string","subtitle"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,oBAAP,MAAiC,yCAAjC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AACzB,QAAM;AAACC,IAAAA,MAAD;AAASC,IAAAA;AAAT,MAA6BF,KAAnC;AACA,sBACE;AAAK,IAAA,SAAS,EAAEF,KAAK,CAACK;AAAtB,kBACE,8CACE,oBAAC,KAAD,eAAWF,MAAX;AAAmB,IAAA,IAAI,EAAE;AAAzB,KADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEH,KAAK,CAACM;AAAtB,kBACE,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAEF,gBAAgB,CAACG,KAA/B;AAAsC,IAAA,IAAI,EAAE;AAA5C,IADF,eAEE;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACQ;AAAtB,kBACE,oBAAC,oBAAD,EAA0BJ,gBAAgB,CAACK,KAA3C,CADF,CAFF,CAJF,CADF;AAaD,CAfD;;AAiBAR,SAAS,CAACS,SAAV,2CAAsB;AACpBP,EAAAA,MAAM,EAAEN,SAAS,CAACc,KAAV,CAAgB;AACtBJ,IAAAA,KAAK,EAAEV,SAAS,CAACe,MADK;AAEtBC,IAAAA,QAAQ,EAAEhB,SAAS,CAACe;AAFE,GAAhB,CADY;AAKpBR,EAAAA,gBAAgB,EAAEP,SAAS,CAACc,KAAV,CAAgB;AAChCJ,IAAAA,KAAK,EAAEV,SAAS,CAACe,MADe;AAEhCH,IAAAA,KAAK,EAAEZ,SAAS,CAACc,KAAV,CAAgBZ,oBAAoB,CAACW,SAArC;AAFyB,GAAhB;AALE,CAAtB;AAWA,eAAeT,SAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Title from '../../atom/title';\nimport QuickAccessCardGroup from '../../molecule/quick-access-cards-group';\nimport style from './style.css';\n\nconst Dashboard = props => {\n const {header, quickAccessCards} = props;\n return (\n <div className={style.wrapper}>\n <div>\n <Title {...header} type={'page'} />\n </div>\n <div className={style.sectionWrapper}>\n <Title title={quickAccessCards.title} type={'form-group'} />\n <div className={style.cardsWrapper}>\n <QuickAccessCardGroup {...quickAccessCards.cards} />\n </div>\n </div>\n </div>\n );\n};\n\nDashboard.propTypes = {\n header: PropTypes.shape({\n title: PropTypes.string,\n subtitle: PropTypes.string\n }),\n quickAccessCards: PropTypes.shape({\n title: PropTypes.string,\n cards: PropTypes.shape(QuickAccessCardGroup.propTypes)\n })\n};\n\nexport default Dashboard;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/brand-dashboard/index.js"],"names":["React","PropTypes","Title","QuickAccessCardGroup","style","Dashboard","props","header","quickAccessCards","sectionWrapper","title","cardsWrapper","cards","propTypes","shape","string","subtitle"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,oBAAP,MAAiC,yCAAjC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AACzB,QAAM;AAACC,IAAAA,MAAD;AAASC,IAAAA;AAAT,MAA6BF,KAAnC;AACA,sBACE,8CACE,8CACE,oBAAC,KAAD,eAAWC,MAAX;AAAmB,IAAA,IAAI,EAAE;AAAzB,KADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEH,KAAK,CAACK;AAAtB,kBACE,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAED,gBAAgB,CAACE,KAA/B;AAAsC,IAAA,IAAI,EAAE;AAA5C,IADF,eAEE;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACO;AAAtB,kBACE,oBAAC,oBAAD,EAA0BH,gBAAgB,CAACI,KAA3C,CADF,CAFF,CAJF,CADF;AAaD,CAfD;;AAiBAP,SAAS,CAACQ,SAAV,2CAAsB;AACpBN,EAAAA,MAAM,EAAEN,SAAS,CAACa,KAAV,CAAgB;AACtBJ,IAAAA,KAAK,EAAET,SAAS,CAACc,MADK;AAEtBC,IAAAA,QAAQ,EAAEf,SAAS,CAACc;AAFE,GAAhB,CADY;AAKpBP,EAAAA,gBAAgB,EAAEP,SAAS,CAACa,KAAV,CAAgB;AAChCJ,IAAAA,KAAK,EAAET,SAAS,CAACc,MADe;AAEhCH,IAAAA,KAAK,EAAEX,SAAS,CAACa,KAAV,CAAgBX,oBAAoB,CAACU,SAArC;AAFyB,GAAhB;AALE,CAAtB;AAWA,eAAeR,SAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Title from '../../atom/title';\nimport QuickAccessCardGroup from '../../molecule/quick-access-cards-group';\nimport style from './style.css';\n\nconst Dashboard = props => {\n const {header, quickAccessCards} = props;\n return (\n <div>\n <div>\n <Title {...header} type={'page'} />\n </div>\n <div className={style.sectionWrapper}>\n <Title title={quickAccessCards.title} type={'form-group'} />\n <div className={style.cardsWrapper}>\n <QuickAccessCardGroup {...quickAccessCards.cards} />\n </div>\n </div>\n </div>\n );\n};\n\nDashboard.propTypes = {\n header: PropTypes.shape({\n title: PropTypes.string,\n subtitle: PropTypes.string\n }),\n quickAccessCards: PropTypes.shape({\n title: PropTypes.string,\n cards: PropTypes.shape(QuickAccessCardGroup.propTypes)\n })\n};\n\nexport default Dashboard;\n"],"file":"index.js"}
@@ -1,20 +1,10 @@
1
1
  @value breakpoints: "../../variables/breakpoints.css";
2
2
  @value cm_tablet from breakpoints;
3
3
 
4
- .wrapper {
5
- margin: 0px 64px;
6
- }
7
-
8
4
  .sectionWrapper {
9
5
  margin-top: 44px;
10
6
  }
11
7
 
12
8
  .cardsWrapper {
13
9
  margin-top: 16px;
14
- }
15
-
16
- @media cm_tablet {
17
- .wrapper {
18
- margin: 0px 32px;
19
- }
20
10
  }
@@ -0,0 +1,57 @@
1
+ import _isEmpty from "lodash/fp/isEmpty";
2
+
3
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+
5
+ import React from 'react';
6
+ import PropTypes from 'prop-types';
7
+ import EmptySearchResult from '../../atom/empty-search-result';
8
+ import Search from '../../atom/input-search';
9
+ import Card from '../../molecule/card';
10
+ import style from './style.css';
11
+
12
+ const buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages) => {
13
+ if (_isEmpty(courses)) {
14
+ return /*#__PURE__*/React.createElement(EmptySearchResult, emptyMessages);
15
+ }
16
+
17
+ const items = courses.map((card, index) => {
18
+ return /*#__PURE__*/React.createElement("li", {
19
+ className: style.cards,
20
+ key: `card-${index}`
21
+ }, /*#__PURE__*/React.createElement(Card, card));
22
+ });
23
+ return /*#__PURE__*/React.createElement("ul", {
24
+ "aria-label": coursesSelectionAriaLabel
25
+ }, items);
26
+ };
27
+
28
+ const CourseSelection = props => {
29
+ const {
30
+ search,
31
+ courses,
32
+ emptyMessages,
33
+ 'courses-selection-aria-label': coursesSelectionAriaLabel
34
+ } = props;
35
+ const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages);
36
+ return /*#__PURE__*/React.createElement("div", {
37
+ className: style.container
38
+ }, /*#__PURE__*/React.createElement("div", {
39
+ className: style.search
40
+ }, /*#__PURE__*/React.createElement(Search, _extends({}, search, {
41
+ theme: "coorpmanager"
42
+ }))), /*#__PURE__*/React.createElement("div", {
43
+ className: style.cardsContainer
44
+ }, resultView));
45
+ };
46
+
47
+ CourseSelection.propTypes = process.env.NODE_ENV !== "production" ? {
48
+ search: PropTypes.shape(Search.PropTypes),
49
+ courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),
50
+ 'courses-selection-aria-label': PropTypes.string,
51
+ emptyMessages: PropTypes.shape({
52
+ firstMessage: PropTypes.string,
53
+ secondMessage: PropTypes.string
54
+ })
55
+ } : {};
56
+ export default CourseSelection;
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["React","PropTypes","EmptySearchResult","Search","Card","style","buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","items","map","card","index","cards","CourseSelection","props","search","resultView","container","cardsContainer","propTypes","shape","arrayOf","string","firstMessage","secondMessage"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC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AS,CAACsB,OAAV,CAAkBtB,SAAS,CAACqB,KAAV,CAAgBlB,IAAI,CAACiB,SAArB,CAAlB,CAFiB;AAG1B,kCAAgCpB,SAAS,CAACuB,MAHhB;AAI1Bf,EAAAA,aAAa,EAAER,SAAS,CAACqB,KAAV,CAAgB;AAC7BG,IAAAA,YAAY,EAAExB,SAAS,CAACuB,MADK;AAE7BE,IAAAA,aAAa,EAAEzB,SAAS,CAACuB;AAFI,GAAhB;AAJW,CAA5B;AAUA,eAAeT,eAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport Card from '../../molecule/card';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages) => {\n if (isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n return (\n <li className={style.cards} key={`card-${index}`}>\n <Card {...card} />\n </li>\n );\n });\n\n return <ul aria-label={coursesSelectionAriaLabel}>{items}</ul>;\n};\n\nconst CourseSelection = props => {\n const {\n search,\n courses,\n emptyMessages,\n 'courses-selection-aria-label': coursesSelectionAriaLabel\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages);\n\n return (\n <div className={style.container}>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n <div className={style.cardsContainer}>{resultView}</div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\n courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n 'courses-selection-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n })\n};\n\nexport default CourseSelection;\n"],"file":"index.js"}
@@ -0,0 +1,23 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_primary_blue from colors;
3
+ @value cm_grey_100 from colors;
4
+ @value cm_grey_900 from colors;
5
+
6
+ .container {
7
+ width: 100%;
8
+ }
9
+
10
+ .search {
11
+ width: 42%;
12
+ min-width: 309px;
13
+ }
14
+
15
+ .cardsContainer {
16
+ margin: 24px 0 0 0;
17
+ width: 100%;
18
+ }
19
+
20
+ .cards {
21
+ display: inline-block;
22
+ margin: 0 16px 16px 0px;
23
+ }
@@ -0,0 +1,34 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';
4
+ import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
5
+ import Article from '../../../../molecule/card/test/fixtures/article';
6
+ import Scorm from '../../../../molecule/card/test/fixtures/scorm';
7
+ import ExternalContent from '../../../../molecule/card/test/fixtures/external-content';
8
+ export default {
9
+ props: {
10
+ search: {
11
+ title: 'Search...',
12
+ placeholder: 'Search...',
13
+ value: '',
14
+ description: 'Type to filter the courses',
15
+ onChange: value => console.log(value)
16
+ },
17
+ 'courses-selection-aria-label': 'Courses results',
18
+ courses: [SelectedCard.props, UnSelectedCard.props, _extends(_extends({}, Article.props), {}, {
19
+ isSelected: false
20
+ }), SelectedCard.props, _extends(_extends({}, Scorm.props), {}, {
21
+ isSelected: true
22
+ }), _extends(_extends({}, UnSelectedCard.props), {}, {
23
+ isSelected: false,
24
+ title: 'Standard course'
25
+ }), _extends(_extends({}, ExternalContent.props), {}, {
26
+ isSelected: false,
27
+ title: 'External course'
28
+ }), _extends(_extends({}, Scorm.props), {}, {
29
+ isSelected: false,
30
+ title: 'Scorm course'
31
+ })]
32
+ }
33
+ };
34
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,EAEPL,cAAc,CAACK,KAFR,wBAGHH,OAAO,CAACG,KAHL;AAGYU,MAAAA,UAAU,EAAE;AAHxB,QAIPd,YAAY,CAACI,KAJN,wBAKHF,KAAK,CAACE,KALH;AAKUU,MAAAA,UAAU,EAAE;AALtB,8BAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE,KAN/B;AAMsCR,MAAAA,KAAK,EAAE;AAN7C,8BAOHH,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE,KAPhC;AAOuCR,MAAAA,KAAK,EAAE;AAP9C,8BAQHJ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE,KARtB;AAQ6BR,MAAAA,KAAK,EAAE;AARpC;AATJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false, title: 'Standard course'},\n {...ExternalContent.props, isSelected: false, title: 'External course'},\n {...Scorm.props, isSelected: false, title: 'Scorm course'}\n ]\n }\n};\n"],"file":"default.js"}
@@ -0,0 +1,18 @@
1
+ export default {
2
+ props: {
3
+ search: {
4
+ title: 'Search...',
5
+ placeholder: 'Search...',
6
+ value: 'Xoxoxo',
7
+ description: 'Type to find the courses',
8
+ onChange: value => console.log(value)
9
+ },
10
+ 'courses-selection-aria-label': 'Courses results',
11
+ courses: [],
12
+ emptyMessages: {
13
+ firstMessage: 'No results...',
14
+ secondMessage: 'Try something else'
15
+ }
16
+ }
17
+ };
18
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/empty.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","emptyMessages","firstMessage","secondMessage"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,QAHD;AAINC,MAAAA,WAAW,EAAE,0BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,EATJ;AAULC,IAAAA,aAAa,EAAE;AACbC,MAAAA,YAAY,EAAE,eADD;AAEbC,MAAAA,aAAa,EAAE;AAFF;AAVV;AADM,CAAf","sourcesContent":["export default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'Xoxoxo',\n description: 'Type to find the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [],\n emptyMessages: {\n firstMessage: 'No results...',\n secondMessage: 'Try something else'\n }\n }\n};\n"],"file":"empty.js"}
@@ -0,0 +1,24 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';
4
+ import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
5
+ import Article from '../../../../molecule/card/test/fixtures/article';
6
+ import Scorm from '../../../../molecule/card/test/fixtures/scorm';
7
+ export default {
8
+ props: {
9
+ search: {
10
+ title: 'Search...',
11
+ placeholder: 'Search...',
12
+ value: 'from',
13
+ description: 'Type to filter the courses',
14
+ onChange: value => console.log(value)
15
+ },
16
+ 'courses-selection-aria-label': 'Courses results',
17
+ courses: [SelectedCard.props, _extends(_extends({}, Scorm.props), {}, {
18
+ isSelected: true
19
+ }), SelectedCard.props, UnSelectedCard.props, _extends(_extends({}, Article.props), {}, {
20
+ isSelected: false
21
+ })]
22
+ }
23
+ };
24
+ //# sourceMappingURL=filtered.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/filtered.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,MAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPZ,YAAY,CAACG,KADN,wBAEHD,KAAK,CAACC,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPb,YAAY,CAACG,KAHN,EAIPJ,cAAc,CAACI,KAJR,wBAKHF,OAAO,CAACE,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB;AATJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false}\n ]\n }\n};\n"],"file":"filtered.js"}
@@ -0,0 +1,31 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';
4
+ import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
5
+ import Article from '../../../../molecule/card/test/fixtures/article';
6
+ import Scorm from '../../../../molecule/card/test/fixtures/scorm';
7
+ import ExternalContent from '../../../../molecule/card/test/fixtures/external-content';
8
+ export default {
9
+ props: {
10
+ search: {
11
+ title: 'Search...',
12
+ placeholder: 'Search...',
13
+ value: '',
14
+ description: 'Type to filter the courses',
15
+ onChange: value => console.log(value)
16
+ },
17
+ 'courses-selection-aria-label': 'Courses results',
18
+ courses: [SelectedCard.props, _extends(_extends({}, Scorm.props), {}, {
19
+ isSelected: true
20
+ }), SelectedCard.props, UnSelectedCard.props, _extends(_extends({}, Article.props), {}, {
21
+ isSelected: false
22
+ }), _extends(_extends({}, UnSelectedCard.props), {}, {
23
+ isSelected: false
24
+ }), _extends(_extends({}, ExternalContent.props), {}, {
25
+ isSelected: false
26
+ }), _extends(_extends({}, Scorm.props), {}, {
27
+ isSelected: false
28
+ })]
29
+ }
30
+ };
31
+ //# sourceMappingURL=sorted-selected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/sorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,wBAEHF,KAAK,CAACE,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPd,YAAY,CAACI,KAHN,EAIPL,cAAc,CAACK,KAJR,wBAKHH,OAAO,CAACG,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB,8BAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,8BAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,8BAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB;AATJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ]\n }\n};\n"],"file":"sorted-selected.js"}