@coorpacademy/components 11.16.5-alpha.5 → 11.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/es/atom/image-upload/style.css +2 -0
  2. package/es/atom/radio-with-title/index.d.ts +1 -0
  3. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  4. package/es/atom/radio-with-title/index.js +7 -1
  5. package/es/atom/radio-with-title/index.js.map +1 -1
  6. package/es/atom/radio-with-title/types.d.ts +1 -0
  7. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  8. package/es/atom/title/index.d.ts +1 -0
  9. package/es/atom/title/index.d.ts.map +1 -1
  10. package/es/atom/title/index.js +24 -6
  11. package/es/atom/title/index.js.map +1 -1
  12. package/es/atom/title/style.css +31 -4
  13. package/es/molecule/brand-form-group/index.d.ts +567 -1
  14. package/es/molecule/brand-form-group/index.d.ts.map +1 -1
  15. package/es/molecule/brand-form-group/index.js +9 -8
  16. package/es/molecule/brand-form-group/index.js.map +1 -1
  17. package/es/molecule/brand-form-group/style.css +4 -0
  18. package/es/molecule/select-multiple/index.js +1 -1
  19. package/es/molecule/select-multiple/index.js.map +1 -1
  20. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
  21. package/es/molecule/title-radio-wrapper/index.d.ts +18 -17
  22. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  23. package/es/molecule/title-radio-wrapper/style.css +1 -1
  24. package/es/molecule/title-radio-wrapper/types.d.ts +18 -17
  25. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  26. package/es/organism/brand-form/index.d.ts +567 -1
  27. package/es/organism/brand-form/index.d.ts.map +1 -1
  28. package/es/organism/brand-form/index.js +4 -3
  29. package/es/organism/brand-form/index.js.map +1 -1
  30. package/es/organism/brand-form/style.css +5 -0
  31. package/es/organism/rewards-form/index.d.ts +1 -0
  32. package/es/organism/select-opponents/index.d.ts +70 -0
  33. package/es/organism/select-opponents/index.d.ts.map +1 -0
  34. package/es/organism/select-opponents/index.js +27 -0
  35. package/es/organism/select-opponents/index.js.map +1 -0
  36. package/es/organism/{select-population → select-opponents}/style.css +1 -0
  37. package/es/organism/select-opponents/types.d.ts +70 -0
  38. package/es/organism/select-opponents/types.d.ts.map +1 -0
  39. package/es/organism/select-opponents/types.js +7 -0
  40. package/es/organism/select-opponents/types.js.map +1 -0
  41. package/es/organism/title-and-input/index.d.ts +117 -0
  42. package/es/organism/title-and-input/index.d.ts.map +1 -0
  43. package/es/organism/title-and-input/index.js +43 -0
  44. package/es/organism/title-and-input/index.js.map +1 -0
  45. package/es/organism/title-and-input/style.css +9 -0
  46. package/es/organism/title-and-input/types.d.ts +127 -0
  47. package/es/organism/title-and-input/types.d.ts.map +1 -0
  48. package/es/organism/title-and-input/types.js +12 -0
  49. package/es/organism/title-and-input/types.js.map +1 -0
  50. package/es/organism/wizard-contents/index.d.ts +568 -1
  51. package/es/template/back-office/brand-update/index.d.ts +567 -1
  52. package/lib/atom/image-upload/style.css +2 -0
  53. package/lib/atom/radio-with-title/index.d.ts +1 -0
  54. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  55. package/lib/atom/radio-with-title/index.js +6 -1
  56. package/lib/atom/radio-with-title/index.js.map +1 -1
  57. package/lib/atom/radio-with-title/types.d.ts +1 -0
  58. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  59. package/lib/atom/title/index.d.ts +1 -0
  60. package/lib/atom/title/index.d.ts.map +1 -1
  61. package/lib/atom/title/index.js +24 -6
  62. package/lib/atom/title/index.js.map +1 -1
  63. package/lib/atom/title/style.css +31 -4
  64. package/lib/molecule/brand-form-group/index.d.ts +567 -1
  65. package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
  66. package/lib/molecule/brand-form-group/index.js +10 -9
  67. package/lib/molecule/brand-form-group/index.js.map +1 -1
  68. package/lib/molecule/brand-form-group/style.css +4 -0
  69. package/lib/molecule/select-multiple/index.js +1 -1
  70. package/lib/molecule/select-multiple/index.js.map +1 -1
  71. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
  72. package/lib/molecule/title-radio-wrapper/index.d.ts +18 -17
  73. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  74. package/lib/molecule/title-radio-wrapper/style.css +1 -1
  75. package/lib/molecule/title-radio-wrapper/types.d.ts +18 -17
  76. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  77. package/lib/organism/brand-form/index.d.ts +567 -1
  78. package/lib/organism/brand-form/index.d.ts.map +1 -1
  79. package/lib/organism/brand-form/index.js +4 -3
  80. package/lib/organism/brand-form/index.js.map +1 -1
  81. package/lib/organism/brand-form/style.css +5 -0
  82. package/lib/organism/rewards-form/index.d.ts +1 -0
  83. package/lib/organism/select-opponents/index.d.ts +70 -0
  84. package/lib/organism/select-opponents/index.d.ts.map +1 -0
  85. package/lib/organism/{select-population → select-opponents}/index.js +15 -5
  86. package/lib/organism/select-opponents/index.js.map +1 -0
  87. package/lib/organism/{select-population → select-opponents}/style.css +1 -0
  88. package/lib/organism/select-opponents/types.d.ts +70 -0
  89. package/lib/organism/select-opponents/types.d.ts.map +1 -0
  90. package/lib/organism/select-opponents/types.js +18 -0
  91. package/lib/organism/select-opponents/types.js.map +1 -0
  92. package/lib/organism/title-and-input/index.d.ts +117 -0
  93. package/lib/organism/title-and-input/index.d.ts.map +1 -0
  94. package/lib/organism/title-and-input/index.js +57 -0
  95. package/lib/organism/title-and-input/index.js.map +1 -0
  96. package/lib/organism/title-and-input/style.css +9 -0
  97. package/lib/organism/title-and-input/types.d.ts +127 -0
  98. package/lib/organism/title-and-input/types.d.ts.map +1 -0
  99. package/lib/organism/title-and-input/types.js +25 -0
  100. package/lib/organism/title-and-input/types.js.map +1 -0
  101. package/lib/organism/wizard-contents/index.d.ts +568 -1
  102. package/lib/template/back-office/brand-update/index.d.ts +567 -1
  103. package/package.json +2 -2
  104. package/es/organism/select-population/index.d.ts +0 -5
  105. package/es/organism/select-population/index.d.ts.map +0 -1
  106. package/es/organism/select-population/index.js +0 -20
  107. package/es/organism/select-population/index.js.map +0 -1
  108. package/es/organism/select-population/types.d.ts +0 -5
  109. package/es/organism/select-population/types.d.ts.map +0 -1
  110. package/es/organism/select-population/types.js +0 -2
  111. package/es/organism/select-population/types.js.map +0 -1
  112. package/lib/organism/select-population/index.d.ts +0 -5
  113. package/lib/organism/select-population/index.d.ts.map +0 -1
  114. package/lib/organism/select-population/index.js.map +0 -1
  115. package/lib/organism/select-population/types.d.ts +0 -5
  116. package/lib/organism/select-population/types.d.ts.map +0 -1
  117. package/lib/organism/select-population/types.js +0 -2
  118. package/lib/organism/select-population/types.js.map +0 -1
@@ -18,9 +18,11 @@
18
18
  display: flex;
19
19
  flex-direction: row;
20
20
  justify-content: center;
21
+ text-align: center;
21
22
  margin-top: 16px;
22
23
  background-color: cm_grey_50;
23
24
  padding: 16px 0 16px 0;
24
25
  border-radius: 10px;
25
26
  font-family: "Gilroy";
27
+ font-size: 14px;
26
28
  }
@@ -8,6 +8,7 @@ declare const RadioWithTitle: {
8
8
  subtitle: import("prop-types").Requireable<string>;
9
9
  type: import("prop-types").Requireable<string>;
10
10
  'data-name': import("prop-types").Requireable<string>;
11
+ titleSize: import("prop-types").Requireable<string>;
11
12
  subtitleSize: import("prop-types").Requireable<string>;
12
13
  }>>>;
13
14
  name: import("prop-types").Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -1,4 +1,7 @@
1
1
  import _uniqueId from "lodash/fp/uniqueId";
2
+
3
+ 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); }
4
+
2
5
  import React, { useCallback } from 'react';
3
6
  import Title from '../title';
4
7
  import style from './style.css';
@@ -32,7 +35,10 @@ const RadioWithTitle = props => {
32
35
  "aria-label": ariaLabel
33
36
  }), /*#__PURE__*/React.createElement("span", {
34
37
  className: style.title
35
- }, /*#__PURE__*/React.createElement(Title, title))));
38
+ }, /*#__PURE__*/React.createElement(Title, _extends({}, title, {
39
+ titleSize: 'small',
40
+ subtitleSize: 'extra-small'
41
+ })))));
36
42
  };
37
43
 
38
44
  RadioWithTitle.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","Title","style","propTypes","RadioWithTitle","props","title","name","checked","onChange","dataName","ariaLabel","idRadio","handleChange","e","target","container","radio"],"sources":["../../../src/atom/radio-with-title/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {uniqueId} from 'lodash/fp';\nimport Title from '../title';\nimport style from './style.css';\nimport {propTypes, RadioWithTitleProps} from './types';\n\nconst RadioWithTitle = (props: RadioWithTitleProps) => {\n const {title, name, checked, onChange, 'data-name': dataName, 'aria-label': ariaLabel} = props;\n const idRadio = uniqueId('input-radio-');\n const handleChange = useCallback(e => onChange(e.target.checked), [onChange]);\n\n return (\n <div className={style.container}>\n <label htmlFor={idRadio}>\n <input\n type=\"radio\"\n id={idRadio}\n name={name}\n onChange={handleChange}\n checked={checked}\n className={style.radio}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n <span className={style.title}>\n <Title {...title} />\n </span>\n </label>\n </div>\n );\n};\n\nRadioWithTitle.propTypes = propTypes;\n\nexport default RadioWithTitle;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AAEA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,SAAQC,SAAR,QAA6C,SAA7C;;AAEA,MAAMC,cAAc,GAAIC,KAAD,IAAgC;EACrD,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,OAAd;IAAuBC,QAAvB;IAAiC,aAAaC,QAA9C;IAAwD,cAAcC;EAAtE,IAAmFN,KAAzF;;EACA,MAAMO,OAAO,GAAG,UAAS,cAAT,CAAhB;;EACA,MAAMC,YAAY,GAAGb,WAAW,CAACc,CAAC,IAAIL,QAAQ,CAACK,CAAC,CAACC,MAAF,CAASP,OAAV,CAAd,EAAkC,CAACC,QAAD,CAAlC,CAAhC;EAEA,oBACE;IAAK,SAAS,EAAEP,KAAK,CAACc;EAAtB,gBACE;IAAO,OAAO,EAAEJ;EAAhB,gBACE;IACE,IAAI,EAAC,OADP;IAEE,EAAE,EAAEA,OAFN;IAGE,IAAI,EAAEL,IAHR;IAIE,QAAQ,EAAEM,YAJZ;IAKE,OAAO,EAAEL,OALX;IAME,SAAS,EAAEN,KAAK,CAACe,KANnB;IAOE,aAAWP,QAPb;IAQE,cAAYC;EARd,EADF,eAWE;IAAM,SAAS,EAAET,KAAK,CAACI;EAAvB,gBACE,oBAAC,KAAD,EAAWA,KAAX,CADF,CAXF,CADF,CADF;AAmBD,CAxBD;;AA0BAF,cAAc,CAACD,SAAf,2CAA2BA,SAA3B;AAEA,eAAeC,cAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","Title","style","propTypes","RadioWithTitle","props","title","name","checked","onChange","dataName","ariaLabel","idRadio","handleChange","e","target","container","radio"],"sources":["../../../src/atom/radio-with-title/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {uniqueId} from 'lodash/fp';\nimport Title from '../title';\nimport style from './style.css';\nimport {propTypes, RadioWithTitleProps} from './types';\n\nconst RadioWithTitle = (props: RadioWithTitleProps) => {\n const {title, name, checked, onChange, 'data-name': dataName, 'aria-label': ariaLabel} = props;\n const idRadio = uniqueId('input-radio-');\n const handleChange = useCallback(e => onChange(e.target.checked), [onChange]);\n\n return (\n <div className={style.container}>\n <label htmlFor={idRadio}>\n <input\n type=\"radio\"\n id={idRadio}\n name={name}\n onChange={handleChange}\n checked={checked}\n className={style.radio}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n <span className={style.title}>\n <Title {...title} titleSize={'small'} subtitleSize={'extra-small'} />\n </span>\n </label>\n </div>\n );\n};\n\nRadioWithTitle.propTypes = propTypes;\n\nexport default RadioWithTitle;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AAEA,OAAOC,KAAP,MAAkB,UAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,SAAQC,SAAR,QAA6C,SAA7C;;AAEA,MAAMC,cAAc,GAAIC,KAAD,IAAgC;EACrD,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,OAAd;IAAuBC,QAAvB;IAAiC,aAAaC,QAA9C;IAAwD,cAAcC;EAAtE,IAAmFN,KAAzF;;EACA,MAAMO,OAAO,GAAG,UAAS,cAAT,CAAhB;;EACA,MAAMC,YAAY,GAAGb,WAAW,CAACc,CAAC,IAAIL,QAAQ,CAACK,CAAC,CAACC,MAAF,CAASP,OAAV,CAAd,EAAkC,CAACC,QAAD,CAAlC,CAAhC;EAEA,oBACE;IAAK,SAAS,EAAEP,KAAK,CAACc;EAAtB,gBACE;IAAO,OAAO,EAAEJ;EAAhB,gBACE;IACE,IAAI,EAAC,OADP;IAEE,EAAE,EAAEA,OAFN;IAGE,IAAI,EAAEL,IAHR;IAIE,QAAQ,EAAEM,YAJZ;IAKE,OAAO,EAAEL,OALX;IAME,SAAS,EAAEN,KAAK,CAACe,KANnB;IAOE,aAAWP,QAPb;IAQE,cAAYC;EARd,EADF,eAWE;IAAM,SAAS,EAAET,KAAK,CAACI;EAAvB,gBACE,oBAAC,KAAD,eAAWA,KAAX;IAAkB,SAAS,EAAE,OAA7B;IAAsC,YAAY,EAAE;EAApD,GADF,CAXF,CADF,CADF;AAmBD,CAxBD;;AA0BAF,cAAc,CAACD,SAAf,2CAA2BA,SAA3B;AAEA,eAAeC,cAAf"}
@@ -5,6 +5,7 @@ export declare const propTypes: {
5
5
  subtitle: PropTypes.Requireable<string>;
6
6
  type: PropTypes.Requireable<string>;
7
7
  'data-name': PropTypes.Requireable<string>;
8
+ titleSize: PropTypes.Requireable<string>;
8
9
  subtitleSize: PropTypes.Requireable<string>;
9
10
  }>>>;
10
11
  name: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -6,6 +6,7 @@ declare namespace Title {
6
6
  subtitle: PropTypes.Requireable<string>;
7
7
  type: PropTypes.Requireable<string>;
8
8
  'data-name': PropTypes.Requireable<string>;
9
+ titleSize: PropTypes.Requireable<string>;
9
10
  subtitleSize: PropTypes.Requireable<string>;
10
11
  };
11
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AA2BA,gDAeC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AAsCA,gDAsBC"}
@@ -2,17 +2,27 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import style from './style.css';
4
4
 
5
- const getTitleStype = type => {
5
+ const getTitleStyle = (type, size) => {
6
6
  switch (type) {
7
7
  case 'page':
8
8
  return style.titlePage;
9
9
 
10
10
  case 'form-group':
11
- return style.titleFormGroup;
11
+ switch (size) {
12
+ case 'standard':
13
+ return style.titleFormGroup;
14
+
15
+ case 'medium':
16
+ return style.mediumTitleFormGroup;
17
+
18
+ case 'small':
19
+ return style.smallTitleFormGroup;
20
+ }
21
+
12
22
  }
13
23
  };
14
24
 
15
- const getSubtitleStype = (type, size) => {
25
+ const getSubtitleStyle = (type, size) => {
16
26
  switch (type) {
17
27
  case 'page':
18
28
  return style.subtitlePage;
@@ -24,6 +34,12 @@ const getSubtitleStype = (type, size) => {
24
34
 
25
35
  case 'small':
26
36
  return style.smallSubtitleFormGroup;
37
+
38
+ case 'small-without-margin':
39
+ return style.smallSubtitleFormGroupWithoutMargin;
40
+
41
+ case 'extra-small':
42
+ return style.extraSmallSubtitleFormGroup;
27
43
  }
28
44
 
29
45
  }
@@ -35,10 +51,11 @@ const Title = props => {
35
51
  subtitle,
36
52
  type,
37
53
  'data-name': dataName,
54
+ titleSize = 'standard',
38
55
  subtitleSize = 'standard'
39
56
  } = props;
40
- const titleStyle = getTitleStype(type);
41
- const subtitleStyle = getSubtitleStype(type, subtitleSize);
57
+ const titleStyle = getTitleStyle(type, titleSize);
58
+ const subtitleStyle = getSubtitleStyle(type, subtitleSize);
42
59
  const subtitleSection = subtitle ? /*#__PURE__*/React.createElement("div", {
43
60
  className: subtitleStyle
44
61
  }, subtitle) : null;
@@ -53,7 +70,8 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
53
70
  subtitle: PropTypes.string,
54
71
  type: PropTypes.oneOf(['page', 'form-group']),
55
72
  'data-name': PropTypes.string,
56
- subtitleSize: PropTypes.string
73
+ titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),
74
+ subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
57
75
  } : {};
58
76
  export default Title;
59
77
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","style","getTitleStyle","type","size","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","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 getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (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 case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard'\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(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 titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),\n subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])\n};\nexport default Title;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,IAAD,EAAOC,IAAP,KAAgB;EACpC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACI,SAAb;;IACF,KAAK,YAAL;MACE,QAAQD,IAAR;QACE,KAAK,UAAL;UACE,OAAOH,KAAK,CAACK,cAAb;;QACF,KAAK,QAAL;UACE,OAAOL,KAAK,CAACM,oBAAb;;QACF,KAAK,OAAL;UACE,OAAON,KAAK,CAACO,mBAAb;MANJ;;EAJJ;AAaD,CAdD;;AAgBA,MAAMC,gBAAgB,GAAG,CAACN,IAAD,EAAOC,IAAP,KAAgB;EACvC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACS,YAAb;;IACF,KAAK,YAAL;MACE,QAAQN,IAAR;QACE,KAAK,UAAL;UACE,OAAOH,KAAK,CAACU,iBAAb;;QACF,KAAK,OAAL;UACE,OAAOV,KAAK,CAACW,sBAAb;;QACF,KAAK,sBAAL;UACE,OAAOX,KAAK,CAACY,mCAAb;;QACF,KAAK,aAAL;UACE,OAAOZ,KAAK,CAACa,2BAAb;MARJ;;EAJJ;AAeD,CAhBD;;AAkBA,MAAMC,KAAK,GAAGC,KAAK,IAAI;EACrB,MAAM;IACJC,KADI;IAEJC,QAFI;IAGJf,IAHI;IAIJ,aAAagB,QAJT;IAKJC,SAAS,GAAG,UALR;IAMJC,YAAY,GAAG;EANX,IAOFL,KAPJ;EAQA,MAAMM,UAAU,GAAGpB,aAAa,CAACC,IAAD,EAAOiB,SAAP,CAAhC;EACA,MAAMG,aAAa,GAAGd,gBAAgB,CAACN,IAAD,EAAOkB,YAAP,CAAtC;EAEA,MAAMG,eAAe,GAAGN,QAAQ,gBAAG;IAAK,SAAS,EAAEK;EAAhB,GAAgCL,QAAhC,CAAH,GAAqD,IAArF;EAEA,oBACE,8CACE;IAAK,SAAS,EAAEI,UAAhB;IAA4B,aAAWH;EAAvC,GACGF,KADH,CADF,EAIGO,eAJH,CADF;AAQD,CAtBD;;AAwBAT,KAAK,CAACU,SAAN,2CAAkB;EAChBR,KAAK,EAAEjB,SAAS,CAAC0B,MADD;EAEhBR,QAAQ,EAAElB,SAAS,CAAC0B,MAFJ;EAGhBvB,IAAI,EAAEH,SAAS,CAAC2B,KAAV,CAAgB,CAAC,MAAD,EAAS,YAAT,CAAhB,CAHU;EAIhB,aAAa3B,SAAS,CAAC0B,MAJP;EAKhBN,SAAS,EAAEpB,SAAS,CAAC2B,KAAV,CAAgB,CAAC,UAAD,EAAa,QAAb,EAAuB,OAAvB,CAAhB,CALK;EAMhBN,YAAY,EAAErB,SAAS,CAAC2B,KAAV,CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,sBAAtB,EAA8C,aAA9C,CAAhB;AANE,CAAlB;AAQA,eAAeZ,KAAf"}
@@ -20,14 +20,28 @@
20
20
  font-size: 18px;
21
21
  }
22
22
 
23
+ .mediumTitleFormGroup {
24
+ composes: title;
25
+ font-size: 16px;
26
+ }
27
+
28
+ .smallTitleFormGroup {
29
+ composes: title;
30
+ font-size: 14px;
31
+ }
32
+
23
33
  .subtitle {
24
- margin: 8px 0 0;
25
34
  font-family: Gilroy;
26
35
  font-style: normal;
27
36
  }
28
37
 
38
+ .subtitleWithMargin {
39
+ composes: subtitle;
40
+ margin: 8px 0 0;
41
+ }
42
+
29
43
  .subtitlePage {
30
- composes: subtitle;
44
+ composes: subtitleWithMargin;
31
45
  font-weight: normal;
32
46
  font-size: 18px;
33
47
  line-height: 24px;
@@ -35,15 +49,28 @@
35
49
  }
36
50
 
37
51
  .subtitleFormGroup {
38
- composes: subtitle;
52
+ composes: subtitleWithMargin;
39
53
  font-size: 14px;
40
54
  font-weight: 400;
41
55
  line-height: 20px;
42
56
  color: cm_grey_400;
43
57
  }
44
58
 
45
-
46
59
  .smallSubtitleFormGroup{
47
60
  composes: subtitleFormGroup;
48
61
  max-width: 450px
49
62
  }
63
+
64
+ .smallSubtitleFormGroupWithoutMargin{
65
+ composes: smallSubtitleFormGroup;
66
+ margin: 0;
67
+ }
68
+
69
+ .extraSmallSubtitleFormGroup{
70
+ composes: subtitle;
71
+ font-size: 12px;
72
+ color: cm_grey_400;
73
+ line-height: 16px;
74
+ font-weight: normal;
75
+ }
76
+