@coorpacademy/components 11.9.2-alpha.1 → 11.9.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/atom/drag-and-drop/style.css +14 -9
- package/es/atom/image-upload/index.d.ts +6 -1
- package/es/atom/image-upload/index.d.ts.map +1 -1
- package/es/atom/image-upload/index.js +24 -4
- package/es/atom/image-upload/index.js.map +1 -1
- package/es/atom/image-upload/style.css +7 -0
- package/es/atom/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +62 -12
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/style.css +67 -7
- package/es/atom/title/index.d.ts +1 -0
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +14 -5
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +6 -0
- package/es/molecule/brand-form-group/index.d.ts +5 -0
- package/es/molecule/brand-form-group/index.d.ts.map +1 -1
- package/es/molecule/brand-form-group/index.js +4 -1
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +9 -10
- package/es/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
- package/es/molecule/setup-slide/index.d.ts +2 -0
- package/es/molecule/setup-slider/index.d.ts +2 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
- package/es/organism/brand-form/index.d.ts +5 -0
- package/es/organism/rewards-form/index.d.ts +3 -0
- package/es/organism/wizard-contents/index.d.ts +8 -0
- package/es/template/activity/engine-stars.css +33 -16
- package/es/template/activity/engine-stars.d.ts +17 -15
- package/es/template/activity/engine-stars.d.ts.map +1 -1
- package/es/template/activity/engine-stars.js +115 -128
- package/es/template/activity/engine-stars.js.map +1 -1
- package/es/template/activity/index.d.ts +0 -1
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +9 -18
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/progression-item.js +1 -1
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +0 -1
- package/es/template/activity/stars-summary.d.ts.map +1 -1
- package/es/template/activity/stars-summary.js +5 -10
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +13 -0
- package/lib/atom/drag-and-drop/style.css +14 -9
- package/lib/atom/image-upload/index.d.ts +6 -1
- package/lib/atom/image-upload/index.d.ts.map +1 -1
- package/lib/atom/image-upload/index.js +25 -4
- package/lib/atom/image-upload/index.js.map +1 -1
- package/lib/atom/image-upload/style.css +7 -0
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +66 -13
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/style.css +67 -7
- package/lib/atom/title/index.d.ts +1 -0
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +14 -5
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +6 -0
- package/lib/molecule/brand-form-group/index.d.ts +5 -0
- package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
- package/lib/molecule/brand-form-group/index.js +4 -1
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +9 -10
- package/lib/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
- package/lib/molecule/setup-slide/index.d.ts +2 -0
- package/lib/molecule/setup-slider/index.d.ts +2 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
- package/lib/organism/brand-form/index.d.ts +5 -0
- package/lib/organism/rewards-form/index.d.ts +3 -0
- package/lib/organism/wizard-contents/index.d.ts +8 -0
- package/lib/template/activity/engine-stars.css +33 -16
- package/lib/template/activity/engine-stars.d.ts +17 -15
- package/lib/template/activity/engine-stars.d.ts.map +1 -1
- package/lib/template/activity/engine-stars.js +116 -135
- package/lib/template/activity/engine-stars.js.map +1 -1
- package/lib/template/activity/index.d.ts +0 -1
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +9 -21
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.js +1 -1
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +0 -1
- package/lib/template/activity/stars-summary.d.ts.map +1 -1
- package/lib/template/activity/stars-summary.js +5 -10
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +13 -0
- package/locales/en/global.json +0 -1
- package/package.json +3 -4
- package/es/atom/tooltip/index.d.ts +0 -22
- package/es/atom/tooltip/index.d.ts.map +0 -1
- package/es/atom/tooltip/index.js +0 -117
- package/es/atom/tooltip/index.js.map +0 -1
- package/es/atom/tooltip/style.css +0 -96
- package/lib/atom/tooltip/index.d.ts +0 -22
- package/lib/atom/tooltip/index.d.ts.map +0 -1
- package/lib/atom/tooltip/index.js +0 -137
- package/lib/atom/tooltip/index.js.map +0 -1
- package/lib/atom/tooltip/style.css +0 -96
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
.wrapper {
|
|
20
20
|
font-family: "Gilroy";
|
|
21
|
-
max-height: 350px;
|
|
22
|
-
max-width: 460px;
|
|
23
21
|
height: 100%;
|
|
24
22
|
width: 100%;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.disabled {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
width: 100%;
|
|
56
56
|
height: 80%;
|
|
57
57
|
border: none;
|
|
58
|
+
display: flex;
|
|
58
59
|
border-radius: 7px;
|
|
59
60
|
background: cm_grey_50;
|
|
60
61
|
}
|
|
@@ -96,7 +97,6 @@
|
|
|
96
97
|
.inputWrapper {
|
|
97
98
|
background: cm_grey_50;
|
|
98
99
|
width: 100%;
|
|
99
|
-
height: 80%;
|
|
100
100
|
box-sizing: border-box;
|
|
101
101
|
border-radius: 7px;
|
|
102
102
|
position: relative;
|
|
@@ -147,23 +147,26 @@
|
|
|
147
147
|
background-color: cm_grey_50;
|
|
148
148
|
border-radius: 3px;
|
|
149
149
|
display: flex;
|
|
150
|
+
flex-wrap: nowrap;
|
|
151
|
+
min-width: 0;
|
|
150
152
|
align-items: center;
|
|
151
153
|
justify-content: space-between;
|
|
152
154
|
margin-top: 16px;
|
|
153
155
|
padding: 4px 8px;
|
|
154
156
|
font-size: 12px;
|
|
155
157
|
font-weight: 400;
|
|
158
|
+
position: relative;
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
.resetSrcLabel {
|
|
159
162
|
color: cm_grey_700;
|
|
160
|
-
display: inline-block;
|
|
161
|
-
white-space: nowrap;
|
|
162
163
|
overflow: hidden;
|
|
163
164
|
text-overflow: ellipsis;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
flex-wrap: nowrap;
|
|
167
|
+
position: absolute;
|
|
168
|
+
left: 0;
|
|
169
|
+
right: 15px;
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
.closeIcon {
|
|
@@ -172,6 +175,8 @@
|
|
|
172
175
|
margin-left: 6px;
|
|
173
176
|
height: 15px;
|
|
174
177
|
width: 15px;
|
|
178
|
+
position: absolute;
|
|
179
|
+
right: 0;
|
|
175
180
|
}
|
|
176
181
|
|
|
177
182
|
.dragging {
|
|
@@ -244,7 +249,7 @@
|
|
|
244
249
|
}
|
|
245
250
|
|
|
246
251
|
.loaderWrapper:hover .loadingCancel {
|
|
247
|
-
display:
|
|
252
|
+
display: flex;
|
|
248
253
|
}
|
|
249
254
|
|
|
250
255
|
.loaderWrapper:hover {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default ImageUpload;
|
|
2
|
-
declare function ImageUpload({ title, description, previewLabel, previewContent, uploadLabel, loading, modified, disabled, onChange, onReset, name, imageTypes, error, buttonAriaLabel, errorButtonLabel }: {
|
|
2
|
+
declare function ImageUpload({ title, description, previewLabel, previewContent, uploadLabel, loading, modified, disabled, onChange, onReset, name, labelLink, labelButtonLink, hrefLink, imageTypes, error, buttonAriaLabel, errorButtonLabel }: {
|
|
3
3
|
title: any;
|
|
4
4
|
description: any;
|
|
5
5
|
previewLabel: any;
|
|
@@ -11,6 +11,9 @@ declare function ImageUpload({ title, description, previewLabel, previewContent,
|
|
|
11
11
|
onChange: any;
|
|
12
12
|
onReset?: null | undefined;
|
|
13
13
|
name: any;
|
|
14
|
+
labelLink: any;
|
|
15
|
+
labelButtonLink: any;
|
|
16
|
+
hrefLink: any;
|
|
14
17
|
imageTypes?: string[] | undefined;
|
|
15
18
|
error?: string | undefined;
|
|
16
19
|
buttonAriaLabel: any;
|
|
@@ -25,6 +28,8 @@ declare namespace ImageUpload {
|
|
|
25
28
|
error: PropTypes.Requireable<string>;
|
|
26
29
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
27
30
|
errorButtonLabel: PropTypes.Requireable<string>;
|
|
31
|
+
labelLink: PropTypes.Requireable<string>;
|
|
32
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
28
33
|
title: PropTypes.Requireable<string>;
|
|
29
34
|
description: PropTypes.Requireable<string>;
|
|
30
35
|
uploadLabel: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/image-upload/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/image-upload/index.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;;;;;;;;;gBAmFC"}
|
|
@@ -9,6 +9,7 @@ import React, { useCallback } from 'react';
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import DragAndDrop from '../drag-and-drop';
|
|
11
11
|
import { ImagePropType } from '../../util/proptypes';
|
|
12
|
+
import Link from '../button-link';
|
|
12
13
|
import style from './style.css';
|
|
13
14
|
|
|
14
15
|
const ImageUpload = ({
|
|
@@ -24,6 +25,9 @@ const ImageUpload = ({
|
|
|
24
25
|
onReset = null,
|
|
25
26
|
name,
|
|
26
27
|
// See ImagePropType for accepted values
|
|
28
|
+
labelLink,
|
|
29
|
+
labelButtonLink,
|
|
30
|
+
hrefLink,
|
|
27
31
|
imageTypes = ['*'],
|
|
28
32
|
error = '',
|
|
29
33
|
buttonAriaLabel,
|
|
@@ -37,7 +41,11 @@ const ImageUpload = ({
|
|
|
37
41
|
|
|
38
42
|
const acceptedImages = _pipe(_map(t => `image/${t}`), _join(','))(imageTypes);
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
const linkCustomStyle = {
|
|
45
|
+
width: '40px',
|
|
46
|
+
color: 'red'
|
|
47
|
+
};
|
|
48
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DragAndDrop, {
|
|
41
49
|
title: title,
|
|
42
50
|
description: description,
|
|
43
51
|
previewLabel: previewLabel,
|
|
@@ -50,7 +58,7 @@ const ImageUpload = ({
|
|
|
50
58
|
disabled: disabled,
|
|
51
59
|
buttonAriaLabel: buttonAriaLabel,
|
|
52
60
|
errorButtonLabel: errorButtonLabel
|
|
53
|
-
}, (onDragStart, onDragStop) => /*#__PURE__*/React.createElement("
|
|
61
|
+
}, (onDragStart, onDragStop) => /*#__PURE__*/React.createElement("input", {
|
|
54
62
|
type: "file",
|
|
55
63
|
name: name,
|
|
56
64
|
accept: acceptedImages,
|
|
@@ -60,7 +68,17 @@ const ImageUpload = ({
|
|
|
60
68
|
onDragEnter: onDragStart,
|
|
61
69
|
onDrop: onDragStop,
|
|
62
70
|
onDragLeave: onDragStop
|
|
63
|
-
}))
|
|
71
|
+
})), labelLink && hrefLink ? /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: style.templateLink
|
|
73
|
+
}, labelLink, /*#__PURE__*/React.createElement(Link, {
|
|
74
|
+
type: "text",
|
|
75
|
+
customStyle: linkCustomStyle,
|
|
76
|
+
link: {
|
|
77
|
+
href: hrefLink,
|
|
78
|
+
download: true
|
|
79
|
+
},
|
|
80
|
+
label: labelButtonLink
|
|
81
|
+
})) : null);
|
|
64
82
|
};
|
|
65
83
|
|
|
66
84
|
ImageUpload.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, DragAndDrop.propTypes, {
|
|
@@ -70,7 +88,9 @@ ImageUpload.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, Dra
|
|
|
70
88
|
imageTypes: PropTypes.arrayOf(ImagePropType),
|
|
71
89
|
error: PropTypes.string,
|
|
72
90
|
buttonAriaLabel: PropTypes.string,
|
|
73
|
-
errorButtonLabel: PropTypes.string
|
|
91
|
+
errorButtonLabel: PropTypes.string,
|
|
92
|
+
labelLink: PropTypes.string,
|
|
93
|
+
hrefLink: PropTypes.string
|
|
74
94
|
}) : {};
|
|
75
95
|
export default ImageUpload;
|
|
76
96
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","DragAndDrop","ImagePropType","style","ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","disabled","onChange","onReset","name","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","e","preventDefault","acceptedImages","t","onDragStart","onDragStop","input","propTypes","string","func","arrayOf"],"sources":["../../../src/atom/image-upload/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {join, map, pipe, isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n disabled = false,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const acceptedImages = pipe(\n map(t => `image/${t}`),\n join(',')\n )(imageTypes);\n\n return (\n <DragAndDrop\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","DragAndDrop","ImagePropType","Link","style","ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","disabled","onChange","onReset","name","labelLink","labelButtonLink","hrefLink","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","e","preventDefault","acceptedImages","t","linkCustomStyle","width","color","onDragStart","onDragStop","input","templateLink","href","download","propTypes","string","func","arrayOf"],"sources":["../../../src/atom/image-upload/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {join, map, pipe, isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport Link from '../button-link';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n disabled = false,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n labelLink,\n labelButtonLink,\n hrefLink,\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const acceptedImages = pipe(\n map(t => `image/${t}`),\n join(',')\n )(imageTypes);\n\n const linkCustomStyle = {\n width: '40px',\n color: 'red'\n };\n\n return (\n <div>\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n disabled={disabled}\n buttonAriaLabel={buttonAriaLabel}\n errorButtonLabel={errorButtonLabel}\n >\n {(onDragStart, onDragStop) => (\n <input\n type=\"file\"\n name={name}\n accept={acceptedImages}\n disabled={loading || disabled}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )}\n </DragAndDrop>\n {labelLink && hrefLink ? (\n <div className={style.templateLink}>\n {labelLink}\n <Link\n type=\"text\"\n customStyle={linkCustomStyle}\n link={{href: hrefLink, download: true}}\n label={labelButtonLink}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string,\n labelLink: PropTypes.string,\n hrefLink: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;EACnBC,KADmB;EAEnBC,WAFmB;EAGnBC,YAHmB;EAInBC,cAJmB;EAKnBC,WALmB;EAMnBC,OANmB;EAOnBC,QAPmB;EAQnBC,QAAQ,GAAG,KARQ;EASnBC,QATmB;EAUnBC,OAAO,GAAG,IAVS;EAWnBC,IAXmB;EAYnB;EACAC,SAbmB;EAcnBC,eAdmB;EAenBC,QAfmB;EAgBnBC,UAAU,GAAG,CAAC,GAAD,CAhBM;EAiBnBC,KAAK,GAAG,EAjBW;EAkBnBC,eAlBmB;EAmBnBC;AAnBmB,CAAD,KAoBd;EACJ,MAAMC,WAAW,GAAGzB,WAAW,CAC7B0B,CAAC,IAAI;IACH,IAAI,OAAMV,OAAN,CAAJ,EAAoB;IACpBU,CAAC,CAACC,cAAF;IACA,OAAOX,OAAO,CAACU,CAAD,CAAd;EACD,CAL4B,EAM7B,CAAC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EAEEtB,IAAI,EAAEhB,SAAS,CAACuC,MAFlB;EAGEzB,QAAQ,EAAEd,SAAS,CAACwC,IAHtB;EAIEzB,OAAO,EAAEf,SAAS,CAACwC,IAJrB;EAKEpB,UAAU,EAAEpB,SAAS,CAACyC,OAAV,CAAkBvC,aAAlB,CALd;EAMEmB,KAAK,EAAErB,SAAS,CAACuC,MANnB;EAOEjB,eAAe,EAAEtB,SAAS,CAACuC,MAP7B;EAQEhB,gBAAgB,EAAEvB,SAAS,CAACuC,MAR9B;EASEtB,SAAS,EAAEjB,SAAS,CAACuC,MATvB;EAUEpB,QAAQ,EAAEnB,SAAS,CAACuC;AAVtB;AAaA,eAAelC,WAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/review-presentation/index.js"],"names":[],"mappings":";AAyGA,6DA+BC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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, { useState, useCallback } from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import getOr from 'lodash/fp/getOr';
|
|
4
6
|
import map from 'lodash/fp/map';
|
|
5
|
-
import { NovaSolidStatusCheckCircle2 as CheckIcon, NovaSolidVoteRewardsVoteHeart as HeartIcon, NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon, NovaLineSelectionCursorsCursorArrowTarget as TargetIcon } from '@coorpacademy/nova-icons';
|
|
6
|
-
import ToolTip from '../tooltip';
|
|
7
|
+
import { NovaSolidStatusCheckCircle2 as CheckIcon, NovaSolidVoteRewardsVoteHeart as HeartIcon, NovaCompositionCoorpacademyInformationIcon as InformationIcon, NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon, NovaLineSelectionCursorsCursorArrowTarget as TargetIcon } from '@coorpacademy/nova-icons';
|
|
7
8
|
import style from './style.css';
|
|
8
9
|
import propTypes from './prop-types';
|
|
9
10
|
const ICONS = {
|
|
@@ -30,6 +31,50 @@ const ReviewIcon = ({
|
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
|
|
34
|
+
const ToolTip = ({
|
|
35
|
+
tooltipText,
|
|
36
|
+
'aria-label': moreDetailsAriaLabel,
|
|
37
|
+
'data-testid': dataTestId,
|
|
38
|
+
closeToolTipInformationTextAriaLabel
|
|
39
|
+
}) => {
|
|
40
|
+
const [toolTipIsVisible, setToolTipIsVisible] = useState(false);
|
|
41
|
+
const handleKeyPress = useCallback(event => {
|
|
42
|
+
if (event.key === 'Enter') {
|
|
43
|
+
setToolTipIsVisible(!toolTipIsVisible);
|
|
44
|
+
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
45
|
+
setToolTipIsVisible(false);
|
|
46
|
+
}
|
|
47
|
+
}, [setToolTipIsVisible, toolTipIsVisible]);
|
|
48
|
+
const handleMouseOver = useCallback(() => {
|
|
49
|
+
setToolTipIsVisible(true);
|
|
50
|
+
}, [setToolTipIsVisible]);
|
|
51
|
+
const handleMouseLeave = useCallback(() => {
|
|
52
|
+
setToolTipIsVisible(false);
|
|
53
|
+
}, [setToolTipIsVisible]);
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
+
className: style.tooltipContainer,
|
|
56
|
+
onMouseLeave: handleMouseLeave,
|
|
57
|
+
onMouseOver: handleMouseOver
|
|
58
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
className: style.tooltipIconContainer,
|
|
61
|
+
"data-testid": dataTestId,
|
|
62
|
+
onKeyDown: handleKeyPress,
|
|
63
|
+
tabIndex: 0
|
|
64
|
+
}, /*#__PURE__*/React.createElement(InformationIcon, {
|
|
65
|
+
className: style.informationIcon,
|
|
66
|
+
width: 12,
|
|
67
|
+
height: 12,
|
|
68
|
+
"aria-label": moreDetailsAriaLabel
|
|
69
|
+
})), toolTipIsVisible ? /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: style.toolTip,
|
|
71
|
+
"data-testid": "review-presentation-tooltip",
|
|
72
|
+
"aria-label": closeToolTipInformationTextAriaLabel
|
|
73
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
74
|
+
className: style.tooltipText
|
|
75
|
+
}, tooltipText)) : null);
|
|
76
|
+
};
|
|
77
|
+
|
|
33
78
|
const ReviewListItemWrapper = ({
|
|
34
79
|
iconKey,
|
|
35
80
|
label
|
|
@@ -44,10 +89,10 @@ const ReviewListItemWrapper = ({
|
|
|
44
89
|
}, /*#__PURE__*/React.createElement(ReviewIcon, {
|
|
45
90
|
icon: iconKey
|
|
46
91
|
}), " ", label.text), /*#__PURE__*/React.createElement(ToolTip, {
|
|
47
|
-
|
|
92
|
+
tooltipText: label.tooltipText,
|
|
93
|
+
"aria-label": label.moreDetailsAriaLabel,
|
|
48
94
|
closeToolTipInformationTextAriaLabel: label.closeToolTipInformationTextAriaLabel,
|
|
49
|
-
"data-testid": `review-list-item-tooltip-button-${iconKey}
|
|
50
|
-
"aria-label": label.moreDetailsAriaLabel
|
|
95
|
+
"data-testid": `review-list-item-tooltip-button-${iconKey}`
|
|
51
96
|
}));
|
|
52
97
|
};
|
|
53
98
|
|
|
@@ -90,18 +135,23 @@ const ReviewPresentation = props => {
|
|
|
90
135
|
}, labelsList)));
|
|
91
136
|
};
|
|
92
137
|
|
|
138
|
+
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
139
|
+
tooltipText: PropTypes.string,
|
|
140
|
+
'aria-label': PropTypes.string,
|
|
141
|
+
'data-testid': PropTypes.string,
|
|
142
|
+
closeToolTipInformationTextAriaLabel: PropTypes.string
|
|
143
|
+
} : {};
|
|
93
144
|
ReviewIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
94
145
|
icon: PropTypes.string
|
|
95
146
|
} : {};
|
|
96
|
-
ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
147
|
+
ReviewListItemWrapper.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, ToolTip.propTypes, {
|
|
97
148
|
iconKey: PropTypes.string,
|
|
98
149
|
label: PropTypes.shape({
|
|
99
|
-
tooltipText:
|
|
100
|
-
moreDetailsAriaLabel:
|
|
101
|
-
closeToolTipInformationTextAriaLabel:
|
|
102
|
-
text: PropTypes.string
|
|
150
|
+
tooltipText: PropTypes.string,
|
|
151
|
+
moreDetailsAriaLabel: PropTypes.string,
|
|
152
|
+
closeToolTipInformationTextAriaLabel: PropTypes.string
|
|
103
153
|
})
|
|
104
|
-
} : {};
|
|
154
|
+
}) : {};
|
|
105
155
|
ReviewPresentation.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
106
156
|
export default ReviewPresentation;
|
|
107
157
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","getOr","map","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidVoteRewardsVoteHeart","HeartIcon","NovaCompositionCoorpacademyInformationIcon","InformationIcon","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","NovaLineSelectionCursorsCursorArrowTarget","TargetIcon","style","propTypes","ICONS","skills","questions","lifes","allright","ReviewIcon","icon","Icon","labelIcon","ToolTip","tooltipText","moreDetailsAriaLabel","dataTestId","closeToolTipInformationTextAriaLabel","toolTipIsVisible","setToolTipIsVisible","handleKeyPress","event","key","handleMouseOver","handleMouseLeave","tooltipContainer","tooltipIconContainer","informationIcon","toolTip","ReviewListItemWrapper","iconKey","label","reviewListItemWrapper","reviewListText","text","ReviewPresentation","props","ariaLabel","reviewTitle","reviewText","labelsList","reviewWrapper","__html","reviewListWrapper","convert","cap","reviewList","string","shape"],"sources":["../../../src/atom/review-presentation/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport getOr from 'lodash/fp/getOr';\nimport map from 'lodash/fp/map';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidVoteRewardsVoteHeart as HeartIcon,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon,\n NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon,\n NovaLineSelectionCursorsCursorArrowTarget as TargetIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst ICONS = {\n skills: TargetIcon,\n questions: QuestionIcon,\n lifes: HeartIcon,\n allright: CheckIcon\n};\n\nconst ReviewIcon = ({icon}) => {\n const Icon = getOr(null, icon, ICONS);\n\n /* istanbul ignore next */\n if (!Icon) {\n return <div className={style.labelIcon} />;\n }\n return <Icon className={style.labelIcon} />;\n};\n\nconst ToolTip = ({\n tooltipText,\n 'aria-label': moreDetailsAriaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel\n}) => {\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n const handleKeyPress = useCallback(\n event => {\n if (event.key === 'Enter') {\n setToolTipIsVisible(!toolTipIsVisible);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setToolTipIsVisible(false);\n }\n },\n [setToolTipIsVisible, toolTipIsVisible]\n );\n const handleMouseOver = useCallback(() => {\n setToolTipIsVisible(true);\n }, [setToolTipIsVisible]);\n\n const handleMouseLeave = useCallback(() => {\n setToolTipIsVisible(false);\n }, [setToolTipIsVisible]);\n\n return (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={moreDetailsAriaLabel}\n />\n </button>\n {toolTipIsVisible ? (\n <div\n className={style.toolTip}\n data-testid=\"review-presentation-tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n <p className={style.tooltipText}>{tooltipText}</p>\n </div>\n ) : null}\n </div>\n );\n};\n\nconst ReviewListItemWrapper = ({iconKey, label}) => {\n return (\n <div className={style.reviewListItemWrapper} data-tip data-for=\"reviewListItem\" tabIndex={0}>\n <div className={style.reviewListText}>\n <ReviewIcon icon={iconKey} /> {label.text}\n </div>\n <ToolTip\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n closeToolTipInformationTextAriaLabel={label.closeToolTipInformationTextAriaLabel}\n data-testid={`review-list-item-tooltip-button-${iconKey}`}\n />\n </div>\n );\n};\n\nconst ReviewPresentation = props => {\n const {'aria-label': ariaLabel, reviewTitle, reviewText, labelsList} = props;\n\n return (\n <div className={style.reviewWrapper} aria-label={ariaLabel}>\n <div\n className={style.reviewTitle}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewTitle}}\n />\n <div\n className={style.reviewText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: reviewText}}\n />\n <ul className={style.reviewListWrapper}>\n {map.convert({cap: false})((label, key) => {\n return (\n <li key={`step-${key}`} className={style.reviewList}>\n <ReviewListItemWrapper\n iconKey={key}\n label={label}\n tooltipText={label.tooltipText}\n aria-label={label.moreDetailsAriaLabel}\n />\n </li>\n );\n }, labelsList)}\n </ul>\n </div>\n );\n};\n\nToolTip.propTypes = {\n tooltipText: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n};\n\nReviewIcon.propTypes = {\n icon: PropTypes.string\n};\n\nReviewListItemWrapper.propTypes = {\n ...ToolTip.propTypes,\n iconKey: PropTypes.string,\n label: PropTypes.shape({\n tooltipText: PropTypes.string,\n moreDetailsAriaLabel: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string\n })\n};\n\nReviewPresentation.propTypes = propTypes;\n\nexport default ReviewPresentation;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,2BAA2B,IAAIC,SADjC,EAEEC,6BAA6B,IAAIC,SAFnC,EAGEC,0CAA0C,IAAIC,eAHhD,EAIEC,+CAA+C,IAAIC,YAJrD,EAKEC,yCAAyC,IAAIC,UAL/C,QAMO,0BANP;AAOA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AAEA,MAAMC,KAAK,GAAG;EACZC,MAAM,EAAEJ,UADI;EAEZK,SAAS,EAAEP,YAFC;EAGZQ,KAAK,EAAEZ,SAHK;EAIZa,QAAQ,EAAEf;AAJE,CAAd;;AAOA,MAAMgB,UAAU,GAAG,CAAC;EAACC;AAAD,CAAD,KAAY;EAC7B,MAAMC,IAAI,GAAGrB,KAAK,CAAC,IAAD,EAAOoB,IAAP,EAAaN,KAAb,CAAlB;EAEA;;EACA,IAAI,CAACO,IAAL,EAAW;IACT,oBAAO;MAAK,SAAS,EAAET,KAAK,CAACU;IAAtB,EAAP;EACD;;EACD,oBAAO,oBAAC,IAAD;IAAM,SAAS,EAAEV,KAAK,CAACU;EAAvB,EAAP;AACD,CARD;;AAUA,MAAMC,OAAO,GAAG,CAA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oBACE;MAAI,GAAG,EAAG,QAAOA,GAAI,EAArB;MAAwB,SAAS,EAAEpB,KAAK,CAAC4C;IAAzC,gBACE,oBAAC,qBAAD;MACE,OAAO,EAAExB,GADX;MAEE,KAAK,EAAES,KAFT;MAGE,WAAW,EAAEA,KAAK,CAACjB,WAHrB;MAIE,cAAYiB,KAAK,CAAChB;IAJpB,EADF,CADF;EAUD,CAXA,EAWEyB,UAXF,CADH,CAXF,CADF;AA4BD,CA/BD;;AAiCA3B,OAAO,CAACV,SAAR,2CAAoB;EAClBW,WAAW,EAAEzB,SAAS,CAAC0D,MADL;EAElB,cAAc1D,SAAS,CAAC0D,MAFN;EAGlB,eAAe1D,SAAS,CAAC0D,MAHP;EAIlB9B,oCAAoC,EAAE5B,SAAS,CAAC0D;AAJ9B,CAApB;AAOAtC,UAAU,CAACN,SAAX,2CAAuB;EACrBO,IAAI,EAAErB,SAAS,CAAC0D;AADK,CAAvB;AAIAlB,qBAAqB,CAAC1B,SAAtB,wDACKU,OAAO,CAACV,SADb;EAEE2B,OAAO,EAAEzC,SAAS,CAAC0D,MAFrB;EAGEhB,KAAK,EAAE1C,SAAS,CAAC2D,KAAV,CAAgB;IACrBlC,WAAW,EAAEzB,SAAS,CAAC0D,MADF;IAErBhC,oBAAoB,EAAE1B,SAAS,CAAC0D,MAFX;IAGrB9B,oCAAoC,EAAE5B,SAAS,CAAC0D;EAH3B,CAAhB;AAHT;AAUAZ,kBAAkB,CAAChC,SAAnB,2CAA+BA,SAA/B;AAEA,eAAegC,kBAAf"}
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
@value mobile from breakpoints;
|
|
4
4
|
@value colors: "../../variables/colors.css";
|
|
5
5
|
@value xtraLightGrey from colors;
|
|
6
|
+
@value cm_blue_900 from colors;
|
|
6
7
|
@value cm_grey_75 from colors;
|
|
8
|
+
@value cm_grey_500 from colors;
|
|
9
|
+
@value cm_grey_700 from colors;
|
|
10
|
+
@value white from colors;
|
|
7
11
|
|
|
8
|
-
.reviewWrapper {
|
|
9
|
-
width: 100%;
|
|
10
|
-
border-radius: 16px;
|
|
11
|
-
background-color: xtraLightGrey;
|
|
12
|
-
padding-bottom: 40px;
|
|
13
|
-
}
|
|
14
12
|
|
|
15
13
|
.textBase {
|
|
16
14
|
font-family: "Gilroy";
|
|
@@ -19,6 +17,13 @@
|
|
|
19
17
|
user-select: none;
|
|
20
18
|
}
|
|
21
19
|
|
|
20
|
+
.reviewWrapper {
|
|
21
|
+
width: 100%;
|
|
22
|
+
border-radius: 16px;
|
|
23
|
+
background-color: xtraLightGrey;
|
|
24
|
+
padding-bottom: 40px;
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
.reviewTitle {
|
|
23
28
|
composes: textBase;
|
|
24
29
|
font-weight: 700;
|
|
@@ -72,6 +77,61 @@
|
|
|
72
77
|
width: 16px;
|
|
73
78
|
}
|
|
74
79
|
|
|
80
|
+
.informationIcon {
|
|
81
|
+
color: cm_grey_500;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.toolTip {
|
|
85
|
+
transition: opacity 0.8s;
|
|
86
|
+
position: absolute;
|
|
87
|
+
height: auto;
|
|
88
|
+
width: 200px;
|
|
89
|
+
border-radius: 7px;
|
|
90
|
+
background-color: cm_grey_700;
|
|
91
|
+
right: -81px;
|
|
92
|
+
bottom: 32px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.toolTip::before {
|
|
96
|
+
content: '';
|
|
97
|
+
display: inline-block;
|
|
98
|
+
visibility: inherit;
|
|
99
|
+
opacity: inherit;
|
|
100
|
+
width: 15px;
|
|
101
|
+
height: 15px;
|
|
102
|
+
transform: rotate(-45deg);
|
|
103
|
+
background-color: cm_grey_700;
|
|
104
|
+
position: inherit;
|
|
105
|
+
bottom: -5px;
|
|
106
|
+
right: 40%;
|
|
107
|
+
border-radius: 2px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.tooltipText {
|
|
111
|
+
composes: textBase;
|
|
112
|
+
font-weight: 500;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
display: inline-block;
|
|
115
|
+
border-radius: 3px;
|
|
116
|
+
word-wrap: break-word;
|
|
117
|
+
color: white;
|
|
118
|
+
padding: 8px 14px;
|
|
119
|
+
text-align: center;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.tooltipContainer {
|
|
123
|
+
overflow: visible;
|
|
124
|
+
position: relative;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.tooltipIconContainer {
|
|
128
|
+
display: flex;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
border: none;
|
|
131
|
+
background: cm_grey_75;
|
|
132
|
+
height: 25px;
|
|
133
|
+
}
|
|
134
|
+
|
|
75
135
|
@media tablet {
|
|
76
136
|
.reviewWrapper{
|
|
77
137
|
width: 100%;
|
|
@@ -82,4 +142,4 @@
|
|
|
82
142
|
.reviewWrapper{
|
|
83
143
|
width: 100%;
|
|
84
144
|
}
|
|
85
|
-
}
|
|
145
|
+
}
|
package/es/atom/title/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AA2BA,gDAeC"}
|
package/es/atom/title/index.js
CHANGED
|
@@ -12,13 +12,20 @@ const getTitleStype = type => {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
const getSubtitleStype = type => {
|
|
15
|
+
const getSubtitleStype = (type, size) => {
|
|
16
16
|
switch (type) {
|
|
17
17
|
case 'page':
|
|
18
18
|
return style.subtitlePage;
|
|
19
19
|
|
|
20
20
|
case 'form-group':
|
|
21
|
-
|
|
21
|
+
switch (size) {
|
|
22
|
+
case 'standard':
|
|
23
|
+
return style.subtitleFormGroup;
|
|
24
|
+
|
|
25
|
+
case 'small':
|
|
26
|
+
return style.smallSubtitleFormGroup;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
}
|
|
23
30
|
};
|
|
24
31
|
|
|
@@ -27,10 +34,11 @@ const Title = props => {
|
|
|
27
34
|
title,
|
|
28
35
|
subtitle,
|
|
29
36
|
type,
|
|
30
|
-
'data-name': dataName
|
|
37
|
+
'data-name': dataName,
|
|
38
|
+
subtitleSize = 'standard'
|
|
31
39
|
} = props;
|
|
32
40
|
const titleStyle = getTitleStype(type);
|
|
33
|
-
const subtitleStyle = getSubtitleStype(type);
|
|
41
|
+
const subtitleStyle = getSubtitleStype(type, subtitleSize);
|
|
34
42
|
const subtitleSection = subtitle ? /*#__PURE__*/React.createElement("div", {
|
|
35
43
|
className: subtitleStyle
|
|
36
44
|
}, subtitle) : null;
|
|
@@ -44,7 +52,8 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
44
52
|
title: PropTypes.string,
|
|
45
53
|
subtitle: PropTypes.string,
|
|
46
54
|
type: PropTypes.oneOf(['page', 'form-group']),
|
|
47
|
-
'data-name': PropTypes.string
|
|
55
|
+
'data-name': PropTypes.string,
|
|
56
|
+
subtitleSize: PropTypes.string
|
|
48
57
|
} : {};
|
|
49
58
|
export default Title;
|
|
50
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","style","getTitleStype","type","titlePage","titleFormGroup","getSubtitleStype","subtitlePage","subtitleFormGroup","Title","props","title","subtitle","dataName","titleStyle","subtitleStyle","subtitleSection","propTypes","string","oneOf"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './style.css';\n\nconst getTitleStype = type => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n return style.titleFormGroup;\n }\n};\n\nconst getSubtitleStype = type => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n return style.subtitleFormGroup;\n }\n};\n\nconst Title = props => {\n const {title, subtitle, type, 'data-name': dataName} = props;\n const titleStyle = getTitleStype(type);\n const subtitleStyle = getSubtitleStype(type);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n </div>\n {subtitleSection}\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string\n};\nexport default Title;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAGC,IAAI,IAAI;EAC5B,QAAQA,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACG,SAAb;;IACF,KAAK,YAAL;MACE,OAAOH,KAAK,CAACI,cAAb;EAJJ;AAMD,CAPD;;AASA,MAAMC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","style","getTitleStype","type","titlePage","titleFormGroup","getSubtitleStype","size","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","Title","props","title","subtitle","dataName","subtitleSize","titleStyle","subtitleStyle","subtitleSection","propTypes","string","oneOf"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './style.css';\n\nconst getTitleStype = type => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n return style.titleFormGroup;\n }\n};\n\nconst getSubtitleStype = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {title, subtitle, type, 'data-name': dataName, subtitleSize = 'standard'} = props;\n const titleStyle = getTitleStype(type);\n const subtitleStyle = getSubtitleStype(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n </div>\n {subtitleSection}\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n subtitleSize: PropTypes.string\n};\nexport default Title;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAGC,IAAI,IAAI;EAC5B,QAAQA,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACG,SAAb;;IACF,KAAK,YAAL;MACE,OAAOH,KAAK,CAACI,cAAb;EAJJ;AAMD,CAPD;;AASA,MAAMC,gBAAgB,GAAG,CAACH,IAAD,EAAOI,IAAP,KAAgB;EACvC,QAAQJ,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACO,YAAb;;IACF,KAAK,YAAL;MACE,QAAQD,IAAR;QACE,KAAK,UAAL;UACE,OAAON,KAAK,CAACQ,iBAAb;;QACF,KAAK,OAAL;UACE,OAAOR,KAAK,CAACS,sBAAb;MAJJ;;EAJJ;AAWD,CAZD;;AAcA,MAAMC,KAAK,GAAGC,KAAK,IAAI;EACrB,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBX,IAAlB;IAAwB,aAAaY,QAArC;IAA+CC,YAAY,GAAG;EAA9D,IAA4EJ,KAAlF;EACA,MAAMK,UAAU,GAAGf,aAAa,CAACC,IAAD,CAAhC;EACA,MAAMe,aAAa,GAAGZ,gBAAgB,CAACH,IAAD,EAAOa,YAAP,CAAtC;EAEA,MAAMG,eAAe,GAAGL,QAAQ,gBAAG;IAAK,SAAS,EAAEI;EAAhB,GAAgCJ,QAAhC,CAAH,GAAqD,IAArF;EAEA,oBACE,8CACE;IAAK,SAAS,EAAEG,UAAhB;IAA4B,aAAWF;EAAvC,GACGF,KADH,CADF,EAIGM,eAJH,CADF;AAQD,CAfD;;AAiBAR,KAAK,CAACS,SAAN,2CAAkB;EAChBP,KAAK,EAAEb,SAAS,CAACqB,MADD;EAEhBP,QAAQ,EAAEd,SAAS,CAACqB,MAFJ;EAGhBlB,IAAI,EAAEH,SAAS,CAACsB,KAAV,CAAgB,CAAC,MAAD,EAAS,YAAT,CAAhB,CAHU;EAIhB,aAAatB,SAAS,CAACqB,MAJP;EAKhBL,YAAY,EAAEhB,SAAS,CAACqB;AALR,CAAlB;AAOA,eAAeV,KAAf"}
|
package/es/atom/title/style.css
CHANGED
|
@@ -4,6 +4,7 @@ declare namespace BrandFormGroup {
|
|
|
4
4
|
namespace propTypes {
|
|
5
5
|
const title: PropTypes.Requireable<string>;
|
|
6
6
|
const subtitle: PropTypes.Requireable<string>;
|
|
7
|
+
const subtitleSize: PropTypes.Requireable<string>;
|
|
7
8
|
const fieldsLayout: PropTypes.Requireable<string>;
|
|
8
9
|
const groupLayout: PropTypes.Requireable<string>;
|
|
9
10
|
const fields: PropTypes.Requireable<(NonNullable<PropTypes.InferProps<{
|
|
@@ -129,6 +130,8 @@ declare namespace BrandFormGroup {
|
|
|
129
130
|
error: PropTypes.Requireable<string>;
|
|
130
131
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
131
132
|
errorButtonLabel: PropTypes.Requireable<string>;
|
|
133
|
+
labelLink: PropTypes.Requireable<string>;
|
|
134
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
132
135
|
title: PropTypes.Requireable<string>;
|
|
133
136
|
description: PropTypes.Requireable<string>;
|
|
134
137
|
uploadLabel: PropTypes.Requireable<string>;
|
|
@@ -242,6 +245,8 @@ declare namespace BrandFormGroup {
|
|
|
242
245
|
error: PropTypes.Requireable<string>;
|
|
243
246
|
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
244
247
|
errorButtonLabel: PropTypes.Requireable<string>;
|
|
248
|
+
labelLink: PropTypes.Requireable<string>;
|
|
249
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
245
250
|
title: PropTypes.Requireable<string>;
|
|
246
251
|
description: PropTypes.Requireable<string>;
|
|
247
252
|
uploadLabel: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-form-group/index.js"],"names":[],"mappings":";AAmGA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-form-group/index.js"],"names":[],"mappings":";AAmGA,yDAsBC"}
|
|
@@ -132,7 +132,8 @@ const BrandFormGroup = props => {
|
|
|
132
132
|
subtitle = '',
|
|
133
133
|
fieldsLayout = '',
|
|
134
134
|
groupLayout = '',
|
|
135
|
-
fields = []
|
|
135
|
+
fields = [],
|
|
136
|
+
subtitleSize = 'standard'
|
|
136
137
|
} = props;
|
|
137
138
|
|
|
138
139
|
const fieldsList = _map.convert({
|
|
@@ -147,6 +148,7 @@ const BrandFormGroup = props => {
|
|
|
147
148
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
148
149
|
title: title,
|
|
149
150
|
subtitle: subtitle,
|
|
151
|
+
subtitleSize: subtitleSize,
|
|
150
152
|
type: 'form-group'
|
|
151
153
|
})), /*#__PURE__*/React.createElement("div", {
|
|
152
154
|
className: fieldsLayout === 'grid' ? style.grid : null
|
|
@@ -156,6 +158,7 @@ const BrandFormGroup = props => {
|
|
|
156
158
|
BrandFormGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
157
159
|
title: PropTypes.string,
|
|
158
160
|
subtitle: PropTypes.string,
|
|
161
|
+
subtitleSize: PropTypes.string,
|
|
159
162
|
fieldsLayout: PropTypes.string,
|
|
160
163
|
groupLayout: PropTypes.string,
|
|
161
164
|
fields: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(_extends({}, Autocomplete.propTypes, {
|