@coorpacademy/components 11.14.13 → 11.14.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/cta/index.d.ts +36 -60
- package/es/atom/cta/index.d.ts.map +1 -1
- package/es/atom/cta/index.js +55 -94
- package/es/atom/cta/index.js.map +1 -1
- package/es/atom/cta/prop-types.d.ts +40 -0
- package/es/atom/cta/prop-types.d.ts.map +1 -0
- package/es/atom/cta/prop-types.js +22 -0
- package/es/atom/cta/prop-types.js.map +1 -0
- package/es/atom/link/index.d.ts +1 -0
- package/es/atom/link/index.d.ts.map +1 -1
- package/es/atom/link/index.js +17 -11
- package/es/atom/link/index.js.map +1 -1
- package/es/atom/slide/index.d.ts +2 -0
- package/es/globals.d.js.map +1 -1
- package/es/molecule/news/index.d.ts +2 -0
- package/es/organism/mooc/image-slider/index.d.ts +2 -0
- package/es/organism/mooc-header/index.d.ts +2 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/sidebar/index.d.ts +2 -0
- package/es/organism/sidebar/index.d.ts.map +1 -1
- package/es/template/app-player/player/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +1 -0
- package/es/template/app-player/popin-end/summary.d.ts +1 -0
- package/es/template/app-player/popin-header/index.d.ts +1 -0
- package/es/template/app-player/popin-header/index.d.ts.map +1 -1
- package/es/template/teams-dashboard/index.d.ts +2 -0
- package/lib/atom/cta/index.d.ts +36 -60
- package/lib/atom/cta/index.d.ts.map +1 -1
- package/lib/atom/cta/index.js +61 -95
- package/lib/atom/cta/index.js.map +1 -1
- package/lib/atom/cta/prop-types.d.ts +40 -0
- package/lib/atom/cta/prop-types.d.ts.map +1 -0
- package/lib/atom/cta/prop-types.js +32 -0
- package/lib/atom/cta/prop-types.js.map +1 -0
- package/lib/atom/link/index.d.ts +1 -0
- package/lib/atom/link/index.d.ts.map +1 -1
- package/lib/atom/link/index.js +17 -11
- package/lib/atom/link/index.js.map +1 -1
- package/lib/atom/slide/index.d.ts +2 -0
- package/lib/globals.d.js.map +1 -1
- package/lib/molecule/news/index.d.ts +2 -0
- package/lib/organism/mooc/image-slider/index.d.ts +2 -0
- package/lib/organism/mooc-header/index.d.ts +2 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/sidebar/index.d.ts +2 -0
- package/lib/organism/sidebar/index.d.ts.map +1 -1
- package/lib/template/app-player/player/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +1 -0
- package/lib/template/app-player/popin-end/summary.d.ts +1 -0
- package/lib/template/app-player/popin-header/index.d.ts +1 -0
- package/lib/template/app-player/popin-header/index.d.ts.map +1 -1
- package/lib/template/teams-dashboard/index.d.ts +2 -0
- package/package.json +2 -2
|
@@ -141,6 +141,7 @@ 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>;
|
|
144
145
|
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
145
146
|
href: PropTypes.Requireable<string>;
|
|
146
147
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -155,6 +156,7 @@ export namespace ButtonItem {
|
|
|
155
156
|
rectangular: PropTypes.Requireable<boolean>;
|
|
156
157
|
fullWidth: PropTypes.Requireable<boolean>;
|
|
157
158
|
certificationButton: PropTypes.Requireable<boolean>;
|
|
159
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
158
160
|
}> | null | undefined>>;
|
|
159
161
|
const uppercase_4: PropTypes.Requireable<boolean>;
|
|
160
162
|
export { uppercase_4 as uppercase };
|
|
@@ -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
|
|
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,6 +4,7 @@ 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>;
|
|
7
8
|
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
9
|
href: PropTypes.Requireable<string>;
|
|
9
10
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -18,6 +19,7 @@ declare namespace SlidePlayer {
|
|
|
18
19
|
rectangular: PropTypes.Requireable<boolean>;
|
|
19
20
|
fullWidth: PropTypes.Requireable<boolean>;
|
|
20
21
|
certificationButton: PropTypes.Requireable<boolean>;
|
|
22
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
21
23
|
}>>;
|
|
22
24
|
step: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
25
|
current: PropTypes.Validator<number>;
|
|
@@ -128,6 +128,7 @@ 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>;
|
|
131
132
|
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
132
133
|
href: PropTypes.Requireable<string>;
|
|
133
134
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -142,6 +143,7 @@ declare namespace ValidateButton {
|
|
|
142
143
|
rectangular: PropTypes.Requireable<boolean>;
|
|
143
144
|
fullWidth: PropTypes.Requireable<boolean>;
|
|
144
145
|
certificationButton: PropTypes.Requireable<boolean>;
|
|
146
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
145
147
|
}>>;
|
|
146
148
|
export { cta_1 as cta };
|
|
147
149
|
}
|
|
@@ -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
|
|
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,6 +36,7 @@ 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>;
|
|
39
40
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
40
41
|
}>>;
|
|
41
42
|
type: PropTypes.Validator<string>;
|
|
@@ -83,6 +84,7 @@ declare class PopinCorrection extends React.Component<any, any, any> {
|
|
|
83
84
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
85
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
85
86
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
87
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
86
88
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
87
89
|
}>>;
|
|
88
90
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/app-player/popin-correction/index.js"],"names":[],"mappings":";AAmGA;IACE
|
|
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,6 +36,7 @@ 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>;
|
|
39
40
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
40
41
|
}>>;
|
|
41
42
|
type: PropTypes.Validator<string>;
|
|
@@ -42,6 +42,7 @@ 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>;
|
|
45
46
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
46
47
|
}>>;
|
|
47
48
|
type: PropTypes.Validator<string>;
|
|
@@ -72,6 +72,7 @@ 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>;
|
|
75
76
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
76
77
|
}>>;
|
|
77
78
|
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
|
|
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,6 +17,7 @@ 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>;
|
|
20
21
|
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
21
22
|
href: PropTypes.Requireable<string>;
|
|
22
23
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -31,6 +32,7 @@ declare namespace TeamsDashboard {
|
|
|
31
32
|
rectangular: PropTypes.Requireable<boolean>;
|
|
32
33
|
fullWidth: PropTypes.Requireable<boolean>;
|
|
33
34
|
certificationButton: PropTypes.Requireable<boolean>;
|
|
35
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
34
36
|
}> | null | undefined)[]>;
|
|
35
37
|
const sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
36
38
|
contentType: PropTypes.Requireable<string>;
|
package/lib/atom/cta/index.d.ts
CHANGED
|
@@ -1,73 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { WebContextValues } from '../provider/web-context';
|
|
3
|
+
import type { CTAProps } from './prop-types';
|
|
4
|
+
declare const CTA: {
|
|
5
|
+
(props: CTAProps, legacyContext: WebContextValues): JSX.Element;
|
|
6
|
+
propTypes: {
|
|
7
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
8
|
+
submitValue: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
9
|
+
href: import("prop-types").Requireable<string>;
|
|
10
|
+
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
11
|
+
target: import("prop-types").Requireable<string>;
|
|
12
|
+
name: import("prop-types").Requireable<string>;
|
|
13
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
14
|
+
light: import("prop-types").Requireable<boolean>;
|
|
15
|
+
secondary: import("prop-types").Requireable<boolean>;
|
|
16
|
+
small: import("prop-types").Requireable<boolean>;
|
|
17
|
+
className: import("prop-types").Requireable<string>;
|
|
18
|
+
logout: import("prop-types").Requireable<boolean>;
|
|
19
|
+
rectangular: import("prop-types").Requireable<boolean>;
|
|
20
|
+
fullWidth: import("prop-types").Requireable<boolean>;
|
|
21
|
+
certificationButton: import("prop-types").Requireable<boolean>;
|
|
22
|
+
useButtonTag: import("prop-types").Requireable<boolean>;
|
|
18
23
|
};
|
|
19
|
-
|
|
20
|
-
skin:
|
|
21
|
-
common:
|
|
24
|
+
contextTypes: {
|
|
25
|
+
skin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
26
|
+
common: import("prop-types").Requireable<{
|
|
22
27
|
[x: string]: any;
|
|
23
28
|
}>;
|
|
24
|
-
images:
|
|
25
|
-
'logo-mobile':
|
|
26
|
-
logo:
|
|
27
|
-
'logo-email':
|
|
28
|
-
login:
|
|
29
|
+
images: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
30
|
+
'logo-mobile': import("prop-types").Requireable<any>;
|
|
31
|
+
logo: import("prop-types").Requireable<any>;
|
|
32
|
+
'logo-email': import("prop-types").Requireable<any>;
|
|
33
|
+
login: import("prop-types").Requireable<any>;
|
|
29
34
|
}>>;
|
|
30
|
-
icons:
|
|
35
|
+
icons: import("prop-types").Requireable<{
|
|
31
36
|
[x: string]: any;
|
|
32
37
|
}>;
|
|
33
|
-
mod:
|
|
38
|
+
mod: import("prop-types").Requireable<{
|
|
34
39
|
[x: string]: any;
|
|
35
40
|
}>;
|
|
36
|
-
courses:
|
|
37
|
-
texts:
|
|
41
|
+
courses: import("prop-types").Requireable<any[]>;
|
|
42
|
+
texts: import("prop-types").Requireable<{
|
|
38
43
|
[x: string]: any;
|
|
39
44
|
}>;
|
|
40
45
|
}>>;
|
|
41
46
|
};
|
|
42
|
-
|
|
43
|
-
|
|
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;
|
|
70
|
-
}
|
|
71
|
-
import React from "react";
|
|
72
|
-
import PropTypes from "prop-types";
|
|
47
|
+
};
|
|
48
|
+
export default CTA;
|
|
73
49
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/index.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAI9D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAE3C,QAAA,MAAM,GAAG;YAAW,QAAQ,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuG5D,CAAC;AAQF,eAAe,GAAG,CAAC"}
|
package/lib/atom/cta/index.js
CHANGED
|
@@ -7,59 +7,58 @@ var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
|
7
7
|
|
|
8
8
|
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
9
9
|
|
|
10
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _cssColorFunction = require("css-color-function");
|
|
13
13
|
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
15
|
|
|
18
16
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
19
17
|
|
|
20
|
-
var _provider = _interopRequireDefault(require("../provider"));
|
|
21
|
-
|
|
22
18
|
var _link = _interopRequireDefault(require("../link"));
|
|
23
19
|
|
|
20
|
+
var _provider = _interopRequireDefault(require("../provider"));
|
|
21
|
+
|
|
24
22
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
25
23
|
|
|
24
|
+
var _propTypes = _interopRequireDefault(require("./prop-types"));
|
|
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
|
+
|
|
26
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
disabled = false,
|
|
59
|
-
light = false,
|
|
60
|
-
secondary = false,
|
|
61
|
-
logout = false
|
|
62
|
-
} = this.props;
|
|
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
|
+
useButtonTag = false
|
|
53
|
+
} = props;
|
|
54
|
+
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
55
|
+
const handleMouseEnter = (0, _react.useCallback)(() => {
|
|
56
|
+
setHovered(true);
|
|
57
|
+
}, []);
|
|
58
|
+
const handleMouseLeave = (0, _react.useCallback)(() => {
|
|
59
|
+
setHovered(false);
|
|
60
|
+
}, []);
|
|
61
|
+
const getStyle = (0, _react.useCallback)(() => {
|
|
63
62
|
const color = (0, _get2.default)('common.primary', skin);
|
|
64
63
|
const grey = (0, _get2.default)('common.grey', skin);
|
|
65
64
|
if (logout) return;
|
|
@@ -91,65 +90,32 @@ class CTA extends _react.default.Component {
|
|
|
91
90
|
borderColor: color,
|
|
92
91
|
backgroundColor: color
|
|
93
92
|
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
}
|
|
93
|
+
}, [disabled, hovered, light, logout, secondary, skin]);
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
95
|
+
href: href,
|
|
96
|
+
onClick: disabled ? _noop2.default : onClick,
|
|
97
|
+
onMouseEnter: handleMouseEnter,
|
|
98
|
+
onMouseLeave: handleMouseLeave,
|
|
99
|
+
target: target,
|
|
100
|
+
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),
|
|
101
|
+
"data-name": ctaName || 'cta',
|
|
102
|
+
style: getStyle(),
|
|
103
|
+
"aria-label": ariaLabel,
|
|
104
|
+
useButtonTag: useButtonTag
|
|
105
|
+
}, logout ? /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: _style.default.logoutWrapper,
|
|
107
|
+
"data-name": "cta-logout-label"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyLogout, {
|
|
109
|
+
height: 15,
|
|
110
|
+
width: 15,
|
|
111
|
+
className: _style.default.logoutIcon
|
|
112
|
+
}), submitValue) : submitValue);
|
|
113
|
+
};
|
|
133
114
|
|
|
115
|
+
CTA.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
134
116
|
CTA.contextTypes = {
|
|
135
117
|
skin: _provider.default.childContextTypes.skin
|
|
136
118
|
};
|
|
137
|
-
CTA.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
138
|
-
submitValue: _link.default.propTypes.children,
|
|
139
|
-
href: _link.default.propTypes.href,
|
|
140
|
-
onClick: _link.default.propTypes.onClick,
|
|
141
|
-
target: _link.default.propTypes.target,
|
|
142
|
-
name: _propTypes.default.string,
|
|
143
|
-
disabled: _propTypes.default.bool,
|
|
144
|
-
light: _propTypes.default.bool,
|
|
145
|
-
secondary: _propTypes.default.bool,
|
|
146
|
-
small: _propTypes.default.bool,
|
|
147
|
-
className: _propTypes.default.string,
|
|
148
|
-
logout: _propTypes.default.bool,
|
|
149
|
-
rectangular: _propTypes.default.bool,
|
|
150
|
-
fullWidth: _propTypes.default.bool,
|
|
151
|
-
certificationButton: _propTypes.default.bool
|
|
152
|
-
} : {};
|
|
153
119
|
var _default = CTA;
|
|
154
120
|
exports.default = _default;
|
|
155
121
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CTA","
|
|
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","useButtonTag","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","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/cta/index.tsx"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport {get, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaCompositionCoorpacademyLogout as LogoutIcon} from '@coorpacademy/nova-icons';\nimport Link from '../link';\nimport type {WebContextValues} from '../provider/web-context';\nimport Provider from '../provider';\nimport style from './style.css';\nimport propTypes from './prop-types';\nimport type {CTAProps} from './prop-types';\n\nconst CTA = (props: CTAProps, legacyContext: WebContextValues) => {\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 useButtonTag = 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 useButtonTag={useButtonTag}\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 = propTypes;\n\nCTA.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default CTA;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare const propTypes: {
|
|
4
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
5
|
+
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
6
|
+
href: PropTypes.Requireable<string>;
|
|
7
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
+
target: PropTypes.Requireable<string>;
|
|
9
|
+
name: PropTypes.Requireable<string>;
|
|
10
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
11
|
+
light: PropTypes.Requireable<boolean>;
|
|
12
|
+
secondary: PropTypes.Requireable<boolean>;
|
|
13
|
+
small: PropTypes.Requireable<boolean>;
|
|
14
|
+
className: PropTypes.Requireable<string>;
|
|
15
|
+
logout: PropTypes.Requireable<boolean>;
|
|
16
|
+
rectangular: PropTypes.Requireable<boolean>;
|
|
17
|
+
fullWidth: PropTypes.Requireable<boolean>;
|
|
18
|
+
certificationButton: PropTypes.Requireable<boolean>;
|
|
19
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
20
|
+
};
|
|
21
|
+
export declare type CTAProps = {
|
|
22
|
+
'aria-label'?: string;
|
|
23
|
+
submitValue: React.ReactElement;
|
|
24
|
+
href: string;
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
target: '_self' | '_blank' | '_parent' | '_top';
|
|
27
|
+
name: string;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
light: boolean;
|
|
30
|
+
secondary: boolean;
|
|
31
|
+
small: boolean;
|
|
32
|
+
className: string;
|
|
33
|
+
logout: boolean;
|
|
34
|
+
rectangular: boolean;
|
|
35
|
+
fullWidth: boolean;
|
|
36
|
+
certificationButton: boolean;
|
|
37
|
+
useButtonTag: boolean;
|
|
38
|
+
};
|
|
39
|
+
export default propTypes;
|
|
40
|
+
//# sourceMappingURL=prop-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/cta/prop-types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBd,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
+
|
|
8
|
+
var _link = _interopRequireDefault(require("../link"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const propTypes = {
|
|
13
|
+
'aria-label': _link.default.propTypes['aria-label'],
|
|
14
|
+
submitValue: _link.default.propTypes.children,
|
|
15
|
+
href: _link.default.propTypes.href,
|
|
16
|
+
onClick: _link.default.propTypes.onClick,
|
|
17
|
+
target: _link.default.propTypes.target,
|
|
18
|
+
name: _propTypes.default.string,
|
|
19
|
+
disabled: _propTypes.default.bool,
|
|
20
|
+
light: _propTypes.default.bool,
|
|
21
|
+
secondary: _propTypes.default.bool,
|
|
22
|
+
small: _propTypes.default.bool,
|
|
23
|
+
className: _propTypes.default.string,
|
|
24
|
+
logout: _propTypes.default.bool,
|
|
25
|
+
rectangular: _propTypes.default.bool,
|
|
26
|
+
fullWidth: _propTypes.default.bool,
|
|
27
|
+
certificationButton: _propTypes.default.bool,
|
|
28
|
+
useButtonTag: _link.default.propTypes.useButtonTag
|
|
29
|
+
};
|
|
30
|
+
var _default = propTypes;
|
|
31
|
+
exports.default = _default;
|
|
32
|
+
//# sourceMappingURL=prop-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["propTypes","Link","submitValue","children","href","onClick","target","name","PropTypes","string","disabled","bool","light","secondary","small","className","logout","rectangular","fullWidth","certificationButton","useButtonTag"],"sources":["../../../src/atom/cta/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport Link from '../link';\n\nconst 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 useButtonTag: Link.propTypes.useButtonTag\n};\n\nexport type CTAProps = {\n 'aria-label'?: string;\n submitValue: React.ReactElement;\n href: string;\n onClick?: () => void;\n target: '_self' | '_blank' | '_parent' | '_top';\n name: string;\n disabled: boolean;\n light: boolean;\n secondary: boolean;\n small: boolean;\n className: string;\n logout: boolean;\n rectangular: boolean;\n fullWidth: boolean;\n certificationButton: boolean;\n useButtonTag: boolean;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;AACA;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,cAAcC,aAAA,CAAKD,SAAL,CAAe,YAAf,CADE;EAEhBE,WAAW,EAAED,aAAA,CAAKD,SAAL,CAAeG,QAFZ;EAGhBC,IAAI,EAAEH,aAAA,CAAKD,SAAL,CAAeI,IAHL;EAIhBC,OAAO,EAAEJ,aAAA,CAAKD,SAAL,CAAeK,OAJR;EAKhBC,MAAM,EAAEL,aAAA,CAAKD,SAAL,CAAeM,MALP;EAMhBC,IAAI,EAAEC,kBAAA,CAAUC,MANA;EAOhBC,QAAQ,EAAEF,kBAAA,CAAUG,IAPJ;EAQhBC,KAAK,EAAEJ,kBAAA,CAAUG,IARD;EAShBE,SAAS,EAAEL,kBAAA,CAAUG,IATL;EAUhBG,KAAK,EAAEN,kBAAA,CAAUG,IAVD;EAWhBI,SAAS,EAAEP,kBAAA,CAAUC,MAXL;EAYhBO,MAAM,EAAER,kBAAA,CAAUG,IAZF;EAahBM,WAAW,EAAET,kBAAA,CAAUG,IAbP;EAchBO,SAAS,EAAEV,kBAAA,CAAUG,IAdL;EAehBQ,mBAAmB,EAAEX,kBAAA,CAAUG,IAff;EAgBhBS,YAAY,EAAEnB,aAAA,CAAKD,SAAL,CAAeoB;AAhBb,CAAlB;eAsCepB,S"}
|
package/lib/atom/link/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ 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>;
|
|
18
19
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
19
20
|
};
|
|
20
21
|
namespace contextTypes {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/link/index.js"],"names":[],"mappings":";AAMA,mEA0GC"}
|