@coorpacademy/components 11.29.0 → 11.32.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 (111) hide show
  1. package/es/atom/button-link/index.d.ts.map +1 -1
  2. package/es/atom/button-link/index.js +17 -9
  3. package/es/atom/button-link/index.js.map +1 -1
  4. package/es/atom/button-link/types.d.ts +8 -1
  5. package/es/atom/button-link/types.d.ts.map +1 -1
  6. package/es/atom/button-link/types.js.map +1 -1
  7. package/es/atom/chip/index.d.ts +37 -0
  8. package/es/atom/chip/index.d.ts.map +1 -0
  9. package/es/atom/chip/index.js +85 -0
  10. package/es/atom/chip/index.js.map +1 -0
  11. package/es/atom/chip/style.css +65 -0
  12. package/es/atom/chips/index.d.ts.map +1 -1
  13. package/es/atom/chips/index.js +1 -0
  14. package/es/atom/chips/index.js.map +1 -1
  15. package/es/atom/icon/index.js +2 -2
  16. package/es/atom/icon/index.js.map +1 -1
  17. package/es/molecule/bulk-progress-bar/index.d.ts.map +1 -1
  18. package/es/molecule/bulk-progress-bar/index.js +6 -3
  19. package/es/molecule/bulk-progress-bar/index.js.map +1 -1
  20. package/es/molecule/learner-skill-card/index.d.ts +21 -0
  21. package/es/molecule/learner-skill-card/index.d.ts.map +1 -0
  22. package/es/molecule/learner-skill-card/index.js +159 -0
  23. package/es/molecule/learner-skill-card/index.js.map +1 -0
  24. package/es/molecule/learner-skill-card/style.css +119 -0
  25. package/es/molecule/learning-profile-radar-chart/index.js +5 -1
  26. package/es/molecule/learning-profile-radar-chart/index.js.map +1 -1
  27. package/es/molecule/learning-profile-radar-chart/style.css +13 -0
  28. package/es/molecule/questions/template/index.d.ts +1 -1
  29. package/es/molecule/quick-access-card/index.d.ts.map +1 -1
  30. package/es/molecule/quick-access-card/index.js +5 -1
  31. package/es/molecule/quick-access-card/index.js.map +1 -1
  32. package/es/template/mobile-login/welcome/index.native.d.ts.map +1 -1
  33. package/es/template/mobile-login/welcome/index.native.js +5 -1
  34. package/es/template/mobile-login/welcome/index.native.js.map +1 -1
  35. package/es/variables/colors.d.ts +7 -7
  36. package/es/variables/colors.d.ts.map +1 -1
  37. package/es/variables/colors.js +2 -1
  38. package/es/variables/colors.js.map +1 -1
  39. package/es/variables/theme.native.d.ts.map +1 -1
  40. package/es/variables/theme.native.js +4 -1
  41. package/es/variables/theme.native.js.map +1 -1
  42. package/lib/atom/button-link/index.d.ts.map +1 -1
  43. package/lib/atom/button-link/index.js +18 -9
  44. package/lib/atom/button-link/index.js.map +1 -1
  45. package/lib/atom/button-link/types.d.ts +8 -1
  46. package/lib/atom/button-link/types.d.ts.map +1 -1
  47. package/lib/atom/button-link/types.js.map +1 -1
  48. package/lib/atom/chip/index.d.ts +37 -0
  49. package/lib/atom/chip/index.d.ts.map +1 -0
  50. package/lib/atom/chip/index.js +109 -0
  51. package/lib/atom/chip/index.js.map +1 -0
  52. package/lib/atom/chip/style.css +65 -0
  53. package/lib/atom/chips/index.d.ts.map +1 -1
  54. package/lib/atom/chips/index.js +1 -0
  55. package/lib/atom/chips/index.js.map +1 -1
  56. package/lib/atom/icon/index.js +2 -2
  57. package/lib/atom/icon/index.js.map +1 -1
  58. package/lib/molecule/bulk-progress-bar/index.d.ts.map +1 -1
  59. package/lib/molecule/bulk-progress-bar/index.js +7 -3
  60. package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
  61. package/lib/molecule/learner-skill-card/index.d.ts +21 -0
  62. package/lib/molecule/learner-skill-card/index.d.ts.map +1 -0
  63. package/lib/molecule/learner-skill-card/index.js +177 -0
  64. package/lib/molecule/learner-skill-card/index.js.map +1 -0
  65. package/lib/molecule/learner-skill-card/style.css +119 -0
  66. package/lib/molecule/learning-profile-radar-chart/index.js +5 -1
  67. package/lib/molecule/learning-profile-radar-chart/index.js.map +1 -1
  68. package/lib/molecule/learning-profile-radar-chart/style.css +13 -0
  69. package/lib/molecule/questions/template/index.d.ts +1 -1
  70. package/lib/molecule/quick-access-card/index.d.ts.map +1 -1
  71. package/lib/molecule/quick-access-card/index.js +7 -1
  72. package/lib/molecule/quick-access-card/index.js.map +1 -1
  73. package/lib/template/mobile-login/welcome/index.native.d.ts.map +1 -1
  74. package/lib/template/mobile-login/welcome/index.native.js +7 -1
  75. package/lib/template/mobile-login/welcome/index.native.js.map +1 -1
  76. package/lib/variables/colors.d.ts +7 -7
  77. package/lib/variables/colors.d.ts.map +1 -1
  78. package/lib/variables/colors.js +2 -1
  79. package/lib/variables/colors.js.map +1 -1
  80. package/lib/variables/theme.native.d.ts.map +1 -1
  81. package/lib/variables/theme.native.js +4 -1
  82. package/lib/variables/theme.native.js.map +1 -1
  83. package/locales/bs/global.json +7 -1
  84. package/locales/cs/global.json +7 -1
  85. package/locales/de/global.json +7 -1
  86. package/locales/en/global.json +6 -0
  87. package/locales/es/global.json +6 -0
  88. package/locales/et/global.json +7 -1
  89. package/locales/fi/global.json +7 -1
  90. package/locales/fr/global.json +6 -0
  91. package/locales/hr/global.json +7 -1
  92. package/locales/hu/global.json +7 -1
  93. package/locales/hy/global.json +7 -1
  94. package/locales/it/global.json +6 -0
  95. package/locales/ja/global.json +7 -1
  96. package/locales/ko/global.json +7 -1
  97. package/locales/nl/global.json +6 -0
  98. package/locales/pl/global.json +7 -1
  99. package/locales/pt/global.json +7 -1
  100. package/locales/ro/global.json +7 -1
  101. package/locales/ru/global.json +7 -1
  102. package/locales/sk/global.json +7 -1
  103. package/locales/sl/global.json +109 -0
  104. package/locales/sv/global.json +7 -1
  105. package/locales/tl/global.json +7 -1
  106. package/locales/tr/global.json +7 -1
  107. package/locales/uk/global.json +7 -1
  108. package/locales/vi/global.json +7 -1
  109. package/locales/zh/global.json +7 -1
  110. package/locales/zh_TW/global.json +7 -1
  111. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAwB7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;CAqEzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAwC7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;CAqEzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -5,6 +5,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
5
5
  import React, { useCallback } from 'react';
6
6
  import classnames from 'classnames';
7
7
  import Link from '../link';
8
+ import FaIcon from '../icon';
8
9
  import { ICONS } from '../../util/button-icons';
9
10
  import propTypes from './types';
10
11
  import style from './style.css';
@@ -12,6 +13,7 @@ import style from './style.css';
12
13
  const getButtonContent = (icon, label) => {
13
14
  const {
14
15
  type,
16
+ faIcon,
15
17
  position
16
18
  } = icon || {
17
19
  type: '',
@@ -19,7 +21,7 @@ const getButtonContent = (icon, label) => {
19
21
  };
20
22
  const Icon = type && ICONS[type];
21
23
 
22
- if (!Icon) {
24
+ if (!Icon && !faIcon) {
23
25
  return /*#__PURE__*/React.createElement("div", {
24
26
  className: style.buttonContent
25
27
  }, /*#__PURE__*/React.createElement("span", {
@@ -27,17 +29,23 @@ const getButtonContent = (icon, label) => {
27
29
  }, label));
28
30
  }
29
31
 
30
- return /*#__PURE__*/React.createElement("div", {
31
- className: style.buttonContent
32
- }, position === 'left' ? /*#__PURE__*/React.createElement(Icon, {
32
+ const iconComponent = faIcon ? /*#__PURE__*/React.createElement(FaIcon, {
33
+ iconName: faIcon.name,
34
+ iconColor: faIcon.color,
35
+ backgroundColor: faIcon.backgroundColor,
36
+ size: {
37
+ faSize: faIcon.size,
38
+ wrapperSize: faIcon.size
39
+ }
40
+ }) : /*#__PURE__*/React.createElement(Icon, {
33
41
  className: style.icon,
34
42
  theme: "coorpmanager"
35
- }) : null, label ? /*#__PURE__*/React.createElement("span", {
43
+ });
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ className: style.buttonContent
46
+ }, position === 'left' ? iconComponent : null, label ? /*#__PURE__*/React.createElement("span", {
36
47
  className: style.label
37
- }, label) : null, position === 'right' ? /*#__PURE__*/React.createElement(Icon, {
38
- className: style.icon,
39
- theme: "coorpmanager"
40
- }) : null);
48
+ }, label) : null, position === 'right' ? iconComponent : null);
41
49
  };
42
50
 
43
51
  const ButtonLink = props => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","classnames","Link","ICONS","propTypes","style","getButtonContent","icon","label","type","position","Icon","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","handleOnKeyDown","event","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} theme=\"coorpmanager\" /> : null}\n {label ? <span className={style.label}>{label}</span> : null}\n {position === 'right' ? <Icon className={style.icon} theme=\"coorpmanager\" /> : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,SAAP,MAAmD,SAAnD;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,KAAlB,KAAqC;EAC5D,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWC,QAAQ,EAAE;EAArB,CAAjC;EACA,MAAMC,IAAI,GAAGF,IAAI,IAAIN,KAAK,CAACM,IAAD,CAA1B;;EAEA,IAAI,CAACE,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEN,KAAK,CAACO;IAAtB,gBACE;MAAM,SAAS,E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Id,KAAK,CAACc,IARc,EAS5BJ,QAAQ,IAAIV,KAAK,CAACU,QATU,CAA9B;EAYA,MAAMkB,aAAa,GAAGjC,WAAW,CAAC,MAAMoB,OAAO,EAAd,EAAkB,CAACA,OAAD,CAAlB,CAAjC;EAEA,MAAMc,eAAe,GAAGlC,WAAW,CAACmC,KAAK,IAAId,SAAS,CAACc,KAAD,CAAnB,EAA4B,CAACd,SAAD,CAA5B,CAAnC;;EAEA,IAAIF,IAAJ,EAAU;IACR,oBACE,oBAAC,IAAD,eACMA,IADN,EAEOK,QAAQ,IAAI;MACfY,KAAK,EAAElB,SAAS,IAAIV;IADL,CAFnB;MAKE,KAAK,EAAEe,WALT;MAME,SAAS,EAAEG,WANb;MAOE,aAAWV,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIV;IAT3B,IAWGiB,WAXH,CADF;EAeD;;EAED,oBACE,2CACOD,QAAQ,IAAI;IACfY,KAAK,EAAElB,SAAS,IAAIV;EADL,CADnB;IAIE,IAAI,EAAC,QAJP;IAKE,cAAYU,SAAS,IAAIV,KAL3B;IAME,aAAWQ,QANb;IAOE,eAAaC,UAPf;IAQE,KAAK,EAAEM,WART;IASE,SAAS,EAAEG,WATb;IAUE,OAAO,EAAEO,aAVX;IAWE,SAAS,EAAEC,eAXb;IAYE,QAAQ,EAAE;EAZZ,IAcGT,WAdH,CADF;AAkBD,CArED;;AAuEAZ,UAAU,CAACT,SAAX,2CAAuBA,SAAvB;AAEA,eAAeS,UAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","classnames","Link","FaIcon","ICONS","propTypes","style","getButtonContent","icon","label","type","faIcon","position","Icon","buttonContent","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","handleOnKeyDown","event","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (icon?: IconType, label?: string) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: faIcon.color,\n backgroundColor: faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n }\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {label ? <span className={style.label}>{label}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n disabled,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,MAAP,MAAmB,SAAnB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,SAAP,MAAmD,SAAnD;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,IAAD,EAAkBC,KAAlB,KAAqC;EAC5D,MAAM;IAACC,IAAD;IAAOC,MAAP;IAAeC;EAAf,IAA2BJ,IAAI,IAAI;IAACE,IAAI,EAAE,EAAP;IAAWE,QAAQ,EAAE;EAArB,CAAzC;EACA,MAAMC,IAAI,GAAGH,IAAI,IAAIN,KAAK,CAACM,IAAD,CAA1B;;EAEA,IAAI,CAACG,IAAD,IAAS,CAACF,MAAd,EAAsB;IACpB,oBACE;MAAK,SAAS,EAAEL,KAAK,CAACQ;IAAtB,gBACE;MAAM,SAAS,EAAER,KAAK,CAACG;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,MAAMM,aAAa,GAAGJ,MAAM,gBAC1B,oBAAC,MAAD;IAEIK,QAAQ,EAAEL,MAAM,CAACM,IAFrB;IAGIC,SAAS,EAAEP,MAAM,CAACQ,KAHtB;IAIIC,eAAe,EAAET,MAAM,CAACS,eAJ5B;IAKIC,IAAI,EAAE;MACJC,MAAM,EAAEX,MAAM,CAACU,IADX;MAEJE,WAAW,EAAEZ,MAAM,CAACU;IAFhB;EALV,EAD0B,g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+B,OAAO,EAAd,EAAkB,CAACA,OAAD,CAAlB,CAAjC;EAEA,MAAMc,eAAe,GAAG7C,WAAW,CAAC8C,KAAK,IAAId,SAAS,CAACc,KAAD,CAAnB,EAA4B,CAACd,SAAD,CAA5B,CAAnC;;EAEA,IAAIF,IAAJ,EAAU;IACR,oBACE,oBAAC,IAAD,eACMA,IADN,EAEOK,QAAQ,IAAI;MACfY,KAAK,EAAElB,SAAS,IAAIpB;IADL,CAFnB;MAKE,KAAK,EAAEyB,WALT;MAME,SAAS,EAAEG,WANb;MAOE,aAAWV,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIpB;IAT3B,IAWG2B,WAXH,CADF;EAeD;;EAED,oBACE,2CACOD,QAAQ,IAAI;IACfY,KAAK,EAAElB,SAAS,IAAIpB;EADL,CADnB;IAIE,IAAI,EAAC,QAJP;IAKE,cAAYoB,SAAS,IAAIpB,KAL3B;IAME,aAAWkB,QANb;IAOE,eAAaC,UAPf;IAQE,KAAK,EAAEM,WART;IASE,SAAS,EAAEG,WATb;IAUE,OAAO,EAAEO,aAVX;IAWE,SAAS,EAAEC,eAXb;IAYE,QAAQ,EAAE;EAZZ,IAcGT,WAdH,CADF;AAkBD,CArED;;AAuEAZ,UAAU,CAACnB,SAAX,2CAAuBA,SAAvB;AAEA,eAAemB,UAAf"}
@@ -20,9 +20,16 @@ declare const propTypes: {
20
20
  className: PropTypes.Requireable<string>;
21
21
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
22
22
  };
23
+ export declare type FaIcontype = {
24
+ name: string;
25
+ color?: string;
26
+ backgroundColor?: string;
27
+ size?: number;
28
+ };
23
29
  export declare type IconType = {
24
30
  position: 'right' | 'left';
25
- type: keyof typeof ICONS;
31
+ type?: keyof typeof ICONS;
32
+ faIcon?: FaIcontype;
26
33
  };
27
34
  export declare type ButtonLinkProps = {
28
35
  type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAmBd,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,OAAO,KAAK,CAAC;CAC1B,CAAC;AACF,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button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AAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","icon","shape","position","onClick","func","link","href","download","bool","target","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type: keyof typeof ICONS;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACM,MAFD;EAGhB,cAAcN,SAAS,CAACM,MAHR;EAIhB,aAAaN,SAAS,CAACM,MAJP;EAKhB,eAAeN,SAAS,CAACM,MALT;EAMhBC,IAAI,EAAEP,SAAS,CAACQ,KAAV,CAAgB;IACpBC,QAAQ,EAAET,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CANU;EAUhBS,OAAO,EAAEV,SAAS,CAACW,IAVH;EAWhBC,IAAI,EAAEZ,SAAS,CAACQ,KAAV,CAAgB;IACpBK,IAAI,EAAEb,SAAS,CAACM,MADI;IAEpBQ,QAAQ,EAAEd,SAAS,CAACe,IAFA;IAGpBC,MAAM,EAAEhB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAXU;EAgBhBa,QAAQ,EAAEjB,SAAS,CAACe,IAhBJ;EAiBhBG,SAAS,EAAElB,SAAS,CAACM,MAjBL;EAkBhBa,WAAW,EAAEnB,SAAS,CAACQ,KAAV,CAAgB,EAAhB;AAlBG,CAAlB;AA+CA,eAAeN,SAAf"}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","icon","shape","position","onClick","func","link","href","download","bool","target","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACM,MAFD;EAGhB,cAAcN,SAAS,CAACM,MAHR;EAIhB,aAAaN,SAAS,CAACM,MAJP;EAKhB,eAAeN,SAAS,CAACM,MALT;EAMhBC,IAAI,EAAEP,SAAS,CAACQ,KAAV,CAAgB;IACpBC,QAAQ,EAAET,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CANU;EAUhBS,OAAO,EAAEV,SAAS,CAACW,IAVH;EAWhBC,IAAI,EAAEZ,SAAS,CAACQ,KAAV,CAAgB;IACpBK,IAAI,EAAEb,SAAS,CAACM,MADI;IAEpBQ,QAAQ,EAAEd,SAAS,CAACe,IAFA;IAGpBC,MAAM,EAAEhB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAXU;EAgBhBa,QAAQ,EAAEjB,SAAS,CAACe,IAhBJ;EAiBhBG,SAAS,EAAElB,SAAS,CAACM,MAjBL;EAkBhBa,WAAW,EAAEnB,SAAS,CAACQ,KAAV,CAAgB,EAAhB;AAlBG,CAAlB;AAuDA,eAAeN,SAAf"}
@@ -0,0 +1,37 @@
1
+ export function calculateHoveredSelectedBgColor(selectedBgColor: any, luminosityDelta?: number): string;
2
+ export default Chip;
3
+ declare function Chip(props: any, context: any): JSX.Element;
4
+ declare namespace Chip {
5
+ namespace contextTypes {
6
+ const skin: PropTypes.Requireable<PropTypes.InferProps<{
7
+ common: PropTypes.Requireable<{
8
+ [x: string]: any;
9
+ }>;
10
+ images: PropTypes.Requireable<PropTypes.InferProps<{
11
+ 'logo-mobile': PropTypes.Requireable<any>;
12
+ logo: PropTypes.Requireable<any>;
13
+ 'logo-email': PropTypes.Requireable<any>;
14
+ login: PropTypes.Requireable<any>;
15
+ }>>;
16
+ icons: PropTypes.Requireable<{
17
+ [x: string]: any;
18
+ }>;
19
+ mod: PropTypes.Requireable<{
20
+ [x: string]: any;
21
+ }>;
22
+ courses: PropTypes.Requireable<any[]>;
23
+ texts: PropTypes.Requireable<{
24
+ [x: string]: any;
25
+ }>;
26
+ }>>;
27
+ }
28
+ namespace propTypes {
29
+ const text: PropTypes.Requireable<string>;
30
+ const selected: PropTypes.Requireable<boolean>;
31
+ const customIcon: PropTypes.Requireable<string>;
32
+ const backgroundColor: PropTypes.Requireable<string>;
33
+ const onClick: PropTypes.Requireable<(...args: any[]) => any>;
34
+ }
35
+ }
36
+ import PropTypes from "prop-types";
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"AAeO,wGAQN;;AAED,6DAsDC"}
@@ -0,0 +1,85 @@
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, { useMemo, useState, useCallback } from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import classnames from 'classnames';
6
+ import get from 'lodash/fp/get';
7
+ import Color from 'colorjs.io';
8
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
+ import Provider from '../provider';
10
+ import { COLORS } from '../../variables/colors';
11
+ import style from './style.css';
12
+ const LUMINOSITY_DELTA = 0.08;
13
+ const {
14
+ cm_primary_blue: DEFAULT_BACKGROUND_COLOR
15
+ } = COLORS;
16
+ const ICON_SIZE = '12px';
17
+ export const calculateHoveredSelectedBgColor = (selectedBgColor, luminosityDelta = LUMINOSITY_DELTA) => {
18
+ return new Color(selectedBgColor).to('hsl').set({
19
+ l: l => l * (1 - luminosityDelta)
20
+ }).toString();
21
+ };
22
+
23
+ const Chip = (props, context) => {
24
+ const {
25
+ text,
26
+ selected = false,
27
+ customIcon,
28
+ onClick,
29
+ backgroundColor = DEFAULT_BACKGROUND_COLOR
30
+ } = props;
31
+ const {
32
+ skin
33
+ } = context;
34
+ const skinColor = get('common.primary', skin);
35
+ const selectedBgColor = backgroundColor === 'skin' && skinColor ? skinColor : backgroundColor;
36
+ const hoveredSelectedBgColor = calculateHoveredSelectedBgColor(selectedBgColor);
37
+ const [isHovered, setIsHovered] = useState(false);
38
+ const handleClick = useMemo(() => onClick, [onClick]);
39
+ const handleMouseEnter = useCallback(() => {
40
+ setIsHovered(true);
41
+ }, []);
42
+ const handleMouseLeave = useCallback(() => {
43
+ setIsHovered(false);
44
+ }, []);
45
+ const hoverStyle = isHovered ? {
46
+ backgroundColor: hoveredSelectedBgColor
47
+ } : {};
48
+ const defaultIcon = selected ? 'fa-check' : 'fa-plus';
49
+ return /*#__PURE__*/React.createElement("div", {
50
+ className: classnames(style.container, !selected && style.unselected),
51
+ style: _extends({}, selected && selectedBgColor ? {
52
+ backgroundColor: selectedBgColor
53
+ } : {}, selected && hoverStyle),
54
+ onClick: handleClick,
55
+ onMouseEnter: handleMouseEnter,
56
+ onMouseLeave: handleMouseLeave,
57
+ "aria-label": text,
58
+ "data-name": text
59
+ }, /*#__PURE__*/React.createElement("div", {
60
+ className: style.textZone,
61
+ title: text
62
+ }, /*#__PURE__*/React.createElement("span", {
63
+ className: style.text,
64
+ style: selected ? {
65
+ color: 'white'
66
+ } : {}
67
+ }, text)), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
68
+ className: selected ? style.selectedIconWrapper : style.unselectedIconWrapper,
69
+ icon: customIcon ? `fa-${customIcon}` : defaultIcon,
70
+ fontSize: ICON_SIZE
71
+ }));
72
+ };
73
+
74
+ Chip.contextTypes = {
75
+ skin: Provider.childContextTypes.skin
76
+ };
77
+ Chip.propTypes = process.env.NODE_ENV !== "production" ? {
78
+ text: PropTypes.string,
79
+ selected: PropTypes.bool,
80
+ customIcon: PropTypes.string,
81
+ backgroundColor: PropTypes.string,
82
+ onClick: PropTypes.func
83
+ } : {};
84
+ export default Chip;
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","PropTypes","classnames","get","Color","FontAwesomeIcon","Provider","COLORS","style","LUMINOSITY_DELTA","cm_primary_blue","DEFAULT_BACKGROUND_COLOR","ICON_SIZE","calculateHoveredSelectedBgColor","selectedBgColor","luminosityDelta","to","set","l","toString","Chip","props","context","text","selected","customIcon","onClick","backgroundColor","skin","skinColor","hoveredSelectedBgColor","isHovered","setIsHovered","handleClick","handleMouseEnter","handleMouseLeave","hoverStyle","defaultIcon","container","unselected","textZone","color","selectedIconWrapper","unselectedIconWrapper","contextTypes","childContextTypes","propTypes","string","bool","func"],"sources":["../../../src/atom/chip/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport get from 'lodash/fp/get';\nimport Color from 'colorjs.io';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport Provider from '../provider';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst LUMINOSITY_DELTA = 0.08;\nconst {cm_primary_blue: DEFAULT_BACKGROUND_COLOR} = COLORS;\nconst ICON_SIZE = '12px';\n\nexport const calculateHoveredSelectedBgColor = (\n selectedBgColor,\n luminosityDelta = LUMINOSITY_DELTA\n) => {\n return new Color(selectedBgColor)\n .to('hsl')\n .set({l: l => l * (1 - luminosityDelta)})\n .toString();\n};\n\nconst Chip = (props, context) => {\n const {\n text,\n selected = false,\n customIcon,\n onClick,\n backgroundColor = DEFAULT_BACKGROUND_COLOR\n } = props;\n const {skin} = context;\n const skinColor = get('common.primary', skin);\n const selectedBgColor = backgroundColor === 'skin' && skinColor ? skinColor : backgroundColor;\n const hoveredSelectedBgColor = calculateHoveredSelectedBgColor(selectedBgColor);\n\n const [isHovered, setIsHovered] = useState(false);\n\n const handleClick = useMemo(() => onClick, [onClick]);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const hoverStyle = isHovered ? {backgroundColor: hoveredSelectedBgColor} : {};\n\n const defaultIcon = selected ? 'fa-check' : 'fa-plus';\n\n return (\n <div\n className={classnames(style.container, !selected && style.unselected)}\n style={{\n ...(selected && selectedBgColor ? {backgroundColor: selectedBgColor} : {}),\n ...(selected && hoverStyle)\n }}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n aria-label={text}\n data-name={text}\n >\n <div className={style.textZone} title={text}>\n <span className={style.text} style={selected ? {color: 'white'} : {}}>\n {text}\n </span>\n </div>\n <FontAwesomeIcon\n className={selected ? style.selectedIconWrapper : style.unselectedIconWrapper}\n icon={customIcon ? `fa-${customIcon}` : defaultIcon}\n fontSize={ICON_SIZE}\n />\n </div>\n );\n};\n\nChip.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nChip.propTypes = {\n text: PropTypes.string,\n selected: PropTypes.bool,\n customIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default Chip;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,QAAxB,EAAkCC,WAAlC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,YAAlB;AACA,SAAQC,eAAR,QAA8B,gCAA9B;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,gBAAgB,GAAG,IAAzB;AACA,MAAM;EAACC,eAAe,EAAEC;AAAlB,IAA8CJ,MAApD;AACA,MAAMK,SAAS,GAAG,MAAlB;AAEA,OAAO,MAAMC,+BAA+B,GAAG,CAC7CC,eAD6C,EAE7CC,eAAe,GAAGN,gBAF2B,KAG1C;EACH,OAAO,IAAIL,KAAJ,CAAUU,eAAV,EACJE,EADI,CACD,KADC,EAEJC,GAFI,CAEA;IAACC,CAAC,EAAEA,CAAC,IAAIA,CAAC,IAAI,IAAIH,eAAR;EAAV,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,UAFb,CAFP;IAME,OAAO,EAAEH,WANX;IAOE,YAAY,EAAEC,gBAPhB;IAQE,YAAY,EAAEC,gBARhB;IASE,cAAYZ,IATd;IAUE,aAAWA;EAVb,gBAYE;IAAK,SAAS,EAAEf,KAAK,CAACgC,QAAtB;IAAgC,KAAK,EAAEjB;EAAvC,gBACE;IAAM,SAAS,EAAEf,KAAK,CAACe,IAAvB;IAA6B,KAAK,EAAEC,QAAQ,GAAG;MAACiB,KAAK,EAAE;IAAR,CAAH,GAAsB;EAAlE,GACGlB,IADH,CADF,CAZF,eAiBE,oBAAC,eAAD;IACE,SAAS,EAAEC,QAAQ,GAAGhB,KAAK,CAACkC,mBAAT,GAA+BlC,KAAK,CAACmC,qBAD1D;IAEE,IAAI,EAAElB,UAAU,GAAI,MAAKA,UAAW,EAApB,GAAwBY,WAF1C;IAGE,QAAQ,EAAEzB;EAHZ,EAjBF,CADF;AAyBD,CAtDD;;AAwDAQ,IAAI,CAACwB,YAAL,GAAoB;EAClBhB,IAAI,EAAEtB,QAAQ,CAACuC,iBAAT,CAA2BjB;AADf,CAApB;AAIAR,IAAI,CAAC0B,SAAL,2CAAiB;EACfvB,IAAI,EAAEtB,SAAS,CAAC8C,MADD;EAEfvB,QAAQ,EAAEvB,SAAS,CAAC+C,IAFL;EAGfvB,UAAU,EAAExB,SAAS,CAAC8C,MAHP;EAIfpB,eAAe,EAAE1B,SAAS,CAAC8C,MAJZ;EAKfrB,OAAO,EAAEzB,SAAS,CAACgD;AALJ,CAAjB;AAQA,eAAe7B,IAAf"}
@@ -0,0 +1,65 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_grey_100 from colors;
3
+ @value cm_grey_200 from colors;
4
+ @value cm_grey_400 from colors;
5
+ @value cm_grey_700 from colors;
6
+ @value cm_positive_100 from colors;
7
+ @value white from colors;
8
+
9
+ .container {
10
+ width: 100%;
11
+ height: 52px;
12
+ border-radius: 10px;
13
+ padding: 10px 16px;
14
+ position: relative;
15
+ display: flex;
16
+ align-items: center;
17
+ box-sizing: border-box;
18
+ cursor: pointer;
19
+ }
20
+
21
+ .unselected {
22
+ background-color: cm_grey_100;
23
+ color: cm_grey_400;
24
+ }
25
+
26
+ .unselected:hover {
27
+ background-color: cm_grey_200;
28
+ color: cm_grey_700;
29
+ }
30
+
31
+ .unselected:hover .unselectedIconWrapper {
32
+ color: cm_grey_700;
33
+ }
34
+
35
+ .textZone {
36
+ flex: 1 1 100%;
37
+ padding-right: 32px;
38
+ width: calc(100% - 32px);
39
+ }
40
+
41
+ .text {
42
+ font-family: 'Gilroy';
43
+ font-style: normal;
44
+ font-weight: 600;
45
+ font-size: 14px;
46
+ text-overflow: ellipsis;
47
+ white-space: nowrap;
48
+ overflow: hidden;
49
+ display: block;
50
+ }
51
+
52
+ .icon{
53
+ position: absolute;
54
+ right: 18px;
55
+ }
56
+
57
+ .selectedIconWrapper {
58
+ composes: icon;
59
+ color: white;
60
+ }
61
+
62
+ .unselectedIconWrapper {
63
+ composes: icon;
64
+ color: cm_grey_400;
65
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chips/index.js"],"names":[],"mappings":";AASA,gDAuBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chips/index.js"],"names":[],"mappings":";AAWA,gDAuBC"}
@@ -1,3 +1,4 @@
1
+ // This component is a simpler version of the generic Chip component, in use in CoorpManager.
1
2
  import React, { useMemo } from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
  import classnames from 'classnames';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidRemoveAddAddCircle1","AddIcon","NovaSolidStatusCheckCircle2","SelectedIcon","style","Chips","props","text","information","selected","onClick","handleClick","container","unselected","textZone","selectedIconWrapper","unselectedIconWrapper","propTypes","string","bool","func"],"sources":["../../../src/atom/chips/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaSolidStatusCheckCircle2 as SelectedIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst Chips = props => {\n const {text, information, selected = false, onClick} = props;\n\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n return (\n <div\n className={classnames(style.container, selected ? style.selected : style.unselected)}\n onClick={handleClick}\n aria-label={`${text} ${information}`}\n data-name={text}\n >\n <div className={style.textZone} title={text}>\n <span className={style.text}>{text}</span>\n <span className={style.information}>{information}</span>\n </div>\n {selected ? (\n <SelectedIcon className={style.selectedIconWrapper} />\n ) : (\n <AddIcon className={style.unselectedIconWrapper} />\n )}\n </div>\n );\n};\n\nChips.propTypes = {\n text: PropTypes.string,\n information: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nexport default Chips;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,4BAA4B,IAAIC,OADlC,EAEEC,2BAA2B,IAAIC,YAFjC,QAGO,0BAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,KAAK,GAAGC,KAAK,IAAI;EACrB,MAAM;IAACC,IAAD;IAAOC,WAAP;IAAoBC,QAAQ,GAAG,KAA/B;IAAsCC;EAAtC,IAAiDJ,KAAvD;EAEA,MAAMK,WAAW,GAAGd,OAAO,CAAC,MAAM,MAAMa,OAAO,EAApB,EAAwB,CAACA,OAAD,CAAxB,CAA3B;EAEA,oBACE;IACE,SAAS,EAAEX,UAAU,CAACK,KAAK,CAACQ,SAAP,EAAkBH,QAAQ,GAAGL,KAAK,CAACK,QAAT,GAAoBL,KAAK,CAACS,UAApD,CADvB;IAEE,OAAO,EAAEF,WAFX;IAGE,cAAa,GAAEJ,IAAK,IAAGC,WAAY,EAHrC;IAIE,aAAWD;EAJb,gBAME;IAAK,SAAS,EAAEH,KAAK,CAACU,QAAtB;IAAgC,KAAK,EAAEP;EAAvC,gBACE;IAAM,SAAS,EAAEH,KAAK,CAACG;EAAvB,GAA8BA,IAA9B,CADF,eAEE;IAAM,SAAS,EAAEH,KAAK,CAACI;EAAvB,GAAqCA,WAArC,CAFF,CANF,EAUGC,QAAQ,gBACP,oBAAC,YAAD;IAAc,SAAS,EAAEL,KAAK,CAACW;EAA/B,EADO,gBAGP,oBAAC,OAAD;IAAS,SAAS,EAAEX,KAAK,CAACY;EAA1B,EAbJ,CADF;AAkBD,CAvBD;;AAyBAX,KAAK,CAACY,SAAN,2CAAkB;EAChBV,IAAI,EAAET,SAAS,CAACoB,MADA;EAEhBV,WAAW,EAAEV,SAAS,CAACoB,MAFP;EAGhBT,QAAQ,EAAEX,SAAS,CAACqB,IAHJ;EAIhBT,OAAO,EAAEZ,SAAS,CAACsB;AAJH,CAAlB;AAOA,eAAef,KAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidRemoveAddAddCircle1","AddIcon","NovaSolidStatusCheckCircle2","SelectedIcon","style","Chips","props","text","information","selected","onClick","handleClick","container","unselected","textZone","selectedIconWrapper","unselectedIconWrapper","propTypes","string","bool","func"],"sources":["../../../src/atom/chips/index.js"],"sourcesContent":["// This component is a simpler version of the generic Chip component, in use in CoorpManager.\n\nimport React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaSolidStatusCheckCircle2 as SelectedIcon\n} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst Chips = props => {\n const {text, information, selected = false, onClick} = props;\n\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n return (\n <div\n className={classnames(style.container, selected ? style.selected : style.unselected)}\n onClick={handleClick}\n aria-label={`${text} ${information}`}\n data-name={text}\n >\n <div className={style.textZone} title={text}>\n <span className={style.text}>{text}</span>\n <span className={style.information}>{information}</span>\n </div>\n {selected ? (\n <SelectedIcon className={style.selectedIconWrapper} />\n ) : (\n <AddIcon className={style.unselectedIconWrapper} />\n )}\n </div>\n );\n};\n\nChips.propTypes = {\n text: PropTypes.string,\n information: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nexport default Chips;\n"],"mappings":"AAAA;AAEA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SACEC,4BAA4B,IAAIC,OADlC,EAEEC,2BAA2B,IAAIC,YAFjC,QAGO,0BAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,KAAK,GAAGC,KAAK,IAAI;EACrB,MAAM;IAACC,IAAD;IAAOC,WAAP;IAAoBC,QAAQ,GAAG,KAA/B;IAAsCC;EAAtC,IAAiDJ,KAAvD;EAEA,MAAMK,WAAW,GAAGd,OAAO,CAAC,MAAM,MAAMa,OAAO,EAApB,EAAwB,CAACA,OAAD,CAAxB,CAA3B;EAEA,oBACE;IACE,SAAS,EAAEX,UAAU,CAACK,KAAK,CAACQ,SAAP,EAAkBH,QAAQ,GAAGL,KAAK,CAACK,QAAT,GAAoBL,KAAK,CAACS,UAApD,CADvB;IAEE,OAAO,EAAEF,WAFX;IAGE,cAAa,GAAEJ,IAAK,IAAGC,WAAY,EAHrC;IAIE,aAAWD;EAJb,gBAME;IAAK,SAAS,EAAEH,KAAK,CAACU,QAAtB;IAAgC,KAAK,EAAEP;EAAvC,gBACE;IAAM,SAAS,EAAEH,KAAK,CAACG;EAAvB,GAA8BA,IAA9B,CADF,eAEE;IAAM,SAAS,EAAEH,KAAK,CAACI;EAAvB,GAAqCA,WAArC,CAFF,CANF,EAUGC,QAAQ,gBACP,oBAAC,YAAD;IAAc,SAAS,EAAEL,KAAK,CAACW;EAA/B,EADO,gBAGP,oBAAC,OAAD;IAAS,SAAS,EAAEX,KAAK,CAACY;EAA1B,EAbJ,CADF;AAkBD,CAvBD;;AAyBAX,KAAK,CAACY,SAAN,2CAAkB;EAChBV,IAAI,EAAET,SAAS,CAACoB,MADA;EAEhBV,WAAW,EAAEV,SAAS,CAACoB,MAFP;EAGhBT,QAAQ,EAAEX,SAAS,CAACqB,IAHJ;EAIhBT,OAAO,EAAEZ,SAAS,CAACsB;AAJH,CAAlB;AAOA,eAAef,KAAf"}
@@ -38,7 +38,7 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
38
38
  preset = DEFAULT_PRESET,
39
39
  size
40
40
  }) {
41
- const effectiveIconColor = iconColor || backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR;
41
+ const effectiveIconColor = iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);
42
42
  const effectiveSize = size ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size) : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);
43
43
  const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;
44
44
  const iconWrapperStyle = {
@@ -53,7 +53,7 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
53
53
  }, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
54
54
  icon: `fa-${iconName}`,
55
55
  color: effectiveIconColor,
56
- "font-size": effectiveSize.faSize
56
+ fontSize: effectiveSize.faSize
57
57
  }));
58
58
  });
59
59
  Icon.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","Color","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","getForegroundColor","backgroundColor","to","set","l","toString","Icon","memo","iconName","iconColor","preset","size","effectiveIconColor","effectiveSize","iconWrapperStyle","width","height","padding","iconWrapper","propTypes","string","isRequired","oneOf","shape"],"sources":["../../../src/atom/icon/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes, {number} from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport Color from 'colorjs.io';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst DEFAULT_PRESET = 'm';\nconst ICON_LUMINOSITY = 32;\nconst DEFAULT_WRAPPER_SIZE = 40;\nconst ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nconst SIZE_CONFIGS = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nexport const getForegroundColor = backgroundColor =>\n new Color(backgroundColor).to('hsl').set({l: ICON_LUMINOSITY}).toString();\n\nconst Icon = React.memo(function Icon({\n iconName,\n iconColor,\n backgroundColor,\n preset = DEFAULT_PRESET,\n size\n}) {\n const effectiveIconColor =\n iconColor || backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR;\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n\n const iconWrapperStyle = {\n backgroundColor,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={iconWrapperStyle}>\n <FontAwesomeIcon\n icon={`fa-${iconName}`}\n color={effectiveIconColor}\n font-size={effectiveSize.faSize}\n />\n </div>\n );\n});\n\nIcon.propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: number,\n wrapperSize: PropTypes.number\n })\n};\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,IAAmBC,MAAnB,QAAgC,YAAhC;AACA,SAAQC,eAAR,QAA8B,gCAA9B;AACA,SAAQC,GAAR,QAAkB,kCAAlB;AACA,SAAQC,OAAR,QAAsB,mCAAtB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,YAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEAL,OAAO,CAACM,GAAR,CAAYP,GAAZ;AAEA,MAAMQ,cAAc,GAAG,GAAvB;AACA,MAAMC,eAAe,GAAG,EAAxB;AACA,MAAMC,oBAAoB,GAAG,EAA7B;AACA,MAAMC,YAAY,GAAG,CAArB;AACA,OAAO,MAAMC,kBAAkB,GAAG,iBAA3B;AAEP,MAAMC,YAAY,GAAG;EACnBC,CAAC,EAAE;IACDC,MAAM,EAAE,EADP;IAEDC,WAAW,EAAE;EAFZ,CADgB;EAKnBC,CAAC,EAAE;IACDF,MAAM,EAAE,EADP;IAEDC,WAAW,EAAEN;EAFZ,CALgB;EASnBQ,EAAE,EAAE;IACFH,MAAM,EAAE,EADN;IAEFC,WAAW,EAAE;EAFX;AATe,CAArB;AAeA,OAAO,MAAMG,kBAAkB,GAAGC,eAAe,IAC/C,IAAIf,KAAJ,CAAUe,eAAV,EAA2BC,EAA3B,CAA8B,KAA9B,EAAqCC,GAArC,CAAyC;EAACC,CAAC,EAAEd;AAAJ,CAAzC,EAA+De,QAA/D,EADK;AAGP,MAAMC,IAAI,gB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,MAAM,EAAEjB,MADY;IAEpBkB,WAAW,EAAEnB,SAAS,CAACC;EAFH,CAAhB;AALS,CAAjB;AAWA,eAAe2B,IAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","Color","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","getForegroundColor","backgroundColor","to","set","l","toString","Icon","memo","iconName","iconColor","preset","size","effectiveIconColor","effectiveSize","iconWrapperStyle","width","height","padding","iconWrapper","propTypes","string","isRequired","oneOf","shape"],"sources":["../../../src/atom/icon/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes, {number} from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport Color from 'colorjs.io';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst DEFAULT_PRESET = 'm';\nconst ICON_LUMINOSITY = 32;\nconst DEFAULT_WRAPPER_SIZE = 40;\nconst ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nconst SIZE_CONFIGS = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nexport const getForegroundColor = backgroundColor =>\n new Color(backgroundColor).to('hsl').set({l: ICON_LUMINOSITY}).toString();\n\nconst Icon = React.memo(function Icon({\n iconName,\n iconColor,\n backgroundColor,\n preset = DEFAULT_PRESET,\n size\n}) {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n\n const iconWrapperStyle = {\n backgroundColor,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={iconWrapperStyle}>\n <FontAwesomeIcon\n icon={`fa-${iconName}`}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n});\n\nIcon.propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: number,\n wrapperSize: PropTypes.number\n })\n};\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,IAAmBC,MAAnB,QAAgC,YAAhC;AACA,SAAQC,eAAR,QAA8B,gCAA9B;AACA,SAAQC,GAAR,QAAkB,kCAAlB;AACA,SAAQC,OAAR,QAAsB,mCAAtB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,YAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEAL,OAAO,CAACM,GAAR,CAAYP,GAAZ;AAEA,MAAMQ,cAAc,GAAG,GAAvB;AACA,MAAMC,eAAe,GAAG,EAAxB;AACA,MAAMC,oBAAoB,GAAG,EAA7B;AACA,MAAMC,YAAY,GAAG,CAArB;AACA,OAAO,MAAMC,kBAAkB,GAAG,iBAA3B;AAEP,MAAMC,YAAY,GAAG;EACnBC,CAAC,EAAE;IACDC,MAAM,EAAE,EADP;IAEDC,WAAW,EAAE;EAFZ,CADg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jB;EAH1B,EADF,CADF;AASD,CAhCY,CAAb;AAkCAU,IAAI,CAACa,SAAL,2CAAiB;EACfX,QAAQ,EAAE9B,SAAS,CAAC0C,MAAV,CAAiBC,UADZ;EAEfZ,SAAS,EAAE/B,SAAS,CAAC0C,MAFN;EAGfnB,eAAe,EAAEvB,SAAS,CAAC0C,MAHZ;EAIfV,MAAM,EAAEhC,SAAS,CAAC4C,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,EAAW,IAAX,CAAhB,CAJO;EAKfX,IAAI,EAAEjC,SAAS,CAAC6C,KAAV,CAAgB;IACpB3B,MAAM,EAAEjB,MADY;IAEpBkB,WAAW,EAAEnB,SAAS,CAACC;EAFH,CAAhB;AALS,CAAjB;AAWA,eAAe2B,IAAf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;AAgCjD,QAAA,MAAM,eAAe;YAAW,KAAK;;;;;;CAepC,CAAC;AAIF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;AA8BjD,QAAA,MAAM,eAAe;YAAW,KAAK;;;;;;CAepC,CAAC;AAIF,eAAe,eAAe,CAAC"}
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
2
  import ProgressBar from '../progress-bar';
3
3
  import StatusItem from '../../atom/status-item';
4
+ import { COLORS } from '../../variables/colors';
4
5
  import style from './style.css';
5
6
  import { propTypes } from './types';
6
- const cm_negative_100 = '#ed3436';
7
- const cm_primary_blue = '#0061FF';
8
- const cm_positive_100 = '#35CC7F';
7
+ const {
8
+ negative: cm_negative_100,
9
+ cm_primary_blue,
10
+ positive: cm_positive_100
11
+ } = COLORS;
9
12
  const STATUS = {
10
13
  inProgress: 'inProgress',
11
14
  fail: 'fail'
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","ProgressBar","StatusItem","style","propTypes","cm_negative_100","cm_primary_blue","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst cm_negative_100 = '#ed3436';\nconst cm_primary_blue = '#0061FF';\nconst cm_positive_100 = '#35CC7F';\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'} />\n </div>\n );\n};\n\nconst resolveProgressBarColor = (status: Status) => {\n switch (status) {\n case STATUS.fail:\n return cm_negative_100;\n case STATUS.inProgress:\n return cm_primary_blue;\n default:\n return cm_positive_100;\n }\n};\n\nconst BulkProgressBar = (props: Props) => {\n const {'data-name': dataName, status, progress} = props;\n\n return (\n <div className={style.container} data-name={dataName}>\n <ProgressBar\n className={style.progressBar}\n value={progress}\n max={100}\n steps={0}\n style={{backgroundColor: resolveProgressBarColor(status), borderRadius: '10px'}}\n />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,SAA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gB,CAACC,MAAD,EAASC,QAAT,CARnB,CADF;AAYD,CAfD;;AAiBAI,eAAe,CAACb,SAAhB,2CAA4BA,SAA5B;AAEA,eAAea,eAAf"}
1
+ {"version":3,"file":"index.js","names":["React","ProgressBar","StatusItem","COLORS","style","propTypes","negative","cm_negative_100","cm_primary_blue","positive","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst {negative: cm_negative_100, cm_primary_blue, positive: cm_positive_100} = COLORS;\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'} />\n </div>\n );\n};\n\nconst resolveProgressBarColor = (status: Status) => {\n switch (status) {\n case STATUS.fail:\n return cm_negative_100;\n case STATUS.inProgress:\n return cm_primary_blue;\n default:\n return cm_positive_100;\n }\n};\n\nconst BulkProgressBar = (props: Props) => {\n const {'data-name': dataName, status, progress} = props;\n\n return (\n <div className={style.container} data-name={dataName}>\n <ProgressBar\n className={style.progressBar}\n value={progress}\n max={100}\n steps={0}\n style={{backgroundColor: resolveProgressBarColor(status), borderRadius: '10px'}}\n />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,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E;MAACS,eAAe,EAAEN,uBAAuB,CAACJ,MAAD,CAAzC;MAAmDW,YAAY,EAAE;IAAjE;EALT,EADF,EAQGZ,gBAAgB,CAACC,MAAD,EAASC,QAAT,CARnB,CADF;AAYD,CAfD;;AAiBAI,eAAe,CAACf,SAAhB,2CAA4BA,SAA5B;AAEA,eAAee,eAAf"}
@@ -0,0 +1,21 @@
1
+ export default LearnerSkillCard;
2
+ declare function LearnerSkillCard(props: any, context: any): JSX.Element;
3
+ declare namespace LearnerSkillCard {
4
+ namespace contextTypes {
5
+ const translate: PropTypes.Requireable<(...args: any[]) => any>;
6
+ }
7
+ const propTypes: {
8
+ 'aria-label': PropTypes.Requireable<string>;
9
+ skillTitle: PropTypes.Requireable<string>;
10
+ skillAriaLabel: PropTypes.Requireable<string>;
11
+ metrics: PropTypes.Requireable<PropTypes.InferProps<{
12
+ skillCourses: PropTypes.Requireable<number>;
13
+ skillQuestions: PropTypes.Requireable<number>;
14
+ completedCourses: PropTypes.Requireable<number>;
15
+ }>>;
16
+ onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
17
+ onExploreClick: PropTypes.Requireable<(...args: any[]) => any>;
18
+ };
19
+ }
20
+ import PropTypes from "prop-types";
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.js"],"names":[],"mappings":";AASA,yEAsJC"}