@coorpacademy/components 11.32.20-alpha.36 → 11.32.20
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/button-link/index.d.ts +2 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +22 -8
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +4 -0
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +2 -0
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +0 -6
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +0 -6
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/tag/style.css +1 -2
- package/es/atom/title/index.d.ts +0 -6
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +4 -16
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +0 -13
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +6 -10
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +4 -6
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.d.ts +0 -1
- package/es/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/index.js +25 -23
- package/es/molecule/dashboard/cards-list/index.js.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts +0 -1
- package/es/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/es/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/es/molecule/dashboard/cards-list/style.css +29 -12
- package/es/molecule/expandible-actionable-table/index.d.ts +2 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +2 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +7 -10
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learning-priority-card/index.d.ts +0 -1
- package/es/molecule/learning-priority-card/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-card/index.js +7 -10
- package/es/molecule/learning-priority-card/index.js.map +1 -1
- package/es/molecule/learning-priority-card/style.css +0 -2
- package/es/molecule/learning-priority-card/types.d.ts +0 -2
- package/es/molecule/learning-priority-card/types.d.ts.map +1 -1
- package/es/molecule/learning-priority-card/types.js +1 -2
- package/es/molecule/learning-priority-card/types.js.map +1 -1
- package/es/molecule/skill-card/index.d.ts.map +1 -1
- package/es/molecule/skill-card/index.js +5 -8
- package/es/molecule/skill-card/index.js.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +0 -6
- package/es/molecule/title-radio-wrapper/index.d.ts +0 -6
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +0 -6
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +4 -0
- package/es/organism/rewards-form/index.d.ts +0 -6
- package/es/organism/select-opponents/index.d.ts +0 -6
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +0 -6
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/setup-header/index.d.ts +8 -0
- package/es/organism/title-and-input/index.d.ts +0 -12
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +0 -12
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +6 -6
- package/es/template/app-player/loading/index.d.ts +4 -6
- package/es/template/app-player/player/index.d.ts +8 -12
- package/es/template/app-player/player/slides/index.d.ts +4 -6
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +4 -6
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +4 -7
- package/es/template/app-player/popin-end/summary.d.ts +0 -1
- package/es/template/app-review/index.d.ts +4 -6
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +4 -6
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +4 -6
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +8 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +8 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +22 -6
- package/es/template/back-office/dashboard-preview/index.d.ts +8 -0
- package/es/template/back-office/layout/index.d.ts +8 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +8 -12
- package/es/template/common/dashboard/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.js +4 -12
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/search-page/index.d.ts +4 -7
- package/es/template/external-course/index.d.ts +4 -6
- package/es/template/my-learning/index.d.ts +0 -82
- package/es/template/my-learning/index.d.ts.map +1 -1
- package/es/template/my-learning/index.js +12 -42
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/my-learning/style.css +3 -18
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +4 -8
- package/es/template/skill-detail/index.js.map +1 -1
- package/es/template/teams-dashboard/index.d.ts +0 -1
- package/lib/atom/button-link/index.d.ts +2 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +21 -7
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +4 -0
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +2 -0
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +0 -6
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +0 -6
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/tag/style.css +1 -2
- package/lib/atom/title/index.d.ts +0 -6
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +4 -18
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +0 -13
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +5 -9
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +4 -6
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts +0 -1
- package/lib/molecule/dashboard/cards-list/index.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/index.js +25 -24
- package/lib/molecule/dashboard/cards-list/index.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts +0 -1
- package/lib/molecule/dashboard/cards-list/prop-types.d.ts.map +1 -1
- package/lib/molecule/dashboard/cards-list/prop-types.js.map +1 -1
- package/lib/molecule/dashboard/cards-list/style.css +29 -12
- package/lib/molecule/expandible-actionable-table/index.d.ts +2 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +2 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +6 -9
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learning-priority-card/index.d.ts +0 -1
- package/lib/molecule/learning-priority-card/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-card/index.js +7 -10
- package/lib/molecule/learning-priority-card/index.js.map +1 -1
- package/lib/molecule/learning-priority-card/style.css +0 -2
- package/lib/molecule/learning-priority-card/types.d.ts +0 -2
- package/lib/molecule/learning-priority-card/types.d.ts.map +1 -1
- package/lib/molecule/learning-priority-card/types.js +1 -2
- package/lib/molecule/learning-priority-card/types.js.map +1 -1
- package/lib/molecule/skill-card/index.d.ts.map +1 -1
- package/lib/molecule/skill-card/index.js +4 -7
- package/lib/molecule/skill-card/index.js.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +0 -6
- package/lib/molecule/title-radio-wrapper/index.d.ts +0 -6
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +0 -6
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +4 -0
- package/lib/organism/rewards-form/index.d.ts +0 -6
- package/lib/organism/select-opponents/index.d.ts +0 -6
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +0 -6
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/setup-header/index.d.ts +8 -0
- package/lib/organism/title-and-input/index.d.ts +0 -12
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +0 -12
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +6 -6
- package/lib/template/app-player/loading/index.d.ts +4 -6
- package/lib/template/app-player/player/index.d.ts +8 -12
- package/lib/template/app-player/player/slides/index.d.ts +4 -6
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +4 -6
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +4 -7
- package/lib/template/app-player/popin-end/summary.d.ts +0 -1
- package/lib/template/app-review/index.d.ts +4 -6
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +4 -6
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +4 -6
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +8 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +8 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +22 -6
- package/lib/template/back-office/dashboard-preview/index.d.ts +8 -0
- package/lib/template/back-office/layout/index.d.ts +8 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +8 -12
- package/lib/template/common/dashboard/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.js +4 -13
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/search-page/index.d.ts +4 -7
- package/lib/template/external-course/index.d.ts +4 -6
- package/lib/template/my-learning/index.d.ts +0 -82
- package/lib/template/my-learning/index.d.ts.map +1 -1
- package/lib/template/my-learning/index.js +12 -44
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/my-learning/style.css +3 -18
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +4 -8
- package/lib/template/skill-detail/index.js.map +1 -1
- package/lib/template/teams-dashboard/index.d.ts +0 -1
- package/package.json +2 -2
|
@@ -19,6 +19,8 @@ declare const ButtonLink: {
|
|
|
19
19
|
download: import("prop-types").Requireable<boolean>;
|
|
20
20
|
target: import("prop-types").Requireable<string>;
|
|
21
21
|
}>>;
|
|
22
|
+
hoverBackgroundColor: import("prop-types").Requireable<string>;
|
|
23
|
+
hoverColor: import("prop-types").Requireable<string>;
|
|
22
24
|
disabled: import("prop-types").Requireable<boolean>;
|
|
23
25
|
className: import("prop-types").Requireable<string>;
|
|
24
26
|
customStyle: import("prop-types").Requireable<import("prop-types").InferProps<{}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AA+C7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CA4FzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _noop from "lodash/fp/noop";
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
5
|
-
import React, { useCallback } from 'react';
|
|
5
|
+
import React, { useCallback, useState, useMemo } from 'react';
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import Link from '../link';
|
|
8
8
|
import FaIcon from '../icon';
|
|
@@ -10,7 +10,7 @@ import { ICONS } from '../../util/button-icons';
|
|
|
10
10
|
import propTypes from './types';
|
|
11
11
|
import style from './style.css';
|
|
12
12
|
|
|
13
|
-
const getButtonContent = (icon, content) => {
|
|
13
|
+
const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverColor) => {
|
|
14
14
|
const {
|
|
15
15
|
type,
|
|
16
16
|
faIcon,
|
|
@@ -20,6 +20,7 @@ const getButtonContent = (icon, content) => {
|
|
|
20
20
|
position: ''
|
|
21
21
|
};
|
|
22
22
|
const Icon = type && ICONS[type];
|
|
23
|
+
const isApplyHover = hovered && hoverBackgroundColor && hoverColor;
|
|
23
24
|
|
|
24
25
|
if (!Icon && !faIcon) {
|
|
25
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -31,8 +32,8 @@ const getButtonContent = (icon, content) => {
|
|
|
31
32
|
|
|
32
33
|
const iconComponent = faIcon ? /*#__PURE__*/React.createElement(FaIcon, {
|
|
33
34
|
iconName: faIcon.name,
|
|
34
|
-
iconColor: faIcon.color,
|
|
35
|
-
backgroundColor: faIcon.backgroundColor,
|
|
35
|
+
iconColor: isApplyHover ? hoverColor : faIcon.color,
|
|
36
|
+
backgroundColor: isApplyHover ? hoverBackgroundColor : faIcon.backgroundColor,
|
|
36
37
|
size: {
|
|
37
38
|
faSize: faIcon.size,
|
|
38
39
|
wrapperSize: faIcon.size
|
|
@@ -53,6 +54,8 @@ const ButtonLink = props => {
|
|
|
53
54
|
type,
|
|
54
55
|
label,
|
|
55
56
|
content,
|
|
57
|
+
hoverBackgroundColor,
|
|
58
|
+
hoverColor,
|
|
56
59
|
disabled = false,
|
|
57
60
|
icon,
|
|
58
61
|
'data-name': dataName,
|
|
@@ -65,10 +68,19 @@ const ButtonLink = props => {
|
|
|
65
68
|
customStyle,
|
|
66
69
|
useTitle = true
|
|
67
70
|
} = props;
|
|
68
|
-
const contentView = getButtonContent(icon, content ?? label);
|
|
69
71
|
const styleButton = classnames(className, style.button, type === 'primary' && style.primary, type === 'secondary' && style.secondary, type === 'tertiary' && style.tertiary, type === 'text' && style.text, type === 'dangerous' && style.dangerous, link && style.link, disabled && style.disabled);
|
|
72
|
+
const [hovered, setHovered] = useState(false);
|
|
70
73
|
const handleOnClick = useCallback(() => onClick(), [onClick]);
|
|
71
74
|
const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);
|
|
75
|
+
const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);
|
|
76
|
+
const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);
|
|
77
|
+
|
|
78
|
+
const _customStyle = useMemo(() => {
|
|
79
|
+
return _extends({}, customStyle, (hoverBackgroundColor || hoverColor) && hovered ? {
|
|
80
|
+
backgroundColor: hoverBackgroundColor,
|
|
81
|
+
color: hoverColor
|
|
82
|
+
} : null);
|
|
83
|
+
}, [hoverBackgroundColor, hoverColor, hovered, customStyle]);
|
|
72
84
|
|
|
73
85
|
if (link) {
|
|
74
86
|
return /*#__PURE__*/React.createElement(Link, _extends({}, link, useTitle && {
|
|
@@ -79,7 +91,7 @@ const ButtonLink = props => {
|
|
|
79
91
|
"data-name": dataName,
|
|
80
92
|
"data-testid": dataTestId,
|
|
81
93
|
"aria-label": ariaLabel || label
|
|
82
|
-
}),
|
|
94
|
+
}), getButtonContent(icon, content ?? label));
|
|
83
95
|
}
|
|
84
96
|
|
|
85
97
|
return /*#__PURE__*/React.createElement("button", _extends({}, useTitle && {
|
|
@@ -89,13 +101,15 @@ const ButtonLink = props => {
|
|
|
89
101
|
"aria-label": ariaLabel || label,
|
|
90
102
|
"data-name": dataName,
|
|
91
103
|
"data-testid": dataTestId,
|
|
92
|
-
style:
|
|
104
|
+
style: _customStyle,
|
|
93
105
|
className: styleButton,
|
|
94
106
|
onClick: handleOnClick,
|
|
95
107
|
onKeyDown: handleOnKeyDown,
|
|
108
|
+
onMouseOver: handleMouseOver,
|
|
109
|
+
onMouseLeave: handleMouseLeave,
|
|
96
110
|
tabIndex: 0,
|
|
97
111
|
disabled: disabled
|
|
98
|
-
}),
|
|
112
|
+
}), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor));
|
|
99
113
|
};
|
|
100
114
|
|
|
101
115
|
ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","classnames","Link","FaIcon","ICONS","propTypes","style","getButtonContent","icon","content","type","faIcon","position","Icon","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","ICONS","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","isApplyHover","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","styleButton","button","primary","secondary","tertiary","text","dangerous","setHovered","handleOnClick","handleOnKeyDown","event","handleMouseOver","handleMouseLeave","_customStyle","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (\n icon?: IconType,\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n const isApplyHover = hovered && hoverBackgroundColor && hoverColor;\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: isApplyHover ? hoverColor : faIcon.color,\n backgroundColor: isApplyHover ? hoverBackgroundColor : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n }\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n label,\n content,\n hoverBackgroundColor,\n hoverColor,\n disabled = false,\n icon,\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {getButtonContent(icon, content ?? label)}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\n aria-label={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={_customStyle}\n className={styleButton}\n onClick={handleOnClick}\n onKeyDown={handleOnKeyDown}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n tabIndex={0}\n disabled={disabled}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,EAAsCC,OAAtC,QAAoD,OAApD;AAEA,OA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dZ;IAeE,QAAQ,EAAEtB;EAfZ,IAiBGxB,gBAAgB,CAACC,IAAD,EAAOC,OAAO,IAAIU,KAAlB,EAAyBT,OAAzB,EAAkCC,oBAAlC,EAAwDC,UAAxD,CAjBnB,CADF;AAqBD,CA5FD;;AA8FAiB,UAAU,CAACxB,SAAX,2CAAuBA,SAAvB;AAEA,eAAewB,UAAf"}
|
|
@@ -18,6 +18,8 @@ declare const propTypes: {
|
|
|
18
18
|
download: PropTypes.Requireable<boolean>;
|
|
19
19
|
target: PropTypes.Requireable<string>;
|
|
20
20
|
}>>;
|
|
21
|
+
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
22
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
21
23
|
disabled: PropTypes.Requireable<boolean>;
|
|
22
24
|
className: PropTypes.Requireable<string>;
|
|
23
25
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
@@ -48,6 +50,8 @@ export declare type ButtonLinkProps = {
|
|
|
48
50
|
download?: boolean;
|
|
49
51
|
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
50
52
|
};
|
|
53
|
+
hoverBackgroundColor?: string;
|
|
54
|
+
hoverColor?: string;
|
|
51
55
|
disabled?: boolean;
|
|
52
56
|
className?: string;
|
|
53
57
|
customStyle?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,QAAA,MAAM,SAAS;;;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CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -18,6 +18,8 @@ const propTypes = {
|
|
|
18
18
|
download: PropTypes.bool,
|
|
19
19
|
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
20
20
|
}),
|
|
21
|
+
hoverBackgroundColor: PropTypes.string,
|
|
22
|
+
hoverColor: PropTypes.string,
|
|
21
23
|
disabled: PropTypes.bool,
|
|
22
24
|
className: PropTypes.string,
|
|
23
25
|
customStyle: PropTypes.shape({})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","content","node","icon","shape","position","onClick","func","link","href","download","bool","target","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACM,MAFD;EAGhBC,OAAO,EAAEP,SAAS,CAACQ,IAHH;EAIhB,cAAcR,SAAS,CAACM,MAJR;EAKhB,aAAaN,SAAS,CAACM,MALP;EAMhB,eAAeN,SAAS,CAACM,MANT;EAOhBG,IAAI,EAAET,SAAS,CAACU,KAAV,CAAgB;IACpBC,QAAQ,EAAEX,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CAPU;EAWhBW,OAAO,EAAEZ,SAAS,CAACa,IAXH;EAYhBC,IAAI,EAAEd,SAAS,CAACU,KAAV,CAAgB;IACpBK,IAAI,EAAEf,SAAS,CAACM,MADI;IAEpBU,QAAQ,EAAEhB,SAAS,CAACiB,IAFA;IAGpBC,MAAM,EAAElB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAZU;EAiBhBe,
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","label","string","content","node","icon","shape","position","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACM,MAFD;EAGhBC,OAAO,EAAEP,SAAS,CAACQ,IAHH;EAIhB,cAAcR,SAAS,CAACM,MAJR;EAKhB,aAAaN,SAAS,CAACM,MALP;EAMhB,eAAeN,SAAS,CAACM,MANT;EAOhBG,IAAI,EAAET,SAAS,CAACU,KAAV,CAAgB;IACpBC,QAAQ,EAAEX,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CAPU;EAWhBW,OAAO,EAAEZ,SAAS,CAACa,IAXH;EAYhBC,IAAI,EAAEd,SAAS,CAACU,KAAV,CAAgB;IACpBK,IAAI,EAAEf,SAAS,CAACM,MADI;IAEpBU,QAAQ,EAAEhB,SAAS,CAACiB,IAFA;IAGpBC,MAAM,EAAElB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAZU;EAiBhBe,oBAAoB,EAAEnB,SAAS,CAACM,MAjBhB;EAkBhBc,UAAU,EAAEpB,SAAS,CAACM,MAlBN;EAmBhBe,QAAQ,EAAErB,SAAS,CAACiB,IAnBJ;EAoBhBK,SAAS,EAAEtB,SAAS,CAACM,MApBL;EAqBhBiB,WAAW,EAAEvB,SAAS,CAACU,KAAV,CAAgB,EAAhB;AArBG,CAAlB;AA6DA,eAAeR,SAAf"}
|
|
@@ -10,12 +10,6 @@ declare const RadioWithTitle: {
|
|
|
10
10
|
'data-name': import("prop-types").Requireable<string>;
|
|
11
11
|
titleSize: import("prop-types").Requireable<string>;
|
|
12
12
|
subtitleSize: import("prop-types").Requireable<string>;
|
|
13
|
-
icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
|
|
14
|
-
tag: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
15
|
-
label: import("prop-types").Requireable<string>;
|
|
16
|
-
type: import("prop-types").Requireable<string>;
|
|
17
|
-
size: import("prop-types").Requireable<string>;
|
|
18
|
-
}>>;
|
|
19
13
|
}>>>;
|
|
20
14
|
name: import("prop-types").Requireable<string>;
|
|
21
15
|
checked: import("prop-types").Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -7,12 +7,6 @@ export declare const propTypes: {
|
|
|
7
7
|
'data-name': PropTypes.Requireable<string>;
|
|
8
8
|
titleSize: PropTypes.Requireable<string>;
|
|
9
9
|
subtitleSize: PropTypes.Requireable<string>;
|
|
10
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
11
|
-
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
-
label: PropTypes.Requireable<string>;
|
|
13
|
-
type: PropTypes.Requireable<string>;
|
|
14
|
-
size: PropTypes.Requireable<string>;
|
|
15
|
-
}>>;
|
|
16
10
|
}>>>;
|
|
17
11
|
name: PropTypes.Requireable<string>;
|
|
18
12
|
checked: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
package/es/atom/tag/style.css
CHANGED
package/es/atom/title/index.d.ts
CHANGED
|
@@ -8,12 +8,6 @@ declare namespace Title {
|
|
|
8
8
|
'data-name': PropTypes.Requireable<string>;
|
|
9
9
|
titleSize: PropTypes.Requireable<string>;
|
|
10
10
|
subtitleSize: PropTypes.Requireable<string>;
|
|
11
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
12
|
-
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
|
-
label: PropTypes.Requireable<string>;
|
|
14
|
-
type: PropTypes.Requireable<string>;
|
|
15
|
-
size: PropTypes.Requireable<string>;
|
|
16
|
-
}>>;
|
|
17
11
|
};
|
|
18
12
|
}
|
|
19
13
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AAsCA,gDAsBC"}
|
package/es/atom/title/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import PropTypes from 'prop-types';
|
|
5
|
-
import Icon from '../icon';
|
|
6
|
-
import Tag from '../tag';
|
|
7
3
|
import style from './style.css';
|
|
8
4
|
|
|
9
5
|
const getTitleStyle = (type, size) => {
|
|
@@ -56,23 +52,17 @@ const Title = props => {
|
|
|
56
52
|
type,
|
|
57
53
|
'data-name': dataName,
|
|
58
54
|
titleSize = 'standard',
|
|
59
|
-
subtitleSize = 'standard'
|
|
60
|
-
icon,
|
|
61
|
-
tag
|
|
55
|
+
subtitleSize = 'standard'
|
|
62
56
|
} = props;
|
|
63
57
|
const titleStyle = getTitleStyle(type, titleSize);
|
|
64
58
|
const subtitleStyle = getSubtitleStyle(type, subtitleSize);
|
|
65
59
|
const subtitleSection = subtitle ? /*#__PURE__*/React.createElement("div", {
|
|
66
60
|
className: subtitleStyle
|
|
67
61
|
}, subtitle) : null;
|
|
68
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: style.container
|
|
70
|
-
}, icon ? /*#__PURE__*/React.createElement(Icon, _extends({}, icon, {
|
|
71
|
-
className: style.icon
|
|
72
|
-
})) : null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
73
63
|
className: titleStyle,
|
|
74
64
|
"data-name": dataName
|
|
75
|
-
}, title
|
|
65
|
+
}, title), subtitleSection);
|
|
76
66
|
};
|
|
77
67
|
|
|
78
68
|
Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -81,9 +71,7 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
81
71
|
type: PropTypes.oneOf(['page', 'form-group']),
|
|
82
72
|
'data-name': PropTypes.string,
|
|
83
73
|
titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),
|
|
84
|
-
subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
|
|
85
|
-
icon: PropTypes.shape(Icon.propTypes),
|
|
86
|
-
tag: PropTypes.shape(Tag.propTypes)
|
|
74
|
+
subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
|
|
87
75
|
} : {};
|
|
88
76
|
export default Title;
|
|
89
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","style","getTitleStyle","type","size","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","titleStyle","subtitleStyle","subtitleSection","propTypes","string","oneOf"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard'\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n </div>\n {subtitleSection}\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),\n subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])\n};\nexport default Title;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,IAAD,EAAOC,IAAP,KAAgB;EACpC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACI,SAAb;;IACF,KAAK,YAAL;MACE,QAAQD,IAAR;QACE,KAAK,UAAL;UACE,OAAOH,KAAK,CAACK,cAAb;;QACF,KAAK,QAAL;UACE,OAAOL,KAAK,CAACM,oBAAb;;QACF,KAAK,OAAL;UACE,OAAON,KAAK,CAACO,mBAAb;MANJ;;EAJJ;AAaD,CAdD;;AAgBA,MAAMC,gBAAgB,GAAG,CAACN,IAAD,EAAOC,IAAP,KAAgB;EACvC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,O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AsB,sBAAtB,EAA8C,aAA9C,CAAhB;AANE,CAAlB;AAQA,eAAeZ,KAAf"}
|
package/es/atom/title/style.css
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
@value cm_grey_700 from colors;
|
|
3
3
|
@value cm_grey_400 from colors;
|
|
4
4
|
|
|
5
|
-
.container {
|
|
6
|
-
display: flex;
|
|
7
|
-
gap: 12px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
5
|
.title {
|
|
11
6
|
font-family: Gilroy;
|
|
12
7
|
font-style: normal;
|
|
@@ -23,9 +18,6 @@
|
|
|
23
18
|
.titleFormGroup {
|
|
24
19
|
composes: title;
|
|
25
20
|
font-size: 18px;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
gap: 4px;
|
|
29
21
|
}
|
|
30
22
|
|
|
31
23
|
.mediumTitleFormGroup {
|
|
@@ -82,8 +74,3 @@
|
|
|
82
74
|
font-weight: normal;
|
|
83
75
|
}
|
|
84
76
|
|
|
85
|
-
.icon {
|
|
86
|
-
height: 24px;
|
|
87
|
-
width: 24px;
|
|
88
|
-
}
|
|
89
|
-
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/base-modal/index.js"],"names":[],"mappings":";AASA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/base-modal/index.js"],"names":[],"mappings":";AASA,yEA4GC"}
|
|
@@ -3,7 +3,7 @@ import _isEmpty from "lodash/fp/isEmpty";
|
|
|
3
3
|
|
|
4
4
|
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); }
|
|
5
5
|
|
|
6
|
-
import React, { useCallback
|
|
6
|
+
import React, { useCallback } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { convert } from 'css-color-function';
|
|
9
9
|
import Provider from '../../atom/provider';
|
|
@@ -24,9 +24,6 @@ const BaseModal = (props, context) => {
|
|
|
24
24
|
const {
|
|
25
25
|
skin
|
|
26
26
|
} = context;
|
|
27
|
-
const [hovered, setHovered] = useState(false);
|
|
28
|
-
const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);
|
|
29
|
-
const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);
|
|
30
27
|
const Footer = useCallback(() => {
|
|
31
28
|
if (_isEmpty(footer)) return null;
|
|
32
29
|
if (typeof footer === 'function') return footer();
|
|
@@ -60,13 +57,12 @@ const BaseModal = (props, context) => {
|
|
|
60
57
|
onClick: onCancel,
|
|
61
58
|
label: cancelLabel,
|
|
62
59
|
disabled: cancelDisabled
|
|
63
|
-
}) : null, onConfirm && confirmLabel ? /*#__PURE__*/React.createElement("div", {
|
|
64
|
-
onMouseOver: handleMouseOver,
|
|
65
|
-
onMouseLeave: handleMouseLeave
|
|
66
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, _extends({
|
|
60
|
+
}) : null, onConfirm && confirmLabel ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ButtonLink, _extends({
|
|
67
61
|
customStyle: {
|
|
68
|
-
backgroundColor:
|
|
62
|
+
backgroundColor: primarySkinColor
|
|
69
63
|
},
|
|
64
|
+
hoverBackgroundColor: convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`),
|
|
65
|
+
hoverColor: '#FFFFFF',
|
|
70
66
|
className: style.footerConfirmButton,
|
|
71
67
|
type: 'primary',
|
|
72
68
|
onClick: onConfirm,
|
|
@@ -84,7 +80,7 @@ const BaseModal = (props, context) => {
|
|
|
84
80
|
} : {}))) : null), text ? /*#__PURE__*/React.createElement("div", {
|
|
85
81
|
className: `${style.footerDescription} ${isError ? style.footerDescriptionError : ''}`
|
|
86
82
|
}, text) : null);
|
|
87
|
-
}, [footer,
|
|
83
|
+
}, [footer, skin, style, convert, _get, _isEmpty]);
|
|
88
84
|
if (!isOpen || !title || !children) return null;
|
|
89
85
|
|
|
90
86
|
function handleOnClose(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","Provider","Icon","ButtonLink","style","BaseModal","props","context","title","description","headerIcon","children","isOpen","footer","onClose","skin","hovered","setHovered","handleMouseOver","handleMouseLeave","Footer","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","primarySkinColor","footerCTAWrapper","className","footerCancelButton","type","onClick","customStyle","backgroundColor","footerConfirmButton","icon","position","faIcon","name","color","size","footerDescription","footerDescriptionError","handleOnClose","e","stopPropagation","modalWrapper","modal","header","faSize","wrapperSize","headerContent","headerTitle","headerDescription","headerCloseIcon","body","contextTypes","childContextTypes","propTypes","string","shape","node","bool","oneOfType","func","boolean"],"sources":["../../../src/molecule/base-modal/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Provider from '../../atom/provider';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst BaseModal = (props, context) => {\n const {title, description, headerIcon, children, isOpen, footer, onClose} = props;\n const {skin} = context;\n\n const [hovered, setHovered] = useState(false);\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const Footer = useCallback(() => {\n if (isEmpty(footer)) return null;\n if (typeof footer === 'function') return footer();\n\n const {cancelButton, confirmButton, text, isError} = footer;\n const {label: cancelLabel, onCancel, disabled: cancelDisabled} = cancelButton || {};\n const {\n label: confirmLabel,\n onConfirm,\n disabled: confirmDisabled,\n iconName\n } = confirmButton || {};\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div className={style.footer}>\n <div className={style.footerCTAWrapper}>\n {onCancel && cancelLabel ? (\n <ButtonLink\n {...{\n className: style.footerCancelButton,\n type: 'secondary',\n onClick: onCancel,\n label: cancelLabel,\n disabled: cancelDisabled\n }}\n />\n ) : null}\n {onConfirm && confirmLabel ? (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\n <ButtonLink\n {...{\n customStyle: {\n backgroundColor: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n },\n className: style.footerConfirmButton,\n type: 'primary',\n onClick: onConfirm,\n label: confirmLabel,\n disabled: confirmDisabled,\n ...(iconName\n ? {\n icon: {\n position: 'left',\n faIcon: {\n name: iconName,\n color: '#FFFFFF',\n size: 16\n }\n }\n }\n : {})\n }}\n />\n </div>\n ) : null}\n </div>\n {text ? (\n <div\n className={`${style.footerDescription} ${isError ? style.footerDescriptionError : ''}`}\n >\n {text}\n </div>\n ) : null}\n </div>\n );\n }, [footer, hovered, handleMouseOver, handleMouseLeave, skin]);\n\n if (!isOpen || !title || !children) return null;\n\n function handleOnClose(e) {\n e?.stopPropagation();\n onClose();\n }\n\n return (\n <div className={style.modalWrapper}>\n <div className={style.modal}>\n <header className={style.header}>\n {headerIcon?.name ? (\n <div className={style.headerIcon}>\n <Icon\n iconName={headerIcon.name}\n iconColor={headerIcon.color}\n backgroundColor={headerIcon.backgroundColor}\n size={{faSize: 20, wrapperSize: 48}}\n />\n </div>\n ) : null}\n <div className={style.headerContent}>\n <div className={style.headerTitle}>{title}</div>\n {description ? <div className={style.headerDescription}>{description}</div> : null}\n </div>\n <div className={style.headerCloseIcon} onClick={handleOnClose}>\n <Icon iconName=\"close\" backgroundColor=\"#F4F4F5\" size={{faSize: 14, wrapperSize: 28}} />\n </div>\n </header>\n <div className={style.body}>{children}</div>\n <Footer />\n </div>\n </div>\n );\n};\n\nBaseModal.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nBaseModal.propTypes = {\n title: PropTypes.string,\n headerIcon: PropTypes.shape({\n name: PropTypes.string,\n color: PropTypes.string,\n backgroundColor: PropTypes.string\n }),\n description: PropTypes.string,\n children: PropTypes.node,\n isOpen: PropTypes.bool,\n footer: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({\n text: PropTypes.string,\n isError: PropTypes.boolean,\n cancelButton: PropTypes.shape({\n label: PropTypes.string,\n onCancel: PropTypes.func,\n disabled: PropTypes.bool\n }),\n confirmButton: PropTypes.shape({\n label: PropTypes.string,\n onConfirm: PropTypes.func,\n iconName: PropTypes.string,\n disabled: PropTypes.bool\n })\n })\n ]),\n onClose: PropTypes.func\n};\n\nexport default BaseModal;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACpC,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC,UAArB;IAAiCC,QAAjC;IAA2CC,MAA3C;IAAmDC,MAAnD;IAA2DC;EAA3D,IAAsER,KAA5E;EACA,MAAM;IAACS;EAAD,IAASR,OAAf;EAEA,MAAM,CAACS,OAAD,EAAUC,UAAV,IAAwBnB,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAMoB,eAAe,GAAGrB,WAAW,CAAC,MAAMoB,UAAU,CAAC,IAAD,CAAjB,EAAyB,CAACA,UAAD,CAAzB,CAAnC;EACA,MAAME,gBAAgB,GAAGtB,WAAW,CAAC,MAAMoB,UAAU,CAAC,KAAD,CAAjB,EAA0B,CAACA,UAAD,CAA1B,CAApC;EAEA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W;MAE5BxC,QAAQ,EAAE5B,SAAS,CAACyE,IAFQ;MAG5B5C,QAAQ,EAAE7B,SAAS,CAACuE;IAHQ,CAAhB,CAHA;IAQdhD,aAAa,EAAEvB,SAAS,CAACqE,KAAV,CAAgB;MAC7B3C,KAAK,EAAE1B,SAAS,CAACoE,MADY;MAE7BpC,SAAS,EAAEhC,SAAS,CAACyE,IAFQ;MAG7BvC,QAAQ,EAAElC,SAAS,CAACoE,MAHS;MAI7BvC,QAAQ,EAAE7B,SAAS,CAACuE;IAJS,CAAhB;EARD,CAAhB,CAF0B,CAApB,CAVY;EA4BpBxD,OAAO,EAAEf,SAAS,CAACyE;AA5BC,CAAtB;AA+BA,eAAenE,SAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","convert","Provider","Icon","ButtonLink","style","BaseModal","props","context","title","description","headerIcon","children","isOpen","footer","onClose","skin","Footer","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","primarySkinColor","footerCTAWrapper","className","footerCancelButton","type","onClick","customStyle","backgroundColor","hoverBackgroundColor","hoverColor","footerConfirmButton","icon","position","faIcon","name","color","size","footerDescription","footerDescriptionError","handleOnClose","e","stopPropagation","modalWrapper","modal","header","faSize","wrapperSize","headerContent","headerTitle","headerDescription","headerCloseIcon","body","contextTypes","childContextTypes","propTypes","string","shape","node","bool","oneOfType","func","boolean"],"sources":["../../../src/molecule/base-modal/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Provider from '../../atom/provider';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst BaseModal = (props, context) => {\n const {title, description, headerIcon, children, isOpen, footer, onClose} = props;\n const {skin} = context;\n\n const Footer = useCallback(() => {\n if (isEmpty(footer)) return null;\n if (typeof footer === 'function') return footer();\n\n const {cancelButton, confirmButton, text, isError} = footer;\n const {label: cancelLabel, onCancel, disabled: cancelDisabled} = cancelButton || {};\n const {\n label: confirmLabel,\n onConfirm,\n disabled: confirmDisabled,\n iconName\n } = confirmButton || {};\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div className={style.footer}>\n <div className={style.footerCTAWrapper}>\n {onCancel && cancelLabel ? (\n <ButtonLink\n {...{\n className: style.footerCancelButton,\n type: 'secondary',\n onClick: onCancel,\n label: cancelLabel,\n disabled: cancelDisabled\n }}\n />\n ) : null}\n {onConfirm && confirmLabel ? (\n <div>\n <ButtonLink\n {...{\n customStyle: {backgroundColor: primarySkinColor},\n hoverBackgroundColor: convert(\n `hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`\n ),\n hoverColor: '#FFFFFF',\n className: style.footerConfirmButton,\n type: 'primary',\n onClick: onConfirm,\n label: confirmLabel,\n disabled: confirmDisabled,\n ...(iconName\n ? {\n icon: {\n position: 'left',\n faIcon: {\n name: iconName,\n color: '#FFFFFF',\n size: 16\n }\n }\n }\n : {})\n }}\n />\n </div>\n ) : null}\n </div>\n {text ? (\n <div\n className={`${style.footerDescription} ${isError ? style.footerDescriptionError : ''}`}\n >\n {text}\n </div>\n ) : null}\n </div>\n );\n }, [footer, skin, style, convert, get, isEmpty]);\n\n if (!isOpen || !title || !children) return null;\n\n function handleOnClose(e) {\n e?.stopPropagation();\n onClose();\n }\n\n return (\n <div className={style.modalWrapper}>\n <div className={style.modal}>\n <header className={style.header}>\n {headerIcon?.name ? (\n <div className={style.headerIcon}>\n <Icon\n iconName={headerIcon.name}\n iconColor={headerIcon.color}\n backgroundColor={headerIcon.backgroundColor}\n size={{faSize: 20, wrapperSize: 48}}\n />\n </div>\n ) : null}\n <div className={style.headerContent}>\n <div className={style.headerTitle}>{title}</div>\n {description ? <div className={style.headerDescription}>{description}</div> : null}\n </div>\n <div className={style.headerCloseIcon} onClick={handleOnClose}>\n <Icon iconName=\"close\" backgroundColor=\"#F4F4F5\" size={{faSize: 14, wrapperSize: 28}} />\n </div>\n </header>\n <div className={style.body}>{children}</div>\n <Footer />\n </div>\n </div>\n );\n};\n\nBaseModal.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nBaseModal.propTypes = {\n title: PropTypes.string,\n headerIcon: PropTypes.shape({\n name: PropTypes.string,\n color: PropTypes.string,\n backgroundColor: PropTypes.string\n }),\n description: PropTypes.string,\n children: PropTypes.node,\n isOpen: PropTypes.bool,\n footer: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({\n text: PropTypes.string,\n isError: PropTypes.boolean,\n cancelButton: PropTypes.shape({\n label: PropTypes.string,\n onCancel: PropTypes.func,\n disabled: PropTypes.bool\n }),\n confirmButton: PropTypes.shape({\n label: PropTypes.string,\n onConfirm: PropTypes.func,\n iconName: PropTypes.string,\n disabled: PropTypes.bool\n })\n })\n ]),\n onClose: PropTypes.func\n};\n\nexport default BaseModal;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACpC,MAAM;IAACC,KAAD;IAAQC,WAAR;IAAqBC,UAArB;IAAiCC,QAAjC;IAA2CC,MAA3C;IAAmDC,MAAnD;IAA2DC;EAA3D,IAAsER,KAA5E;EACA,MAAM;IAACS;EAAD,IAASR,OAAf;EAEA,MAAMS,MAAM,GAAGlB,WAAW,CAAC,MAAM;IAC/B,IAAI,SAAQe,MAAR,CAAJ,EAAqB,OAAO,IAAP;IACrB,IAAI,OAAOA,MAAP,KAAkB,UAAtB,EAAkC,OAAOA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BtC,SAAS,EAAE5B,SAAS,CAACuE,IAFQ;MAG7BzC,QAAQ,EAAE9B,SAAS,CAACkE,MAHS;MAI7BzC,QAAQ,EAAEzB,SAAS,CAACqE;IAJS,CAAhB;EARD,CAAhB,CAF0B,CAApB,CAVY;EA4BpBtD,OAAO,EAAEf,SAAS,CAACuE;AA5BC,CAAtB;AA+BA,eAAejE,SAAf"}
|
|
@@ -14,12 +14,6 @@ declare const propTypes: {
|
|
|
14
14
|
'data-name': PropTypes.Requireable<string>;
|
|
15
15
|
titleSize: PropTypes.Requireable<string>;
|
|
16
16
|
subtitleSize: PropTypes.Requireable<string>;
|
|
17
|
-
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
18
|
-
tag: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
-
label: PropTypes.Requireable<string>;
|
|
20
|
-
type: PropTypes.Requireable<string>;
|
|
21
|
-
size: PropTypes.Requireable<string>;
|
|
22
|
-
}>>;
|
|
23
17
|
}>>;
|
|
24
18
|
headerIcon: PropTypes.Requireable<string>;
|
|
25
19
|
backgroundImage: PropTypes.Requireable<string>;
|
|
@@ -103,6 +97,8 @@ declare const propTypes: {
|
|
|
103
97
|
download: PropTypes.Requireable<boolean>;
|
|
104
98
|
target: PropTypes.Requireable<string>;
|
|
105
99
|
}>>;
|
|
100
|
+
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
101
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
106
102
|
disabled: PropTypes.Requireable<boolean>;
|
|
107
103
|
className: PropTypes.Requireable<string>;
|
|
108
104
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
@@ -235,6 +231,8 @@ declare const propTypes: {
|
|
|
235
231
|
download: PropTypes.Requireable<boolean>;
|
|
236
232
|
target: PropTypes.Requireable<string>;
|
|
237
233
|
}>>;
|
|
234
|
+
hoverBackgroundColor: PropTypes.Requireable<string>;
|
|
235
|
+
hoverColor: PropTypes.Requireable<string>;
|
|
238
236
|
disabled: PropTypes.Requireable<boolean>;
|
|
239
237
|
className: PropTypes.Requireable<string>;
|
|
240
238
|
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDd,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -70,7 +70,6 @@ declare class CardsList extends React.PureComponent<any, any, any> {
|
|
|
70
70
|
showMoreOnLeftAriaLabel: PropTypes.Requireable<string>;
|
|
71
71
|
showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
|
|
72
72
|
}>>;
|
|
73
|
-
type: PropTypes.Requireable<string>;
|
|
74
73
|
testingSizes: PropTypes.Requireable<any>;
|
|
75
74
|
};
|
|
76
75
|
static contextTypes: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecule/dashboard/cards-list/index.js"],"names":[],"mappings":";AAuFA;IACE;;;OAGG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAkCC;IA/BC;;;;;;;;MAQC;IAED,0DAAgE;IAsHlE,qBAiBC;IAED,qBAGC;IAED,sBAGC;IAED,0BASC;IAvJC,uEAA6D;IAyJ/D,mCAIC;IA5DD,oCAMC;IAGD,sCAIC;IA5DD,qBAGC;IAnCD,0BAMC;IAED,2BAYC;IAED,6BAOC;IASD,wCAuCC;IAGC,kBAA2B;IA6D7B,sBAuGC;CACF"}
|