@coorpacademy/components 10.1.12-alpha.0 → 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 (101) hide show
  1. package/es/atom/tag/test/fixtures.js +4 -2
  2. package/es/atom/tag/test/fixtures.js.map +1 -1
  3. package/es/molecule/banner/index.js +1 -1
  4. package/es/molecule/banner/index.js.map +1 -1
  5. package/es/molecule/banner/test/fixtures.js +4 -0
  6. package/es/molecule/banner/test/fixtures.js.map +1 -1
  7. package/es/molecule/brand-form-group/style.css +5 -0
  8. package/es/molecule/brand-tabs/style.css +0 -1
  9. package/es/molecule/short-lived-banner/test/fixtures.js +15 -0
  10. package/es/molecule/short-lived-banner/test/fixtures.js.map +1 -0
  11. package/es/organism/accordion/coorp-manager/index.js +0 -3
  12. package/es/organism/accordion/coorp-manager/index.js.map +1 -1
  13. package/es/organism/brand-dashboard/index.js +1 -3
  14. package/es/organism/brand-dashboard/index.js.map +1 -1
  15. package/es/organism/brand-dashboard/style.css +0 -10
  16. package/es/organism/list-item/index.js +68 -0
  17. package/es/organism/list-item/index.js.map +1 -0
  18. package/es/organism/list-item/style.css +49 -0
  19. package/es/organism/list-item/test/fixtures/archived.js +39 -0
  20. package/es/organism/list-item/test/fixtures/archived.js.map +1 -0
  21. package/es/organism/list-item/test/fixtures/draft.js +39 -0
  22. package/es/organism/list-item/test/fixtures/draft.js.map +1 -0
  23. package/es/organism/list-item/test/fixtures/published.js +39 -0
  24. package/es/organism/list-item/test/fixtures/published.js.map +1 -0
  25. package/es/organism/list-item/test/fixtures/revised.js +41 -0
  26. package/es/organism/list-item/test/fixtures/revised.js.map +1 -0
  27. package/es/organism/list-item/test/fixtures.js +19 -0
  28. package/es/organism/list-item/test/fixtures.js.map +1 -0
  29. package/es/organism/setup-header/style.css +16 -7
  30. package/es/template/back-office/brand-update/index.js +106 -92
  31. package/es/template/back-office/brand-update/index.js.map +1 -1
  32. package/es/template/back-office/brand-update/style.css +22 -66
  33. package/es/template/back-office/brand-update/test/fixtures/default.js +1 -58
  34. package/es/template/back-office/brand-update/test/fixtures/default.js.map +1 -1
  35. package/es/template/back-office/brand-update/test/fixtures/general-settings.js +77 -3
  36. package/es/template/back-office/brand-update/test/fixtures/general-settings.js.map +1 -1
  37. package/es/template/back-office/brand-update/test/fixtures/loader.js +1 -1
  38. package/es/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
  39. package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js +1 -1
  40. package/es/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
  41. package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js +1 -1
  42. package/es/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
  43. package/es/template/back-office/brand-update/test/fixtures/uploadusers.js +1 -1
  44. package/es/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
  45. package/es/template/back-office/brand-update/test/fixtures.js +0 -2
  46. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  47. package/lib/atom/tag/test/fixtures.js +5 -2
  48. package/lib/atom/tag/test/fixtures.js.map +1 -1
  49. package/lib/molecule/banner/index.js +1 -1
  50. package/lib/molecule/banner/index.js.map +1 -1
  51. package/lib/molecule/banner/test/fixtures.js +6 -0
  52. package/lib/molecule/banner/test/fixtures.js.map +1 -1
  53. package/lib/molecule/brand-form-group/style.css +5 -0
  54. package/lib/molecule/brand-tabs/style.css +0 -1
  55. package/lib/molecule/short-lived-banner/test/fixtures.js +25 -0
  56. package/lib/molecule/short-lived-banner/test/fixtures.js.map +1 -0
  57. package/lib/organism/accordion/coorp-manager/index.js +0 -4
  58. package/lib/organism/accordion/coorp-manager/index.js.map +1 -1
  59. package/lib/organism/brand-dashboard/index.js +1 -3
  60. package/lib/organism/brand-dashboard/index.js.map +1 -1
  61. package/lib/organism/brand-dashboard/style.css +0 -10
  62. package/lib/organism/list-item/index.js +82 -0
  63. package/lib/organism/list-item/index.js.map +1 -0
  64. package/lib/organism/list-item/style.css +49 -0
  65. package/lib/organism/list-item/test/fixtures/archived.js +44 -0
  66. package/lib/organism/list-item/test/fixtures/archived.js.map +1 -0
  67. package/lib/organism/list-item/test/fixtures/draft.js +44 -0
  68. package/lib/organism/list-item/test/fixtures/draft.js.map +1 -0
  69. package/lib/organism/list-item/test/fixtures/published.js +44 -0
  70. package/lib/organism/list-item/test/fixtures/published.js.map +1 -0
  71. package/lib/organism/list-item/test/fixtures/revised.js +46 -0
  72. package/lib/organism/list-item/test/fixtures/revised.js.map +1 -0
  73. package/lib/organism/list-item/test/fixtures.js +31 -0
  74. package/lib/organism/list-item/test/fixtures.js.map +1 -0
  75. package/lib/organism/setup-header/style.css +16 -7
  76. package/lib/template/back-office/brand-update/index.js +106 -93
  77. package/lib/template/back-office/brand-update/index.js.map +1 -1
  78. package/lib/template/back-office/brand-update/style.css +22 -66
  79. package/lib/template/back-office/brand-update/test/fixtures/default.js +1 -58
  80. package/lib/template/back-office/brand-update/test/fixtures/default.js.map +1 -1
  81. package/lib/template/back-office/brand-update/test/fixtures/general-settings.js +76 -3
  82. package/lib/template/back-office/brand-update/test/fixtures/general-settings.js.map +1 -1
  83. package/lib/template/back-office/brand-update/test/fixtures/loader.js +2 -2
  84. package/lib/template/back-office/brand-update/test/fixtures/loader.js.map +1 -1
  85. package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js +2 -2
  86. package/lib/template/back-office/brand-update/test/fixtures/manageusers-edit.js.map +1 -1
  87. package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js +2 -2
  88. package/lib/template/back-office/brand-update/test/fixtures/manageusers-list.js.map +1 -1
  89. package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js +2 -2
  90. package/lib/template/back-office/brand-update/test/fixtures/uploadusers.js.map +1 -1
  91. package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
  92. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  93. package/package.json +2 -2
  94. package/es/molecule/search/test/fixtures.js +0 -15
  95. package/es/molecule/search/test/fixtures.js.map +0 -1
  96. package/es/template/back-office/brand-update/test/fixtures/manageusers.js +0 -11
  97. package/es/template/back-office/brand-update/test/fixtures/manageusers.js.map +0 -1
  98. package/lib/molecule/search/test/fixtures.js +0 -25
  99. package/lib/molecule/search/test/fixtures.js.map +0 -1
  100. package/lib/template/back-office/brand-update/test/fixtures/manageusers.js +0 -25
  101. package/lib/template/back-office/brand-update/test/fixtures/manageusers.js.map +0 -1
@@ -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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ADZ;AAEE,IAAA,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,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']),\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","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;AAAgBC,IAAAA,QAAhB;AAA0BC,IAAAA,aAA1B;AAAyCC,IAAAA,cAAzC;AAAyDC,IAAAA;AAAzD,MAAsEN,KAA5E;AACA,sBACE;AACE,IAAA,SAAS,EAAEN,UAAU,CAACI,KAAK,CAACS,MAAP,EAAeN,IAAI,KAAK,OAAT,IAAoBH,KAAK,CAACU,WAAzC,CADvB;AAEE,IAAA,KAAK,EAAEN;AAFT,kBAIE;AAAK,iBAAY,GAAED,IAAK,iBAAxB;AAA0C,IAAA,SAAS,EAAEH,KAAK,CAACI;AAA3D,kBACE,oBAAC,YAAD;AAAc,IAAA,SAAS,EAAEJ,KAAK,CAACW;AAA/B,IADF,EAEGP,OAFH,CAJF,EAQGE,aAAa,gBACZ;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACY;AAAtB,kBACE,oBAAC,IAAD;AACE,iBAAU,kBADZ;AAEE,kBAAYN,aAFd;AAGE,IAAA,KAAK,EAAEA,aAHT;AAIE,IAAA,OAAO,EAAED,QAJX;AAKE,IAAA,IAAI,EAAC;AALP,IADF,CADY,GAUV,IAlBN,EAmBGC,aAAa,IAAIC,cAAjB,gBAAkC;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACa;AAAtB,IAAlC,GAAyE,IAnB5E,EAoBGN,cAAc,gBACb;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACY;AAAtB,kBACE,oBAAC,IAAD;AACE,iBAAU,mBADZ;AAEE,IAAA,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"}
@@ -72,9 +72,6 @@ const Accordion = props => {
72
72
  const selectedIndex = _findIndex(item => item.selected, tabProps);
73
73
 
74
74
  const [openedTab, updateOpenedTab] = React.useState(selectedIndex);
75
- React.useEffect(() => {
76
- updateOpenedTab(selectedIndex);
77
- }, [selectedIndex]);
78
75
 
79
76
  const tabs = _map.convert({
80
77
  cap: false
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/organism/accordion/coorp-manager/index.js"],"names":["React","useMemo","PropTypes","Part","style","themeStyle","setup","setupWrapper","default","wrapper","Tab","children","index","title","selected","iconType","onClick","href","type","theme","isOpen","onUpdateOpenedTab","handleOnClick","evt","wrapperHidden","propTypes","content","number","Accordion","props","tabProps","selectedIndex","item","openedTab","updateOpenedTab","useState","useEffect","tabs","convert","cap","tab","child","undefined","accordion","defaultProps","arrayOf","shape","oneOf"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEF,KAAK,CAACG,YADI;AAEjBC,EAAAA,OAAO,EA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CAACe,SAAJ,CAAcd;AAPV,GAAhB,CADQ,CAFU;AAapBK,EAAAA,OAAO,EAAEN,GAAG,CAACe,SAAJ,CAAcT,OAbH;AAcpBG,EAAAA,KAAK,EAAEjB,SAAS,CAAC6C,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAda,CAAtB;AAiBA,eAAenB,SAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {map, noop, findIndex} from 'lodash/fp';\nimport Part from './part';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setupWrapper,\n default: style.wrapper\n};\n\nconst Tab = ({\n children,\n index,\n title,\n selected,\n iconType,\n onClick,\n href,\n type,\n theme,\n isOpen,\n onUpdateOpenedTab\n}) => {\n const handleOnClick = useMemo(() => evt => onClick(index, evt), [onClick]);\n return children ? (\n <div data-name=\"accordion\" className={themeStyle[theme]}>\n <Part\n iconType={iconType}\n title={title}\n content={children}\n selected={selected}\n theme={theme}\n href={href}\n type={type}\n onClick={handleOnClick}\n onUpdateOpenedTab={onUpdateOpenedTab}\n isOpen={isOpen}\n />\n </div>\n ) : (\n <div data-name=\"accordion\" className={style.wrapperHidden} />\n );\n};\n\nTab.propTypes = {\n children: Part.propTypes.content,\n index: PropTypes.number,\n title: Part.propTypes.title,\n iconType: Part.propTypes.iconType,\n theme: Part.propTypes.theme,\n onClick: Part.propTypes.onClick,\n selected: Part.propTypes.selected,\n type: Part.propTypes.type,\n href: Part.propTypes.href,\n isOpen: Part.propTypes.isOpen,\n onUpdateOpenedTab: Part.propTypes.onUpdateOpenedTab\n};\n\nconst Accordion = props => {\n const {tabProps, children, theme = 'default', onClick = noop} = props;\n const selectedIndex = findIndex(item => item.selected, tabProps);\n\n const [openedTab, updateOpenedTab] = React.useState(selectedIndex);\n React.useEffect(() => {\n updateOpenedTab(selectedIndex);\n }, [selectedIndex]);\n\n const tabs = map.convert({cap: false})((tab, index) => ({\n ...tab,\n child: children[index],\n children: undefined\n }))(tabProps);\n\n const accordion = map.convert({cap: false})((tab, index) => {\n const isOpen = openedTab === index;\n function onUpdateOpenedTab() {\n updateOpenedTab(isOpen ? -1 : index);\n }\n return (\n <Tab\n {...tab}\n key={index}\n index={index}\n theme={theme}\n onClick={onClick}\n onUpdateOpenedTab={onUpdateOpenedTab}\n isOpen={isOpen}\n >\n {tab.child}\n </Tab>\n );\n }, tabs);\n\n return <div>{accordion}</div>;\n};\n\nAccordion.defaultProps = {\n children: []\n};\n\nAccordion.propTypes = {\n children: PropTypes.arrayOf(Tab.propTypes.children),\n tabProps: PropTypes.arrayOf(\n PropTypes.shape({\n title: Tab.propTypes.title,\n iconType: Tab.propTypes.iconType,\n selected: Tab.propTypes.selected,\n type: Tab.propTypes.type,\n href: Tab.propTypes.href,\n index: Tab.propTypes.index,\n children: Tab.propTypes.children\n })\n ),\n onClick: Tab.propTypes.onClick,\n theme: PropTypes.oneOf(['setup', 'default'])\n};\n\nexport default Accordion;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/organism/accordion/coorp-manager/index.js"],"names":["React","useMemo","PropTypes","Part","style","themeStyle","setup","setupWrapper","default","wrapper","Tab","children","index","title","selected","iconType","onClick","href","type","theme","isOpen","onUpdateOpenedTab","handleOnClick","evt","wrapperHidden","propTypes","content","number","Accordion","props","tabProps","selectedIndex","item","openedTab","updateOpenedTab","useState","tabs","convert","cap","tab","child","undefined","accordion","defaultProps","arrayOf","shape","oneOf"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEF,KAAK,CAACG,YADI;AAEjBC,EAAAA,OAAO,EAAEJ,KAAK,CAACK;AAFE,CAAnB;;AAKA,MAAMC,GAAG,GAAG,CAAC;AACXC,EAAAA,QADW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AtB;AAiBA,eAAelB,SAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {map, noop, findIndex} from 'lodash/fp';\nimport Part from './part';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setupWrapper,\n default: style.wrapper\n};\n\nconst Tab = ({\n children,\n index,\n title,\n selected,\n iconType,\n onClick,\n href,\n type,\n theme,\n isOpen,\n onUpdateOpenedTab\n}) => {\n const handleOnClick = useMemo(() => evt => onClick(index, evt), [onClick]);\n return children ? (\n <div data-name=\"accordion\" className={themeStyle[theme]}>\n <Part\n iconType={iconType}\n title={title}\n content={children}\n selected={selected}\n theme={theme}\n href={href}\n type={type}\n onClick={handleOnClick}\n onUpdateOpenedTab={onUpdateOpenedTab}\n isOpen={isOpen}\n />\n </div>\n ) : (\n <div data-name=\"accordion\" className={style.wrapperHidden} />\n );\n};\n\nTab.propTypes = {\n children: Part.propTypes.content,\n index: PropTypes.number,\n title: Part.propTypes.title,\n iconType: Part.propTypes.iconType,\n theme: Part.propTypes.theme,\n onClick: Part.propTypes.onClick,\n selected: Part.propTypes.selected,\n type: Part.propTypes.type,\n href: Part.propTypes.href,\n isOpen: Part.propTypes.isOpen,\n onUpdateOpenedTab: Part.propTypes.onUpdateOpenedTab\n};\n\nconst Accordion = props => {\n const {tabProps, children, theme = 'default', onClick = noop} = props;\n const selectedIndex = findIndex(item => item.selected, tabProps);\n\n const [openedTab, updateOpenedTab] = React.useState(selectedIndex);\n\n const tabs = map.convert({cap: false})((tab, index) => ({\n ...tab,\n child: children[index],\n children: undefined\n }))(tabProps);\n\n const accordion = map.convert({cap: false})((tab, index) => {\n const isOpen = openedTab === index;\n function onUpdateOpenedTab() {\n updateOpenedTab(isOpen ? -1 : index);\n }\n return (\n <Tab\n {...tab}\n key={index}\n index={index}\n theme={theme}\n onClick={onClick}\n onUpdateOpenedTab={onUpdateOpenedTab}\n isOpen={isOpen}\n >\n {tab.child}\n </Tab>\n );\n }, tabs);\n\n return <div>{accordion}</div>;\n};\n\nAccordion.defaultProps = {\n children: []\n};\n\nAccordion.propTypes = {\n children: PropTypes.arrayOf(Tab.propTypes.children),\n tabProps: PropTypes.arrayOf(\n PropTypes.shape({\n title: Tab.propTypes.title,\n iconType: Tab.propTypes.iconType,\n selected: Tab.propTypes.selected,\n type: Tab.propTypes.type,\n href: Tab.propTypes.href,\n index: Tab.propTypes.index,\n children: Tab.propTypes.children\n })\n ),\n onClick: Tab.propTypes.onClick,\n theme: PropTypes.oneOf(['setup', 'default'])\n};\n\nexport default Accordion;\n"],"file":"index.js"}
@@ -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,68 @@
1
+ import _map from "lodash/fp/map";
2
+ import React from 'react';
3
+ import PropTypes from 'prop-types';
4
+ import Tag from '../../atom/tag';
5
+ import ButtonLink from '../../atom/button-link';
6
+ import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
7
+ import style from './style.css';
8
+
9
+ const ListItem = props => {
10
+ const {
11
+ title,
12
+ tags,
13
+ buttonLink,
14
+ bulletPointMenuButton
15
+ } = props;
16
+
17
+ const tagsView = _map.convert({
18
+ cap: false
19
+ })((tag, index) => {
20
+ return /*#__PURE__*/React.createElement("div", {
21
+ key: index,
22
+ className: style.tag
23
+ }, /*#__PURE__*/React.createElement(Tag, tag));
24
+ })(tags);
25
+
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ className: style.wrapper
28
+ }, /*#__PURE__*/React.createElement("div", {
29
+ className: style.title,
30
+ title: title
31
+ }, title), /*#__PURE__*/React.createElement("div", {
32
+ className: style.settings
33
+ }, tagsView, /*#__PURE__*/React.createElement("div", {
34
+ className: style.edit
35
+ }, /*#__PURE__*/React.createElement(ButtonLink, buttonLink)), /*#__PURE__*/React.createElement(BulletPointMenuButton, bulletPointMenuButton)));
36
+ };
37
+
38
+ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
39
+ bulletPointMenuButton: PropTypes.shape({
40
+ buttonAriaLabel: PropTypes.string,
41
+ menuAriaLabel: PropTypes.string,
42
+ buttons: PropTypes.arrayOf(PropTypes.shape({
43
+ 'data-name': PropTypes.string,
44
+ label: PropTypes.string,
45
+ type: PropTypes.string,
46
+ onClick: PropTypes.func
47
+ })),
48
+ onClick: PropTypes.func
49
+ }),
50
+ buttonLink: PropTypes.shape({
51
+ type: PropTypes.string,
52
+ label: PropTypes.string,
53
+ ariaLabel: PropTypes.string,
54
+ dataName: PropTypes.string,
55
+ icon: PropTypes.shape({
56
+ position: PropTypes.string,
57
+ type: PropTypes.string
58
+ }),
59
+ onClick: PropTypes.func
60
+ }),
61
+ tags: PropTypes.arrayOf(PropTypes.shape({
62
+ label: PropTypes.string,
63
+ type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])
64
+ })),
65
+ title: PropTypes.string.isRequired
66
+ } : {};
67
+ export default ListItem;
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/organism/list-item/index.js"],"names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","title","tags","buttonLink","bulletPointMenuButton","tagsView","convert","cap","tag","index","wrapper","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","type","onClick","func","ariaLabel","dataName","icon","position","oneOf","is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op-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n const {title, tags, buttonLink, bulletPointMenuButton} = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n <div className={style.title} title={title}>\n {title}\n </div>\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired\n};\n\nexport default ListItem;\n"],"file":"index.js"}
@@ -0,0 +1,49 @@
1
+ @value breakpoints: "../../variables/breakpoints.css";
2
+ @value mobile from breakpoints;
3
+ @value colors: "../../variables/colors.css";
4
+ @value xtraLightGrey from colors;
5
+ @value cm_grey_900 from colors;
6
+ @value primaryAdd1 from colors;
7
+
8
+ .wrapper {
9
+ width: 100%;
10
+ border-radius: 7px;
11
+ background-color: color(xtraLightGrey a(90%));
12
+ height: 60px;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: space-between;
16
+ padding: 0 24px;
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ .title {
21
+ flex-grow: 0;
22
+ font-family: Gilroy;
23
+ font-size: 16px;
24
+ font-weight: bold;
25
+ font-stretch: normal;
26
+ font-style: normal;
27
+ line-height: 1.38;
28
+ letter-spacing: normal;
29
+ text-align: left;
30
+ color: cm_grey_900;
31
+ overflow: hidden;
32
+ text-overflow: ellipsis;
33
+ white-space: nowrap;
34
+ }
35
+
36
+ .settings {
37
+ display: flex;
38
+ height: 100%;
39
+ align-items: center;
40
+ }
41
+
42
+ .tag {
43
+ margin: 0 16px 0 0;
44
+ }
45
+
46
+ .edit {
47
+ margin: 0 16px 0 0;
48
+ min-width: 93px;
49
+ }
@@ -0,0 +1,39 @@
1
+ export default {
2
+ props: {
3
+ id: 'default',
4
+ title: 'Leaders of tomorrow',
5
+ tags: [{
6
+ label: 'Archived',
7
+ type: 'archived'
8
+ }],
9
+ bulletPointMenuButton: {
10
+ buttonAriaLabel: 'aria button',
11
+ menuAriaLabel: 'aria menu',
12
+ buttons: [{
13
+ 'data-name': 'CP-publish-button',
14
+ label: 'Publish',
15
+ type: 'default',
16
+ onClick: () => console.log('click')
17
+ }, {
18
+ 'data-name': 'CP-delete-button',
19
+ label: 'Delete',
20
+ type: 'dangerous',
21
+ onClick: () => console.log('click')
22
+ }],
23
+ onClick: () => console.log('click')
24
+ },
25
+ buttonLink: {
26
+ type: 'secondary',
27
+ label: 'Edit',
28
+ ariaLabel: 'aria button',
29
+ dataName: 'default-button',
30
+ icon: {
31
+ position: 'left',
32
+ type: 'edit'
33
+ },
34
+ onClick: () => console.log('click')
35
+ },
36
+ bulletPointButtonOnClick: () => console.log('click')
37
+ }
38
+ };
39
+ //# sourceMappingURL=archived.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/archived.js"],"names":["props","id","title","tags","label","type","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons","onClick","console","log","buttonLink","ariaLabel","dataName","icon","position","bulletPointButtonOnClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,UADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,CAHD;AASLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEL,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEER,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM,KATlB;AA4BLC,IAAAA,UAAU,EAAE;AACVR,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVU,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJZ,QAAAA,IAAI,EAAE;AAFF,OALI;AASVK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KA5BP;AAuCLM,IAAAA,wBAAwB,EAAE,MAAMP,OAAO,CAACC,GAAR,CAAY,OAAZ;AAvC3B;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Archived',\n type: 'archived'\n }\n ],\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-publish-button',\n label: 'Publish',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n },\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointButtonOnClick: () => console.log('click')\n }\n};\n"],"file":"archived.js"}
@@ -0,0 +1,39 @@
1
+ export default {
2
+ props: {
3
+ id: 'default',
4
+ title: 'Leaders of tomorrow',
5
+ tags: [{
6
+ label: 'Draft',
7
+ type: 'draft'
8
+ }],
9
+ bulletPointMenuButton: {
10
+ buttonAriaLabel: 'aria button',
11
+ menuAriaLabel: 'aria menu',
12
+ buttons: [{
13
+ 'data-name': 'CP-publish-button',
14
+ label: 'Publish',
15
+ type: 'default',
16
+ onClick: () => console.log('click')
17
+ }, {
18
+ 'data-name': 'CP-delete-button',
19
+ label: 'Delete',
20
+ type: 'dangerous',
21
+ onClick: () => console.log('click')
22
+ }],
23
+ onClick: () => console.log('click')
24
+ },
25
+ buttonLink: {
26
+ type: 'secondary',
27
+ label: 'Edit',
28
+ ariaLabel: 'aria button',
29
+ dataName: 'default-button',
30
+ icon: {
31
+ position: 'left',
32
+ type: 'edit'
33
+ },
34
+ onClick: () => console.log('click')
35
+ },
36
+ bulletPointButtonOnClick: () => console.log('click')
37
+ }
38
+ };
39
+ //# sourceMappingURL=draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/draft.js"],"names":["props","id","title","tags","label","type","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons","onClick","console","log","buttonLink","ariaLabel","dataName","icon","position","bulletPointButtonOnClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,OADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,CAHD;AASLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEL,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEER,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM,KATlB;AA4BLC,IAAAA,UAAU,EAAE;AACVR,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVU,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJZ,QAAAA,IAAI,EAAE;AAFF,OALI;AASVK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KA5BP;AAuCLM,IAAAA,wBAAwB,EAAE,MAAMP,OAAO,CAACC,GAAR,CAAY,OAAZ;AAvC3B;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Draft',\n type: 'draft'\n }\n ],\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-publish-button',\n label: 'Publish',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n },\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointButtonOnClick: () => console.log('click')\n }\n};\n"],"file":"draft.js"}
@@ -0,0 +1,39 @@
1
+ export default {
2
+ props: {
3
+ id: 'default',
4
+ title: 'Leaders of tomorrow',
5
+ tags: [{
6
+ label: 'Published',
7
+ type: 'published'
8
+ }],
9
+ bulletPointMenuButton: {
10
+ buttonAriaLabel: 'aria button',
11
+ menuAriaLabel: 'aria menu',
12
+ buttons: [{
13
+ 'data-name': 'CP-archive-button',
14
+ label: 'Archive',
15
+ type: 'default',
16
+ onClick: () => console.log('click')
17
+ }, {
18
+ 'data-name': 'CP-delete-button',
19
+ label: 'Delete',
20
+ type: 'dangerous',
21
+ onClick: () => console.log('click')
22
+ }],
23
+ onClick: () => console.log('click')
24
+ },
25
+ buttonLink: {
26
+ type: 'secondary',
27
+ label: 'Edit',
28
+ ariaLabel: 'aria button',
29
+ dataName: 'default-button',
30
+ icon: {
31
+ position: 'left',
32
+ type: 'edit'
33
+ },
34
+ onClick: () => console.log('click')
35
+ },
36
+ bulletPointButtonOnClick: () => console.log('click')
37
+ }
38
+ };
39
+ //# sourceMappingURL=published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/published.js"],"names":["props","id","title","tags","label","type","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons","onClick","console","log","buttonLink","ariaLabel","dataName","icon","position","bulletPointButtonOnClick"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,WADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,CAHD;AASLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEL,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEER,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEK,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM,KATlB;AA4BLC,IAAAA,UAAU,EAAE;AACVR,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVU,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJZ,QAAAA,IAAI,EAAE;AAFF,OALI;AASVK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KA5BP;AAuCLM,IAAAA,wBAAwB,EAAE,MAAMP,OAAO,CAACC,GAAR,CAAY,OAAZ;AAvC3B;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Published',\n type: 'published'\n }\n ],\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-archive-button',\n label: 'Archive',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n },\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointButtonOnClick: () => console.log('click')\n }\n};\n"],"file":"published.js"}
@@ -0,0 +1,41 @@
1
+ export default {
2
+ props: {
3
+ id: 'default',
4
+ title: 'Leaders of tomorrow',
5
+ tags: [{
6
+ label: 'Ongoing changes',
7
+ type: 'revised'
8
+ }, {
9
+ label: 'Published',
10
+ type: 'published'
11
+ }],
12
+ buttonLink: {
13
+ type: 'secondary',
14
+ label: 'Edit',
15
+ ariaLabel: 'aria button',
16
+ dataName: 'default-button',
17
+ icon: {
18
+ position: 'left',
19
+ type: 'edit'
20
+ },
21
+ onClick: () => console.log('click')
22
+ },
23
+ bulletPointMenuButton: {
24
+ buttonAriaLabel: 'aria button',
25
+ menuAriaLabel: 'aria menu',
26
+ buttons: [{
27
+ 'data-name': 'CP-publish-button',
28
+ label: 'Publish',
29
+ type: 'default',
30
+ onClick: () => console.log('click')
31
+ }, {
32
+ 'data-name': 'CP-delete-button',
33
+ label: 'Delete',
34
+ type: 'dangerous',
35
+ onClick: () => console.log('click')
36
+ }],
37
+ onClick: () => console.log('click')
38
+ }
39
+ }
40
+ };
41
+ //# sourceMappingURL=revised.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/list-item/test/fixtures/revised.js"],"names":["props","id","title","tags","label","type","buttonLink","ariaLabel","dataName","icon","position","onClick","console","log","bulletPointMenuButton","buttonAriaLabel","menuAriaLabel","buttons"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,EAAE,EAAE,SADC;AAELC,IAAAA,KAAK,EAAE,qBAFF;AAGLC,IAAAA,IAAI,EAAE,CACJ;AACEC,MAAAA,KAAK,EAAE,iBADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KADI,EAKJ;AACED,MAAAA,KAAK,EAAE,WADT;AAEEC,MAAAA,IAAI,EAAE;AAFR,KALI,CAHD;AAcLC,IAAAA,UAAU,EAAE;AACVD,MAAAA,IAAI,EAAE,WADI;AAEVD,MAAAA,KAAK,EAAE,MAFG;AAGVG,MAAAA,SAAS,EAAE,aAHD;AAIVC,MAAAA,QAAQ,EAAE,gBAJA;AAKVC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,MADN;AAEJL,QAAAA,IAAI,EAAE;AAFF,OALI;AASVM,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AATL,KAdP;AAyBLC,IAAAA,qBAAqB,EAAE;AACrBC,MAAAA,eAAe,EAAE,aADI;AAErBC,MAAAA,aAAa,EAAE,WAFM;AAGrBC,MAAAA,OAAO,EAAE,CACP;AACE,qBAAa,mBADf;AAEEb,QAAAA,KAAK,EAAE,SAFT;AAGEC,QAAAA,IAAI,EAAE,SAHR;AAIEM,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OADO,EAOP;AACE,qBAAa,kBADf;AAEET,QAAAA,KAAK,EAAE,QAFT;AAGEC,QAAAA,IAAI,EAAE,WAHR;AAIEM,QAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAJjB,OAPO,CAHY;AAiBrBF,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAjBM;AAzBlB;AADM,CAAf","sourcesContent":["export default {\n props: {\n id: 'default',\n title: 'Leaders of tomorrow',\n tags: [\n {\n label: 'Ongoing changes',\n type: 'revised'\n },\n {\n label: 'Published',\n type: 'published'\n }\n ],\n\n buttonLink: {\n type: 'secondary',\n label: 'Edit',\n ariaLabel: 'aria button',\n dataName: 'default-button',\n icon: {\n position: 'left',\n type: 'edit'\n },\n onClick: () => console.log('click')\n },\n bulletPointMenuButton: {\n buttonAriaLabel: 'aria button',\n menuAriaLabel: 'aria menu',\n buttons: [\n {\n 'data-name': 'CP-publish-button',\n label: 'Publish',\n type: 'default',\n onClick: () => console.log('click')\n },\n {\n 'data-name': 'CP-delete-button',\n label: 'Delete',\n type: 'dangerous',\n onClick: () => console.log('click')\n }\n ],\n onClick: () => console.log('click')\n }\n }\n};\n"],"file":"revised.js"}
@@ -0,0 +1,19 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import OrganismListItem from '..';
5
+ import fixtureArchived from './fixtures/archived';
6
+ import fixtureDraft from './fixtures/draft';
7
+ import fixturePublished from './fixtures/published';
8
+ import fixtureRevised from './fixtures/revised';
9
+ test('Organism › OrganismListItem > should have valid propTypes', t => {
10
+ t.pass();
11
+ forEach(OrganismListItem.propTypes, (value, key) => {
12
+ t.not(value, undefined, `PropType for "Organism.OrganismListItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
13
+ });
14
+ });
15
+ test('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);
16
+ test('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);
17
+ test('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);
18
+ test('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);
19
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/organism/list-item/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismListItem","fixtureArchived","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,gBAAP,MAA6B,IAA7B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAP,IAAI,CAAC,2DAAD,EAA8DQ,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,gBAAgB,CAACO,SAAlB,EAA6B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,gBAAtF,EAAwGC,eAAxG,CAAJ;AACAJ,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,gBAAnF,EAAqGE,YAArG,CAAJ;AACAL,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,gBAAvF,EAAyGG,gBAAzG,CAAJ;AACAN,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,gBAArF,EAAuGI,cAAvG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismListItem from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevised from './fixtures/revised';\n\ntest('Organism › OrganismListItem > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismListItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismListItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);\ntest('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);\ntest('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);\ntest('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);\n"],"file":"fixtures.js"}