@coorpacademy/components 11.33.3-alpha.12 → 11.33.3

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 (146) hide show
  1. package/es/atom/button-link/index.d.ts +0 -1
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +7 -11
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/atom/button-link/style.css +0 -10
  6. package/es/atom/button-link/types.d.ts +0 -2
  7. package/es/atom/button-link/types.d.ts.map +1 -1
  8. package/es/atom/button-link/types.js +1 -2
  9. package/es/atom/button-link/types.js.map +1 -1
  10. package/es/atom/button-link-icon/style.css +2 -2
  11. package/es/atom/button-menu/index.d.ts +0 -15
  12. package/es/atom/button-menu/index.d.ts.map +1 -1
  13. package/es/atom/button-menu/index.js +5 -43
  14. package/es/atom/button-menu/index.js.map +1 -1
  15. package/es/atom/button-menu/style.css +0 -13
  16. package/es/atom/button-menu/types.d.ts +0 -40
  17. package/es/atom/button-menu/types.d.ts.map +1 -1
  18. package/es/atom/button-menu/types.js +1 -16
  19. package/es/atom/button-menu/types.js.map +1 -1
  20. package/es/atom/tag/style.css +6 -10
  21. package/es/molecule/bullet-point-menu-button/index.d.ts +0 -16
  22. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  23. package/es/molecule/bullet-point-menu-button/index.js +3 -5
  24. package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
  25. package/es/molecule/bullet-point-menu-button/style.css +7 -26
  26. package/es/molecule/bullet-point-menu-button/types.d.ts +0 -17
  27. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  28. package/es/molecule/bullet-point-menu-button/types.js +1 -2
  29. package/es/molecule/bullet-point-menu-button/types.js.map +1 -1
  30. package/es/molecule/cm-popin/types.d.ts +0 -34
  31. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  32. package/es/molecule/expandible-actionable-table/index.d.ts +0 -33
  33. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  34. package/es/molecule/expandible-actionable-table/types.d.ts +0 -33
  35. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  36. package/es/organism/list-items/index.d.ts +0 -34
  37. package/es/organism/setup-header/index.d.ts +0 -4
  38. package/es/organism/wizard-contents/index.d.ts +0 -35
  39. package/es/template/app-player/loading/index.d.ts +0 -34
  40. package/es/template/app-player/player/index.d.ts +0 -68
  41. package/es/template/app-player/player/slides/index.d.ts +0 -34
  42. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  43. package/es/template/app-player/popin-correction/index.d.ts +0 -34
  44. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  45. package/es/template/app-player/popin-end/index.d.ts +0 -34
  46. package/es/template/app-review/index.d.ts +0 -34
  47. package/es/template/app-review/index.d.ts.map +1 -1
  48. package/es/template/app-review/player/prop-types.d.ts +0 -34
  49. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  50. package/es/template/app-review/prop-types.d.ts +0 -34
  51. package/es/template/app-review/prop-types.d.ts.map +1 -1
  52. package/es/template/back-office/brand-create/index.d.ts +0 -4
  53. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  54. package/es/template/back-office/brand-list/index.d.ts +0 -4
  55. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  56. package/es/template/back-office/brand-update/index.d.ts +0 -107
  57. package/es/template/back-office/dashboard-preview/index.d.ts +0 -4
  58. package/es/template/back-office/layout/index.d.ts +0 -4
  59. package/es/template/back-office/layout/index.d.ts.map +1 -1
  60. package/es/template/common/dashboard/index.d.ts +0 -68
  61. package/es/template/common/search-page/index.d.ts +0 -34
  62. package/es/template/external-course/index.d.ts +0 -34
  63. package/es/variables/colors.css +0 -3
  64. package/lib/atom/button-link/index.d.ts +0 -1
  65. package/lib/atom/button-link/index.d.ts.map +1 -1
  66. package/lib/atom/button-link/index.js +7 -11
  67. package/lib/atom/button-link/index.js.map +1 -1
  68. package/lib/atom/button-link/style.css +0 -10
  69. package/lib/atom/button-link/types.d.ts +0 -2
  70. package/lib/atom/button-link/types.d.ts.map +1 -1
  71. package/lib/atom/button-link/types.js +1 -2
  72. package/lib/atom/button-link/types.js.map +1 -1
  73. package/lib/atom/button-link-icon/style.css +2 -2
  74. package/lib/atom/button-menu/index.d.ts +0 -15
  75. package/lib/atom/button-menu/index.d.ts.map +1 -1
  76. package/lib/atom/button-menu/index.js +5 -43
  77. package/lib/atom/button-menu/index.js.map +1 -1
  78. package/lib/atom/button-menu/style.css +0 -13
  79. package/lib/atom/button-menu/types.d.ts +0 -40
  80. package/lib/atom/button-menu/types.d.ts.map +1 -1
  81. package/lib/atom/button-menu/types.js +1 -16
  82. package/lib/atom/button-menu/types.js.map +1 -1
  83. package/lib/atom/tag/style.css +6 -10
  84. package/lib/molecule/bullet-point-menu-button/index.d.ts +0 -16
  85. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  86. package/lib/molecule/bullet-point-menu-button/index.js +3 -5
  87. package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
  88. package/lib/molecule/bullet-point-menu-button/style.css +7 -26
  89. package/lib/molecule/bullet-point-menu-button/types.d.ts +0 -17
  90. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  91. package/lib/molecule/bullet-point-menu-button/types.js +1 -2
  92. package/lib/molecule/bullet-point-menu-button/types.js.map +1 -1
  93. package/lib/molecule/cm-popin/types.d.ts +0 -34
  94. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  95. package/lib/molecule/expandible-actionable-table/index.d.ts +0 -33
  96. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  97. package/lib/molecule/expandible-actionable-table/types.d.ts +0 -33
  98. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  99. package/lib/organism/list-items/index.d.ts +0 -34
  100. package/lib/organism/setup-header/index.d.ts +0 -4
  101. package/lib/organism/wizard-contents/index.d.ts +0 -35
  102. package/lib/template/app-player/loading/index.d.ts +0 -34
  103. package/lib/template/app-player/player/index.d.ts +0 -68
  104. package/lib/template/app-player/player/slides/index.d.ts +0 -34
  105. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  106. package/lib/template/app-player/popin-correction/index.d.ts +0 -34
  107. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  108. package/lib/template/app-player/popin-end/index.d.ts +0 -34
  109. package/lib/template/app-review/index.d.ts +0 -34
  110. package/lib/template/app-review/index.d.ts.map +1 -1
  111. package/lib/template/app-review/player/prop-types.d.ts +0 -34
  112. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  113. package/lib/template/app-review/prop-types.d.ts +0 -34
  114. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  115. package/lib/template/back-office/brand-create/index.d.ts +0 -4
  116. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  117. package/lib/template/back-office/brand-list/index.d.ts +0 -4
  118. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  119. package/lib/template/back-office/brand-update/index.d.ts +0 -107
  120. package/lib/template/back-office/dashboard-preview/index.d.ts +0 -4
  121. package/lib/template/back-office/layout/index.d.ts +0 -4
  122. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  123. package/lib/template/common/dashboard/index.d.ts +0 -68
  124. package/lib/template/common/search-page/index.d.ts +0 -34
  125. package/lib/template/external-course/index.d.ts +0 -34
  126. package/lib/variables/colors.css +0 -3
  127. package/package.json +3 -3
  128. package/es/organism/custom-skill-header/index.d.ts +0 -5
  129. package/es/organism/custom-skill-header/index.d.ts.map +0 -1
  130. package/es/organism/custom-skill-header/index.js +0 -88
  131. package/es/organism/custom-skill-header/index.js.map +0 -1
  132. package/es/organism/custom-skill-header/style.css +0 -54
  133. package/es/organism/custom-skill-header/types.d.ts +0 -28
  134. package/es/organism/custom-skill-header/types.d.ts.map +0 -1
  135. package/es/organism/custom-skill-header/types.js +0 -2
  136. package/es/organism/custom-skill-header/types.js.map +0 -1
  137. package/lib/organism/custom-skill-header/index.d.ts +0 -5
  138. package/lib/organism/custom-skill-header/index.d.ts.map +0 -1
  139. package/lib/organism/custom-skill-header/index.js +0 -93
  140. package/lib/organism/custom-skill-header/index.js.map +0 -1
  141. package/lib/organism/custom-skill-header/style.css +0 -54
  142. package/lib/organism/custom-skill-header/types.d.ts +0 -28
  143. package/lib/organism/custom-skill-header/types.d.ts.map +0 -1
  144. package/lib/organism/custom-skill-header/types.js +0 -4
  145. package/lib/organism/custom-skill-header/types.js.map +0 -1
  146. package/locales/.mtslconfig.json +0 -1
@@ -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;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":[]}
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,UAA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C;AAEb,CAAC;AAED9B,UAAU,CAAC3B,SAAS,GAAAsE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGxE,SAAS;AAEhC,eAAe2B,UAAU","ignoreList":[]}
@@ -109,14 +109,4 @@
109
109
  font-size: 12px;
110
110
  font-weight: 500;
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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CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,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,CAA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AAC,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,GAA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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,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IAC9D,oBAAOhC,KAAA,CAAAsB,aAAA,CAACd,MAAM,EAAAyB,QAAA,KAAKjB,MAAM;MAAEkB,GAAG,EAAElB,MAAM,CAACJ,KAAK,GAAGoB;IAAM,EAAE,CAAC;EAC1D,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,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,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAE/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAqB3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,aAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,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;IACjE,QAAQ,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;CAGd,CAAC;AAEF,eAAe,SAAS,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,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","buttonPropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","linkType","icon","shape","position","faIcon","name","size","number","color","customStyle","hoverBackgroundColor","isCustomSkillMenu","propTypes","buttons","arrayOf"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps, IconType} from '../button-link/types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft']),\n linkType: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']).isRequired,\n type: PropTypes.string,\n faIcon: PropTypes.shape({\n name: PropTypes.string.isRequired,\n size: PropTypes.number,\n color: PropTypes.string\n })\n }),\n customStyle: PropTypes.shape({\n color: PropTypes.string,\n hoverBackgroundColor: PropTypes.string\n }),\n isCustomSkillMenu: PropTypes.bool\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string\n};\n\nexport default propTypes;\n\ntype CustomStyleProps = {\n color?: string;\n hoverBackgroundColor?: string;\n};\n\nexport type ButtonProps = {\n 'data-name'?: string;\n disabled?: boolean;\n label: string;\n onClick: () => void;\n type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';\n linkType?: ButtonLinkProps['type'];\n icon?: IconType;\n customStyle?: CustomStyleProps;\n isCustomSkillMenu?: boolean;\n};\n\nexport type ButtonMenuProps = {\n buttons: ButtonProps[];\n 'data-name'?: string;\n 'aria-label'?: string;\n isCustomSkillMenu?: boolean;\n};\n\nexport type ButtonMenuPropsFixture = {props: ButtonM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eqB,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","buttonPropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","propTypes","buttons","arrayOf","shape"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft'])\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string\n};\n\nexport default propTypes;\n\nexport type ButtonProps = {\n 'data-name'?: string;\n disabled?: boolean;\n label: string;\n onClick: () => void;\n type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';\n};\n\nexport type ButtonMenuProps = {\n buttons: ButtonProps[];\n 'data-name'?: string;\n 'aria-label'?: string;\n};\n\nexport type ButtonMenuPropsFixture = {props: ButtonMenuProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,OAAO,MAAMC,eAAe,GAAG;EAC7B,WAAW,EAAED,SAAS,CAACE,MAAM;EAC7BC,QAAQ,EAAEH,SAAS,CAACI,IAAI;EACxBC,KAAK,EAAEL,SAAS,CAACE,MAAM,CAACI,UAAU;EAClCC,OAAO,EAAEP,SAAS,CAACQ,IAAI,CAACF,UAAU;EAClCG,IAAI,EAAET,SAAS,CAACU,KAAK,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC;AAChF,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBC,OAAO,EAAEZ,SAAS,CAACa,OAAO,CAACb,SAAS,CAACc,KAAK,CAACb,eAAe,CAAC,CAAC,CAACK,UAAU;EACvE,WAAW,EAAEN,SAAS,CAACE;AACzB,CAAC;AAED,eAAeS,SAAS","ignoreList":[]}
@@ -1,13 +1,9 @@
1
1
  @value colors: "../../variables/colors.css";
2
2
  @value white from colors;
3
- @value cm_yellow_100 from colors;
4
3
  @value cm_yellow_200 from colors;
5
- @value cm_yellow_300 from colors;
6
4
  @value cm_positive_100 from colors;
7
- @value cm_positive_300 from colors;
8
5
  @value cm_negative_100 from colors;
9
6
  @value cm_orange_700 from colors;
10
- @value cm_orange_800 from colors;
11
7
  @value black from colors;
12
8
  @value cm_grey_100 from colors;
13
9
  @value cm_grey_500 from colors;
@@ -47,14 +43,14 @@
47
43
 
48
44
  .progress {
49
45
  composes: tag;
50
- background-color: color(cm_yellow_100 a(25%));
51
- color: cm_yellow_300;
46
+ background-color: color(cm_yellow_200 a(15%));
47
+ color: cm_yellow_200;
52
48
  }
53
49
 
54
50
  .success {
55
51
  composes: tag;
56
- background-color: color(cm_positive_100 a(20%));
57
- color: cm_positive_300;
52
+ background-color: color(cm_positive_100 a(15%));
53
+ color: cm_positive_100;
58
54
  }
59
55
 
60
56
  .failure {
@@ -65,8 +61,8 @@
65
61
 
66
62
  .warning {
67
63
  composes: tag;
68
- background-color: color(cm_orange_700 a(18%));
69
- color: cm_orange_800;
64
+ background-color: color(cm_orange_700 a(15%));
65
+ color: cm_orange_700;
70
66
  }
71
67
 
72
68
  .content {
@@ -12,26 +12,10 @@ declare const BulletPointMenuButton: {
12
12
  label: import("prop-types").Validator<string>;
13
13
  onClick: import("prop-types").Validator<(...args: any[]) => any>;
14
14
  type: import("prop-types").Requireable<string>;
15
- linkType: import("prop-types").Requireable<string>;
16
- icon: import("prop-types").Requireable<import("prop-types").InferProps<{
17
- position: import("prop-types").Validator<string>;
18
- type: import("prop-types").Requireable<string>;
19
- faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
20
- name: import("prop-types").Validator<string>;
21
- size: import("prop-types").Requireable<number>;
22
- color: import("prop-types").Requireable<string>;
23
- }>>;
24
- }>>;
25
- customStyle: import("prop-types").Requireable<import("prop-types").InferProps<{
26
- color: import("prop-types").Requireable<string>;
27
- hoverBackgroundColor: import("prop-types").Requireable<string>;
28
- }>>;
29
- isCustomSkillMenu: import("prop-types").Requireable<boolean>;
30
15
  }> | null | undefined)[]>;
31
16
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
32
17
  menuButtonClassName: import("prop-types").Requireable<string>;
33
18
  isBulkMenu: import("prop-types").Requireable<boolean>;
34
- isCustomSkillMenu: import("prop-types").Requireable<boolean>;
35
19
  };
36
20
  };
37
21
  export default BulletPointMenuButton;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAG9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D/D,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAG9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;CA2D/D,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
@@ -13,8 +13,7 @@ const BulletPointMenuButton = props => {
13
13
  onClick = _noop,
14
14
  buttons,
15
15
  menuButtonClassName,
16
- isBulkMenu,
17
- isCustomSkillMenu
16
+ isBulkMenu
18
17
  } = props;
19
18
  const [visible, setVisible] = useState(false);
20
19
  const handleOnClick = useCallback(() => {
@@ -30,11 +29,10 @@ const BulletPointMenuButton = props => {
30
29
  }, []);
31
30
  const menuProps = {
32
31
  'data-name': 'button-menu',
33
- buttons,
34
- isCustomSkillMenu
32
+ buttons
35
33
  };
36
34
  const menu = /*#__PURE__*/React.createElement("div", {
37
- className: classnames(style.bulletPointMenu, isBulkMenu && style.bulkBulletPointMenu, visible && style.visible, isCustomSkillMenu && style.customSkillBulletPointMenu),
35
+ className: classnames(style.bulletPointMenu, isBulkMenu && style.bulkBulletPointMenu, visible && style.visible),
38
36
  "data-name": "menu-wrapper",
39
37
  "aria-label": menuAriaLabel
40
38
  }, /*#__PURE__*/React.createElement(ButtonMenu, menuProps));