@coorpacademy/components 11.13.2 → 11.13.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 (60) hide show
  1. package/es/atom/button-link/index.d.ts +2 -0
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +18 -9
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/atom/tooltip/index.d.ts +5 -1
  6. package/es/atom/tooltip/index.d.ts.map +1 -1
  7. package/es/atom/tooltip/index.js +36 -18
  8. package/es/atom/tooltip/index.js.map +1 -1
  9. package/es/atom/tooltip/style.css +1 -1
  10. package/es/molecule/brand-form-group/index.d.ts +2 -0
  11. package/es/molecule/review-correction-popin/index.d.ts.map +1 -1
  12. package/es/molecule/review-correction-popin/index.js +38 -14
  13. package/es/molecule/review-correction-popin/index.js.map +1 -1
  14. package/es/molecule/review-correction-popin/style.css +11 -53
  15. package/es/organism/brand-form/index.d.ts +2 -0
  16. package/es/organism/list-items/index.d.ts +2 -0
  17. package/es/organism/setup-header/index.d.ts +8 -0
  18. package/es/organism/wizard-contents/index.d.ts +2 -0
  19. package/es/template/activity/engine-stars.d.ts.map +1 -1
  20. package/es/template/activity/engine-stars.js +2 -1
  21. package/es/template/activity/engine-stars.js.map +1 -1
  22. package/es/template/back-office/brand-create/index.d.ts +8 -0
  23. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  24. package/es/template/back-office/brand-list/index.d.ts +8 -0
  25. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  26. package/es/template/back-office/brand-update/index.d.ts +14 -0
  27. package/es/template/back-office/dashboard-preview/index.d.ts +8 -0
  28. package/es/template/back-office/layout/index.d.ts +8 -0
  29. package/es/template/back-office/layout/index.d.ts.map +1 -1
  30. package/lib/atom/button-link/index.d.ts +2 -0
  31. package/lib/atom/button-link/index.d.ts.map +1 -1
  32. package/lib/atom/button-link/index.js +18 -9
  33. package/lib/atom/button-link/index.js.map +1 -1
  34. package/lib/atom/tooltip/index.d.ts +5 -1
  35. package/lib/atom/tooltip/index.d.ts.map +1 -1
  36. package/lib/atom/tooltip/index.js +38 -18
  37. package/lib/atom/tooltip/index.js.map +1 -1
  38. package/lib/atom/tooltip/style.css +1 -1
  39. package/lib/molecule/brand-form-group/index.d.ts +2 -0
  40. package/lib/molecule/review-correction-popin/index.d.ts.map +1 -1
  41. package/lib/molecule/review-correction-popin/index.js +44 -14
  42. package/lib/molecule/review-correction-popin/index.js.map +1 -1
  43. package/lib/molecule/review-correction-popin/style.css +11 -53
  44. package/lib/organism/brand-form/index.d.ts +2 -0
  45. package/lib/organism/list-items/index.d.ts +2 -0
  46. package/lib/organism/setup-header/index.d.ts +8 -0
  47. package/lib/organism/wizard-contents/index.d.ts +2 -0
  48. package/lib/template/activity/engine-stars.d.ts.map +1 -1
  49. package/lib/template/activity/engine-stars.js +2 -1
  50. package/lib/template/activity/engine-stars.js.map +1 -1
  51. package/lib/template/back-office/brand-create/index.d.ts +8 -0
  52. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  53. package/lib/template/back-office/brand-list/index.d.ts +8 -0
  54. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  55. package/lib/template/back-office/brand-update/index.d.ts +14 -0
  56. package/lib/template/back-office/dashboard-preview/index.d.ts +8 -0
  57. package/lib/template/back-office/layout/index.d.ts +8 -0
  58. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  59. package/locales/en/global.json +1 -0
  60. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","className","customStyle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"sources":["../../../src/atom/button-link/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n className,\n customStyle\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n data-name={dataName}\n data-testid={dataTestId}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;EACxC,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAzB;EACA,MAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAML;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMC;EAAtB,GACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAtB,GAAwD,IAD3D,eAEE;IAAM,SAAS,EAAEM,cAAA,CAAML;EAAvB,GAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAvB,GAAyD,IAH5D,CADF;AAOD,CAnBD;;AAqBA,MAAMQ,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IACJP,IADI;IAEJD,KAFI;IAGJS,QAHI;IAIJV,IAAI,GAAG,EAJH;IAKJ,aAAaW,QALT;IAMJ,eAAeC,UAAU,GAAG,aANxB;IAOJ,cAAcC,SAPV;IAQJC,IARI;IASJC,OAAO,iBATH;IAUJC,SAVI;IAWJC;EAXI,IAYFR,KAZJ;EAaA,MAAMS,WAAW,GAAGn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ArC,EAA6C,WAA7C,CAAhB,CADe;EAErB9B,KAAK,EAAE6B,kBAAA,CAAUE,MAFI;EAGrB,cAAcF,kBAAA,CAAUE,MAHH;EAIrB,aAAaF,kBAAA,CAAUE,MAJF;EAKrB,eAAeF,kBAAA,CAAUE,MALJ;EAMrBhC,IAAI,EAAE8B,kBAAA,CAAUG,KAAV,CAAgB;IACpB9B,QAAQ,EAAE2B,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;IAEpB7B,IAAI,EAAE4B,kBAAA,CAAUC,KAAV,CAAgB,oBAAK1B,kBAAL,CAAhB;EAFc,CAAhB,CANe;EAUrBU,OAAO,EAAEe,kBAAA,CAAUI,IAVE;EAWrBpB,IAAI,EAAEgB,kBAAA,CAAUG,KAAV,CAAgB;IACpBE,IAAI,EAAEL,kBAAA,CAAUE,MADI;IAEpBI,QAAQ,EAAEN,kBAAA,CAAUO,IAFA;IAGpBC,MAAM,EAAER,kBAAA,CAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;EAHY,CAAhB,CAXe;EAgBrBrB,QAAQ,EAAEoB,kBAAA,CAAUO,IAhBC;EAiBrBrB,SAAS,EAAEc,kBAAA,CAAUE,MAjBA;EAkBrBf,WAAW,EAAEa,kBAAA,CAAUG,KAAV,CAAgB,EAAhB;AAlBQ,CAAvB;eAqBezB,U"}
1
+ {"version":3,"file":"index.js","names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","dataTestId","ariaLabel","link","onClick","onKeyDown","className","customStyle","useTitle","contentView","styleButton","classnames","button","primary","secondary","tertiary","text","dangerous","handleOnClick","useCallback","handleOnKeyDown","event","title","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"sources":["../../../src/atom/button-link/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'data-testid': dataTestId = 'button-link',\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n onKeyDown = noop,\n className,\n customStyle,\n useTitle = true\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const handleOnKeyDown = useCallback(event => onKeyDown(event), [onKeyDown]);\n\n if (link) {\n return (\n <Link\n {...link}\n {...(useTitle && {\n title: ariaLabel || label\n })}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n data-testid={dataTestId}\n aria-label={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n {...(useTitle && {\n title: ariaLabel || label\n })}\n type=\"button\"\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 tabIndex={0}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n 'data-testid': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n onKeyDown: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({}),\n useTitle: PropTypes.bool\n};\n\nexport default ButtonLink;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;EACxC,MAAM;IAACC,IAAD;IAAOC;EAAP,IAAmBH,IAAzB;EACA,MAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;EAEA,IAAI,CAACD,IAAL,EAAW;IACT,oBACE;MAAK,SAAS,EAAEE,cAAA,CAAMC;IAAtB,gBACE;MAAM,SAAS,EAAED,cAAA,CAAML;IAAvB,GAA+BA,KAA/B,CADF,CADF;EAKD;;EAED,oBACE;IAAK,SAAS,EAAEK,cAAA,CAAMC;EAAtB,GACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAtB,GAAwD,IAD3D,eAEE;IAAM,SAAS,EAAEM,cAAA,CAAML;EAAvB,GAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,6BAAC,IAAD;IAAM,SAAS,EAAEG,cAAA,CAAMN;EAAvB,EAAvB,GAAyD,IAH5D,CADF;AAOD,CAnBD;;AAqBA,MAAMQ,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IACJP,IADI;IAEJD,KAFI;IAGJS,QAHI;IAIJV,IAAI,GAAG,EAJH;IAKJ,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AAUO,IAjBC;EAkBrBzB,SAAS,EAAEkB,kBAAA,CAAUE,MAlBA;EAmBrBnB,WAAW,EAAEiB,kBAAA,CAAUG,KAAV,CAAgB,EAAhB,CAnBQ;EAoBrBnB,QAAQ,EAAEgB,kBAAA,CAAUO;AApBC,CAAvB;eAuBelC,U"}
@@ -1,6 +1,6 @@
1
1
  export function toggleStateOnKeyPress(state: any, setState: any, ref: any): (event: any) => void;
2
2
  export default ToolTip;
3
- declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "data-testid": dataTestId, closeToolTipInformationTextAriaLabel, toolTipIsVisible: _toolTipIsVisible, iconContainerClassName, delayHide, fontSize, iconSize }: {
3
+ declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "data-testid": dataTestId, closeToolTipInformationTextAriaLabel, toolTipIsVisible: _toolTipIsVisible, iconContainerClassName, delayHide, fontSize, iconSize, AnchorElement, tooltipClassName }: {
4
4
  anchorId: any;
5
5
  TooltipContent: any;
6
6
  "aria-label": any;
@@ -11,6 +11,8 @@ declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "d
11
11
  delayHide?: number | undefined;
12
12
  fontSize?: number | undefined;
13
13
  iconSize?: string | undefined;
14
+ AnchorElement: any;
15
+ tooltipClassName: any;
14
16
  }): JSX.Element;
15
17
  declare namespace ToolTip {
16
18
  const propTypes: {
@@ -18,6 +20,8 @@ declare namespace ToolTip {
18
20
  'data-testid': PropTypes.Requireable<string>;
19
21
  'aria-label': PropTypes.Requireable<string>;
20
22
  closeToolTipInformationTextAriaLabel: PropTypes.Validator<string>;
23
+ AnchorElement: PropTypes.Requireable<(...args: any[]) => any>;
24
+ tooltipClassName: PropTypes.Requireable<string>;
21
25
  iconContainerClassName: PropTypes.Requireable<string>;
22
26
  delayHide: PropTypes.Requireable<number>;
23
27
  fontSize: PropTypes.Requireable<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AAoEO,iGASN;;AAED;;;;;;;;;;;gBA0FC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AA4EO,iGAUN;;AAED;;;;;;;;;;;;;gBAwGC"}
@@ -13,6 +13,10 @@ var _reactTooltip = _interopRequireDefault(require("react-tooltip"));
13
13
 
14
14
  var _isString = _interopRequireDefault(require("lodash/fp/isString"));
15
15
 
16
+ var _has = _interopRequireDefault(require("lodash/fp/has"));
17
+
18
+ var _isNil = _interopRequireDefault(require("lodash/fp/isNil"));
19
+
16
20
  var _keys = _interopRequireDefault(require("lodash/fp/keys"));
17
21
 
18
22
  var _novaIcons = require("@coorpacademy/nova-icons");
@@ -40,9 +44,12 @@ const ToolTipWrapper = ({
40
44
  closeToolTipInformationTextAriaLabel,
41
45
  content,
42
46
  handleContentMouseOver,
43
- iconSize
47
+ iconSize,
48
+ tooltipClassName,
49
+ usesAnchorElement
44
50
  }) => {
45
- const coorpToolTipClasses = (0, _classnames.default)(_style.default.toolTip, iconSize === 'big' ? _style.default.bigIconToolTip : _style.default.smallIconToolTip);
51
+ const coorpToolTipClasses = (0, _classnames.default)(_style.default.toolTip, tooltipClassName, // eslint-disable-next-line no-nested-ternary
52
+ usesAnchorElement ? null : iconSize === 'big' ? _style.default.bigIconToolTip : _style.default.smallIconToolTip);
46
53
  if (!toolTipIsVisible) return null;
47
54
 
48
55
  if (anchorId) {
@@ -70,11 +77,13 @@ ToolTipWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
70
77
  closeToolTipInformationTextAriaLabel: _propTypes.default.string.isRequired,
71
78
  content: _propTypes.default.node,
72
79
  handleContentMouseOver: _propTypes.default.func,
73
- iconSize: _propTypes.default.oneOf((0, _keys.default)(IconSizes))
80
+ iconSize: _propTypes.default.oneOf((0, _keys.default)(IconSizes)),
81
+ tooltipClassName: _propTypes.default.string,
82
+ usesAnchorElement: _propTypes.default.bool
74
83
  } : {};
75
84
 
76
85
  const toggleStateOnKeyPress = (state, setState, ref) => event => {
77
- if (event.key === 'Enter') {
86
+ if (!(0, _has.default)('key', event)) return;else if (event.key === 'Enter') {
78
87
  if (ref) ref.current.focus();
79
88
  event.stopPropagation();
80
89
  event.preventDefault();
@@ -96,7 +105,9 @@ const ToolTip = ({
96
105
  iconContainerClassName,
97
106
  delayHide = 250,
98
107
  fontSize = 14,
99
- iconSize = 'small'
108
+ iconSize = 'small',
109
+ AnchorElement,
110
+ tooltipClassName
100
111
  }) => {
101
112
  const isComponent = (0, _react.useMemo)(() => !(0, _isString.default)(TooltipContent) && /*#__PURE__*/(0, _react.isValidElement)(TooltipContent()), [TooltipContent]);
102
113
  const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
@@ -121,6 +132,20 @@ const ToolTip = ({
121
132
  className: (0, _classnames.default)([_style.default.tooltipContent, FontSizes[fontSize]])
122
133
  }, TooltipContent);
123
134
  }, [TooltipContent, fontSize, isComponent]);
135
+ const anchorElement = (0, _react.useMemo)(() => AnchorElement ? /*#__PURE__*/_react.default.createElement(AnchorElement, {
136
+ onKeyDown: handleKeyPress
137
+ }) : /*#__PURE__*/_react.default.createElement("button", {
138
+ type: "button",
139
+ className: (0, _classnames.default)([_style.default.tooltipIconContainer, iconContainerClassName]),
140
+ "data-testid": dataTestId,
141
+ onKeyDown: handleKeyPress,
142
+ tabIndex: 0
143
+ }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
144
+ className: _style.default.informationIcon,
145
+ width: IconSizes[iconSize],
146
+ height: IconSizes[iconSize],
147
+ "aria-label": ariaLabel
148
+ })), [AnchorElement, ariaLabel, dataTestId, handleKeyPress, iconContainerClassName, iconSize]);
124
149
  return anchorId ? /*#__PURE__*/_react.default.createElement(ToolTipWrapper, {
125
150
  toolTipIsVisible: _toolTipIsVisible,
126
151
  anchorId: anchorId,
@@ -133,25 +158,16 @@ const ToolTip = ({
133
158
  className: _style.default.tooltipContainer,
134
159
  onMouseLeave: handleMouseLeave,
135
160
  onMouseOver: handleMouseOver
136
- }, /*#__PURE__*/_react.default.createElement("button", {
137
- type: "button",
138
- className: (0, _classnames.default)([_style.default.tooltipIconContainer, iconContainerClassName]),
139
- "data-testid": dataTestId,
140
- onKeyDown: handleKeyPress,
141
- tabIndex: 0
142
- }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
143
- className: _style.default.informationIcon,
144
- width: IconSizes[iconSize],
145
- height: IconSizes[iconSize],
146
- "aria-label": ariaLabel
147
- })), /*#__PURE__*/_react.default.createElement(ToolTipWrapper, {
161
+ }, anchorElement, /*#__PURE__*/_react.default.createElement(ToolTipWrapper, {
148
162
  toolTipIsVisible: toolTipIsVisible,
149
163
  anchorId: anchorId,
150
164
  closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
151
165
  content: content,
152
166
  handleContentMouseOver: handleContentMouseOver,
153
167
  fontSize: fontSize,
154
- iconSize: iconSize
168
+ iconSize: iconSize,
169
+ tooltipClassName: tooltipClassName,
170
+ usesAnchorElement: !(0, _isNil.default)(AnchorElement)
155
171
  }));
156
172
  };
157
173
 
@@ -161,6 +177,10 @@ ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
161
177
  'aria-label': _propTypes.default.string,
162
178
  closeToolTipInformationTextAriaLabel: _propTypes.default.string.isRequired,
163
179
  // ---------- Regular Tooltip exclusive --------------
180
+ // If using an Anchor element w/ the regular Tooltip
181
+ AnchorElement: _propTypes.default.func,
182
+ tooltipClassName: _propTypes.default.string,
183
+ //
164
184
  iconContainerClassName: _propTypes.default.string,
165
185
  delayHide: _propTypes.default.number,
166
186
  fontSize: _propTypes.default.oneOf([12, 14]),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","coorpToolTipClasses","classnames","toolTip","bigIconToolTip","smallIconToolTip","toolTipReact","propTypes","PropTypes","bool","string","isRequired","node","func","oneOf","keys","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","useCallback","clearTimeout","handleMouseOver","handleMouseLeave","setTimeout","tooltipContent","tooltipContainer","tooltipIconContainer","informationIcon","oneOfType","number"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport keys from 'lodash/fp/keys';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst FontSizes = {\n 12: style.tooltipContentFontSize12,\n 14: style.tooltipContentFontSize14\n};\n\nconst IconSizes = {\n small: 12,\n big: 20\n};\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content,\n handleContentMouseOver,\n iconSize\n}) => {\n const coorpToolTipClasses = classnames(\n style.toolTip,\n iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n );\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={coorpToolTipClasses}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n onMouseOver={handleContentMouseOver}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node,\n handleContentMouseOver: PropTypes.func,\n iconSize: PropTypes.oneOf(keys(IconSizes))\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible,\n iconContainerClassName,\n delayHide = 250,\n fontSize = 14,\n iconSize = 'small'\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), delayHide));\n }, [delayHide]);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={classnames([style.tooltipContent, FontSizes[fontSize]])}>{TooltipContent}</p>\n );\n }, [TooltipContent, fontSize, isComponent]);\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n fontSize={fontSize}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={classnames([style.tooltipIconContainer, iconContainerClassName])}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={IconSizes[iconSize]}\n height={IconSizes[iconSize]}\n aria-label={ariaLabel}\n />\n </button>\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n handleContentMouseOver={handleContentMouseOver}\n fontSize={fontSize}\n iconSize={iconSize}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- Regular Tooltip exclusive --------------\n iconContainerClassName: PropTypes.string,\n delayHide: PropTypes.number,\n fontSize: PropTypes.oneOf([12, 14]),\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n // ---------- React Tooltip exclusive --------------\n // externalHandling: if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n // data-for={anchorId} && data-tooltip-place=\"left\" are needed on the anchored component\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,IAAIC,cAAA,CAAMC,wBADM;EAEhB,IAAID,cAAA,CAAME;AAFM,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.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","tooltipClassName","usesAnchorElement","coorpToolTipClasses","classnames","toolTip","bigIconToolTip","smallIconToolTip","toolTipReact","propTypes","PropTypes","bool","string","isRequired","node","func","oneOf","keys","toggleStateOnKeyPress","state","setState","ref","event","has","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","AnchorElement","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","useCallback","clearTimeout","handleMouseOver","handleMouseLeave","setTimeout","tooltipContent","anchorElement","tooltipIconContainer","informationIcon","tooltipContainer","isNil","oneOfType","number"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport has from 'lodash/fp/has';\nimport isNil from 'lodash/fp/isNil';\nimport keys from 'lodash/fp/keys';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst FontSizes = {\n 12: style.tooltipContentFontSize12,\n 14: style.tooltipContentFontSize14\n};\n\nconst IconSizes = {\n small: 12,\n big: 20\n};\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content,\n handleContentMouseOver,\n iconSize,\n tooltipClassName,\n usesAnchorElement\n}) => {\n const coorpToolTipClasses = classnames(\n style.toolTip,\n tooltipClassName,\n // eslint-disable-next-line no-nested-ternary\n usesAnchorElement ? null : iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n );\n if (!toolTipIsVisible) return null;\n if (anchorId) {\n return (\n <ReactTooltip\n id={anchorId}\n className={style.toolTipReact}\n data-event-off=\"click\"\n place=\"left\"\n effect=\"solid\"\n aria-label={closeToolTipInformationTextAriaLabel}\n >\n {content}\n </ReactTooltip>\n );\n } else {\n return (\n <div\n className={coorpToolTipClasses}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\n onMouseOver={handleContentMouseOver}\n >\n {content}\n </div>\n );\n }\n};\n\nToolTipWrapper.propTypes = {\n toolTipIsVisible: PropTypes.bool,\n anchorId: PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n content: PropTypes.node,\n handleContentMouseOver: PropTypes.func,\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n tooltipClassName: PropTypes.string,\n usesAnchorElement: PropTypes.bool\n};\n\nexport const toggleStateOnKeyPress = (state, setState, ref) => event => {\n if (!has('key', event)) return;\n else if (event.key === 'Enter') {\n if (ref) ref.current.focus();\n event.stopPropagation();\n event.preventDefault();\n setState(!state);\n } else if (event.key === 'Tab' || event.key === 'Escape') {\n setState(false);\n }\n};\n\nconst ToolTip = ({\n anchorId,\n TooltipContent,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestId,\n closeToolTipInformationTextAriaLabel,\n toolTipIsVisible: _toolTipIsVisible,\n iconContainerClassName,\n delayHide = 250,\n fontSize = 14,\n iconSize = 'small',\n AnchorElement,\n tooltipClassName\n}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState(undefined);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleContentMouseOver = useCallback(() => {\n mouseLeaveTimer && /* istanbul ignore next */ clearTimeout(mouseLeaveTimer);\n }, [mouseLeaveTimer]);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(setTimeout(() => setToolTipIsVisible(false), delayHide));\n }, [delayHide]);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={classnames([style.tooltipContent, FontSizes[fontSize]])}>{TooltipContent}</p>\n );\n }, [TooltipContent, fontSize, isComponent]);\n\n const anchorElement = useMemo(\n () =>\n AnchorElement ? (\n <AnchorElement onKeyDown={handleKeyPress} />\n ) : (\n <button\n type=\"button\"\n className={classnames([style.tooltipIconContainer, iconContainerClassName])}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={IconSizes[iconSize]}\n height={IconSizes[iconSize]}\n aria-label={ariaLabel}\n />\n </button>\n ),\n [AnchorElement, ariaLabel, dataTestId, handleKeyPress, iconContainerClassName, iconSize]\n );\n\n return anchorId ? (\n <ToolTipWrapper\n toolTipIsVisible={_toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n fontSize={fontSize}\n />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n {anchorElement}\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\n handleContentMouseOver={handleContentMouseOver}\n fontSize={fontSize}\n iconSize={iconSize}\n tooltipClassName={tooltipClassName}\n usesAnchorElement={!isNil(AnchorElement)}\n />\n </div>\n );\n};\n\nToolTip.propTypes = {\n TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),\n 'data-testid': PropTypes.string,\n 'aria-label': PropTypes.string,\n closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,\n // ---------- Regular Tooltip exclusive --------------\n // If using an Anchor element w/ the regular Tooltip\n AnchorElement: PropTypes.func,\n tooltipClassName: PropTypes.string,\n //\n iconContainerClassName: PropTypes.string,\n delayHide: PropTypes.number,\n fontSize: PropTypes.oneOf([12, 14]),\n iconSize: PropTypes.oneOf(keys(IconSizes)),\n // ---------- React Tooltip exclusive --------------\n // externalHandling: if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n // data-for={anchorId} && data-tooltip-place=\"left\" are needed on the anchored component\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,SAAS,GAAG;EAChB,IAAIC,cAAA,CAAMC,wBADM;EAEhB,IAAID,cAAA,CAAME;AAFM,CAAlB;AAKA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,EADS;EAEhBC,GAAG,EAAE;AAFW,CAAlB;;AAKA,MAAMC,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC,OAJsB;EAKtBC,sBALsB;EAMtBC,QANsB;EAOtBC,gBAPsB;EAQtBC;AARsB,CAAD,KASjB;EACJ,MAAMC,mBAAmB,GAAG,IAAAC,mBAAA,EAC1BhB,cAAA,CAAMiB,OADoB,EAE1BJ,gBAF0B,EAG1B;EACAC,iBAAiB,GAAG,IAAH,GAAUF,QAAQ,KAAK,KAAb,GAAqBZ,cAAA,CAAMkB,cAA3B,GAA4ClB,cAAA,CAAMmB,gBAJnD,CAA5B;EAMA,IAAI,CAACZ,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,6BAAC,qBAAD;MACE,E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Q,EAAEc,kBAAA,CAAUE,MAlBF;EAmBlBjB,gBAAgB,EAAEe,kBAAA,CAAUC;AAnBV,CAApB;eAsBekB,O"}
@@ -56,7 +56,7 @@
56
56
  width: 15px;
57
57
  height: 15px;
58
58
  transform: rotate(-45deg);
59
- background-color: cm_grey_700;
59
+ background-color: inherit;
60
60
  position: inherit;
61
61
  border-radius: 2px;
62
62
  bottom: -5px;
@@ -419,6 +419,7 @@ declare namespace BrandFormGroup {
419
419
  type: PropTypes.Requireable<string>;
420
420
  }>>;
421
421
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
422
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
422
423
  link: PropTypes.Requireable<PropTypes.InferProps<{
423
424
  href: PropTypes.Requireable<string>;
424
425
  download: PropTypes.Requireable<boolean>;
@@ -427,6 +428,7 @@ declare namespace BrandFormGroup {
427
428
  disabled: PropTypes.Requireable<boolean>;
428
429
  className: PropTypes.Requireable<string>;
429
430
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
431
+ useTitle: PropTypes.Requireable<boolean>;
430
432
  }> | PropTypes.InferProps<{
431
433
  type: PropTypes.Requireable<string>;
432
434
  title: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.js"],"names":[],"mappings":";AAoCA,gEAqDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/review-correction-popin/index.js"],"names":[],"mappings":";AA+EA,gEAqDC"}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = void 0;
5
5
 
6
- var _react = _interopRequireDefault(require("react"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
8
  var _classnames = _interopRequireDefault(require("classnames"));
9
9
 
@@ -11,38 +11,66 @@ var _novaIcons = require("@coorpacademy/nova-icons");
11
11
 
12
12
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
13
13
 
14
+ var _provider = _interopRequireWildcard(require("../../atom/provider"));
15
+
16
+ var _tooltip = _interopRequireDefault(require("../../atom/tooltip"));
17
+
14
18
  var _style = _interopRequireDefault(require("./style.css"));
15
19
 
16
20
  var _propTypes = _interopRequireDefault(require("./prop-types"));
17
21
 
18
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
23
 
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
20
28
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
29
 
22
- const buildKlfButton = klf => {
23
- const klfButtonProps = _extends({}, klf, {
30
+ const KlfButton = ({
31
+ klf
32
+ }, legacyContext) => {
33
+ const translate = (0, _provider.GetTranslateFromContext)(legacyContext);
34
+ const klfButtonProps = (0, _react.useMemo)(() => _extends({}, klf, {
24
35
  icon: {
25
36
  position: 'left',
26
37
  type: 'key'
27
38
  },
28
39
  type: 'primary'
29
- });
30
-
31
- return /*#__PURE__*/_react.default.createElement("div", {
32
- className: _style.default.klfContainer
33
- }, /*#__PURE__*/_react.default.createElement("div", {
40
+ }), [klf]);
41
+ const AnchorButton = (0, _react.useCallback)(({
42
+ onKeyDown
43
+ }) => /*#__PURE__*/_react.default.createElement("div", {
34
44
  className: _style.default.klfButtonContainer
35
45
  }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, klfButtonProps, {
36
- className: _style.default.klfButton
37
- }))), /*#__PURE__*/_react.default.createElement("div", {
38
- className: _style.default.toolTip
39
- }, /*#__PURE__*/_react.default.createElement("span", {
46
+ className: _style.default.klfButton,
47
+ onKeyDown: onKeyDown,
48
+ useTitle: false
49
+ }))), [klfButtonProps]);
50
+ const TooltipContent = (0, _react.useCallback)(() => /*#__PURE__*/_react.default.createElement("span", {
40
51
  className: _style.default.tooltipText // eslint-disable-next-line react/no-danger
41
52
  ,
42
53
  dangerouslySetInnerHTML: {
43
54
  __html: klf.tooltip
44
55
  }
45
- })));
56
+ }), [klf.tooltip]);
57
+ const toolTipProps = (0, _react.useMemo)(() => ({
58
+ closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text'),
59
+ AnchorElement: AnchorButton,
60
+ TooltipContent,
61
+ 'aria-label': translate('More details'),
62
+ tooltipClassName: _style.default.toolTipCustomization
63
+ }), [AnchorButton, TooltipContent, translate]);
64
+ return /*#__PURE__*/_react.default.createElement("div", {
65
+ className: _style.default.klfContainer
66
+ }, /*#__PURE__*/_react.default.createElement(_tooltip.default, toolTipProps));
67
+ };
68
+
69
+ KlfButton.propTypes = process.env.NODE_ENV !== "production" ? {
70
+ klf: _propTypes.default.klf
71
+ } : {};
72
+ KlfButton.contextTypes = {
73
+ translate: _provider.default.childContextTypes.translate
46
74
  };
47
75
 
48
76
  const ReviewCorrectionPopin = props => {
@@ -58,7 +86,9 @@ const ReviewCorrectionPopin = props => {
58
86
  type: 'primary'
59
87
  });
60
88
 
61
- const cta = type === 'wrong' ? buildKlfButton(klf) : null;
89
+ const cta = type === 'wrong' ? /*#__PURE__*/_react.default.createElement(KlfButton, {
90
+ klf: klf
91
+ }) : null;
62
92
  const ICONS = {
63
93
  right: _novaIcons.NovaCompositionCoorpacademyCheck,
64
94
  wrong: _novaIcons.NovaSolidStatusClose
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["buildKlfButton","klf","klfButtonProps","icon","position","type","style","klfContainer","klfButtonContainer","klfButton","toolTip","tooltipText","__html","tooltip","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","RightIcon","wrong","WrongIcon","Icon","wrapper","classnames","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","labelContainer","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton","propTypes"],"sources":["../../../src/molecule/review-correction-popin/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst buildKlfButton = klf => {\n const klfButtonProps = {\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n };\n\n return (\n <div className={style.klfContainer}>\n <div className={style.klfButtonContainer}>\n <ButtonLink {...klfButtonProps} className={style.klfButton} />\n </div>\n <div className={style.toolTip}>\n <span\n className={style.tooltipText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: klf.tooltip}}\n />\n </div>\n </div>\n );\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? buildKlfButton(klf) : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper} data-testid=\"review-correction-popin\">\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel}>\n <span aria-label={resultLabel} role=\"status\">\n {resultLabel}\n </span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <div className={style.labelContainer}>\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n </div>\n <span\n className={style.message}\n aria-label={information.message}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: information.message}}\n />\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer} data-testid=\"next-question-button-container\">\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewCorrectionPopin.propTypes = propTypes;\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAGC,GAAG,IAAI;EAC5B,MAAMC,cAAc,gBACfD,GADe;IAElBE,IAAI,EAAE;MACJC,QAAQ,EAAE,MADN;MAEJC,IAAI,EAAE;IAFF,CAFY;IAMlBA,IAAI,EAAE;EANY,EAApB;;EASA,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE;IAAK,SAAS,EAAED,cAAA,CAAME;EAAtB,gBACE,6BAAC,mBAAD,eAAgBN,cAAhB;IAAgC,SAAS,EAAEI,cAAA,CAAMG;EAAjD,GADF,CADF,eAIE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,gBACE;IACE,SAAS,EAAEJ,cAAA,CAAMK,WADnB,CAEE;IAFF;IAGE,uBAAuB,EAAE;MAACC,MAAM,EAAEX,GAAG,C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B;EAAtB,gBACE;IAAM,SAAS,EAAE7B,cAAA,CAAM8B,KAAvB;IAA8B,cAAYpB,WAAW,CAACoB;EAAtD,GACGpB,WAAW,CAACoB,KADf,CADF,CADF,eAME;IACE,SAAS,EAAE9B,cAAA,CAAM+B,OADnB;IAEE,cAAYrB,WAAW,CAACqB,OAF1B,CAGE;IAHF;IAIE,uBAAuB,EAAE;MAACzB,MAAM,EAAEI,WAAW,CAACqB;IAArB;EAJ3B,EANF,CADF,CAXF,eA0BE;IAAK,SAAS,EAAEhC,IAAI,KAAK,OAAT,GAAmBC,cAAA,CAAMgC,OAAzB,GAAmChC,cAAA,CAAMiC;EAAzD,GACGnB,GADH,eAEE;IAAK,SAAS,EAAEd,cAAA,CAAMkC,qBAAtB;IAA6C,eAAY;EAAzD,gBACE,6BAAC,mBAAD,eAAgBrB,uBAAhB;IAAyC,SAAS,EAAEb,cAAA,CAAMmC;EAA1D,GADF,CAFF,CA1BF,CADF,CADF;AAqCD,CArDD;;AAuDA3B,qBAAqB,CAAC4B,SAAtB,2CAAkCA,kBAAlC;eAEe5B,qB"}
1
+ {"version":3,"file":"index.js","names":["KlfButton","klf","legacyContext","translate","GetTranslateFromContext","klfButtonProps","useMemo","icon","position","type","AnchorButton","useCallback","onKeyDown","style","klfButtonContainer","klfButton","TooltipContent","tooltipText","__html","tooltip","toolTipProps","closeToolTipInformationTextAriaLabel","AnchorElement","tooltipClassName","toolTipCustomization","klfContainer","propTypes","contextTypes","Provider","childContextTypes","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","RightIcon","wrong","WrongIcon","Icon","wrapper","classnames","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","labelContainer","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton"],"sources":["../../../src/molecule/review-correction-popin/index.js"],"sourcesContent":["import React, {useCallback, useMemo} from 'react';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport Tooltip from '../../atom/tooltip';\nimport style from './style.css';\nimport propTypes from './prop-types';\n\nconst KlfButton = ({klf}, legacyContext) => {\n const translate = GetTranslateFromContext(legacyContext);\n const klfButtonProps = useMemo(\n () => ({\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n }),\n [klf]\n );\n\n const AnchorButton = useCallback(\n ({onKeyDown}) => (\n <div className={style.klfButtonContainer}>\n <ButtonLink\n {...klfButtonProps}\n className={style.klfButton}\n onKeyDown={onKeyDown}\n useTitle={false}\n />\n </div>\n ),\n [klfButtonProps]\n );\n\n const TooltipContent = useCallback(\n () => (\n <span\n className={style.tooltipText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: klf.tooltip}}\n />\n ),\n [klf.tooltip]\n );\n\n const toolTipProps = useMemo(\n () => ({\n closeToolTipInformationTextAriaLabel: translate(\n 'Press the escape key to close the information text'\n ),\n AnchorElement: AnchorButton,\n TooltipContent,\n 'aria-label': translate('More details'),\n tooltipClassName: style.toolTipCustomization\n }),\n [AnchorButton, TooltipContent, translate]\n );\n\n return (\n <div className={style.klfContainer}>\n <Tooltip {...toolTipProps} />\n </div>\n );\n};\n\nKlfButton.propTypes = {\n klf: propTypes.klf\n};\n\nKlfButton.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? <KlfButton klf={klf} /> : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper} data-testid=\"review-correction-popin\">\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel}>\n <span aria-label={resultLabel} role=\"status\">\n {resultLabel}\n </span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <div className={style.labelContainer}>\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n </div>\n <span\n className={style.message}\n aria-label={information.message}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: information.message}}\n />\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer} data-testid=\"next-question-button-container\">\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewCorrectionPopin.propTypes = propTypes;\n\nexport default ReviewCorrectionPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC;AAAD,CAAD,EAAQC,aAAR,KAA0B;EAC1C,MAAMC,SAAS,GAAG,IAAAC,iCAAA,EAAwBF,aAAxB,CAAlB;EACA,MAAMG,cAAc,GAAG,IAAAC,cAAA,EACrB,mBACKL,GADL;IAEEM,IAAI,EAAE;MACJC,QAAQ,EAAE,MADN;MAEJC,IAAI,EAAE;IAFF,CAFR;IAMEA,IAAI,EAAE;EANR,EADqB,EASrB,CAACR,GAAD,CATqB,CAAvB;EAYA,MAAMS,YAAY,GAAG,IAAAC,kBAAA,EACnB,CAAC;IAACC;EAAD,CAAD,kBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE,6BAAC,mBAAD,eACMT,cADN;IAEE,SAAS,EAAEQ,cAAA,CAAME,SAFnB;IAGE,SAAS,EAAEH,SAHb;IAIE,QAAQ,EAAE;EAJZ,GADF,CAFiB,EAWnB,CAACP,cAAD,CAXmB,CAArB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AAK,SAAS,EAAEvB,cAAA,CAAM2C,qBAAtB;IAA6C,eAAY;EAAzD,gBACE,6BAAC,mBAAD,eAAgBrB,uBAAhB;IAAyC,SAAS,EAAEtB,cAAA,CAAM4C;EAA1D,GADF,CAFF,CA1BF,CADF,CADF;AAqCD,CArDD;;AAuDA3B,qBAAqB,CAACJ,SAAtB,2CAAkCA,kBAAlC;eAEeI,qB"}
@@ -137,34 +137,6 @@
137
137
  flex: 0 1 auto;
138
138
  }
139
139
 
140
- .toolTip {
141
- visibility: hidden;
142
- opacity: 0;
143
- transition: opacity 0.4s;
144
- position: absolute;
145
- width: 142%;
146
- border-radius: 15px;
147
- background-color: white;
148
- right: 0px;
149
- bottom: 55px;
150
- filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.32));
151
- }
152
-
153
- .toolTip::before {
154
- content: '';
155
- display: inline-block;
156
- visibility: hidden;
157
- opacity: 0;
158
- width: 15px;
159
- height: 15px;
160
- transform: rotate(-45deg);
161
- transition: opacity 0.4s;
162
- background-color: white;
163
- position: inherit;
164
- bottom: -7px;
165
- right: 10%;
166
- }
167
-
168
140
  .tooltipText {
169
141
  display: inline-block;
170
142
  margin: 16px;
@@ -184,16 +156,6 @@
184
156
  position: relative;
185
157
  }
186
158
 
187
- .klfButtonContainer:hover ~ .toolTip {
188
- visibility: visible;
189
- opacity: 1;
190
- }
191
-
192
- .klfButtonContainer:hover ~ .toolTip::before {
193
- visibility: visible;
194
- opacity: 1;
195
- }
196
-
197
159
  .klfButtonContainer {
198
160
  width: 100%;
199
161
  margin-right: 16px;
@@ -225,6 +187,13 @@
225
187
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.07)), #FFFFFF;
226
188
  }
227
189
 
190
+ .toolTipCustomization {
191
+ right: 0;
192
+ bottom: 52px;
193
+ background-color: white;
194
+ filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.32));
195
+ }
196
+
228
197
  @media tablet {
229
198
  .resultLabel {
230
199
  display: none;
@@ -248,6 +217,10 @@
248
217
  }
249
218
 
250
219
  @media mobile {
220
+ .toolTipCustomization {
221
+ right: 90px;
222
+ }
223
+
251
224
  .popin {
252
225
  width: 100%;
253
226
  min-height: 100px;
@@ -305,19 +278,4 @@
305
278
  .klfButtonContainer {
306
279
  margin: 0;
307
280
  }
308
-
309
- .toolTip {
310
- width: 106%;
311
- right: -3%;
312
- top: auto;
313
- bottom: 52px;
314
- }
315
-
316
- .toolTip::before {
317
- right: 50%
318
- }
319
-
320
- .tooltipText {
321
- max-width: none;
322
- }
323
281
  }
@@ -449,6 +449,7 @@ declare namespace BrandForm {
449
449
  type: PropTypes.Requireable<string>;
450
450
  }>>;
451
451
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
452
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
452
453
  link: PropTypes.Requireable<PropTypes.InferProps<{
453
454
  href: PropTypes.Requireable<string>;
454
455
  download: PropTypes.Requireable<boolean>;
@@ -457,6 +458,7 @@ declare namespace BrandForm {
457
458
  disabled: PropTypes.Requireable<boolean>;
458
459
  className: PropTypes.Requireable<string>;
459
460
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
461
+ useTitle: PropTypes.Requireable<boolean>;
460
462
  }> | PropTypes.InferProps<{
461
463
  type: PropTypes.Requireable<string>;
462
464
  title: PropTypes.Requireable<string>;
@@ -20,6 +20,7 @@ declare namespace ListItems {
20
20
  type: PropTypes.Requireable<string>;
21
21
  }>>;
22
22
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
23
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
23
24
  link: PropTypes.Requireable<PropTypes.InferProps<{
24
25
  href: PropTypes.Requireable<string>;
25
26
  download: PropTypes.Requireable<boolean>;
@@ -28,6 +29,7 @@ declare namespace ListItems {
28
29
  disabled: PropTypes.Requireable<boolean>;
29
30
  className: PropTypes.Requireable<string>;
30
31
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
32
+ useTitle: PropTypes.Requireable<boolean>;
31
33
  }>>;
32
34
  items: PropTypes.Requireable<(PropTypes.InferProps<{
33
35
  bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
@@ -14,6 +14,7 @@ declare namespace SetupHeader {
14
14
  type: PropTypes.Requireable<string>;
15
15
  }>>;
16
16
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
17
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
17
18
  link: PropTypes.Requireable<PropTypes.InferProps<{
18
19
  href: PropTypes.Requireable<string>;
19
20
  download: PropTypes.Requireable<boolean>;
@@ -22,6 +23,7 @@ declare namespace SetupHeader {
22
23
  disabled: PropTypes.Requireable<boolean>;
23
24
  className: PropTypes.Requireable<string>;
24
25
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
26
+ useTitle: PropTypes.Requireable<boolean>;
25
27
  }>>;
26
28
  logOut: PropTypes.Requireable<PropTypes.InferProps<{
27
29
  type: PropTypes.Requireable<string>;
@@ -34,6 +36,7 @@ declare namespace SetupHeader {
34
36
  type: PropTypes.Requireable<string>;
35
37
  }>>;
36
38
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
39
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
37
40
  link: PropTypes.Requireable<PropTypes.InferProps<{
38
41
  href: PropTypes.Requireable<string>;
39
42
  download: PropTypes.Requireable<boolean>;
@@ -42,6 +45,7 @@ declare namespace SetupHeader {
42
45
  disabled: PropTypes.Requireable<boolean>;
43
46
  className: PropTypes.Requireable<string>;
44
47
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
48
+ useTitle: PropTypes.Requireable<boolean>;
45
49
  }>>;
46
50
  globalAnalytics: PropTypes.Requireable<PropTypes.InferProps<{
47
51
  type: PropTypes.Requireable<string>;
@@ -54,6 +58,7 @@ declare namespace SetupHeader {
54
58
  type: PropTypes.Requireable<string>;
55
59
  }>>;
56
60
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
61
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
57
62
  link: PropTypes.Requireable<PropTypes.InferProps<{
58
63
  href: PropTypes.Requireable<string>;
59
64
  download: PropTypes.Requireable<boolean>;
@@ -62,6 +67,7 @@ declare namespace SetupHeader {
62
67
  disabled: PropTypes.Requireable<boolean>;
63
68
  className: PropTypes.Requireable<string>;
64
69
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
70
+ useTitle: PropTypes.Requireable<boolean>;
65
71
  }>>;
66
72
  platformList: PropTypes.Requireable<PropTypes.InferProps<{
67
73
  type: PropTypes.Requireable<string>;
@@ -74,6 +80,7 @@ declare namespace SetupHeader {
74
80
  type: PropTypes.Requireable<string>;
75
81
  }>>;
76
82
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
83
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
77
84
  link: PropTypes.Requireable<PropTypes.InferProps<{
78
85
  href: PropTypes.Requireable<string>;
79
86
  download: PropTypes.Requireable<boolean>;
@@ -82,6 +89,7 @@ declare namespace SetupHeader {
82
89
  disabled: PropTypes.Requireable<boolean>;
83
90
  className: PropTypes.Requireable<string>;
84
91
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
92
+ useTitle: PropTypes.Requireable<boolean>;
85
93
  }>>;
86
94
  }>>;
87
95
  const platformName: PropTypes.Requireable<string>;
@@ -466,6 +466,7 @@ declare namespace WizardContents {
466
466
  type: PropTypes.Requireable<string>;
467
467
  }>>;
468
468
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
469
+ onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
469
470
  link: PropTypes.Requireable<PropTypes.InferProps<{
470
471
  href: PropTypes.Requireable<string>;
471
472
  download: PropTypes.Requireable<boolean>;
@@ -474,6 +475,7 @@ declare namespace WizardContents {
474
475
  disabled: PropTypes.Requireable<boolean>;
475
476
  className: PropTypes.Requireable<string>;
476
477
  customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
478
+ useTitle: PropTypes.Requireable<boolean>;
477
479
  }> | PropTypes.InferProps<{
478
480
  type: PropTypes.Requireable<string>;
479
481
  title: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"engine-stars.d.ts","sourceRoot":"","sources":["../../../src/template/activity/engine-stars.js"],"names":[],"mappings":";AAuEA,0EA6IC"}
1
+ {"version":3,"file":"engine-stars.d.ts","sourceRoot":"","sources":["../../../src/template/activity/engine-stars.js"],"names":[],"mappings":";AAuEA,0EA8IC"}