@coorpacademy/components 11.14.13-alpha.2 → 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 +37 -35
- package/es/atom/cta/index.d.ts.map +1 -1
- package/es/atom/cta/index.js +3 -20
- 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/globals.d.js.map +1 -1
- package/lib/atom/cta/index.d.ts +37 -35
- package/lib/atom/cta/index.d.ts.map +1 -1
- package/lib/atom/cta/index.js +5 -22
- 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/globals.d.js.map +1 -1
- package/package.json +3 -3
package/es/atom/cta/index.d.ts
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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>;
|
|
21
23
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
common:
|
|
24
|
+
contextTypes: {
|
|
25
|
+
skin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
26
|
+
common: import("prop-types").Requireable<{
|
|
25
27
|
[x: string]: any;
|
|
26
28
|
}>;
|
|
27
|
-
images:
|
|
28
|
-
'logo-mobile':
|
|
29
|
-
logo:
|
|
30
|
-
'logo-email':
|
|
31
|
-
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>;
|
|
32
34
|
}>>;
|
|
33
|
-
icons:
|
|
35
|
+
icons: import("prop-types").Requireable<{
|
|
34
36
|
[x: string]: any;
|
|
35
37
|
}>;
|
|
36
|
-
mod:
|
|
38
|
+
mod: import("prop-types").Requireable<{
|
|
37
39
|
[x: string]: any;
|
|
38
40
|
}>;
|
|
39
|
-
courses:
|
|
40
|
-
texts:
|
|
41
|
+
courses: import("prop-types").Requireable<any[]>;
|
|
42
|
+
texts: import("prop-types").Requireable<{
|
|
41
43
|
[x: string]: any;
|
|
42
44
|
}>;
|
|
43
45
|
}>>;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default CTA;
|
|
47
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/es/atom/cta/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import _noop from "lodash/fp/noop";
|
|
|
2
2
|
import _get from "lodash/fp/get";
|
|
3
3
|
import React, { useCallback, useState } from 'react';
|
|
4
4
|
import { convert } from 'css-color-function';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import classnames from 'classnames';
|
|
7
6
|
import { NovaCompositionCoorpacademyLogout as LogoutIcon } from '@coorpacademy/nova-icons';
|
|
8
|
-
import Provider from '../provider';
|
|
9
7
|
import Link from '../link';
|
|
8
|
+
import Provider from '../provider';
|
|
10
9
|
import style from './style.css';
|
|
10
|
+
import propTypes from './prop-types';
|
|
11
11
|
|
|
12
12
|
const CTA = (props, legacyContext) => {
|
|
13
13
|
const {
|
|
@@ -94,24 +94,7 @@ const CTA = (props, legacyContext) => {
|
|
|
94
94
|
}), submitValue) : submitValue);
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
CTA.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
98
|
-
'aria-label': Link.propTypes['aria-label'],
|
|
99
|
-
submitValue: Link.propTypes.children,
|
|
100
|
-
href: Link.propTypes.href,
|
|
101
|
-
onClick: Link.propTypes.onClick,
|
|
102
|
-
target: Link.propTypes.target,
|
|
103
|
-
name: PropTypes.string,
|
|
104
|
-
disabled: PropTypes.bool,
|
|
105
|
-
light: PropTypes.bool,
|
|
106
|
-
secondary: PropTypes.bool,
|
|
107
|
-
small: PropTypes.bool,
|
|
108
|
-
className: PropTypes.string,
|
|
109
|
-
logout: PropTypes.bool,
|
|
110
|
-
rectangular: PropTypes.bool,
|
|
111
|
-
fullWidth: PropTypes.bool,
|
|
112
|
-
certificationButton: PropTypes.bool,
|
|
113
|
-
useButtonTag: Link.propTypes.useButtonTag
|
|
114
|
-
} : {};
|
|
97
|
+
CTA.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
115
98
|
CTA.contextTypes = {
|
|
116
99
|
skin: Provider.childContextTypes.skin
|
|
117
100
|
};
|
package/es/atom/cta/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","convert","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","convert","classnames","NovaCompositionCoorpacademyLogout","LogoutIcon","Link","Provider","style","propTypes","CTA","props","legacyContext","skin","ariaLabel","submitValue","name","ctaName","href","target","disabled","light","small","secondary","onClick","className","logout","rectangular","fullWidth","certificationButton","useButtonTag","hovered","setHovered","handleMouseEnter","handleMouseLeave","getStyle","color","grey","backgroundColor","borderColor","opacity","darkenColor","button","smallButton","lightButton","secondaryButton","logoutButton","rectangularButton","logoutWrapper","logoutIcon","contextTypes","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,22 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import Link from '../link';
|
|
3
|
+
const propTypes = {
|
|
4
|
+
'aria-label': Link.propTypes['aria-label'],
|
|
5
|
+
submitValue: Link.propTypes.children,
|
|
6
|
+
href: Link.propTypes.href,
|
|
7
|
+
onClick: Link.propTypes.onClick,
|
|
8
|
+
target: Link.propTypes.target,
|
|
9
|
+
name: PropTypes.string,
|
|
10
|
+
disabled: PropTypes.bool,
|
|
11
|
+
light: PropTypes.bool,
|
|
12
|
+
secondary: PropTypes.bool,
|
|
13
|
+
small: PropTypes.bool,
|
|
14
|
+
className: PropTypes.string,
|
|
15
|
+
logout: PropTypes.bool,
|
|
16
|
+
rectangular: PropTypes.bool,
|
|
17
|
+
fullWidth: PropTypes.bool,
|
|
18
|
+
certificationButton: PropTypes.bool,
|
|
19
|
+
useButtonTag: Link.propTypes.useButtonTag
|
|
20
|
+
};
|
|
21
|
+
export default propTypes;
|
|
22
|
+
//# sourceMappingURL=prop-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.js","names":["PropTypes","Link","propTypes","submitValue","children","href","onClick","target","name","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,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AAEA,MAAMC,SAAS,GAAG;EAChB,cAAcD,IAAI,CAACC,SAAL,CAAe,YAAf,CADE;EAEhBC,WAAW,EAAEF,IAAI,CAACC,SAAL,CAAeE,QAFZ;EAGhBC,IAAI,EAAEJ,IAAI,CAACC,SAAL,CAAeG,IAHL;EAIhBC,OAAO,EAAEL,IAAI,CAACC,SAAL,CAAeI,OAJR;EAKhBC,MAAM,EAAEN,IAAI,CAACC,SAAL,CAAeK,MALP;EAMhBC,IAAI,EAAER,SAAS,CAACS,MANA;EAOhBC,QAAQ,EAAEV,SAAS,CAACW,IAPJ;EAQhBC,KAAK,EAAEZ,SAAS,CAACW,IARD;EAShBE,SAAS,EAAEb,SAAS,CAACW,IATL;EAUhBG,KAAK,EAAEd,SAAS,CAACW,IAVD;EAWhBI,SAAS,EAAEf,SAAS,CAACS,MAXL;EAYhBO,MAAM,EAAEhB,SAAS,CAACW,IAZF;EAahBM,WAAW,EAAEjB,SAAS,CAACW,IAbP;EAchBO,SAAS,EAAElB,SAAS,CAACW,IAdL;EAehBQ,mBAAmB,EAAEnB,SAAS,CAACW,IAff;EAgBhBS,YAAY,EAAEnB,IAAI,CAACC,SAAL,CAAekB;AAhBb,CAAlB;AAsCA,eAAelB,SAAf"}
|
package/es/globals.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module '@coorpacademy/translate';\ndeclare module 'browser-env';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module '@coorpacademy/translate';\ndeclare module 'browser-env';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'css-color-function';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
|
package/lib/atom/cta/index.d.ts
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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>;
|
|
21
23
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
common:
|
|
24
|
+
contextTypes: {
|
|
25
|
+
skin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
26
|
+
common: import("prop-types").Requireable<{
|
|
25
27
|
[x: string]: any;
|
|
26
28
|
}>;
|
|
27
|
-
images:
|
|
28
|
-
'logo-mobile':
|
|
29
|
-
logo:
|
|
30
|
-
'logo-email':
|
|
31
|
-
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>;
|
|
32
34
|
}>>;
|
|
33
|
-
icons:
|
|
35
|
+
icons: import("prop-types").Requireable<{
|
|
34
36
|
[x: string]: any;
|
|
35
37
|
}>;
|
|
36
|
-
mod:
|
|
38
|
+
mod: import("prop-types").Requireable<{
|
|
37
39
|
[x: string]: any;
|
|
38
40
|
}>;
|
|
39
|
-
courses:
|
|
40
|
-
texts:
|
|
41
|
+
courses: import("prop-types").Requireable<any[]>;
|
|
42
|
+
texts: import("prop-types").Requireable<{
|
|
41
43
|
[x: string]: any;
|
|
42
44
|
}>;
|
|
43
45
|
}>>;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default CTA;
|
|
47
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
|
@@ -11,18 +11,18 @@ 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
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
27
|
|
|
28
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; }
|
|
@@ -112,24 +112,7 @@ const CTA = (props, legacyContext) => {
|
|
|
112
112
|
}), submitValue) : submitValue);
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
CTA.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
116
|
-
'aria-label': _link.default.propTypes['aria-label'],
|
|
117
|
-
submitValue: _link.default.propTypes.children,
|
|
118
|
-
href: _link.default.propTypes.href,
|
|
119
|
-
onClick: _link.default.propTypes.onClick,
|
|
120
|
-
target: _link.default.propTypes.target,
|
|
121
|
-
name: _propTypes.default.string,
|
|
122
|
-
disabled: _propTypes.default.bool,
|
|
123
|
-
light: _propTypes.default.bool,
|
|
124
|
-
secondary: _propTypes.default.bool,
|
|
125
|
-
small: _propTypes.default.bool,
|
|
126
|
-
className: _propTypes.default.string,
|
|
127
|
-
logout: _propTypes.default.bool,
|
|
128
|
-
rectangular: _propTypes.default.bool,
|
|
129
|
-
fullWidth: _propTypes.default.bool,
|
|
130
|
-
certificationButton: _propTypes.default.bool,
|
|
131
|
-
useButtonTag: _link.default.propTypes.useButtonTag
|
|
132
|
-
} : {};
|
|
115
|
+
CTA.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
|
|
133
116
|
CTA.contextTypes = {
|
|
134
117
|
skin: _provider.default.childContextTypes.skin
|
|
135
118
|
};
|
|
@@ -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","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","
|
|
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/globals.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module '@coorpacademy/translate';\ndeclare module 'browser-env';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"globals.d.js","names":[],"sources":["../src/globals.d.ts"],"sourcesContent":["declare module '@coorpacademy/nova-icons';\ndeclare module '@coorpacademy/react-native-slider';\ndeclare module '@react-native-community/blur';\ndeclare module '@coorpacademy/translate';\ndeclare module 'browser-env';\ndeclare module 'react-native/*';\ndeclare module 'color';\ndeclare module 'css-color-function';\ndeclare module 'classnames';\ndeclare module '*.css';\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.14",
|
|
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.
|
|
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": "
|
|
171
|
+
"gitHead": "e1da60be0d25284ee4c5e969001f34661906279a"
|
|
172
172
|
}
|