@coorpacademy/components 10.1.5 → 10.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/es/atom/button-link/style.css +1 -5
  2. package/es/atom/button-link/test/fixtures.js +33 -0
  3. package/es/atom/button-link/test/fixtures.js.map +1 -0
  4. package/es/atom/chips/test/fixtures.js +17 -0
  5. package/es/atom/chips/test/fixtures.js.map +1 -0
  6. package/es/atom/content-badge/test/fixtures.js +27 -0
  7. package/es/atom/content-badge/test/fixtures.js.map +1 -0
  8. package/es/atom/input-search/test/fixtures.js +19 -0
  9. package/es/atom/input-search/test/fixtures.js.map +1 -0
  10. package/es/atom/input-text/test/fixtures.js +2 -0
  11. package/es/atom/input-text/test/fixtures.js.map +1 -1
  12. package/es/atom/input-textarea/test/fixtures.js +4 -0
  13. package/es/atom/input-textarea/test/fixtures.js.map +1 -1
  14. package/es/atom/tag/test/fixtures.js +19 -0
  15. package/es/atom/tag/test/fixtures.js.map +1 -0
  16. package/es/atom/wizard-steps/test/fixtures.js +17 -0
  17. package/es/atom/wizard-steps/test/fixtures.js.map +1 -0
  18. package/es/molecule/banner/index.js +19 -10
  19. package/es/molecule/banner/index.js.map +1 -1
  20. package/es/molecule/banner/style.css +10 -8
  21. package/es/molecule/banner/test/fixtures.js +15 -0
  22. package/es/molecule/banner/test/fixtures.js.map +1 -0
  23. package/es/molecule/brand-form-group/index.js +20 -5
  24. package/es/molecule/brand-form-group/index.js.map +1 -1
  25. package/es/molecule/brand-form-group/style.css +19 -0
  26. package/es/molecule/brand-form-group/test/fixtures.js +2 -0
  27. package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
  28. package/es/molecule/card/test/fixtures.js +4 -0
  29. package/es/molecule/card/test/fixtures.js.map +1 -1
  30. package/es/molecule/cm-popin/test/fixtures.js +17 -0
  31. package/es/molecule/cm-popin/test/fixtures.js.map +1 -0
  32. package/es/molecule/feedback/test/fixtures.js +0 -2
  33. package/es/molecule/feedback/test/fixtures.js.map +1 -1
  34. package/es/molecule/vertical-tabs/test/fixtures.js +15 -0
  35. package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -0
  36. package/es/molecule/wizard-summary/index.js +3 -1
  37. package/es/molecule/wizard-summary/index.js.map +1 -1
  38. package/es/molecule/wizard-summary/style.css +8 -0
  39. package/es/molecule/wizard-summary/test/fixtures.js +21 -0
  40. package/es/molecule/wizard-summary/test/fixtures.js.map +1 -0
  41. package/es/organism/brand-form/test/fixtures/wizard-playlists.js +26 -0
  42. package/es/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -0
  43. package/es/organism/brand-form/test/fixtures.js +2 -0
  44. package/es/organism/brand-form/test/fixtures.js.map +1 -1
  45. package/es/organism/search-and-chips-results/index.js +1 -0
  46. package/es/organism/search-and-chips-results/index.js.map +1 -1
  47. package/es/organism/search-and-chips-results/style.css +1 -1
  48. package/es/organism/search-and-chips-results/test/fixtures.js +21 -0
  49. package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -0
  50. package/es/template/app-player/popin-end/test/fixtures.js +0 -2
  51. package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
  52. package/es/variables/colors.css +2 -0
  53. package/lib/atom/button-link/style.css +1 -5
  54. package/lib/atom/button-link/test/fixtures.js +52 -0
  55. package/lib/atom/button-link/test/fixtures.js.map +1 -0
  56. package/lib/atom/chips/test/fixtures.js +28 -0
  57. package/lib/atom/chips/test/fixtures.js.map +1 -0
  58. package/lib/atom/content-badge/test/fixtures.js +43 -0
  59. package/lib/atom/content-badge/test/fixtures.js.map +1 -0
  60. package/lib/atom/input-search/test/fixtures.js +31 -0
  61. package/lib/atom/input-search/test/fixtures.js.map +1 -0
  62. package/lib/atom/input-text/test/fixtures.js +3 -0
  63. package/lib/atom/input-text/test/fixtures.js.map +1 -1
  64. package/lib/atom/input-textarea/test/fixtures.js +6 -0
  65. package/lib/atom/input-textarea/test/fixtures.js.map +1 -1
  66. package/lib/atom/tag/test/fixtures.js +31 -0
  67. package/lib/atom/tag/test/fixtures.js.map +1 -0
  68. package/lib/atom/wizard-steps/test/fixtures.js +28 -0
  69. package/lib/atom/wizard-steps/test/fixtures.js.map +1 -0
  70. package/lib/molecule/banner/index.js +19 -10
  71. package/lib/molecule/banner/index.js.map +1 -1
  72. package/lib/molecule/banner/style.css +10 -8
  73. package/lib/molecule/{search → banner}/test/fixtures.js +5 -5
  74. package/lib/molecule/banner/test/fixtures.js.map +1 -0
  75. package/lib/molecule/brand-form-group/index.js +22 -5
  76. package/lib/molecule/brand-form-group/index.js.map +1 -1
  77. package/lib/molecule/brand-form-group/style.css +19 -0
  78. package/lib/molecule/brand-form-group/test/fixtures.js +3 -0
  79. package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
  80. package/lib/molecule/card/test/fixtures.js +6 -0
  81. package/lib/molecule/card/test/fixtures.js.map +1 -1
  82. package/lib/molecule/cm-popin/test/fixtures.js +28 -0
  83. package/lib/molecule/cm-popin/test/fixtures.js.map +1 -0
  84. package/lib/molecule/feedback/test/fixtures.js +0 -3
  85. package/lib/molecule/feedback/test/fixtures.js.map +1 -1
  86. package/lib/molecule/vertical-tabs/test/fixtures.js +25 -0
  87. package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -0
  88. package/lib/molecule/wizard-summary/index.js +3 -1
  89. package/lib/molecule/wizard-summary/index.js.map +1 -1
  90. package/lib/molecule/wizard-summary/style.css +8 -0
  91. package/lib/molecule/wizard-summary/test/fixtures.js +34 -0
  92. package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -0
  93. package/lib/organism/brand-form/test/fixtures/wizard-playlists.js +31 -0
  94. package/lib/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -0
  95. package/lib/organism/brand-form/test/fixtures.js +3 -0
  96. package/lib/organism/brand-form/test/fixtures.js.map +1 -1
  97. package/lib/organism/search-and-chips-results/index.js +1 -0
  98. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  99. package/lib/organism/search-and-chips-results/style.css +1 -1
  100. package/lib/organism/search-and-chips-results/test/fixtures.js +34 -0
  101. package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -0
  102. package/lib/template/app-player/popin-end/test/fixtures.js +0 -3
  103. package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
  104. package/lib/variables/colors.css +2 -0
  105. package/package.json +2 -2
  106. package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
  107. package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
  108. package/es/molecule/search/test/fixtures.js +0 -15
  109. package/es/molecule/search/test/fixtures.js.map +0 -1
  110. package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
  111. package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
  112. package/lib/molecule/search/test/fixtures.js.map +0 -1
@@ -87,11 +87,7 @@
87
87
 
88
88
  .text {
89
89
  background: transparent;
90
- color: cm_grey_900;
90
+ color: inherit;
91
91
  border-radius: 0px;
92
92
  height: auto;
93
- }
94
-
95
- .text:hover {
96
- color: cm_primary_blue;
97
93
  }
@@ -0,0 +1,33 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomButtonLink from '..';
5
+ import fixtureButtonDangerousNoIcon from './fixtures/button-dangerous-no-icon';
6
+ import fixtureButtonPrimaryIconLeft from './fixtures/button-primary-icon-left';
7
+ import fixtureButtonPrimaryNoIcon from './fixtures/button-primary-no-icon';
8
+ import fixtureButtonSecondaryNoIconDisabled from './fixtures/button-secondary-no-icon-disabled';
9
+ import fixtureButtonTertiaryIconLeft from './fixtures/button-tertiary-icon-left';
10
+ import fixtureIconButton from './fixtures/icon-button';
11
+ import fixtureLinkPrimaryDisabledIconRight from './fixtures/link-primary-disabled-icon-right';
12
+ import fixtureLinkSecondaryIconRight from './fixtures/link-secondary-icon-right';
13
+ import fixtureLinkTertiaryNoIcon from './fixtures/link-tertiary-no-icon';
14
+ import fixtureLinkTextIconRightTargetBlank from './fixtures/link-text-icon-right-target-blank';
15
+ import fixtureLinkTextNoIconDownload from './fixtures/link-text-no-icon-download';
16
+ test('Atom › AtomButtonLink > should have valid propTypes', t => {
17
+ t.pass();
18
+ forEach(AtomButtonLink.propTypes, (value, key) => {
19
+ t.not(value, undefined, `PropType for "Atom.AtomButtonLink.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
20
+ });
21
+ });
22
+ test('Atom › AtomButtonLink › ButtonDangerousNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonDangerousNoIcon);
23
+ test('Atom › AtomButtonLink › ButtonPrimaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryIconLeft);
24
+ test('Atom › AtomButtonLink › ButtonPrimaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryNoIcon);
25
+ test('Atom › AtomButtonLink › ButtonSecondaryNoIconDisabled › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonSecondaryNoIconDisabled);
26
+ test('Atom › AtomButtonLink › ButtonTertiaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonTertiaryIconLeft);
27
+ test('Atom › AtomButtonLink › IconButton › should be rendered', renderComponentMacro, AtomButtonLink, fixtureIconButton);
28
+ test('Atom › AtomButtonLink › LinkPrimaryDisabledIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkPrimaryDisabledIconRight);
29
+ test('Atom › AtomButtonLink › LinkSecondaryIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkSecondaryIconRight);
30
+ test('Atom › AtomButtonLink › LinkTertiaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTertiaryNoIcon);
31
+ test('Atom › AtomButtonLink › LinkTextIconRightTargetBlank › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextIconRightTargetBlank);
32
+ test('Atom › AtomButtonLink › LinkTextNoIconDownload › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextNoIconDownload);
33
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/button-link/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLink","fixtureButtonDangerousNoIcon","fixtureButtonPrimaryIconLeft","fixtureButtonPrimaryNoIcon","fixtureButtonSecondaryNoIconDisabled","fixtureButtonTertiaryIconLeft","fixtureIconButton","fixtureLinkPrimaryDisabledIconRight","fixtureLinkSecondaryIconRight","fixtureLinkTertiaryNoIcon","fixtureLinkTextIconRightTargetBlank","fixtureLinkTextNoIconDownload","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,4BAAP,MAAyC,qCAAzC;AACA,OAAOC,4BAAP,MAAyC,qCAAzC;AACA,OAAOC,0BAAP,MAAuC,mCAAvC;AACA,OAAOC,oCAAP,MAAiD,8CAAjD;AACA,OAAOC,6BAAP,MAA0C,sCAA1C;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,mCAAP,MAAgD,6CAAhD;AACA,OAAOC,6BAAP,MAA0C,sCAA1C;AACA,OAAOC,yBAAP,MAAsC,kCAAtC;AACA,OAAOC,mCAAP,MAAgD,8CAAhD;AACA,OAAOC,6BAAP,MAA0C,uCAA1C;AAEAd,IAAI,CAAC,qDAAD,EAAwDe,CAAC,IAAI;AAC/DA,EAAAA,CAAC,CAACC,IAAF;AACAf,EAAAA,OAAO,CAACE,cAAc,CAACc,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+CAA8CF,GAAI,mEAA3E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAnB,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,cAA7F,EAA6GC,4BAA7G,CAAJ;AACAJ,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,cAA7F,EAA6GE,4BAA7G,CAAJ;AACAL,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,cAA3F,EAA2GG,0BAA3G,CAAJ;AACAN,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,cAArG,EAAqHI,oCAArH,CAAJ;AACAP,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,cAA9F,EAA8GK,6BAA9G,CAAJ;AACAR,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,cAAlF,EAAkGM,iBAAlG,CAAJ;AACAT,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,cAApG,EAAoHO,mCAApH,CAAJ;AACAV,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,cAA9F,EAA8GQ,6BAA9G,CAAJ;AACAX,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,cAA1F,EAA0GS,yBAA1G,CAAJ;AACAZ,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,cAApG,EAAoHU,mCAApH,CAAJ;AACAb,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,cAA9F,EAA8GW,6BAA9G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLink from '..';\nimport fixtureButtonDangerousNoIcon from './fixtures/button-dangerous-no-icon';\nimport fixtureButtonPrimaryIconLeft from './fixtures/button-primary-icon-left';\nimport fixtureButtonPrimaryNoIcon from './fixtures/button-primary-no-icon';\nimport fixtureButtonSecondaryNoIconDisabled from './fixtures/button-secondary-no-icon-disabled';\nimport fixtureButtonTertiaryIconLeft from './fixtures/button-tertiary-icon-left';\nimport fixtureIconButton from './fixtures/icon-button';\nimport fixtureLinkPrimaryDisabledIconRight from './fixtures/link-primary-disabled-icon-right';\nimport fixtureLinkSecondaryIconRight from './fixtures/link-secondary-icon-right';\nimport fixtureLinkTertiaryNoIcon from './fixtures/link-tertiary-no-icon';\nimport fixtureLinkTextIconRightTargetBlank from './fixtures/link-text-icon-right-target-blank';\nimport fixtureLinkTextNoIconDownload from './fixtures/link-text-no-icon-download';\n\ntest('Atom › AtomButtonLink > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLink.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLink.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLink › ButtonDangerousNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonDangerousNoIcon);\ntest('Atom › AtomButtonLink › ButtonPrimaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryIconLeft);\ntest('Atom › AtomButtonLink › ButtonPrimaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonPrimaryNoIcon);\ntest('Atom › AtomButtonLink › ButtonSecondaryNoIconDisabled › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonSecondaryNoIconDisabled);\ntest('Atom › AtomButtonLink › ButtonTertiaryIconLeft › should be rendered', renderComponentMacro, AtomButtonLink, fixtureButtonTertiaryIconLeft);\ntest('Atom › AtomButtonLink › IconButton › should be rendered', renderComponentMacro, AtomButtonLink, fixtureIconButton);\ntest('Atom › AtomButtonLink › LinkPrimaryDisabledIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkPrimaryDisabledIconRight);\ntest('Atom › AtomButtonLink › LinkSecondaryIconRight › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkSecondaryIconRight);\ntest('Atom › AtomButtonLink › LinkTertiaryNoIcon › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTertiaryNoIcon);\ntest('Atom › AtomButtonLink › LinkTextIconRightTargetBlank › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextIconRightTargetBlank);\ntest('Atom › AtomButtonLink › LinkTextNoIconDownload › should be rendered', renderComponentMacro, AtomButtonLink, fixtureLinkTextNoIconDownload);\n"],"file":"fixtures.js"}
@@ -0,0 +1,17 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomChips from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureLongText from './fixtures/long-text';
7
+ import fixtureNonSelected from './fixtures/non-selected';
8
+ test('Atom › AtomChips > should have valid propTypes', t => {
9
+ t.pass();
10
+ forEach(AtomChips.propTypes, (value, key) => {
11
+ t.not(value, undefined, `PropType for "Atom.AtomChips.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
12
+ });
13
+ });
14
+ test('Atom › AtomChips › Default › should be rendered', renderComponentMacro, AtomChips, fixtureDefault);
15
+ test('Atom › AtomChips › LongText › should be rendered', renderComponentMacro, AtomChips, fixtureLongText);
16
+ test('Atom › AtomChips › NonSelected › should be rendered', renderComponentMacro, AtomChips, fixtureNonSelected);
17
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/chips/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomChips","fixtureDefault","fixtureLongText","fixtureNonSelected","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,SAAP,MAAsB,IAAtB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AAEAN,IAAI,CAAC,gDAAD,EAAmDO,CAAC,IAAI;AAC1DA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,SAAS,CAACM,SAAX,EAAsB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0CAAyCF,GAAI,mEAAtE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,SAA1E,EAAqFC,cAArF,CAAJ;AACAJ,IAAI,CAAC,kDAAD,EAAqDE,oBAArD,EAA2EC,SAA3E,EAAsFE,eAAtF,CAAJ;AACAL,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,SAA9E,EAAyFG,kBAAzF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomChips from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLongText from './fixtures/long-text';\nimport fixtureNonSelected from './fixtures/non-selected';\n\ntest('Atom › AtomChips > should have valid propTypes', t => {\n t.pass();\n forEach(AtomChips.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomChips.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomChips › Default › should be rendered', renderComponentMacro, AtomChips, fixtureDefault);\ntest('Atom › AtomChips › LongText › should be rendered', renderComponentMacro, AtomChips, fixtureLongText);\ntest('Atom › AtomChips › NonSelected › should be rendered', renderComponentMacro, AtomChips, fixtureNonSelected);\n"],"file":"fixtures.js"}
@@ -0,0 +1,27 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomContentBadge from '..';
5
+ import fixtureAdvanced from './fixtures/advanced';
6
+ import fixtureArticle from './fixtures/article';
7
+ import fixtureChapter from './fixtures/chapter';
8
+ import fixtureCoach from './fixtures/coach';
9
+ import fixtureDefault from './fixtures/default';
10
+ import fixturePodcast from './fixtures/podcast';
11
+ import fixtureScorm from './fixtures/scorm';
12
+ import fixtureVideo from './fixtures/video';
13
+ test('Atom › AtomContentBadge > should have valid propTypes', t => {
14
+ t.pass();
15
+ forEach(AtomContentBadge.propTypes, (value, key) => {
16
+ t.not(value, undefined, `PropType for "Atom.AtomContentBadge.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
17
+ });
18
+ });
19
+ test('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);
20
+ test('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);
21
+ test('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);
22
+ test('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);
23
+ test('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);
24
+ test('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);
25
+ test('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);
26
+ test('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);
27
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomContentBadge","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureDefault","fixturePodcast","fixtureScorm","fixtureVideo","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,e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forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomContentBadge from '..';\nimport fixtureAdvanced from './fixtures/advanced';\nimport fixtureArticle from './fixtures/article';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoach from './fixtures/coach';\nimport fixtureDefault from './fixtures/default';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureVideo from './fixtures/video';\n\ntest('Atom › AtomContentBadge > should have valid propTypes', t => {\n t.pass();\n forEach(AtomContentBadge.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomContentBadge.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);\ntest('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);\ntest('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);\ntest('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);\ntest('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);\ntest('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);\ntest('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);\ntest('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);\n"],"file":"fixtures.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 AtomInputSearch from '..';
5
+ import fixtureCoorpmanagerWithValue from './fixtures/coorpmanager-with-value';
6
+ import fixtureCoorpmanager from './fixtures/coorpmanager';
7
+ import fixtureDefault from './fixtures/default';
8
+ import fixtureWithValue from './fixtures/with-value';
9
+ test('Atom › AtomInputSearch > should have valid propTypes', t => {
10
+ t.pass();
11
+ forEach(AtomInputSearch.propTypes, (value, key) => {
12
+ t.not(value, undefined, `PropType for "Atom.AtomInputSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
13
+ });
14
+ });
15
+ test('Atom › AtomInputSearch › CoorpmanagerWithValue › should be rendered', renderComponentMacro, AtomInputSearch, fixtureCoorpmanagerWithValue);
16
+ test('Atom › AtomInputSearch › Coorpmanager › should be rendered', renderComponentMacro, AtomInputSearch, fixtureCoorpmanager);
17
+ test('Atom › AtomInputSearch › Default › should be rendered', renderComponentMacro, AtomInputSearch, fixtureDefault);
18
+ test('Atom › AtomInputSearch › WithValue › should be rendered', renderComponentMacro, AtomInputSearch, fixtureWithValue);
19
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/input-search/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSearch","fixtureCoorpmanagerWithValue","fixtureCoorpmanager","fixtureDefault","fixtureWithValue","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,eAAP,MAA4B,IAA5B;AACA,OAAOC,4BAAP,MAAyC,oCAAzC;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAP,IAAI,CAAC,sDAAD,EAAyDQ,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,eAAe,CAACO,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,eAA9F,EAA+GC,4BAA/G,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,eAArF,EAAsGE,mBAAtG,CAAJ;AACAL,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGG,cAAjG,CAAJ;AACAN,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGI,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputSearch from '..';\nimport fixtureCoorpmanagerWithValue from './fixtures/coorpmanager-with-value';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Atom › AtomInputSearch > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputSearch › CoorpmanagerWithValue › should be rendered', renderComponentMacro, AtomInputSearch, fixtureCoorpmanagerWithValue);\ntest('Atom › AtomInputSearch › Coorpmanager › should be rendered', renderComponentMacro, AtomInputSearch, fixtureCoorpmanager);\ntest('Atom › AtomInputSearch › Default › should be rendered', renderComponentMacro, AtomInputSearch, fixtureDefault);\ntest('Atom › AtomInputSearch › WithValue › should be rendered', renderComponentMacro, AtomInputSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
@@ -2,6 +2,7 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomInputText from '..';
5
+ import fixtureCmDefault from './fixtures/cm-default';
5
6
  import fixtureDefault from './fixtures/default';
6
7
  import fixtureDisabled from './fixtures/disabled';
7
8
  import fixtureEmpty from './fixtures/empty';
@@ -15,6 +16,7 @@ test('Atom › AtomInputText > should have valid propTypes', t => {
15
16
  t.not(value, undefined, `PropType for "Atom.AtomInputText.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
16
17
  });
17
18
  });
19
+ test('Atom › AtomInputText › CmDefault › should be rendered', renderComponentMacro, AtomInputText, fixtureCmDefault);
18
20
  test('Atom › AtomInputText › Default › should be rendered', renderComponentMacro, AtomInputText, fixtureDefault);
19
21
  test('Atom › AtomInputText › Disabled › should be rendered', renderComponentMacro, AtomInputText, fixtureDisabled);
20
22
  test('Atom › AtomInputText › Empty › should be rendered', renderComponentMacro, AtomInputText, fixtureEmpty);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/input-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputText","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureError","fixtureModified","fixtureNotitle","fixtureRequired","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,aAAP,MAA0B,IAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAEAV,IAAI,CAAC,oDAAD,EAAuDW,CAAC,IAAI;AAC9DA,EAAAA,CAAC,CAACC,IAAF;AACAX,EAAAA,OAAO,CAACE,aAAa,CAACU,SAAf,EAA0B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8CAA6CF,GAAI,mEAA1E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAf,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,aAA9E,EAA6FC,cAA7F,CAAJ;AACAJ,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,aAA/E,EAA8FE,eAA9F,CAAJ;AACAL,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,aAA5E,EAA2FG,YAA3F,CAAJ;AACAN,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,aAA5E,EAA2FI,YAA3F,CAAJ;AACAP,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,aAA/E,EAA8FK,eAA9F,CAAJ;AACAR,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,aAA9E,EAA6FM,cAA7F,CAAJ;AACAT,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,aAA/E,EAA8FO,eAA9F,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureError from './fixtures/error';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNotitle from './fixtures/notitle';\nimport fixtureRequired from './fixtures/required';\n\ntest('Atom › AtomInputText > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputText › Default › should be rendered', renderComponentMacro, AtomInputText, fixtureDefault);\ntest('Atom › AtomInputText › Disabled › should be rendered', renderComponentMacro, AtomInputText, fixtureDisabled);\ntest('Atom › AtomInputText › Empty › should be rendered', renderComponentMacro, AtomInputText, fixtureEmpty);\ntest('Atom › AtomInputText › Error › should be rendered', renderComponentMacro, AtomInputText, fixtureError);\ntest('Atom › AtomInputText › Modified › should be rendered', renderComponentMacro, AtomInputText, fixtureModified);\ntest('Atom › AtomInputText › Notitle › should be rendered', renderComponentMacro, AtomInputText, fixtureNotitle);\ntest('Atom › AtomInputText › Required › should be rendered', renderComponentMacro, AtomInputText, fixtureRequired);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/input-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputText","fixtureCmDefault","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureError","fixtureModified","fixtureNotitle","fixtureRequired","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,aAAP,MAA0B,IAA1B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AAEAX,IAAI,CAAC,oDAAD,EAAuDY,CAAC,IAAI;AAC9DA,EAAAA,CAAC,CAACC,IAAF;AACAZ,EAAAA,OAAO,CAACE,aAAa,CAACW,SAAf,EAA0B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8CAA6CF,GAAI,mEAA1E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAhB,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,aAAhF,EAA+FC,gBAA/F,CAAJ;AACAJ,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,aAA9E,EAA6FE,cAA7F,CAAJ;AACAL,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,aAA/E,EAA8FG,eAA9F,CAAJ;AACAN,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,aAA5E,EAA2FI,YAA3F,CAAJ;AACAP,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,aAA5E,EAA2FK,YAA3F,CAAJ;AACAR,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,aAA/E,EAA8FM,eAA9F,CAAJ;AACAT,IAAI,CAAC,qDAAD,EAAwDE,oBAAxD,EAA8EC,aAA9E,EAA6FO,cAA7F,CAAJ;AACAV,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,aAA/E,EAA8FQ,eAA9F,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputText from '..';\nimport fixtureCmDefault from './fixtures/cm-default';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureError from './fixtures/error';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNotitle from './fixtures/notitle';\nimport fixtureRequired from './fixtures/required';\n\ntest('Atom › AtomInputText > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputText › CmDefault › should be rendered', renderComponentMacro, AtomInputText, fixtureCmDefault);\ntest('Atom › AtomInputText › Default › should be rendered', renderComponentMacro, AtomInputText, fixtureDefault);\ntest('Atom › AtomInputText › Disabled › should be rendered', renderComponentMacro, AtomInputText, fixtureDisabled);\ntest('Atom › AtomInputText › Empty › should be rendered', renderComponentMacro, AtomInputText, fixtureEmpty);\ntest('Atom › AtomInputText › Error › should be rendered', renderComponentMacro, AtomInputText, fixtureError);\ntest('Atom › AtomInputText › Modified › should be rendered', renderComponentMacro, AtomInputText, fixtureModified);\ntest('Atom › AtomInputText › Notitle › should be rendered', renderComponentMacro, AtomInputText, fixtureNotitle);\ntest('Atom › AtomInputText › Required › should be rendered', renderComponentMacro, AtomInputText, fixtureRequired);\n"],"file":"fixtures.js"}
@@ -2,6 +2,8 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomInputTextarea from '..';
5
+ import fixtureCmDefault from './fixtures/cm-default';
6
+ import fixtureCmEmpty from './fixtures/cm-empty';
5
7
  import fixtureDefault from './fixtures/default';
6
8
  import fixtureEmpty from './fixtures/empty';
7
9
  import fixtureError from './fixtures/error';
@@ -11,6 +13,8 @@ test('Atom › AtomInputTextarea > should have valid propTypes', t => {
11
13
  t.not(value, undefined, `PropType for "Atom.AtomInputTextarea.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
12
14
  });
13
15
  });
16
+ test('Atom › AtomInputTextarea › CmDefault › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureCmDefault);
17
+ test('Atom › AtomInputTextarea › CmEmpty › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureCmEmpty);
14
18
  test('Atom › AtomInputTextarea › Default › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureDefault);
15
19
  test('Atom › AtomInputTextarea › Empty › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureEmpty);
16
20
  test('Atom › AtomInputTextarea › Error › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureError);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/input-textarea/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputTextarea","fixtureDefault","fixtureEmpty","fixtureError","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAN,IAAI,CAAC,wDAAD,EAA2DO,CAAC,IAAI;AAClEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,iBAAiB,CAACM,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kDAAiDF,GAAI,mEAA9E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGC,cAArG,CAAJ;AACAJ,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,iBAAhF,EAAmGE,YAAnG,CAAJ;AACAL,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,iBAAhF,EAAmGG,YAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputTextarea from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureError from './fixtures/error';\n\ntest('Atom › AtomInputTextarea > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputTextarea.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputTextarea.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputTextarea › Default › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureDefault);\ntest('Atom › AtomInputTextarea › Empty › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureEmpty);\ntest('Atom › AtomInputTextarea › Error › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureError);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/input-textarea/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputTextarea","fixtureCmDefault","fixtureCmEmpty","fixtureDefault","fixtureEmpty","fixtureError","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAR,IAAI,CAAC,wDAAD,EAA2DS,CAAC,IAAI;AAClEA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,iBAAiB,CAACQ,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kDAAiDF,GAAI,mEAA9E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,2DAAD,EAA8DE,oBAA9D,EAAoFC,iBAApF,EAAuGC,gBAAvG,CAAJ;AACAJ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGE,cAArG,CAAJ;AACAL,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,iBAAlF,EAAqGG,cAArG,CAAJ;AACAN,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,iBAAhF,EAAmGI,YAAnG,CAAJ;AACAP,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,iBAAhF,EAAmGK,YAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputTextarea from '..';\nimport fixtureCmDefault from './fixtures/cm-default';\nimport fixtureCmEmpty from './fixtures/cm-empty';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureError from './fixtures/error';\n\ntest('Atom › AtomInputTextarea > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputTextarea.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputTextarea.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputTextarea › CmDefault › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureCmDefault);\ntest('Atom › AtomInputTextarea › CmEmpty › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureCmEmpty);\ntest('Atom › AtomInputTextarea › Default › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureDefault);\ntest('Atom › AtomInputTextarea › Empty › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureEmpty);\ntest('Atom › AtomInputTextarea › Error › should be rendered', renderComponentMacro, AtomInputTextarea, fixtureError);\n"],"file":"fixtures.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 AtomTag from '..';
5
+ import fixtureArchived from './fixtures/archived';
6
+ import fixtureDefault from './fixtures/default';
7
+ import fixturePublished from './fixtures/published';
8
+ import fixtureRevision from './fixtures/revision';
9
+ test('Atom › AtomTag > should have valid propTypes', t => {
10
+ t.pass();
11
+ forEach(AtomTag.propTypes, (value, key) => {
12
+ t.not(value, undefined, `PropType for "Atom.AtomTag.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
13
+ });
14
+ });
15
+ test('Atom › AtomTag › Archived › should be rendered', renderComponentMacro, AtomTag, fixtureArchived);
16
+ test('Atom › AtomTag › Default › should be rendered', renderComponentMacro, AtomTag, fixtureDefault);
17
+ test('Atom › AtomTag › Published › should be rendered', renderComponentMacro, AtomTag, fixturePublished);
18
+ test('Atom › AtomTag › Revision › should be rendered', renderComponentMacro, AtomTag, fixtureRevision);
19
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +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"}
@@ -0,0 +1,17 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomWizardSteps from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureFirstStep from './fixtures/first-step';
7
+ import fixtureLastStep from './fixtures/last-step';
8
+ test('Atom › AtomWizardSteps > should have valid propTypes', t => {
9
+ t.pass();
10
+ forEach(AtomWizardSteps.propTypes, (value, key) => {
11
+ t.not(value, undefined, `PropType for "Atom.AtomWizardSteps.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
12
+ });
13
+ });
14
+ test('Atom › AtomWizardSteps › Default › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureDefault);
15
+ test('Atom › AtomWizardSteps › FirstStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureFirstStep);
16
+ test('Atom › AtomWizardSteps › LastStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureLastStep);
17
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/wizard-steps/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomWizardSteps","fixtureDefault","fixtureFirstStep","fixtureLastStep","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,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AAEAN,IAAI,CAAC,sDAAD,EAAyDO,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,eAAe,CAACM,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGC,cAAjG,CAAJ;AACAJ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGE,gBAAnG,CAAJ;AACAL,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGG,eAAlG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomWizardSteps from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureFirstStep from './fixtures/first-step';\nimport fixtureLastStep from './fixtures/last-step';\n\ntest('Atom › AtomWizardSteps > should have valid propTypes', t => {\n t.pass();\n forEach(AtomWizardSteps.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomWizardSteps.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomWizardSteps › Default › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureDefault);\ntest('Atom › AtomWizardSteps › FirstStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureFirstStep);\ntest('Atom › AtomWizardSteps › LastStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureLastStep);\n"],"file":"fixtures.js"}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classnames from 'classnames';
4
4
  import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as QuestionIcon } from '@coorpacademy/nova-icons';
5
- import Link from '../../atom/link';
5
+ import Link from '../../atom/button-link';
6
6
  import style from './style.css';
7
7
 
8
8
  const Banner = props => {
@@ -15,23 +15,32 @@ const Banner = props => {
15
15
  secondCTA
16
16
  } = props;
17
17
  return /*#__PURE__*/React.createElement("div", {
18
- className: classnames(style.banner, type === 'error' && style.errorBanner)
18
+ className: classnames(style.banner, type === 'error' && style.errorBanner),
19
+ title: message
19
20
  }, /*#__PURE__*/React.createElement("div", {
20
21
  "data-name": `${type}-banner-message`,
21
22
  className: style.message
22
23
  }, /*#__PURE__*/React.createElement(QuestionIcon, {
23
24
  className: style.icon
24
- }), message), firstCTALabel ? /*#__PURE__*/React.createElement(Link, {
25
+ }), message), firstCTALabel ? /*#__PURE__*/React.createElement("div", {
26
+ className: style.button
27
+ }, /*#__PURE__*/React.createElement(Link, {
25
28
  "data-name": "first-banner-cta",
26
- className: style.button,
27
- onClick: firstCTA
28
- }, firstCTALabel) : null, firstCTALabel && secondCTALabel ? /*#__PURE__*/React.createElement("div", {
29
+ "aria-label": firstCTALabel,
30
+ label: firstCTALabel,
31
+ onClick: firstCTA,
32
+ type: "text"
33
+ })) : null, firstCTALabel && secondCTALabel ? /*#__PURE__*/React.createElement("div", {
29
34
  className: style.buttonsBar
30
- }) : null, secondCTALabel ? /*#__PURE__*/React.createElement(Link, {
35
+ }) : null, secondCTALabel ? /*#__PURE__*/React.createElement("div", {
36
+ className: style.button
37
+ }, /*#__PURE__*/React.createElement(Link, {
31
38
  "data-name": "second-banner-cta",
32
- className: style.button,
33
- onClick: secondCTA
34
- }, secondCTALabel) : null);
39
+ onClick: secondCTA,
40
+ "aria-label": secondCTALabel,
41
+ label: secondCTALabel,
42
+ type: "text"
43
+ })) : null);
35
44
  };
36
45
 
37
46
  Banner.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -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,iBAAjB;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;AAAK,IAAA,SAAS,EAAEN,UAAU,CAACI,KAAK,CAACS,MAAP,EAAeN,IAAI,KAAK,OAAT,IAAoBH,KAAK,CAACU,WAAzC;AAA1B,kBACE;AAAK,iBAAY,GAAEP,IAAK,iBAAxB;AAA0C,IAAA,SAAS,EAAEH,KAAK,CAACI;AAA3D,kBACE,oBAAC,YAAD;AAAc,IAAA,SAAS,EAAEJ,KAAK,CAACW;AAA/B,IADF,EAEGP,OAFH,CADF,EAKGE,aAAa,gBACZ,oBAAC,IAAD;AAAM,iBAAU,kBAAhB;AAAmC,IAAA,SAAS,EAAEN,KAAK,CAACY,MAApD;AAA4D,IAAA,OAAO,EAAEP;AAArE,KACGC,aADH,CADY,GAIV,IATN,EAUGA,aAAa,IAAIC,cAAjB,gBAAkC;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACa;AAAtB,IAAlC,GAAyE,IAV5E,EAWGN,cAAc,gBACb,oBAAC,IAAD;AAAM,iBAAU,mBAAhB;AAAoC,IAAA,SAAS,EAAEP,KAAK,CAACY,MAArD;AAA6D,IAAA,OAAO,EAAEJ;AAAtE,KACGD,cADH,CADa,GAIX,IAfN,CADF;AAmBD,CArBD;;AAuBAN,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/link';\nimport style from './style.css';\n\nconst Banner = props => {\n const {type, message, firstCTA, firstCTALabel, secondCTALabel, secondCTA} = props;\n return (\n <div className={classnames(style.banner, type === 'error' && style.errorBanner)}>\n <div data-name={`${type}-banner-message`} className={style.message}>\n <QuestionIcon className={style.icon} />\n {message}\n </div>\n {firstCTALabel ? (\n <Link data-name=\"first-banner-cta\" className={style.button} onClick={firstCTA}>\n {firstCTALabel}\n </Link>\n ) : null}\n {firstCTALabel && secondCTALabel ? <div className={style.buttonsBar} /> : null}\n {secondCTALabel ? (\n <Link data-name=\"second-banner-cta\" className={style.button} onClick={secondCTA}>\n {secondCTALabel}\n </Link>\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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ames 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"}
@@ -6,7 +6,9 @@
6
6
  @value cm_negative_50 from colors;
7
7
  @value cm_negative_200 from colors;
8
8
  @value cm_warning_50 from colors;
9
+ @value cm_yellow_100 from colors;
9
10
  @value cm_yellow_200 from colors;
11
+ @value cm_yellow_400 from colors;
10
12
 
11
13
  .banner {
12
14
  display: flex;
@@ -26,20 +28,20 @@
26
28
  color: cm_negative_200;
27
29
  }
28
30
 
29
- .button {
30
- flex-grow: 0;
31
- font-family: Gilroy;
32
- font-size: 12px;
33
- font-weight: bold;
34
- line-height: 1.33;
31
+ .button{
35
32
  background-color: transparent;
33
+ color: cm_yellow_200;
34
+ }
35
+
36
+ .button :hover{
37
+ color: cm_yellow_400;
36
38
  }
37
39
 
38
40
  .buttonsBar {
39
- width: 1px;
41
+ width: 2px;
40
42
  align-self: stretch;
41
43
  flex-grow: 0;
42
- opacity: 0.1;
44
+ opacity: 0.3;
43
45
  background-color: cm_yellow_200;
44
46
  }
45
47
 
@@ -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 MoleculeBanner from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureErrorBanner from './fixtures/error-banner';
7
+ test('Molecule › MoleculeBanner > should have valid propTypes', t => {
8
+ t.pass();
9
+ forEach(MoleculeBanner.propTypes, (value, key) => {
10
+ t.not(value, undefined, `PropType for "Molecule.MoleculeBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
+ });
12
+ });
13
+ test('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);
14
+ test('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);
15
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +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,5 +1,6 @@
1
1
  import _snakeCase from "lodash/fp/snakeCase";
2
2
  import _map from "lodash/fp/map";
3
+ import _keys from "lodash/fp/keys";
3
4
 
4
5
  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); }
5
6
 
@@ -26,6 +27,11 @@ import SetupSections from '../setup-sections';
26
27
  import Title from '../../atom/title';
27
28
  import Roles from '../coorp-manager-roles';
28
29
  import style from './style.css';
30
+ const inputContainerStyle = {
31
+ default: style.defaultWidth,
32
+ medium: style.mediumWidth,
33
+ large: style.largeWidth
34
+ };
29
35
 
30
36
  const buildInput = field => {
31
37
  const {
@@ -95,8 +101,13 @@ const buildInput = field => {
95
101
 
96
102
  const buildField = (field, index) => {
97
103
  const input = buildInput(field);
104
+ const {
105
+ theme,
106
+ size = 'default'
107
+ } = field;
108
+ const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;
98
109
  return /*#__PURE__*/React.createElement("div", {
99
- className: style.field,
110
+ className: styleInput,
100
111
  key: index
101
112
  }, input);
102
113
  };
@@ -134,7 +145,8 @@ BrandFormGroup.propTypes = process.env.NODE_ENV !== "production" ? {
134
145
  fieldsLayout: PropTypes.string,
135
146
  groupLayout: PropTypes.string,
136
147
  fields: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(_extends(_extends({}, Autocomplete.propTypes), {}, {
137
- type: PropTypes.oneOf(['autoComplete'])
148
+ type: PropTypes.oneOf(['autoComplete']),
149
+ size: PropTypes.oneOf(_keys(inputContainerStyle))
138
150
  })), PropTypes.shape(_extends(_extends({}, InputColor.propTypes), {}, {
139
151
  type: PropTypes.oneOf(['color'])
140
152
  })), PropTypes.shape(_extends(_extends({}, InputReadonly.propTypes), {}, {
@@ -142,13 +154,15 @@ BrandFormGroup.propTypes = process.env.NODE_ENV !== "production" ? {
142
154
  })), PropTypes.shape(_extends(_extends({}, InputSwitch.propTypes), {}, {
143
155
  type: PropTypes.oneOf(['switch'])
144
156
  })), PropTypes.shape(_extends(_extends({}, InputTextarea.propTypes), {}, {
145
- type: PropTypes.oneOf(['textarea'])
157
+ type: PropTypes.oneOf(['textarea']),
158
+ size: PropTypes.oneOf(_keys(inputContainerStyle))
146
159
  })), PropTypes.shape(_extends(_extends({}, InputHTML.propTypes), {}, {
147
160
  type: PropTypes.oneOf(['html'])
148
161
  })), PropTypes.shape(_extends(_extends({}, InputDoublestep.propTypes), {}, {
149
162
  type: PropTypes.oneOf(['doublestep'])
150
163
  })), PropTypes.shape(_extends(_extends({}, Select.propTypes), {}, {
151
- type: PropTypes.oneOf(['select'])
164
+ type: PropTypes.oneOf(['select']),
165
+ size: PropTypes.oneOf(_keys(inputContainerStyle))
152
166
  })), PropTypes.shape(_extends(_extends({}, InputCheckbox.propTypes), {}, {
153
167
  type: PropTypes.oneOf(['checkbox'])
154
168
  })), PropTypes.shape(_extends(_extends({}, ImageUpload.propTypes), {}, {
@@ -158,7 +172,8 @@ BrandFormGroup.propTypes = process.env.NODE_ENV !== "production" ? {
158
172
  })), PropTypes.shape(_extends(_extends({}, SetupSections.propTypes), {}, {
159
173
  type: PropTypes.oneOf(['sections'])
160
174
  })), PropTypes.shape(_extends(_extends({}, InputText.propTypes), {}, {
161
- type: PropTypes.oneOf(['text'])
175
+ type: PropTypes.oneOf(['text']),
176
+ size: PropTypes.oneOf(_keys(inputContainerStyle))
162
177
  })), PropTypes.shape(_extends(_extends({}, BrandDownloadBox.propTypes), {}, {
163
178
  type: PropTypes.oneOf(['downloadbox'])
164
179
  })), PropTypes.shape(_extends(_extends({}, BrandUploadBox.propTypes), {}, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["React","PropTypes","classNames","Autocomplete","Select","SelectMultiple","InputText","InputColor","InputCheckbox","InputReadonly","InputSwitch","BrandUploadBox","BrandDownloadBox","Button","InputTextarea","InputHTML","InputDoublestep","ImageUpload","SetupSlider","SetupSections","Title","Roles","style","buildInput","field","type","buildField","index","input","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","string","arrayOf","oneOfType","shape","oneOf"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAO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AA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,UAAD,CAAhB;AAFR,KA7CkB,EAiDlB/C,SAAS,CAAC8C,KAAV,uBACKzC,SAAS,CAACqC,SADf;AAEElB,IAAAA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAFR,KAjDkB,EAqDlB/C,SAAS,CAAC8C,KAAV,uBACKnC,gBAAgB,CAAC+B,SADtB;AAEElB,IAAAA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KArDkB,EAyDlB/C,SAAS,CAAC8C,KAAV,uBACKpC,cAAc,CAACgC,SADpB;AAEElB,IAAAA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KAzDkB,EA6DlB/C,SAAS,CAAC8C,KAAV,uBACKlC,MAAM,CAAC8B,SADZ;AAEElB,IAAAA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KA7DkB,EAiElB/C,SAAS,CAAC8C,KAAV,uBACK1C,cAAc,CAACsC,SADpB;AAEElB,IAAAA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KAjEkB,EAqElB/C,SAAS,CAAC8C,KAAV,uBACK1B,KAAK,CAACsB,SADX;AAEElB,IAAAA,IAAI,EAAExB,SAAS,CAAC+C,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KArEkB,EAyElB/C,SAAS,CAAC8C,KAAV,CAAgBzC,SAAS,CAACqC,SAA1B,CAzEkB,CAApB,CADM;AALiB,CAA3B;AAmFA,eAAed,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n\n return (\n <div className={style.field} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete'])\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea'])\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select'])\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text'])\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["React","PropTypes","classNames","Autocomplete","Select","SelectMultiple","InputText","InputColor","InputCheckbox","InputReadonly","InputSwitch","BrandUploadBox","BrandDownloadBox","Button","InputTextarea","InputHTML","InputDoublestep","ImageUpload","SetupSlider","SetupSections","Title","Roles","style","inputContainerStyle","default","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","string","arrayOf","oneOfType","shape","oneOf"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,eAAP,MAA4B,6BAA5B;AAC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KAAK,CAACgC,SADX;AAEErB,IAAAA,IAAI,EAAE/B,SAAS,CAACyD,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBzD,SAAS,CAACwD,KAAV,CAAgBnD,SAAS,CAAC+C,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;AAuFA,eAAed,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
@@ -50,6 +50,25 @@
50
50
  margin-bottom: 0;
51
51
  }
52
52
 
53
+ .fieldCoorpmanager {
54
+ margin: 0 0 32px 0;
55
+ }
56
+
57
+ .defaultWidth {
58
+ composes: fieldCoorpmanager;
59
+ width: 300px;
60
+ }
61
+
62
+ .mediumWidth {
63
+ composes: fieldCoorpmanager;
64
+ width: 444px;
65
+ }
66
+
67
+ .largeWidth {
68
+ composes: fieldCoorpmanager;
69
+ width: 100%;
70
+ }
71
+
53
72
  @media desktop {
54
73
  .groupGrid {
55
74
  flex-direction: column;
@@ -4,6 +4,7 @@ import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import MoleculeBrandFormGroup from '..';
5
5
  import fixtureAnalytics from './fixtures/analytics';
6
6
  import fixtureAnimations from './fixtures/animations';
7
+ import fixtureCmDefault from './fixtures/cm-default';
7
8
  import fixtureCohort from './fixtures/cohort';
8
9
  import fixtureDashboard from './fixtures/dashboard';
9
10
  import fixtureDefault from './fixtures/default';
@@ -21,6 +22,7 @@ test('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {
21
22
  });
22
23
  test('Molecule › MoleculeBrandFormGroup › Analytics › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnalytics);
23
24
  test('Molecule › MoleculeBrandFormGroup › Animations › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnimations);
25
+ test('Molecule › MoleculeBrandFormGroup › CmDefault › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCmDefault);
24
26
  test('Molecule › MoleculeBrandFormGroup › Cohort › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCohort);
25
27
  test('Molecule › MoleculeBrandFormGroup › Dashboard › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDashboard);
26
28
  test('Molecule › MoleculeBrandFormGroup › Default › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDefault);