@coorpacademy/components 11.14.1-alpha.3.27 → 11.14.1
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/index.d.ts.map +1 -1
- package/es/atom/button/index.js +18 -13
- package/es/atom/button/index.js.map +1 -1
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +5 -4
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +61 -40
- package/es/molecule/hero/index.d.ts +26 -30
- package/es/molecule/hero/index.d.ts.map +1 -1
- package/es/molecule/hero/index.js +13 -14
- package/es/molecule/hero/index.js.map +1 -1
- package/es/molecule/hero/style.css +0 -42
- package/es/molecule/quick-access-card/index.d.ts +0 -1
- package/es/molecule/quick-access-card/index.d.ts.map +1 -1
- package/es/molecule/quick-access-card/index.js +21 -77
- package/es/molecule/quick-access-card/index.js.map +1 -1
- package/es/molecule/quick-access-card/style.css +17 -28
- package/es/molecule/quick-access-cards-group/index.d.ts +0 -1
- package/es/organism/brand-dashboard/index.d.ts +0 -1
- package/es/template/back-office/brand-update/index.d.ts +0 -1
- package/es/template/external-course/index.d.ts +69 -21
- package/es/template/external-course/index.d.ts.map +1 -1
- package/es/template/external-course/index.js +73 -56
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/external-course/style.css +1 -1
- package/es/util/button-icons.d.ts +0 -1
- package/es/util/button-icons.d.ts.map +1 -1
- package/es/util/button-icons.js +2 -3
- package/es/util/button-icons.js.map +1 -1
- package/es/variables/breakpoints.css +1 -1
- package/lib/atom/button/index.d.ts.map +1 -1
- package/lib/atom/button/index.js +18 -13
- package/lib/atom/button/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +4 -3
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +61 -40
- package/lib/molecule/hero/index.d.ts +26 -30
- package/lib/molecule/hero/index.d.ts.map +1 -1
- package/lib/molecule/hero/index.js +14 -15
- package/lib/molecule/hero/index.js.map +1 -1
- package/lib/molecule/hero/style.css +0 -42
- package/lib/molecule/quick-access-card/index.d.ts +0 -1
- package/lib/molecule/quick-access-card/index.d.ts.map +1 -1
- package/lib/molecule/quick-access-card/index.js +20 -76
- package/lib/molecule/quick-access-card/index.js.map +1 -1
- package/lib/molecule/quick-access-card/style.css +17 -28
- package/lib/molecule/quick-access-cards-group/index.d.ts +0 -1
- package/lib/organism/brand-dashboard/index.d.ts +0 -1
- package/lib/template/back-office/brand-update/index.d.ts +0 -1
- package/lib/template/external-course/index.d.ts +69 -21
- package/lib/template/external-course/index.d.ts.map +1 -1
- package/lib/template/external-course/index.js +76 -54
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/external-course/style.css +1 -1
- package/lib/util/button-icons.d.ts +0 -1
- package/lib/util/button-icons.d.ts.map +1 -1
- package/lib/util/button-icons.js +1 -2
- package/lib/util/button-icons.js.map +1 -1
- package/lib/variables/breakpoints.css +1 -1
- package/package.json +3 -3
- package/es/molecule/expandable-item/index.d.ts +0 -19
- package/es/molecule/expandable-item/index.d.ts.map +0 -1
- package/es/molecule/expandable-item/index.js +0 -44
- package/es/molecule/expandable-item/index.js.map +0 -1
- package/es/molecule/expandable-item/style.css +0 -135
- package/es/molecule/expandable-item/types.d.ts +0 -20
- package/es/molecule/expandable-item/types.d.ts.map +0 -1
- package/es/molecule/expandable-item/types.js +0 -11
- package/es/molecule/expandable-item/types.js.map +0 -1
- package/es/molecule/expandable-list/index.d.ts +0 -18
- package/es/molecule/expandable-list/index.d.ts.map +0 -1
- package/es/molecule/expandable-list/index.js +0 -22
- package/es/molecule/expandable-list/index.js.map +0 -1
- package/es/molecule/expandable-list/style.css +0 -20
- package/es/molecule/expandable-list/types.d.ts +0 -17
- package/es/molecule/expandable-list/types.d.ts.map +0 -1
- package/es/molecule/expandable-list/types.js +0 -6
- package/es/molecule/expandable-list/types.js.map +0 -1
- package/es/molecule/hero/types.d.ts +0 -22
- package/es/molecule/hero/types.d.ts.map +0 -1
- package/es/molecule/hero/types.js +0 -14
- package/es/molecule/hero/types.js.map +0 -1
- package/es/molecule/menu-links/index.d.ts +0 -22
- package/es/molecule/menu-links/index.d.ts.map +0 -1
- package/es/molecule/menu-links/index.js +0 -70
- package/es/molecule/menu-links/index.js.map +0 -1
- package/es/molecule/menu-links/style.css +0 -161
- package/es/molecule/menu-links/types.d.ts +0 -35
- package/es/molecule/menu-links/types.d.ts.map +0 -1
- package/es/molecule/menu-links/types.js +0 -17
- package/es/molecule/menu-links/types.js.map +0 -1
- package/es/molecule/privacy-policy-contact/index.d.ts +0 -14
- package/es/molecule/privacy-policy-contact/index.d.ts.map +0 -1
- package/es/molecule/privacy-policy-contact/index.js +0 -28
- package/es/molecule/privacy-policy-contact/index.js.map +0 -1
- package/es/molecule/privacy-policy-contact/style.css +0 -38
- package/es/molecule/privacy-policy-contact/types.d.ts +0 -10
- package/es/molecule/privacy-policy-contact/types.d.ts.map +0 -1
- package/es/molecule/privacy-policy-contact/types.js +0 -6
- package/es/molecule/privacy-policy-contact/types.js.map +0 -1
- package/es/molecule/privacy-policy-download/index.d.ts +0 -38
- package/es/molecule/privacy-policy-download/index.d.ts.map +0 -1
- package/es/molecule/privacy-policy-download/index.js +0 -27
- package/es/molecule/privacy-policy-download/index.js.map +0 -1
- package/es/molecule/privacy-policy-download/style.css +0 -65
- package/es/molecule/privacy-policy-download/types.d.ts +0 -50
- package/es/molecule/privacy-policy-download/types.d.ts.map +0 -1
- package/es/molecule/privacy-policy-download/types.js +0 -8
- package/es/molecule/privacy-policy-download/types.js.map +0 -1
- package/es/template/common/faq-article-page/index.d.ts +0 -27
- package/es/template/common/faq-article-page/index.d.ts.map +0 -1
- package/es/template/common/faq-article-page/index.js +0 -50
- package/es/template/common/faq-article-page/index.js.map +0 -1
- package/es/template/common/faq-article-page/style.css +0 -110
- package/es/template/common/faq-article-page/types.d.ts +0 -40
- package/es/template/common/faq-article-page/types.d.ts.map +0 -1
- package/es/template/common/faq-article-page/types.js +0 -20
- package/es/template/common/faq-article-page/types.js.map +0 -1
- package/es/template/common/faq-cards-page/index.d.ts +0 -34
- package/es/template/common/faq-cards-page/index.d.ts.map +0 -1
- package/es/template/common/faq-cards-page/index.js +0 -45
- package/es/template/common/faq-cards-page/index.js.map +0 -1
- package/es/template/common/faq-cards-page/style.css +0 -95
- package/es/template/common/faq-cards-page/types.d.ts +0 -44
- package/es/template/common/faq-cards-page/types.d.ts.map +0 -1
- package/es/template/common/faq-cards-page/types.js +0 -13
- package/es/template/common/faq-cards-page/types.js.map +0 -1
- package/es/template/common/faq-page/index.d.ts +0 -80
- package/es/template/common/faq-page/index.d.ts.map +0 -1
- package/es/template/common/faq-page/index.js +0 -44
- package/es/template/common/faq-page/index.js.map +0 -1
- package/es/template/common/faq-page/style.css +0 -104
- package/es/template/common/faq-page/types.d.ts +0 -86
- package/es/template/common/faq-page/types.d.ts.map +0 -1
- package/es/template/common/faq-page/types.js +0 -13
- package/es/template/common/faq-page/types.js.map +0 -1
- package/es/template/common/privacy-policy-page/index.d.ts +0 -80
- package/es/template/common/privacy-policy-page/index.d.ts.map +0 -1
- package/es/template/common/privacy-policy-page/index.js +0 -50
- package/es/template/common/privacy-policy-page/index.js.map +0 -1
- package/es/template/common/privacy-policy-page/style.css +0 -123
- package/es/template/common/privacy-policy-page/types.d.ts +0 -86
- package/es/template/common/privacy-policy-page/types.d.ts.map +0 -1
- package/es/template/common/privacy-policy-page/types.js +0 -13
- package/es/template/common/privacy-policy-page/types.js.map +0 -1
- package/lib/molecule/expandable-item/index.d.ts +0 -19
- package/lib/molecule/expandable-item/index.d.ts.map +0 -1
- package/lib/molecule/expandable-item/index.js +0 -58
- package/lib/molecule/expandable-item/index.js.map +0 -1
- package/lib/molecule/expandable-item/style.css +0 -135
- package/lib/molecule/expandable-item/types.d.ts +0 -20
- package/lib/molecule/expandable-item/types.d.ts.map +0 -1
- package/lib/molecule/expandable-item/types.js +0 -20
- package/lib/molecule/expandable-item/types.js.map +0 -1
- package/lib/molecule/expandable-list/index.d.ts +0 -18
- package/lib/molecule/expandable-list/index.d.ts.map +0 -1
- package/lib/molecule/expandable-list/index.js +0 -33
- package/lib/molecule/expandable-list/index.js.map +0 -1
- package/lib/molecule/expandable-list/style.css +0 -20
- package/lib/molecule/expandable-list/types.d.ts +0 -17
- package/lib/molecule/expandable-list/types.d.ts.map +0 -1
- package/lib/molecule/expandable-list/types.js +0 -16
- package/lib/molecule/expandable-list/types.js.map +0 -1
- package/lib/molecule/hero/types.d.ts +0 -22
- package/lib/molecule/hero/types.d.ts.map +0 -1
- package/lib/molecule/hero/types.js +0 -25
- package/lib/molecule/hero/types.js.map +0 -1
- package/lib/molecule/menu-links/index.d.ts +0 -22
- package/lib/molecule/menu-links/index.d.ts.map +0 -1
- package/lib/molecule/menu-links/index.js +0 -88
- package/lib/molecule/menu-links/index.js.map +0 -1
- package/lib/molecule/menu-links/style.css +0 -161
- package/lib/molecule/menu-links/types.d.ts +0 -35
- package/lib/molecule/menu-links/types.d.ts.map +0 -1
- package/lib/molecule/menu-links/types.js +0 -26
- package/lib/molecule/menu-links/types.js.map +0 -1
- package/lib/molecule/privacy-policy-contact/index.d.ts +0 -14
- package/lib/molecule/privacy-policy-contact/index.d.ts.map +0 -1
- package/lib/molecule/privacy-policy-contact/index.js +0 -41
- package/lib/molecule/privacy-policy-contact/index.js.map +0 -1
- package/lib/molecule/privacy-policy-contact/style.css +0 -38
- package/lib/molecule/privacy-policy-contact/types.d.ts +0 -10
- package/lib/molecule/privacy-policy-contact/types.d.ts.map +0 -1
- package/lib/molecule/privacy-policy-contact/types.js +0 -15
- package/lib/molecule/privacy-policy-contact/types.js.map +0 -1
- package/lib/molecule/privacy-policy-download/index.d.ts +0 -38
- package/lib/molecule/privacy-policy-download/index.d.ts.map +0 -1
- package/lib/molecule/privacy-policy-download/index.js +0 -38
- package/lib/molecule/privacy-policy-download/index.js.map +0 -1
- package/lib/molecule/privacy-policy-download/style.css +0 -65
- package/lib/molecule/privacy-policy-download/types.d.ts +0 -50
- package/lib/molecule/privacy-policy-download/types.d.ts.map +0 -1
- package/lib/molecule/privacy-policy-download/types.js +0 -18
- package/lib/molecule/privacy-policy-download/types.js.map +0 -1
- package/lib/template/common/faq-article-page/index.d.ts +0 -27
- package/lib/template/common/faq-article-page/index.d.ts.map +0 -1
- package/lib/template/common/faq-article-page/index.js +0 -63
- package/lib/template/common/faq-article-page/index.js.map +0 -1
- package/lib/template/common/faq-article-page/style.css +0 -110
- package/lib/template/common/faq-article-page/types.d.ts +0 -40
- package/lib/template/common/faq-article-page/types.d.ts.map +0 -1
- package/lib/template/common/faq-article-page/types.js +0 -30
- package/lib/template/common/faq-article-page/types.js.map +0 -1
- package/lib/template/common/faq-cards-page/index.d.ts +0 -34
- package/lib/template/common/faq-cards-page/index.d.ts.map +0 -1
- package/lib/template/common/faq-cards-page/index.js +0 -58
- package/lib/template/common/faq-cards-page/index.js.map +0 -1
- package/lib/template/common/faq-cards-page/style.css +0 -95
- package/lib/template/common/faq-cards-page/types.d.ts +0 -44
- package/lib/template/common/faq-cards-page/types.d.ts.map +0 -1
- package/lib/template/common/faq-cards-page/types.js +0 -25
- package/lib/template/common/faq-cards-page/types.js.map +0 -1
- package/lib/template/common/faq-page/index.d.ts +0 -80
- package/lib/template/common/faq-page/index.d.ts.map +0 -1
- package/lib/template/common/faq-page/index.js +0 -58
- package/lib/template/common/faq-page/index.js.map +0 -1
- package/lib/template/common/faq-page/style.css +0 -104
- package/lib/template/common/faq-page/types.d.ts +0 -86
- package/lib/template/common/faq-page/types.d.ts.map +0 -1
- package/lib/template/common/faq-page/types.js +0 -24
- package/lib/template/common/faq-page/types.js.map +0 -1
- package/lib/template/common/privacy-policy-page/index.d.ts +0 -80
- package/lib/template/common/privacy-policy-page/index.d.ts.map +0 -1
- package/lib/template/common/privacy-policy-page/index.js +0 -65
- package/lib/template/common/privacy-policy-page/index.js.map +0 -1
- package/lib/template/common/privacy-policy-page/style.css +0 -123
- package/lib/template/common/privacy-policy-page/types.d.ts +0 -86
- package/lib/template/common/privacy-policy-page/types.d.ts.map +0 -1
- package/lib/template/common/privacy-policy-page/types.js +0 -24
- package/lib/template/common/privacy-policy-page/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA8IA,iDAgCC"}
|
package/es/atom/button/index.js
CHANGED
|
@@ -48,7 +48,8 @@ const ButtonContent = props => {
|
|
|
48
48
|
target: target,
|
|
49
49
|
className: anchorClassName,
|
|
50
50
|
style: style,
|
|
51
|
-
"aria-label": ariaLabel
|
|
51
|
+
"aria-label": ariaLabel,
|
|
52
|
+
"data-testid": dataTestid
|
|
52
53
|
}, submitValue || children || 'submit');
|
|
53
54
|
|
|
54
55
|
case 'a':
|
|
@@ -58,7 +59,8 @@ const ButtonContent = props => {
|
|
|
58
59
|
target: target,
|
|
59
60
|
className: anchorClassName,
|
|
60
61
|
onClick: anchorOnClick,
|
|
61
|
-
style: style
|
|
62
|
+
style: style,
|
|
63
|
+
"data-testid": dataTestid
|
|
62
64
|
}, submitValue || children);
|
|
63
65
|
|
|
64
66
|
case 'button':
|
|
@@ -82,17 +84,20 @@ const ButtonContent = props => {
|
|
|
82
84
|
// falls through in case type is button BUT no button tag is needed, for retro-compatibility
|
|
83
85
|
|
|
84
86
|
default:
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
{
|
|
88
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
89
|
+
"data-name": dataName,
|
|
90
|
+
type: type,
|
|
91
|
+
value: submitValue,
|
|
92
|
+
disabled: disabled,
|
|
93
|
+
onClick: onClick,
|
|
94
|
+
className: inputClassName,
|
|
95
|
+
"data-testid": dataTestid,
|
|
96
|
+
style: _extends({
|
|
97
|
+
color
|
|
98
|
+
}, style)
|
|
99
|
+
});
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
102
|
};
|
|
98
103
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","noop","ColorPropType","Link","cssStyle","ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","children","type","style","dataName","ariaLabel","dataTestid","useButtonTag","buttonRef","dataFor","dataTooltipPlace","dataTip","onKeyDown","onMouseLeave","onMouseOver","anchorClassName","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","favorite","propTypes","string","bool","oneOf","node","shape","func","Button","buttonContentClassName","isLinkDisabled","useWrapper","buttonWrapperClassNames","button","contentClassName","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport noop from 'lodash/fp/noop';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestid,\n useButtonTag,\n buttonRef,\n 'data-for': dataFor,\n 'data-tooltip-place': dataTooltipPlace,\n 'data-tip': dataTip,\n onKeyDown = noop,\n onMouseLeave = noop,\n onMouseOver = noop\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n >\n {submitValue || children}\n </a>\n );\n\n case 'button':\n if (useButtonTag)\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={dataFor}\n data-tooltip-place={dataTooltipPlace}\n data-tip={dataTip}\n data-name={dataName}\n data-testid={dataTestid}\n aria-label={ariaLabel.favorite}\n className={className}\n onClick={onClick}\n style={style}\n onKeyDown={onKeyDown}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n tabIndex={0}\n >\n {children}\n </button>\n );\n // falls through in case type is button BUT no button tag is needed, for retro-compatibility\n default
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","noop","ColorPropType","Link","cssStyle","ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","children","type","style","dataName","ariaLabel","dataTestid","useButtonTag","buttonRef","dataFor","dataTooltipPlace","dataTip","onKeyDown","onMouseLeave","onMouseOver","anchorClassName","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","favorite","propTypes","string","bool","oneOf","node","shape","func","Button","buttonContentClassName","isLinkDisabled","useWrapper","buttonWrapperClassNames","button","contentClassName","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport noop from 'lodash/fp/noop';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestid,\n useButtonTag,\n buttonRef,\n 'data-for': dataFor,\n 'data-tooltip-place': dataTooltipPlace,\n 'data-tip': dataTip,\n onKeyDown = noop,\n onMouseLeave = noop,\n onMouseOver = noop\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n data-testid={dataTestid}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n data-testid={dataTestid}\n >\n {submitValue || children}\n </a>\n );\n\n case 'button':\n if (useButtonTag)\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={dataFor}\n data-tooltip-place={dataTooltipPlace}\n data-tip={dataTip}\n data-name={dataName}\n data-testid={dataTestid}\n aria-label={ariaLabel.favorite}\n className={className}\n onClick={onClick}\n style={style}\n onKeyDown={onKeyDown}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n tabIndex={0}\n >\n {children}\n </button>\n );\n // falls through in case type is button BUT no button tag is needed, for retro-compatibility\n default: {\n return (\n <input\n data-name={dataName}\n type={type}\n value={submitValue}\n disabled={disabled}\n onClick={onClick}\n className={inputClassName}\n data-testid={dataTestid}\n style={{\n color,\n ...style\n }}\n />\n );\n }\n }\n};\n\nButtonContent.propTypes = {\n color: ColorPropType,\n submitValue: PropTypes.string,\n disabled: PropTypes.bool,\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n type: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n style: PropTypes.shape({}),\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n useButtonTag: PropTypes.bool,\n // event handlers\n onClick: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseOver: PropTypes.func,\n // for ReactTooltip handling\n buttonRef: PropTypes.shape({}),\n 'data-for': PropTypes.string,\n 'data-tooltip-place': PropTypes.string,\n 'data-tip': PropTypes.bool\n};\n\nconst Button = props => {\n const {\n className,\n buttonContentClassName,\n isLinkDisabled,\n type = 'submit',\n children,\n useWrapper = true\n } = props;\n const buttonWrapperClassNames = useMemo(\n () =>\n (isLinkDisabled && classnames([cssStyle.disabledAnchor, className])) ||\n classnames([cssStyle.button, className]),\n [className, isLinkDisabled]\n );\n\n const contentClassName = useMemo(\n () => (buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent),\n [buttonContentClassName]\n );\n\n return useWrapper ? (\n <div className={buttonWrapperClassNames}>\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n </div>\n ) : (\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n );\n};\n\nButton.propTypes = {\n isLinkDisabled: PropTypes.bool,\n useWrapper: PropTypes.bool,\n buttonContentClassName: PropTypes.string,\n ...ButtonContent.propTypes\n};\n\nexport default Button;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,QAAP,MAAqB,aAArB;;AAEA,MAAMC,aAAa,GAAGC,KAAK,IAAI;EAC7B,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAHI;IAIJC,QAJI;IAKJC,IALI;IAMJC,MANI;IAOJC,OAPI;IAQJC,SARI;IAS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,aAAD,eAAmBT,KAAnB;IAA0B,IAAI,EAAEU,IAAhC;IAAsC,SAAS,EAAEiC;EAAjD,IACGlC,QADH,CAPF;AAWD,CAhCD;;AAkCA4B,MAAM,CAACP,SAAP;EACES,cAAc,EAAE9C,SAAS,CAACuC,IAD5B;EAEEQ,UAAU,EAAE/C,SAAS,CAACuC,IAFxB;EAGEM,sBAAsB,EAAE7C,SAAS,CAACsC;AAHpC,GAIKhC,aAAa,CAAC+B,SAJnB;AAOA,eAAeO,MAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAeA,kDAoLC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket } from '@coorpacademy/nova-icons';
|
|
2
|
+
import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket, NovaLineStatusCheckCircle1 as CheckCircle1 } from '@coorpacademy/nova-icons';
|
|
3
3
|
import map from 'lodash/fp/map';
|
|
4
4
|
import Cta from '../../atom/button-link';
|
|
5
5
|
import ButtonLinkIconOnly from '../../atom/button-link-icon-only';
|
|
@@ -26,7 +26,8 @@ const CMPopin = props => {
|
|
|
26
26
|
const logo = {
|
|
27
27
|
AlertDiamond,
|
|
28
28
|
WindowUpload,
|
|
29
|
-
MoonRocket
|
|
29
|
+
MoonRocket,
|
|
30
|
+
CheckCircle1
|
|
30
31
|
};
|
|
31
32
|
const LogoComponent = logo[icon];
|
|
32
33
|
const backgroundImageStyle = backgroundImageUrl ? {
|
|
@@ -135,7 +136,7 @@ const CMPopin = props => {
|
|
|
135
136
|
}
|
|
136
137
|
}) : null), descriptionBtnTxt ? /*#__PURE__*/React.createElement("div", {
|
|
137
138
|
className: style.descriptionBtn
|
|
138
|
-
}, descriptionBtnTxt) : null, renderBtnSwitch(), /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
}, descriptionBtnTxt) : null, renderBtnSwitch(), firstButton || secondButton || thirdButton ? /*#__PURE__*/React.createElement("div", {
|
|
139
140
|
className: style.buttonContainer
|
|
140
141
|
}, firstButton ? /*#__PURE__*/React.createElement("div", {
|
|
141
142
|
className: firstButton.largeButton ? style.largeButton : style.button
|
|
@@ -164,7 +165,7 @@ const CMPopin = props => {
|
|
|
164
165
|
"aria-label": thirdButton['aria-label'],
|
|
165
166
|
type: thirdButton.type,
|
|
166
167
|
customStyle: thirdButton.customStyle
|
|
167
|
-
})) : null)));
|
|
168
|
+
})) : null) : null));
|
|
168
169
|
};
|
|
169
170
|
|
|
170
171
|
CMPopin.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","map","Cta","ButtonLinkIconOnly","InputSwitch","style","propTypes","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,kCAAkC,IAAIC,YAFxC,EAGEC,sBAAsB,IAAIC,MAH5B,EAIEC,wBAAwB,IAAIC,UAJ9B,QAKO,0BALP;AAMA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,GAAP,MAAgB,wBAAhB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,SAAP,MAAsB,SAAtB;;AAEA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACX5B,YADW;IAEXE,YAFW;IAGXI;EAHW,CAAb;EAKA,MAAMuB,aAAa,GAAGD,IAAI,CAACP,IAAD,CAA1B;EAEA,MAAMS,oBAAoB,GAAGR,kBAAkB,GAC3C;IACES,eAAe,EAAG,OAAMT,kBAAmB,GAD7C;IAEEU,cAAc,EAAE;EAFlB,CAD2C,GAK3C,IALJ;;EAMA,MAAMC,YAAY,GAAG,MAAM;IACzB,IAA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JzB;IAKE,IAAI,EAAEA,WAAW,CAACyB,IALpB;IAME,WAAW,EAAEzB,WAAW,CAACmD;EAN3B,EADF,CADU,GAWR,IApCN,CAzCF,CALF,CADF;AAwFD,CAjLD;;AAmLA9D,OAAO,CAACD,SAAR,2CAAoBA,SAApB;AAEA,eAAeC,OAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","NovaLineStatusCheckCircle1","CheckCircle1","map","Cta","ButtonLinkIconOnly","InputSwitch","style","propTypes","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaLineStatusCheckCircle1 as CheckCircle1\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth\n } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n return null;\n };\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,kCAAkC,IAAIC,YAFxC,EAGEC,sBAAsB,IAAIC,M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
52
52
|
margin: 16px;
|
|
53
53
|
padding: 16px 16px 20px 16px;
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
|
|
115
115
|
.button {
|
|
116
116
|
min-width: max-content;
|
|
117
|
-
width:
|
|
117
|
+
width: 161px;
|
|
118
118
|
padding: 8px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.largeButton {
|
|
122
|
-
width:
|
|
122
|
+
width: 75%;
|
|
123
123
|
padding: 8px;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -147,7 +147,11 @@
|
|
|
147
147
|
color: cm_grey_500;
|
|
148
148
|
font-style: normal;
|
|
149
149
|
white-space: pre-line;
|
|
150
|
-
margin
|
|
150
|
+
margin: 0px 32px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.content {
|
|
154
|
+
margin: 20px 32px;
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
.cookieTitleContainer {
|
|
@@ -278,29 +282,21 @@ a {
|
|
|
278
282
|
}
|
|
279
283
|
|
|
280
284
|
@media tablet {
|
|
281
|
-
.popin {
|
|
282
|
-
position: fixed;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
285
|
.popin {
|
|
286
286
|
width: 80%;
|
|
287
|
+
overflow: hidden;
|
|
287
288
|
}
|
|
288
289
|
|
|
289
290
|
.buttonContainer {
|
|
290
291
|
display: flex;
|
|
291
292
|
flex-wrap: wrap-reverse;
|
|
292
|
-
margin:
|
|
293
|
-
width: 85%;
|
|
293
|
+
margin: 12px 24px 32px 24px;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.button {
|
|
296
|
+
.largeButton, .button , .titleContainer {
|
|
297
297
|
width: 100%;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.titleContainer {
|
|
301
|
-
width: 85%;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
300
|
.popinCookie {
|
|
305
301
|
position: fixed;
|
|
306
302
|
bottom: 10px;
|
|
@@ -310,40 +306,66 @@ a {
|
|
|
310
306
|
overflow-x: hidden;
|
|
311
307
|
overflow-y: auto;
|
|
312
308
|
}
|
|
313
|
-
.popinCookie .button{
|
|
309
|
+
.popinCookie .button {
|
|
314
310
|
width: 100%;
|
|
315
311
|
padding: 0px 0px 8px 0px
|
|
316
312
|
}
|
|
317
313
|
|
|
318
314
|
.popinCookie .largeButton {
|
|
319
|
-
padding: 8px 0px 0px 0px
|
|
315
|
+
padding: 8px 0px 0px 0px;
|
|
320
316
|
}
|
|
321
317
|
.popinCookie .message {
|
|
322
318
|
padding: 24px 24px 0px 24px
|
|
323
319
|
}
|
|
320
|
+
.descriptionText {
|
|
321
|
+
margin: 0px 16px;
|
|
322
|
+
}
|
|
323
|
+
.content {
|
|
324
|
+
margin: 20px 16px;
|
|
325
|
+
}
|
|
326
|
+
.message {
|
|
327
|
+
padding: 40px 16px 0px;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@media mobile {
|
|
332
|
+
.background {
|
|
333
|
+
padding: 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.popin {
|
|
337
|
+
width: 80%;
|
|
338
|
+
overflow: hidden;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.buttonContainer {
|
|
342
|
+
display: flex;
|
|
343
|
+
margin: 12px 16px 32px 16px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.button {
|
|
347
|
+
width: 100%;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.titleContainer {
|
|
351
|
+
width: 100%;
|
|
352
|
+
margin: 0px 16px;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.descriptionText {
|
|
356
|
+
margin: 0px 16px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.content {
|
|
360
|
+
margin: 16px 32px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.largeButton {
|
|
364
|
+
margin: 0px 32px;
|
|
365
|
+
}
|
|
324
366
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
position: fixed;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.popin {
|
|
331
|
-
width: 80%;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.buttonContainer {
|
|
335
|
-
display: flex;
|
|
336
|
-
margin: 48px 24px 32px 24px;
|
|
337
|
-
width: 85%;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.button {
|
|
341
|
-
width: 100%;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.titleContainer {
|
|
345
|
-
width: 85%;
|
|
346
|
-
}
|
|
367
|
+
.message {
|
|
368
|
+
padding: 40px 16px 0px;
|
|
347
369
|
}
|
|
348
370
|
}
|
|
349
371
|
|
|
@@ -355,7 +377,6 @@ button {
|
|
|
355
377
|
}
|
|
356
378
|
|
|
357
379
|
_:-ms-fullscreen,
|
|
358
|
-
.descriptionText,
|
|
359
380
|
.buttonContainer {
|
|
360
381
|
width: 85%;
|
|
361
382
|
}
|
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
skin: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
8
|
-
common: import("prop-types").Requireable<{
|
|
1
|
+
export default Hero;
|
|
2
|
+
declare function Hero(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace Hero {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
common: PropTypes.Requireable<{
|
|
9
7
|
[x: string]: any;
|
|
10
8
|
}>;
|
|
11
|
-
images:
|
|
12
|
-
'logo-mobile':
|
|
13
|
-
logo:
|
|
14
|
-
'logo-email':
|
|
15
|
-
login:
|
|
9
|
+
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
+
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
+
logo: PropTypes.Requireable<any>;
|
|
12
|
+
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
+
login: PropTypes.Requireable<any>;
|
|
16
14
|
}>>;
|
|
17
|
-
icons:
|
|
15
|
+
icons: PropTypes.Requireable<{
|
|
18
16
|
[x: string]: any;
|
|
19
17
|
}>;
|
|
20
|
-
mod:
|
|
18
|
+
mod: PropTypes.Requireable<{
|
|
21
19
|
[x: string]: any;
|
|
22
20
|
}>;
|
|
23
|
-
courses:
|
|
24
|
-
texts:
|
|
21
|
+
courses: PropTypes.Requireable<any[]>;
|
|
22
|
+
texts: PropTypes.Requireable<{
|
|
25
23
|
[x: string]: any;
|
|
26
24
|
}>;
|
|
27
25
|
}>>;
|
|
28
|
-
}
|
|
29
|
-
propTypes
|
|
30
|
-
image:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
export default Hero;
|
|
26
|
+
}
|
|
27
|
+
namespace propTypes {
|
|
28
|
+
const image: PropTypes.Requireable<string>;
|
|
29
|
+
const title: PropTypes.Requireable<string>;
|
|
30
|
+
const author: PropTypes.Requireable<string>;
|
|
31
|
+
const progress: PropTypes.Requireable<number>;
|
|
32
|
+
const onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
const submitValue: PropTypes.Requireable<string>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
import PropTypes from "prop-types";
|
|
41
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/hero/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/hero/index.js"],"names":[],"mappings":";AASA,6DAgCC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _get from "lodash/fp/get";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
3
4
|
import classnames from 'classnames';
|
|
4
5
|
import Provider from '../../atom/provider';
|
|
5
6
|
import Button from '../../atom/button';
|
|
6
7
|
import CardContentInfo, { MODES } from '../card-content';
|
|
7
|
-
import { propTypes } from './types';
|
|
8
8
|
import style from './style.css';
|
|
9
9
|
|
|
10
10
|
const Hero = (props, context) => {
|
|
@@ -17,9 +17,7 @@ const Hero = (props, context) => {
|
|
|
17
17
|
author,
|
|
18
18
|
progress,
|
|
19
19
|
onClick,
|
|
20
|
-
submitValue
|
|
21
|
-
description,
|
|
22
|
-
mode = MODES.HERO
|
|
20
|
+
submitValue
|
|
23
21
|
} = props;
|
|
24
22
|
|
|
25
23
|
const primaryColor = _get('common.primary', skin);
|
|
@@ -37,18 +35,12 @@ const Hero = (props, context) => {
|
|
|
37
35
|
backgroundColor: primaryColor,
|
|
38
36
|
backgroundImage: image ? `url('${image}')` : 'none'
|
|
39
37
|
}
|
|
40
|
-
})),
|
|
38
|
+
})), /*#__PURE__*/React.createElement(CardContentInfo, {
|
|
41
39
|
mode: MODES.HERO,
|
|
42
40
|
author: author,
|
|
43
41
|
progress: progress,
|
|
44
42
|
title: title
|
|
45
|
-
})
|
|
46
|
-
className: style.infoWrapper
|
|
47
|
-
}, /*#__PURE__*/React.createElement("h1", {
|
|
48
|
-
className: style.title
|
|
49
|
-
}, title), /*#__PURE__*/React.createElement("p", {
|
|
50
|
-
className: style.description
|
|
51
|
-
}, description)), mode === MODES.HERO ? /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
52
44
|
className: style.heroButtonWrapper
|
|
53
45
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
54
46
|
type: "link",
|
|
@@ -59,12 +51,19 @@ const Hero = (props, context) => {
|
|
|
59
51
|
style: {
|
|
60
52
|
backgroundColor: primaryColor
|
|
61
53
|
}
|
|
62
|
-
}))
|
|
54
|
+
})));
|
|
63
55
|
};
|
|
64
56
|
|
|
65
57
|
Hero.contextTypes = {
|
|
66
58
|
skin: Provider.childContextTypes.skin
|
|
67
59
|
};
|
|
68
|
-
Hero.propTypes = process.env.NODE_ENV !== "production" ?
|
|
60
|
+
Hero.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
61
|
+
image: PropTypes.string,
|
|
62
|
+
title: CardContentInfo.propTypes.title,
|
|
63
|
+
author: CardContentInfo.propTypes.author,
|
|
64
|
+
progress: CardContentInfo.propTypes.progress,
|
|
65
|
+
onClick: Button.propTypes.onClick,
|
|
66
|
+
submitValue: Button.propTypes.submitValue
|
|
67
|
+
} : {};
|
|
69
68
|
export default Hero;
|
|
70
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","classnames","Provider","Button","CardContentInfo","MODES","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Provider","Button","CardContentInfo","MODES","style","Hero","props","context","skin","image","title","author","progress","onClick","submitValue","primaryColor","cardStyle","hero","lazy","imageWrapper","backgroundColor","backgroundImage","HERO","heroButtonWrapper","heroButton","contextTypes","childContextTypes","propTypes","string"],"sources":["../../../src/molecule/hero/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport CardContentInfo, {MODES} from '../card-content';\nimport style from './style.css';\n\nconst Hero = (props, context) => {\n const {skin} = context;\n const {image, title, author, progress, onClick, submitValue} = props;\n\n const primaryColor = get('common.primary', skin);\n const cardStyle = classnames(style.hero, title ? null : style.lazy);\n\n return (\n <div className={cardStyle} data-name=\"hero\">\n <div className={style.imageWrapper}>\n <div\n data-name=\"cover\"\n className={style.image}\n style={{\n backgroundColor: primaryColor,\n backgroundImage: image ? `url('${image}')` : 'none'\n }}\n />\n </div>\n <CardContentInfo mode={MODES.HERO} author={author} progress={progress} title={title} />\n <div className={style.heroButtonWrapper}>\n <Button\n type=\"link\"\n data-name=\"hero-button\"\n onClick={onClick}\n submitValue={submitValue}\n className={style.heroButton}\n style={{backgroundColor: primaryColor}}\n />\n </div>\n </div>\n );\n};\n\nHero.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nHero.propTypes = {\n image: PropTypes.string,\n title: CardContentInfo.propTypes.title,\n author: CardContentInfo.propTypes.author,\n progress: CardContentInfo.propTypes.progress,\n onClick: Button.propTypes.onClick,\n submitValue: Button.propTypes.submitValue\n};\n\nexport default Hero;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,eAAP,IAAyBC,KAAzB,QAAqC,iBAArC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,IAAI,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC/B,MAAM;IAACC;EAAD,IAASD,OAAf;EACA,MAAM;IAACE,KAAD;IAAQC,KAAR;IAAeC,MAAf;IAAuBC,QAAvB;IAAiCC,OAAjC;IAA0CC;EAA1C,IAAyDR,KAA/D;;EAEA,MAAMS,YAAY,GAAG,KAAI,gBAAJ,EAAsBP,IAAtB,CAArB;;EACA,MAAMQ,SAAS,GAAGjB,UAAU,CAACK,KAAK,CAACa,IAAP,EAAaP,KAAK,GAAG,IAAH,GAAUN,KAAK,CAACc,IAAlC,CAA5B;EAEA,oBACE;IAAK,SAAS,EAAEF,SAAhB;IAA2B,aAAU;EAArC,gBACE;IAAK,SAAS,EAAEZ,KAAK,CAACe;EAAtB,gBACE;IACE,aAAU,OADZ;IAEE,SAAS,EAAEf,KAAK,CAACK,KAFnB;IAGE,KAAK,EAAE;MACLW,eAAe,EAAEL,YADZ;MAELM,eAAe,EAAEZ,KAAK,GAAI,QAAOA,KAAM,IAAjB,GAAuB;IAFxC;EAHT,EADF,CADF,eAWE,oBAAC,eAAD;IAAiB,IAAI,EAAEN,KAAK,CAACmB,IAA7B;IAAmC,MAAM,EAAEX,MAA3C;IAAmD,QAAQ,EAAEC,QAA7D;IAAuE,KAAK,EAAEF;EAA9E,EAXF,eAYE;IAAK,SAAS,EAAEN,KAAK,CAACmB;EAAtB,gBACE,oBAAC,MAAD;IACE,IAAI,EAAC,MADP;IAEE,aAAU,aAFZ;IAGE,OAAO,EAAEV,OAHX;IAIE,WAAW,EAAEC,WAJf;IAKE,SAAS,EAAEV,KAAK,CAACoB,UALnB;IAME,KAAK,EAAE;MAACJ,eAAe,EAAEL;IAAlB;EANT,EADF,CAZF,CADF;AAyBD,CAhCD;;AAkCAV,IAAI,CAACoB,YAAL,GAAoB;EAClBjB,IAAI,EAAER,QAAQ,CAAC0B,iBAAT,CAA2BlB;AADf,CAApB;AAIAH,IAAI,CAACsB,SAAL,2CAAiB;EACflB,KAAK,EAAEX,SAAS,CAAC8B,MADF;EAEflB,KAAK,EAAER,eAAe,CAACyB,SAAhB,CAA0BjB,KAFlB;EAGfC,MAAM,EAAET,eAAe,CAACyB,SAAhB,CAA0BhB,MAHnB;EAIfC,QAAQ,EAAEV,eAAe,CAACyB,SAAhB,CAA0Bf,QAJrB;EAKfC,OAAO,EAAEZ,MAAM,CAAC0B,SAAP,CAAiBd,OALX;EAMfC,WAAW,EAAEb,MAAM,CAAC0B,SAAP,CAAiBb;AANf,CAAjB;AASA,eAAeT,IAAf"}
|
|
@@ -156,45 +156,3 @@
|
|
|
156
156
|
opacity: 0;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
|
|
160
|
-
.infoWrapper {
|
|
161
|
-
display: flex;
|
|
162
|
-
flex-direction: column;
|
|
163
|
-
position: relative;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
padding: 0 40px;
|
|
166
|
-
width: 100%;
|
|
167
|
-
box-sizing: border-box;
|
|
168
|
-
color: white;
|
|
169
|
-
align-self: center;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.title {
|
|
173
|
-
font-family: Gilroy;
|
|
174
|
-
font-size: 28px;
|
|
175
|
-
font-weight: 500;
|
|
176
|
-
line-height: 36px;
|
|
177
|
-
letter-spacing: 0px;
|
|
178
|
-
text-align: center;
|
|
179
|
-
overflow: hidden;
|
|
180
|
-
user-select: none;
|
|
181
|
-
margin: 0;
|
|
182
|
-
align-self: center;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.description {
|
|
186
|
-
text-align: center;
|
|
187
|
-
margin-top: 12px;
|
|
188
|
-
font-size: 18px;
|
|
189
|
-
font-family: Gilroy;
|
|
190
|
-
font-size: 18px;
|
|
191
|
-
font-weight: 500;
|
|
192
|
-
line-height: 24px;
|
|
193
|
-
letter-spacing: 0px;
|
|
194
|
-
overflow: hidden;
|
|
195
|
-
user-select: none;
|
|
196
|
-
max-width: 650px;
|
|
197
|
-
padding: 0;
|
|
198
|
-
margin: 0;
|
|
199
|
-
align-self: center;
|
|
200
|
-
}
|
|
@@ -6,7 +6,6 @@ declare namespace QuickAccessCard {
|
|
|
6
6
|
const description: PropTypes.Requireable<string>;
|
|
7
7
|
const href: PropTypes.Requireable<string>;
|
|
8
8
|
const openInNewTab: PropTypes.Requireable<boolean>;
|
|
9
|
-
const isMoocCard: PropTypes.Requireable<boolean>;
|
|
10
9
|
const feature: PropTypes.Requireable<string>;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-access-card/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/quick-access-card/index.js"],"names":[],"mappings":";AA+EA,wEAwDC"}
|