@coorpacademy/components 10.12.0 → 10.13.2
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/{molecule → atom}/checkbox-with-title/index.js +0 -0
- package/es/atom/checkbox-with-title/index.js.map +1 -0
- package/es/{molecule → atom}/checkbox-with-title/style.css +0 -0
- package/es/{molecule → atom}/checkbox-with-title/test/fixtures/checked.js +0 -0
- package/es/atom/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/es/{molecule → atom}/checkbox-with-title/test/fixtures/unchecked.js +0 -0
- package/es/atom/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- 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/index.js +9 -3
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text-with-title/index.js +35 -0
- package/es/atom/input-text-with-title/index.js.map +1 -0
- package/es/atom/input-text-with-title/style.css +24 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js +12 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js +13 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- 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 +55 -0
- package/es/atom/review-header-step-item/index.js.map +1 -0
- package/es/atom/review-header-step-item/style.css +71 -0
- package/es/atom/review-header-step-item/test/fixtures/current.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/current.js.map +1 -0
- package/es/atom/review-header-step-item/test/fixtures/default.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/default.js.map +1 -0
- package/es/atom/review-header-step-item/test/fixtures/right.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/right.js.map +1 -0
- package/es/atom/review-header-step-item/test/fixtures/wrong.js +8 -0
- package/es/atom/review-header-step-item/test/fixtures/wrong.js.map +1 -0
- package/es/atom/select/style.css +1 -0
- package/es/molecule/course-sections/index.js +16 -3
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +4 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +11 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +2 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -1
- package/es/molecule/input-text-with-titeled-checkbox/index.js +63 -0
- package/es/molecule/input-text-with-titeled-checkbox/index.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/style.css +3 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js +16 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js +18 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.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-header-steps/index.js +26 -0
- package/es/molecule/review-header-steps/index.js.map +1 -0
- package/es/molecule/review-header-steps/style.css +6 -0
- package/es/molecule/review-header-steps/test/fixtures/all-questions-ok.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/all-questions-ok.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-wrong.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/current-question-wrong.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/first-question-current-right.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/first-question-current-right.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/no-answered-question.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/no-answered-question.js.map +1 -0
- package/es/molecule/review-header-steps/test/fixtures/question-to-repeat.js +26 -0
- package/es/molecule/review-header-steps/test/fixtures/question-to-repeat.js.map +1 -0
- package/es/organism/wizard-contents/style.css +0 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/lib/{molecule → atom}/checkbox-with-title/index.js +0 -0
- package/lib/atom/checkbox-with-title/index.js.map +1 -0
- package/lib/{molecule → atom}/checkbox-with-title/style.css +0 -0
- package/lib/{molecule → atom}/checkbox-with-title/test/fixtures/checked.js +0 -0
- package/lib/atom/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/lib/{molecule → atom}/checkbox-with-title/test/fixtures/unchecked.js +0 -0
- package/lib/atom/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- 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/index.js +9 -3
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text-with-title/index.js +46 -0
- package/lib/atom/input-text-with-title/index.js.map +1 -0
- package/lib/atom/input-text-with-title/style.css +24 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js +21 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js +22 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- 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 +67 -0
- package/lib/atom/review-header-step-item/index.js.map +1 -0
- package/lib/atom/review-header-step-item/style.css +71 -0
- package/lib/atom/review-header-step-item/test/fixtures/current.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/current.js.map +1 -0
- package/lib/atom/review-header-step-item/test/fixtures/default.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/default.js.map +1 -0
- package/lib/atom/review-header-step-item/test/fixtures/right.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/right.js.map +1 -0
- package/lib/atom/review-header-step-item/test/fixtures/wrong.js +13 -0
- package/lib/atom/review-header-step-item/test/fixtures/wrong.js.map +1 -0
- package/lib/atom/select/style.css +1 -0
- package/lib/molecule/course-sections/index.js +17 -3
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +4 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +21 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +3 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -1
- package/lib/molecule/input-text-with-titeled-checkbox/index.js +75 -0
- package/lib/molecule/input-text-with-titeled-checkbox/index.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/style.css +3 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js +21 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js +23 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.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-header-steps/index.js +38 -0
- package/lib/molecule/review-header-steps/index.js.map +1 -0
- package/lib/molecule/review-header-steps/style.css +6 -0
- package/lib/molecule/review-header-steps/test/fixtures/all-questions-ok.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/all-questions-ok.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-wrong.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/current-question-wrong.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/first-question-current-right.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/first-question-current-right.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/no-answered-question.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/no-answered-question.js.map +1 -0
- package/lib/molecule/review-header-steps/test/fixtures/question-to-repeat.js +31 -0
- package/lib/molecule/review-header-steps/test/fixtures/question-to-repeat.js.map +1 -0
- package/lib/organism/wizard-contents/style.css +0 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +2 -2
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/package.json +2 -2
- package/es/molecule/checkbox-with-title/index.js.map +0 -1
- package/es/molecule/checkbox-with-title/test/fixtures/checked.js.map +0 -1
- package/es/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +0 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
- package/lib/molecule/checkbox-with-title/index.js.map +0 -1
- package/lib/molecule/checkbox-with-title/test/fixtures/checked.js.map +0 -1
- package/lib/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import InputText from '../../atom/input-text';
|
|
4
|
+
import CheckboxWithTitle from '../../atom/checkbox-with-title';
|
|
5
|
+
import style from './style.css';
|
|
6
|
+
|
|
7
|
+
const InputTextWithTiteledCheckbox = props => {
|
|
8
|
+
const {
|
|
9
|
+
title,
|
|
10
|
+
name,
|
|
11
|
+
checked,
|
|
12
|
+
checkBoxOnChange,
|
|
13
|
+
'aria-label': ariaLabel,
|
|
14
|
+
inputTextTitle,
|
|
15
|
+
inputTextValue,
|
|
16
|
+
inputTextPlaceholder,
|
|
17
|
+
inputTextDescription,
|
|
18
|
+
inputTextDisabled,
|
|
19
|
+
inputTextModified,
|
|
20
|
+
inputTextOnChange
|
|
21
|
+
} = props;
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CheckboxWithTitle, {
|
|
23
|
+
title: title,
|
|
24
|
+
name: name,
|
|
25
|
+
checked: checked,
|
|
26
|
+
onChange: checkBoxOnChange,
|
|
27
|
+
"data-name": "check-box",
|
|
28
|
+
"aria-label": ariaLabel.checkbox
|
|
29
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: style.inputText
|
|
31
|
+
}, /*#__PURE__*/React.createElement(InputText, {
|
|
32
|
+
title: inputTextTitle,
|
|
33
|
+
value: inputTextValue,
|
|
34
|
+
placeholder: inputTextPlaceholder,
|
|
35
|
+
theme: "coorpmanager",
|
|
36
|
+
description: inputTextDescription,
|
|
37
|
+
disabled: inputTextDisabled,
|
|
38
|
+
modified: inputTextModified,
|
|
39
|
+
onChange: inputTextOnChange,
|
|
40
|
+
"data-name": "input-text",
|
|
41
|
+
"aria-label": ariaLabel.input
|
|
42
|
+
})));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
InputTextWithTiteledCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
46
|
+
title: PropTypes.string,
|
|
47
|
+
name: PropTypes.string,
|
|
48
|
+
checked: PropTypes.bool,
|
|
49
|
+
checkBoxOnChange: PropTypes.func,
|
|
50
|
+
'aria-label': PropTypes.shape({
|
|
51
|
+
input: PropTypes.string,
|
|
52
|
+
checkbox: PropTypes.string
|
|
53
|
+
}),
|
|
54
|
+
inputTextTitle: PropTypes.string,
|
|
55
|
+
inputTextValue: PropTypes.string,
|
|
56
|
+
inputTextPlaceholder: PropTypes.string,
|
|
57
|
+
inputTextDescription: PropTypes.string,
|
|
58
|
+
inputTextDisabled: PropTypes.bool,
|
|
59
|
+
inputTextModified: PropTypes.bool,
|
|
60
|
+
inputTextOnChange: PropTypes.func
|
|
61
|
+
} : {};
|
|
62
|
+
export default InputTextWithTiteledCheckbox;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/input-text-with-titeled-checkbox/index.js"],"names":["React","PropTypes","InputText","CheckboxWithTitle","style","InputTextWithTiteledCheckbox","props","title","name","checked","checkBoxOnChange","ariaLabel","inputTextTitle","inputTextValue","inputTextPlaceholder","inputTextDescription","inputTextDisabled","inputTextModified","inputTextOnChange","checkbox","inputText","input","propTypes","string","bool","func","shape"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,4BAA4B,GAAGC,KAAK,IAAI;AAC5C,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,IAFI;AAGJC,IAAAA,OAHI;AAIJC,IAAAA,gBAJI;AAKJ,kBAAcC,SALV;AAMJC,IAAAA,cANI;AAOJC,IAAAA,cAPI;AAQJC,IAAAA,oBARI;AASJC,IAAAA,oBATI;AAUJC,IAAAA,iBAVI;AAWJC,IAAAA,iBAXI;AAYJC,IAAAA;AAZI,MAaFZ,KAbJ;AAeA,sBACE,8CACE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAEC,KADT;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEC,gBAJZ;AAKE,iBAAU,WALZ;AAME,kBAAYC,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-types';\nimport InputText from '../../atom/input-text';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport style from './style.css';\n\nconst InputTextWithTiteledCheckbox = props => {\n const {\n title,\n name,\n checked,\n checkBoxOnChange,\n 'aria-label': ariaLabel,\n inputTextTitle,\n inputTextValue,\n inputTextPlaceholder,\n inputTextDescription,\n inputTextDisabled,\n inputTextModified,\n inputTextOnChange\n } = props;\n\n return (\n <div>\n <CheckboxWithTitle\n title={title}\n name={name}\n checked={checked}\n onChange={checkBoxOnChange}\n data-name=\"check-box\"\n aria-label={ariaLabel.checkbox}\n />\n <div className={style.inputText}>\n <InputText\n title={inputTextTitle}\n value={inputTextValue}\n placeholder={inputTextPlaceholder}\n theme=\"coorpmanager\"\n description={inputTextDescription}\n disabled={inputTextDisabled}\n modified={inputTextModified}\n onChange={inputTextOnChange}\n data-name=\"input-text\"\n aria-label={ariaLabel.input}\n />\n </div>\n </div>\n );\n};\n\nInputTextWithTiteledCheckbox.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n checkBoxOnChange: PropTypes.func,\n 'aria-label': PropTypes.shape({\n input: PropTypes.string,\n checkbox: PropTypes.string\n }),\n inputTextTitle: PropTypes.string,\n inputTextValue: PropTypes.string,\n inputTextPlaceholder: PropTypes.string,\n inputTextDescription: PropTypes.string,\n inputTextDisabled: PropTypes.bool,\n inputTextModified: PropTypes.bool,\n inputTextOnChange: PropTypes.func\n};\nexport default InputTextWithTiteledCheckbox;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
title: 'Add stars',
|
|
4
|
+
checked: true,
|
|
5
|
+
checkBoxOnChange: value => console.log(value),
|
|
6
|
+
inputTextTitle: 'Stars amount',
|
|
7
|
+
inputTextValue: '250',
|
|
8
|
+
inputTextDescription: 'This is the tooltip text',
|
|
9
|
+
inputTextOnChange: value => console.log(value),
|
|
10
|
+
'aria-label': {
|
|
11
|
+
checkbox: 'check box',
|
|
12
|
+
input: 'input text'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=checked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js"],"names":["props","title","checked","checkBoxOnChange","value","console","log","inputTextTitle","inputTextValue","inputTextDescription","inputTextOnChange","checkbox","input"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,WADF;AAELC,IAAAA,OAAO,EAAE,IAFJ;AAGLC,IAAAA,gBAAgB,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAHtB;AAILG,IAAAA,cAAc,EAAE,cAJX;AAKLC,IAAAA,cAAc,EAAE,KALX;AAMLC,IAAAA,oBAAoB,EAAE,0BANjB;AAOLC,IAAAA,iBAAiB,EAAEN,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAPvB;AAQL,kBAAc;AAACO,MAAAA,QAAQ,EAAE,WAAX;AAAwBC,MAAAA,KAAK,EAAE;AAA/B;AART;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Add stars',\n checked: true,\n checkBoxOnChange: value => console.log(value),\n inputTextTitle: 'Stars amount',\n inputTextValue: '250',\n inputTextDescription: 'This is the tooltip text',\n inputTextOnChange: value => console.log(value),\n 'aria-label': {checkbox: 'check box', input: 'input text'}\n }\n};\n"],"file":"checked.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
title: 'Create badge',
|
|
4
|
+
checked: false,
|
|
5
|
+
onChange: value => console.log(value),
|
|
6
|
+
checkBoxOnChange: value => console.log(value),
|
|
7
|
+
inputTextTitle: 'Stars amount',
|
|
8
|
+
inputTextValue: '250',
|
|
9
|
+
inputTextDescription: 'This is the tooltip text',
|
|
10
|
+
inputTextDisabled: true,
|
|
11
|
+
inputTextOnChange: value => console.log(value),
|
|
12
|
+
'aria-label': {
|
|
13
|
+
checkbox: 'check box',
|
|
14
|
+
input: 'input text'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=unchecked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js"],"names":["props","title","checked","onChange","value","console","log","checkBoxOnChange","inputTextTitle","inputTextValue","inputTextDescription","inputTextDisabled","inputTextOnChange","checkbox","input"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,QAAQ,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAHd;AAILG,IAAAA,gBAAgB,EAAEH,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAJtB;AAKLI,IAAAA,cAAc,EAAE,cALX;AAMLC,IAAAA,cAAc,EAAE,KANX;AAOLC,IAAAA,oBAAoB,EAAE,0BAPjB;AAQLC,IAAAA,iBAAiB,EAAE,IARd;AASLC,IAAAA,iBAAiB,EAAER,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CATvB;AAUL,kBAAc;AAACS,MAAAA,QAAQ,EAAE,WAAX;AAAwBC,MAAAA,KAAK,EAAE;AAA/B;AAVT;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Create badge',\n checked: false,\n onChange: value => console.log(value),\n checkBoxOnChange: value => console.log(value),\n inputTextTitle: 'Stars amount',\n inputTextValue: '250',\n inputTextDescription: 'This is the tooltip text',\n inputTextDisabled: true,\n inputTextOnChange: value => console.log(value),\n 'aria-label': {checkbox: 'check box', input: 'input text'}\n }\n};\n"],"file":"unchecked.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 MoleculeInputTextWithTiteledCheckbox from '..';
|
|
5
|
+
import fixtureChecked from './fixtures/checked';
|
|
6
|
+
import fixtureUnchecked from './fixtures/unchecked';
|
|
7
|
+
test('Molecule › MoleculeInputTextWithTiteledCheckbox > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeInputTextWithTiteledCheckbox.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeInputTextWithTiteledCheckbox.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeInputTextWithTiteledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureChecked);
|
|
14
|
+
test('Molecule › MoleculeInputTextWithTiteledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureUnchecked);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeInputTextWithTiteledCheckbox","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,oCAAP,MAAiD,IAAjD;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAL,IAAI,CAAC,+EAAD,EAAkFM,CAAC,IAAI;AACzFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,oCAAoC,CAACK,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtEJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yEAAwEF,GAAI,mEAArG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,oCAAzG,EAA+IC,cAA/I,CAAJ;AACAJ,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,oCAA3G,EAAiJE,gBAAjJ,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeInputTextWithTiteledCheckbox from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeInputTextWithTiteledCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeInputTextWithTiteledCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureChecked);\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureUnchecked);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import map from 'lodash/fp/map';
|
|
6
|
+
import ReviewHeaderStepItem from '../../atom/review-header-step-item';
|
|
7
|
+
import style from './style.css';
|
|
8
|
+
|
|
9
|
+
const ReviewHeaderStep = props => {
|
|
10
|
+
const {
|
|
11
|
+
steps
|
|
12
|
+
} = props;
|
|
13
|
+
const items = map(step => /*#__PURE__*/React.createElement(ReviewHeaderStepItem, _extends({}, step, {
|
|
14
|
+
key: step.value
|
|
15
|
+
})), steps);
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: style.wrapper,
|
|
18
|
+
"data-name": "header-steps"
|
|
19
|
+
}, items);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
ReviewHeaderStep.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
23
|
+
steps: PropTypes.arrayOf(PropTypes.shape(ReviewHeaderStepItem.props))
|
|
24
|
+
} : {};
|
|
25
|
+
export default ReviewHeaderStep;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/review-header-steps/index.js"],"names":["React","PropTypes","map","ReviewHeaderStepItem","style","ReviewHeaderStep","props","steps","items","step","value","wrapper","propTypes","arrayOf","shape"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,oBAAP,MAAiC,oCAAjC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAGC,KAAK,IAAI;AAChC,QAAM;AAACC,IAAAA;AAAD,MAAUD,KAAhB;AAEA,QAAME,KAAK,GAAGN,GAAG,CAACO,IAAI,iBAAI,oBAAC,oBAAD,eAA0BA,IAA1B;AAAgC,IAAA,GAAG,EAAEA,IAAI,CAACC;AAA1C,KAAT,EAA8DH,KAA9D,CAAjB;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEH,KAAK,CAACO,OAAtB;AAA+B,iBAAU;AAAzC,KACGH,KADH,CADF;AAKD,CAVD;;AAYAH,gBAAgB,CAACO,SAAjB,2CAA6B;AAC3BL,EAAAA,KAAK,EAAEN,SAAS,CAACY,OAAV,CAAkBZ,SAAS,CAACa,KAAV,CAAgBX,oBAAoB,CAACG,KAArC,CAAlB;AADoB,CAA7B;AAIA,eAAeD,gBAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport ReviewHeaderStepItem from '../../atom/review-header-step-item';\nimport style from './style.css';\n\nconst ReviewHeaderStep = props => {\n const {steps} = props;\n\n const items = map(step => <ReviewHeaderStepItem {...step} key={step.value} />, steps);\n\n return (\n <div className={style.wrapper} data-name=\"header-steps\">\n {items}\n </div>\n );\n};\n\nReviewHeaderStep.propTypes = {\n steps: PropTypes.arrayOf(PropTypes.shape(ReviewHeaderStepItem.props))\n};\n\nexport default ReviewHeaderStep;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
steps: [{
|
|
4
|
+
icon: 'right',
|
|
5
|
+
current: false,
|
|
6
|
+
value: '1'
|
|
7
|
+
}, {
|
|
8
|
+
icon: 'right',
|
|
9
|
+
current: false,
|
|
10
|
+
value: '2'
|
|
11
|
+
}, {
|
|
12
|
+
icon: 'right',
|
|
13
|
+
current: true,
|
|
14
|
+
value: '3'
|
|
15
|
+
}, {
|
|
16
|
+
icon: 'right',
|
|
17
|
+
current: false,
|
|
18
|
+
value: '4'
|
|
19
|
+
}, {
|
|
20
|
+
icon: 'right',
|
|
21
|
+
current: false,
|
|
22
|
+
value: '5'
|
|
23
|
+
}]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=all-questions-ok.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-header-steps/test/fixtures/all-questions-ok.js"],"names":["props","steps","icon","current","value"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KADK,EAML;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KANK,EAWL;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,IAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAXK,EAgBL;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAhBK,EAqBL;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KArBK;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n steps: [\n {\n icon: 'right',\n current: false,\n value: '1'\n },\n {\n icon: 'right',\n current: false,\n value: '2'\n },\n {\n icon: 'right',\n current: true,\n value: '3'\n },\n {\n icon: 'right',\n current: false,\n value: '4'\n },\n {\n icon: 'right',\n current: false,\n value: '5'\n }\n ]\n }\n};\n"],"file":"all-questions-ok.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
steps: [{
|
|
4
|
+
icon: 'right',
|
|
5
|
+
current: false,
|
|
6
|
+
value: '1'
|
|
7
|
+
}, {
|
|
8
|
+
icon: 'wrong',
|
|
9
|
+
current: false,
|
|
10
|
+
value: '2'
|
|
11
|
+
}, {
|
|
12
|
+
icon: null,
|
|
13
|
+
current: true,
|
|
14
|
+
value: '3'
|
|
15
|
+
}, {
|
|
16
|
+
icon: null,
|
|
17
|
+
current: false,
|
|
18
|
+
value: '4'
|
|
19
|
+
}, {
|
|
20
|
+
icon: null,
|
|
21
|
+
current: false,
|
|
22
|
+
value: '5'
|
|
23
|
+
}]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=current-question-no-aswered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-header-steps/test/fixtures/current-question-no-aswered.js"],"names":["props","steps","icon","current","value"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KADK,EAML;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KANK,EAWL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,IAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAXK,EAgBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAhBK,EAqBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KArBK;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n steps: [\n {\n icon: 'right',\n current: false,\n value: '1'\n },\n {\n icon: 'wrong',\n current: false,\n value: '2'\n },\n {\n icon: null,\n current: true,\n value: '3'\n },\n {\n icon: null,\n current: false,\n value: '4'\n },\n {\n icon: null,\n current: false,\n value: '5'\n }\n ]\n }\n};\n"],"file":"current-question-no-aswered.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
steps: [{
|
|
4
|
+
icon: 'right',
|
|
5
|
+
current: false,
|
|
6
|
+
value: '1'
|
|
7
|
+
}, {
|
|
8
|
+
icon: 'wrong',
|
|
9
|
+
current: false,
|
|
10
|
+
value: '2'
|
|
11
|
+
}, {
|
|
12
|
+
icon: 'wrong',
|
|
13
|
+
current: true,
|
|
14
|
+
value: '3'
|
|
15
|
+
}, {
|
|
16
|
+
icon: null,
|
|
17
|
+
current: false,
|
|
18
|
+
value: '4'
|
|
19
|
+
}, {
|
|
20
|
+
icon: null,
|
|
21
|
+
current: false,
|
|
22
|
+
value: '5'
|
|
23
|
+
}]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=current-question-wrong.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-header-steps/test/fixtures/current-question-wrong.js"],"names":["props","steps","icon","current","value"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KADK,EAML;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KANK,EAWL;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,IAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAXK,EAgBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAhBK,EAqBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KArBK;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n steps: [\n {\n icon: 'right',\n current: false,\n value: '1'\n },\n {\n icon: 'wrong',\n current: false,\n value: '2'\n },\n {\n icon: 'wrong',\n current: true,\n value: '3'\n },\n {\n icon: null,\n current: false,\n value: '4'\n },\n {\n icon: null,\n current: false,\n value: '5'\n }\n ]\n }\n};\n"],"file":"current-question-wrong.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
steps: [{
|
|
4
|
+
icon: 'right',
|
|
5
|
+
current: true,
|
|
6
|
+
value: '1'
|
|
7
|
+
}, {
|
|
8
|
+
icon: null,
|
|
9
|
+
current: false,
|
|
10
|
+
value: '2'
|
|
11
|
+
}, {
|
|
12
|
+
icon: null,
|
|
13
|
+
current: false,
|
|
14
|
+
value: '3'
|
|
15
|
+
}, {
|
|
16
|
+
icon: null,
|
|
17
|
+
current: false,
|
|
18
|
+
value: '4'
|
|
19
|
+
}, {
|
|
20
|
+
icon: null,
|
|
21
|
+
current: false,
|
|
22
|
+
value: '5'
|
|
23
|
+
}]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=first-question-current-right.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-header-steps/test/fixtures/first-question-current-right.js"],"names":["props","steps","icon","current","value"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,IAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KADK,EAML;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KANK,EAWL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAXK,EAgBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAhBK,EAqBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KArBK;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n steps: [\n {\n icon: 'right',\n current: true,\n value: '1'\n },\n {\n icon: null,\n current: false,\n value: '2'\n },\n {\n icon: null,\n current: false,\n value: '3'\n },\n {\n icon: null,\n current: false,\n value: '4'\n },\n {\n icon: null,\n current: false,\n value: '5'\n }\n ]\n }\n};\n"],"file":"first-question-current-right.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
steps: [{
|
|
4
|
+
icon: null,
|
|
5
|
+
current: true,
|
|
6
|
+
value: '1'
|
|
7
|
+
}, {
|
|
8
|
+
icon: null,
|
|
9
|
+
current: false,
|
|
10
|
+
value: '2'
|
|
11
|
+
}, {
|
|
12
|
+
icon: null,
|
|
13
|
+
current: false,
|
|
14
|
+
value: '3'
|
|
15
|
+
}, {
|
|
16
|
+
icon: null,
|
|
17
|
+
current: false,
|
|
18
|
+
value: '4'
|
|
19
|
+
}, {
|
|
20
|
+
icon: null,
|
|
21
|
+
current: false,
|
|
22
|
+
value: '5'
|
|
23
|
+
}]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=no-answered-question.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-header-steps/test/fixtures/no-answered-question.js"],"names":["props","steps","icon","current","value"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,IAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KADK,EAML;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KANK,EAWL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAXK,EAgBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAhBK,EAqBL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KArBK;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n steps: [\n {\n icon: null,\n current: true,\n value: '1'\n },\n {\n icon: null,\n current: false,\n value: '2'\n },\n {\n icon: null,\n current: false,\n value: '3'\n },\n {\n icon: null,\n current: false,\n value: '4'\n },\n {\n icon: null,\n current: false,\n value: '5'\n }\n ]\n }\n};\n"],"file":"no-answered-question.js"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
steps: [{
|
|
4
|
+
icon: 'right',
|
|
5
|
+
current: false,
|
|
6
|
+
value: '1'
|
|
7
|
+
}, {
|
|
8
|
+
icon: 'right',
|
|
9
|
+
current: false,
|
|
10
|
+
value: '2'
|
|
11
|
+
}, {
|
|
12
|
+
icon: null,
|
|
13
|
+
current: true,
|
|
14
|
+
value: '3'
|
|
15
|
+
}, {
|
|
16
|
+
icon: 'right',
|
|
17
|
+
current: false,
|
|
18
|
+
value: '4'
|
|
19
|
+
}, {
|
|
20
|
+
icon: 'right',
|
|
21
|
+
current: false,
|
|
22
|
+
value: '5'
|
|
23
|
+
}]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=question-to-repeat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-header-steps/test/fixtures/question-to-repeat.js"],"names":["props","steps","icon","current","value"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KADK,EAML;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KANK,EAWL;AACEF,MAAAA,IAAI,EAAE,IADR;AAEEC,MAAAA,OAAO,EAAE,IAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAXK,EAgBL;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KAhBK,EAqBL;AACEF,MAAAA,IAAI,EAAE,OADR;AAEEC,MAAAA,OAAO,EAAE,KAFX;AAGEC,MAAAA,KAAK,EAAE;AAHT,KArBK;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n steps: [\n {\n icon: 'right',\n current: false,\n value: '1'\n },\n {\n icon: 'right',\n current: false,\n value: '2'\n },\n {\n icon: null,\n current: true,\n value: '3'\n },\n {\n icon: 'right',\n current: false,\n value: '4'\n },\n {\n icon: 'right',\n current: false,\n value: '5'\n }\n ]\n }\n};\n"],"file":"question-to-repeat.js"}
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-console */
|
|
4
4
|
import wizardSummaryOrganizeCourses from '../../../../molecule/wizard-summary/test/fixtures/organize-courses';
|
|
5
|
-
import organizeCoursesForm from '../../../../molecule/course-sections/test/fixtures/
|
|
5
|
+
import organizeCoursesForm from '../../../../molecule/course-sections/test/fixtures/with-mandatory-courses-input';
|
|
6
6
|
export default {
|
|
7
7
|
props: {
|
|
8
8
|
isLoading: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-organize-courses.js"],"names":["wizardSummaryOrganizeCourses","organizeCoursesForm","props","isLoading","wizardHeader","title","onClick","console","log","steps","done","current","summary","content","type","previousStep","label","nextStep"],"mappings":";;AAAA;AACA,OAAOA,4BAAP,MAAyC,oEAAzC;AACA,OAAOC,mBAAP,MAAgC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-organize-courses.js"],"names":["wizardSummaryOrganizeCourses","organizeCoursesForm","props","isLoading","wizardHeader","title","onClick","console","log","steps","done","current","summary","content","type","previousStep","label","nextStep"],"mappings":";;AAAA;AACA,OAAOA,4BAAP,MAAyC,oEAAzC;AACA,OAAOC,mBAAP,MAAgC,iFAAhC;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,KADN;AAELC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,8BADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KAFT;AAMLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KADK,EAKL;AACEL,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KALK,EASL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KATK,EAaL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAbK,EAiBL;AACEL,MAAAA,KAAK,EAAE,kBADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KAjBK,CANF;AA6BLC,IAAAA,OAAO,EAAEZ,4BAA4B,CAACE,KA7BjC;AA8BLW,IAAAA,OAAO,wBACFZ,mBAAmB,CAACC,KADlB;AAELY,MAAAA,IAAI,EAAE;AAFD,MA9BF;AAkCLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,eADK;AAEZV,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFH,KAlCT;AAsCLS,IAAAA,QAAQ,EAAE;AACRH,MAAAA,IAAI,EAAE,SADE;AAERE,MAAAA,KAAK,EAAE,SAFC;AAGRV,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAHP;AAtCL;AADM,CAAf","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummaryOrganizeCourses from '../../../../molecule/wizard-summary/test/fixtures/organize-courses';\nimport organizeCoursesForm from '../../../../molecule/course-sections/test/fixtures/with-mandatory-courses-input';\n\nexport default {\n props: {\n isLoading: false,\n wizardHeader: {\n title: 'Create a new custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: true\n },\n {\n title: 'Translations',\n done: true\n },\n {\n title: 'Assign populations',\n done: true\n },\n {\n title: 'Add courses',\n done: true\n },\n {\n title: 'Organize courses',\n done: false,\n current: true\n }\n ],\n summary: wizardSummaryOrganizeCourses.props,\n content: {\n ...organizeCoursesForm.props,\n type: 'organize-courses'\n },\n previousStep: {\n label: 'Previous Step',\n onClick: () => console.log('Previous Step')\n },\n nextStep: {\n type: 'publish',\n label: 'Publish',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-organize-courses.js"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/checkbox-with-title/index.js"],"names":["CheckboxWithTitle","props","title","name","checked","onChange","dataName","ariaLabel","idCheckbox","handleChange","e","target","style","container","checkbox","label","icon","propTypes","PropTypes","string","bool","func"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,iBAAiB,GAAGC,KAAK,IAAI;AACjC,QAAM;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import {NovaSolidStatusValidate as CheckIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst CheckboxWithTitle = props => {\n const {\n title,\n name,\n checked,\n onChange = noop,\n 'data-name': dataName,\n 'aria-label': ariaLabel\n } = props;\n\n const idCheckbox = uniqueId('input-checkbox-');\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n return (\n <label className={style.container} htmlFor={idCheckbox}>\n <input\n type=\"checkbox\"\n id={idCheckbox}\n name={name}\n onChange={handleChange}\n checked={checked}\n className={style.checkbox}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n <div className={style.label}>\n <CheckIcon className={style.icon} />\n </div>\n <span className={style.title}>{title}</span>\n </label>\n );\n};\n\nCheckboxWithTitle.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n onChange: PropTypes.func,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default CheckboxWithTitle;\n"],"file":"index.js"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/checkbox-with-title/test/fixtures/checked.js"],"names":["props","title","checked","onChange","value","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,WADF;AAELC,IAAAA,OAAO,EAAE,IAFJ;AAGLC,IAAAA,QAAQ,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ;AAHd;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Add stars',\n checked: true,\n onChange: value => console.log(value)\n }\n};\n"],"file":"checked.js"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/checkbox-with-title/test/fixtures/unchecked.js"],"names":["props","title","checked","onChange","value","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,QAAQ,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ;AAHd;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Create badge',\n checked: false,\n onChange: value => console.log(value)\n }\n};\n"],"file":"unchecked.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _checked = _interopRequireDefault(require("./fixtures/checked"));
|
|
12
|
+
|
|
13
|
+
var _unchecked = _interopRequireDefault(require("./fixtures/unchecked"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Atom › AtomCheckboxWithTitle > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Atom.AtomCheckboxWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Atom › AtomCheckboxWithTitle › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
|
|
24
|
+
(0, _ava.default)('Atom › AtomCheckboxWithTitle › Unchecked › should be rendered', _renderComponent.default, _.default, _unchecked.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/checkbox-with-title/test/fixtures.js"],"names":["t","pass","AtomCheckboxWithTitle","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChecked","fixtureUnchecked"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,4DAAL,EAAmEA,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,6DAAL,EAAoEG,wBAApE,EAA0FN,SAA1F,EAAiHO,gBAAjH;AACA,kBAAK,+DAAL,EAAsED,wBAAtE,EAA4FN,SAA5F,EAAmHQ,kBAAnH","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"}
|
|
@@ -50,7 +50,9 @@ const InputText = props => {
|
|
|
50
50
|
description,
|
|
51
51
|
disabled,
|
|
52
52
|
modified = false,
|
|
53
|
-
title: propsTitle
|
|
53
|
+
title: propsTitle,
|
|
54
|
+
'data-name': dataName = 'input-text',
|
|
55
|
+
'aria-label': ariaLabel = 'Input Text'
|
|
54
56
|
} = props;
|
|
55
57
|
const isCMTheme = theme === 'coorpmanager';
|
|
56
58
|
const handleChange = (0, _react.useMemo)(() => e => onChange(e.target.value), [onChange]);
|
|
@@ -94,7 +96,9 @@ const InputText = props => {
|
|
|
94
96
|
value: value,
|
|
95
97
|
onInput: handleChange,
|
|
96
98
|
disabled: disabled,
|
|
97
|
-
onChange: _noop2.default
|
|
99
|
+
onChange: _noop2.default,
|
|
100
|
+
"data-name": dataName,
|
|
101
|
+
"aria-label": ariaLabel
|
|
98
102
|
}), errorIconView, validIconView, hintView), descriptionView);
|
|
99
103
|
};
|
|
100
104
|
|
|
@@ -111,7 +115,9 @@ InputText.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
111
115
|
onChange: _propTypes.default.func,
|
|
112
116
|
description: _propTypes.default.string,
|
|
113
117
|
modified: _propTypes.default.bool,
|
|
114
|
-
valid: _propTypes.default.bool
|
|
118
|
+
valid: _propTypes.default.bool,
|
|
119
|
+
'aria-label': _propTypes.default.string,
|
|
120
|
+
'data-name': _propTypes.default.string
|
|
115
121
|
} : {};
|
|
116
122
|
var _default = InputText;
|
|
117
123
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/input-text/index.js"],"names":["themeStyle","setup","style","coorpmanager","cockpit","default","InputText","props","autoFocus","placeholder","value","hint","defaultValue","onChange","error","valid","theme","description","disabled","modified","title","propsTitle","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","errorIconView","leftIcon","validIconView","isNoTitle","noValue","input","propTypes","PropTypes","bool","string","oneOf","func"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEC,eAAMD,KADI;AAEjBE,EAAAA,YAAY,EAAED,eAAMC,YAFH;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,OAAO,EAAEH,eAAMG;AAJE,CAAnB;;AAMA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AACzB,QAAM;AACJC,IAAAA,SAAS,GAAG,KADR;AAEJC,IAAAA,WAAW,GAAG,EAFV;AAGJC,IAAAA,KAHI;AAIJC,IAAAA,IAJI;AAKJC,IAAAA,YALI;AAMJC,IAAAA,QAAQ,iBANJ;AAOJC,IAAAA,KAPI;AAQJC,IAAAA,KARI;AASJC,IAAAA,KAAK,GAAG,SATJ;AAUJC,IAAAA,WAVI;AAWJC,IAAAA,QAXI;AAYJC,IAAAA,QAAQ,GAAG,KAZP;AAaJC,IAAAA,KAAK,EAAEC;
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/input-text/index.js"],"names":["themeStyle","setup","style","coorpmanager","cockpit","default","InputText","props","autoFocus","placeholder","value","hint","defaultValue","onChange","error","valid","theme","description","disabled","modified","title","propsTitle","dataName","ariaLabel","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","errorIconView","leftIcon","validIconView","isNoTitle","noValue","input","propTypes","PropTypes","bool","string","oneOf","func"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEC,eAAMD,KADI;AAEjBE,EAAAA,YAAY,EAAED,eAAMC,YAFH;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,OAAO,EAAEH,eAAMG;AAJE,CAAnB;;AAMA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AACzB,QAAM;AACJC,IAAAA,SAAS,GAAG,KADR;AAEJC,IAAAA,WAAW,GAAG,EAFV;AAGJC,IAAAA,KAHI;AAIJC,IAAAA,IAJI;AAKJC,IAAAA,YALI;AAMJC,IAAAA,QAAQ,iBANJ;AAOJC,IAAAA,KAPI;AAQJC,IAA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,EAAAA,KAAK,EAAE4B,mBAAUG,KAAV,CAAgB,oBAAK/C,UAAL,CAAhB,CALa;AAMpBkB,EAAAA,QAAQ,EAAE0B,mBAAUC,IANA;AAOpBnC,EAAAA,KAAK,EAAEkC,mBAAUE,MAPG;AAQpBnC,EAAAA,IAAI,EAAEiC,mBAAUE,MARI;AASpBhC,EAAAA,KAAK,EAAE8B,mBAAUE,MATG;AAUpBjC,EAAAA,QAAQ,EAAE+B,mBAAUI,IAVA;AAWpB/B,EAAAA,WAAW,EAAE2B,mBAAUE,MAXH;AAYpB3B,EAAAA,QAAQ,EAAEyB,mBAAUC,IAZA;AAapB9B,EAAAA,KAAK,EAAE6B,mBAAUC,IAbG;AAcpB,gBAAcD,mBAAUE,MAdJ;AAepB,eAAaF,mBAAUE;AAfH,CAAtB;eAiBexC,S","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.default\n};\nconst InputText = props => {\n const {\n autoFocus = false,\n placeholder = '',\n value,\n hint,\n defaultValue,\n onChange = noop,\n error,\n valid,\n theme = 'default',\n description,\n disabled,\n modified = false,\n title: propsTitle,\n 'data-name': dataName = 'input-text',\n 'aria-label': ariaLabel = 'Input Text'\n } = props;\n\n const isCMTheme = theme === 'coorpmanager';\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const mainClass = themeStyle[theme];\n const className = getClassState(style.default, style.modified, style.error, modified, error);\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = isCMTheme && error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = isCMTheme && valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n isNil(propsTitle) && style.isNoTitle\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n\n <input\n autoFocus={autoFocus}\n type=\"text\"\n name={propsTitle}\n className={style.input}\n placeholder={placeholder}\n defaultValue={defaultValue}\n autoComplete={'off'}\n value={value}\n onInput={handleChange}\n disabled={disabled}\n onChange={noop}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputText.propTypes = {\n autoFocus: PropTypes.bool,\n title: PropTypes.string,\n placeholder: PropTypes.string,\n defaultValue: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputText;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _inputText = _interopRequireDefault(require("../input-text"));
|
|
11
|
+
|
|
12
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
const InputTextWithTitle = props => {
|
|
19
|
+
const {
|
|
20
|
+
inputText,
|
|
21
|
+
title,
|
|
22
|
+
'data-name': dataName,
|
|
23
|
+
'aria-label': ariaLabel
|
|
24
|
+
} = props;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: _style.default.container,
|
|
27
|
+
"data-name": dataName,
|
|
28
|
+
"aria-label": ariaLabel
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
30
|
+
className: _style.default.title
|
|
31
|
+
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: _style.default.inputText
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_inputText.default, inputText)));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
InputTextWithTitle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
37
|
+
inputText: _propTypes.default.shape(_extends(_extends({}, _inputText.default.propTypes), {}, {
|
|
38
|
+
theme: _propTypes.default.string
|
|
39
|
+
})),
|
|
40
|
+
title: _propTypes.default.string,
|
|
41
|
+
'aria-label': _propTypes.default.string,
|
|
42
|
+
'data-name': _propTypes.default.string
|
|
43
|
+
} : {};
|
|
44
|
+
var _default = InputTextWithTitle;
|
|
45
|
+
exports.default = _default;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/input-text-with-title/index.js"],"names":["InputTextWithTitle","props","inputText","title","dataName","ariaLabel","style","container","propTypes","PropTypes","shape","InputText","theme","string"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,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,EAAEK,eAAMC,SAAtB;AAAiC,iBAAWH,QAA5C;AAAsD,kBAAYC;AAAlE,kBACE;AAAM,IAAA,SAAS,EAAEC,eAAMH;AAAvB,KAA+BA,KAA/B,CADF,eAEE;AAAK,IAAA,SAAS,EAAEG,eAAMJ;AAAtB,kBACE,6BAAC,kBAAD,EAAeA,SAAf,CADF,CAFF,CADF;AAQD,CAXD;;AAaAF,kBAAkB,CAACQ,SAAnB,2CAA+B;AAC7BN,EAAAA,SAAS,EAAEO,mBAAUC,KAAV,uBAAoBC,mBAAUH,SAA9B;AAAyCI,IAAAA,KAAK,EAAEH,mBAAUI;AAA1D,KADkB;AAE7BV,EAAAA,KAAK,EAAEM,mBAAUI,MAFY;AAG7B,gBAAcJ,mBAAUI,MAHK;AAI7B,eAAaJ,mBAAUI;AAJM,CAA/B;eAMeb,kB","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\n return (\n <div className={style.container} data-name={dataName} aria-label={ariaLabel}>\n <span className={style.title}>{title}</span>\n <div className={style.inputText}>\n <InputText {...inputText} />\n </div>\n </div>\n );\n};\n\nInputTextWithTitle.propTypes = {\n inputText: PropTypes.shape({...InputText.propTypes, theme: PropTypes.string}),\n title: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputTextWithTitle;\n"],"file":"index.js"}
|