@coorpacademy/components 11.14.13 → 11.14.15-alpha.25
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/course-section/style.css +4 -6
- package/es/molecule/draggable/style.css +9 -5
- package/es/molecule/draggable-list/index.d.ts +50 -2
- package/es/molecule/draggable-list/index.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.js +7 -4
- package/es/molecule/draggable-list/index.js.map +1 -1
- package/es/molecule/news/index.d.ts +2 -0
- package/es/organism/list-item/index.d.ts +1 -0
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +4 -3
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +6 -4
- package/es/organism/list-items/index.d.ts +4 -0
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +17 -4
- package/es/organism/list-items/index.js.map +1 -1
- 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/back-office/brand-update/index.d.ts +4 -0
- 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/course-section/style.css +4 -6
- package/lib/molecule/draggable/style.css +9 -5
- package/lib/molecule/draggable-list/index.d.ts +50 -2
- package/lib/molecule/draggable-list/index.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.js +8 -4
- package/lib/molecule/draggable-list/index.js.map +1 -1
- package/lib/molecule/news/index.d.ts +2 -0
- package/lib/organism/list-item/index.d.ts +1 -0
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +4 -3
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +6 -4
- package/lib/organism/list-items/index.d.ts +4 -0
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +19 -4
- package/lib/organism/list-items/index.js.map +1 -1
- 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/back-office/brand-update/index.d.ts +4 -0
- package/lib/template/teams-dashboard/index.d.ts +2 -0
- package/package.json +2 -2
package/es/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/es/atom/cta/index.js
CHANGED
|
@@ -1,50 +1,44 @@
|
|
|
1
1
|
import _noop from "lodash/fp/noop";
|
|
2
2
|
import _get from "lodash/fp/get";
|
|
3
|
-
import React from 'react';
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
disabled = false,
|
|
43
|
-
light = false,
|
|
44
|
-
secondary = false,
|
|
45
|
-
logout = false
|
|
46
|
-
} = this.props;
|
|
47
|
-
|
|
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
|
+
useButtonTag = false
|
|
33
|
+
} = props;
|
|
34
|
+
const [hovered, setHovered] = useState(false);
|
|
35
|
+
const handleMouseEnter = useCallback(() => {
|
|
36
|
+
setHovered(true);
|
|
37
|
+
}, []);
|
|
38
|
+
const handleMouseLeave = useCallback(() => {
|
|
39
|
+
setHovered(false);
|
|
40
|
+
}, []);
|
|
41
|
+
const getStyle = useCallback(() => {
|
|
48
42
|
const color = _get('common.primary', skin);
|
|
49
43
|
|
|
50
44
|
const grey = _get('common.grey', skin);
|
|
@@ -78,64 +72,31 @@ class CTA extends React.Component {
|
|
|
78
72
|
borderColor: color,
|
|
79
73
|
backgroundColor: color
|
|
80
74
|
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
}
|
|
118
|
-
|
|
119
|
-
}
|
|
75
|
+
}, [disabled, hovered, light, logout, secondary, skin]);
|
|
76
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
77
|
+
href: href,
|
|
78
|
+
onClick: disabled ? _noop : onClick,
|
|
79
|
+
onMouseEnter: handleMouseEnter,
|
|
80
|
+
onMouseLeave: handleMouseLeave,
|
|
81
|
+
target: target,
|
|
82
|
+
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),
|
|
83
|
+
"data-name": ctaName || 'cta',
|
|
84
|
+
style: getStyle(),
|
|
85
|
+
"aria-label": ariaLabel,
|
|
86
|
+
useButtonTag: useButtonTag
|
|
87
|
+
}, logout ? /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: style.logoutWrapper,
|
|
89
|
+
"data-name": "cta-logout-label"
|
|
90
|
+
}, /*#__PURE__*/React.createElement(LogoutIcon, {
|
|
91
|
+
height: 15,
|
|
92
|
+
width: 15,
|
|
93
|
+
className: style.logoutIcon
|
|
94
|
+
}), submitValue) : submitValue);
|
|
95
|
+
};
|
|
120
96
|
|
|
97
|
+
CTA.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
121
98
|
CTA.contextTypes = {
|
|
122
99
|
skin: Provider.childContextTypes.skin
|
|
123
100
|
};
|
|
124
|
-
CTA.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
125
|
-
submitValue: Link.propTypes.children,
|
|
126
|
-
href: Link.propTypes.href,
|
|
127
|
-
onClick: Link.propTypes.onClick,
|
|
128
|
-
target: Link.propTypes.target,
|
|
129
|
-
name: PropTypes.string,
|
|
130
|
-
disabled: PropTypes.bool,
|
|
131
|
-
light: PropTypes.bool,
|
|
132
|
-
secondary: PropTypes.bool,
|
|
133
|
-
small: PropTypes.bool,
|
|
134
|
-
className: PropTypes.string,
|
|
135
|
-
logout: PropTypes.bool,
|
|
136
|
-
rectangular: PropTypes.bool,
|
|
137
|
-
fullWidth: PropTypes.bool,
|
|
138
|
-
certificationButton: PropTypes.bool
|
|
139
|
-
} : {};
|
|
140
101
|
export default CTA;
|
|
141
102
|
//# sourceMappingURL=index.js.map
|
package/es/atom/cta/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","
|
|
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":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,iCAAiC,IAAIC,UAA7C,QAA8D,0BAA9D;AACA,OAAOC,IAAP,MAAiB,SAAjB;AAEA,OAAOC,QAAP,MAAqB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AAEgB;EArBhB,GAuBGJ,MAAM,gBACL;IAAK,SAAS,EAAElB,KAAK,CAACwC,aAAtB;IAAqC,aAAU;EAA/C,gBACE,oBAAC,UAAD;IAAY,MAAM,EAAE,EAApB;IAAwB,KAAK,EAAE,EAA/B;IAAmC,SAAS,EAAExC,KAAK,CAACyC;EAApD,EADF,EAEGlC,WAFH,CADK,GAMLA,WA7BJ,CADF;AAkCD,CAvGD;;AAyGAL,GAAG,CAACD,SAAJ,2CAAgBA,SAAhB;AAEAC,GAAG,CAACwC,YAAJ,GAAmB;EACjBrC,IAAI,EAAEN,QAAQ,CAAC4C,iBAAT,CAA2BtC;AADhB,CAAnB;AAIA,eAAeH,GAAf"}
|
|
@@ -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/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"}
|
package/es/atom/link/index.js
CHANGED
|
@@ -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"];
|
|
4
|
+
const _excluded = ["skinHover", "hoverColor", "data-name", "aria-label", "useButtonTag"];
|
|
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,7 +25,8 @@ 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
|
|
28
|
+
'aria-label': ariaLabel,
|
|
29
|
+
useButtonTag = false
|
|
29
30
|
} = props,
|
|
30
31
|
linKElementProps = _objectWithoutPropertiesLoose(props, _excluded);
|
|
31
32
|
|
|
@@ -58,24 +59,28 @@ const Link = (props, legacyContext) => {
|
|
|
58
59
|
}
|
|
59
60
|
}, [download, navigate, onClick]);
|
|
60
61
|
|
|
61
|
-
const _style = href || onClick ? null : {
|
|
62
|
+
const _style = useMemo(() => href || onClick ? null : {
|
|
62
63
|
pointerEvents: 'none'
|
|
63
|
-
};
|
|
64
|
+
}, [href, onClick]);
|
|
64
65
|
|
|
65
|
-
const _hoverStyle = skinHover && hovered ? {
|
|
66
|
+
const _hoverStyle = useMemo(() => skinHover && hovered ? {
|
|
66
67
|
color: hoverColor
|
|
67
|
-
} : null;
|
|
68
|
+
} : null, [hoverColor, hovered, skinHover]);
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
const _props = useMemo(() => _extends({}, linKElementProps, {
|
|
71
|
+
'data-name': dataName,
|
|
72
|
+
'aria-label': ariaLabel,
|
|
72
73
|
href: href ? createHref(href) : undefined,
|
|
73
74
|
onClick: handleOnClick,
|
|
74
75
|
onMouseEnter: handleMouseEnter,
|
|
75
76
|
onMouseLeave: handleMouseLeave,
|
|
76
|
-
className
|
|
77
|
+
className,
|
|
77
78
|
style: _extends({}, propsStyle, _style, _hoverStyle)
|
|
78
|
-
}),
|
|
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);
|
|
79
84
|
};
|
|
80
85
|
|
|
81
86
|
Link.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -92,6 +97,7 @@ Link.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
92
97
|
onClick: PropTypes.func,
|
|
93
98
|
onMouseEnter: PropTypes.func,
|
|
94
99
|
onMouseLeave: PropTypes.func,
|
|
100
|
+
useButtonTag: PropTypes.bool,
|
|
95
101
|
style: PropTypes.shape({})
|
|
96
102
|
} : {};
|
|
97
103
|
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","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
|
|
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;I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,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"}
|
package/es/atom/slide/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ 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>;
|
|
10
11
|
submitValue: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
11
12
|
href: PropTypes.Requireable<string>;
|
|
12
13
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -21,6 +22,7 @@ declare namespace Slide {
|
|
|
21
22
|
rectangular: PropTypes.Requireable<boolean>;
|
|
22
23
|
fullWidth: PropTypes.Requireable<boolean>;
|
|
23
24
|
certificationButton: PropTypes.Requireable<boolean>;
|
|
25
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
24
26
|
}>>;
|
|
25
27
|
const alignment: PropTypes.Requireable<string>;
|
|
26
28
|
}
|
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":""}
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
font-family: Gilroy;
|
|
34
34
|
font-size: 16px;
|
|
35
35
|
font-weight: bold;
|
|
36
|
-
overflow:hidden;
|
|
37
|
-
white-space:nowrap;
|
|
38
|
-
display:inline-block;
|
|
39
|
-
text-overflow:ellipsis;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -59,5 +59,3 @@
|
|
|
59
59
|
min-height: 56px;
|
|
60
60
|
min-width: 56px;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
margin: 8px 0;
|
|
15
15
|
border-radius: 7px;
|
|
16
|
-
transform:translate(0,0);
|
|
16
|
+
transform: translate(0, 0);
|
|
17
17
|
z-index: 0;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
.draggable:hover {
|
|
20
21
|
background: rgba(0, 0, 0, 0.3);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
.draggable:active {
|
|
23
25
|
background: transparent;
|
|
24
26
|
}
|
|
27
|
+
|
|
25
28
|
.draggable:before {
|
|
26
29
|
content: '.';
|
|
27
30
|
position: absolute;
|
|
@@ -32,9 +35,10 @@
|
|
|
32
35
|
font-size: 25px;
|
|
33
36
|
color: medium;
|
|
34
37
|
pointer-events: none;
|
|
35
|
-
text-shadow: 0 0 medium,
|
|
36
|
-
|
|
38
|
+
text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium,
|
|
39
|
+
5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium;
|
|
37
40
|
}
|
|
41
|
+
|
|
38
42
|
.dragging {
|
|
39
43
|
background: rgba(0, 0, 0, 0.1);
|
|
40
44
|
}
|