@coorpacademy/components 10.13.3 → 10.13.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.
- package/es/atom/button-link-icon-only/index.js +19 -4
- package/es/atom/button-link-icon-only/index.js.map +1 -1
- package/es/atom/button-link-icon-only/style.css +29 -0
- package/es/atom/button-link-icon-only/test/button-link-icon-only.js +15 -0
- package/es/atom/button-link-icon-only/test/button-link-icon-only.js.map +1 -1
- package/es/atom/button-link-icon-only/test/fixtures/review-header.js +10 -0
- package/es/atom/button-link-icon-only/test/fixtures/review-header.js.map +1 -0
- package/es/atom/button-link-icon-only/test/fixtures.js +2 -0
- package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -1
- package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
- package/es/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/es/atom/input-text/style.css +1 -1
- package/es/atom/input-text-with-title/index.js +4 -2
- package/es/atom/input-text-with-title/index.js.map +1 -1
- package/es/atom/input-text-with-title/style.css +6 -2
- package/es/atom/input-text-with-title/test/fixtures/error.js +3 -1
- package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -1
- package/es/atom/input-text-with-title/test/fixtures.js +15 -0
- package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/es/atom/review-header-step-item/index.js +3 -3
- package/es/atom/review-header-step-item/index.js.map +1 -1
- package/es/atom/review-header-step-item/style.css +4 -3
- package/es/atom/review-header-step-item/test/fixtures.js +19 -0
- package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/style.css +1 -1
- package/es/molecule/course-sections/test/fixtures.js +2 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -1
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/drag-and-drop-wrapper/index.js +39 -0
- package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -0
- package/es/molecule/drag-and-drop-wrapper/style.css +15 -0
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js +9 -0
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -0
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +10 -0
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures.js +23 -0
- package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/es/organism/review-header/index.js +68 -0
- package/es/organism/review-header/index.js.map +1 -0
- package/es/organism/review-header/style.css +138 -0
- package/es/organism/review-header/test/fixtures/all-questions-ok.js +16 -0
- package/es/organism/review-header/test/fixtures/all-questions-ok.js.map +1 -0
- package/es/organism/review-header/test/fixtures/current-question-no-answered.js +12 -0
- package/es/organism/review-header/test/fixtures/current-question-no-answered.js.map +1 -0
- package/es/organism/review-header/test/fixtures/current-question-wrong.js +10 -0
- package/es/organism/review-header/test/fixtures/current-question-wrong.js.map +1 -0
- package/es/organism/review-header/test/fixtures/first-question-current-right.js +10 -0
- package/es/organism/review-header/test/fixtures/first-question-current-right.js.map +1 -0
- package/es/organism/review-header/test/fixtures/no-answered-question.js +10 -0
- package/es/organism/review-header/test/fixtures/no-answered-question.js.map +1 -0
- package/es/organism/review-header/test/fixtures/question-to-repeat.js +10 -0
- package/es/organism/review-header/test/fixtures/question-to-repeat.js.map +1 -0
- package/es/organism/review-header/test/fixtures.js +23 -0
- package/es/organism/review-header/test/fixtures.js.map +1 -0
- package/es/organism/review-header/test/review-header.js +40 -0
- package/es/organism/review-header/test/review-header.js.map +1 -0
- package/lib/atom/button-link-icon-only/index.js +19 -4
- package/lib/atom/button-link-icon-only/index.js.map +1 -1
- package/lib/atom/button-link-icon-only/style.css +29 -0
- package/lib/atom/button-link-icon-only/test/button-link-icon-only.js +14 -0
- package/lib/atom/button-link-icon-only/test/button-link-icon-only.js.map +1 -1
- package/lib/atom/button-link-icon-only/test/fixtures/review-header.js +15 -0
- package/lib/atom/button-link-icon-only/test/fixtures/review-header.js.map +1 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js +3 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
- package/lib/atom/checkbox-with-title/test/fixtures.js +25 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/input-text/style.css +1 -1
- package/lib/atom/input-text-with-title/index.js +4 -2
- package/lib/atom/input-text-with-title/index.js.map +1 -1
- package/lib/atom/input-text-with-title/style.css +6 -2
- package/lib/atom/input-text-with-title/test/fixtures/error.js +3 -1
- package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -1
- package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
- package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/review-header-step-item/index.js +3 -3
- package/lib/atom/review-header-step-item/index.js.map +1 -1
- package/lib/atom/review-header-step-item/style.css +4 -3
- package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
- package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/style.css +1 -1
- package/lib/molecule/course-sections/test/fixtures.js +3 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -1
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/drag-and-drop-wrapper/index.js +49 -0
- package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -0
- package/lib/molecule/drag-and-drop-wrapper/style.css +15 -0
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js +19 -0
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -0
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +21 -0
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
- package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/lib/organism/review-header/index.js +81 -0
- package/lib/organism/review-header/index.js.map +1 -0
- package/lib/organism/review-header/style.css +138 -0
- package/lib/organism/review-header/test/fixtures/all-questions-ok.js +26 -0
- package/lib/organism/review-header/test/fixtures/all-questions-ok.js.map +1 -0
- package/lib/organism/review-header/test/fixtures/current-question-no-answered.js +22 -0
- package/lib/organism/review-header/test/fixtures/current-question-no-answered.js.map +1 -0
- package/lib/organism/review-header/test/fixtures/current-question-wrong.js +20 -0
- package/lib/organism/review-header/test/fixtures/current-question-wrong.js.map +1 -0
- package/lib/organism/review-header/test/fixtures/first-question-current-right.js +20 -0
- package/lib/organism/review-header/test/fixtures/first-question-current-right.js.map +1 -0
- package/lib/organism/review-header/test/fixtures/no-answered-question.js +20 -0
- package/lib/organism/review-header/test/fixtures/no-answered-question.js.map +1 -0
- package/lib/organism/review-header/test/fixtures/question-to-repeat.js +20 -0
- package/lib/organism/review-header/test/fixtures/question-to-repeat.js.map +1 -0
- package/lib/organism/review-header/test/fixtures.js +37 -0
- package/lib/organism/review-header/test/fixtures.js.map +1 -0
- package/lib/organism/review-header/test/review-header.js +51 -0
- package/lib/organism/review-header/test/review-header.js.map +1 -0
- package/package.json +2 -2
|
@@ -26,6 +26,19 @@ const getButtonContent = icon => {
|
|
|
26
26
|
}));
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
const getSizeStyle = size => {
|
|
30
|
+
switch (size) {
|
|
31
|
+
case 'small':
|
|
32
|
+
return style.small;
|
|
33
|
+
|
|
34
|
+
case 'responsive':
|
|
35
|
+
return style.responsive;
|
|
36
|
+
|
|
37
|
+
default:
|
|
38
|
+
return style.default;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
29
42
|
const ButtonLinkIconOnly = props => {
|
|
30
43
|
const {
|
|
31
44
|
size = 'default',
|
|
@@ -34,10 +47,11 @@ const ButtonLinkIconOnly = props => {
|
|
|
34
47
|
'data-name': dataName,
|
|
35
48
|
'aria-label': ariaLabel,
|
|
36
49
|
link,
|
|
37
|
-
onClick
|
|
50
|
+
onClick,
|
|
51
|
+
className
|
|
38
52
|
} = props;
|
|
39
53
|
const contentView = getButtonContent(icon);
|
|
40
|
-
const styleButton = classnames(size
|
|
54
|
+
const styleButton = classnames(getSizeStyle(size), link && style.link, disabled && style.disabled, className);
|
|
41
55
|
const handleOnClick = useMemo(() => () => onClick(), [onClick]);
|
|
42
56
|
|
|
43
57
|
if (link) {
|
|
@@ -60,7 +74,7 @@ const ButtonLinkIconOnly = props => {
|
|
|
60
74
|
};
|
|
61
75
|
|
|
62
76
|
ButtonLinkIconOnly.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
63
|
-
size: PropTypes.oneOf(['default', 'small']),
|
|
77
|
+
size: PropTypes.oneOf(['default', 'small', 'responsive']),
|
|
64
78
|
'aria-label': PropTypes.string,
|
|
65
79
|
'data-name': PropTypes.string,
|
|
66
80
|
icon: PropTypes.oneOf(_keys(ICONS)),
|
|
@@ -70,7 +84,8 @@ ButtonLinkIconOnly.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
70
84
|
download: PropTypes.bool,
|
|
71
85
|
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
72
86
|
}),
|
|
73
|
-
disabled: PropTypes.bool
|
|
87
|
+
disabled: PropTypes.bool,
|
|
88
|
+
className: PropTypes.string
|
|
74
89
|
} : {};
|
|
75
90
|
export default ButtonLinkIconOnly;
|
|
76
91
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/button-link-icon-only/index.js"],"names":["React","useMemo","PropTypes","classnames","ICONS","Link","style","getButtonContent","icon","Icon","buttonContent","
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/button-link-icon-only/index.js"],"names":["React","useMemo","PropTypes","classnames","ICONS","Link","style","getButtonContent","icon","Icon","buttonContent","getSizeStyle","size","small","responsive","default","ButtonLinkIconOnly","props","disabled","dataName","ariaLabel","link","onClick","className","contentView","styleButton","handleOnClick","propTypes","oneOf","string","func","shape","href","download","bool","target"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAGC,IAAI,IAAI;AAC/B,QAAMC,IAAI,GAAG,OAAM,IAAN,EAAYD,IAAZ,EAAkBJ,KAAlB,CAAb;;AAEA,MAAI,CAACK,IAAL,EAAW;AACT,wBAAO;AAAK,MAAA,SAAS,EAAEH,KAAK,CAACI;AAAtB,MAAP;AACD;;AAED,sBACE;AAAK,IAAA,SAAS,EAAEJ,KAAK,CAACI;AAAtB,kBACE,oBAAC,IAAD;AAAM,IAAA,SAAS,EAAEJ,KAAK,CAACE;AAAvB,IADF,CADF;AAKD,CAZD;;AAcA,MAAMG,YAAY,GAAGC,IAAI,IAAI;AAC3B,UAAQA,IAAR;AACE,SAAK,OAAL;AACE,aAAON,KAAK,CAACO,KAAb;;AACF,SAAK,YAAL;AACE,aAAOP,KAAK,CAACQ,UAAb;;AACF;AACE,aAAOR,KAAK,CAACS,OAAb;AANJ;AAQD,CATD;;AAWA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;AAClC,QAAM;AACJL,IAAAA,IAAI,GAAG,SADH;AAEJM,IAAAA,QAFI;AAGJV,IAAAA,IAHI;AAIJ,iBAAaW,QAJT;AAKJ,kBAAcC,SALV;AAMJC,IAAAA,IANI;AAOJC,IAAAA,OAPI;AAQJC,IAAAA;AARI,MASFN,KATJ;AAUA,QAAMO,WAAW,GAAGjB,gBAAgB,CAACC,IAAD,CAApC;AACA,QAAMiB,WAAW,GAAGtB,UAAU,CAC5BQ,YAAY,CAACC,IAAD,CADgB,EAE5BS,IAAI,IAAIf,KAAK,CAACe,IAFc,EAG5BH,QAAQ,IAAIZ,KAAK,CAACY,QAHU,EAI5BK,SAJ4B,CAA9B;AAOA,QAAMG,aAAa,GAAGzB,OAAO,CAAC,MAAM,MAAMqB,OAAO,EAApB,EAAwB,CAACA,OAAD,CAAxB,CAA7B;;AAEA,MAAID,IAAJ,EAAU;AACR,wBACE,oBAAC,IAAD,eACMA,IADN;AAEE,MAAA,SAAS,EAAEI,WAFb;AAGE,mBAAWN,QAHb;AAIE,oBAAYC,SAJd;AAKE,MAAA,KAAK,EAAEA;AALT,QAOGI,WAPH,CADF;AAWD;;AAED,sBACE;AACE,IAAA,IAAI,EAAC,QADP;AAEE,kBAAYJ,SAFd;AAGE,iBAAWD,QAHb;AAIE,IAAA,KAAK,EAAEC,SAJT;AAKE,IAAA,SAAS,EAAEK,WALb;AAME,IAAA,OAAO,EAAEC;AANX,KAQGF,WARH,CADF;AAYD,CA/CD;;AAiDAR,kBAAkB,CAACW,SAAnB,2CAA+B;AAC7Bf,EAAAA,IAAI,EAAEV,SAAS,CAAC0B,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,EAAqB,YAArB,CAAhB,CADuB;AAE7B,gBAAc1B,SAAS,CAAC2B,MAFK;AAG7B,eAAa3B,SAAS,CAAC2B,MAHM;AAI7BrB,EAAAA,IAAI,EAAEN,SAAS,CAAC0B,KAAV,CAAgB,MAAKxB,KAAL,CAAhB,CAJuB;AAK7BkB,EAAAA,OAAO,EAAEpB,SAAS,CAAC4B,IALU;AAM7BT,EAAAA,IAAI,EAAEnB,SAAS,CAAC6B,KAAV,CAAgB;AACpBC,IAAAA,IAAI,EAAE9B,SAAS,CAAC2B,MADI;AAEpBI,IAAAA,QAAQ,EAAE/B,SAAS,CAACgC,IAFA;AAGpBC,IAAAA,MAAM,EAAEjC,SAAS,CAAC0B,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;AAHY,GAAhB,CANuB;AAW7BV,EAAAA,QAAQ,EAAEhB,SAAS,CAACgC,IAXS;AAY7BX,EAAAA,SAAS,EAAErB,SAAS,CAAC2B;AAZQ,CAA/B;AAeA,eAAeb,kBAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {ICONS} from '../../util/button-icons';\nimport Link from '../link';\nimport style from './style.css';\n\nconst getButtonContent = icon => {\n const Icon = getOr(null, icon, ICONS);\n\n if (!Icon) {\n return <div className={style.buttonContent} />;\n }\n\n return (\n <div className={style.buttonContent}>\n <Icon className={style.icon} />\n </div>\n );\n};\n\nconst getSizeStyle = size => {\n switch (size) {\n case 'small':\n return style.small;\n case 'responsive':\n return style.responsive;\n default:\n return style.default;\n }\n};\n\nconst ButtonLinkIconOnly = props => {\n const {\n size = 'default',\n disabled,\n icon,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick,\n className\n } = props;\n const contentView = getButtonContent(icon);\n const styleButton = classnames(\n getSizeStyle(size),\n link && style.link,\n disabled && style.disabled,\n className\n );\n\n const handleOnClick = useMemo(() => () => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel}\n title={ariaLabel}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel}\n data-name={dataName}\n title={ariaLabel}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLinkIconOnly.propTypes = {\n size: PropTypes.oneOf(['default', 'small', 'responsive']),\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.oneOf(keys(ICONS)),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string\n};\n\nexport default ButtonLinkIconOnly;\n"],"file":"index.js"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
2
|
+
@value tablet from breakpoints;
|
|
1
3
|
@value colors: "../../variables/colors.css";
|
|
2
4
|
@value cm_grey_100 from colors;
|
|
3
5
|
@value cm_grey_200 from colors;
|
|
6
|
+
@value white from colors;
|
|
4
7
|
|
|
5
8
|
.button {
|
|
6
9
|
font-family: Gilroy;
|
|
@@ -46,6 +49,18 @@
|
|
|
46
49
|
border-radius: 7px;
|
|
47
50
|
}
|
|
48
51
|
|
|
52
|
+
.responsive {
|
|
53
|
+
composes: button;
|
|
54
|
+
width: 44px;
|
|
55
|
+
height: 44px;
|
|
56
|
+
border-radius: 7px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.responsive .icon {
|
|
60
|
+
width: 14px;
|
|
61
|
+
height: 14px;
|
|
62
|
+
}
|
|
63
|
+
|
|
49
64
|
.small {
|
|
50
65
|
composes: button;
|
|
51
66
|
width: 32px;
|
|
@@ -53,6 +68,20 @@
|
|
|
53
68
|
border-radius: 5px;
|
|
54
69
|
}
|
|
55
70
|
|
|
71
|
+
@media tablet {
|
|
72
|
+
.responsive {
|
|
73
|
+
composes: button;
|
|
74
|
+
width: 32px;
|
|
75
|
+
height: 32px;
|
|
76
|
+
border-radius: 5px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.responsive .icon {
|
|
80
|
+
width: 12px;
|
|
81
|
+
height: 12px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
56
85
|
.default .icon {
|
|
57
86
|
width: 14px;
|
|
58
87
|
height: 14px;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _identity from "lodash/fp/identity";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
2
5
|
import browserEnv from 'browser-env';
|
|
3
6
|
import test from 'ava';
|
|
4
7
|
import React from 'react';
|
|
@@ -22,4 +25,16 @@ test('should launch onClick on click event for ButtonLinkIconOnly', t => {
|
|
|
22
25
|
button.first().simulate('click', {});
|
|
23
26
|
t.pass();
|
|
24
27
|
});
|
|
28
|
+
test('should mount ButtonLinkIconOnly even if the className does not exist', t => {
|
|
29
|
+
const wrapper = shallow( /*#__PURE__*/React.createElement(ButtonLinkIconOnly, _extends({}, defaultFixture.props, {
|
|
30
|
+
className: 'noClass'
|
|
31
|
+
})), {
|
|
32
|
+
context: {
|
|
33
|
+
translate
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const button = wrapper.find('[data-name="bullet-button"]');
|
|
37
|
+
t.true(button.exists());
|
|
38
|
+
t.pass();
|
|
39
|
+
});
|
|
25
40
|
//# sourceMappingURL=button-link-icon-only.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/button-link-icon-only.js"],"names":["browserEnv","test","React","shallow","configure","Adapter","ButtonLinkIconOnly","defaultFixture","adapter","translate","t","wrapper","props","context","button","find","true","exists","first","simulate","pass"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/button-link-icon-only.js"],"names":["browserEnv","test","React","shallow","configure","Adapter","ButtonLinkIconOnly","defaultFixture","adapter","translate","t","wrapper","props","context","button","find","true","exists","first","simulate","pass"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,OAAR,EAAiBC,SAAjB,QAAiC,QAAjC;AAEA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,kBAAP,MAA+B,IAA/B;AACA,OAAOC,cAAP,MAA2B,+BAA3B;AAEAP,UAAU;AACVI,SAAS,CAAC;AAACI,EAAAA,OAAO,EAAE,IAAIH,OAAJ;AAAV,CAAD,CAAT;AACA,MAAMI,SAAS,YAAf;AAEAR,IAAI,CAAC,6DAAD,EAAgES,CAAC,IAAI;AACvE,QAAMC,OAAO,GAAGR,OAAO,eAAC,oBAAC,kBAAD,EAAwBI,cAAc,CAACK,KAAvC,CAAD,EAAmD;AACxEC,IAAAA,OAAO,EAAE;AAACJ,MAAAA;AAAD;AAD+D,GAAnD,CAAvB;AAGA,QAAMK,MAAM,GAAGH,OAAO,CAACI,IAAR,CAAa,6BAAb,CAAf;AACAL,EAAAA,CAAC,CAACM,IAAF,CAAOF,MAAM,CAACG,MAAP,EAAP;AACAH,EAAAA,MAAM,CAACI,KAAP,GAAeC,QAAf,CAAwB,OAAxB,EAAiC,EAAjC;AACAT,EAAAA,CAAC,CAACU,IAAF;AACD,CARG,CAAJ;AAUAnB,IAAI,CAAC,sEAAD,EAAyES,CAAC,IAAI;AAChF,QAAMC,OAAO,GAAGR,OAAO,eAAC,oBAAC,kBAAD,eAAwBI,cAAc,CAACK,KAAvC;AAA8C,IAAA,SAAS,EAAE;AAAzD,KAAD,EAAyE;AAC9FC,IAAAA,OAAO,EAAE;AAACJ,MAAAA;AAAD;AADqF,GAAzE,CAAvB;AAGA,QAAMK,MAAM,GAAGH,OAAO,CAACI,IAAR,CAAa,6BAAb,CAAf;AACAL,EAAAA,CAAC,CAACM,IAAF,CAAOF,MAAM,CAACG,MAAP,EAAP;AACAP,EAAAA,CAAC,CAACU,IAAF;AACD,CAPG,CAAJ","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport ButtonLinkIconOnly from '..';\nimport defaultFixture from './fixtures/button-icon-bullet';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('should launch onClick on click event for ButtonLinkIconOnly', t => {\n const wrapper = shallow(<ButtonLinkIconOnly {...defaultFixture.props} />, {\n context: {translate}\n });\n const button = wrapper.find('[data-name=\"bullet-button\"]');\n t.true(button.exists());\n button.first().simulate('click', {});\n t.pass();\n});\n\ntest('should mount ButtonLinkIconOnly even if the className does not exist', t => {\n const wrapper = shallow(<ButtonLinkIconOnly {...defaultFixture.props} className={'noClass'} />, {\n context: {translate}\n });\n const button = wrapper.find('[data-name=\"bullet-button\"]');\n t.true(button.exists());\n t.pass();\n});\n"],"file":"button-link-icon-only.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/button-link-icon-only/test/fixtures/review-header.js"],"names":["props","size","icon","onClick","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,YADD;AAEL,iBAAa,gBAFR;AAGL,kBAAc,aAHT;AAILC,IAAAA,IAAI,EAAE,OAJD;AAKLC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AALV;AADM,CAAf","sourcesContent":["export default {\n props: {\n size: 'responsive',\n 'data-name': 'default-button',\n 'aria-label': 'aria button',\n icon: 'close',\n onClick: () => console.log('click')\n }\n};\n"],"file":"review-header.js"}
|
|
@@ -5,6 +5,7 @@ import AtomButtonLinkIconOnly from '..';
|
|
|
5
5
|
import fixtureButtonIconBullet from './fixtures/button-icon-bullet';
|
|
6
6
|
import fixtureDefault from './fixtures/default';
|
|
7
7
|
import fixtureNoIcon from './fixtures/no-icon';
|
|
8
|
+
import fixtureReviewHeader from './fixtures/review-header';
|
|
8
9
|
import fixtureSmallButtonDisabled from './fixtures/small-button-disabled';
|
|
9
10
|
import fixtureSmallLinkDownload from './fixtures/small-link-download';
|
|
10
11
|
test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
|
|
@@ -16,6 +17,7 @@ test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
|
|
|
16
17
|
test('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);
|
|
17
18
|
test('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);
|
|
18
19
|
test('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);
|
|
20
|
+
test('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);
|
|
19
21
|
test('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);
|
|
20
22
|
test('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);
|
|
21
23
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLinkIconOnly","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureSmallButtonDisabled","fixtureSmallLinkDownload","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLinkIconOnly","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureReviewHeader","fixtureSmallButtonDisabled","fixtureSmallLinkDownload","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AAEAT,IAAI,CAAC,6DAAD,EAAgEU,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,sBAAsB,CAACS,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,sBAAhG,EAAwHC,uBAAxH,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,sBAAtF,EAA8GG,aAA9G,CAAJ;AACAN,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,sBAA5F,EAAoHI,mBAApH,CAAJ;AACAP,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,sBAAnG,EAA2HK,0BAA3H,CAAJ;AACAR,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,sBAAjG,EAAyHM,wBAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureReviewHeader from './fixtures/review-header';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
|
|
@@ -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 AtomCheckboxWithTitle from '..';
|
|
5
|
+
import fixtureChecked from './fixtures/checked';
|
|
6
|
+
import fixtureUnchecked from './fixtures/unchecked';
|
|
7
|
+
test('Atom › AtomCheckboxWithTitle > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(AtomCheckboxWithTitle.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Atom.AtomCheckboxWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Atom › AtomCheckboxWithTitle › Checked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureChecked);
|
|
14
|
+
test('Atom › AtomCheckboxWithTitle › Unchecked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureUnchecked);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/checkbox-with-title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomCheckboxWithTitle","fixtureChecked","fixtureUnchecked","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAL,IAAI,CAAC,4DAAD,EAA+DM,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,qBAAqB,CAACK,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,qBAAtF,EAA6GC,cAA7G,CAAJ;AACAJ,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,qBAAxF,EAA+GE,gBAA/G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomCheckboxWithTitle from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomCheckboxWithTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomCheckboxWithTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomCheckboxWithTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomCheckboxWithTitle › Checked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureChecked);\ntest('Atom › AtomCheckboxWithTitle › Unchecked › should be rendered', renderComponentMacro, AtomCheckboxWithTitle, fixtureUnchecked);\n"],"file":"fixtures.js"}
|
|
@@ -12,6 +12,7 @@ const InputTextWithTitle = props => {
|
|
|
12
12
|
'data-name': dataName,
|
|
13
13
|
'aria-label': ariaLabel
|
|
14
14
|
} = props;
|
|
15
|
+
const inputTextClass = inputText.size === 'small' ? style.smallInputText : style.defaultInputText;
|
|
15
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
17
|
className: style.container,
|
|
17
18
|
"data-name": dataName,
|
|
@@ -19,13 +20,14 @@ const InputTextWithTitle = props => {
|
|
|
19
20
|
}, /*#__PURE__*/React.createElement("span", {
|
|
20
21
|
className: style.title
|
|
21
22
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className:
|
|
23
|
+
className: inputTextClass
|
|
23
24
|
}, /*#__PURE__*/React.createElement(InputText, inputText)));
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
InputTextWithTitle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
27
28
|
inputText: PropTypes.shape(_extends(_extends({}, InputText.propTypes), {}, {
|
|
28
|
-
theme: PropTypes.string
|
|
29
|
+
theme: PropTypes.string,
|
|
30
|
+
size: PropTypes.string
|
|
29
31
|
})),
|
|
30
32
|
title: PropTypes.string,
|
|
31
33
|
'aria-label': PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/input-text-with-title/index.js"],"names":["React","PropTypes","InputText","style","InputTextWithTitle","props","inputText","title","dataName","ariaLabel","container","propTypes","shape","theme","string"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;AAClC,QAAM;AAACC,IAAAA,SAAD;AAAYC,IAAAA,KAAZ;AAAmB,iBAAaC,QAAhC;AAA0C,kBAAcC;AAAxD,MAAqEJ,KAA3E;AAEA,sBACE;AAAK,IAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/input-text-with-title/index.js"],"names":["React","PropTypes","InputText","style","InputTextWithTitle","props","inputText","title","dataName","ariaLabel","inputTextClass","size","smallInputText","defaultInputText","container","propTypes","shape","theme","string"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;AAClC,QAAM;AAACC,IAAAA,SAAD;AAAYC,IAAAA,KAAZ;AAAmB,iBAAaC,QAAhC;AAA0C,kBAAcC;AAAxD,MAAqEJ,KAA3E;AACA,QAAMK,cAAc,GAAGJ,SAAS,CAACK,IAAV,KAAmB,OAAnB,GAA6BR,KAAK,CAACS,cAAnC,GAAoDT,KAAK,CAACU,gBAAjF;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEV,KAAK,CAACW,SAAtB;AAAiC,iBAAWN,QAA5C;AAAsD,kBAAYC;AAAlE,kBACE;AAAM,IAAA,SAAS,EAAEN,KAAK,CAACI;AAAvB,KAA+BA,KAA/B,CADF,eAEE;AAAK,IAAA,SAAS,EAAEG;AAAhB,kBACE,oBAAC,SAAD,EAAeJ,SAAf,CADF,CAFF,CADF;AAQD,CAZD;;AAcAF,kBAAkB,CAACW,SAAnB,2CAA+B;AAC7BT,EAAAA,SAAS,EAAEL,SAAS,CAACe,KAAV,uBACNd,SAAS,CAACa,SADJ;AAETE,IAAAA,KAAK,EAAEhB,SAAS,CAACiB,MAFR;AAGTP,IAAAA,IAAI,EAAEV,SAAS,CAACiB;AAHP,KADkB;AAM7BX,EAAAA,KAAK,EAAEN,SAAS,CAACiB,MANY;AAO7B,gBAAcjB,SAAS,CAACiB,MAPK;AAQ7B,eAAajB,SAAS,CAACiB;AARM,CAA/B;AAUA,eAAed,kBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputText from '../input-text';\nimport style from './style.css';\n\nconst InputTextWithTitle = props => {\n const {inputText, title, 'data-name': dataName, 'aria-label': ariaLabel} = props;\n const inputTextClass = inputText.size === 'small' ? style.smallInputText : style.defaultInputText;\n\n return (\n <div className={style.container} data-name={dataName} aria-label={ariaLabel}>\n <span className={style.title}>{title}</span>\n <div className={inputTextClass}>\n <InputText {...inputText} />\n </div>\n </div>\n );\n};\n\nInputTextWithTitle.propTypes = {\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string,\n size: PropTypes.string\n }),\n title: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputTextWithTitle;\n"],"file":"index.js"}
|
|
@@ -5,8 +5,10 @@ export default {
|
|
|
5
5
|
props: {
|
|
6
6
|
title: 'Mandatory courses to complete certification',
|
|
7
7
|
inputText: _extends(_extends({}, inputText.props), {}, {
|
|
8
|
+
title: 'Amount (6 items max)',
|
|
8
9
|
error: 'this is error',
|
|
9
|
-
hint: ''
|
|
10
|
+
hint: '',
|
|
11
|
+
size: 'small'
|
|
10
12
|
})
|
|
11
13
|
}
|
|
12
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/error.js"],"names":["inputText","props","title","error","hint"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,8CAAtB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELF,IAAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/error.js"],"names":["inputText","props","title","error","hint","size"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,8CAAtB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELF,IAAAA,SAAS,wBACJA,SAAS,CAACC,KADN;AAEPC,MAAAA,KAAK,EAAE,sBAFA;AAGPC,MAAAA,KAAK,EAAE,eAHA;AAIPC,MAAAA,IAAI,EAAE,EAJC;AAKPC,MAAAA,IAAI,EAAE;AALC;AAFJ;AADM,CAAf","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {\n ...inputText.props,\n title: 'Amount (6 items max)',\n error: 'this is error',\n hint: '',\n size: 'small'\n }\n }\n};\n"],"file":"error.js"}
|
|
@@ -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 AtomInputTextWithTitle from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureError from './fixtures/error';
|
|
7
|
+
test('Atom › AtomInputTextWithTitle > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(AtomInputTextWithTitle.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Atom.AtomInputTextWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Atom › AtomInputTextWithTitle › Default › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureDefault);
|
|
14
|
+
test('Atom › AtomInputTextWithTitle › Error › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureError);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/input-text-with-title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputTextWithTitle","fixtureDefault","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAL,IAAI,CAAC,6DAAD,EAAgEM,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,sBAAsB,CAACK,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GC,cAA/G,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,sBAArF,EAA6GE,YAA7G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputTextWithTitle from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureError from './fixtures/error';\n\ntest('Atom › AtomInputTextWithTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputTextWithTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputTextWithTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputTextWithTitle › Default › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureDefault);\ntest('Atom › AtomInputTextWithTitle › Error › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureError);\n"],"file":"fixtures.js"}
|
|
@@ -21,7 +21,7 @@ const Content = ({
|
|
|
21
21
|
className: style.value,
|
|
22
22
|
"aria-label": `step ${value}`
|
|
23
23
|
}, /*#__PURE__*/React.createElement(RightIcon, {
|
|
24
|
-
className: current
|
|
24
|
+
className: classnames(style.rightIcon, current && style.currentRightIcon)
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ const Content = ({
|
|
|
30
30
|
className: style.value,
|
|
31
31
|
"aria-label": `step ${value}`
|
|
32
32
|
}, /*#__PURE__*/React.createElement(WrongIcon, {
|
|
33
|
-
className: current
|
|
33
|
+
className: classnames(style.wrongIcon, current && style.currentWrongIcon)
|
|
34
34
|
}));
|
|
35
35
|
}
|
|
36
36
|
};
|
|
@@ -41,7 +41,7 @@ const ReviewHeaderStepItem = props => {
|
|
|
41
41
|
current
|
|
42
42
|
} = props;
|
|
43
43
|
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: classnames(icon === 'right'
|
|
44
|
+
className: classnames(style.default, icon === 'right' && style.right, icon === 'wrong' && style.wrong, current && style.current),
|
|
45
45
|
"data-name": "header-step-item"
|
|
46
46
|
}, /*#__PURE__*/React.createElement(Content, props));
|
|
47
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/review-header-step-item/index.js"],"names":["React","classnames","PropTypes","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","style","Content","icon","current","value","
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/review-header-step-item/index.js"],"names":["React","classnames","PropTypes","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","style","Content","icon","current","value","rightIcon","currentRightIcon","wrongIcon","currentWrongIcon","ReviewHeaderStepItem","props","default","right","wrong","propTypes","string","bool"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SACEC,gCAAgC,IAAIC,SADtC,EAEEC,oBAAoB,IAAIC,SAF1B,QAGO,0BAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,CAAC;AAACC,EAAAA,IAAD;AAAOC,EAAAA,OAAP;AAAgBC,EAAAA;AAAhB,CAAD,KAA4B;AAC1C,MAAI,CAACF,IAAL,EAAW;AACT,wBACE;AAAM,MAAA,SAAS,EAAEF,KAAK,CAACI,KAAvB;AAA8B,oBAAa,QAAOA,KAAM;AAAxD,OACGA,KADH,CADF;AAKD;;AAED,MAAIF,IAAI,KAAK,OAAb,EAAsB;AACpB,wBACE;AAAM,MAAA,SAAS,EAAEF,KAAK,CAACI,KAAvB;AAA8B,oBAAa,QAAOA,KAAM;AAAxD,oBACE,oBAAC,SAAD;AAAW,MAAA,SAAS,EAAEV,UAAU,CAACM,KAAK,CAACK,SAAP,EAAkBF,OAAO,IAAIH,KAAK,CAACM,gBAAnC;AAAhC,MADF,CADF;AAKD;;AAED,MAAIJ,IAAI,KAAK,OAAb,EAAsB;AACpB,wBACE;AAAM,MAAA,SAAS,EAAEF,KAAK,CAACI,KAAvB;AAA8B,oBAAa,QAAOA,KAAM;AAAxD,oBACE,oBAAC,SAAD;AAAW,MAAA,SAAS,EAAEV,UAAU,CAACM,KAAK,CAACO,SAAP,EAAkBJ,OAAO,IAAIH,KAAK,CAACQ,gBAAnC;AAAhC,MADF,CADF;AAKD;AACF,CAxBD;;AA0BA,MAAMC,oBAAoB,GAAGC,KAAK,IAAI;AACpC,QAAM;AAACR,IAAAA,IAAD;AAAOC,IAAAA;AAAP,MAAkBO,KAAxB;AACA,sBACE;AACE,IAAA,SAAS,EAAEhB,UAAU,CACnBM,KAAK,CAACW,OADa,EAEnBT,IAAI,KAAK,OAAT,IAAoBF,KAAK,CAACY,KAFP,EAGnBV,IAAI,KAAK,OAAT,IAAoBF,KAAK,CAACa,KAHP,EAInBV,OAAO,IAAIH,KAAK,CAACG,OAJE,CADvB;AAOE,iBAAU;AAPZ,kBASE,oBAAC,OAAD,EAAaO,KAAb,CATF,CADF;AAaD,CAfD;;AAiBAD,oBAAoB,CAACK,SAArB,2CAAiC;AAC/BZ,EAAAA,IAAI,EAAEP,SAAS,CAACoB,MADe;AAE/BZ,EAAAA,OAAO,EAAER,SAAS,CAACqB,IAFY;AAG/BZ,EAAAA,KAAK,EAAET,SAAS,CAACoB;AAHc,CAAjC;AAMA,eAAeN,oBAAf","sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst Content = ({icon, current, value}) => {\n if (!icon) {\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n {value}\n </span>\n );\n }\n\n if (icon === 'right') {\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n <RightIcon className={classnames(style.rightIcon, current && style.currentRightIcon)} />\n </span>\n );\n }\n\n if (icon === 'wrong') {\n return (\n <span className={style.value} aria-label={`step ${value}`}>\n <WrongIcon className={classnames(style.wrongIcon, current && style.currentWrongIcon)} />\n </span>\n );\n }\n};\n\nconst ReviewHeaderStepItem = props => {\n const {icon, current} = props;\n return (\n <div\n className={classnames(\n style.default,\n icon === 'right' && style.right,\n icon === 'wrong' && style.wrong,\n current && style.current\n )}\n data-name=\"header-step-item\"\n >\n <Content {...props} />\n </div>\n );\n};\n\nReviewHeaderStepItem.propTypes = {\n icon: PropTypes.string,\n current: PropTypes.bool,\n value: PropTypes.string\n};\n\nexport default ReviewHeaderStepItem;\n"],"file":"index.js"}
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
display: flex;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
align-items: center;
|
|
20
|
+
transition: all 0.25s ease;
|
|
21
|
+
user-select: none;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.current {
|
|
23
|
-
composes: default;
|
|
24
25
|
width: 40px;
|
|
25
26
|
height: 40px;
|
|
26
27
|
opacity: 1;
|
|
@@ -45,10 +46,10 @@
|
|
|
45
46
|
width: 12px;
|
|
46
47
|
height: 10px;
|
|
47
48
|
margin: 2px 0px 0px 1px;
|
|
49
|
+
transition: all 0.25s ease;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.currentRightIcon {
|
|
51
|
-
composes: rightIcon;
|
|
52
53
|
width: 16px;
|
|
53
54
|
height: 14px;
|
|
54
55
|
margin: 3px 0px 0px 1px;
|
|
@@ -59,10 +60,10 @@
|
|
|
59
60
|
width: 10px;
|
|
60
61
|
height: 10px;
|
|
61
62
|
margin-top: 3px;
|
|
63
|
+
transition: all 0.25s ease;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
.currentWrongIcon {
|
|
65
|
-
composes: wrongIcon;
|
|
66
67
|
width: 15px;
|
|
67
68
|
height: 15px;
|
|
68
69
|
margin-top: 5px;
|
|
@@ -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 AtomReviewHeaderStepItem from '..';
|
|
5
|
+
import fixtureCurrent from './fixtures/current';
|
|
6
|
+
import fixtureDefault from './fixtures/default';
|
|
7
|
+
import fixtureRight from './fixtures/right';
|
|
8
|
+
import fixtureWrong from './fixtures/wrong';
|
|
9
|
+
test('Atom › AtomReviewHeaderStepItem > should have valid propTypes', t => {
|
|
10
|
+
t.pass();
|
|
11
|
+
forEach(AtomReviewHeaderStepItem.propTypes, (value, key) => {
|
|
12
|
+
t.not(value, undefined, `PropType for "Atom.AtomReviewHeaderStepItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
test('Atom › AtomReviewHeaderStepItem › Current › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureCurrent);
|
|
16
|
+
test('Atom › AtomReviewHeaderStepItem › Default › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureDefault);
|
|
17
|
+
test('Atom › AtomReviewHeaderStepItem › Right › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureRight);
|
|
18
|
+
test('Atom › AtomReviewHeaderStepItem › Wrong › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureWrong);
|
|
19
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/review-header-step-item/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomReviewHeaderStepItem","fixtureCurrent","fixtureDefault","fixtureRight","fixtureWrong","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,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAP,IAAI,CAAC,+DAAD,EAAkEQ,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,wBAAwB,CAACO,SAA1B,EAAqC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC1DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,wBAAzF,EAAmHC,cAAnH,CAAJ;AACAJ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,wBAAzF,EAAmHE,cAAnH,CAAJ;AACAL,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,wBAAvF,EAAiHG,YAAjH,CAAJ;AACAN,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,wBAAvF,EAAiHI,YAAjH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomReviewHeaderStepItem from '..';\nimport fixtureCurrent from './fixtures/current';\nimport fixtureDefault from './fixtures/default';\nimport fixtureRight from './fixtures/right';\nimport fixtureWrong from './fixtures/wrong';\n\ntest('Atom › AtomReviewHeaderStepItem > should have valid propTypes', t => {\n t.pass();\n forEach(AtomReviewHeaderStepItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomReviewHeaderStepItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomReviewHeaderStepItem › Current › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureCurrent);\ntest('Atom › AtomReviewHeaderStepItem › Default › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureDefault);\ntest('Atom › AtomReviewHeaderStepItem › Right › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureRight);\ntest('Atom › AtomReviewHeaderStepItem › Wrong › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureWrong);\n"],"file":"fixtures.js"}
|
|
@@ -4,6 +4,7 @@ import renderComponentMacro from '../../../test/helpers/render-component';
|
|
|
4
4
|
import MoleculeCourseSections from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
6
|
import fixtureLoading from './fixtures/loading';
|
|
7
|
+
import fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';
|
|
7
8
|
test('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
|
|
8
9
|
t.pass();
|
|
9
10
|
forEach(MoleculeCourseSections.propTypes, (value, key) => {
|
|
@@ -12,4 +13,5 @@ test('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
|
|
|
12
13
|
});
|
|
13
14
|
test('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);
|
|
14
15
|
test('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);
|
|
16
|
+
test('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);
|
|
15
17
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCourseSections","fixtureDefault","fixtureLoading","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCourseSections","fixtureDefault","fixtureLoading","fixtureWithMandatoryCoursesInput","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gCAAP,MAA6C,yCAA7C;AAEAN,IAAI,CAAC,iEAAD,EAAoEO,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,sBAAsB,CAACM,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHC,cAAnH,CAAJ;AACAJ,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHE,cAAnH,CAAJ;AACAL,IAAI,CAAC,oFAAD,EAAuFE,oBAAvF,EAA6GC,sBAA7G,EAAqIG,gCAArI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\ntest('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeDashboardReviewBanner from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
test('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {
|
|
7
|
+
t.pass();
|
|
8
|
+
forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {
|
|
9
|
+
t.not(value, undefined, `PropType for "MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);
|
|
13
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/dashboard/review-banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDashboardReviewBanner","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,iFAAD,EAAoFK,CAAC,IAAI;AAC3FA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,6BAA6B,CAACI,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2EAA0EF,GAAI,mEAAvG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,6BAA3G,EAA0IC,cAA1I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeDashboardReviewBanner from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _map from "lodash/fp/map";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import DragAndDrop from '../../atom/drag-and-drop';
|
|
8
|
+
import CheckboxWithTitle from '../../atom/checkbox-with-title';
|
|
9
|
+
import style from './style.css';
|
|
10
|
+
|
|
11
|
+
const DragAndDropWrapper = props => {
|
|
12
|
+
const {
|
|
13
|
+
list = [],
|
|
14
|
+
checkBoxTitle,
|
|
15
|
+
'data-name': dataName
|
|
16
|
+
} = props;
|
|
17
|
+
|
|
18
|
+
const dragAndDropList = _map(dragAndDropProps => {
|
|
19
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
20
|
+
className: style.dragAndDrop,
|
|
21
|
+
key: `dragAndDrop-${dragAndDropProps.title}`
|
|
22
|
+
}, /*#__PURE__*/React.createElement(DragAndDrop, dragAndDropProps));
|
|
23
|
+
}, list);
|
|
24
|
+
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: style.title
|
|
27
|
+
}, /*#__PURE__*/React.createElement(CheckboxWithTitle, checkBoxTitle)), /*#__PURE__*/React.createElement("ul", {
|
|
28
|
+
className: style.group,
|
|
29
|
+
"data-name": dataName
|
|
30
|
+
}, dragAndDropList));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
DragAndDropWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
34
|
+
list: PropTypes.arrayOf(PropTypes.shape(DragAndDrop.propTypes)),
|
|
35
|
+
checkBoxTitle: PropTypes.shape(_extends({}, CheckboxWithTitle.propTypes)),
|
|
36
|
+
'data-name': PropTypes.string
|
|
37
|
+
} : {};
|
|
38
|
+
export default DragAndDropWrapper;
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/drag-and-drop-wrapper/index.js"],"names":["React","PropTypes","DragAndDrop","CheckboxWithTitle","style","DragAndDropWrapper","props","list","checkBoxTitle","dataName","dragAndDropList","dragAndDropProps","dragAndDrop","title","group","propTypes","arrayOf","shape","string"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,0BAAxB;AACA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAGC,KAAK,IAAI;AAClC,QAAM;AAACC,IAAAA,IAAI,GAAG,EAAR;AAAYC,IAAAA,aAAZ;AAA2B,iBAAaC;AAAxC,MAAoDH,KAA1D;;AAEA,QAAMI,eAAe,GAAG,KAAIC,gBAAgB,IAAI;AAC9C,wBACE;AAAI,MAAA,SAAS,EAAEP,KAAK,CAACQ,WAArB;AAAkC,MAAA,GAAG,EAAG,eAAcD,gBAAgB,CAACE,KAAM;AAA7E,oBACE,oBAAC,WAAD,EAAiBF,gBAAjB,CADF,CADF;AAKD,GANuB,EAMrBJ,IANqB,CAAxB;;AAQA,sBACE,8CACE;AAAK,IAAA,SAAS,EAAEH,KAAK,CAACS;AAAtB,kBACE,oBAAC,iBAAD,EAAuBL,aAAvB,CADF,CADF,eAIE;AAAI,IAAA,SAAS,EAAEJ,KAAK,CAACU,KAArB;AAA4B,iBAAWL;AAAvC,KACGC,eADH,CAJF,CADF;AAUD,CArBD;;AAuBAL,kBAAkB,CAACU,SAAnB,2CAA+B;AAC7BR,EAAAA,IAAI,EAAEN,SAAS,CAACe,OAAV,CAAkBf,SAAS,CAACgB,KAAV,CAAgBf,WAAW,CAACa,SAA5B,CAAlB,CADuB;AAE7BP,EAAAA,aAAa,EAAEP,SAAS,CAACgB,KAAV,cAAoBd,iBAAiB,CAACY,SAAtC,EAFc;AAG7B,eAAad,SAAS,CAACiB;AAHM,CAA/B;AAMA,eAAeb,kBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport DragAndDrop from '../../atom/drag-and-drop';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport style from './style.css';\n\nconst DragAndDropWrapper = props => {\n const {list = [], checkBoxTitle, 'data-name': dataName} = props;\n\n const dragAndDropList = map(dragAndDropProps => {\n return (\n <li className={style.dragAndDrop} key={`dragAndDrop-${dragAndDropProps.title}`}>\n <DragAndDrop {...dragAndDropProps} />\n </li>\n );\n }, list);\n\n return (\n <div>\n <div className={style.title}>\n <CheckboxWithTitle {...checkBoxTitle} />\n </div>\n <ul className={style.group} data-name={dataName}>\n {dragAndDropList}\n </ul>\n </div>\n );\n};\n\nDragAndDropWrapper.propTypes = {\n list: PropTypes.arrayOf(PropTypes.shape(DragAndDrop.propTypes)),\n checkBoxTitle: PropTypes.shape({...CheckboxWithTitle.propTypes}),\n 'data-name': PropTypes.string\n};\n\nexport default DragAndDropWrapper;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';
|
|
2
|
+
import checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';
|
|
3
|
+
export default {
|
|
4
|
+
props: {
|
|
5
|
+
checkBoxTitle: checkBoxTitle.props,
|
|
6
|
+
list: [firstdDragAndDrop.props]
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/default.js"],"names":["firstdDragAndDrop","checkBoxTitle","props","list"],"mappings":"AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,EAAEA,aAAa,CAACC,KADxB;AAELC,IAAAA,IAAI,EAAE,CAACH,iBAAiB,CAACE,KAAnB;AAFD;AADM,CAAf","sourcesContent":["import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';\nimport checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\n\nexport default {\n props: {\n checkBoxTitle: checkBoxTitle.props,\n list: [firstdDragAndDrop.props]\n }\n};\n"],"file":"default.js"}
|