@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
|
@@ -27,7 +27,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
27
27
|
|
|
28
28
|
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); }
|
|
29
29
|
|
|
30
|
-
const getButtonContent = (icon, content) => {
|
|
30
|
+
const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverColor) => {
|
|
31
31
|
const {
|
|
32
32
|
type,
|
|
33
33
|
faIcon,
|
|
@@ -37,6 +37,7 @@ const getButtonContent = (icon, content) => {
|
|
|
37
37
|
position: ''
|
|
38
38
|
};
|
|
39
39
|
const Icon = type && _buttonIcons.ICONS[type];
|
|
40
|
+
const isApplyHover = hovered && hoverBackgroundColor && hoverColor;
|
|
40
41
|
|
|
41
42
|
if (!Icon && !faIcon) {
|
|
42
43
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -48,8 +49,8 @@ const getButtonContent = (icon, content) => {
|
|
|
48
49
|
|
|
49
50
|
const iconComponent = faIcon ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
50
51
|
iconName: faIcon.name,
|
|
51
|
-
iconColor: faIcon.color,
|
|
52
|
-
backgroundColor: faIcon.backgroundColor,
|
|
52
|
+
iconColor: isApplyHover ? hoverColor : faIcon.color,
|
|
53
|
+
backgroundColor: isApplyHover ? hoverBackgroundColor : faIcon.backgroundColor,
|
|
53
54
|
size: {
|
|
54
55
|
faSize: faIcon.size,
|
|
55
56
|
wrapperSize: faIcon.size
|
|
@@ -70,6 +71,8 @@ const ButtonLink = props => {
|
|
|
70
71
|
type,
|
|
71
72
|
label,
|
|
72
73
|
content,
|
|
74
|
+
hoverBackgroundColor,
|
|
75
|
+
hoverColor,
|
|
73
76
|
disabled = false,
|
|
74
77
|
icon,
|
|
75
78
|
'data-name': dataName,
|
|
@@ -82,10 +85,19 @@ const ButtonLink = props => {
|
|
|
82
85
|
customStyle,
|
|
83
86
|
useTitle = true
|
|
84
87
|
} = props;
|
|
85
|
-
const contentView = getButtonContent(icon, content ?? label);
|
|
86
88
|
const styleButton = (0, _classnames.default)(className, _style.default.button, type === 'primary' && _style.default.primary, type === 'secondary' && _style.default.secondary, type === 'tertiary' && _style.default.tertiary, type === 'text' && _style.default.text, type === 'dangerous' && _style.default.dangerous, link && _style.default.link, disabled && _style.default.disabled);
|
|
89
|
+
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
87
90
|
const handleOnClick = (0, _react.useCallback)(() => onClick(), [onClick]);
|
|
88
91
|
const handleOnKeyDown = (0, _react.useCallback)(event => onKeyDown(event), [onKeyDown]);
|
|
92
|
+
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
93
|
+
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
94
|
+
|
|
95
|
+
const _customStyle = (0, _react.useMemo)(() => {
|
|
96
|
+
return _extends({}, customStyle, (hoverBackgroundColor || hoverColor) && hovered ? {
|
|
97
|
+
backgroundColor: hoverBackgroundColor,
|
|
98
|
+
color: hoverColor
|
|
99
|
+
} : null);
|
|
100
|
+
}, [hoverBackgroundColor, hoverColor, hovered, customStyle]);
|
|
89
101
|
|
|
90
102
|
if (link) {
|
|
91
103
|
return /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, useTitle && {
|
|
@@ -96,7 +108,7 @@ const ButtonLink = props => {
|
|
|
96
108
|
"data-name": dataName,
|
|
97
109
|
"data-testid": dataTestId,
|
|
98
110
|
"aria-label": ariaLabel || label
|
|
99
|
-
}),
|
|
111
|
+
}), getButtonContent(icon, content ?? label));
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
return /*#__PURE__*/_react.default.createElement("button", _extends({}, useTitle && {
|
|
@@ -106,13 +118,15 @@ const ButtonLink = props => {
|
|
|
106
118
|
"aria-label": ariaLabel || label,
|
|
107
119
|
"data-name": dataName,
|
|
108
120
|
"data-testid": dataTestId,
|
|
109
|
-
style:
|
|
121
|
+
style: _customStyle,
|
|
110
122
|
className: styleButton,
|
|
111
123
|
onClick: handleOnClick,
|
|
112
124
|
onKeyDown: handleOnKeyDown,
|
|
125
|
+
onMouseOver: handleMouseOver,
|
|
126
|
+
onMouseLeave: handleMouseLeave,
|
|
113
127
|
tabIndex: 0,
|
|
114
128
|
disabled: disabled
|
|
115
|
-
}),
|
|
129
|
+
}), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor));
|
|
116
130
|
};
|
|
117
131
|
|
|
118
132
|
ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getButtonContent","icon","content","type","faIcon","position","Icon","ICONS","style","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":["getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","ICONS","isApplyHover","style","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","setHovered","useState","handleOnClick","useCallback","handleOnKeyDown","event","handleMouseOver","handleMouseLeave","_customStyle","useMemo","title","propTypes"],"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;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CACvBC,IADuB,EAEvBC,OAFuB,EAGvBC,OAHuB,EAIvBC,oBAJuB,EAKvBC,UALuB,KAMpB;EACH,MAAM;IAACC,IAAD;IAAOC,MAAP;IAAeC;EAAf,IAA2BP,IAAI,IAAI;IAACK,IAAI,EAAE,EAAP;IAAWE,QAAQ,EAAE;EAArB,CAAzC;EACA,MAAMC,IAAI,GAAGH,IAAI,IAAII,kBAAA,CAAMJ,IAAN,CAArB;EACA,MAAMK,YAAY,GAAGR,OAAO,IAAIC,oBAAX,IAAmCC,UAAxD;;EAEA,IAAI,CAACI,IAAD,IAAS,CAACF,MAAd,EAAsB;IACpB,oBACE;MAAK,SAAS,EAAEK,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAME;IAAvB,GAA+BZ,OAA/B,CADF,CADF;EAKD;;EAED,MAAMa,aAAa,GAAGR,MAAM,gBAC1B,6BAAC,aAAD;IAEIS,QAAQ,EAAET,MAAM,CAACU,IAFrB;IAGIC,SAAS,EAAEP,YAAY,GAAGN,UAAH,GAAgBE,MAAM,CAACY,KAHlD;IAIIC,eAAe,EAAET,YAAY,GAAGP,oBAAH,GAA0BG,MAAM,CAACa,eAJlE;IAKIC,IAAI,EAAE;MACJC,MAAM,EAAEf,MAAM,CAACc,IADX;MAEJE,WAAW,EAAEhB,MAAM,CAACc;IAFhB;EALV,EAD0B,gBAa1B,6BAAC,IAAD;IAAM,SAAS,EAAET,cAAA,C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AQE,KAAK,EAAEwB,YART;IASE,SAAS,EAAEhB,WATb;IAUE,OAAO,EAAEU,aAVX;IAWE,SAAS,EAAEE,eAXb;IAYE,WAAW,EAAEE,eAZf;IAaE,YAAY,EAAEC,gBAbhB;IAcE,QAAQ,EAAE,CAdZ;IAeE,QAAQ,EAAEzB;EAfZ,IAiBG1B,gBAAgB,CAACC,IAAD,EAAOC,OAAO,IAAIY,KAAlB,EAAyBX,OAAzB,EAAkCC,oBAAlC,EAAwDC,UAAxD,CAjBnB,CADF;AAqBD,CA5FD;;AA8FAmB,UAAU,CAAC+B,SAAX,2CAAuBA,cAAvB;eAEe/B,U"}
|
|
@@ -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","s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,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -28,6 +28,8 @@ const propTypes = {
|
|
|
28
28
|
download: _propTypes.default.bool,
|
|
29
29
|
target: _propTypes.default.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
30
30
|
}),
|
|
31
|
+
hoverBackgroundColor: _propTypes.default.string,
|
|
32
|
+
hoverColor: _propTypes.default.string,
|
|
31
33
|
disabled: _propTypes.default.bool,
|
|
32
34
|
className: _propTypes.default.string,
|
|
33
35
|
customStyle: _propTypes.default.shape({})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["propTypes","type","PropTypes","oneOf","label","string","content","node","icon","shape","position","ICONS","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;;AAEA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,IAAI,EAAEC,kBAAA,CAAUC,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEF,kBAAA,CAAUG,MAFD;EAGhBC,OAAO,EAAEJ,kBAAA,CAAUK,IAHH;EAIhB,cAAcL,kBAAA,CAAUG,MAJR;EAKhB,aAAaH,kBAAA,CAAUG,MALP;EAMhB,eAAeH,kBAAA,CAAUG,MANT;EAOhBG,IAAI,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IACpBC,QAAQ,EAAER,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBF,IAAI,EAAEC,kBAAA,CAAUC,KAAV,CAAgB,oBAAKQ,kBAAL,CAAhB;EAFc,CAAhB,CAPU;EAWhBC,OAAO,EAAEV,kBAAA,CAAUW,IAXH;EAYhBC,IAAI,EAAEZ,kBAAA,CAAUO,KAAV,CAAgB;IACpBM,IAAI,EAAEb,kBAAA,CAAUG,MADI;IAEpBW,QAAQ,EAAEd,kBAAA,CAAUe,IAFA;IAGpBC,MAAM,EAAEhB,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAZU;EAiBhBgB,
|
|
1
|
+
{"version":3,"file":"types.js","names":["propTypes","type","PropTypes","oneOf","label","string","content","node","icon","shape","position","ICONS","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;;AAEA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,IAAI,EAAEC,kBAAA,CAAUC,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEF,kBAAA,CAAUG,MAFD;EAGhBC,OAAO,EAAEJ,kBAAA,CAAUK,IAHH;EAIhB,cAAcL,kBAAA,CAAUG,MAJR;EAKhB,aAAaH,kBAAA,CAAUG,MALP;EAMhB,eAAeH,kBAAA,CAAUG,MANT;EAOhBG,IAAI,EAAEN,kBAAA,CAAUO,KAAV,CAAgB;IACpBC,QAAQ,EAAER,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBF,IAAI,EAAEC,kBAAA,CAAUC,KAAV,CAAgB,oBAAKQ,kBAAL,CAAhB;EAFc,CAAhB,CAPU;EAWhBC,OAAO,EAAEV,kBAAA,CAAUW,IAXH;EAYhBC,IAAI,EAAEZ,kBAAA,CAAUO,KAAV,CAAgB;IACpBM,IAAI,EAAEb,kBAAA,CAAUG,MADI;IAEpBW,QAAQ,EAAEd,kBAAA,CAAUe,IAFA;IAGpBC,MAAM,EAAEhB,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAZU;EAiBhBgB,oBAAoB,EAAEjB,kBAAA,CAAUG,MAjBhB;EAkBhBe,UAAU,EAAElB,kBAAA,CAAUG,MAlBN;EAmBhBgB,QAAQ,EAAEnB,kBAAA,CAAUe,IAnBJ;EAoBhBK,SAAS,EAAEpB,kBAAA,CAAUG,MApBL;EAqBhBkB,WAAW,EAAErB,kBAAA,CAAUO,KAAV,CAAgB,EAAhB;AArBG,CAAlB;eA6DeT,S"}
|
|
@@ -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/lib/atom/tag/style.css
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/lib/atom/title/index.js
CHANGED
|
@@ -7,16 +7,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var _icon = _interopRequireDefault(require("../icon"));
|
|
11
|
-
|
|
12
|
-
var _tag = _interopRequireDefault(require("../tag"));
|
|
13
|
-
|
|
14
10
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
15
11
|
|
|
16
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
13
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
14
|
const getTitleStyle = (type, size) => {
|
|
21
15
|
switch (type) {
|
|
22
16
|
case 'page':
|
|
@@ -67,23 +61,17 @@ const Title = props => {
|
|
|
67
61
|
type,
|
|
68
62
|
'data-name': dataName,
|
|
69
63
|
titleSize = 'standard',
|
|
70
|
-
subtitleSize = 'standard'
|
|
71
|
-
icon,
|
|
72
|
-
tag
|
|
64
|
+
subtitleSize = 'standard'
|
|
73
65
|
} = props;
|
|
74
66
|
const titleStyle = getTitleStyle(type, titleSize);
|
|
75
67
|
const subtitleStyle = getSubtitleStyle(type, subtitleSize);
|
|
76
68
|
const subtitleSection = subtitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
77
69
|
className: subtitleStyle
|
|
78
70
|
}, subtitle) : null;
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className: _style.default.container
|
|
81
|
-
}, icon ? /*#__PURE__*/_react.default.createElement(_icon.default, _extends({}, icon, {
|
|
82
|
-
className: _style.default.icon
|
|
83
|
-
})) : null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
84
72
|
className: titleStyle,
|
|
85
73
|
"data-name": dataName
|
|
86
|
-
}, title
|
|
74
|
+
}, title), subtitleSection);
|
|
87
75
|
};
|
|
88
76
|
|
|
89
77
|
Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -92,9 +80,7 @@ Title.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
92
80
|
type: _propTypes.default.oneOf(['page', 'form-group']),
|
|
93
81
|
'data-name': _propTypes.default.string,
|
|
94
82
|
titleSize: _propTypes.default.oneOf(['standard', 'medium', 'small']),
|
|
95
|
-
subtitleSize: _propTypes.default.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
|
|
96
|
-
icon: _propTypes.default.shape(_icon.default.propTypes),
|
|
97
|
-
tag: _propTypes.default.shape(_tag.default.propTypes)
|
|
83
|
+
subtitleSize: _propTypes.default.oneOf(['standard', 'small', 'small-without-margin', 'extra-small'])
|
|
98
84
|
} : {};
|
|
99
85
|
var _default = Title;
|
|
100
86
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getTitleStyle","type","size","style","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","
|
|
1
|
+
{"version":3,"file":"index.js","names":["getTitleStyle","type","size","style","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","titleStyle","subtitleStyle","subtitleSection","propTypes","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(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,oBACE,uDACE;IAAK,SAAS,EAAEI,UAAhB;IAA4B,aAAWH;EAAvC,GACGF,KADH,CADF,EAIGO,eAJH,CADF;AAQD,CAtBD;;AAwBAT,KAAK,CAACU,SAAN,2CAAkB;EAChBR,KAAK,EAAES,kBAAA,CAAUC,MADD;EAEhBT,QAAQ,EAAEQ,kBAAA,CAAUC,MAFJ;EAGhBzB,IAAI,EAAEwB,kBAAA,CAAUE,KAAV,CAAgB,CAAC,MAAD,EAAS,YAAT,CAAhB,CAHU;EAIhB,aAAaF,kBAAA,CAAUC,MAJP;EAKhBP,SAAS,EAAEM,kBAAA,CAAUE,KAAV,CAAgB,CAAC,UAAD,EAAa,QAAb,EAAuB,OAAvB,CAAhB,CALK;EAMhBP,YAAY,EAAEK,kBAAA,CAAUE,KAAV,CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,sBAAtB,EAA8C,aAA9C,CAAhB;AANE,CAAlB;eAQeb,K"}
|
package/lib/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"}
|
|
@@ -42,9 +42,6 @@ const BaseModal = (props, context) => {
|
|
|
42
42
|
const {
|
|
43
43
|
skin
|
|
44
44
|
} = context;
|
|
45
|
-
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
46
|
-
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
47
|
-
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
48
45
|
const Footer = (0, _react.useCallback)(() => {
|
|
49
46
|
if ((0, _isEmpty2.default)(footer)) return null;
|
|
50
47
|
if (typeof footer === 'function') return footer();
|
|
@@ -76,13 +73,12 @@ const BaseModal = (props, context) => {
|
|
|
76
73
|
onClick: onCancel,
|
|
77
74
|
label: cancelLabel,
|
|
78
75
|
disabled: cancelDisabled
|
|
79
|
-
}) : null, onConfirm && confirmLabel ? /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
onMouseOver: handleMouseOver,
|
|
81
|
-
onMouseLeave: handleMouseLeave
|
|
82
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({
|
|
76
|
+
}) : null, onConfirm && confirmLabel ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({
|
|
83
77
|
customStyle: {
|
|
84
|
-
backgroundColor:
|
|
78
|
+
backgroundColor: primarySkinColor
|
|
85
79
|
},
|
|
80
|
+
hoverBackgroundColor: (0, _cssColorFunction.convert)(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`),
|
|
81
|
+
hoverColor: '#FFFFFF',
|
|
86
82
|
className: _style.default.footerConfirmButton,
|
|
87
83
|
type: 'primary',
|
|
88
84
|
onClick: onConfirm,
|
|
@@ -100,7 +96,7 @@ const BaseModal = (props, context) => {
|
|
|
100
96
|
} : {}))) : null), text ? /*#__PURE__*/_react.default.createElement("div", {
|
|
101
97
|
className: `${_style.default.footerDescription} ${isError ? _style.default.footerDescriptionError : ''}`
|
|
102
98
|
}, text) : null);
|
|
103
|
-
}, [footer,
|
|
99
|
+
}, [footer, skin, _style.default, _cssColorFunction.convert, _get2.default, _isEmpty2.default]);
|
|
104
100
|
if (!isOpen || !title || !children) return null;
|
|
105
101
|
|
|
106
102
|
function handleOnClose(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BaseModal","props","context","title","description","headerIcon","children","isOpen","footer","onClose","skin","hovered","setHovered","useState","handleMouseOver","useCallback","handleMouseLeave","Footer","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","primarySkinColor","style","footerCTAWrapper","className","footerCancelButton","type","onClick","customStyle","backgroundColor","convert","footerConfirmButton","icon","position","faIcon","name","color","size","footerDescription","footerDescriptionError","handleOnClose","e","stopPropagation","modalWrapper","modal","header","faSize","wrapperSize","headerContent","headerTitle","headerDescription","headerCloseIcon","body","contextTypes","Provider","childContextTypes","propTypes","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;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,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,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAMC,eAAe,GAAG,IAAAC,kBAAA,EAAY,MAAMH,UAAU,CAAC,IAAD,CAA5B,EAAoC,CAACA,UAAD,CAApC,CAAxB;EACA,MAAMI,gBAAgB,GAAG,IAAAD,kBAAA,EAAY,MAAMH,UAAU,CAAC,KAAD,CAA5B,EAA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AEiD,kBAAA,CAAUE,KAAV,CAAgB;MAC5B/C,KAAK,EAAE6C,kBAAA,CAAUC,MADW;MAE5B5C,QAAQ,EAAE2C,kBAAA,CAAUM,IAFQ;MAG5BhD,QAAQ,EAAE0C,kBAAA,CAAUI;IAHQ,CAAhB,CAHA;IAQdpD,aAAa,EAAEgD,kBAAA,CAAUE,KAAV,CAAgB;MAC7B/C,KAAK,EAAE6C,kBAAA,CAAUC,MADY;MAE7BxC,SAAS,EAAEuC,kBAAA,CAAUM,IAFQ;MAG7B3C,QAAQ,EAAEqC,kBAAA,CAAUC,MAHS;MAI7B3C,QAAQ,EAAE0C,kBAAA,CAAUI;IAJS,CAAhB;EARD,CAAhB,CAF0B,CAApB,CAVY;EA4BpB9D,OAAO,EAAE0D,kBAAA,CAAUM;AA5BC,CAAtB;eA+BezE,S"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["BaseModal","props","context","title","description","headerIcon","children","isOpen","footer","onClose","skin","Footer","useCallback","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","primarySkinColor","style","footerCTAWrapper","className","footerCancelButton","type","onClick","customStyle","backgroundColor","hoverBackgroundColor","convert","hoverColor","footerConfirmButton","icon","position","faIcon","name","color","size","footerDescription","footerDescriptionError","handleOnClose","e","stopPropagation","modalWrapper","modal","header","faSize","wrapperSize","headerContent","headerTitle","headerDescription","headerCloseIcon","body","contextTypes","Provider","childContextTypes","propTypes","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;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,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,GAAG,IAAAC,kBAAA,EAAY,MAAM;IAC/B,IAAI,uBAAQJ,MAAR,CAAJ,EAAqB,OAAO,IAAP;IACrB,IAAI,OAAOA,MAAP,KAAkB,UAAtB,EAAkC,OAAOA,MAAM,EAAb;IAElC,MAAM;MAACK,YAAD;MAAeC,aAAf;MAA8BC,IAA9B;MAAoCC;IAApC,IAA+CR,MAArD;IACA,MAAM;MAACS,KAAK,E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BAAA,CAAUC,MAHS;MAI7B7C,QAAQ,EAAE4C,kBAAA,CAAUI;IAJS,CAAhB;EARD,CAAhB,CAF0B,CAApB,CAVY;EA4BpB3D,OAAO,EAAEuD,kBAAA,CAAUM;AA5BC,CAAtB;eA+BetE,S"}
|
|
@@ -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"}
|
|
@@ -39,10 +39,6 @@ var _provider = _interopRequireDefault(require("../../../atom/provider"));
|
|
|
39
39
|
|
|
40
40
|
var _card = _interopRequireWildcard(require("../../card"));
|
|
41
41
|
|
|
42
|
-
var _learningPriorityCard = _interopRequireDefault(require("../../learning-priority-card"));
|
|
43
|
-
|
|
44
|
-
var _icon = _interopRequireDefault(require("../../../atom/icon"));
|
|
45
|
-
|
|
46
42
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
47
43
|
|
|
48
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -341,32 +337,38 @@ class CardsList extends _react.default.PureComponent {
|
|
|
341
337
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
342
338
|
className: _style.default.card,
|
|
343
339
|
key: key
|
|
344
|
-
},
|
|
340
|
+
}, /*#__PURE__*/_react.default.createElement(_card.default, _extends({}, card, {
|
|
345
341
|
dataName: `${dataName}-${key}`
|
|
346
342
|
})));
|
|
347
343
|
}))(cards);
|
|
348
|
-
const arrowIconProps = {
|
|
349
|
-
color: dark,
|
|
350
|
-
preset: 's',
|
|
351
|
-
borderRadius: '8px',
|
|
352
|
-
ariaLabel: ariaLabel.showMoreOnLeftAriaLabel
|
|
353
|
-
};
|
|
354
344
|
|
|
355
|
-
const
|
|
356
|
-
className: _style.default.
|
|
357
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
358
|
-
className: _style.default.arrow,
|
|
345
|
+
const leftArrowView = /*#__PURE__*/_react.default.createElement("div", {
|
|
346
|
+
className: _style.default.circle,
|
|
359
347
|
onClick: this.handleOnLeft,
|
|
360
348
|
"data-name": "card-list-left-arrow"
|
|
361
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
349
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowLeft, {
|
|
350
|
+
style: {
|
|
351
|
+
color: dark
|
|
352
|
+
},
|
|
353
|
+
className: _style.default.left,
|
|
354
|
+
width: 10,
|
|
355
|
+
height: 10,
|
|
356
|
+
"aria-label": ariaLabel.showMoreOnLeftAriaLabel
|
|
357
|
+
}));
|
|
358
|
+
|
|
359
|
+
const rightArrowView = /*#__PURE__*/_react.default.createElement("div", {
|
|
360
|
+
className: _style.default.circle,
|
|
365
361
|
onClick: this.handleOnRight,
|
|
366
362
|
"data-name": "card-list-right-arrow"
|
|
367
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
368
|
-
|
|
369
|
-
|
|
363
|
+
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
|
|
364
|
+
style: {
|
|
365
|
+
color: dark
|
|
366
|
+
},
|
|
367
|
+
className: _style.default.right,
|
|
368
|
+
width: 10,
|
|
369
|
+
height: 10,
|
|
370
|
+
"aria-label": ariaLabel.showMoreOnRightAriaLabel
|
|
371
|
+
}));
|
|
370
372
|
|
|
371
373
|
const titleView = typeof title === 'string' ? /*#__PURE__*/_react.default.createElement("span", {
|
|
372
374
|
"data-name": "title",
|
|
@@ -385,7 +387,7 @@ class CardsList extends _react.default.PureComponent {
|
|
|
385
387
|
}) : null;
|
|
386
388
|
const switchPagesView = hasPages ? /*#__PURE__*/_react.default.createElement("div", {
|
|
387
389
|
className: _style.default.pagingWrapper
|
|
388
|
-
}, showMoreView,
|
|
390
|
+
}, showMoreView, leftArrowView, rightArrowView) : null;
|
|
389
391
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
390
392
|
className: _style.default.wrapper,
|
|
391
393
|
style: customStyle,
|
|
@@ -425,7 +427,6 @@ CardsList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
425
427
|
showMoreOnLeftAriaLabel: _propTypes.default.string,
|
|
426
428
|
showMoreOnRightAriaLabel: _propTypes.default.string
|
|
427
429
|
}),
|
|
428
|
-
type: _propTypes.default.oneOf(['cards']),
|
|
429
430
|
// eslint-disable-next-line react/forbid-prop-types
|
|
430
431
|
testingSizes: _propTypes.default.any
|
|
431
432
|
} : {};
|