@coorpacademy/components 11.34.2 → 11.34.3-alpha.29

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.
Files changed (215) hide show
  1. package/es/atom/button-link/index.js.map +1 -1
  2. package/es/atom/button-link/style.css +2 -2
  3. package/es/atom/cta/test/fixtures/primary.d.ts +9 -0
  4. package/es/atom/cta/test/fixtures/primary.d.ts.map +1 -0
  5. package/es/atom/cta/test/fixtures/secondary.d.ts +10 -0
  6. package/es/atom/cta/test/fixtures/secondary.d.ts.map +1 -0
  7. package/es/atom/icon/index.d.ts +30 -17
  8. package/es/atom/icon/index.d.ts.map +1 -1
  9. package/es/atom/icon/index.js +4 -6
  10. package/es/atom/icon/index.js.map +1 -1
  11. package/es/atom/radio-with-title/index.d.ts +16 -3
  12. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  13. package/es/atom/radio-with-title/types.d.ts +16 -2
  14. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  15. package/es/atom/tag/index.d.ts +15 -1
  16. package/es/atom/tag/style.css +1 -0
  17. package/es/atom/title/index.d.ts +16 -2
  18. package/es/molecule/base-modal/style.css +0 -1
  19. package/es/molecule/cm-popin/types.d.ts +33 -6
  20. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  21. package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
  22. package/es/molecule/progress-wrapper/index.js +39 -19
  23. package/es/molecule/progress-wrapper/index.js.map +1 -1
  24. package/es/molecule/progress-wrapper/style.css +37 -2
  25. package/es/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  26. package/es/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  27. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +16 -2
  28. package/es/molecule/title-radio-wrapper/index.d.ts +16 -3
  29. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  30. package/es/molecule/title-radio-wrapper/types.d.ts +16 -2
  31. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  32. package/es/organism/cards-grid/index.d.ts +48 -10
  33. package/es/organism/cards-grid/index.d.ts.map +1 -1
  34. package/es/organism/cards-grid/index.js +3 -2
  35. package/es/organism/cards-grid/index.js.map +1 -1
  36. package/es/organism/content-skill-modal/index.d.ts +16 -3
  37. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  38. package/es/organism/content-skill-modal/types.d.ts +15 -2
  39. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  40. package/es/organism/list-item/index.js +5 -5
  41. package/es/organism/list-item/index.js.map +1 -1
  42. package/es/organism/list-item/style.css +38 -19
  43. package/es/organism/list-items/index.d.ts +16 -2
  44. package/es/organism/rewards-form/index.d.ts +16 -2
  45. package/es/organism/select-opponents/index.d.ts +16 -3
  46. package/es/organism/select-opponents/index.d.ts.map +1 -1
  47. package/es/organism/select-opponents/types.d.ts +16 -2
  48. package/es/organism/select-opponents/types.d.ts.map +1 -1
  49. package/es/organism/sidebar/index.d.ts +2 -2
  50. package/es/organism/skill-edition/index.d.ts +76 -11
  51. package/es/organism/skill-edition/index.d.ts.map +1 -1
  52. package/es/organism/skill-edition/types.d.ts +76 -10
  53. package/es/organism/skill-edition/types.d.ts.map +1 -1
  54. package/es/organism/title-and-input/index.d.ts +31 -5
  55. package/es/organism/title-and-input/index.d.ts.map +1 -1
  56. package/es/organism/title-and-input/types.d.ts +30 -4
  57. package/es/organism/title-and-input/types.d.ts.map +1 -1
  58. package/es/organism/wizard-contents/index.d.ts +16 -2
  59. package/es/template/app-player/loading/index.d.ts +33 -6
  60. package/es/template/app-player/player/index.d.ts +65 -12
  61. package/es/template/app-player/player/slides/index.d.ts +33 -6
  62. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  63. package/es/template/app-player/popin-correction/index.d.ts +32 -6
  64. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  65. package/es/template/app-player/popin-end/index.d.ts +33 -6
  66. package/es/template/app-review/index.d.ts +33 -7
  67. package/es/template/app-review/index.d.ts.map +1 -1
  68. package/es/template/app-review/player/prop-types.d.ts +33 -6
  69. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  70. package/es/template/app-review/prop-types.d.ts +33 -6
  71. package/es/template/app-review/prop-types.d.ts.map +1 -1
  72. package/es/template/back-office/brand-update/index.d.ts +138 -20
  73. package/es/template/back-office/brand-update/utils.d.ts +1 -1
  74. package/es/template/certification-detail/style.css +5 -2
  75. package/es/template/common/dashboard/index.d.ts +65 -12
  76. package/es/template/common/search-page/index.d.ts +33 -6
  77. package/es/template/external-course/index.d.ts +33 -6
  78. package/es/template/skill-detail/all-courses.d.ts +61 -17
  79. package/es/template/skill-detail/all-courses.d.ts.map +1 -1
  80. package/es/template/skill-detail/all-courses.js +12 -11
  81. package/es/template/skill-detail/all-courses.js.map +1 -1
  82. package/es/template/skill-detail/continue-learning.d.ts +25 -12
  83. package/es/template/skill-detail/continue-learning.d.ts.map +1 -1
  84. package/es/template/skill-detail/continue-learning.js.map +1 -1
  85. package/es/template/skill-detail/index.d.ts +81 -71
  86. package/es/template/skill-detail/index.d.ts.map +1 -1
  87. package/es/template/skill-detail/index.js +93 -59
  88. package/es/template/skill-detail/index.js.map +1 -1
  89. package/es/template/skill-detail/style.css +96 -38
  90. package/es/variables/colors.d.ts +5 -1
  91. package/es/variables/colors.d.ts.map +1 -1
  92. package/es/variables/colors.js +6 -2
  93. package/es/variables/colors.js.map +1 -1
  94. package/lib/atom/button-link/index.js.map +1 -1
  95. package/lib/atom/button-link/style.css +2 -2
  96. package/lib/atom/cta/test/fixtures/primary.d.ts +9 -0
  97. package/lib/atom/cta/test/fixtures/primary.d.ts.map +1 -0
  98. package/lib/atom/cta/test/fixtures/secondary.d.ts +10 -0
  99. package/lib/atom/cta/test/fixtures/secondary.d.ts.map +1 -0
  100. package/lib/atom/icon/index.d.ts +30 -17
  101. package/lib/atom/icon/index.d.ts.map +1 -1
  102. package/lib/atom/icon/index.js +4 -6
  103. package/lib/atom/icon/index.js.map +1 -1
  104. package/lib/atom/radio-with-title/index.d.ts +16 -3
  105. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  106. package/lib/atom/radio-with-title/types.d.ts +16 -2
  107. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  108. package/lib/atom/tag/index.d.ts +15 -1
  109. package/lib/atom/tag/style.css +1 -0
  110. package/lib/atom/title/index.d.ts +16 -2
  111. package/lib/molecule/base-modal/style.css +0 -1
  112. package/lib/molecule/cm-popin/types.d.ts +33 -6
  113. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  114. package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
  115. package/lib/molecule/progress-wrapper/index.js +39 -19
  116. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  117. package/lib/molecule/progress-wrapper/style.css +37 -2
  118. package/lib/molecule/skills-chart-side-information-item/index.d.ts +1 -1
  119. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +1 -1
  120. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +16 -2
  121. package/lib/molecule/title-radio-wrapper/index.d.ts +16 -3
  122. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  123. package/lib/molecule/title-radio-wrapper/types.d.ts +16 -2
  124. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  125. package/lib/organism/cards-grid/index.d.ts +48 -10
  126. package/lib/organism/cards-grid/index.d.ts.map +1 -1
  127. package/lib/organism/cards-grid/index.js +3 -2
  128. package/lib/organism/cards-grid/index.js.map +1 -1
  129. package/lib/organism/content-skill-modal/index.d.ts +16 -3
  130. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  131. package/lib/organism/content-skill-modal/types.d.ts +15 -2
  132. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  133. package/lib/organism/list-item/index.js +5 -5
  134. package/lib/organism/list-item/index.js.map +1 -1
  135. package/lib/organism/list-item/style.css +38 -19
  136. package/lib/organism/list-items/index.d.ts +16 -2
  137. package/lib/organism/rewards-form/index.d.ts +16 -2
  138. package/lib/organism/select-opponents/index.d.ts +16 -3
  139. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  140. package/lib/organism/select-opponents/types.d.ts +16 -2
  141. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  142. package/lib/organism/sidebar/index.d.ts +2 -2
  143. package/lib/organism/skill-edition/index.d.ts +76 -11
  144. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  145. package/lib/organism/skill-edition/types.d.ts +76 -10
  146. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  147. package/lib/organism/title-and-input/index.d.ts +31 -5
  148. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  149. package/lib/organism/title-and-input/types.d.ts +30 -4
  150. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  151. package/lib/organism/wizard-contents/index.d.ts +16 -2
  152. package/lib/template/app-player/loading/index.d.ts +33 -6
  153. package/lib/template/app-player/player/index.d.ts +65 -12
  154. package/lib/template/app-player/player/slides/index.d.ts +33 -6
  155. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  156. package/lib/template/app-player/popin-correction/index.d.ts +32 -6
  157. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  158. package/lib/template/app-player/popin-end/index.d.ts +33 -6
  159. package/lib/template/app-review/index.d.ts +33 -7
  160. package/lib/template/app-review/index.d.ts.map +1 -1
  161. package/lib/template/app-review/player/prop-types.d.ts +33 -6
  162. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  163. package/lib/template/app-review/prop-types.d.ts +33 -6
  164. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  165. package/lib/template/back-office/brand-update/index.d.ts +138 -20
  166. package/lib/template/back-office/brand-update/utils.d.ts +1 -1
  167. package/lib/template/certification-detail/style.css +5 -2
  168. package/lib/template/common/dashboard/index.d.ts +65 -12
  169. package/lib/template/common/search-page/index.d.ts +33 -6
  170. package/lib/template/external-course/index.d.ts +33 -6
  171. package/lib/template/skill-detail/all-courses.d.ts +61 -17
  172. package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
  173. package/lib/template/skill-detail/all-courses.js +11 -11
  174. package/lib/template/skill-detail/all-courses.js.map +1 -1
  175. package/lib/template/skill-detail/continue-learning.d.ts +25 -12
  176. package/lib/template/skill-detail/continue-learning.d.ts.map +1 -1
  177. package/lib/template/skill-detail/continue-learning.js.map +1 -1
  178. package/lib/template/skill-detail/index.d.ts +81 -71
  179. package/lib/template/skill-detail/index.d.ts.map +1 -1
  180. package/lib/template/skill-detail/index.js +93 -59
  181. package/lib/template/skill-detail/index.js.map +1 -1
  182. package/lib/template/skill-detail/style.css +96 -38
  183. package/lib/variables/colors.d.ts +5 -1
  184. package/lib/variables/colors.d.ts.map +1 -1
  185. package/lib/variables/colors.js +6 -2
  186. package/lib/variables/colors.js.map +1 -1
  187. package/locales/bs/global.json +1 -0
  188. package/locales/cs/global.json +1 -0
  189. package/locales/de/global.json +1 -0
  190. package/locales/en/global.json +1 -0
  191. package/locales/es/global.json +1 -0
  192. package/locales/et/global.json +1 -0
  193. package/locales/fi/global.json +1 -0
  194. package/locales/fr/global.json +1 -0
  195. package/locales/hr/global.json +1 -0
  196. package/locales/hu/global.json +1 -0
  197. package/locales/hy/global.json +1 -0
  198. package/locales/it/global.json +1 -0
  199. package/locales/ja/global.json +1 -0
  200. package/locales/ko/global.json +1 -0
  201. package/locales/nl/global.json +1 -0
  202. package/locales/pl/global.json +1 -0
  203. package/locales/pt/global.json +1 -0
  204. package/locales/ro/global.json +1 -0
  205. package/locales/ru/global.json +1 -0
  206. package/locales/sk/global.json +1 -0
  207. package/locales/sl/global.json +1 -0
  208. package/locales/sv/global.json +1 -0
  209. package/locales/tl/global.json +1 -0
  210. package/locales/tr/global.json +1 -0
  211. package/locales/uk/global.json +1 -0
  212. package/locales/vi/global.json +1 -0
  213. package/locales/zh/global.json +1 -0
  214. package/locales/zh_TW/global.json +1 -0
  215. package/package.json +2 -2
@@ -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} 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 ? 'transparent'\n : hovered && hoverBackgroundColor\n ? hoverBackgroundColor\n : 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 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 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 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(() => {\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 style={customStyle}\n className={styleButton}\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,QAAO,SAAS;AAClD,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,EA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EC,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
+ {"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 ? 'transparent'\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 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 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(() => {\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 style={customStyle}\n className={styleButton}\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;A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J,OAAO,EAAEa,aAAc;IACvBX,SAAS,EAAEa,eAAgB;IAC3BgB,WAAW,EAAEf,eAAgB;IAC7Bc,YAAY,EAAEb,gBAAiB;IAC/Be,QAAQ,EAAE,CAAE;IACZvC,QAAQ,EAAEA;EAAS,IAElB5B,gBAAgB,CAACC,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":[]}
@@ -22,7 +22,7 @@
22
22
  align-items: center;
23
23
  cursor: pointer;
24
24
  border: none;
25
- padding: 0px 16px;
25
+ padding: 12px 16px;
26
26
  /* prevents text selection when dragging
27
27
  the mouse over the button */
28
28
  user-select: none;
@@ -39,6 +39,7 @@
39
39
  }
40
40
 
41
41
  .buttonContent {
42
+ gap: 8px;
42
43
  display: flex;
43
44
  justify-content: center;
44
45
  align-items: center;
@@ -55,7 +56,6 @@
55
56
  }
56
57
 
57
58
  .label {
58
- margin: 0 8px 0 8px;
59
59
  text-wrap: nowrap;
60
60
  display: block;
61
61
  }
@@ -0,0 +1,9 @@
1
+ declare namespace _default {
2
+ namespace props {
3
+ const submitValue: string;
4
+ function onClick(): void;
5
+ const target: string;
6
+ }
7
+ }
8
+ export default _default;
9
+ //# sourceMappingURL=primary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primary.d.ts","sourceRoot":"","sources":["../../../../../src/atom/cta/test/fixtures/primary.js"],"names":[],"mappings":";;;QAGa,yBAA2B"}
@@ -0,0 +1,10 @@
1
+ declare namespace _default {
2
+ const props: {
3
+ secondary: boolean;
4
+ submitValue: string;
5
+ onClick: () => void;
6
+ target: string;
7
+ };
8
+ }
9
+ export default _default;
10
+ //# sourceMappingURL=secondary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secondary.d.ts","sourceRoot":"","sources":["../../../../../src/atom/cta/test/fixtures/secondary.js"],"names":[],"mappings":""}
@@ -1,22 +1,35 @@
1
- export const DEFAULT_ICON_COLOR: "hsl(0, 0%, 32%)";
2
- export function getForegroundColor(backgroundColor: any): any;
3
- export namespace iconPropTypes {
4
- const iconName: PropTypes.Validator<string>;
5
- const iconColor: PropTypes.Requireable<string>;
6
- const backgroundColor: PropTypes.Requireable<string>;
7
- const gradientBackground: PropTypes.Requireable<boolean>;
8
- const borderRadius: PropTypes.Requireable<string>;
9
- const preset: PropTypes.Requireable<string>;
10
- const size: PropTypes.Requireable<PropTypes.InferProps<{
11
- faSize: PropTypes.Requireable<number>;
12
- wrapperSize: PropTypes.Requireable<number>;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ export declare const DEFAULT_ICON_COLOR = "hsl(0, 0%, 32%)";
4
+ export declare const getForegroundColor: (backgroundColor: string) => string;
5
+ export interface IconProps {
6
+ iconName: string;
7
+ iconColor?: string;
8
+ backgroundColor?: string;
9
+ gradientBackground?: boolean;
10
+ borderRadius?: string;
11
+ preset?: string;
12
+ size?: {
13
+ faSize: number;
14
+ wrapperSize: number;
15
+ };
16
+ customStyle?: React.CSSProperties;
17
+ }
18
+ declare const Icon: React.FC<IconProps>;
19
+ export declare const iconPropTypes: {
20
+ iconName: PropTypes.Validator<string>;
21
+ iconColor: PropTypes.Requireable<string>;
22
+ backgroundColor: PropTypes.Requireable<string>;
23
+ gradientBackground: PropTypes.Requireable<boolean>;
24
+ borderRadius: PropTypes.Requireable<string>;
25
+ preset: PropTypes.Requireable<string>;
26
+ size: PropTypes.Requireable<PropTypes.InferProps<{
27
+ faSize: PropTypes.Validator<number>;
28
+ wrapperSize: PropTypes.Validator<number>;
13
29
  }>>;
14
- const customStyle: PropTypes.Requireable<{
30
+ customStyle: PropTypes.Requireable<{
15
31
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
16
32
  }>;
17
- }
33
+ };
18
34
  export default Icon;
19
- import PropTypes from "prop-types";
20
- declare const Icon: React.NamedExoticComponent<object>;
21
- import React from "react";
22
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/icon/index.js"],"names":[],"mappings":"AAkBA,mDAAoD;AAiB7C,8DAC8D;;;;;;;;;;;;;;;;;;AAGrE,uDAsCG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAmB,MAAM,YAAY,CAAC;AAgB7C,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAiBpD,eAAO,MAAM,kBAAkB,oBAAqB,MAAM,KAAG,MACQ,CAAC;AAEtE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACnC;AACD,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAqC5B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAYzB,CAAC;AAIF,eAAe,IAAI,CAAC"}
@@ -13,7 +13,6 @@ library.add(fas);
13
13
  const DEFAULT_PRESET = 'm';
14
14
  const ICON_LUMINOSITY = 32;
15
15
  const DEFAULT_WRAPPER_SIZE = 40;
16
- const ICON_PADDING = 8;
17
16
  export const DEFAULT_ICON_COLOR = 'hsl(0, 0%, 32%)';
18
17
  const SIZE_CONFIGS = {
19
18
  s: {
@@ -44,13 +43,12 @@ const Icon = /*#__PURE__*/React.memo(function Icon({
44
43
  }) {
45
44
  const effectiveIconColor = iconColor || (backgroundColor ? getForegroundColor(backgroundColor) : DEFAULT_ICON_COLOR);
46
45
  const effectiveSize = size ? merge(SIZE_CONFIGS[DEFAULT_PRESET], size) : getOr(SIZE_CONFIGS[DEFAULT_PRESET], toLower(preset), SIZE_CONFIGS);
47
- const wrapperSize = effectiveSize.wrapperSize - ICON_PADDING * 2;
46
+ const wrapperSize = effectiveSize.wrapperSize;
48
47
  const iconWrapperStyle = {
49
48
  background: gradientBackground ? createGradientBackground(effectiveIconColor, '81%', '91%') : backgroundColor,
50
49
  borderRadius,
51
50
  width: wrapperSize,
52
- height: wrapperSize,
53
- padding: ICON_PADDING
51
+ height: wrapperSize
54
52
  };
55
53
  return /*#__PURE__*/React.createElement("div", {
56
54
  className: style.iconWrapper,
@@ -72,8 +70,8 @@ export const iconPropTypes = {
72
70
  borderRadius: PropTypes.string,
73
71
  preset: PropTypes.oneOf(['s', 'm', 'xl']),
74
72
  size: PropTypes.shape({
75
- faSize: number,
76
- wrapperSize: PropTypes.number
73
+ faSize: number.isRequired,
74
+ wrapperSize: PropTypes.number.isRequired
77
75
  }),
78
76
  customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
79
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","createGradientBackground","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","gradientBackground","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","iconWrapperStyle","background","width","height","padding","createElement","className","iconWrapper","icon","color","fontSize","iconPropTypes","string","isRequired","bool","oneOf","shape","objectOf","oneOfType","propTypes","process","env","NODE_ENV"],"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 {createGradientBackground} from '../../util/get-background-gradient-color';\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 gradientBackground,\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 background: gradientBackground\n ? createGradientBackground(effectiveIconColor, '81%', '91%')\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\nexport const iconPropTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n gradientBackground: PropTypes.bool,\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\nIcon.propTypes = iconPropTypes;\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,IAAGC,MAAM,QAAO,YAAY;AAC5C,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,SAAQC,GAAG,QAAO,kCAAkC;AACpD,SAAQC,OAAO,QAAO,mCAAmC;AACzD,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,KAAK,MAAM,aAAa;AAE/BN,OAAO,CAACO,GAAG,CAACR,GAAG,CAAC;AAEhB,MAAMS,cAAc,GAAG,GAAG;AAC1B,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,oBAAoB,GAAG,EAAE;AAC/B,MAAMC,YAAY,GAAG,CAAC;AACtB,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;AAEnD,MAAMC,YAAY,GAAG;EACnBC,CAAC,EAAE;IACDC,MAAM,EAAE,EAAE;IACVC,WAAW,EAAE;EACf,CAAC;EACDC,CAAC,EAAE;I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,eAAe;IACd0C,IAAI,EAAE,MAAMjB,QAAQ,EAAG;IACvBkB,KAAK,EAAEX,kBAAmB;IAC1BY,QAAQ,EAAEX,aAAa,CAAChB;EAAO,CAChC,CACE,CAAC;AAEV,CAAC,CAAC;AAEF,OAAO,MAAM4B,aAAa,GAAG;EAC3BpB,QAAQ,EAAE3B,SAAS,CAACgD,MAAM,CAACC,UAAU;EACrCrB,SAAS,EAAE5B,SAAS,CAACgD,MAAM;EAC3BxB,eAAe,EAAExB,SAAS,CAACgD,MAAM;EACjCnB,kBAAkB,EAAE7B,SAAS,CAACkD,IAAI;EAClCpB,YAAY,EAAE9B,SAAS,CAACgD,MAAM;EAC9BjB,MAAM,EAAE/B,SAAS,CAACmD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;EACzCnB,IAAI,EAAEhC,SAAS,CAACoD,KAAK,CAAC;IACpBjC,MAAM,EAAElB,MAAM;IACdmB,WAAW,EAAEpB,SAAS,CAACC;EACzB,CAAC,CAAC;EACFgC,WAAW,EAAEjC,SAAS,CAACqD,QAAQ,CAACrD,SAAS,CAACsD,SAAS,CAAC,CAACtD,SAAS,CAACgD,MAAM,EAAEhD,SAAS,CAACC,MAAM,CAAC,CAAC;AAC3F,CAAC;AAEDwB,IAAI,CAAC8B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGX,aAAa;AAE9B,eAAetB,IAAI","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","number","FontAwesomeIcon","fas","library","toLower","merge","getOr","convert","createGradientBackground","style","add","DEFAULT_PRESET","ICON_LUMINOSITY","DEFAULT_WRAPPER_SIZE","DEFAULT_ICON_COLOR","SIZE_CONFIGS","s","faSize","wrapperSize","m","xl","getForegroundColor","backgroundColor","Icon","memo","iconName","iconColor","gradientBackground","borderRadius","preset","size","customStyle","effectiveIconColor","effectiveSize","iconWrapperStyle","background","width","height","createElement","className","iconWrapper","icon","color","fontSize","iconPropTypes","string","isRequired","bool","oneOf","shape","objectOf","oneOfType","propTypes","process","env","NODE_ENV"],"sources":["../../../src/atom/icon/index.tsx"],"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 {IconName, 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 {createGradientBackground} from '../../util/get-background-gradient-color';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst DEFAULT_PRESET = 'm';\nconst ICON_LUMINOSITY = 32;\nconst DEFAULT_WRAPPER_SIZE = 40;\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: string): string =>\n convert(`color(${backgroundColor} lightness(${ICON_LUMINOSITY}%))`);\n// set lightness to 32%\nexport interface IconProps {\n iconName: string;\n iconColor?: string;\n backgroundColor?: string;\n gradientBackground?: boolean;\n borderRadius?: string;\n preset?: string;\n size?: {\n faSize: number;\n wrapperSize: number;\n };\n customStyle?: React.CSSProperties;\n}\nconst Icon: React.FC<IconProps> = React.memo(function Icon({\n iconName,\n iconColor,\n backgroundColor,\n gradientBackground,\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;\n\n const iconWrapperStyle = {\n background: gradientBackground\n ? createGradientBackground(effectiveIconColor, '81%', '91%')\n : backgroundColor,\n borderRadius,\n width: wrapperSize,\n height: wrapperSize\n };\n\n return (\n <div className={style.iconWrapper} style={{...iconWrapperStyle, ...customStyle}}>\n <FontAwesomeIcon\n icon={`fa-${iconName}` as IconName}\n color={effectiveIconColor}\n fontSize={effectiveSize.faSize}\n />\n </div>\n );\n});\n\nexport const iconPropTypes = {\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string,\n backgroundColor: PropTypes.string,\n gradientBackground: PropTypes.bool,\n borderRadius: PropTypes.string,\n preset: PropTypes.oneOf(['s', 'm', 'xl']),\n size: PropTypes.shape({\n faSize: number.isRequired,\n wrapperSize: PropTypes.number.isRequired\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nIcon.propTypes = iconPropTypes;\n\nexport default Icon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,IAAGC,MAAM,QAAO,YAAY;AAC5C,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,SAAQC,GAAG,QAAO,kCAAkC;AACpD,SAAkBC,OAAO,QAAO,mCAAmC;AACnE,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,KAAK,MAAM,iBAAiB;AACnC,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,KAAK,MAAM,aAAa;AAE/BN,OAAO,CAACO,GAAG,CAACR,GAAG,CAAC;AAEhB,MAAMS,cAAc,GAAG,GAAG;AAC1B,MAAMC,eAAe,GAAG,EAAE;AAC1B,MAAMC,oBAAoB,GAAG,EAAE;AAC/B,OAAO,MAAMC,kBAAkB,GAAG,iBAAiB;AAEnD,MAAMC,YAAY,GAAG;EACnBC,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EjC,KAAA,CAAAwC,aAAA,CAACrC,eAAe;IACdwC,IAAI,EAAE,MAAMhB,QAAQ,EAAe;IACnCiB,KAAK,EAAEV,kBAAmB;IAC1BW,QAAQ,EAAEV,aAAa,CAAChB;EAAO,CAChC,CACE,CAAC;AAEV,CAAC,CAAC;AAEF,OAAO,MAAM2B,aAAa,GAAG;EAC3BnB,QAAQ,EAAE1B,SAAS,CAAC8C,MAAM,CAACC,UAAU;EACrCpB,SAAS,EAAE3B,SAAS,CAAC8C,MAAM;EAC3BvB,eAAe,EAAEvB,SAAS,CAAC8C,MAAM;EACjClB,kBAAkB,EAAE5B,SAAS,CAACgD,IAAI;EAClCnB,YAAY,EAAE7B,SAAS,CAAC8C,MAAM;EAC9BhB,MAAM,EAAE9B,SAAS,CAACiD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;EACzClB,IAAI,EAAE/B,SAAS,CAACkD,KAAK,CAAC;IACpBhC,MAAM,EAAEjB,MAAM,CAAC8C,UAAU;IACzB5B,WAAW,EAAEnB,SAAS,CAACC,MAAM,CAAC8C;EAChC,CAAC,CAAC;EACFf,WAAW,EAAEhC,SAAS,CAACmD,QAAQ,CAACnD,SAAS,CAACoD,SAAS,CAAC,CAACpD,SAAS,CAAC8C,MAAM,EAAE9C,SAAS,CAACC,MAAM,CAAC,CAAC;AAC3F,CAAC;AAEDuB,IAAI,CAAC6B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGX,aAAa;AAE9B,eAAerB,IAAI","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { RadioWithTitleProps } from './types';
3
3
  declare const RadioWithTitle: {
4
4
  (props: RadioWithTitleProps): JSX.Element;
@@ -10,7 +10,7 @@ declare const RadioWithTitle: {
10
10
  'data-name': import("prop-types").Requireable<string>;
11
11
  titleSize: import("prop-types").Requireable<string>;
12
12
  subtitleSize: import("prop-types").Requireable<string>;
13
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
13
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>;
14
14
  tag: import("prop-types").Requireable<import("prop-types").InferProps<{
15
15
  label: import("prop-types").Requireable<string>;
16
16
  type: import("prop-types").Requireable<string>;
@@ -18,7 +18,20 @@ declare const RadioWithTitle: {
18
18
  customStyle: import("prop-types").Requireable<{
19
19
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
20
20
  }>;
21
- icon: import("prop-types").Requireable<import("prop-types").InferProps<any>>;
21
+ icon: import("prop-types").Requireable<import("prop-types").InferProps<{
22
+ position: import("prop-types").Requireable<string>;
23
+ iconName?: React.Validator<string> | undefined;
24
+ iconColor?: React.Validator<string | null | undefined> | undefined;
25
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
26
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
27
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
28
+ preset?: React.Validator<string | null | undefined> | undefined;
29
+ size?: React.Validator<{
30
+ faSize: number;
31
+ wrapperSize: number;
32
+ } | null | undefined> | undefined;
33
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
34
+ }>>;
22
35
  }>>;
23
36
  button: import("prop-types").Requireable<import("prop-types").InferProps<{
24
37
  type: 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/radio-with-title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAY,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,cAAc;YAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjD,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  export declare const propTypes: {
3
4
  title: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
@@ -7,7 +8,7 @@ export declare const propTypes: {
7
8
  'data-name': PropTypes.Requireable<string>;
8
9
  titleSize: PropTypes.Requireable<string>;
9
10
  subtitleSize: PropTypes.Requireable<string>;
10
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
11
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
11
12
  tag: PropTypes.Requireable<PropTypes.InferProps<{
12
13
  label: PropTypes.Requireable<string>;
13
14
  type: PropTypes.Requireable<string>;
@@ -15,7 +16,20 @@ export declare const propTypes: {
15
16
  customStyle: PropTypes.Requireable<{
16
17
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
17
18
  }>;
18
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
19
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
20
+ position: PropTypes.Requireable<string>;
21
+ iconName?: import("react").Validator<string> | undefined;
22
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
23
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
24
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
25
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
26
+ preset?: import("react").Validator<string | null | undefined> | undefined;
27
+ size?: import("react").Validator<{
28
+ faSize: number;
29
+ wrapperSize: number;
30
+ } | null | undefined> | undefined;
31
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
32
+ }>>;
19
33
  }>>;
20
34
  button: PropTypes.Requireable<PropTypes.InferProps<{
21
35
  type: 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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"}
@@ -14,8 +14,22 @@ declare namespace Tag {
14
14
  const customStyle: PropTypes.Requireable<{
15
15
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
16
16
  }>;
17
- const icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
17
+ const icon: PropTypes.Requireable<PropTypes.InferProps<{
18
+ position: PropTypes.Requireable<string>;
19
+ iconName?: React.Validator<string> | undefined;
20
+ iconColor?: React.Validator<string | null | undefined> | undefined;
21
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
22
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
23
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
24
+ preset?: React.Validator<string | null | undefined> | undefined;
25
+ size?: React.Validator<{
26
+ faSize: number;
27
+ wrapperSize: number;
28
+ } | null | undefined> | undefined;
29
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
30
+ }>>;
18
31
  }
19
32
  }
20
33
  import PropTypes from "prop-types";
34
+ import React from "react";
21
35
  //# sourceMappingURL=index.d.ts.map
@@ -20,6 +20,7 @@
20
20
  text-align: center;
21
21
  line-height: normal;
22
22
  display: inline-block;
23
+ min-width: max-content;
23
24
  }
24
25
 
25
26
  .small {
@@ -8,7 +8,7 @@ declare namespace Title {
8
8
  'data-name': PropTypes.Requireable<string>;
9
9
  titleSize: PropTypes.Requireable<string>;
10
10
  subtitleSize: PropTypes.Requireable<string>;
11
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
11
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
12
12
  tag: PropTypes.Requireable<PropTypes.InferProps<{
13
13
  label: PropTypes.Requireable<string>;
14
14
  type: PropTypes.Requireable<string>;
@@ -16,7 +16,20 @@ declare namespace Title {
16
16
  customStyle: PropTypes.Requireable<{
17
17
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
18
18
  }>;
19
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
19
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
20
+ position: PropTypes.Requireable<string>;
21
+ iconName?: React.Validator<string> | undefined;
22
+ iconColor?: React.Validator<string | null | undefined> | undefined;
23
+ backgroundColor?: React.Validator<string | null | undefined> | undefined;
24
+ gradientBackground?: React.Validator<boolean | null | undefined> | undefined;
25
+ borderRadius?: React.Validator<string | null | undefined> | undefined;
26
+ preset?: React.Validator<string | null | undefined> | undefined;
27
+ size?: React.Validator<{
28
+ faSize: number;
29
+ wrapperSize: number;
30
+ } | null | undefined> | undefined;
31
+ customStyle?: React.Validator<React.CSSProperties | null | undefined> | undefined;
32
+ }>>;
20
33
  }>>;
21
34
  button: PropTypes.Requireable<PropTypes.InferProps<{
22
35
  type: PropTypes.Requireable<string>;
@@ -59,4 +72,5 @@ declare namespace Title {
59
72
  };
60
73
  }
61
74
  import PropTypes from "prop-types";
75
+ import React from "react";
62
76
  //# sourceMappingURL=index.d.ts.map
@@ -105,7 +105,6 @@
105
105
 
106
106
  .button {
107
107
  border-radius: 12px;
108
- padding: 8px;
109
108
  font-weight: 600;
110
109
  }
111
110
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  import Link from '../../atom/link';
3
4
  import { TitleProps } from '../../atom/title/types';
@@ -15,7 +16,7 @@ declare const propTypes: {
15
16
  'data-name': PropTypes.Requireable<string>;
16
17
  titleSize: PropTypes.Requireable<string>;
17
18
  subtitleSize: PropTypes.Requireable<string>;
18
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
19
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
19
20
  tag: PropTypes.Requireable<PropTypes.InferProps<{
20
21
  label: PropTypes.Requireable<string>;
21
22
  type: PropTypes.Requireable<string>;
@@ -23,7 +24,20 @@ declare const propTypes: {
23
24
  customStyle: PropTypes.Requireable<{
24
25
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
25
26
  }>;
26
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
27
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
28
+ position: PropTypes.Requireable<string>;
29
+ iconName?: import("react").Validator<string> | undefined;
30
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
31
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
32
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
33
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
34
+ preset?: import("react").Validator<string | null | undefined> | undefined;
35
+ size?: import("react").Validator<{
36
+ faSize: number;
37
+ wrapperSize: number;
38
+ } | null | undefined> | undefined;
39
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
40
+ }>>;
27
41
  }>>;
28
42
  button: PropTypes.Requireable<PropTypes.InferProps<{
29
43
  type: PropTypes.Requireable<string>;
@@ -110,8 +124,8 @@ declare const propTypes: {
110
124
  borderRadius: PropTypes.Requireable<string>;
111
125
  preset: PropTypes.Requireable<string>;
112
126
  size: PropTypes.Requireable<PropTypes.InferProps<{
113
- faSize: PropTypes.Requireable<number>;
114
- wrapperSize: PropTypes.Requireable<number>;
127
+ faSize: PropTypes.Validator<number>;
128
+ wrapperSize: PropTypes.Validator<number>;
115
129
  }>>;
116
130
  customStyle: PropTypes.Requireable<{
117
131
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
@@ -549,7 +563,7 @@ declare const propTypes: {
549
563
  'data-name': PropTypes.Requireable<string>;
550
564
  titleSize: PropTypes.Requireable<string>;
551
565
  subtitleSize: PropTypes.Requireable<string>;
552
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
566
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
553
567
  tag: PropTypes.Requireable<PropTypes.InferProps<{
554
568
  label: PropTypes.Requireable<string>;
555
569
  type: PropTypes.Requireable<string>;
@@ -557,7 +571,20 @@ declare const propTypes: {
557
571
  customStyle: PropTypes.Requireable<{
558
572
  [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
559
573
  }>;
560
- icon: PropTypes.Requireable<PropTypes.InferProps<any>>;
574
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
575
+ position: PropTypes.Requireable<string>;
576
+ iconName?: import("react").Validator<string> | undefined;
577
+ iconColor?: import("react").Validator<string | null | undefined> | undefined;
578
+ backgroundColor?: import("react").Validator<string | null | undefined> | undefined;
579
+ gradientBackground?: import("react").Validator<boolean | null | undefined> | undefined;
580
+ borderRadius?: import("react").Validator<string | null | undefined> | undefined;
581
+ preset?: import("react").Validator<string | null | undefined> | undefined;
582
+ size?: import("react").Validator<{
583
+ faSize: number;
584
+ wrapperSize: number;
585
+ } | null | undefined> | undefined;
586
+ customStyle?: import("react").Validator<import("react").CSSProperties | null | undefined> | undefined;
587
+ }>>;
561
588
  }>>;
562
589
  button: PropTypes.Requireable<PropTypes.InferProps<{
563
590
  type: 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;AAElD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAG;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA+GA;;;;;;;8BA6DC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AAgGA;;;;;;;8BAsGC"}
@@ -2,7 +2,8 @@ import _get from "lodash/fp/get";
2
2
  import _map from "lodash/fp/map";
3
3
  import _isEmpty from "lodash/fp/isEmpty";
4
4
  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); }
5
- import React from 'react';
5
+ import React, { useCallback, useState } from 'react';
6
+ import classNames from 'classnames';
6
7
  import PropTypes from 'prop-types';
7
8
  import { convert } from 'css-color-function';
8
9
  import Title from '../../atom/title';
@@ -59,19 +60,6 @@ const DetailSection = ({
59
60
  },
60
61
  disabled: isLocked
61
62
  };
62
- const LockedTag = /*#__PURE__*/React.createElement(Tag, {
63
- label: translate('locked'),
64
- size: "S",
65
- icon: {
66
- position: 'left',
67
- iconName: 'lock',
68
- iconColor: COLORS.cm_grey_500,
69
- preset: 's',
70
- customStyle: {
71
- padding: 0
72
- }
73
- }
74
- });
75
63
  return isTypeStars ? /*#__PURE__*/React.createElement("div", {
76
64
  className: style[`detailsSection${index}`],
77
65
  "data-name": type,
@@ -82,7 +70,7 @@ const DetailSection = ({
82
70
  className: style.detailsInfoText
83
71
  }, /*#__PURE__*/React.createElement("span", {
84
72
  className: style.detailsTitle
85
- }, translate('bonus_stars')), isLocked ? LockedTag : null), /*#__PURE__*/React.createElement("div", {
73
+ }, translate('bonus_stars'))), /*#__PURE__*/React.createElement("div", {
86
74
  className: style.stars
87
75
  }, /*#__PURE__*/React.createElement(Icon, {
88
76
  iconName: "star",
@@ -102,7 +90,7 @@ const DetailSection = ({
102
90
  className: style.detailsInfoText
103
91
  }, /*#__PURE__*/React.createElement("span", {
104
92
  className: style.detailsTitle
105
- }, type === 'diploma' ? translate('diploma') : translate('badge')), isLocked ? LockedTag : null), /*#__PURE__*/React.createElement("div", {
93
+ }, type === 'diploma' ? translate('diploma') : translate('badge'))), /*#__PURE__*/React.createElement("div", {
106
94
  className: style.buttonContainer
107
95
  }, /*#__PURE__*/React.createElement(ButtonLink, downloadButtonProps))));
108
96
  };
@@ -122,6 +110,10 @@ const ProgressWrapper = ({
122
110
  count: completedModules > mandatoryModules ? mandatoryModules : completedModules
123
111
  });
124
112
  const isLocked = progression !== 100;
113
+ const [showDetails, setShowDetails] = useState(false);
114
+ const handleToggleDetails = useCallback(() => {
115
+ setShowDetails(!showDetails);
116
+ }, [showDetails]);
125
117
  return /*#__PURE__*/React.createElement("div", {
126
118
  className: style.container,
127
119
  "data-name": "prgress-wrapper",
@@ -159,13 +151,41 @@ const ProgressWrapper = ({
159
151
  className: style.statsProgressionMobile
160
152
  }, /*#__PURE__*/React.createElement("span", {
161
153
  className: style.statsNumber
162
- }, progression, "%")), _isEmpty(sections) ? null : /*#__PURE__*/React.createElement("div", {
163
- className: style.details
154
+ }, progression, "%")), !_isEmpty(sections) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
155
+ className: style.toggleDetailsButton,
156
+ onClick: handleToggleDetails,
157
+ "data-testid": "progress-wrapper-toggle-details-button"
158
+ }, /*#__PURE__*/React.createElement("div", {
159
+ className: style.toggleDetailsLabel
160
+ }, /*#__PURE__*/React.createElement("span", {
161
+ className: style.toggleDetailsTitle
162
+ }, translate('rewards')), isLocked ? /*#__PURE__*/React.createElement(Tag, {
163
+ label: translate('locked'),
164
+ size: "S",
165
+ icon: {
166
+ position: 'left',
167
+ iconName: 'lock',
168
+ iconColor: COLORS.cm_grey_500,
169
+ preset: 's',
170
+ customStyle: {
171
+ padding: 0
172
+ }
173
+ }
174
+ }) : null), /*#__PURE__*/React.createElement(Icon, {
175
+ iconColor: COLORS.cm_grey_700,
176
+ iconName: showDetails ? 'chevron-up' : 'chevron-down',
177
+ size: {
178
+ faSize: 20,
179
+ wrapperSize: 24
180
+ }
181
+ })), /*#__PURE__*/React.createElement("div", {
182
+ className: classNames(style.details, showDetails ? style.visibleDetails : style.hiddenDetails),
183
+ "data-testid": "progress-wrapper-details"
164
184
  }, uncappedMap((section, index) => /*#__PURE__*/React.createElement(DetailSection, _extends({}, section, {
165
185
  isLocked: isLocked,
166
186
  key: `${section.type}-${index}`,
167
187
  index: index
168
- })), sections)));
188
+ })), sections))) : null);
169
189
  };
170
190
  const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
171
191
  type: PropTypes.oneOf(['diploma', 'badge', 'stars']),