@coorpacademy/components 11.14.13-alpha.1 → 11.14.13

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 (51) hide show
  1. package/es/atom/cta/index.d.ts +34 -7
  2. package/es/atom/cta/index.d.ts.map +1 -1
  3. package/es/atom/cta/index.js +79 -54
  4. package/es/atom/cta/index.js.map +1 -1
  5. package/es/atom/link/index.d.ts +0 -1
  6. package/es/atom/link/index.d.ts.map +1 -1
  7. package/es/atom/link/index.js +11 -17
  8. package/es/atom/link/index.js.map +1 -1
  9. package/es/atom/slide/index.d.ts +0 -1
  10. package/es/molecule/news/index.d.ts +0 -1
  11. package/es/organism/mooc/image-slider/index.d.ts +0 -1
  12. package/es/organism/mooc-header/index.d.ts +0 -1
  13. package/es/organism/mooc-header/index.d.ts.map +1 -1
  14. package/es/organism/sidebar/index.d.ts +0 -1
  15. package/es/organism/sidebar/index.d.ts.map +1 -1
  16. package/es/template/app-player/player/index.d.ts +0 -1
  17. package/es/template/app-player/player/slides/index.d.ts +0 -1
  18. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  19. package/es/template/app-player/popin-correction/index.d.ts +0 -2
  20. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  21. package/es/template/app-player/popin-end/index.d.ts +0 -1
  22. package/es/template/app-player/popin-end/summary.d.ts +0 -1
  23. package/es/template/app-player/popin-header/index.d.ts +0 -1
  24. package/es/template/app-player/popin-header/index.d.ts.map +1 -1
  25. package/es/template/teams-dashboard/index.d.ts +0 -1
  26. package/lib/atom/cta/index.d.ts +34 -7
  27. package/lib/atom/cta/index.d.ts.map +1 -1
  28. package/lib/atom/cta/index.js +78 -58
  29. package/lib/atom/cta/index.js.map +1 -1
  30. package/lib/atom/link/index.d.ts +0 -1
  31. package/lib/atom/link/index.d.ts.map +1 -1
  32. package/lib/atom/link/index.js +11 -17
  33. package/lib/atom/link/index.js.map +1 -1
  34. package/lib/atom/slide/index.d.ts +0 -1
  35. package/lib/molecule/news/index.d.ts +0 -1
  36. package/lib/organism/mooc/image-slider/index.d.ts +0 -1
  37. package/lib/organism/mooc-header/index.d.ts +0 -1
  38. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  39. package/lib/organism/sidebar/index.d.ts +0 -1
  40. package/lib/organism/sidebar/index.d.ts.map +1 -1
  41. package/lib/template/app-player/player/index.d.ts +0 -1
  42. package/lib/template/app-player/player/slides/index.d.ts +0 -1
  43. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  44. package/lib/template/app-player/popin-correction/index.d.ts +0 -2
  45. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  46. package/lib/template/app-player/popin-end/index.d.ts +0 -1
  47. package/lib/template/app-player/popin-end/summary.d.ts +0 -1
  48. package/lib/template/app-player/popin-header/index.d.ts +0 -1
  49. package/lib/template/app-player/popin-header/index.d.ts.map +1 -1
  50. package/lib/template/teams-dashboard/index.d.ts +0 -1
  51. package/package.json +3 -3
@@ -1,8 +1,6 @@
1
1
  export default CTA;
2
- declare function CTA(props: any, legacyContext: any): JSX.Element;
3
- declare namespace CTA {
4
- const propTypes: {
5
- 'aria-label': PropTypes.Requireable<string>;
2
+ declare class CTA extends React.Component<any, any, any> {
3
+ static propTypes: {
6
4
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
5
  href: PropTypes.Requireable<string>;
8
6
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -18,8 +16,8 @@ declare namespace CTA {
18
16
  fullWidth: PropTypes.Requireable<boolean>;
19
17
  certificationButton: PropTypes.Requireable<boolean>;
20
18
  };
21
- namespace contextTypes {
22
- const skin: PropTypes.Requireable<PropTypes.InferProps<{
19
+ static contextTypes: {
20
+ skin: PropTypes.Requireable<PropTypes.InferProps<{
23
21
  common: PropTypes.Requireable<{
24
22
  [x: string]: any;
25
23
  }>;
@@ -40,7 +38,36 @@ declare namespace CTA {
40
38
  [x: string]: any;
41
39
  }>;
42
40
  }>>;
43
- }
41
+ };
42
+ constructor(props: any);
43
+ state: {
44
+ hovered: boolean;
45
+ };
46
+ handleMouseEnter(): void;
47
+ handleMouseLeave(): void;
48
+ getStyle(): {
49
+ backgroundColor: any;
50
+ borderColor: any;
51
+ opacity: string;
52
+ color?: undefined;
53
+ } | {
54
+ backgroundColor: any;
55
+ borderColor: any;
56
+ opacity?: undefined;
57
+ color?: undefined;
58
+ } | {
59
+ color: any;
60
+ borderColor: any;
61
+ backgroundColor?: undefined;
62
+ opacity?: undefined;
63
+ } | {
64
+ color: any;
65
+ backgroundColor?: undefined;
66
+ borderColor?: undefined;
67
+ opacity?: undefined;
68
+ } | undefined;
69
+ render(): JSX.Element;
44
70
  }
71
+ import React from "react";
45
72
  import PropTypes from "prop-types";
46
73
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/index.js"],"names":[],"mappings":";AAUA,kEAqGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/index.js"],"names":[],"mappings":";AAUA;IACE;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAOC;IALC;;MAEC;IAKH,yBAIC;IAED,yBAIC;IAED;;;;;;;;;;;;;;;;;;;;kBAwCC;IAED,sBAkDC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import _noop from "lodash/fp/noop";
2
2
  import _get from "lodash/fp/get";
3
- import React, { useCallback, useState } from 'react';
3
+ import React from 'react';
4
4
  import { convert } from 'css-color-function';
5
5
  import PropTypes from 'prop-types';
6
6
  import classnames from 'classnames';
@@ -9,35 +9,42 @@ import Provider from '../provider';
9
9
  import Link from '../link';
10
10
  import style from './style.css';
11
11
 
12
- const CTA = (props, legacyContext) => {
13
- const {
14
- skin
15
- } = legacyContext;
16
- const {
17
- 'aria-label': ariaLabel,
18
- submitValue = 'submit',
19
- name: ctaName,
20
- href,
21
- target,
22
- disabled = false,
23
- light = false,
24
- small = false,
25
- secondary = false,
26
- onClick,
27
- className,
28
- logout = false,
29
- rectangular = false,
30
- fullWidth = false,
31
- certificationButton = false
32
- } = props;
33
- const [hovered, setHovered] = useState(false);
34
- const handleMouseEnter = useCallback(() => {
35
- setHovered(true);
36
- }, []);
37
- const handleMouseLeave = useCallback(() => {
38
- setHovered(false);
39
- }, []);
40
- const getStyle = useCallback(() => {
12
+ class CTA extends React.Component {
13
+ constructor(props) {
14
+ super(props);
15
+ this.state = {
16
+ hovered: false
17
+ };
18
+ this.handleMouseEnter = this.handleMouseEnter.bind(this);
19
+ this.handleMouseLeave = this.handleMouseLeave.bind(this);
20
+ }
21
+
22
+ handleMouseEnter() {
23
+ return this.setState({
24
+ hovered: true
25
+ });
26
+ }
27
+
28
+ handleMouseLeave() {
29
+ return this.setState({
30
+ hovered: false
31
+ });
32
+ }
33
+
34
+ getStyle() {
35
+ const {
36
+ skin
37
+ } = this.context;
38
+ const {
39
+ hovered
40
+ } = this.state;
41
+ const {
42
+ disabled = false,
43
+ light = false,
44
+ secondary = false,
45
+ logout = false
46
+ } = this.props;
47
+
41
48
  const color = _get('common.primary', skin);
42
49
 
43
50
  const grey = _get('common.grey', skin);
@@ -71,29 +78,50 @@ const CTA = (props, legacyContext) => {
71
78
  borderColor: color,
72
79
  backgroundColor: color
73
80
  };
74
- }, [disabled, hovered, light, logout, secondary, skin]);
75
- return /*#__PURE__*/React.createElement(Link, {
76
- href: href,
77
- onClick: disabled ? _noop : onClick,
78
- onMouseEnter: handleMouseEnter,
79
- onMouseLeave: handleMouseLeave,
80
- target: target,
81
- className: classnames(style.button, disabled ? style.disabled : null, small ? style.smallButton : null, light ? style.lightButton : null, secondary ? style.secondaryButton : null, logout ? style.logoutButton : null, rectangular ? style.rectangularButton : null, fullWidth ? style.fullWidth : null, certificationButton ? style.certificationButton : null, className),
82
- "data-name": ctaName || 'cta',
83
- style: getStyle(),
84
- "aria-label": ariaLabel
85
- }, logout ? /*#__PURE__*/React.createElement("div", {
86
- className: style.logoutWrapper,
87
- "data-name": "cta-logout-label"
88
- }, /*#__PURE__*/React.createElement(LogoutIcon, {
89
- height: 15,
90
- width: 15,
91
- className: style.logoutIcon
92
- }), submitValue) : submitValue);
93
- };
81
+ }
82
+
83
+ render() {
84
+ const {
85
+ submitValue = 'submit',
86
+ name: ctaName,
87
+ href,
88
+ target,
89
+ disabled = false,
90
+ light = false,
91
+ small = false,
92
+ secondary = false,
93
+ onClick,
94
+ className,
95
+ logout = false,
96
+ rectangular = false,
97
+ fullWidth = false,
98
+ certificationButton = false
99
+ } = this.props;
100
+ return /*#__PURE__*/React.createElement(Link, {
101
+ href: href,
102
+ onClick: disabled ? _noop : onClick,
103
+ onMouseEnter: this.handleMouseEnter,
104
+ onMouseLeave: this.handleMouseLeave,
105
+ target: target,
106
+ className: classnames(style.button, disabled ? style.disabled : null, small ? style.smallButton : null, light ? style.lightButton : null, secondary ? style.secondaryButton : null, logout ? style.logoutButton : null, rectangular ? style.rectangularButton : null, fullWidth ? style.fullWidth : null, certificationButton ? style.certificationButton : null, className),
107
+ "data-name": ctaName || 'cta',
108
+ style: this.getStyle()
109
+ }, logout ? /*#__PURE__*/React.createElement("div", {
110
+ className: style.logoutWrapper,
111
+ "data-name": "cta-logout-label"
112
+ }, /*#__PURE__*/React.createElement(LogoutIcon, {
113
+ height: 15,
114
+ width: 15,
115
+ className: style.logoutIcon
116
+ }), submitValue) : submitValue);
117
+ }
94
118
 
119
+ }
120
+
121
+ CTA.contextTypes = {
122
+ skin: Provider.childContextTypes.skin
123
+ };
95
124
  CTA.propTypes = process.env.NODE_ENV !== "production" ? {
96
- 'aria-label': Link.propTypes['aria-label'],
97
125
  submitValue: Link.propTypes.children,
98
126
  href: Link.propTypes.href,
99
127
  onClick: Link.propTypes.onClick,
@@ -109,8 +137,5 @@ CTA.propTypes = process.env.NODE_ENV !== "production" ? {
109
137
  fullWidth: PropTypes.bool,
110
138
  certificationButton: PropTypes.bool
111
139
  } : {};
112
- CTA.contextTypes = {
113
- skin: Provider.childContextTypes.skin
114
- };
115
140
  export default CTA;
116
141
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","convert","PropTypes","classnames","NovaCompositionCoorpacademyLogout","LogoutIcon","Provider","Link","style","CTA","props","legacyContext","skin","ariaLabel","submitValue","name","ctaName","href","target","disabled","light","small","secondary","onClick","className","logout","rectangular","fullWidth","certificationButton","hovered","setHovered","handleMouseEnter","handleMouseLeave","getStyle","color","grey","backgroundColor","borderColor","opacity","darkenColor","button","smallButton","lightButton","secondaryButton","logoutButton","rectangularButton","logoutWrapper","logoutIcon","propTypes","children","string","bool","contextTypes","childContextTypes"],"sources":["../../../src/atom/cta/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaCompositionCoorpacademyLogout as LogoutIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport Link from '../link';\nimport style from './style.css';\n\nconst CTA = (props, legacyContext) => {\n const {skin} = legacyContext;\n const {\n 'aria-label': ariaLabel,\n submitValue = 'submit',\n name: ctaName,\n href,\n target,\n disabled = false,\n light = false,\n small = false,\n secondary = false,\n onClick,\n className,\n logout = false,\n rectangular = false,\n fullWidth = false,\n certificationButton = false\n } = props;\n const [hovered, setHovered] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n }, []);\n\n const getStyle = useCallback(() => {\n const color = get('common.primary', skin);\n const grey = get('common.grey', skin);\n\n if (logout) return;\n\n if (disabled) {\n return {\n backgroundColor: grey,\n borderColor: grey,\n opacity: '0.3'\n };\n }\n\n if (hovered) {\n const darkenColor = convert(`color(${color} blackness(+10%))`);\n return {\n backgroundColor: darkenColor,\n borderColor: darkenColor\n };\n }\n\n if (secondary)\n return {\n color,\n borderColor: color\n };\n\n if (light)\n return {\n color\n };\n\n return {\n borderColor: color,\n backgroundColor: color\n };\n }, [disabled, hovered, light, logout, secondary, skin]);\n\n return (\n <Link\n href={href}\n onClick={disabled ? noop : onClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n target={target}\n className={classnames(\n style.button,\n disabled ? style.disabled : null,\n small ? style.smallButton : null,\n light ? style.lightButton : null,\n secondary ? style.secondaryButton : null,\n logout ? style.logoutButton : null,\n rectangular ? style.rectangularButton : null,\n fullWidth ? style.fullWidth : null,\n certificationButton ? style.certificationButton : null,\n className\n )}\n data-name={ctaName || 'cta'}\n style={getStyle()}\n aria-label={ariaLabel}\n >\n {logout ? (\n <div className={style.logoutWrapper} data-name=\"cta-logout-label\">\n <LogoutIcon height={15} width={15} className={style.logoutIcon} />\n {submitValue}\n </div>\n ) : (\n submitValue\n )}\n </Link>\n );\n};\n\nCTA.propTypes = {\n 'aria-label': Link.propTypes['aria-label'],\n submitValue: Link.propTypes.children,\n href: Link.propTypes.href,\n onClick: Link.propTypes.onClick,\n target: Link.propTypes.target,\n name: PropTypes.string,\n disabled: PropTypes.bool,\n light: PropTypes.bool,\n secondary: PropTypes.bool,\n small: PropTypes.bool,\n className: PropTypes.string,\n logout: PropTypes.bool,\n rectangular: PropTypes.bool,\n fullWidth: PropTypes.bool,\n certificationButton: PropTypes.bool\n};\n\nCTA.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default CTA;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,iCAAiC,IAAIC,UAA7C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,IAAP,MAAiB,SAAj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BACE,oBAAC,UAAD;IAAY,MAAM,EAAE,EAApB;IAAwB,KAAK,EAAE,EAA/B;IAAmC,SAAS,EAAEtC,KAAK,CAACuC;EAApD,EADF,EAEGjC,WAFH,CADK,GAMLA,WA5BJ,CADF;AAiCD,CArGD;;AAuGAL,GAAG,CAACuC,SAAJ,2CAAgB;EACd,cAAczC,IAAI,CAACyC,SAAL,CAAe,YAAf,CADA;EAEdlC,WAAW,EAAEP,IAAI,CAACyC,SAAL,CAAeC,QAFd;EAGdhC,IAAI,EAAEV,IAAI,CAACyC,SAAL,CAAe/B,IAHP;EAIdM,OAAO,EAAEhB,IAAI,CAACyC,SAAL,CAAezB,OAJV;EAKdL,MAAM,EAAEX,IAAI,CAACyC,SAAL,CAAe9B,MALT;EAMdH,IAAI,EAAEb,SAAS,CAACgD,MANF;EAOd/B,QAAQ,EAAEjB,SAAS,CAACiD,IAPN;EAQd/B,KAAK,EAAElB,SAAS,CAACiD,IARH;EASd7B,SAAS,EAAEpB,SAAS,CAACiD,IATP;EAUd9B,KAAK,EAAEnB,SAAS,CAACiD,IAVH;EAWd3B,SAAS,EAAEtB,SAAS,CAACgD,MAXP;EAYdzB,MAAM,EAAEvB,SAAS,CAACiD,IAZJ;EAadzB,WAAW,EAAExB,SAAS,CAACiD,IAbT;EAcdxB,SAAS,EAAEzB,SAAS,CAACiD,IAdP;EAedvB,mBAAmB,EAAE1B,SAAS,CAACiD;AAfjB,CAAhB;AAkBA1C,GAAG,CAAC2C,YAAJ,GAAmB;EACjBxC,IAAI,EAAEN,QAAQ,CAAC+C,iBAAT,CAA2BzC;AADhB,CAAnB;AAIA,eAAeH,GAAf"}
1
+ {"version":3,"file":"index.js","names":["React","convert","PropTypes","classnames","NovaCompositionCoorpacademyLogout","LogoutIcon","Provider","Link","style","CTA","Component","constructor","props","state","hovered","handleMouseEnter","bind","handleMouseLeave","setState","getStyle","skin","context","disabled","light","secondary","logout","color","grey","backgroundColor","borderColor","opacity","darkenColor","render","submitValue","name","ctaName","href","target","small","onClick","className","rectangular","fullWidth","certificationButton","button","smallButton","lightButton","secondaryButton","logoutButton","rectangularButton","logoutWrapper","logoutIcon","contextTypes","childContextTypes","propTypes","children","string","bool"],"sources":["../../../src/atom/cta/index.js"],"sourcesContent":["import React from 'react';\nimport {convert} from 'css-color-function';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaCompositionCoorpacademyLogout as LogoutIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport Link from '../link';\nimport style from './style.css';\n\nclass CTA extends React.Component {\n static propTypes = {\n submitValue: Link.propTypes.children,\n href: Link.propTypes.href,\n onClick: Link.propTypes.onClick,\n target: Link.propTypes.target,\n name: PropTypes.string,\n disabled: PropTypes.bool,\n light: PropTypes.bool,\n secondary: PropTypes.bool,\n small: PropTypes.bool,\n className: PropTypes.string,\n logout: PropTypes.bool,\n rectangular: PropTypes.bool,\n fullWidth: PropTypes.bool,\n certificationButton: PropTypes.bool\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n hovered: false\n };\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n handleMouseEnter() {\n return this.setState({\n hovered: true\n });\n }\n\n handleMouseLeave() {\n return this.setState({\n hovered: false\n });\n }\n\n getStyle() {\n const {skin} = this.context;\n const {hovered} = this.state;\n const {disabled = false, light = false, secondary = false, logout = false} = this.props;\n const color = get('common.primary', skin);\n const grey = get('common.grey', skin);\n\n if (logout) return;\n\n if (disabled) {\n return {\n backgroundColor: grey,\n borderColor: grey,\n opacity: '0.3'\n };\n }\n\n if (hovered) {\n const darkenColor = convert(`color(${color} blackness(+10%))`);\n return {\n backgroundColor: darkenColor,\n borderColor: darkenColor\n };\n }\n\n if (secondary)\n return {\n color,\n borderColor: color\n };\n\n if (light)\n return {\n color\n };\n\n return {\n borderColor: color,\n backgroundColor: color\n };\n }\n\n render() {\n const {\n submitValue = 'submit',\n name: ctaName,\n href,\n target,\n disabled = false,\n light = false,\n small = false,\n secondary = false,\n onClick,\n className,\n logout = false,\n rectangular = false,\n fullWidth = false,\n certificationButton = false\n } = this.props;\n\n return (\n <Link\n href={href}\n onClick={disabled ? noop : onClick}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n target={target}\n className={classnames(\n style.button,\n disabled ? style.disabled : null,\n small ? style.smallButton : null,\n light ? style.lightButton : null,\n secondary ? style.secondaryButton : null,\n logout ? style.logoutButton : null,\n rectangular ? style.rectangularButton : null,\n fullWidth ? style.fullWidth : null,\n certificationButton ? style.certificationButton : null,\n className\n )}\n data-name={ctaName || 'cta'}\n style={this.getStyle()}\n >\n {logout ? (\n <div className={style.logoutWrapper} data-name=\"cta-logout-label\">\n <LogoutIcon height={15} width={15} className={style.logoutIcon} />\n {submitValue}\n </div>\n ) : (\n submitValue\n )}\n </Link>\n );\n }\n}\n\nexport default CTA;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,iCAAiC,IAAIC,UAA7C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,GAAN,SAAkBT,KAAK,CAACU,SAAxB,CAAkC;EAsBhCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,GAAa;MACXC,OAAO,EAAE;IADE,CAAb;IAGA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBC,IAAtB,CAA2B,IAA3B,CAAxB;IACA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBD,IAAtB,CAA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CADK,GAMLA,WA3BJ,CADF;EAgCD;;AAvI+B;;AAA5BxB,G,CAkBG2C,Y,GAAe;EACpBhC,IAAI,EAAEd,QAAQ,CAAC+C,iBAAT,CAA2BjC;AADb,C;AAlBlBX,G,CACG6C,S,2CAAY;EACjBrB,WAAW,EAAE1B,IAAI,CAAC+C,SAAL,CAAeC,QADX;EAEjBnB,IAAI,EAAE7B,IAAI,CAAC+C,SAAL,CAAelB,IAFJ;EAGjBG,OAAO,EAAEhC,IAAI,CAAC+C,SAAL,CAAef,OAHP;EAIjBF,MAAM,EAAE9B,IAAI,CAAC+C,SAAL,CAAejB,MAJN;EAKjBH,IAAI,EAAEhC,SAAS,CAACsD,MALC;EAMjBlC,QAAQ,EAAEpB,SAAS,CAACuD,IANH;EAOjBlC,KAAK,EAAErB,SAAS,CAACuD,IAPA;EAQjBjC,SAAS,EAAEtB,SAAS,CAACuD,IARJ;EASjBnB,KAAK,EAAEpC,SAAS,CAACuD,IATA;EAUjBjB,SAAS,EAAEtC,SAAS,CAACsD,MAVJ;EAWjB/B,MAAM,EAAEvB,SAAS,CAACuD,IAXD;EAYjBhB,WAAW,EAAEvC,SAAS,CAACuD,IAZN;EAajBf,SAAS,EAAExC,SAAS,CAACuD,IAbJ;EAcjBd,mBAAmB,EAAEzC,SAAS,CAACuD;AAdd,C;AAyIrB,eAAehD,GAAf"}
@@ -15,7 +15,6 @@ declare namespace Link {
15
15
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
16
16
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
17
17
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
18
- useButtonTag: PropTypes.Requireable<boolean>;
19
18
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
20
19
  };
21
20
  namespace contextTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA0GC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA+EC"}
@@ -1,7 +1,7 @@
1
1
  import _noop from "lodash/fp/noop";
2
2
  import _getOr from "lodash/fp/getOr";
3
3
  import _identity from "lodash/fp/identity";
4
- const _excluded = ["skinHover", "hoverColor", "data-name", "aria-label", "useButtonTag"];
4
+ const _excluded = ["skinHover", "hoverColor", "data-name", "aria-label"];
5
5
 
6
6
  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); }
7
7
 
@@ -25,8 +25,7 @@ const Link = (props, legacyContext) => {
25
25
  skinHover,
26
26
  hoverColor = _getOr('#00B0FF', 'common.primary', skin),
27
27
  'data-name': dataName = 'link',
28
- 'aria-label': ariaLabel,
29
- useButtonTag = false
28
+ 'aria-label': ariaLabel
30
29
  } = props,
31
30
  linKElementProps = _objectWithoutPropertiesLoose(props, _excluded);
32
31
 
@@ -59,28 +58,24 @@ const Link = (props, legacyContext) => {
59
58
  }
60
59
  }, [download, navigate, onClick]);
61
60
 
62
- const _style = useMemo(() => href || onClick ? null : {
61
+ const _style = href || onClick ? null : {
63
62
  pointerEvents: 'none'
64
- }, [href, onClick]);
63
+ };
65
64
 
66
- const _hoverStyle = useMemo(() => skinHover && hovered ? {
65
+ const _hoverStyle = skinHover && hovered ? {
67
66
  color: hoverColor
68
- } : null, [hoverColor, hovered, skinHover]);
67
+ } : null;
69
68
 
70
- const _props = useMemo(() => _extends({}, linKElementProps, {
71
- 'data-name': dataName,
72
- 'aria-label': ariaLabel,
69
+ return /*#__PURE__*/React.createElement("a", _extends({}, linKElementProps, {
70
+ "data-name": dataName,
71
+ "aria-label": ariaLabel,
73
72
  href: href ? createHref(href) : undefined,
74
73
  onClick: handleOnClick,
75
74
  onMouseEnter: handleMouseEnter,
76
75
  onMouseLeave: handleMouseLeave,
77
- className,
76
+ className: className,
78
77
  style: _extends({}, propsStyle, _style, _hoverStyle)
79
- }), [_hoverStyle, _style, ariaLabel, className, createHref, dataName, handleMouseEnter, handleMouseLeave, handleOnClick, href, linKElementProps, propsStyle]);
80
-
81
- return useButtonTag ? /*#__PURE__*/React.createElement("button", _extends({}, _props, {
82
- type: "button"
83
- }), children) : /*#__PURE__*/React.createElement("a", _props, children);
78
+ }), children);
84
79
  };
85
80
 
86
81
  Link.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -97,7 +92,6 @@ Link.propTypes = process.env.NODE_ENV !== "production" ? {
97
92
  onClick: PropTypes.func,
98
93
  onMouseEnter: PropTypes.func,
99
94
  onMouseLeave: PropTypes.func,
100
- useButtonTag: PropTypes.bool,
101
95
  style: PropTypes.shape({})
102
96
  } : {};
103
97
  Link.contextTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","Provider","GetSkinFromContext","pushToHistory","Link","props","legacyContext","skin","hovered","setHovered","history","createHref","skinHover","hoverColor","dataName","ariaLabel","useButtonTag","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","handleMouseLeave","navigate","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","_props","undefined","propTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n useButtonTag = false,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style = useMemo(\n () =>\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n },\n [href, onClick]\n );\n const _hoverStyle = useMemo(\n () =>\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null,\n [hoverColor, hovered, skinHover]\n );\n\n const _props = useMemo(\n () => ({\n ...linKElementProps,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n href: href ? createHref(href) : undefined,\n onClick: handleOnClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n className,\n style: {\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }\n }),\n [\n _hoverStyle,\n _style,\n ariaLabel,\n className,\n createHref,\n dataName,\n handleMouseEnter,\n handleMouseLeave,\n handleOnClick,\n href,\n linKElementProps,\n propsStyle\n ]\n );\n\n return useButtonTag ? (\n <button {..._props} type=\"button\">\n {children}\n </button>\n ) : (\n <a {..._props}>{children}</a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n useButtonTag: PropTypes.bool,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;AACA,OAAOC,aAAP,MAA0B,uBAA1B;;AAEA,MAAMC,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAGL,kBAAkB,CAACI,aAAD,CAA/B;EACA,MAAM,CAACE,OAAD,EAAUC,UAAV,IAAwBV,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACW,OAAO,EAAE;MAACC,UAAU;IAAX,IAA0B;EAApC,IAA0CL,aAAhD;;EACA,MAAM;IACJM,SADI;IAEJC,UAAU,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCN,IAAnC,CAFT;IAGJ,aAAaO,QAAQ,GAAG,MAHpB;IAIJ,cAAcC,SAJV;IAKJC,YAAY,GAAG;EALX,IAOFX,KAPJ;EAAA,MAMKY,gBANL,iCAOIZ,KAPJ;;EAQA,MAAM;IACJa,IADI;IAEJC,OAAO,QAFH;IAGJC,SAHI;IAIJC,KAAK,EAAEC,UAJH;IAKJC,QALI;IAMJC,YAAY,QANR;IAOJC,YAAY,QAPR;IAQJC;EARI,IASFrB,KATJ;EAWA,MAAMsB,gBAAgB,GAAG9B,WAAW,CAAC,MAAM;IACzCY,UAAU,CAAC,IAAD,CAAV;IAEAgB,YAAY;EACb,CAJmC,EAIjC,CAACA,YAAD,CAJiC,CAApC;EAMA,MAAMG,gBAAgB,GAAG/B,WAAW,CAAC,MAAM;IACzCY,UAAU,CAAC,KAAD,CAAV;IAEAe,YAAY;EACb,CAJmC,EAIjC,CAACA,YAAD,CAJiC,CA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A,OAAON,YAAY,gBACjB,2CAAYoB,MAAZ;IAAoB,IAAI,EAAC;EAAzB,IACGb,QADH,CADiB,gBAKjB,yBAAOa,MAAP,EAAgBb,QAAhB,CALF;AAOD,CA1GD;;AA4GAnB,IAAI,CAACkC,SAAL,2CAAiB;EACff,QAAQ,EAAEvB,SAAS,CAACuC,IADL;EAEfnB,SAAS,EAAEpB,SAAS,CAACwC,MAFN;EAGftB,IAAI,EAAElB,SAAS,CAACwC,MAHD;EAIf,aAAaxC,SAAS,CAACwC,MAJR;EAKf,cAAcxC,SAAS,CAACwC,MALT;EAMfC,KAAK,EAAEzC,SAAS,CAACwC,MANF;EAOfE,MAAM,EAAE1C,SAAS,CAAC2C,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB,CAPO;EAQf/B,SAAS,EAAEZ,SAAS,CAAC4C,IARN;EASf/B,UAAU,EAAEb,SAAS,CAACwC,MATP;EAUfd,QAAQ,EAAE1B,SAAS,CAAC4C,IAVL;EAWfzB,OAAO,EAAEnB,SAAS,CAAC6C,IAXJ;EAYfpB,YAAY,EAAEzB,SAAS,CAAC6C,IAZT;EAafrB,YAAY,EAAExB,SAAS,CAAC6C,IAbT;EAcf7B,YAAY,EAAEhB,SAAS,CAAC4C,IAdT;EAefvB,KAAK,EAAErB,SAAS,CAAC8C,KAAV,CAAgB,EAAhB;AAfQ,CAAjB;AAkBA1C,IAAI,CAAC2C,YAAL,GAAoB;EAClBxC,IAAI,EAAEN,QAAQ,CAAC+C,iBAAT,CAA2BzC,IADf;EAElBG,OAAO,EAAET,QAAQ,CAAC+C,iBAAT,CAA2BtC;AAFlB,CAApB;AAKA,eAAeN,IAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","Provider","GetSkinFromContext","pushToHistory","Link","props","legacyContext","skin","hovered","setHovered","history","createHref","skinHover","hoverColor","dataName","ariaLabel","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","handleMouseLeave","navigate","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","undefined","propTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style =\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n };\n const _hoverStyle =\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null;\n\n return (\n <a\n {...linKElementProps}\n data-name={dataName}\n aria-label={ariaLabel}\n href={href ? createHref(href) : undefined}\n onClick={handleOnClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n className={className}\n style={{\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }}\n >\n {children}\n </a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;AACA,OAAOC,aAAP,MAA0B,uBAA1B;;AAEA,MAAMC,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAGL,kBAAkB,CAACI,aAAD,CAA/B;EACA,MAAM,CAACE,OAAD,EAAUC,UAAV,IAAwBV,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACW,OAAO,EAAE;MAACC,UAAU;IAAX,IAA0B;EAApC,IAA0CL,aAAhD;;EACA,MAAM;IACJM,SADI;IAEJC,UAAU,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCN,IAAnC,CAFT;IAGJ,aAAaO,QAAQ,GAAG,MAHpB;IAIJ,cAAcC;EAJV,IAMFV,KANJ;EAAA,MAKKW,gBALL,iCAMIX,KANJ;;EAOA,MAAM;IACJY,IADI;IAEJC,OAAO,QAFH;IAGJC,SAHI;IAIJC,KAAK,EAAEC,UAJH;IAKJC,QALI;IAMJC,YAAY,QANR;IAOJC,YAAY,QAPR;IAQJC;EARI,IASFpB,KATJ;EAWA,MAAMqB,gBAAgB,GAAG7B,WAAW,CAAC,MAAM;IACzCY,UAAU,CAAC,IAAD,CAAV;IAEAe,YAAY;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D;EAIf,aAAatC,SAAS,CAACsC,MAJR;EAKf,cAActC,SAAS,CAACsC,MALT;EAMfC,KAAK,EAAEvC,SAAS,CAACsC,MANF;EAOfE,MAAM,EAAExC,SAAS,CAACyC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB,CAPO;EAQf7B,SAAS,EAAEZ,SAAS,CAAC0C,IARN;EASf7B,UAAU,EAAEb,SAAS,CAACsC,MATP;EAUfb,QAAQ,EAAEzB,SAAS,CAAC0C,IAVL;EAWfxB,OAAO,EAAElB,SAAS,CAAC2C,IAXJ;EAYfnB,YAAY,EAAExB,SAAS,CAAC2C,IAZT;EAafpB,YAAY,EAAEvB,SAAS,CAAC2C,IAbT;EAcfvB,KAAK,EAAEpB,SAAS,CAAC4C,KAAV,CAAgB,EAAhB;AAdQ,CAAjB;AAiBAxC,IAAI,CAACyC,YAAL,GAAoB;EAClBtC,IAAI,EAAEN,QAAQ,CAAC6C,iBAAT,CAA2BvC,IADf;EAElBG,OAAO,EAAET,QAAQ,CAAC6C,iBAAT,CAA2BpC;AAFlB,CAApB;AAKA,eAAeN,IAAf"}
@@ -7,7 +7,6 @@ declare namespace Slide {
7
7
  const subtitle: PropTypes.Requireable<string>;
8
8
  const light: PropTypes.Requireable<boolean>;
9
9
  const cta: PropTypes.Requireable<PropTypes.InferProps<{
10
- 'aria-label': PropTypes.Requireable<string>;
11
10
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
11
  href: PropTypes.Requireable<string>;
13
12
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -8,7 +8,6 @@ declare namespace News {
8
8
  const description: PropTypes.Requireable<string>;
9
9
  const authorLogo: PropTypes.Requireable<string>;
10
10
  const cta: PropTypes.Requireable<PropTypes.InferProps<{
11
- 'aria-label': PropTypes.Requireable<string>;
12
11
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
12
  href: PropTypes.Requireable<string>;
14
13
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -10,7 +10,6 @@ declare namespace ImageSlider {
10
10
  subtitle: PropTypes.Requireable<string>;
11
11
  light: PropTypes.Requireable<boolean>;
12
12
  cta: PropTypes.Requireable<PropTypes.InferProps<{
13
- 'aria-label': PropTypes.Requireable<string>;
14
13
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
14
  href: PropTypes.Requireable<string>;
16
15
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -42,7 +42,6 @@ declare class MoocHeader extends React.Component<any, any, any> {
42
42
  }> | null | undefined)[]>;
43
43
  }>>;
44
44
  links: PropTypes.Requireable<(PropTypes.InferProps<{
45
- 'aria-label': PropTypes.Requireable<string>;
46
45
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
47
46
  href: PropTypes.Requireable<string>;
48
47
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAwBC;IAtBC;;;;;;MAMC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BAIE;IAEF,6BAIE;IAEF,6BAucC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAwBC;IAtBC;;;;;;MAMC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BAIE;IAEF,6BAIE;IAEF,6BAucC;CACF"}
@@ -141,7 +141,6 @@ export namespace ButtonItem {
141
141
  const onClick_1: PropTypes.Requireable<(...args: any[]) => any>;
142
142
  export { onClick_1 as onClick };
143
143
  export const cta: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
144
- 'aria-label': PropTypes.Requireable<string>;
145
144
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
146
145
  href: PropTypes.Requireable<string>;
147
146
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/sidebar/index.js"],"names":[],"mappings":"AAeO,uDA0BN;;;;;;;;;;;;;AAaM;;;;;;;gBAON;;;;;;;;;;;;;;;;;;;;;AAiBM;;;;;;;gBAON;;;;;AAIM;;;;;;;;;;;;;gBAwDN;;;;;;;;;;;;;;;;;;;;AAeM;;;;;;gBAyBN;;;;;AAIM;;;;;gBAMN;;;;;;;;;;;;;;AASM;;;;;;;;;;gBA6CN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcM;;;;;;;;;gBAuBN;;;;;;;;;;;;;;;;;;;;;;;;AAkED;;8BAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/sidebar/index.js"],"names":[],"mappings":"AAeO,uDA0BN;;;;;;;;;;;;;AAaM;;;;;;;gBAON;;;;;;;;;;;;;;;;;;;;;AAiBM;;;;;;;gBAON;;;;;AAIM;;;;;;;;;;;;;gBAwDN;;;;;;;;;;;;;;;;;;;;AAeM;;;;;;gBAyBN;;;;;AAIM;;;;;gBAMN;;;;;;;;;;;;;;AASM;;;;;;;;;;gBA6CN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcM;;;;;;;;;gBAuBN;;;;;;;;;;;;;;;;;;;;;;;;AAkED;;8BAaC"}
@@ -4,7 +4,6 @@ declare namespace SlidePlayer {
4
4
  namespace propTypes {
5
5
  const player: PropTypes.Requireable<PropTypes.InferProps<{
6
6
  cta: PropTypes.Requireable<PropTypes.InferProps<{
7
- 'aria-label': PropTypes.Requireable<string>;
8
7
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
8
  href: PropTypes.Requireable<string>;
10
9
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -128,7 +128,6 @@ declare function ValidateButton({ cta }: {
128
128
  declare namespace ValidateButton {
129
129
  export namespace propTypes_1 {
130
130
  const cta_1: PropTypes.Requireable<PropTypes.InferProps<{
131
- 'aria-label': PropTypes.Requireable<string>;
132
131
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
133
132
  href: PropTypes.Requireable<string>;
134
133
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AAgZA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1HD;;uBAUC;;;;;;;;;;;;;;;;;;;;;;;;AAnOD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;gBAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhHpF,oEAQC;;;;;;;;;AA6MD;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AAgZA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1HD;;uBAUC;;;;;;;;;;;;;;;;;;;;;;;AAnOD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;gBAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhHpF,oEAQC;;;;;;;;;AA6MD;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
@@ -36,7 +36,6 @@ declare class PopinCorrection extends React.Component<any, any, any> {
36
36
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
37
37
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
38
38
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
39
- useButtonTag: PropTypes.Requireable<boolean>;
40
39
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
41
40
  }>>;
42
41
  type: PropTypes.Validator<string>;
@@ -84,7 +83,6 @@ declare class PopinCorrection extends React.Component<any, any, any> {
84
83
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
85
84
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
86
85
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
87
- useButtonTag: PropTypes.Requireable<boolean>;
88
86
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
89
87
  }>>;
90
88
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
@@ -36,7 +36,6 @@ declare namespace PopinEnd {
36
36
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
37
37
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
38
38
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
39
- useButtonTag: PropTypes.Requireable<boolean>;
40
39
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
41
40
  }>>;
42
41
  type: PropTypes.Validator<string>;
@@ -42,7 +42,6 @@ declare namespace Summary {
42
42
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
43
43
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
44
44
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
45
- useButtonTag: PropTypes.Requireable<boolean>;
46
45
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
47
46
  }>>;
48
47
  type: PropTypes.Validator<string>;
@@ -72,7 +72,6 @@ declare namespace NextQuestionPart {
72
72
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
73
73
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
74
74
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
75
- useButtonTag: PropTypes.Requireable<boolean>;
76
75
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
77
76
  }>>;
78
77
  export { cta_1 as cta };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-header/index.js"],"names":[],"mappings":";AAyWA,oEAyDC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtID,gFA4DC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5HD,yDAmDC;;;;;;;;;;;;;;;;;;;;;;;;;AApOD;;gBAkBC;;;;;;;;;;;AA8ED;;;;;uBAYC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-header/index.js"],"names":[],"mappings":";AAyWA,oEAyDC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtID,gFA4DC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5HD,yDAmDC;;;;;;;;;;;;;;;;;;;;;;;;;AApOD;;gBAkBC;;;;;;;;;;;AA8ED;;;;;uBAYC"}
@@ -17,7 +17,6 @@ declare namespace TeamsDashboard {
17
17
  closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
18
18
  }>>;
19
19
  const platformLinks: PropTypes.Requireable<(PropTypes.InferProps<{
20
- 'aria-label': PropTypes.Requireable<string>;
21
20
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
22
21
  href: PropTypes.Requireable<string>;
23
22
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1,8 +1,6 @@
1
1
  export default CTA;
2
- declare function CTA(props: any, legacyContext: any): JSX.Element;
3
- declare namespace CTA {
4
- const propTypes: {
5
- 'aria-label': PropTypes.Requireable<string>;
2
+ declare class CTA extends React.Component<any, any, any> {
3
+ static propTypes: {
6
4
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
5
  href: PropTypes.Requireable<string>;
8
6
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -18,8 +16,8 @@ declare namespace CTA {
18
16
  fullWidth: PropTypes.Requireable<boolean>;
19
17
  certificationButton: PropTypes.Requireable<boolean>;
20
18
  };
21
- namespace contextTypes {
22
- const skin: PropTypes.Requireable<PropTypes.InferProps<{
19
+ static contextTypes: {
20
+ skin: PropTypes.Requireable<PropTypes.InferProps<{
23
21
  common: PropTypes.Requireable<{
24
22
  [x: string]: any;
25
23
  }>;
@@ -40,7 +38,36 @@ declare namespace CTA {
40
38
  [x: string]: any;
41
39
  }>;
42
40
  }>>;
43
- }
41
+ };
42
+ constructor(props: any);
43
+ state: {
44
+ hovered: boolean;
45
+ };
46
+ handleMouseEnter(): void;
47
+ handleMouseLeave(): void;
48
+ getStyle(): {
49
+ backgroundColor: any;
50
+ borderColor: any;
51
+ opacity: string;
52
+ color?: undefined;
53
+ } | {
54
+ backgroundColor: any;
55
+ borderColor: any;
56
+ opacity?: undefined;
57
+ color?: undefined;
58
+ } | {
59
+ color: any;
60
+ borderColor: any;
61
+ backgroundColor?: undefined;
62
+ opacity?: undefined;
63
+ } | {
64
+ color: any;
65
+ backgroundColor?: undefined;
66
+ borderColor?: undefined;
67
+ opacity?: undefined;
68
+ } | undefined;
69
+ render(): JSX.Element;
44
70
  }
71
+ import React from "react";
45
72
  import PropTypes from "prop-types";
46
73
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/index.js"],"names":[],"mappings":";AAUA,kEAqGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/index.js"],"names":[],"mappings":";AAUA;IACE;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAOC;IALC;;MAEC;IAKH,yBAIC;IAED,yBAIC;IAED;;;;;;;;;;;;;;;;;;;;kBAwCC;IAED,sBAkDC;CACF"}
@@ -7,7 +7,7 @@ var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
7
7
 
8
8
  var _get2 = _interopRequireDefault(require("lodash/fp/get"));
9
9
 
10
- var _react = _interopRequireWildcard(require("react"));
10
+ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _cssColorFunction = require("css-color-function");
13
13
 
@@ -23,41 +23,43 @@ var _link = _interopRequireDefault(require("../link"));
23
23
 
24
24
  var _style = _interopRequireDefault(require("./style.css"));
25
25
 
26
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
-
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
-
30
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
27
 
32
- const CTA = (props, legacyContext) => {
33
- const {
34
- skin
35
- } = legacyContext;
36
- const {
37
- 'aria-label': ariaLabel,
38
- submitValue = 'submit',
39
- name: ctaName,
40
- href,
41
- target,
42
- disabled = false,
43
- light = false,
44
- small = false,
45
- secondary = false,
46
- onClick,
47
- className,
48
- logout = false,
49
- rectangular = false,
50
- fullWidth = false,
51
- certificationButton = false
52
- } = props;
53
- const [hovered, setHovered] = (0, _react.useState)(false);
54
- const handleMouseEnter = (0, _react.useCallback)(() => {
55
- setHovered(true);
56
- }, []);
57
- const handleMouseLeave = (0, _react.useCallback)(() => {
58
- setHovered(false);
59
- }, []);
60
- const getStyle = (0, _react.useCallback)(() => {
28
+ class CTA extends _react.default.Component {
29
+ constructor(props) {
30
+ super(props);
31
+ this.state = {
32
+ hovered: false
33
+ };
34
+ this.handleMouseEnter = this.handleMouseEnter.bind(this);
35
+ this.handleMouseLeave = this.handleMouseLeave.bind(this);
36
+ }
37
+
38
+ handleMouseEnter() {
39
+ return this.setState({
40
+ hovered: true
41
+ });
42
+ }
43
+
44
+ handleMouseLeave() {
45
+ return this.setState({
46
+ hovered: false
47
+ });
48
+ }
49
+
50
+ getStyle() {
51
+ const {
52
+ skin
53
+ } = this.context;
54
+ const {
55
+ hovered
56
+ } = this.state;
57
+ const {
58
+ disabled = false,
59
+ light = false,
60
+ secondary = false,
61
+ logout = false
62
+ } = this.props;
61
63
  const color = (0, _get2.default)('common.primary', skin);
62
64
  const grey = (0, _get2.default)('common.grey', skin);
63
65
  if (logout) return;
@@ -89,29 +91,50 @@ const CTA = (props, legacyContext) => {
89
91
  borderColor: color,
90
92
  backgroundColor: color
91
93
  };
92
- }, [disabled, hovered, light, logout, secondary, skin]);
93
- return /*#__PURE__*/_react.default.createElement(_link.default, {
94
- href: href,
95
- onClick: disabled ? _noop2.default : onClick,
96
- onMouseEnter: handleMouseEnter,
97
- onMouseLeave: handleMouseLeave,
98
- target: target,
99
- className: (0, _classnames.default)(_style.default.button, disabled ? _style.default.disabled : null, small ? _style.default.smallButton : null, light ? _style.default.lightButton : null, secondary ? _style.default.secondaryButton : null, logout ? _style.default.logoutButton : null, rectangular ? _style.default.rectangularButton : null, fullWidth ? _style.default.fullWidth : null, certificationButton ? _style.default.certificationButton : null, className),
100
- "data-name": ctaName || 'cta',
101
- style: getStyle(),
102
- "aria-label": ariaLabel
103
- }, logout ? /*#__PURE__*/_react.default.createElement("div", {
104
- className: _style.default.logoutWrapper,
105
- "data-name": "cta-logout-label"
106
- }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLogout, {
107
- height: 15,
108
- width: 15,
109
- className: _style.default.logoutIcon
110
- }), submitValue) : submitValue);
111
- };
94
+ }
95
+
96
+ render() {
97
+ const {
98
+ submitValue = 'submit',
99
+ name: ctaName,
100
+ href,
101
+ target,
102
+ disabled = false,
103
+ light = false,
104
+ small = false,
105
+ secondary = false,
106
+ onClick,
107
+ className,
108
+ logout = false,
109
+ rectangular = false,
110
+ fullWidth = false,
111
+ certificationButton = false
112
+ } = this.props;
113
+ return /*#__PURE__*/_react.default.createElement(_link.default, {
114
+ href: href,
115
+ onClick: disabled ? _noop2.default : onClick,
116
+ onMouseEnter: this.handleMouseEnter,
117
+ onMouseLeave: this.handleMouseLeave,
118
+ target: target,
119
+ className: (0, _classnames.default)(_style.default.button, disabled ? _style.default.disabled : null, small ? _style.default.smallButton : null, light ? _style.default.lightButton : null, secondary ? _style.default.secondaryButton : null, logout ? _style.default.logoutButton : null, rectangular ? _style.default.rectangularButton : null, fullWidth ? _style.default.fullWidth : null, certificationButton ? _style.default.certificationButton : null, className),
120
+ "data-name": ctaName || 'cta',
121
+ style: this.getStyle()
122
+ }, logout ? /*#__PURE__*/_react.default.createElement("div", {
123
+ className: _style.default.logoutWrapper,
124
+ "data-name": "cta-logout-label"
125
+ }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLogout, {
126
+ height: 15,
127
+ width: 15,
128
+ className: _style.default.logoutIcon
129
+ }), submitValue) : submitValue);
130
+ }
131
+
132
+ }
112
133
 
134
+ CTA.contextTypes = {
135
+ skin: _provider.default.childContextTypes.skin
136
+ };
113
137
  CTA.propTypes = process.env.NODE_ENV !== "production" ? {
114
- 'aria-label': _link.default.propTypes['aria-label'],
115
138
  submitValue: _link.default.propTypes.children,
116
139
  href: _link.default.propTypes.href,
117
140
  onClick: _link.default.propTypes.onClick,
@@ -127,9 +150,6 @@ CTA.propTypes = process.env.NODE_ENV !== "production" ? {
127
150
  fullWidth: _propTypes.default.bool,
128
151
  certificationButton: _propTypes.default.bool
129
152
  } : {};
130
- CTA.contextTypes = {
131
- skin: _provider.default.childContextTypes.skin
132
- };
133
153
  var _default = CTA;
134
154
  exports.default = _default;
135
155
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CTA","props","legacyContext","skin","ariaLabel","submitValue","name","ctaName","href","target","disabled","light","small","secondary","onClick","className","logout","rectangular","fullWidth","certificationButton","hovered","setHovered","useState","handleMouseEnter","useCallback","handleMouseLeave","getStyle","color","grey","backgroundColor","borderColor","opacity","darkenColor","convert","classnames","style","button","smallButton","lightButton","secondaryButton","logoutButton","rectangularButton","logoutWrapper","logoutIcon","propTypes","Link","children","PropTypes","string","bool","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/cta/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaCompositionCoorpacademyLogout as LogoutIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport Link from '../link';\nimport style from './style.css';\n\nconst CTA = (props, legacyContext) => {\n const {skin} = legacyContext;\n const {\n 'aria-label': ariaLabel,\n submitValue = 'submit',\n name: ctaName,\n href,\n target,\n disabled = false,\n light = false,\n small = false,\n secondary = false,\n onClick,\n className,\n logout = false,\n rectangular = false,\n fullWidth = false,\n certificationButton = false\n } = props;\n const [hovered, setHovered] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n }, []);\n\n const getStyle = useCallback(() => {\n const color = get('common.primary', skin);\n const grey = get('common.grey', skin);\n\n if (logout) return;\n\n if (disabled) {\n return {\n backgroundColor: grey,\n borderColor: grey,\n opacity: '0.3'\n };\n }\n\n if (hovered) {\n const darkenColor = convert(`color(${color} blackness(+10%))`);\n return {\n backgroundColor: darkenColor,\n borderColor: darkenColor\n };\n }\n\n if (secondary)\n return {\n color,\n borderColor: color\n };\n\n if (light)\n return {\n color\n };\n\n return {\n borderColor: color,\n backgroundColor: color\n };\n }, [disabled, hovered, light, logout, secondary, skin]);\n\n return (\n <Link\n href={href}\n onClick={disabled ? noop : onClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n target={target}\n className={classnames(\n style.button,\n disabled ? style.disabled : null,\n small ? style.smallButton : null,\n light ? style.lightButton : null,\n secondary ? style.secondaryButton : null,\n logout ? style.logoutButton : null,\n rectangular ? style.rectangularButton : null,\n fullWidth ? style.fullWidth : null,\n certificationButton ? style.certificationButton : null,\n className\n )}\n data-name={ctaName || 'cta'}\n style={getStyle()}\n aria-label={ariaLabel}\n >\n {logout ? (\n <div className={style.logoutWrapper} data-name=\"cta-logout-label\">\n <LogoutIcon height={15} width={15} className={style.logoutIcon} />\n {submitValue}\n </div>\n ) : (\n submitValue\n )}\n </Link>\n );\n};\n\nCTA.propTypes = {\n 'aria-label': Link.propTypes['aria-label'],\n submitValue: Link.propTypes.children,\n href: Link.propTypes.href,\n onClick: Link.propTypes.onClick,\n target: Link.propTypes.target,\n name: PropTypes.string,\n disabled: PropTypes.bool,\n light: PropTypes.bool,\n secondary: PropTypes.bool,\n small: PropTypes.bool,\n className: PropTypes.string,\n logout: PropTypes.bool,\n rectangular: PropTypes.bool,\n fullWidth: PropTypes.bool,\n certificationButton: PropTypes.bool\n};\n\nCTA.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default CTA;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,GAAG,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACpC,MAAM;IAACC;EAAD,IAASD,aAAf;EACA,MAAM;IACJ,cAAcE,SADV;IAEJC,WAAW,GAAG,QAFV;IAGJC,IAAI,EAAEC,OAHF;IAIJC,IAJI;IAKJC,MALI;IAMJC,QAAQ,GAAG,KANP;IAOJC,KAAK,GAAG,KAPJ;IAQJC,KAAK,GAAG,KARJ;IASJC,SAAS,GAAG,KATR;IAUJC,OAVI;IAWJC,SAXI;IAYJC,MAAM,GAAG,KAZL;IAaJC,WAAW,GAAG,KAbV;IAcJC,SAAS,GAAG,KAdR;IAeJC,mBAAmB,GAAG;EAflB,IAgBFlB,KAhBJ;EAiBA,MAAM,CAACmB,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EAEA,MAAMC,gBAAgB,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACzCH,UAAU,CAAC,IAAD,CAAV;EACD,CAFwB,EAEtB,EAFsB,CAAzB;EAIA,MAAMI,gBAAgB,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACzCH,UAAU,CAAC,KAAD,CAAV;EACD,CAFwB,EAEtB,EAFsB,CAAzB;EAIA,MAAMK,QAAQ,GAAG,IAAAF,kBAAA,EAAY,M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EAcd/B,SAAS,EAAE6B,kBAAA,CAAUE,IAdP;EAed9B,mBAAmB,EAAE4B,kBAAA,CAAUE;AAfjB,CAAhB;AAkBAjD,GAAG,CAACkD,YAAJ,GAAmB;EACjB/C,IAAI,EAAEgD,iBAAA,CAASC,iBAAT,CAA2BjD;AADhB,CAAnB;eAIeH,G"}
1
+ {"version":3,"file":"index.js","names":["CTA","React","Component","constructor","props","state","hovered","handleMouseEnter","bind","handleMouseLeave","setState","getStyle","skin","context","disabled","light","secondary","logout","color","grey","backgroundColor","borderColor","opacity","darkenColor","convert","render","submitValue","name","ctaName","href","target","small","onClick","className","rectangular","fullWidth","certificationButton","classnames","style","button","smallButton","lightButton","secondaryButton","logoutButton","rectangularButton","logoutWrapper","logoutIcon","contextTypes","Provider","childContextTypes","propTypes","Link","children","PropTypes","string","bool"],"sources":["../../../src/atom/cta/index.js"],"sourcesContent":["import React from 'react';\nimport {convert} from 'css-color-function';\nimport PropTypes from 'prop-types';\nimport {get, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaCompositionCoorpacademyLogout as LogoutIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport Link from '../link';\nimport style from './style.css';\n\nclass CTA extends React.Component {\n static propTypes = {\n submitValue: Link.propTypes.children,\n href: Link.propTypes.href,\n onClick: Link.propTypes.onClick,\n target: Link.propTypes.target,\n name: PropTypes.string,\n disabled: PropTypes.bool,\n light: PropTypes.bool,\n secondary: PropTypes.bool,\n small: PropTypes.bool,\n className: PropTypes.string,\n logout: PropTypes.bool,\n rectangular: PropTypes.bool,\n fullWidth: PropTypes.bool,\n certificationButton: PropTypes.bool\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n this.state = {\n hovered: false\n };\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n }\n\n handleMouseEnter() {\n return this.setState({\n hovered: true\n });\n }\n\n handleMouseLeave() {\n return this.setState({\n hovered: false\n });\n }\n\n getStyle() {\n const {skin} = this.context;\n const {hovered} = this.state;\n const {disabled = false, light = false, secondary = false, logout = false} = this.props;\n const color = get('common.primary', skin);\n const grey = get('common.grey', skin);\n\n if (logout) return;\n\n if (disabled) {\n return {\n backgroundColor: grey,\n borderColor: grey,\n opacity: '0.3'\n };\n }\n\n if (hovered) {\n const darkenColor = convert(`color(${color} blackness(+10%))`);\n return {\n backgroundColor: darkenColor,\n borderColor: darkenColor\n };\n }\n\n if (secondary)\n return {\n color,\n borderColor: color\n };\n\n if (light)\n return {\n color\n };\n\n return {\n borderColor: color,\n backgroundColor: color\n };\n }\n\n render() {\n const {\n submitValue = 'submit',\n name: ctaName,\n href,\n target,\n disabled = false,\n light = false,\n small = false,\n secondary = false,\n onClick,\n className,\n logout = false,\n rectangular = false,\n fullWidth = false,\n certificationButton = false\n } = this.props;\n\n return (\n <Link\n href={href}\n onClick={disabled ? noop : onClick}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n target={target}\n className={classnames(\n style.button,\n disabled ? style.disabled : null,\n small ? style.smallButton : null,\n light ? style.lightButton : null,\n secondary ? style.secondaryButton : null,\n logout ? style.logoutButton : null,\n rectangular ? style.rectangularButton : null,\n fullWidth ? style.fullWidth : null,\n certificationButton ? style.certificationButton : null,\n className\n )}\n data-name={ctaName || 'cta'}\n style={this.getStyle()}\n >\n {logout ? (\n <div className={style.logoutWrapper} data-name=\"cta-logout-label\">\n <LogoutIcon height={15} width={15} className={style.logoutIcon} />\n {submitValue}\n </div>\n ) : (\n submitValue\n )}\n </Link>\n );\n }\n}\n\nexport default CTA;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,GAAN,SAAkBC,cAAA,CAAMC,SAAxB,CAAkC;EAsBhCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,KAAL,G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EqB,cAAA,CAAMO,aAAtB;MAAqC,aAAU;IAA/C,gBACE,6BAAC,4CAAD;MAAY,MAAM,EAAE,EAApB;MAAwB,KAAK,EAAE,EAA/B;MAAmC,SAAS,EAAEP,cAAA,CAAMQ;IAApD,EADF,EAEGpB,WAFH,CADK,GAMLA,WA3BJ,CADF;EAgCD;;AAvI+B;;AAA5B1B,G,CAkBG+C,Y,GAAe;EACpBnC,IAAI,EAAEoC,iBAAA,CAASC,iBAAT,CAA2BrC;AADb,C;AAlBlBZ,G,CACGkD,S,2CAAY;EACjBxB,WAAW,EAAEyB,aAAA,CAAKD,SAAL,CAAeE,QADX;EAEjBvB,IAAI,EAAEsB,aAAA,CAAKD,SAAL,CAAerB,IAFJ;EAGjBG,OAAO,EAAEmB,aAAA,CAAKD,SAAL,CAAelB,OAHP;EAIjBF,MAAM,EAAEqB,aAAA,CAAKD,SAAL,CAAepB,MAJN;EAKjBH,IAAI,EAAE0B,kBAAA,CAAUC,MALC;EAMjBxC,QAAQ,EAAEuC,kBAAA,CAAUE,IANH;EAOjBxC,KAAK,EAAEsC,kBAAA,CAAUE,IAPA;EAQjBvC,SAAS,EAAEqC,kBAAA,CAAUE,IARJ;EASjBxB,KAAK,EAAEsB,kBAAA,CAAUE,IATA;EAUjBtB,SAAS,EAAEoB,kBAAA,CAAUC,MAVJ;EAWjBrC,MAAM,EAAEoC,kBAAA,CAAUE,IAXD;EAYjBrB,WAAW,EAAEmB,kBAAA,CAAUE,IAZN;EAajBpB,SAAS,EAAEkB,kBAAA,CAAUE,IAbJ;EAcjBnB,mBAAmB,EAAEiB,kBAAA,CAAUE;AAdd,C;eAyINvD,G"}
@@ -15,7 +15,6 @@ declare namespace Link {
15
15
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
16
16
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
17
17
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
18
- useButtonTag: PropTypes.Requireable<boolean>;
19
18
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
20
19
  };
21
20
  namespace contextTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA0GC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA+EC"}
@@ -17,7 +17,7 @@ var _provider = _interopRequireWildcard(require("../provider"));
17
17
 
18
18
  var _navigation = _interopRequireDefault(require("../../util/navigation"));
19
19
 
20
- const _excluded = ["skinHover", "hoverColor", "data-name", "aria-label", "useButtonTag"];
20
+ const _excluded = ["skinHover", "hoverColor", "data-name", "aria-label"];
21
21
 
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
 
@@ -42,8 +42,7 @@ const Link = (props, legacyContext) => {
42
42
  skinHover,
43
43
  hoverColor = (0, _getOr2.default)('#00B0FF', 'common.primary', skin),
44
44
  'data-name': dataName = 'link',
45
- 'aria-label': ariaLabel,
46
- useButtonTag = false
45
+ 'aria-label': ariaLabel
47
46
  } = props,
48
47
  linKElementProps = _objectWithoutPropertiesLoose(props, _excluded);
49
48
 
@@ -76,28 +75,24 @@ const Link = (props, legacyContext) => {
76
75
  }
77
76
  }, [download, navigate, onClick]);
78
77
 
79
- const _style = (0, _react.useMemo)(() => href || onClick ? null : {
78
+ const _style = href || onClick ? null : {
80
79
  pointerEvents: 'none'
81
- }, [href, onClick]);
80
+ };
82
81
 
83
- const _hoverStyle = (0, _react.useMemo)(() => skinHover && hovered ? {
82
+ const _hoverStyle = skinHover && hovered ? {
84
83
  color: hoverColor
85
- } : null, [hoverColor, hovered, skinHover]);
84
+ } : null;
86
85
 
87
- const _props = (0, _react.useMemo)(() => _extends({}, linKElementProps, {
88
- 'data-name': dataName,
89
- 'aria-label': ariaLabel,
86
+ return /*#__PURE__*/_react.default.createElement("a", _extends({}, linKElementProps, {
87
+ "data-name": dataName,
88
+ "aria-label": ariaLabel,
90
89
  href: href ? createHref(href) : undefined,
91
90
  onClick: handleOnClick,
92
91
  onMouseEnter: handleMouseEnter,
93
92
  onMouseLeave: handleMouseLeave,
94
- className,
93
+ className: className,
95
94
  style: _extends({}, propsStyle, _style, _hoverStyle)
96
- }), [_hoverStyle, _style, ariaLabel, className, createHref, dataName, handleMouseEnter, handleMouseLeave, handleOnClick, href, linKElementProps, propsStyle]);
97
-
98
- return useButtonTag ? /*#__PURE__*/_react.default.createElement("button", _extends({}, _props, {
99
- type: "button"
100
- }), children) : /*#__PURE__*/_react.default.createElement("a", _props, children);
95
+ }), children);
101
96
  };
102
97
 
103
98
  Link.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -114,7 +109,6 @@ Link.propTypes = process.env.NODE_ENV !== "production" ? {
114
109
  onClick: _propTypes.default.func,
115
110
  onMouseEnter: _propTypes.default.func,
116
111
  onMouseLeave: _propTypes.default.func,
117
- useButtonTag: _propTypes.default.bool,
118
112
  style: _propTypes.default.shape({})
119
113
  } : {};
120
114
  Link.contextTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Link","props","legacyContext","skin","GetSkinFromContext","hovered","setHovered","useState","history","createHref","skinHover","hoverColor","dataName","ariaLabel","useButtonTag","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","useCallback","handleMouseLeave","navigate","useMemo","pushToHistory","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","_props","undefined","propTypes","PropTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n useButtonTag = false,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style = useMemo(\n () =>\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n },\n [href, onClick]\n );\n const _hoverStyle = useMemo(\n () =>\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null,\n [hoverColor, hovered, skinHover]\n );\n\n const _props = useMemo(\n () => ({\n ...linKElementProps,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n href: href ? createHref(href) : undefined,\n onClick: handleOnClick,\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n className,\n style: {\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }\n }),\n [\n _hoverStyle,\n _style,\n ariaLabel,\n className,\n createHref,\n dataName,\n handleMouseEnter,\n handleMouseLeave,\n handleOnClick,\n href,\n linKElementProps,\n propsStyle\n ]\n );\n\n return useButtonTag ? (\n <button {..._props} type=\"button\">\n {children}\n </button>\n ) : (\n <a {..._props}>{children}</a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n useButtonTag: PropTypes.bool,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAM,CAACG,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAM;IAACC,OAAO,EAAE;MAACC,UAAU;IAAX,IAA0B;EAApC,IAA0CP,aAAhD;;EACA,MAAM;IACJQ,SADI;IAEJC,UAAU,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCR,IAAnC,CAFT;IAGJ,aAAaS,QAAQ,GAAG,MAHpB;IAIJ,cAAcC,SAJV;IAKJC,YAAY,GAAG;EALX,IAOFb,KAPJ;EAAA,MAMKc,gBANL,iCAOId,KAPJ;;EAQA,MAAM;IACJe,IADI;IAEJC,OAAO,iBAFH;IAGJC,SAHI;IAIJC,KAAK,EAAEC,UAJH;IAKJC,QALI;IAMJC,YAAY,iBANR;IAOJC,YAAY,iBAPR;IAQJC;EARI,IASFvB,KATJ;EAWA,MAAMwB,gBAAgB,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACzCpB,UAAU,CAAC,IAAD,CAAV;IAEAiB,YAAY;EACb,CAJwB,EAItB,CAACA,YAAD,CAJsB,CAAzB;EAMA,MAAMI,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["Link","props","legacyContext","skin","GetSkinFromContext","hovered","setHovered","useState","history","createHref","skinHover","hoverColor","dataName","ariaLabel","linKElementProps","href","onClick","className","style","propsStyle","children","onMouseLeave","onMouseEnter","download","handleMouseEnter","useCallback","handleMouseLeave","navigate","useMemo","pushToHistory","handleOnClick","e","_style","pointerEvents","_hoverStyle","color","undefined","propTypes","PropTypes","node","string","title","target","oneOf","bool","func","shape","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/link/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {identity, getOr, noop} from 'lodash/fp';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport pushToHistory from '../../util/navigation';\n\nconst Link = (props, legacyContext) => {\n const skin = GetSkinFromContext(legacyContext);\n const [hovered, setHovered] = useState(false);\n const {history: {createHref = identity} = {}} = legacyContext;\n const {\n skinHover,\n hoverColor = getOr('#00B0FF', 'common.primary', skin),\n 'data-name': dataName = 'link',\n 'aria-label': ariaLabel,\n ...linKElementProps\n } = props;\n const {\n href,\n onClick = noop,\n className,\n style: propsStyle,\n children,\n onMouseLeave = noop,\n onMouseEnter = noop,\n download\n } = props;\n\n const handleMouseEnter = useCallback(() => {\n setHovered(true);\n\n onMouseEnter();\n }, [onMouseEnter]);\n\n const handleMouseLeave = useCallback(() => {\n setHovered(false);\n\n onMouseLeave();\n }, [onMouseLeave]);\n\n const navigate = useMemo(() => pushToHistory(legacyContext)({href}), [href, legacyContext]);\n\n const handleOnClick = useCallback(\n e => {\n onClick(e);\n\n if (!download) {\n navigate(e);\n }\n },\n [download, navigate, onClick]\n );\n\n const _style =\n href || onClick\n ? null\n : {\n pointerEvents: 'none'\n };\n const _hoverStyle =\n skinHover && hovered\n ? {\n color: hoverColor\n }\n : null;\n\n return (\n <a\n {...linKElementProps}\n data-name={dataName}\n aria-label={ariaLabel}\n href={href ? createHref(href) : undefined}\n onClick={handleOnClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n className={className}\n style={{\n ...propsStyle,\n ..._style,\n ..._hoverStyle\n }}\n >\n {children}\n </a>\n );\n};\n\nLink.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n href: PropTypes.string,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n title: PropTypes.string,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n skinHover: PropTypes.bool,\n hoverColor: PropTypes.string,\n download: PropTypes.bool,\n onClick: PropTypes.func,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n style: PropTypes.shape({})\n};\n\nLink.contextTypes = {\n skin: Provider.childContextTypes.skin,\n history: Provider.childContextTypes.history\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,IAAI,GAAG,CAACC,KAAD,EAAQC,aAAR,KAA0B;EACrC,MAAMC,IAAI,GAAG,IAAAC,4BAAA,EAAmBF,aAAnB,CAAb;EACA,MAAM,CAACG,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAM;IAACC,OAAO,EAAE;MAACC,UAAU;IAAX,IAA0B;EAApC,IAA0CP,aAAhD;;EACA,MAAM;IACJQ,SADI;IAEJC,UAAU,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCR,IAAnC,CAFT;IAGJ,aAAaS,QAAQ,GAAG,MAHpB;IAIJ,cAAcC;EAJV,IAMFZ,KANJ;EAAA,MAKKa,gBALL,iCAMIb,KANJ;;EAOA,MAAM;IACJc,IADI;IAEJC,OAAO,iBAFH;IAGJC,SAHI;IAIJC,KAAK,EAAEC,UAJH;IAKJC,QALI;IAMJC,YAAY,iBANR;IAOJC,YAAY,iBAPR;IAQJC;EARI,IASFtB,KATJ;EAWA,MAAMuB,gBAAgB,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACzCnB,UAAU,CAAC,IAAD,CAA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GfzB,IAAI,EAAEuB,kBAAA,CAAUE,MAHD;EAIf,aAAaF,kBAAA,CAAUE,MAJR;EAKf,cAAcF,kBAAA,CAAUE,MALT;EAMfC,KAAK,EAAEH,kBAAA,CAAUE,MANF;EAOfE,MAAM,EAAEJ,kBAAA,CAAUK,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB,CAPO;EAQfjC,SAAS,EAAE4B,kBAAA,CAAUM,IARN;EASfjC,UAAU,EAAE2B,kBAAA,CAAUE,MATP;EAUfjB,QAAQ,EAAEe,kBAAA,CAAUM,IAVL;EAWf5B,OAAO,EAAEsB,kBAAA,CAAUO,IAXJ;EAYfvB,YAAY,EAAEgB,kBAAA,CAAUO,IAZT;EAafxB,YAAY,EAAEiB,kBAAA,CAAUO,IAbT;EAcf3B,KAAK,EAAEoB,kBAAA,CAAUQ,KAAV,CAAgB,EAAhB;AAdQ,CAAjB;AAiBA9C,IAAI,CAAC+C,YAAL,GAAoB;EAClB5C,IAAI,EAAE6C,iBAAA,CAASC,iBAAT,CAA2B9C,IADf;EAElBK,OAAO,EAAEwC,iBAAA,CAASC,iBAAT,CAA2BzC;AAFlB,CAApB;eAKeR,I"}
@@ -7,7 +7,6 @@ declare namespace Slide {
7
7
  const subtitle: PropTypes.Requireable<string>;
8
8
  const light: PropTypes.Requireable<boolean>;
9
9
  const cta: PropTypes.Requireable<PropTypes.InferProps<{
10
- 'aria-label': PropTypes.Requireable<string>;
11
10
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
11
  href: PropTypes.Requireable<string>;
13
12
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -8,7 +8,6 @@ declare namespace News {
8
8
  const description: PropTypes.Requireable<string>;
9
9
  const authorLogo: PropTypes.Requireable<string>;
10
10
  const cta: PropTypes.Requireable<PropTypes.InferProps<{
11
- 'aria-label': PropTypes.Requireable<string>;
12
11
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
12
  href: PropTypes.Requireable<string>;
14
13
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -10,7 +10,6 @@ declare namespace ImageSlider {
10
10
  subtitle: PropTypes.Requireable<string>;
11
11
  light: PropTypes.Requireable<boolean>;
12
12
  cta: PropTypes.Requireable<PropTypes.InferProps<{
13
- 'aria-label': PropTypes.Requireable<string>;
14
13
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
15
14
  href: PropTypes.Requireable<string>;
16
15
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -42,7 +42,6 @@ declare class MoocHeader extends React.Component<any, any, any> {
42
42
  }> | null | undefined)[]>;
43
43
  }>>;
44
44
  links: PropTypes.Requireable<(PropTypes.InferProps<{
45
- 'aria-label': PropTypes.Requireable<string>;
46
45
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
47
46
  href: PropTypes.Requireable<string>;
48
47
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAwBC;IAtBC;;;;;;MAMC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BAIE;IAEF,6BAIE;IAEF,6BAucC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAyBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6FE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAwBC;IAtBC;;;;;;MAMC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,6BAIE;IAEF,6BAIE;IAEF,6BAucC;CACF"}
@@ -141,7 +141,6 @@ export namespace ButtonItem {
141
141
  const onClick_1: PropTypes.Requireable<(...args: any[]) => any>;
142
142
  export { onClick_1 as onClick };
143
143
  export const cta: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
144
- 'aria-label': PropTypes.Requireable<string>;
145
144
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
146
145
  href: PropTypes.Requireable<string>;
147
146
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/sidebar/index.js"],"names":[],"mappings":"AAeO,uDA0BN;;;;;;;;;;;;;AAaM;;;;;;;gBAON;;;;;;;;;;;;;;;;;;;;;AAiBM;;;;;;;gBAON;;;;;AAIM;;;;;;;;;;;;;gBAwDN;;;;;;;;;;;;;;;;;;;;AAeM;;;;;;gBAyBN;;;;;AAIM;;;;;gBAMN;;;;;;;;;;;;;;AASM;;;;;;;;;;gBA6CN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcM;;;;;;;;;gBAuBN;;;;;;;;;;;;;;;;;;;;;;;;AAkED;;8BAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/sidebar/index.js"],"names":[],"mappings":"AAeO,uDA0BN;;;;;;;;;;;;;AAaM;;;;;;;gBAON;;;;;;;;;;;;;;;;;;;;;AAiBM;;;;;;;gBAON;;;;;AAIM;;;;;;;;;;;;;gBAwDN;;;;;;;;;;;;;;;;;;;;AAeM;;;;;;gBAyBN;;;;;AAIM;;;;;gBAMN;;;;;;;;;;;;;;AASM;;;;;;;;;;gBA6CN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcM;;;;;;;;;gBAuBN;;;;;;;;;;;;;;;;;;;;;;;;AAkED;;8BAaC"}
@@ -4,7 +4,6 @@ declare namespace SlidePlayer {
4
4
  namespace propTypes {
5
5
  const player: PropTypes.Requireable<PropTypes.InferProps<{
6
6
  cta: PropTypes.Requireable<PropTypes.InferProps<{
7
- 'aria-label': PropTypes.Requireable<string>;
8
7
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
8
  href: PropTypes.Requireable<string>;
10
9
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -128,7 +128,6 @@ declare function ValidateButton({ cta }: {
128
128
  declare namespace ValidateButton {
129
129
  export namespace propTypes_1 {
130
130
  const cta_1: PropTypes.Requireable<PropTypes.InferProps<{
131
- 'aria-label': PropTypes.Requireable<string>;
132
131
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
133
132
  href: PropTypes.Requireable<string>;
134
133
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AAgZA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1HD;;uBAUC;;;;;;;;;;;;;;;;;;;;;;;;AAnOD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;gBAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhHpF,oEAQC;;;;;;;;;AA6MD;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/template/app-player/player/slides/index.js"],"names":[],"mappings":";AAgZA,qEAkBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1HD;;uBAUC;;;;;;;;;;;;;;;;;;;;;;;AAnOD;;;gBAaC;;;;;;;;;;;;;AAyDD;;;gBAAoF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhHpF,oEAQC;;;;;;;;;AA6MD;;gBAiBC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/GD,qEAaC"}
@@ -36,7 +36,6 @@ declare class PopinCorrection extends React.Component<any, any, any> {
36
36
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
37
37
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
38
38
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
39
- useButtonTag: PropTypes.Requireable<boolean>;
40
39
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
41
40
  }>>;
42
41
  type: PropTypes.Validator<string>;
@@ -84,7 +83,6 @@ declare class PopinCorrection extends React.Component<any, any, any> {
84
83
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
85
84
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
86
85
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
87
- useButtonTag: PropTypes.Requireable<boolean>;
88
86
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
89
87
  }>>;
90
88
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBAIC;IAFC;;MAA0B;IAkB5B,gCAEC;IAhBD,0BAEC;IAED,kBAQC;IALC,gCAIE;IAIF,aAAsB;IAGxB,sBAsEC;CACF"}
@@ -36,7 +36,6 @@ declare namespace PopinEnd {
36
36
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
37
37
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
38
38
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
39
- useButtonTag: PropTypes.Requireable<boolean>;
40
39
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
41
40
  }>>;
42
41
  type: PropTypes.Validator<string>;
@@ -42,7 +42,6 @@ declare namespace Summary {
42
42
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
43
43
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
44
44
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
45
- useButtonTag: PropTypes.Requireable<boolean>;
46
45
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
47
46
  }>>;
48
47
  type: PropTypes.Validator<string>;
@@ -72,7 +72,6 @@ declare namespace NextQuestionPart {
72
72
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
73
73
  onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
74
74
  onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
75
- useButtonTag: PropTypes.Requireable<boolean>;
76
75
  style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
77
76
  }>>;
78
77
  export { cta_1 as cta };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-header/index.js"],"names":[],"mappings":";AAyWA,oEAyDC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtID,gFA4DC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5HD,yDAmDC;;;;;;;;;;;;;;;;;;;;;;;;;AApOD;;gBAkBC;;;;;;;;;;;AA8ED;;;;;uBAYC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-header/index.js"],"names":[],"mappings":";AAyWA,oEAyDC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtID,gFA4DC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5HD,yDAmDC;;;;;;;;;;;;;;;;;;;;;;;;;AApOD;;gBAkBC;;;;;;;;;;;AA8ED;;;;;uBAYC"}
@@ -17,7 +17,6 @@ declare namespace TeamsDashboard {
17
17
  closeToolTipInformationTextAriaLabel: PropTypes.Requireable<string>;
18
18
  }>>;
19
19
  const platformLinks: PropTypes.Requireable<(PropTypes.InferProps<{
20
- 'aria-label': PropTypes.Requireable<string>;
21
20
  submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
22
21
  href: PropTypes.Requireable<string>;
23
22
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "11.14.13-alpha.1+affbf8328",
3
+ "version": "11.14.13",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -56,7 +56,7 @@
56
56
  "Soualmi Djamel <djamel.soualmi@coorpacademy.com>"
57
57
  ],
58
58
  "dependencies": {
59
- "@coorpacademy/nova-icons": "4.2.3",
59
+ "@coorpacademy/nova-icons": "4.2.4",
60
60
  "@coorpacademy/react-native-animation": "1.0.3",
61
61
  "@jwplayer/jwplayer-react": "^1.1.0",
62
62
  "@types/react": "^17.0.50",
@@ -168,5 +168,5 @@
168
168
  "last 2 versions",
169
169
  "IE 11"
170
170
  ],
171
- "gitHead": "affbf8328139c4d991db200ad21f06b31e18aa34"
171
+ "gitHead": "43204583486c5bfe41c1af8be5114fafaf52de76"
172
172
  }