@coorpacademy/components 11.33.3-alpha.12 → 11.33.4

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 (152) hide show
  1. package/es/atom/battle-opponent/index.js +1 -1
  2. package/es/atom/battle-opponent/index.js.map +1 -1
  3. package/es/atom/battle-opponent/style.css +7 -7
  4. package/es/atom/button-link/index.d.ts +0 -1
  5. package/es/atom/button-link/index.d.ts.map +1 -1
  6. package/es/atom/button-link/index.js +7 -11
  7. package/es/atom/button-link/index.js.map +1 -1
  8. package/es/atom/button-link/style.css +0 -10
  9. package/es/atom/button-link/types.d.ts +0 -2
  10. package/es/atom/button-link/types.d.ts.map +1 -1
  11. package/es/atom/button-link/types.js +1 -2
  12. package/es/atom/button-link/types.js.map +1 -1
  13. package/es/atom/button-link-icon/style.css +2 -2
  14. package/es/atom/button-menu/index.d.ts +0 -15
  15. package/es/atom/button-menu/index.d.ts.map +1 -1
  16. package/es/atom/button-menu/index.js +5 -43
  17. package/es/atom/button-menu/index.js.map +1 -1
  18. package/es/atom/button-menu/style.css +0 -13
  19. package/es/atom/button-menu/types.d.ts +0 -40
  20. package/es/atom/button-menu/types.d.ts.map +1 -1
  21. package/es/atom/button-menu/types.js +1 -16
  22. package/es/atom/button-menu/types.js.map +1 -1
  23. package/es/atom/tag/style.css +6 -10
  24. package/es/molecule/bullet-point-menu-button/index.d.ts +0 -16
  25. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  26. package/es/molecule/bullet-point-menu-button/index.js +3 -5
  27. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  28. package/es/molecule/bullet-point-menu-button/style.css +7 -26
  29. package/es/molecule/bullet-point-menu-button/types.d.ts +0 -17
  30. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  31. package/es/molecule/bullet-point-menu-button/types.js +1 -2
  32. package/es/molecule/bullet-point-menu-button/types.js.map +1 -1
  33. package/es/molecule/cm-popin/types.d.ts +0 -34
  34. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  35. package/es/molecule/expandible-actionable-table/index.d.ts +0 -33
  36. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  37. package/es/molecule/expandible-actionable-table/types.d.ts +0 -33
  38. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  39. package/es/organism/list-items/index.d.ts +0 -34
  40. package/es/organism/setup-header/index.d.ts +0 -4
  41. package/es/organism/wizard-contents/index.d.ts +0 -35
  42. package/es/template/app-player/loading/index.d.ts +0 -34
  43. package/es/template/app-player/player/index.d.ts +0 -68
  44. package/es/template/app-player/player/slides/index.d.ts +0 -34
  45. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  46. package/es/template/app-player/popin-correction/index.d.ts +0 -34
  47. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  48. package/es/template/app-player/popin-end/index.d.ts +0 -34
  49. package/es/template/app-review/index.d.ts +0 -34
  50. package/es/template/app-review/index.d.ts.map +1 -1
  51. package/es/template/app-review/player/prop-types.d.ts +0 -34
  52. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  53. package/es/template/app-review/prop-types.d.ts +0 -34
  54. package/es/template/app-review/prop-types.d.ts.map +1 -1
  55. package/es/template/back-office/brand-create/index.d.ts +0 -4
  56. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  57. package/es/template/back-office/brand-list/index.d.ts +0 -4
  58. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  59. package/es/template/back-office/brand-update/index.d.ts +0 -107
  60. package/es/template/back-office/dashboard-preview/index.d.ts +0 -4
  61. package/es/template/back-office/layout/index.d.ts +0 -4
  62. package/es/template/back-office/layout/index.d.ts.map +1 -1
  63. package/es/template/common/dashboard/index.d.ts +0 -68
  64. package/es/template/common/search-page/index.d.ts +0 -34
  65. package/es/template/external-course/index.d.ts +0 -34
  66. package/es/variables/colors.css +0 -3
  67. package/lib/atom/battle-opponent/index.js +1 -1
  68. package/lib/atom/battle-opponent/index.js.map +1 -1
  69. package/lib/atom/battle-opponent/style.css +7 -7
  70. package/lib/atom/button-link/index.d.ts +0 -1
  71. package/lib/atom/button-link/index.d.ts.map +1 -1
  72. package/lib/atom/button-link/index.js +7 -11
  73. package/lib/atom/button-link/index.js.map +1 -1
  74. package/lib/atom/button-link/style.css +0 -10
  75. package/lib/atom/button-link/types.d.ts +0 -2
  76. package/lib/atom/button-link/types.d.ts.map +1 -1
  77. package/lib/atom/button-link/types.js +1 -2
  78. package/lib/atom/button-link/types.js.map +1 -1
  79. package/lib/atom/button-link-icon/style.css +2 -2
  80. package/lib/atom/button-menu/index.d.ts +0 -15
  81. package/lib/atom/button-menu/index.d.ts.map +1 -1
  82. package/lib/atom/button-menu/index.js +5 -43
  83. package/lib/atom/button-menu/index.js.map +1 -1
  84. package/lib/atom/button-menu/style.css +0 -13
  85. package/lib/atom/button-menu/types.d.ts +0 -40
  86. package/lib/atom/button-menu/types.d.ts.map +1 -1
  87. package/lib/atom/button-menu/types.js +1 -16
  88. package/lib/atom/button-menu/types.js.map +1 -1
  89. package/lib/atom/tag/style.css +6 -10
  90. package/lib/molecule/bullet-point-menu-button/index.d.ts +0 -16
  91. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  92. package/lib/molecule/bullet-point-menu-button/index.js +3 -5
  93. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  94. package/lib/molecule/bullet-point-menu-button/style.css +7 -26
  95. package/lib/molecule/bullet-point-menu-button/types.d.ts +0 -17
  96. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  97. package/lib/molecule/bullet-point-menu-button/types.js +1 -2
  98. package/lib/molecule/bullet-point-menu-button/types.js.map +1 -1
  99. package/lib/molecule/cm-popin/types.d.ts +0 -34
  100. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  101. package/lib/molecule/expandible-actionable-table/index.d.ts +0 -33
  102. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  103. package/lib/molecule/expandible-actionable-table/types.d.ts +0 -33
  104. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  105. package/lib/organism/list-items/index.d.ts +0 -34
  106. package/lib/organism/setup-header/index.d.ts +0 -4
  107. package/lib/organism/wizard-contents/index.d.ts +0 -35
  108. package/lib/template/app-player/loading/index.d.ts +0 -34
  109. package/lib/template/app-player/player/index.d.ts +0 -68
  110. package/lib/template/app-player/player/slides/index.d.ts +0 -34
  111. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  112. package/lib/template/app-player/popin-correction/index.d.ts +0 -34
  113. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  114. package/lib/template/app-player/popin-end/index.d.ts +0 -34
  115. package/lib/template/app-review/index.d.ts +0 -34
  116. package/lib/template/app-review/index.d.ts.map +1 -1
  117. package/lib/template/app-review/player/prop-types.d.ts +0 -34
  118. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  119. package/lib/template/app-review/prop-types.d.ts +0 -34
  120. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  121. package/lib/template/back-office/brand-create/index.d.ts +0 -4
  122. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  123. package/lib/template/back-office/brand-list/index.d.ts +0 -4
  124. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  125. package/lib/template/back-office/brand-update/index.d.ts +0 -107
  126. package/lib/template/back-office/dashboard-preview/index.d.ts +0 -4
  127. package/lib/template/back-office/layout/index.d.ts +0 -4
  128. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  129. package/lib/template/common/dashboard/index.d.ts +0 -68
  130. package/lib/template/common/search-page/index.d.ts +0 -34
  131. package/lib/template/external-course/index.d.ts +0 -34
  132. package/lib/variables/colors.css +0 -3
  133. package/package.json +3 -3
  134. package/es/organism/custom-skill-header/index.d.ts +0 -5
  135. package/es/organism/custom-skill-header/index.d.ts.map +0 -1
  136. package/es/organism/custom-skill-header/index.js +0 -88
  137. package/es/organism/custom-skill-header/index.js.map +0 -1
  138. package/es/organism/custom-skill-header/style.css +0 -54
  139. package/es/organism/custom-skill-header/types.d.ts +0 -28
  140. package/es/organism/custom-skill-header/types.d.ts.map +0 -1
  141. package/es/organism/custom-skill-header/types.js +0 -2
  142. package/es/organism/custom-skill-header/types.js.map +0 -1
  143. package/lib/organism/custom-skill-header/index.d.ts +0 -5
  144. package/lib/organism/custom-skill-header/index.d.ts.map +0 -1
  145. package/lib/organism/custom-skill-header/index.js +0 -93
  146. package/lib/organism/custom-skill-header/index.js.map +0 -1
  147. package/lib/organism/custom-skill-header/style.css +0 -54
  148. package/lib/organism/custom-skill-header/types.d.ts +0 -28
  149. package/lib/organism/custom-skill-header/types.d.ts.map +0 -1
  150. package/lib/organism/custom-skill-header/types.js +0 -4
  151. package/lib/organism/custom-skill-header/types.js.map +0 -1
  152. package/locales/.mtslconfig.json +0 -1
@@ -18,7 +18,7 @@ const BattleOpponent = ({
18
18
  'aria-label': ariaLabel
19
19
  }, legacyContext) => {
20
20
  const translate = GetTranslateFromContext(legacyContext);
21
- const wrapperClassnames = useMemo(() => classnames(style.card, style['opponent-card'], isRandom ? style.random : null), [isRandom]);
21
+ const wrapperClassnames = useMemo(() => classnames(style.card, style.opponentCard, isRandom ? style.random : null), [isRandom]);
22
22
  const displayNameClassnames = useMemo(() => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null), [isAlreadyEngaged]);
23
23
  const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);
24
24
  const [toolTipIsVisible, setToolTipIsVisible] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","createElement","_extends","onMouseOver","onMouseLeave","className","tabIndex","avatar","src","alt","Fragment","ref","type","tooltipIconContainer","onKeyDown","informationIcon","width","height","toolTipWrapper","fontSize","anchorId","closeToolTipInformationTextAriaLabel","rightArrow","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <span className={style.toolTipWrapper}>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </span>\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAO,OAAO;AACnE,OAAOC,UAAU,MAAM,YAAY;AACnC,SAAQC,EAAE,IAAIC,MAAM,QAAO,MAAM;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SACEC,mCAAmC,IAAIC,UAAU,EACjDC,0CAA0C,IAAIC,eAAe,QACxD,0BAA0B;AACjC,OAAOC,OAAO,IAAGC,qBAAqB,QAAO,YAAY;AACzD,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,aAAa;AAE7D,OAAOC,SAAS,MAA6B,cAAc;AAC3D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,cAAc,GAAGA,CACrB;EACEC,gBAAgB;EAChBC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,WAAW;EACXC,WAAW;EACX,YAAY,EAAEC;AACK,CAAC,EACtBC,aAA+B,KAC5B;EACH,MAAMC,SAAkD,GAAGZ,uBAAuB,CAACW,aAAa,CAAC;EACjG,MAAME,iBAAiB,GAAG3B,OAAO,CAC/B,MAAMG,UAAU,CAACa,KAAK,CAACY,IAAI,EAAEZ,KAAK,CAAC,eAAe,CAAC,EAAEG,QAAQ,GAAGH,KAAK,CAACa,MAAM,GAAG,IAAI,CAAC,EACpF,CAACV,QAAQ,CACX,CAAC;EAED,MAAMW,qBAAqB,GAAG9B,OAAO,CACnC,MAAMG,UAAU,CAACa,KAAK,CAACe,IAAI,EAAEb,gBAAg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AC8C,SAAS,EAAExC,KAAK,CAACkD,eAAgB;IAACC,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE;EAAG,CAAE,CACrE,CAAC,eACTtE,KAAA,CAAAsD,aAAA;IAAMI,SAAS,EAAExC,KAAK,CAACqD;EAAe,gBACpCvE,KAAA,CAAAsD,aAAA,CAACzC,OAAO;IACN2D,QAAQ,EAAE,EAAG;IACbC,QAAQ,EAAEjC,oBAAqB;IAC/BF,gBAAgB,EAAEA,gBAAiB;IACnCc,cAAc,EAAEA,cAAe;IAC/BsB,oCAAoC,EAAE9C,SAAS,CAAC,2BAA2B;EAAE,CAC9E,CACG,CACN,CAAC,gBAEH5B,KAAA,CAAAsD,aAAA,CAAC5C,UAAU;IAACgD,SAAS,EAAExC,KAAK,CAACyD,UAAW;IAACN,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE;EAAG,CAAE,CAEjE,CAAC;AAET,CAAC;AAEDnD,cAAc,CAACF,SAAS,GAAA2D,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG7D,SAAS;AAEpCE,cAAc,CAAC4D,YAAY,GAAG;EAC5BnD,SAAS,EAAEb,QAAQ,CAACiE,iBAAiB,CAACpD;AACxC,CAAC;AAED,eAAeT,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","opponentCard","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","createElement","_extends","onMouseOver","onMouseLeave","className","tabIndex","avatar","src","alt","Fragment","ref","type","tooltipIconContainer","onKeyDown","informationIcon","width","height","toolTipWrapper","fontSize","anchorId","closeToolTipInformationTextAriaLabel","rightArrow","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style.opponentCard, isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <span className={style.toolTipWrapper}>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </span>\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAO,OAAO;AACnE,OAAOC,UAAU,MAAM,YAAY;AACnC,SAAQC,EAAE,IAAIC,MAAM,QAAO,MAAM;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SACEC,mCAAmC,IAAIC,UAAU,EACjDC,0CAA0C,IAAIC,eAAe,QACxD,0BAA0B;AACjC,OAAOC,OAAO,IAAGC,qBAAqB,QAAO,YAAY;AACzD,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,aAAa;AAE7D,OAAOC,SAAS,MAA6B,cAAc;AAC3D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,cAAc,GAAGA,CACrB;EACEC,gBAAgB;EAChBC,QAAQ;EACRC,aAAa;EACbC,OAAO;EACPC,WAAW;EACXC,WAAW;EACX,YAAY,EAAEC;AACK,CAAC,EACtBC,aAA+B,KAC5B;EACH,MAAMC,SAAkD,GAAGZ,uBAAuB,CAACW,aAAa,CAAC;EACjG,MAAME,iBAAiB,GAAG3B,OAAO,CAC/B,MAAMG,UAAU,CAACa,KAAK,CAACY,IAAI,EAAEZ,KAAK,CAACa,YAAY,EAAEV,QAAQ,GAAGH,KAAK,CAACc,MAAM,GAAG,IAAI,CAAC,EAChF,CAACX,QAAQ,CACX,CAAC;EAED,MAAMY,qBAAqB,GAAG/B,OAAO,CACnC,MAAMG,UAAU,CAACa,KAAK,CAACgB,IAAI,EAAEd,gBAAgB,GAAGF,KAAK,CAACiB,cAAc,GAAG,IAAI,CAAC,EAC5E,CAACf,gBAAgB,CACnB,CAAC;EAED,MAAM,CAACgB,eAAe,EAAEC,kBAAkB,CAAC,GAAGlC,QAAQ,CAAqBmC,SAAS,CAAC;EACrF,MAAM,CAAC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BACpCxE,KAAA,CAAAuD,aAAA,CAAC1C,OAAO;IACN4D,QAAQ,EAAE,EAAG;IACbC,QAAQ,EAAEjC,oBAAqB;IAC/BF,gBAAgB,EAAEA,gBAAiB;IACnCc,cAAc,EAAEA,cAAe;IAC/BsB,oCAAoC,EAAE/C,SAAS,CAAC,2BAA2B;EAAE,CAC9E,CACG,CACN,CAAC,gBAEH5B,KAAA,CAAAuD,aAAA,CAAC7C,UAAU;IAACiD,SAAS,EAAEzC,KAAK,CAAC0D,UAAW;IAACN,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE;EAAG,CAAE,CAEjE,CAAC;AAET,CAAC;AAEDpD,cAAc,CAACF,SAAS,GAAA4D,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG9D,SAAS;AAEpCE,cAAc,CAAC6D,YAAY,GAAG;EAC5BpD,SAAS,EAAEb,QAAQ,CAACkE,iBAAiB,CAACrD;AACxC,CAAC;AAED,eAAeT,cAAc","ignoreList":[]}
@@ -23,7 +23,7 @@
23
23
  margin: 5px;
24
24
  }
25
25
 
26
- .opponent-card {
26
+ .opponentCard {
27
27
  flex: 1 1 350px;
28
28
  height: 80px;
29
29
  background-color: white;
@@ -37,7 +37,7 @@
37
37
  cursor: pointer;
38
38
  }
39
39
 
40
- .opponent-card .name {
40
+ .opponentCard .name {
41
41
  font-family: 'Gilroy';
42
42
  font-size: 15px;
43
43
  font-weight: 700;
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
 
49
- .opponent-card .rightArrow {
49
+ .opponentCard .rightArrow {
50
50
  margin-left: 20px;
51
51
  }
52
52
 
@@ -95,7 +95,7 @@
95
95
  display: none;
96
96
  }
97
97
 
98
- .opponent-card:hover {
98
+ .opponentCard:hover {
99
99
  background-color: cm_grey_75;
100
100
  }
101
101
 
@@ -125,16 +125,16 @@
125
125
  }
126
126
 
127
127
  @media mobile {
128
- .opponent-card {
128
+ .opponentCard {
129
129
  width: 100%;
130
130
  padding: 10px;
131
131
  }
132
132
 
133
- .opponent-card .avatar {
133
+ .opponentCard .avatar {
134
134
  margin-right: 10px;
135
135
  }
136
136
 
137
- .opponent-card .rightArrow {
137
+ .opponentCard .rightArrow {
138
138
  margin-left: 10px;
139
139
  }
140
140
 
@@ -27,7 +27,6 @@ declare const ButtonLink: {
27
27
  disabled: import("prop-types").Requireable<boolean>;
28
28
  className: import("prop-types").Requireable<string>;
29
29
  customStyle: import("prop-types").Requireable<import("prop-types").InferProps<{}>>;
30
- isCustomSkillMenu: import("prop-types").Requireable<boolean>;
31
30
  };
32
31
  };
33
32
  export default ButtonLink;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAyD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmJzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-link/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAAC,eAAe,EAAW,MAAM,SAAS,CAAC;AAoD7D,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -8,7 +8,7 @@ import { ICONS } from '../../util/button-icons';
8
8
  import ToolTip from '../tooltip';
9
9
  import propTypes from './types';
10
10
  import style from './style.css';
11
- const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverColor, isCustomSkillMenu) => {
11
+ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverColor) => {
12
12
  const {
13
13
  type,
14
14
  faIcon,
@@ -18,14 +18,11 @@ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverCol
18
18
  position: ''
19
19
  };
20
20
  const Icon = type && ICONS[type];
21
- const labelClassName = classnames(style.label, {
22
- [style.customSkillLabel]: isCustomSkillMenu && faIcon
23
- });
24
21
  if (!Icon && !faIcon) {
25
22
  return /*#__PURE__*/React.createElement("div", {
26
23
  className: style.buttonContent
27
24
  }, /*#__PURE__*/React.createElement("span", {
28
- className: labelClassName
25
+ className: style.label
29
26
  }, content));
30
27
  }
31
28
  const iconComponent = faIcon ? /*#__PURE__*/React.createElement(FaIcon, {
@@ -45,7 +42,7 @@ const getButtonContent = (icon, content, hovered, hoverBackgroundColor, hoverCol
45
42
  return /*#__PURE__*/React.createElement("div", {
46
43
  className: style.buttonContent
47
44
  }, position === 'left' ? iconComponent : null, content ? /*#__PURE__*/React.createElement("span", {
48
- className: labelClassName
45
+ className: style.label
49
46
  }, content) : null, position === 'right' ? iconComponent : null);
50
47
  };
51
48
  const ButtonLink = props => {
@@ -68,10 +65,9 @@ const ButtonLink = props => {
68
65
  onKeyDown = _noop,
69
66
  className,
70
67
  customStyle,
71
- useTitle = true,
72
- isCustomSkillMenu
68
+ useTitle = true
73
69
  } = props;
74
- const styleButton = classnames(className, style.button, !label && style.iconButton, type === 'primary' && style.primary, type === 'secondary' && style.secondary, type === 'tertiary' && style.tertiary, type === 'text' && style.text, type === 'dangerous' && style.dangerous, link && style.link, disabled && style.disabled, isCustomSkillMenu && style.customSkillButton);
70
+ const styleButton = classnames(className, style.button, !label && style.iconButton, type === 'primary' && style.primary, type === 'secondary' && style.secondary, type === 'tertiary' && style.tertiary, type === 'text' && style.text, type === 'dangerous' && style.dangerous, link && style.link, disabled && style.disabled);
75
71
  const [hovered, setHovered] = useState(false);
76
72
  const handleOnClick = useCallback(event => onClick(event), [onClick]);
77
73
  const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);
@@ -116,7 +112,7 @@ const ButtonLink = props => {
116
112
  hoverBackgroundColor: hoverBackgroundColor,
117
113
  onMouseEnter: handleMouseOver,
118
114
  onMouseLeave: handleMouseLeave
119
- }), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor, isCustomSkillMenu), renderToolTip());
115
+ }), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor), renderToolTip());
120
116
  }
121
117
  return /*#__PURE__*/React.createElement("button", _extends({}, useTitle && {
122
118
  title: ariaLabel || label
@@ -137,7 +133,7 @@ const ButtonLink = props => {
137
133
  onMouseLeave: handleMouseLeave,
138
134
  tabIndex: 0,
139
135
  disabled: disabled
140
- }), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor, isCustomSkillMenu), renderToolTip());
136
+ }), getButtonContent(icon, content ?? label, hovered, hoverBackgroundColor, hoverColor), renderToolTip());
141
137
  };
142
138
  ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
143
139
  export default ButtonLink;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","ICONS","ToolTip","propTypes","style","getButtonContent","icon","content","hovered","hoverBackgroundColor","hoverColor","isCustomSkillMenu","type","faIcon","position","Icon","labelClassName","label","customSkillLabel","createElement","className","buttonContent","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","customSkillButton","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 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 isCustomSkillMenu?: boolean\n) => {\n const {type, faIcon, position} = icon || {type: '', position: ''};\n const Icon = type && ICONS[type];\n\n const labelClassName = classnames(style.label, {\n [style.customSkillLabel]: isCustomSkillMenu && faIcon\n });\n\n if (!Icon && !faIcon) {\n return (\n <div className={style.buttonContent}>\n <span className={labelClassName}>{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,\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={labelClassName}>{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 isCustomSkillMenu\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 isCustomSkillMenu && style.customSkillButton\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(\n icon,\n content ?? label,\n hovered,\n hoverBackgroundColor,\n hoverColor,\n isCustomSkillMenu\n )}\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(\n icon,\n content ?? label,\n hovered,\n hoverBackgroundColor,\n hoverColor,\n isCustomSkillMenu\n )}\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,MAAM,SAAS;AAC5B,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,SAAS,MAAmC,SAAS;AAC5D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,gBAAgB,GAAGA,CACvBC,IAAe,EACfC,OAAkC,EAClCC,OAAiB,EACjBC,oBAA6B,EAC7BC,UAAmB,EACnBC,iBAA2B,KACxB;EACH,MAAM;IAACC,IAAI;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGR,IAAI,IAAI;IAACM,IAAI,EAAE,EAAE;IAAEE,QAAQ,EAAE;EAAE,CAAC;EACjE,MAAMC,IAAI,GAAGH,IAAI,IAAIX,KAAK,CAACW,IAAI,CAAC;EAEhC,MAAMI,cAAc,GAAGlB,UAAU,CAACM,KAAK,CAACa,KAAK,EAAE;IAC7C,CAACb,KAAK,CAACc,gBAAgB,GAAGP,iBAAiB,IAAIE;EACjD,CAAC,CAAC;EAEF,IAAI,CAACE,IAAI,IAAI,CAACF,MAAM,EAAE;IACpB,oBACEnB,KAAA,CAAAyB,aAAA;MAAKC,SAAS,EAAEhB,KAAK,CAACiB;IAAc,gBAClC3B,KAAA,CAAAyB,aAAA;MAAMC,SAAS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A,oBAAqB;MAC3CgE,YAAY,EAAEb,eAAgB;MAC9Bc,YAAY,EAAEb;IAAiB,IAE9BxD,gBAAgB,CACfC,IAAI,EACJC,OAAO,IAAIU,KAAK,EAChBT,OAAO,EACPC,oBAAoB,EACpBC,UAAU,EACVC,iBACF,CAAC,EACAqD,aAAa,CAAC,CACX,CAAC;EAEX;EAEA,oBACEtE,KAAA,CAAAyB,aAAA,WAAAoD,QAAA,KACOzB,QAAQ,IAAI;IACf0B,KAAK,EAAEjC,SAAS,IAAItB;EACtB,CAAC,EACIsB,SAAS,IAAI,CAACtB,KAAK,GACpB;IACE,UAAU,EAAE,aAAa;IACzB,UAAU,EAAET;EACd,CAAC,GACD,CAAC,CAAC;IACN;IACAI,IAAI,EAAEuB,KAAM;IACZ,cAAYI,SAAS,IAAItB,KAAM;IAC/B,aAAWoB,QAAS;IACpB,eAAaC,UAAW;IACxBlC,KAAK,EAAEkE,YAAa;IACpBlD,SAAS,EAAE2B,WAAY;IACvBJ,OAAO,EAAEc,aAAc;IACvBZ,SAAS,EAAEc,eAAgB;IAC3BgB,WAAW,EAAEf,eAAgB;IAC7Bc,YAAY,EAAEb,gBAAiB;IAC/Be,QAAQ,EAAE,CAAE;IACZxC,QAAQ,EAAEA;EAAS,IAElB/B,gBAAgB,CACfC,IAAI,EACJC,OAAO,IAAIU,KAAK,EAChBT,OAAO,EACPC,oBAAoB,EACpBC,UAAU,EACVC,iBACF,CAAC,EACAqD,aAAa,CAAC,CACT,CAAC;AAEb,CAAC;AAED/B,UAAU,CAAC9B,SAAS,GAAA0E,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG5E,SAAS;AAEhC,eAAe8B,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","useMemo","classnames","Link","FaIcon","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 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,\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,MAAM,SAAS;AAC5B,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,SAAS,MAAmC,SAAS;AAC5D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,gBAAgB,GAAGA,CACvBC,IAAe,EACfC,OAAkC,EAClCC,OAAiB,EACjBC,oBAA6B,EAC7BC,UAAmB,KAChB;EACH,MAAM;IAACC,IAAI;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGP,IAAI,IAAI;IAACK,IAAI,EAAE,EAAE;IAAEE,QAAQ,EAAE;EAAE,CAAC;EACjE,MAAMC,IAAI,GAAGH,IAAI,IAAIV,KA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
111
111
  line-height: 16px;
112
- }
113
-
114
- .customSkillButton {
115
- composes: button;
116
- padding: 12px 16px;
117
- padding-left: 6px;
118
- }
119
-
120
- .customSkillLabel {
121
- margin: 0;
122
112
  }
@@ -26,7 +26,6 @@ declare const propTypes: {
26
26
  disabled: PropTypes.Requireable<boolean>;
27
27
  className: PropTypes.Requireable<string>;
28
28
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
29
- isCustomSkillMenu: PropTypes.Requireable<boolean>;
30
29
  };
31
30
  export declare type FaIcontype = {
32
31
  name: string;
@@ -64,7 +63,6 @@ export declare type ButtonLinkProps = {
64
63
  className?: string;
65
64
  customStyle?: Record<string, unknown>;
66
65
  useTitle?: boolean;
67
- isCustomSkillMenu?: boolean;
68
66
  };
69
67
  export declare type Fixture = {
70
68
  props: ButtonLinkProps;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Bd,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;IACd,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AACF,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,SAAS,GAAG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,EAAE,OAAO,GAAG,QAAQ,GAAG,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"}
@@ -25,8 +25,7 @@ const propTypes = {
25
25
  hoverColor: PropTypes.string,
26
26
  disabled: PropTypes.bool,
27
27
  className: PropTypes.string,
28
- customStyle: PropTypes.shape({}),
29
- isCustomSkillMenu: PropTypes.bool
28
+ customStyle: PropTypes.shape({})
30
29
  };
31
30
  export default propTypes;
32
31
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","usage","label","string","content","node","tooltipText","tooltipPlacement","icon","shape","position","_keys","onClick","func","link","href","download","bool","target","hoverBackgroundColor","hoverColor","disabled","className","customStyle","isCustomSkillMenu"],"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 tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\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 isCustomSkillMenu: PropTypes.bool\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 tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\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 isCustomSkillMenu?: boolean;\n};\n\nexport type Fixture = {props: ButtonLinkProps};\n\nexport default propTypes;\n"],"mappings":";AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAE7C,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;EAChFC,KAAK,EAAEL,SAAS,CAACI,KAAK,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;EACrDE,KAAK,EAAEN,SAAS,CAACO,MAAM;EACvBC,OAAO,EAAER,SAAS,CAACS,IAAI;EACvB,YAAY,EAAET,SAAS,CAACO,MAAM;EAC9BG,WAAW,EAAEV,SAAS,CAACO,MAAM;EAC7BI,gBAAgB,EAAEX,SAAS,CAACI,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;EACrE,WAAW,EAAEJ,SAAS,CAACO,MAAM;EAC7B,aAAa,EAAEP,SAAS,CAACO,MAAM;EAC/BK,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC;IACpBC,QAAQ,EAAEd,SAAS,CAACI,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5CD,IAAI,EAAEH,SAAS,CAACI,KAAK,CAACW,KAAA,CAAKd,KAAK,CAAC;EACnC,CAAC,CAAC;EACFe,OAAO,EAAEhB,SAAS,CAACiB,IAAI;EACvBC,IAAI,EAAElB,SAAS,CAACa,KAAK,CAAC;IACpBM,IAAI,EAAEnB,SAAS,CAACO,MAAM;IACtBa,QAAQ,EAAEpB,SAAS,CAACqB,IAAI;IACxBC,MAAM,EAAEtB,SAAS,CAACI,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;EAChE,CAAC,CAAC;EACFmB,oBAAoB,EAAEvB,SAAS,CAACO,MAAM;EACtCiB,UAAU,EAAExB,SAAS,CAACO,MAAM;EAC5BkB,QAAQ,EAAEzB,SAAS,CAACqB,IAAI;EACxBK,SAAS,EAAE1B,SAAS,CAACO,MAAM;EAC3BoB,WAAW,EAAE3B,SAAS,CAACa,KAAK,CAAC,CAAC,CAAC,CAAC;EAChCe,iBAAiB,EAAE5B,SAAS,CAACqB;AAC/B,CAAC;AA4CD,eAAenB,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ICONS","propTypes","type","oneOf","usage","label","string","content","node","tooltipText","tooltipPlacement","icon","shape","position","_keys","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 tooltipText: PropTypes.string,\n tooltipPlacement: PropTypes.oneOf(['left', 'right', 'top', 'bottom']),\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 tooltipText?: string;\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom';\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,SAAS,MAAM,YAAY;AAElC,SAAQC,KAAK,QAAO,yBAAyB;AAE7C,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAEH,SAAS,CAACI,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;EAChFC,KAAK,EAAEL,SAAS,CAACI,KAAK,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;EACrDE,KAAK,EAAEN,SAAS,CAACO,MAAM;EACvBC,OAAO,EAAER,SAAS,CAACS,IAAI;EACvB,YAAY,EAAET,SAAS,CAACO,MAAM;EAC9BG,WAAW,EAAEV,SAAS,CAACO,MAAM;EAC7BI,gBAAgB,EAAEX,SAAS,CAACI,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;EACrE,WAAW,EAAEJ,SAAS,CAACO,MAAM;EAC7B,aAAa,EAAEP,SAAS,CAACO,MAAM;EAC/BK,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC;IACpBC,QAAQ,EAAEd,SAAS,CAACI,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5CD,IAAI,EAAEH,SAAS,CAACI,KAAK,CAACW,KAAA,CAAKd,KAAK,CAAC;EACnC,CAAC,CAAC;EACFe,OAAO,EAAEhB,SAAS,CAACiB,IAAI;EACvBC,IAAI,EAAElB,SAAS,CAACa,KAAK,CAAC;IACpBM,IAAI,EAAEnB,SAAS,CAACO,MAAM;IACtBa,QAAQ,EAAEpB,SAAS,CAACqB,IAAI;IACxBC,MAAM,EAAEtB,SAAS,CAACI,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;EAChE,CAAC,CAAC;EACFmB,oBAAoB,EAAEvB,SAAS,CAACO,MAAM;EACtCiB,UAAU,EAAExB,SAAS,CAACO,MAAM;EAC5BkB,QAAQ,EAAEzB,SAAS,CAACqB,IAAI;EACxBK,SAAS,EAAE1B,SAAS,CAACO,MAAM;EAC3BoB,WAAW,EAAE3B,SAAS,CAACa,KAAK,CAAC,CAAC,CAAC;AACjC,CAAC;AA2CD,eAAeX,SAAS","ignoreList":[]}
@@ -46,14 +46,14 @@
46
46
  composes: button;
47
47
  width: 44px;
48
48
  height: 44px;
49
- border-radius: 12px;
49
+ border-radius: 7px;
50
50
  }
51
51
 
52
52
  .responsive {
53
53
  composes: button;
54
54
  width: 44px;
55
55
  height: 44px;
56
- border-radius: 12px;
56
+ border-radius: 7px;
57
57
  }
58
58
 
59
59
  .responsive .icon {
@@ -9,21 +9,6 @@ declare const ButtonMenu: {
9
9
  label: import("prop-types").Validator<string>;
10
10
  onClick: import("prop-types").Validator<(...args: any[]) => any>;
11
11
  type: import("prop-types").Requireable<string>;
12
- linkType: import("prop-types").Requireable<string>;
13
- icon: import("prop-types").Requireable<import("prop-types").InferProps<{
14
- position: import("prop-types").Validator<string>;
15
- type: import("prop-types").Requireable<string>;
16
- faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
17
- name: import("prop-types").Validator<string>;
18
- size: import("prop-types").Requireable<number>;
19
- color: import("prop-types").Requireable<string>;
20
- }>>;
21
- }>>;
22
- customStyle: import("prop-types").Requireable<import("prop-types").InferProps<{
23
- color: import("prop-types").Requireable<string>;
24
- hoverBackgroundColor: import("prop-types").Requireable<string>;
25
- }>>;
26
- isCustomSkillMenu: import("prop-types").Requireable<boolean>;
27
12
  }> | null | undefined)[]>;
28
13
  'data-name': import("prop-types").Requireable<string>;
29
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AA8EjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAIA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAiCjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;CAazC,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -2,53 +2,19 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
2
2
  import React, { useMemo, useCallback } from 'react';
3
3
  import map from 'lodash/fp/map';
4
4
  import classnames from 'classnames';
5
- import ButtonLink from '../button-link';
6
5
  import style from './style.css';
7
6
  import propTypes, { buttonPropTypes } from './types';
8
- const getIconProps = icon => {
9
- if (!icon) return undefined;
10
- return icon.faIcon ? {
11
- faIcon: {
12
- name: icon.faIcon.name,
13
- size: icon.faIcon.size,
14
- color: icon.faIcon.color
15
- },
16
- position: icon.position
17
- } : {
18
- type: icon.type,
19
- position: icon.position
20
- };
21
- };
22
7
  const Button = props => {
23
8
  const {
24
9
  'data-name': dataName,
25
10
  disabled,
26
11
  label,
27
12
  onClick,
28
- type = 'default',
29
- linkType,
30
- icon,
31
- customStyle,
32
- isCustomSkillMenu
13
+ type = 'default'
33
14
  } = props;
34
- const styleButton = classnames(style.button, type === 'default' && style.default, type === 'defaultLeft' && style.defaultLeft, type === 'dangerous' && style.dangerous, type === 'dangerousLeft' && style.dangerousLeft, disabled && style.disabled, isCustomSkillMenu && style.customSkillButton);
15
+ const styleButton = classnames(style.button, type === 'default' && style.default, type === 'defaultLeft' && style.defaultLeft, type === 'dangerous' && style.dangerous, type === 'dangerousLeft' && style.dangerousLeft, disabled && style.disabled);
35
16
  const handleOnClick = useCallback(() => onClick(), [onClick]);
36
- const iconProps = useMemo(() => getIconProps(icon), [icon]);
37
- return icon ? /*#__PURE__*/React.createElement(ButtonLink, {
38
- label: label,
39
- type: linkType,
40
- disabled: disabled,
41
- onClick: handleOnClick,
42
- "data-name": dataName,
43
- className: styleButton,
44
- customStyle: {
45
- color: customStyle?.color
46
- },
47
- hoverBackgroundColor: customStyle?.hoverBackgroundColor,
48
- hoverColor: customStyle?.color,
49
- icon: iconProps,
50
- isCustomSkillMenu: isCustomSkillMenu
51
- }) : /*#__PURE__*/React.createElement("button", {
17
+ return /*#__PURE__*/React.createElement("button", {
52
18
  type: "button",
53
19
  "aria-label": label,
54
20
  title: label,
@@ -66,8 +32,7 @@ Button.propTypes = process.env.NODE_ENV !== "production" ? buttonPropTypes : {};
66
32
  const ButtonMenu = props => {
67
33
  const {
68
34
  buttons,
69
- 'data-name': dataName,
70
- isCustomSkillMenu
35
+ 'data-name': dataName
71
36
  } = props;
72
37
  const buildButton = useCallback((button, index) => {
73
38
  return /*#__PURE__*/React.createElement(Button, _extends({}, button, {
@@ -80,10 +45,7 @@ const ButtonMenu = props => {
80
45
  cap: false
81
46
  })(buildButton, buttons), [buttons, buildButton]);
82
47
  return /*#__PURE__*/React.createElement("div", {
83
- "data-name": dataName,
84
- className: classnames({
85
- [style.buttonMenuContainer]: isCustomSkillMenu
86
- })
48
+ "data-name": dataName
87
49
  }, buttonList);
88
50
  };
89
51
  ButtonMenu.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","useCallback","map","classnames","ButtonLink","style","propTypes","buttonPropTypes","getIconProps","icon","undefined","faIcon","name","size","color","position","type","Button","props","dataName","disabled","label","onClick","linkType","customStyle","isCustomSkillMenu","styleButton","button","default","defaultLeft","dangerous","dangerousLeft","customSkillButton","handleOnClick","iconProps","createElement","className","hoverBackgroundColor","hoverColor","title","buttonContent","process","env","NODE_ENV","ButtonMenu","buttons","buildButton","index","_extends","key","buttonList","convert","cap","buttonMenuContainer"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport ButtonLink from '../button-link';\nimport {IconType} from '../button-link/types';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\n\nconst getIconProps = (icon: IconType | undefined) => {\n if (!icon) return undefined;\n return icon.faIcon\n ? {\n faIcon: {\n name: icon.faIcon.name,\n size: icon.faIcon.size,\n color: icon.faIcon.color\n },\n position: icon.position\n }\n : {\n type: icon.type,\n position: icon.position\n };\n};\n\nconst Button = (props: ButtonProps) => {\n const {\n 'data-name': dataName,\n disabled,\n label,\n onClick,\n type = 'default',\n linkType,\n icon,\n customStyle,\n isCustomSkillMenu\n } = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.default,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled,\n isCustomSkillMenu && style.customSkillButton\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const iconProps = useMemo(() => getIconProps(icon), [icon]);\n\n return icon ? (\n <ButtonLink\n label={label}\n type={linkType}\n disabled={disabled}\n onClick={handleOnClick}\n data-name={dataName}\n className={styleButton}\n customStyle={{color: customStyle?.color}}\n hoverBackgroundColor={customStyle?.hoverBackgroundColor}\n hoverColor={customStyle?.color}\n icon={iconProps}\n isCustomSkillMenu={isCustomSkillMenu}\n />\n ) : (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n disabled={disabled}\n >\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n </button>\n );\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName, isCustomSkillMenu} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return (\n <div\n data-name={dataName}\n className={classnames({\n [style.buttonMenuContainer]: isCustomSkillMenu\n })}\n >\n {buttonList}\n </div>\n );\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,WAAW,QAAO,OAAO;AACjD,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,UAAU,MAAM,gBAAgB;AAEvC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,IAAiCC,eAAe,QAAO,SAAS;AAEhF,MAAMC,YAAY,GAAIC,IAA0B,IAAK;EACnD,IAAI,CAACA,IAAI,EAAE,OAAOC,SAAS;EAC3B,OAAOD,IAAI,CAACE,MAAM,GACd;IACEA,MAAM,EAAE;MACNC,IAAI,EAAEH,IAAI,CAACE,MAAM,CAACC,IAAI;MACtBC,IAAI,EAAEJ,IAAI,CAACE,MAAM,CAACE,IAAI;MACtBC,KAAK,EAAEL,IAAI,CAACE,MAAM,CAACG;IACrB,CAAC;IACDC,QAAQ,EAAEN,IAAI,CAACM;EACjB,CAAC,GACD;IACEC,IAAI,EAAEP,IAAI,CAACO,IAAI;IACfD,QAAQ,EAAEN,IAAI,CAACM;EACjB,CAAC;AACP,CAAC;AAED,MAAME,MAAM,GAAIC,KAAkB,IAAK;EACrC,MAAM;IACJ,WAAW,EAAEC,QAAQ;IACrBC,QAAQ;IACRC,KAAK;IACLC,OAAO;IACPN,IAAI,GAAG,SAAS;IAChBO,QAAQ;IACRd,IAAI;IACJe,WAAW;IACXC;EACF,CAAC,GAAGP,KAAK;EACT,MAAMQ,WAAW,GAAGvB,UAAU,CAC5BE,KAAK,CAACsB,MAAM,EACZX,IAAI,KAAK,SAAS,IAAIX,KAAK,CAACuB,O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B;EAAM,GAAEA,KAAY,CACxC,CACC,CACT;AACH,CAAC;AAEDJ,MAAM,CAACX,SAAS,GAAAmC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGpC,eAAe;AAElC,MAAMqC,UAAU,GAAI1B,KAAsB,IAAK;EAC7C,MAAM;IAAC2B,OAAO;IAAE,WAAW,EAAE1B,QAAQ;IAAEM;EAAiB,CAAC,GAAGP,KAAK;EACjE,MAAM4B,WAAW,GAAG7C,WAAW,CAAC,CAAC0B,MAAmB,EAAEoB,KAAK,KAAK;IAC9D,oBAAOhD,KAAA,CAAAoC,aAAA,CAAClB,MAAM,EAAA+B,QAAA,KAAKrB,MAAM;MAAEsB,GAAG,EAAEtB,MAAM,CAACN,KAAK,GAAG0B;IAAM,EAAE,CAAC;EAC1D,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,UAAU,GAAGlD,OAAO;EACxB;EACA,MAAME,GAAG,CAACiD,OAAO,CAAC;IAACC,GAAG,EAAE;EAAK,CAAC,CAAC,CAACN,WAAW,EAAED,OAAO,CAAC,EACrD,CAACA,OAAO,EAAEC,WAAW,CACvB,CAAC;EAED,oBACE/C,KAAA,CAAAoC,aAAA;IACE,aAAWhB,QAAS;IACpBiB,SAAS,EAAEjC,UAAU,CAAC;MACpB,CAACE,KAAK,CAACgD,mBAAmB,GAAG5B;IAC/B,CAAC;EAAE,GAEFyB,UACE,CAAC;AAEV,CAAC;AAEDN,UAAU,CAACtC,SAAS,GAAAmC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrC,SAAS;AAEhC,eAAesC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","useCallback","map","classnames","style","propTypes","buttonPropTypes","Button","props","dataName","disabled","label","onClick","type","styleButton","button","default","defaultLeft","dangerous","dangerousLeft","handleOnClick","createElement","title","className","buttonContent","process","env","NODE_ENV","ButtonMenu","buttons","buildButton","index","_extends","key","buttonList","convert","cap"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\n\nconst Button = (props: ButtonProps) => {\n const {'data-name': dataName, disabled, label, onClick, type = 'default'} = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.default,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n disabled={disabled}\n >\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n </button>\n );\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return <div data-name={dataName}>{buttonList}</div>;\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,WAAW,QAAO,OAAO;AACjD,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,IAAiCC,eAAe,QAAO,SAAS;AAEhF,MAAMC,MAAM,GAAIC,KAAkB,IAAK;EACrC,MAAM;IAAC,WAAW,EAAEC,QAAQ;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,OAAO;IAAEC,IAAI,GAAG;EAAS,CAAC,GAAGL,KAAK;EACjF,MAAMM,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AAMG,UAAU,GAAGlC,OAAO;EACxB;EACA,MAAME,GAAG,CAACiC,OAAO,CAAC;IAACC,GAAG,EAAE;EAAK,CAAC,CAAC,CAACN,WAAW,EAAED,OAAO,CAAC,EACrD,CAACA,OAAO,EAAEC,WAAW,CACvB,CAAC;EAED,oBAAO/B,KAAA,CAAAsB,aAAA;IAAK,aAAWZ;EAAS,GAAEyB,UAAgB,CAAC;AACrD,CAAC;AAEDN,UAAU,CAACvB,SAAS,GAAAoB,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGtB,SAAS;AAEhC,eAAeuB,UAAU","ignoreList":[]}
@@ -59,16 +59,3 @@
59
59
  composes: dangerous;
60
60
  justify-content: flex-start;
61
61
  }
62
-
63
- .customSkillButton {
64
- background-color: transparent;
65
- font-weight: 600;
66
- width: 201px;
67
- justify-content: flex-start;
68
- }
69
-
70
- .buttonMenuContainer {
71
- display: flex;
72
- flex-direction: column;
73
- gap: 8px;
74
- }
@@ -1,26 +1,10 @@
1
1
  import PropTypes from 'prop-types';
2
- import { ButtonLinkProps, IconType } from '../button-link/types';
3
2
  export declare const buttonPropTypes: {
4
3
  'data-name': PropTypes.Requireable<string>;
5
4
  disabled: PropTypes.Requireable<boolean>;
6
5
  label: PropTypes.Validator<string>;
7
6
  onClick: PropTypes.Validator<(...args: any[]) => any>;
8
7
  type: PropTypes.Requireable<string>;
9
- linkType: PropTypes.Requireable<string>;
10
- icon: PropTypes.Requireable<PropTypes.InferProps<{
11
- position: PropTypes.Validator<string>;
12
- type: PropTypes.Requireable<string>;
13
- faIcon: PropTypes.Requireable<PropTypes.InferProps<{
14
- name: PropTypes.Validator<string>;
15
- size: PropTypes.Requireable<number>;
16
- color: PropTypes.Requireable<string>;
17
- }>>;
18
- }>>;
19
- customStyle: PropTypes.Requireable<PropTypes.InferProps<{
20
- color: PropTypes.Requireable<string>;
21
- hoverBackgroundColor: PropTypes.Requireable<string>;
22
- }>>;
23
- isCustomSkillMenu: PropTypes.Requireable<boolean>;
24
8
  };
25
9
  declare const propTypes: {
26
10
  buttons: PropTypes.Validator<(PropTypes.InferProps<{
@@ -29,45 +13,21 @@ declare const propTypes: {
29
13
  label: PropTypes.Validator<string>;
30
14
  onClick: PropTypes.Validator<(...args: any[]) => any>;
31
15
  type: PropTypes.Requireable<string>;
32
- linkType: PropTypes.Requireable<string>;
33
- icon: PropTypes.Requireable<PropTypes.InferProps<{
34
- position: PropTypes.Validator<string>;
35
- type: PropTypes.Requireable<string>;
36
- faIcon: PropTypes.Requireable<PropTypes.InferProps<{
37
- name: PropTypes.Validator<string>;
38
- size: PropTypes.Requireable<number>;
39
- color: PropTypes.Requireable<string>;
40
- }>>;
41
- }>>;
42
- customStyle: PropTypes.Requireable<PropTypes.InferProps<{
43
- color: PropTypes.Requireable<string>;
44
- hoverBackgroundColor: PropTypes.Requireable<string>;
45
- }>>;
46
- isCustomSkillMenu: PropTypes.Requireable<boolean>;
47
16
  }> | null | undefined)[]>;
48
17
  'data-name': PropTypes.Requireable<string>;
49
18
  };
50
19
  export default propTypes;
51
- declare type CustomStyleProps = {
52
- color?: string;
53
- hoverBackgroundColor?: string;
54
- };
55
20
  export declare type ButtonProps = {
56
21
  'data-name'?: string;
57
22
  disabled?: boolean;
58
23
  label: string;
59
24
  onClick: () => void;
60
25
  type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';
61
- linkType?: ButtonLinkProps['type'];
62
- icon?: IconType;
63
- customStyle?: CustomStyleProps;
64
- isCustomSkillMenu?: boolean;
65
26
  };
66
27
  export declare type ButtonMenuProps = {
67
28
  buttons: ButtonProps[];
68
29
  'data-name'?: string;
69
30
  'aria-label'?: string;
70
- isCustomSkillMenu?: boolean;
71
31
  };
72
32
  export declare type ButtonMenuPropsFixture = {
73
33
  props: ButtonMenuProps;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,C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S,CAAC;AAEzB,oBAAY,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;CAClE,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
@@ -4,22 +4,7 @@ export const buttonPropTypes = {
4
4
  disabled: PropTypes.bool,
5
5
  label: PropTypes.string.isRequired,
6
6
  onClick: PropTypes.func.isRequired,
7
- type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft']),
8
- linkType: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),
9
- icon: PropTypes.shape({
10
- position: PropTypes.oneOf(['right', 'left']).isRequired,
11
- type: PropTypes.string,
12
- faIcon: PropTypes.shape({
13
- name: PropTypes.string.isRequired,
14
- size: PropTypes.number,
15
- color: PropTypes.string
16
- })
17
- }),
18
- customStyle: PropTypes.shape({
19
- color: PropTypes.string,
20
- hoverBackgroundColor: PropTypes.string
21
- }),
22
- isCustomSkillMenu: PropTypes.bool
7
+ type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft'])
23
8
  };
24
9
  const propTypes = {
25
10
  buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,