@coorpacademy/components 11.36.3 → 11.36.4-alpha.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-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +1 -0
- package/es/atom/button-link/index.js.map +1 -1
- package/es/molecule/button-menu-action/index.d.ts +1 -0
- package/es/molecule/button-menu-action/index.d.ts.map +1 -1
- package/es/molecule/button-menu-action/index.js +11 -2
- package/es/molecule/button-menu-action/index.js.map +1 -1
- package/es/molecule/button-menu-action/types.d.ts +2 -0
- package/es/molecule/button-menu-action/types.d.ts.map +1 -1
- package/es/molecule/button-menu-action/types.js +2 -1
- package/es/molecule/button-menu-action/types.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +2 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/organism/content-skill-modal/index.d.ts +2 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +2 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +2 -0
- package/es/organism/mooc-header/index.d.ts +5 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +21 -1
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +2 -0
- package/es/template/app-player/player/index.d.ts +4 -0
- package/es/template/app-player/player/slides/index.d.ts +2 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts +2 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +6 -0
- package/es/template/common/dashboard/index.d.ts +4 -0
- package/es/template/common/search-page/index.d.ts +2 -0
- package/es/template/external-course/index.d.ts +2 -0
- package/es/variables/colors.d.ts +1 -0
- package/es/variables/colors.d.ts.map +1 -1
- package/es/variables/colors.js +2 -1
- package/es/variables/colors.js.map +1 -1
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +1 -0
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/molecule/button-menu-action/index.d.ts +1 -0
- package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/index.js +11 -2
- package/lib/molecule/button-menu-action/index.js.map +1 -1
- package/lib/molecule/button-menu-action/types.d.ts +2 -0
- package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
- package/lib/molecule/button-menu-action/types.js +2 -1
- package/lib/molecule/button-menu-action/types.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +2 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/index.d.ts +2 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +2 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +2 -0
- package/lib/organism/mooc-header/index.d.ts +5 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +21 -1
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +2 -0
- package/lib/template/app-player/player/index.d.ts +4 -0
- package/lib/template/app-player/player/slides/index.d.ts +2 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts +2 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +6 -0
- package/lib/template/common/dashboard/index.d.ts +4 -0
- package/lib/template/common/search-page/index.d.ts +2 -0
- package/lib/template/external-course/index.d.ts +2 -0
- package/lib/variables/colors.d.ts +1 -0
- package/lib/variables/colors.d.ts.map +1 -1
- package/lib/variables/colors.js +2 -1
- package/lib/variables/colors.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoIzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","DEFAULT_ICON_COLOR","ICONS","ToolTip","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","createElement","className","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop","onKeyDown","useTitle","styleButton","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","handleOnClick","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","_extends","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","process","env","NODE_ENV"],"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, {DEFAULT_ICON_COLOR, IconProps} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\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\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: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? null\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\n } as IconProps)}\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 usage = 'button',\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 tooltipText,\n tooltipPlacement = 'left',\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n link && style.link,\n className,\n style.button,\n !label && style.iconButton,\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 disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\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 className={styleButton}\n style={customStyle}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\n : {})}\n // eslint-disable-next-line react/button-has-type\n type={usage}\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 {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,OAAO,QAAO,OAAO;AAE3D,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,MAAM,IAAGC,kBAAkB,QAAkB,SAAS;AAC7D,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,SAAS,MAAmC,SAAS;AAC5D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,gBAAgB,GAAGA,CACvBC,IAAe,EACfC,OAAkC,EAClCC,OAAiB,EACjBC,oBAA6B,EAC7BC,UAAmB,KAChB;EACH,MAAM;IAACC,IAAI;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGP,IAAI,IAAI;IAACK,IAAI,EAAE,EAAE;IAAEE,QAAQ,EAAE;EAAE,CAAC;EACjE,MAAMC,IAAI,GAAGH,IAAI,IAAIV,KAAK,CA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allback","useState","useMemo","classnames","Link","FaIcon","DEFAULT_ICON_COLOR","ICONS","ToolTip","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","createElement","className","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","customStyle","theme","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","tooltipText","tooltipPlacement","link","onClick","_noop","onKeyDown","useTitle","styleButton","button","iconButton","primary","secondary","tertiary","text","dangerous","setHovered","handleOnClick","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","TooltipContent","tooltipContentWrapper","renderToolTip","closeToolTipInformationTextAriaLabel","fontSize","anchorId","toolTipIsVisible","placement","_customStyle","_extends","title","onMouseEnter","onMouseLeave","onMouseOver","tabIndex","process","env","NODE_ENV"],"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, {DEFAULT_ICON_COLOR, IconProps} from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport ToolTip from '../tooltip';\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\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: hovered && hoverColor ? hoverColor : faIcon.color ?? DEFAULT_ICON_COLOR,\n // eslint-disable-next-line no-nested-ternary\n backgroundColor: !faIcon?.backgroundColor\n ? null\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\n } as IconProps)}\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 usage = 'button',\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 tooltipText,\n tooltipPlacement = 'left',\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n link && style.link,\n className,\n style.button,\n !label && style.iconButton,\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 disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => {\n setHovered(true);\n }, [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const TooltipContent = useCallback(\n () => <span className={style.tooltipContentWrapper}>{tooltipText || ariaLabel}</span>,\n [tooltipText, ariaLabel]\n );\n\n const renderToolTip = () => {\n const closeToolTipInformationTextAriaLabel = tooltipText || ariaLabel;\n if (!closeToolTipInformationTextAriaLabel) return null;\n return (\n <ToolTip\n fontSize={12}\n anchorId=\"button-icon\"\n toolTipIsVisible={hovered}\n placement={tooltipPlacement}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n />\n );\n };\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 className={styleButton}\n style={customStyle}\n data-name={dataName}\n data-testid={dataTestId}\n onClick={handleOnClick}\n aria-label={ariaLabel || label}\n hoverColor={hoverColor}\n hoverBackgroundColor={hoverBackgroundColor}\n onMouseEnter={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n >\n {getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor)}\n {renderToolTip()}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n {...(ariaLabel && !label\n ? {\n 'data-for': 'button-icon',\n 'data-tip': hovered\n }\n : {})}\n // eslint-disable-next-line react/button-has-type\n type={usage}\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 {renderToolTip()}\n </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,OAAO,QAAO,OAAO;AAE3D,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,MAAM,IAAGC,kBAAkB,QAAkB,SAAS;AAC7D,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,SAAS,MAAmC,SAAS;AAC5D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,gBAAgB,GAAGA,CAC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AACC,IAAI,EAAEC,OAAO,IAAIW,KAAK,EAAEV,OAAO,EAAEC,oBAAoB,EAAEC,UAAU,CAAC,EACnFkD,aAAa,CAAC,CACT,CAAC;AAEb,CAAC;AAED9B,UAAU,CAAC3B,SAAS,GAAAsE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGxE,SAAS;AAEhC,eAAe2B,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAGzD,QAAA,MAAM,gBAAgB;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFrD,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import _noop from "lodash/fp/noop";
|
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
import React, { useCallback, useEffect, useState, useRef } from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
+
import map from 'lodash/fp/map';
|
|
5
6
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
7
|
import ButtonLink from '../../atom/button-link';
|
|
7
8
|
import ButtonMenu from '../../atom/button-menu';
|
|
@@ -14,7 +15,8 @@ const ButtonMenuAction = props => {
|
|
|
14
15
|
menuWrapper,
|
|
15
16
|
type = 'button',
|
|
16
17
|
primaryColor,
|
|
17
|
-
containerCustom
|
|
18
|
+
containerCustom,
|
|
19
|
+
closeOnClick = false
|
|
18
20
|
} = props;
|
|
19
21
|
const {
|
|
20
22
|
onClick = _noop
|
|
@@ -36,12 +38,19 @@ const ButtonMenuAction = props => {
|
|
|
36
38
|
document.removeEventListener('mousedown', handleMouseDown);
|
|
37
39
|
};
|
|
38
40
|
}, [visible, containerRef]);
|
|
41
|
+
const menuWithClose = closeOnClick ? {
|
|
42
|
+
...menu,
|
|
43
|
+
buttons: map(btn => ({
|
|
44
|
+
...btn,
|
|
45
|
+
onClick: () => setVisible(false)
|
|
46
|
+
}), menu.buttons)
|
|
47
|
+
} : menu;
|
|
39
48
|
const _menu = /*#__PURE__*/React.createElement("div", {
|
|
40
49
|
className: classnames(style.menuWrapper, visible && style.visible),
|
|
41
50
|
"data-name": "menu-wrapper",
|
|
42
51
|
"aria-label": menuWrapper?.ariaLabel,
|
|
43
52
|
style: menuWrapper?.customStyle
|
|
44
|
-
}, /*#__PURE__*/React.createElement(ButtonMenu,
|
|
53
|
+
}, /*#__PURE__*/React.createElement(ButtonMenu, menuWithClose));
|
|
45
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
55
|
className: style.container,
|
|
47
56
|
"data-name": "button-menu-action-wrapper",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useEffect","useState","useRef","classnames","FontAwesomeIcon","ButtonLink","ButtonMenu","propTypes","style","ButtonMenuAction","props","button","menu","menuWrapper","type","primaryColor","containerCustom","onClick","_noop","visible","setVisible","containerRef","toggleVisibility","prevState","handleMouseDown","event","current","contains","target","document","addEventListener","removeEventListener","_menu","createElement","className","ariaLabel","customStyle","container","ref","currentOption","color","undefined","label","icon","caret","_extends","process","env","NODE_ENV"],"sources":["../../../src/molecule/button-menu-action/index.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {ButtonMenuActionProps} from './types';\nimport style from './style.css';\n\nconst ButtonMenuAction = (props: ButtonMenuActionProps) => {\n const {button
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useEffect","useState","useRef","classnames","map","FontAwesomeIcon","ButtonLink","ButtonMenu","propTypes","style","ButtonMenuAction","props","button","menu","menuWrapper","type","primaryColor","containerCustom","closeOnClick","onClick","_noop","visible","setVisible","containerRef","toggleVisibility","prevState","handleMouseDown","event","current","contains","target","document","addEventListener","removeEventListener","menuWithClose","buttons","btn","_menu","createElement","className","ariaLabel","customStyle","container","ref","currentOption","color","undefined","label","icon","caret","_extends","process","env","NODE_ENV"],"sources":["../../../src/molecule/button-menu-action/index.tsx"],"sourcesContent":["import React, {useCallback, useEffect, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport map from 'lodash/fp/map';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {ButtonMenuActionProps} from './types';\nimport style from './style.css';\n\nconst ButtonMenuAction = (props: ButtonMenuActionProps) => {\n const {\n button,\n menu,\n menuWrapper,\n type = 'button',\n primaryColor,\n containerCustom,\n closeOnClick = false\n } = props;\n const {onClick = noop} = button;\n const [visible, setVisible] = useState(false);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const toggleVisibility = useCallback(() => {\n onClick();\n setVisible(prevState => !prevState);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = (event: MouseEvent) => {\n if (visible && containerRef.current && !containerRef.current.contains(event.target as Node)) {\n setVisible(false);\n }\n };\n\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, [visible, containerRef]);\n\n const menuWithClose = closeOnClick\n ? {\n ...menu,\n buttons: map(\n btn => ({\n ...btn,\n onClick: () => setVisible(false)\n }),\n menu.buttons\n )\n }\n : menu;\n\n const _menu = (\n <div\n className={classnames(style.menuWrapper, visible && style.visible)}\n data-name=\"menu-wrapper\"\n aria-label={menuWrapper?.ariaLabel}\n style={menuWrapper?.customStyle}\n >\n <ButtonMenu {...menuWithClose} />\n </div>\n );\n\n return (\n <div\n className={style.container}\n data-name=\"button-menu-action-wrapper\"\n style={containerCustom}\n ref={containerRef}\n >\n {type === 'link' ? (\n <div\n className={style.currentOption}\n data-name={button['data-name']}\n onClick={toggleVisibility}\n aria-expanded={visible}\n aria-haspopup=\"true\"\n >\n <span style={{color: visible ? primaryColor : undefined}}>{button.label}</span>\n <FontAwesomeIcon\n icon={visible ? 'chevron-up' : 'chevron-down'}\n className={style.caret}\n style={{color: visible ? primaryColor : undefined}}\n aria-label={button['aria-label']}\n />\n </div>\n ) : (\n <ButtonLink {...button} onClick={toggleVisibility} />\n )}\n {_menu}\n </div>\n );\n};\n\nButtonMenuAction.propTypes = propTypes;\n\nexport default ButtonMenuAction;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,QAAO,OAAO;AACrE,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,SAAS,MAA+B,SAAS;AACxD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EACzD,MAAM;IACJC,MAAM;IACNC,IAAI;IACJC,WAAW;IACXC,IAAI,GAAG,QAAQ;IACfC,YAAY;IACZC,eAAe;IACfC,YAAY,GAAG;EACjB,CAAC,GAAGP,KAAK;EACT,MAAM;IAACQ,OAAO,GAAAC;EAAO,CAAC,GAAGR,MAAM;EA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requireable<string>;
|
|
79
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
79
80
|
};
|
|
80
81
|
export default ButtonMenuActionPropTypes;
|
|
81
82
|
export declare type ButtonMenuActionProps = {
|
|
@@ -88,6 +89,7 @@ export declare type ButtonMenuActionProps = {
|
|
|
88
89
|
};
|
|
89
90
|
containerCustom?: Record<string, unknown>;
|
|
90
91
|
primaryColor?: string;
|
|
92
|
+
closeOnClick?: boolean;
|
|
91
93
|
};
|
|
92
94
|
export declare type ButtonMenuActionPropsFixture = {
|
|
93
95
|
props: ButtonMenuActionProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAElF,QAAA,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/button-menu-action/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAElF,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY9B,CAAC;AACF,eAAe,yBAAyB,CAAC;AAEzC,oBAAY,qBAAqB,GAAG;IAClC,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACvC,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IAAC,KAAK,EAAE,qBAAqB,CAAA;CAAC,CAAC"}
|
|
@@ -9,7 +9,8 @@ const ButtonMenuActionPropTypes = {
|
|
|
9
9
|
customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]))
|
|
10
10
|
}),
|
|
11
11
|
type: PropTypes.oneOf(['button', 'link']),
|
|
12
|
-
primaryColor: PropTypes.string
|
|
12
|
+
primaryColor: PropTypes.string,
|
|
13
|
+
closeOnClick: PropTypes.bool
|
|
13
14
|
};
|
|
14
15
|
export default ButtonMenuActionPropTypes;
|
|
15
16
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","ButtonLinkPropTypes","ButtonMenuPropTypes","ButtonMenuActionPropTypes","button","shape","isRequired","menu","menuWrapper","ariaLabel","string","customStyle","objectOf","oneOfType","number","object","type","oneOf","primaryColor"],"sources":["../../../src/molecule/button-menu-action/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport ButtonLinkPropTypes, {ButtonLinkProps} from '../../atom/button-link/types';\nimport ButtonMenuPropTypes, {ButtonMenuProps} from '../../atom/button-menu/types';\n\nconst ButtonMenuActionPropTypes = {\n button: PropTypes.shape(ButtonLinkPropTypes).isRequired,\n menu: PropTypes.shape(ButtonMenuPropTypes).isRequired,\n menuWrapper: PropTypes.shape({\n ariaLabel: PropTypes.string,\n customStyle: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])\n )\n }),\n type: PropTypes.oneOf(['button', 'link']),\n primaryColor: PropTypes.string\n};\nexport default ButtonMenuActionPropTypes;\n\nexport type ButtonMenuActionProps = {\n button: ButtonLinkProps;\n menu: ButtonMenuProps;\n type?: 'button' | 'link';\n menuWrapper?: {\n ariaLabel?: string;\n customStyle?: Record<string, unknown>;\n };\n containerCustom?: Record<string, unknown>;\n primaryColor?: string;\n};\n\nexport type ButtonMenuActionPropsFixture = {props: ButtonMenuActionProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,mBAAmB,MAAyB,8BAA8B;AACjF,OAAOC,mBAAmB,MAAyB,8BAA8B;AAEjF,MAAMC,yBAAyB,GAAG;EAChCC,MAAM,EAAEJ,SAAS,CAACK,KAAK,CAACJ,mBAAmB,CAAC,CAACK,UAAU;EACvDC,IAAI,EAAEP,SAAS,CAACK,KAAK,CAACH,mBAAmB,CAAC,CAACI,UAAU;EACrDE,WAAW,EAAER,SAAS,CAACK,KAAK,CAAC;IAC3BI,SAAS,EAAET,SAAS,CAACU,MAAM;IAC3BC,WAAW,EAAEX,SAAS,CAACY,QAAQ,CAC7BZ,SAAS,CAACa,SAAS,CAAC,CAACb,SAAS,CAACU,MAAM,EAAEV,SAAS,CAACc,MAAM,EAAEd,SAAS,CAACe,MAAM,CAAC,CAC5E;EACF,CAAC,CAAC;EACFC,IAAI,EAAEhB,SAAS,CAACiB,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;EACzCC,YAAY,EAAElB,SAAS,CAACU;AAC1B,CAAC;AACD,
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","ButtonLinkPropTypes","ButtonMenuPropTypes","ButtonMenuActionPropTypes","button","shape","isRequired","menu","menuWrapper","ariaLabel","string","customStyle","objectOf","oneOfType","number","object","type","oneOf","primaryColor","closeOnClick","bool"],"sources":["../../../src/molecule/button-menu-action/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport ButtonLinkPropTypes, {ButtonLinkProps} from '../../atom/button-link/types';\nimport ButtonMenuPropTypes, {ButtonMenuProps} from '../../atom/button-menu/types';\n\nconst ButtonMenuActionPropTypes = {\n button: PropTypes.shape(ButtonLinkPropTypes).isRequired,\n menu: PropTypes.shape(ButtonMenuPropTypes).isRequired,\n menuWrapper: PropTypes.shape({\n ariaLabel: PropTypes.string,\n customStyle: PropTypes.objectOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])\n )\n }),\n type: PropTypes.oneOf(['button', 'link']),\n primaryColor: PropTypes.string,\n closeOnClick: PropTypes.bool\n};\nexport default ButtonMenuActionPropTypes;\n\nexport type ButtonMenuActionProps = {\n button: ButtonLinkProps;\n menu: ButtonMenuProps;\n type?: 'button' | 'link';\n menuWrapper?: {\n ariaLabel?: string;\n customStyle?: Record<string, unknown>;\n };\n containerCustom?: Record<string, unknown>;\n primaryColor?: string;\n closeOnClick?: boolean;\n};\n\nexport type ButtonMenuActionPropsFixture = {props: ButtonMenuActionProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,mBAAmB,MAAyB,8BAA8B;AACjF,OAAOC,mBAAmB,MAAyB,8BAA8B;AAEjF,MAAMC,yBAAyB,GAAG;EAChCC,MAAM,EAAEJ,SAAS,CAACK,KAAK,CAACJ,mBAAmB,CAAC,CAACK,UAAU;EACvDC,IAAI,EAAEP,SAAS,CAACK,KAAK,CAACH,mBAAmB,CAAC,CAACI,UAAU;EACrDE,WAAW,EAAER,SAAS,CAACK,KAAK,CAAC;IAC3BI,SAAS,EAAET,SAAS,CAACU,MAAM;IAC3BC,WAAW,EAAEX,SAAS,CAACY,QAAQ,CAC7BZ,SAAS,CAACa,SAAS,CAAC,CAACb,SAAS,CAACU,MAAM,EAAEV,SAAS,CAACc,MAAM,EAAEd,SAAS,CAACe,MAAM,CAAC,CAC5E;EACF,CAAC,CAAC;EACFC,IAAI,EAAEhB,SAAS,CAACiB,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;EACzCC,YAAY,EAAElB,SAAS,CAACU,MAAM;EAC9BS,YAAY,EAAEnB,SAAS,CAACoB;AAC1B,CAAC;AACD,eAAejB,yBAAyB","ignoreList":[]}
|
|
@@ -423,6 +423,7 @@ declare const propTypes: {
|
|
|
423
423
|
}>>;
|
|
424
424
|
type: PropTypes.Requireable<string>;
|
|
425
425
|
primaryColor: PropTypes.Requireable<string>;
|
|
426
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
426
427
|
}> | null | undefined>>;
|
|
427
428
|
}>>;
|
|
428
429
|
}> | PropTypes.InferProps<{
|
|
@@ -760,6 +761,7 @@ declare const propTypes: {
|
|
|
760
761
|
}>>;
|
|
761
762
|
type: PropTypes.Requireable<string>;
|
|
762
763
|
primaryColor: PropTypes.Requireable<string>;
|
|
764
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
763
765
|
}>>;
|
|
764
766
|
}> | null | undefined>>;
|
|
765
767
|
}>>;
|
|
@@ -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;AAElD,OAAO,EAAC,SAAS,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE3D,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,MAA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,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,GAAG,SAAS,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IAC1D,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"}
|
|
@@ -271,6 +271,7 @@ declare const ContentSkillModal: {
|
|
|
271
271
|
}>>;
|
|
272
272
|
type: import("prop-types").Requireable<string>;
|
|
273
273
|
primaryColor: import("prop-types").Requireable<string>;
|
|
274
|
+
closeOnClick: import("prop-types").Requireable<boolean>;
|
|
274
275
|
}> | null | undefined>>;
|
|
275
276
|
}>>;
|
|
276
277
|
}> | import("prop-types").InferProps<{
|
|
@@ -608,6 +609,7 @@ declare const ContentSkillModal: {
|
|
|
608
609
|
}>>;
|
|
609
610
|
type: import("prop-types").Requireable<string>;
|
|
610
611
|
primaryColor: import("prop-types").Requireable<string>;
|
|
612
|
+
closeOnClick: import("prop-types").Requireable<boolean>;
|
|
611
613
|
}>>;
|
|
612
614
|
}>>>;
|
|
613
615
|
filters: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DvD,CAAC;AAQF,eAAe,iBAAiB,CAAC"}
|
|
@@ -268,6 +268,7 @@ declare const ContentSkillModalPropTypes: {
|
|
|
268
268
|
}>>;
|
|
269
269
|
type: PropTypes.Requireable<string>;
|
|
270
270
|
primaryColor: PropTypes.Requireable<string>;
|
|
271
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
271
272
|
}> | null | undefined>>;
|
|
272
273
|
}>>;
|
|
273
274
|
}> | PropTypes.InferProps<{
|
|
@@ -605,6 +606,7 @@ declare const ContentSkillModalPropTypes: {
|
|
|
605
606
|
}>>;
|
|
606
607
|
type: PropTypes.Requireable<string>;
|
|
607
608
|
primaryColor: PropTypes.Requireable<string>;
|
|
609
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
608
610
|
}>>;
|
|
609
611
|
}>>>;
|
|
610
612
|
filters: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAkC,EAChC,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAStD,QAAA,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/types.ts"],"names":[],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,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IACpD,OAAO,EAAE,qBAAqB,CAAC;IAC/B,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC"}
|
|
@@ -277,6 +277,7 @@ declare namespace ListItems {
|
|
|
277
277
|
}>>;
|
|
278
278
|
type: PropTypes.Requireable<string>;
|
|
279
279
|
primaryColor: PropTypes.Requireable<string>;
|
|
280
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
280
281
|
}> | null | undefined>>;
|
|
281
282
|
}>>;
|
|
282
283
|
}> | PropTypes.InferProps<{
|
|
@@ -614,6 +615,7 @@ declare namespace ListItems {
|
|
|
614
615
|
}>>;
|
|
615
616
|
type: PropTypes.Requireable<string>;
|
|
616
617
|
primaryColor: PropTypes.Requireable<string>;
|
|
618
|
+
closeOnClick: PropTypes.Requireable<boolean>;
|
|
617
619
|
}>>;
|
|
618
620
|
};
|
|
619
621
|
}
|
|
@@ -88,6 +88,11 @@ declare class MoocHeader extends React.Component<any, any, any> {
|
|
|
88
88
|
label: PropTypes.Requireable<string>;
|
|
89
89
|
'aria-label': PropTypes.Requireable<string>;
|
|
90
90
|
}>>;
|
|
91
|
+
myList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
92
|
+
href: PropTypes.Requireable<string>;
|
|
93
|
+
label: PropTypes.Requireable<string>;
|
|
94
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
95
|
+
}>>;
|
|
91
96
|
}>>;
|
|
92
97
|
}>>;
|
|
93
98
|
'settings-aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAwBA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/mooc-header/index.js"],"names":[],"mappings":";AAwBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoGE;IAEF;;;;;;;;;;;;;;;;;;;;;;;MAGE;IAEF,wBAuBC;IArBC;;;;;MAKC;IAgDH,6BAIC;IAED,yBAGC;IAxBD,qCAQC;IAED,wBAGC;IAjBD,+BAEC;IA4BD,2BAKC;IAED,0BAKC;IAED,sBAIC;IAED,qBAIC;IAED,yBAQC;IAED,0BAQC;IAED,0BAIC;IAED,2BAIC;IAED,iCAUC;IA7GD,2EASC;IAGC,kBAAsB;IAmGxB,0DASE;IAEF,6BAyeC;CACF"}
|
|
@@ -308,6 +308,7 @@ class MoocHeader extends React.Component {
|
|
|
308
308
|
containerCustom: {
|
|
309
309
|
alignItems: 'flex-start'
|
|
310
310
|
},
|
|
311
|
+
closeOnClick: true,
|
|
311
312
|
menuWrapper: {
|
|
312
313
|
customStyle: {
|
|
313
314
|
top: '30px'
|
|
@@ -396,7 +397,21 @@ class MoocHeader extends React.Component {
|
|
|
396
397
|
}
|
|
397
398
|
})), /*#__PURE__*/React.createElement("div", {
|
|
398
399
|
className: style.label
|
|
399
|
-
}, user.stats.badge.label))
|
|
400
|
+
}, user.stats.badge.label)), /*#__PURE__*/React.createElement(Link, {
|
|
401
|
+
className: style.stat,
|
|
402
|
+
"data-name": "stat-my-list",
|
|
403
|
+
href: user.stats.myList.href,
|
|
404
|
+
onClick: this.handleLinkClick,
|
|
405
|
+
"aria-label": user.stats.myList['aria-label']
|
|
406
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
407
|
+
icon: "list-check",
|
|
408
|
+
className: style.icon,
|
|
409
|
+
style: {
|
|
410
|
+
color: COLORS.purple_500
|
|
411
|
+
}
|
|
412
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
413
|
+
className: style.label
|
|
414
|
+
}, user.stats.myList.label))), /*#__PURE__*/React.createElement("div", {
|
|
400
415
|
className: style.avatarWrapper
|
|
401
416
|
}, notificationPageView, /*#__PURE__*/React.createElement("div", {
|
|
402
417
|
className: style.avatar,
|
|
@@ -657,6 +672,11 @@ MoocHeader.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
657
672
|
href: PropTypes.string,
|
|
658
673
|
label: PropTypes.string,
|
|
659
674
|
'aria-label': PropTypes.string
|
|
675
|
+
}),
|
|
676
|
+
myList: PropTypes.shape({
|
|
677
|
+
href: PropTypes.string,
|
|
678
|
+
label: PropTypes.string,
|
|
679
|
+
'aria-label': PropTypes.string
|
|
660
680
|
})
|
|
661
681
|
})
|
|
662
682
|
}),
|