@coorpacademy/components 11.32.30 → 11.32.31-alpha.16
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 +2 -1
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +1 -0
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/icon/index.d.ts.map +1 -1
- package/es/atom/icon/index.js +7 -3
- package/es/atom/icon/index.js.map +1 -1
- package/es/atom/radio-with-title/index.d.ts +2 -1
- package/es/atom/radio-with-title/index.d.ts.map +1 -1
- package/es/atom/radio-with-title/types.d.ts +2 -1
- package/es/atom/radio-with-title/types.d.ts.map +1 -1
- package/es/atom/tag/index.d.ts +4 -2
- package/es/atom/tag/index.d.ts.map +1 -1
- package/es/atom/tag/index.js +27 -7
- package/es/atom/tag/index.js.map +1 -1
- package/es/atom/tag/style.css +7 -0
- package/es/atom/title/index.d.ts +2 -1
- package/es/molecule/bulk-progress-bar/index.d.ts.map +1 -1
- package/es/molecule/bulk-progress-bar/index.js +2 -1
- package/es/molecule/bulk-progress-bar/index.js.map +1 -1
- package/es/molecule/bulk-progress-bar/style.css +0 -4
- package/es/molecule/cm-popin/types.d.ts +2 -1
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/progress-bar/index.d.ts +1 -0
- package/es/molecule/progress-bar/index.d.ts.map +1 -1
- package/es/molecule/progress-bar/index.js +6 -4
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/molecule/progress-wrapper/index.d.ts +29 -0
- package/es/molecule/progress-wrapper/index.d.ts.map +1 -0
- package/es/molecule/progress-wrapper/index.js +200 -0
- package/es/molecule/progress-wrapper/index.js.map +1 -0
- package/es/molecule/progress-wrapper/style.css +185 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -1
- package/es/molecule/title-radio-wrapper/index.d.ts +2 -1
- package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-radio-wrapper/types.d.ts +2 -1
- package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/es/organism/rewards-form/index.d.ts +2 -1
- package/es/organism/select-opponents/index.d.ts +2 -1
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +2 -1
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/title-and-input/index.d.ts +4 -2
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +4 -2
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +2 -1
- package/es/template/activity/progression-item.css +0 -4
- package/es/template/activity/progression-item.d.ts.map +1 -1
- package/es/template/activity/progression-item.js +2 -1
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/app-player/loading/index.d.ts +2 -1
- package/es/template/app-player/player/index.d.ts +4 -2
- package/es/template/app-player/player/slides/index.d.ts +2 -1
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +2 -1
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +2 -1
- package/es/template/app-review/index.d.ts +2 -1
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +2 -1
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +2 -1
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +2 -1
- package/es/template/certification-detail/index.d.ts +105 -0
- package/es/template/certification-detail/index.d.ts.map +1 -0
- package/es/template/certification-detail/index.js +157 -0
- package/es/template/certification-detail/index.js.map +1 -0
- package/es/template/certification-detail/style.css +130 -0
- package/es/template/common/dashboard/index.d.ts +4 -2
- package/es/template/common/search-page/index.d.ts +2 -1
- package/es/template/external-course/index.d.ts +2 -1
- package/es/template/playlist-detail/index.d.ts.map +1 -1
- package/es/template/playlist-detail/index.js +4 -2
- package/es/template/playlist-detail/index.js.map +1 -1
- package/es/template/playlist-detail/style.css +5 -0
- package/es/template/skill-detail/all-courses.css +6 -6
- package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/es/template/skill-detail/continue-learning.js +3 -2
- package/es/template/skill-detail/continue-learning.js.map +1 -1
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +2 -1
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +1 -0
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/icon/index.d.ts.map +1 -1
- package/lib/atom/icon/index.js +7 -3
- package/lib/atom/icon/index.js.map +1 -1
- package/lib/atom/radio-with-title/index.d.ts +2 -1
- package/lib/atom/radio-with-title/index.d.ts.map +1 -1
- package/lib/atom/radio-with-title/types.d.ts +2 -1
- package/lib/atom/radio-with-title/types.d.ts.map +1 -1
- package/lib/atom/tag/index.d.ts +4 -2
- package/lib/atom/tag/index.d.ts.map +1 -1
- package/lib/atom/tag/index.js +28 -7
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/atom/tag/style.css +7 -0
- package/lib/atom/title/index.d.ts +2 -1
- package/lib/molecule/bulk-progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/bulk-progress-bar/index.js +2 -1
- package/lib/molecule/bulk-progress-bar/index.js.map +1 -1
- package/lib/molecule/bulk-progress-bar/style.css +0 -4
- package/lib/molecule/cm-popin/types.d.ts +2 -1
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/progress-bar/index.d.ts +1 -0
- package/lib/molecule/progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/progress-bar/index.js +6 -4
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/molecule/progress-wrapper/index.d.ts +29 -0
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -0
- package/lib/molecule/progress-wrapper/index.js +221 -0
- package/lib/molecule/progress-wrapper/index.js.map +1 -0
- package/lib/molecule/progress-wrapper/style.css +185 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -1
- package/lib/molecule/title-radio-wrapper/index.d.ts +2 -1
- package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts +2 -1
- package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +2 -1
- package/lib/organism/select-opponents/index.d.ts +2 -1
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +2 -1
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +4 -2
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +4 -2
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +2 -1
- package/lib/template/activity/progression-item.css +0 -4
- package/lib/template/activity/progression-item.d.ts.map +1 -1
- package/lib/template/activity/progression-item.js +2 -1
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/app-player/loading/index.d.ts +2 -1
- package/lib/template/app-player/player/index.d.ts +4 -2
- package/lib/template/app-player/player/slides/index.d.ts +2 -1
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +2 -1
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +2 -1
- package/lib/template/app-review/index.d.ts +2 -1
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +2 -1
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +2 -1
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +2 -1
- package/lib/template/certification-detail/index.d.ts +105 -0
- package/lib/template/certification-detail/index.d.ts.map +1 -0
- package/lib/template/certification-detail/index.js +185 -0
- package/lib/template/certification-detail/index.js.map +1 -0
- package/lib/template/certification-detail/style.css +130 -0
- package/lib/template/common/dashboard/index.d.ts +4 -2
- package/lib/template/common/search-page/index.d.ts +2 -1
- package/lib/template/external-course/index.d.ts +2 -1
- package/lib/template/playlist-detail/index.d.ts.map +1 -1
- package/lib/template/playlist-detail/index.js +4 -2
- package/lib/template/playlist-detail/index.js.map +1 -1
- package/lib/template/playlist-detail/style.css +5 -0
- package/lib/template/skill-detail/all-courses.css +6 -6
- package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
- package/lib/template/skill-detail/continue-learning.js +3 -2
- package/lib/template/skill-detail/continue-learning.js.map +1 -1
- package/locales/en/global.json +8 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAgD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CA8FzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -37,7 +37,8 @@ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverCol
|
|
|
37
37
|
size: {
|
|
38
38
|
faSize: faIcon.size,
|
|
39
39
|
wrapperSize: faIcon.size
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
customStyle: faIcon.customStyle
|
|
41
42
|
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
42
43
|
className: style.icon,
|
|
43
44
|
theme: "coorpmanager"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","ICONS","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","isApplyHover","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","ICONS","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","type","faIcon","position","Icon","isApplyHover","buttonContent","label","iconComponent","iconName","name","iconColor","color","backgroundColor","size","faSize","wrapperSize","customStyle","ButtonLink","props","usage","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","useTitle","styleButton","button","primary","secondary","tertiary","text","dangerous","setHovered","handleOnClick","event","handleOnKeyDown","handleMouseOver","handleMouseLeave","_customStyle","title"],"sources":["../../../src/atom/button-link/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport {noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport FaIcon from '../icon';\nimport {ICONS} from '../../util/button-icons';\nimport propTypes, {ButtonLinkProps, IconType} from './types';\nimport style from './style.css';\n\nconst getButtonContent = (\n icon?: IconType,\n content?: string | React.ReactNode,\n hovered?: boolean,\n hoverBackgroundColor?: string,\n hoverColor?: string\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n const isApplyHover = hovered && hoverBackgroundColor && hoverColor;\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{content}</span>\n </div>\n );\n }\n\n const iconComponent = faIcon ? (\n <FaIcon\n {...{\n iconName: faIcon.name,\n iconColor: isApplyHover ? hoverColor : faIcon.color,\n backgroundColor: isApplyHover ? hoverBackgroundColor : faIcon.backgroundColor,\n size: {\n faSize: faIcon.size,\n wrapperSize: faIcon.size\n },\n customStyle: faIcon.customStyle\n }}\n />\n ) : (\n <Icon className={style.icon} theme=\"coorpmanager\" />\n );\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? iconComponent : null}\n {content ? <span className={style.label}>{content}</span> : null}\n {position === 'right' ? iconComponent : null}\n </div>\n );\n};\n\nconst ButtonLink = (props: ButtonLinkProps) => {\n const {\n type,\n 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 link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const [hovered, setHovered] = useState(false);\n\n const handleOnClick = useCallback(event => onClick(event), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const _customStyle = useMemo(() => {\n return {\n ...customStyle,\n ...((hoverBackgroundColor || hoverColor) && hovered\n ? {\n backgroundColor: hoverBackgroundColor,\n color: hoverColor\n }\n : null)\n };\n }, [hoverBackgroundColor, hoverColor, hovered, customStyle]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {getButtonContent(icon, content ?? label)}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n // 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 </button>\n );\n};\n\nButtonLink.propTypes = propTypes;\n\nexport default ButtonLink;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,EAAsCC,OAAtC,QAAoD,OAApD;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,MAAP,MAAmB,SAAnB;AACA,SAAQC,KAAR,QAAoB,yBAApB;AACA,OAAOC,SAAP,MAAmD,SAAnD;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CACvBC,IADuB,EAEvBC,OAFuB,EAGvBC,OAHuB,EAIvBC,oBAJuB,EAKvBC,UALuB,KAMpB;EACH,MAAM;IAACC,IAAD;IAAOC,MAAP;IAAeC;EAAf,IAA2BP,IAAI,IAAI;IAACK,IAAI,EAAE,EAAP;IAAWE,QAAQ,EAAE;EAArB,CAAzC;EACA,MAAMC,IAAI,GAAGH,IAAI,IAAIT,KAAK,CAACS,IAAD,CAA1B;EACA,MAAMI,YAAY,GAAGP,OAAO,IAAIC,oBAAX,IAAmCC,UAAxD;;EAEA,IAAI,CAACI,IAAD,IAAS,CAACF,MAAd,EAAsB;IACpB,oBACE;MAAK,SAAS,EAAER,KAAK,CAACY;IAAtB,gBACE;MAAM,SAAS,EAAEZ,KAAK,CAACa;IAAvB,GAA+BV,OAA/B,CADF,CADF;EAKD;;EAED,MAAMW,aAAa,GAAGN,MAAM,gBAC1B,oBAAC,MAAD;IAEIO,QAAQ,EAAE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EAAEU,WALT;MAME,SAAS,EAAEa,WANb;MAOE,aAAWR,QAPb;MAQE,eAAaC,UARf;MASE,cAAYC,SAAS,IAAIjB;IAT3B,IAWGZ,gBAAgB,CAACC,IAAD,EAAOC,OAAO,IAAIU,KAAlB,CAXnB,CADF;EAeD;;EAED,oBACE,2CACOsB,QAAQ,IAAI;IACfe,KAAK,EAAEpB,SAAS,IAAIjB;EADL,CADnB;IAIE;IACA,IAAI,EAAEa,KALR;IAME,cAAYI,SAAS,IAAIjB,KAN3B;IAOE,aAAWe,QAPb;IAQE,eAAaC,UARf;IASE,KAAK,EAAEoB,YATT;IAUE,SAAS,EAAEb,WAVb;IAWE,OAAO,EAAEQ,aAXX;IAYE,SAAS,EAAEE,eAZb;IAaE,WAAW,EAAEC,eAbf;IAcE,YAAY,EAAEC,gBAdhB;IAeE,QAAQ,EAAE,CAfZ;IAgBE,QAAQ,EAAErB;EAhBZ,IAkBG1B,gBAAgB,CAACC,IAAD,EAAOC,OAAO,IAAIU,KAAlB,EAAyBT,OAAzB,EAAkCC,oBAAlC,EAAwDC,UAAxD,CAlBnB,CADF;AAsBD,CA9FD;;AAgGAkB,UAAU,CAACzB,SAAX,2CAAuBA,SAAvB;AAEA,eAAeyB,UAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAC,KAAK,EAAC,MAAM,yBAAyB,CAAC;AAE9C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;CAuBd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRo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G,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC;IACF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,oBAAY,OAAO,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC;AAE/C,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","usage","label","string","content","node","icon","shape","position","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACI,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,EAAqB,OAArB,CAAhB,CAFS;EAGhBE,KAAK,EAAEN,SAAS,CAACO,MAHD;EAIhBC,OAAO,EAAER,SAAS,CAACS,IAJH;EAKhB,cAAcT,SAAS,CAACO,MALR;EAMhB,aAAaP,SAAS,CAACO,MANP;EAOhB,eAAeP,SAAS,CAACO,MAPT;EAQhBG,IAAI,EAAEV,SAAS,CAACW,KAAV,CAAgB;IACpBC,QAAQ,EAAEZ,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CARU;EAYhBY,OAAO,EAAEb,SAAS,CAACc,IAZH;EAahBC,IAAI,EAAEf,SAAS,CAACW,KAAV,CAAgB;IACpBK,IAAI,EAAEhB,SAAS,CAACO,MADI;IAEpBU,QAAQ,EAAEjB,SAAS,CAACkB,IAFA;IAGpBC,MAAM,EAAEnB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAbU;EAkBhBgB,oBAAoB,EAAEpB,SAAS,CAACO,MAlBhB;EAmBhBc,UAAU,EAAErB,SAAS,CAACO,MAnBN;EAoBhBe,QAAQ,EAAEtB,SAAS,CAACkB,IApBJ;EAqBhBK,SAAS,EAAEvB,SAAS,CAACO,MArBL;EAsBhBiB,WAAW,EAAExB,SAAS,CAACW,KAAV,CAAgB,EAAhB;AAtBG,CAAlB;
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","usage","label","string","content","node","icon","shape","position","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","customStyle"],"sources":["../../../src/atom/button-link/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport {ICONS} from '../../util/button-icons';\n\nconst propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n usage: PropTypes.oneOf(['button', 'submit', 'reset']),\n label: PropTypes.string,\n content: PropTypes.node,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n hoverBackgroundColor: PropTypes.string,\n hoverColor: PropTypes.string,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport type FaIcontype = {\n name: string;\n color?: string;\n backgroundColor?: string;\n size?: number;\n customStyle?: Record<string, unknown>;\n};\n\nexport type IconType = {\n position: 'right' | 'left';\n type?: keyof typeof ICONS;\n faIcon?: FaIcontype;\n};\nexport type ButtonLinkProps = {\n type?: 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous';\n usage?: 'button' | 'submit' | 'reset';\n label?: string;\n content?: React.ReactNode;\n 'aria-label'?: string;\n 'data-name'?: string;\n 'data-testid'?: string;\n icon?: IconType;\n onClick?: () => void;\n onKeyDown?: () => void;\n link?: {\n href?: string;\n download?: boolean;\n target?: '_self' | '_blank' | '_parent' | '_top';\n };\n hoverBackgroundColor?: string;\n hoverColor?: string;\n disabled?: boolean;\n className?: string;\n customStyle?: Record<string, unknown>;\n useTitle?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,SAAQC,KAAR,QAAoB,yBAApB;AAEA,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,CAAC,SAAD,EAAY,WAAZ,EAAyB,UAAzB,EAAqC,MAArC,EAA6C,WAA7C,CAAhB,CADU;EAEhBC,KAAK,EAAEL,SAAS,CAACI,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,EAAqB,OAArB,CAAhB,CAFS;EAGhBE,KAAK,EAAEN,SAAS,CAACO,MAHD;EAIhBC,OAAO,EAAER,SAAS,CAACS,IAJH;EAKhB,cAAcT,SAAS,CAACO,MALR;EAMhB,aAAaP,SAAS,CAACO,MANP;EAOhB,eAAeP,SAAS,CAACO,MAPT;EAQhBG,IAAI,EAAEV,SAAS,CAACW,KAAV,CAAgB;IACpBC,QAAQ,EAAEZ,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpBD,IAAI,EAAEH,SAAS,CAACI,KAAV,CAAgB,MAAKH,KAAL,CAAhB;EAFc,CAAhB,CARU;EAYhBY,OAAO,EAAEb,SAAS,CAACc,IAZH;EAahBC,IAAI,EAAEf,SAAS,CAACW,KAAV,CAAgB;IACpBK,IAAI,EAAEhB,SAAS,CAACO,MADI;IAEpBU,QAAQ,EAAEjB,SAAS,CAACkB,IAFA;IAGpBC,MAAM,EAAEnB,SAAS,CAACI,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAbU;EAkBhBgB,oBAAoB,EAAEpB,SAAS,CAACO,MAlBhB;EAmBhBc,UAAU,EAAErB,SAAS,CAACO,MAnBN;EAoBhBe,QAAQ,EAAEtB,SAAS,CAACkB,IApBJ;EAqBhBK,SAAS,EAAEvB,SAAS,CAACO,MArBL;EAsBhBiB,WAAW,EAAExB,SAAS,CAACW,KAAV,CAAgB,EAAhB;AAtBG,CAAlB;AAgEA,eAAeT,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/icon/index.js"],"names":[],"mappings":"AAiBA,mDAAoD;AAiB7C,8DAC8D;;AAGrE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/icon/index.js"],"names":[],"mappings":"AAiBA,mDAAoD;AAiB7C,8DAC8D;;AAGrE,uDAmCG"}
|
package/es/atom/icon/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes, { number } from 'prop-types';
|
|
3
5
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
@@ -36,7 +38,8 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
|
|
|
36
38
|
backgroundColor,
|
|
37
39
|
borderRadius,
|
|
38
40
|
preset = DEFAULT_PRESET,
|
|
39
|
-
size
|
|
41
|
+
size,
|
|
42
|
+
customStyle
|
|
40
43
|
}) {
|
|
41
44
|
const effectiveIconColor = iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);
|
|
42
45
|
const effectiveSize = size ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size) : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);
|
|
@@ -50,7 +53,7 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
|
|
|
50
53
|
};
|
|
51
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
52
55
|
className: style.iconWrapper,
|
|
53
|
-
style: iconWrapperStyle
|
|
56
|
+
style: _extends({}, iconWrapperStyle, customStyle)
|
|
54
57
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
55
58
|
icon: `fa-${iconName}`,
|
|
56
59
|
color: effectiveIconColor,
|
|
@@ -66,7 +69,8 @@ Icon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
66
69
|
size: PropTypes.shape({
|
|
67
70
|
faSize: number,
|
|
68
71
|
wrapperSize: PropTypes.number
|
|
69
|
-
})
|
|
72
|
+
}),
|
|
73
|
+
customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
70
74
|
} : {};
|
|
71
75
|
export default Icon;
|
|
72
76
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","getForegroundColor","backgroundColor","Icon","memo","iconName","iconColor","borderRadius","preset","size","effectiveIconColor","effectiveSize","iconWrapperStyle","width","height","padding","iconWrapper","propTypes","string","isRequired","oneOf","shape"],"sources":["../../../src/atom/icon/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes, {number} from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst DEFAULT_PRESET = 'm';\nconst ICON_LUMINOSITY = 32;\nconst DEFAULT_WRAPPER_SIZE = 40;\nconst ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nconst SIZE_CONFIGS = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nexport const getForegroundColor = backgroundColor =>\n convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n// set lightness to 32%\n\nconst Icon = React.memo(function Icon({\n iconName,\n iconColor,\n backgroundColor,\n borderRadius,\n preset = DEFAULT_PRESET,\n size\n}) {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n\n const iconWrapperStyle = {\n backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={iconWrapperStyle}>\n <FontAwesomeIcon\n icon={`fa-${iconName}`}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n});\n\nIcon.propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: number,\n wrapperSize: PropTypes.number\n })\n};\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,IAAmBC,MAAnB,QAAgC,YAAhC;AACA,SAAQC,eAAR,QAA8B,gCAA9B;AACA,SAAQC,GAAR,QAAkB,kCAAlB;AACA,SAAQC,OAAR,QAAsB,mCAAtB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEAL,OAAO,CAACM,GAAR,CAAYP,GAAZ;AAEA,MAAMQ,cAAc,GAAG,GAAvB;AACA,MAAMC,eAAe,GAAG,EAAxB;AACA,MAAMC,oBAAoB,GAAG,EAA7B;AACA,MAAMC,YAAY,GAAG,CAArB;AACA,OAAO,MAAMC,kBAAkB,GAAG,iBAA3B;AAEP,MAAMC,YAAY,GAAG;EACnBC,CAAC,EAAE;IACDC,MAAM,EAAE,EADP;IAEDC,WAAW,EAAE;EAFZ,CADgB;EAKnBC,CAAC,EAAE;IACDF,MAAM,EAAE,EADP;IAEDC,WAAW,EAAEN;EAFZ,CALgB;EASnBQ,EAAE,EAAE;IACFH,MAAM,EAAE,EADN;IAEFC,WAAW,EAAE;EAFX;AATe,CAArB;AAeA,OAAO,MAAMG,kBAAkB,GAAGC,eAAe,IAC/Cf,OAAO,CAAE,SAAQe,eAAgB,cAAaX,eAAgB,KAAvD,CADF,C,CAEP;;AAEA,MAAMY,IAAI,gBAAGzB,KAAK,CAAC0B,IAAN,CAAW,SAASD,IAAT,CAAc;EACpCE,QADoC;EAEpCC,SAFoC;EAGpCJ,eAHoC;EAIpCK,YAJoC;EAKpCC,MAAM,GAAGlB,cAL2B;EAMpCmB;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","ICON_PADDING","DEFAULT_ICON_COLOR","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","getForegroundColor","backgroundColor","Icon","memo","iconName","iconColor","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","iconWrapperStyle","width","height","padding","iconWrapper","propTypes","string","isRequired","oneOf","shape","objectOf","oneOfType"],"sources":["../../../src/atom/icon/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes, {number} from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport toLower from 'lodash/fp/toLower';\nimport merge from 'lodash/fp/merge';\nimport getOr from 'lodash/fp/getOr';\nimport {convert} from 'css-color-function';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst DEFAULT_PRESET = 'm';\nconst ICON_LUMINOSITY = 32;\nconst DEFAULT_WRAPPER_SIZE = 40;\nconst ICON_PADDING = 8;\nexport const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';\n\nconst SIZE_CONFIGS = {\n s: {\n faSize: 12,\n wrapperSize: 32\n },\n m: {\n faSize: 16,\n wrapperSize: DEFAULT_WRAPPER_SIZE\n },\n xl: {\n faSize: 20,\n wrapperSize: 48\n }\n};\n\nexport const getForegroundColor = backgroundColor =>\n convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n// set lightness to 32%\n\nconst Icon = React.memo(function Icon({\n iconName,\n iconColor,\n backgroundColor,\n borderRadius,\n preset = DEFAULT_PRESET,\n size,\n customStyle\n}) {\n const effectiveIconColor =\n iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);\n\n const effectiveSize = size\n ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size)\n : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);\n\n const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;\n\n const iconWrapperStyle = {\n backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize,\n padding: ICON_PADDING\n };\n\n return (\n <div className={style.iconWrapper} style={{...iconWrapperStyle, ...customStyle}}>\n <FontAwesomeIcon\n icon={`fa-${iconName}`}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n});\n\nIcon.propTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: number,\n wrapperSize: PropTypes.number\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nexport default Icon;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,IAAmBC,MAAnB,QAAgC,YAAhC;AACA,SAAQC,eAAR,QAA8B,gCAA9B;AACA,SAAQC,GAAR,QAAkB,kCAAlB;AACA,SAAQC,OAAR,QAAsB,mCAAtB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEAL,OAAO,CAACM,GAAR,CAAYP,GAAZ;AAEA,MAAMQ,cAAc,GAAG,GAAvB;AACA,MAAMC,eAAe,GAAG,EAAxB;AACA,MAA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EAAEL,KAAK,CAAC6B,WAAtB;IAAmC,KAAK,eAAMJ,gBAAN,EAA2BH,WAA3B;EAAxC,gBACE,oBAAC,eAAD;IACE,IAAI,EAAG,MAAKL,QAAS,EADvB;IAEE,KAAK,EAAEM,kBAFT;IAGE,QAAQ,EAAEC,aAAa,CAACf;EAH1B,EADF,CADF;AASD,CAnCY,CAAb;AAqCAM,IAAI,CAACe,SAAL,2CAAiB;EACfb,QAAQ,EAAE1B,SAAS,CAACwC,MAAV,CAAiBC,UADZ;EAEfd,SAAS,EAAE3B,SAAS,CAACwC,MAFN;EAGfjB,eAAe,EAAEvB,SAAS,CAACwC,MAHZ;EAIfZ,YAAY,EAAE5B,SAAS,CAACwC,MAJT;EAKfX,MAAM,EAAE7B,SAAS,CAAC0C,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,EAAW,IAAX,CAAhB,CALO;EAMfZ,IAAI,EAAE9B,SAAS,CAAC2C,KAAV,CAAgB;IACpBzB,MAAM,EAAEjB,MADY;IAEpBkB,WAAW,EAAEnB,SAAS,CAACC;EAFH,CAAhB,CANS;EAUf8B,WAAW,EAAE/B,SAAS,CAAC4C,QAAV,CAAmB5C,SAAS,CAAC6C,SAAV,CAAoB,CAAC7C,SAAS,CAACwC,MAAX,EAAmBxC,SAAS,CAACC,MAA7B,CAApB,CAAnB;AAVE,CAAjB;AAaA,eAAeuB,IAAf"}
|
|
@@ -16,8 +16,9 @@ declare const RadioWithTitle: {
|
|
|
16
16
|
type: import("prop-types").Requireable<string>;
|
|
17
17
|
size: import("prop-types").Requireable<string>;
|
|
18
18
|
customStyle: import("prop-types").Requireable<{
|
|
19
|
-
[x: string]: string | null | undefined;
|
|
19
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
20
20
|
}>;
|
|
21
|
+
icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
|
|
21
22
|
}>>;
|
|
22
23
|
}>>>;
|
|
23
24
|
name: import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -13,8 +13,9 @@ export declare const propTypes: {
|
|
|
13
13
|
type: PropTypes.Requireable<string>;
|
|
14
14
|
size: PropTypes.Requireable<string>;
|
|
15
15
|
customStyle: PropTypes.Requireable<{
|
|
16
|
-
[x: string]: string | null | undefined;
|
|
16
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
17
17
|
}>;
|
|
18
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
18
19
|
}>>;
|
|
19
20
|
}>>>;
|
|
20
21
|
name: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;CAOrB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
package/es/atom/tag/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export default Tag;
|
|
2
|
-
declare function Tag({ label, type, size, customStyle }: {
|
|
2
|
+
declare function Tag({ label, type, size, customStyle, icon }: {
|
|
3
3
|
label: any;
|
|
4
4
|
type?: string | undefined;
|
|
5
5
|
size?: string | undefined;
|
|
6
6
|
customStyle?: {} | undefined;
|
|
7
|
+
icon?: {} | undefined;
|
|
7
8
|
}): JSX.Element;
|
|
8
9
|
declare namespace Tag {
|
|
9
10
|
namespace propTypes {
|
|
@@ -11,8 +12,9 @@ declare namespace Tag {
|
|
|
11
12
|
const type: PropTypes.Requireable<string>;
|
|
12
13
|
const size: PropTypes.Requireable<string>;
|
|
13
14
|
const customStyle: PropTypes.Requireable<{
|
|
14
|
-
[x: string]: string | null | undefined;
|
|
15
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
15
16
|
}>;
|
|
17
|
+
const icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tag/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tag/index.js"],"names":[],"mappings":";AAqBA;;;;;;gBAgBC"}
|
package/es/atom/tag/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import _keys from "lodash/fp/keys";
|
|
2
|
+
const _excluded = ["position"];
|
|
3
|
+
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
|
|
6
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
|
+
|
|
2
8
|
import React from 'react';
|
|
3
9
|
import PropTypes from 'prop-types';
|
|
4
10
|
import classnames from 'classnames';
|
|
11
|
+
import Icon from '../icon';
|
|
5
12
|
import style from './style.css';
|
|
6
13
|
const TAG_STYLES = {
|
|
7
14
|
default: style.default,
|
|
@@ -20,18 +27,31 @@ const Tag = ({
|
|
|
20
27
|
label,
|
|
21
28
|
type = 'default',
|
|
22
29
|
size = 'M',
|
|
23
|
-
customStyle = {}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
30
|
+
customStyle = {},
|
|
31
|
+
icon = {}
|
|
32
|
+
}) => {
|
|
33
|
+
const {
|
|
34
|
+
position
|
|
35
|
+
} = icon,
|
|
36
|
+
iconProps = _objectWithoutPropertiesLoose(icon, _excluded);
|
|
37
|
+
|
|
38
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
className: classnames(TAG_STYLES[type], TAG_SIZE[size]),
|
|
40
|
+
"data-name": `content-tag-${label}`,
|
|
41
|
+
style: customStyle
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: style.content
|
|
44
|
+
}, position === 'left' ? /*#__PURE__*/React.createElement(Icon, iconProps) : null, /*#__PURE__*/React.createElement("div", null, label), position === 'right' ? /*#__PURE__*/React.createElement(Icon, iconProps) : null));
|
|
45
|
+
};
|
|
29
46
|
|
|
30
47
|
Tag.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
31
48
|
label: PropTypes.string,
|
|
32
49
|
type: PropTypes.oneOf(_keys(TAG_STYLES)),
|
|
33
50
|
size: PropTypes.oneOf(['S', 'M', 'L']),
|
|
34
|
-
customStyle: PropTypes.objectOf(PropTypes.string)
|
|
51
|
+
customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
52
|
+
icon: PropTypes.shape(_extends({}, Icon.propTypes, {
|
|
53
|
+
position: PropTypes.oneOf(['left', 'right'])
|
|
54
|
+
}))
|
|
35
55
|
} : {};
|
|
36
56
|
export default Tag;
|
|
37
57
|
//# sourceMappingURL=index.js.map
|
package/es/atom/tag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","TAG_STYLES","default","success","failure","warning","progress","TAG_SIZE","S","small","M","medium","L","large","Tag","label","type","size","customStyle","propTypes","string","oneOf","objectOf"],"sources":["../../../src/atom/tag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n success: style.success,\n failure: style.failure,\n warning: style.warning,\n progress: style.progress\n};\n\nconst TAG_SIZE = {\n S: style.small,\n M: style.medium,\n L: style.large\n};\n\nconst Tag = ({label, type = 'default', size = 'M', customStyle = {}}) => (\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","Icon","style","TAG_STYLES","default","success","failure","warning","progress","TAG_SIZE","S","small","M","medium","L","large","Tag","label","type","size","customStyle","icon","position","iconProps","content","propTypes","string","oneOf","objectOf","oneOfType","number","shape"],"sources":["../../../src/atom/tag/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport Icon from '../icon';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n success: style.success,\n failure: style.failure,\n warning: style.warning,\n progress: style.progress\n};\n\nconst TAG_SIZE = {\n S: style.small,\n M: style.medium,\n L: style.large\n};\n\nconst Tag = ({label, type = 'default', size = 'M', customStyle = {}, icon = {}}) => {\n const {position, ...iconProps} = icon;\n\n return (\n <span\n className={classnames(TAG_STYLES[type], TAG_SIZE[size])}\n data-name={`content-tag-${label}`}\n style={customStyle}\n >\n <div className={style.content}>\n {position === 'left' ? <Icon {...iconProps} /> : null}\n <div>{label}</div>\n {position === 'right' ? <Icon {...iconProps} /> : null}\n </div>\n </span>\n );\n};\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES)),\n size: PropTypes.oneOf(['S', 'M', 'L']),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n icon: PropTypes.shape({...Icon.propTypes, position: PropTypes.oneOf(['left', 'right'])})\n};\n\nexport default Tag;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;EACjBC,OAAO,EAAEF,KAAK,CAACE,OADE;EAEjBC,OAAO,EAAEH,KAAK,CAACG,OAFE;EAGjBC,OAAO,EAAEJ,KAAK,CAACI,OAHE;EAIjBC,OAAO,EAAEL,KAAK,CAACK,OAJE;EAKjBC,QAAQ,EAAEN,KAAK,CAACM;AALC,CAAnB;AAQA,MAAMC,QAAQ,GAAG;EACfC,CAAC,EAAER,KAAK,CAACS,KADM;EAEfC,CAAC,E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AAQ,EAAEvB,SAAS,CAAC4B,KAAV,CAAgB,CAAC,MAAD,EAAS,OAAT,CAAhB;EAA9C;AALQ,CAAhB;AAQA,eAAeX,GAAf"}
|
package/es/atom/tag/style.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
font-weight: 600;
|
|
15
15
|
text-align: center;
|
|
16
16
|
line-height: normal;
|
|
17
|
+
display: inline-block;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
.small {
|
|
@@ -63,3 +64,9 @@
|
|
|
63
64
|
background-color: color(cm_orange_700 a(15%));
|
|
64
65
|
color: cm_orange_700;
|
|
65
66
|
}
|
|
67
|
+
|
|
68
|
+
.content {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 4px;
|
|
72
|
+
}
|
package/es/atom/title/index.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ declare namespace Title {
|
|
|
14
14
|
type: PropTypes.Requireable<string>;
|
|
15
15
|
size: PropTypes.Requireable<string>;
|
|
16
16
|
customStyle: PropTypes.Requireable<{
|
|
17
|
-
[x: string]: string | null | undefined;
|
|
17
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
18
18
|
}>;
|
|
19
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
19
20
|
}>>;
|
|
20
21
|
};
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;AA8BjD,QAAA,MAAM,eAAe;YAAW,KAAK;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,KAAK,EAAoB,MAAM,SAAS,CAAC;AA8BjD,QAAA,MAAM,eAAe;YAAW,KAAK;;;;;;CAgBpC,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","ProgressBar","StatusItem","COLORS","style","propTypes","negative","cm_negative_100","cm_primary_blue","positive","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst {negative: cm_negative_100, cm_primary_blue, positive: cm_positive_100} = COLORS;\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'} />\n </div>\n );\n};\n\nconst resolveProgressBarColor = (status: Status) => {\n switch (status) {\n case STATUS.fail:\n return cm_negative_100;\n case STATUS.inProgress:\n return cm_primary_blue;\n default:\n return cm_positive_100;\n }\n};\n\nconst BulkProgressBar = (props: Props) => {\n const {'data-name': dataName, status, progress} = props;\n\n return (\n <div className={style.container} data-name={dataName}>\n <ProgressBar\n className={style.progressBar}\n value={progress}\n max={100}\n steps={0}\n style={{backgroundColor: resolveProgressBarColor(status), borderRadius: '10px'}}\n />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,S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B,CAACJ,MAAD,CAAzC;MAAmDW,YAAY,EAAE;IAAjE;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","ProgressBar","StatusItem","COLORS","style","propTypes","negative","cm_negative_100","cm_primary_blue","positive","cm_positive_100","STATUS","inProgress","fail","renderStatusIcon","status","progress","progressText","statusItemWrapper","resolveProgressBarColor","BulkProgressBar","props","dataName","container","progressBar","backgroundColor","borderRadius"],"sources":["../../../src/molecule/bulk-progress-bar/index.tsx"],"sourcesContent":["import React from 'react';\nimport ProgressBar from '../progress-bar';\nimport StatusItem from '../../atom/status-item';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport {Props, propTypes, Status} from './types';\n\nconst {negative: cm_negative_100, cm_primary_blue, positive: cm_positive_100} = COLORS;\n\nconst STATUS = {\n inProgress: 'inProgress',\n fail: 'fail'\n};\n\nconst renderStatusIcon = (status: Status, progress: number) => {\n if (status === STATUS.inProgress)\n return <div role=\"status\" className={style.progressText}>{`${progress} %`}</div>;\n return (\n <div className={style.statusItemWrapper}>\n <StatusItem icon={status === STATUS.fail ? 'invalid' : 'valid'} />\n </div>\n );\n};\n\nconst resolveProgressBarColor = (status: Status) => {\n switch (status) {\n case STATUS.fail:\n return cm_negative_100;\n case STATUS.inProgress:\n return cm_primary_blue;\n default:\n return cm_positive_100;\n }\n};\n\nconst BulkProgressBar = (props: Props) => {\n const {'data-name': dataName, status, progress} = props;\n\n return (\n <div className={style.container} data-name={dataName}>\n <ProgressBar\n className={style.progressBar}\n value={progress}\n max={100}\n steps={0}\n style={{backgroundColor: resolveProgressBarColor(status), borderRadius: '10px'}}\n displayInfo={false}\n />\n {renderStatusIcon(status, progress)}\n </div>\n );\n};\n\nBulkProgressBar.propTypes = propTypes;\n\nexport default BulkProgressBar;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,SAAQC,MAAR,QAAqB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AzC;MAAmDW,YAAY,EAAE;IAAjE,CALT;IAME,WAAW,EAAE;EANf,EADF,EASGZ,gBAAgB,CAACC,MAAD,EAASC,QAAT,CATnB,CADF;AAaD,CAhBD;;AAkBAI,eAAe,CAACf,SAAhB,2CAA4BA,SAA5B;AAEA,eAAee,eAAf"}
|
|
@@ -20,8 +20,9 @@ declare const propTypes: {
|
|
|
20
20
|
type: PropTypes.Requireable<string>;
|
|
21
21
|
size: PropTypes.Requireable<string>;
|
|
22
22
|
customStyle: PropTypes.Requireable<{
|
|
23
|
-
[x: string]: string | null | undefined;
|
|
23
|
+
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
24
24
|
}>;
|
|
25
|
+
icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
|
|
25
26
|
}>>;
|
|
26
27
|
}>>;
|
|
27
28
|
headerIcon: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AS,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"}
|
|
@@ -10,6 +10,7 @@ declare namespace ProgressBar {
|
|
|
10
10
|
const style: PropTypes.Requireable<{
|
|
11
11
|
[x: string]: NonNullable<string | number | null | undefined> | null | undefined;
|
|
12
12
|
}>;
|
|
13
|
+
const displayInfo: PropTypes.Requireable<boolean>;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAMA,sDAiCC"}
|
|
@@ -14,7 +14,8 @@ const ProgressBar = props => {
|
|
|
14
14
|
max,
|
|
15
15
|
desc = '',
|
|
16
16
|
steps = 0,
|
|
17
|
-
style: propsStyle
|
|
17
|
+
style: propsStyle,
|
|
18
|
+
displayInfo = true
|
|
18
19
|
} = props;
|
|
19
20
|
const ratio = value / max;
|
|
20
21
|
const percentage = Math.floor(ratio * 100);
|
|
@@ -32,13 +33,13 @@ const ProgressBar = props => {
|
|
|
32
33
|
style: _extends({}, propsStyle, {
|
|
33
34
|
width: `${ratio * 100}%`
|
|
34
35
|
})
|
|
35
|
-
}), /*#__PURE__*/React.createElement("p", {
|
|
36
|
+
}), displayInfo ? /*#__PURE__*/React.createElement("p", {
|
|
36
37
|
className: style.texts
|
|
37
38
|
}, /*#__PURE__*/React.createElement("span", {
|
|
38
39
|
className: style.description
|
|
39
40
|
}, `${value}/${max} ${desc}`), /*#__PURE__*/React.createElement("span", {
|
|
40
41
|
className: style.percentage
|
|
41
|
-
}, text)), /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
}, text)) : null, /*#__PURE__*/React.createElement("div", {
|
|
42
43
|
className: style.steps
|
|
43
44
|
}, stepList));
|
|
44
45
|
};
|
|
@@ -49,7 +50,8 @@ ProgressBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
49
50
|
max: PropTypes.number.isRequired,
|
|
50
51
|
desc: PropTypes.string,
|
|
51
52
|
steps: PropTypes.number,
|
|
52
|
-
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
53
|
+
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
54
|
+
displayInfo: PropTypes.bool
|
|
53
55
|
} : {};
|
|
54
56
|
export default ProgressBar;
|
|
55
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","ProgressBar","props","className","value","max","desc","steps","propsStyle","ratio","percentage","Math","floor","text","stepList","index","step","background","progress","width","texts","description","propTypes","string","number","isRequired","objectOf","oneOfType"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {className
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","ProgressBar","props","className","value","max","desc","steps","propsStyle","displayInfo","ratio","percentage","Math","floor","text","stepList","index","step","background","progress","width","texts","description","propTypes","string","number","isRequired","objectOf","oneOfType","bool"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {\n className,\n value,\n max,\n desc = '',\n steps = 0,\n style: propsStyle,\n displayInfo = true\n } = props;\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div className={classnames(style.background, className)}>\n <div\n className={style.progress}\n style={{\n ...propsStyle,\n width: `${ratio * 100}%`\n }}\n />\n {displayInfo ? (\n <p className={style.texts}>\n <span className={style.description}>{`${value}/${max} ${desc}`}</span>\n <span className={style.percentage}>{text}</span>\n </p>\n ) : null}\n <div className={style.steps}>{stepList}</div>\n </div>\n );\n};\n\nProgressBar.propTypes = {\n className: PropTypes.string,\n value: PropTypes.number.isRequired,\n max: PropTypes.number.isRequired,\n desc: PropTypes.string,\n steps: PropTypes.number,\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n displayInfo: PropTypes.bool\n};\n\nexport default ProgressBar;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,SADI;IAEJC,KAFI;IAGJC,GAHI;IAIJC,IAAI,GAAG,EAJH;IAKJC,KAAK,GAAG,CALJ;IAMJP,KAAK,EAAEQ,UANH;IAOJC,WAAW,GAAG;EAPV,IAQFP,KARJ;EAUA,MAAMQ,KAAK,GAAGN,KAAK,GAAGC,GAAtB;EACA,MAAMM,UAAU,GAAGC,IAAI,CAACC,KAAL,CAAWH,KAAK,GAAG,GAAnB,CAAnB;EACA,MAAMI,IAAI,GAAI,GAAEH,UAAW,GAA3B;;EACA,MAAMI,QAAQ,GAAG,OAAMC,KAAK,iBAAI;IAAK,SAAS,EAAEhB,KAAK,CAACiB,IAAtB;IAA4B,GAAG,EAAED;EAAjC,EAAf,EAA2DT,KAA3D,CAAjB;;EACA,oBACE;IAAK,SAAS,EAAER,UAAU,CAACC,KAAK,CAACkB,UAAP,EAAmBf,SAAnB;EAA1B,gBACE;IACE,SAAS,EAAEH,KAAK,CAACmB,QADnB;IAEE,KAAK,eACAX,UADA;MAEHY,KAAK,EAAG,GAAEV,KAAK,GAAG,GAAI;IAFnB;EAFP,EADF,EAQGD,WAAW,gBACV;IAAG,SAAS,EAAET,KAAK,CAACqB;EAApB,gBACE;IAAM,SAAS,EAAErB,KAAK,CAACsB;EAAvB,GAAsC,GAAElB,KAAM,IAAGC,GAAI,IAAGC,IAAK,EAA7D,CADF,eAEE;IAAM,SAAS,EAAEN,KAAK,CAACW;EAAvB,GAAoCG,IAApC,CAFF,CADU,GAKR,IAbN,eAcE;IAAK,SAAS,EAAEd,KAAK,CAACO;EAAtB,GAA8BQ,QAA9B,CAdF,CADF;AAkBD,CAjCD;;AAmCAd,WAAW,CAACsB,SAAZ,2CAAwB;EACtBpB,SAAS,EAAEL,SAAS,CAAC0B,MADC;EAEtBpB,KAAK,EAAEN,SAAS,CAAC2B,MAAV,CAAiBC,UAFF;EAGtBrB,GAAG,EAAEP,SAAS,CAAC2B,MAAV,CAAiBC,UAHA;EAItBpB,IAAI,EAAER,SAAS,CAAC0B,MAJM;EAKtBjB,KAAK,EAAET,SAAS,CAAC2B,MALK;EAMtBzB,KAAK,EAAEF,SAAS,CAAC6B,QAAV,CAAmB7B,SAAS,CAAC8B,SAAV,CAAoB,CAAC9B,SAAS,CAAC0B,MAAX,EAAmB1B,SAAS,CAAC2B,MAA7B,CAApB,CAAnB,CANe;EAOtBhB,WAAW,EAAEX,SAAS,CAAC+B;AAPD,CAAxB;AAUA,eAAe5B,WAAf"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default ProgressWrapper;
|
|
2
|
+
declare function ProgressWrapper({ completedCourses, completedModules, title, subtitle, progression, sections }: {
|
|
3
|
+
completedCourses: any;
|
|
4
|
+
completedModules: any;
|
|
5
|
+
title: any;
|
|
6
|
+
subtitle: any;
|
|
7
|
+
progression: any;
|
|
8
|
+
sections: any;
|
|
9
|
+
}, context: any): JSX.Element;
|
|
10
|
+
declare namespace ProgressWrapper {
|
|
11
|
+
namespace contextTypes {
|
|
12
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
+
}
|
|
14
|
+
namespace propTypes {
|
|
15
|
+
const title: PropTypes.Requireable<string>;
|
|
16
|
+
const subtitle: PropTypes.Requireable<string>;
|
|
17
|
+
const completedCourses: PropTypes.Requireable<number>;
|
|
18
|
+
const completedModules: PropTypes.Requireable<number>;
|
|
19
|
+
const progression: PropTypes.Requireable<number>;
|
|
20
|
+
const sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
21
|
+
type: PropTypes.Requireable<string>;
|
|
22
|
+
badgeUrl: PropTypes.Requireable<string>;
|
|
23
|
+
onDownload: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
stars: PropTypes.Requireable<number>;
|
|
25
|
+
}> | null | undefined)[]>;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
import PropTypes from "prop-types";
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AAyFA;;;;;;;8BA8DC"}
|