@coorpacademy/components 11.9.2-alpha.1 → 11.9.2-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/drag-and-drop/style.css +14 -9
- package/es/atom/image-upload/index.d.ts +6 -1
- package/es/atom/image-upload/index.d.ts.map +1 -1
- package/es/atom/image-upload/index.js +24 -4
- package/es/atom/image-upload/index.js.map +1 -1
- package/es/atom/image-upload/style.css +7 -0
- package/es/atom/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +62 -12
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/style.css +67 -7
- package/es/atom/title/index.d.ts +1 -0
- package/es/atom/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +14 -5
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +6 -0
- package/es/molecule/brand-form-group/index.d.ts +5 -0
- package/es/molecule/brand-form-group/index.d.ts.map +1 -1
- package/es/molecule/brand-form-group/index.js +4 -1
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +9 -10
- package/es/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
- package/es/molecule/setup-slide/index.d.ts +2 -0
- package/es/molecule/setup-slider/index.d.ts +2 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
- package/es/organism/brand-form/index.d.ts +5 -0
- package/es/organism/rewards-form/index.d.ts +3 -0
- package/es/organism/wizard-contents/index.d.ts +10 -2
- package/es/organism/wizard-contents/index.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.js +9 -4
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/style.css +36 -4
- package/es/template/activity/engine-stars.css +33 -16
- package/es/template/activity/engine-stars.d.ts +17 -15
- package/es/template/activity/engine-stars.d.ts.map +1 -1
- package/es/template/activity/engine-stars.js +115 -128
- package/es/template/activity/engine-stars.js.map +1 -1
- package/es/template/activity/index.d.ts +0 -1
- package/es/template/activity/index.d.ts.map +1 -1
- package/es/template/activity/index.js +9 -18
- package/es/template/activity/index.js.map +1 -1
- package/es/template/activity/progression-item.js +1 -1
- package/es/template/activity/progression-item.js.map +1 -1
- package/es/template/activity/stars-summary.d.ts +0 -1
- package/es/template/activity/stars-summary.d.ts.map +1 -1
- package/es/template/activity/stars-summary.js +5 -10
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +15 -2
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +14 -9
- package/lib/atom/image-upload/index.d.ts +6 -1
- package/lib/atom/image-upload/index.d.ts.map +1 -1
- package/lib/atom/image-upload/index.js +25 -4
- package/lib/atom/image-upload/index.js.map +1 -1
- package/lib/atom/image-upload/style.css +7 -0
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +66 -13
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/style.css +67 -7
- package/lib/atom/title/index.d.ts +1 -0
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +14 -5
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +6 -0
- package/lib/molecule/brand-form-group/index.d.ts +5 -0
- package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
- package/lib/molecule/brand-form-group/index.js +4 -1
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +9 -10
- package/lib/molecule/drag-and-drop-wrapper/index.d.ts +2 -0
- package/lib/molecule/setup-slide/index.d.ts +2 -0
- package/lib/molecule/setup-slider/index.d.ts +2 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +3 -0
- package/lib/organism/brand-form/index.d.ts +5 -0
- package/lib/organism/rewards-form/index.d.ts +3 -0
- package/lib/organism/wizard-contents/index.d.ts +10 -2
- package/lib/organism/wizard-contents/index.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.js +9 -4
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/style.css +36 -4
- package/lib/template/activity/engine-stars.css +33 -16
- package/lib/template/activity/engine-stars.d.ts +17 -15
- package/lib/template/activity/engine-stars.d.ts.map +1 -1
- package/lib/template/activity/engine-stars.js +116 -135
- package/lib/template/activity/engine-stars.js.map +1 -1
- package/lib/template/activity/index.d.ts +0 -1
- package/lib/template/activity/index.d.ts.map +1 -1
- package/lib/template/activity/index.js +9 -21
- package/lib/template/activity/index.js.map +1 -1
- package/lib/template/activity/progression-item.js +1 -1
- package/lib/template/activity/progression-item.js.map +1 -1
- package/lib/template/activity/stars-summary.d.ts +0 -1
- package/lib/template/activity/stars-summary.d.ts.map +1 -1
- package/lib/template/activity/stars-summary.js +5 -10
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +15 -2
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/locales/en/global.json +0 -1
- package/package.json +3 -4
- package/es/atom/tooltip/index.d.ts +0 -22
- package/es/atom/tooltip/index.d.ts.map +0 -1
- package/es/atom/tooltip/index.js +0 -117
- package/es/atom/tooltip/index.js.map +0 -1
- package/es/atom/tooltip/style.css +0 -96
- package/lib/atom/tooltip/index.d.ts +0 -22
- package/lib/atom/tooltip/index.d.ts.map +0 -1
- package/lib/atom/tooltip/index.js +0 -137
- package/lib/atom/tooltip/index.js.map +0 -1
- package/lib/atom/tooltip/style.css +0 -96
package/es/atom/tooltip/index.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React, { isValidElement, useState, useCallback, useMemo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ReactTooltip from 'react-tooltip';
|
|
4
|
-
import isString from 'lodash/fp/isString';
|
|
5
|
-
import { NovaCompositionCoorpacademyInformationIcon as InformationIcon } from '@coorpacademy/nova-icons';
|
|
6
|
-
import style from './style.css';
|
|
7
|
-
|
|
8
|
-
const ToolTipWrapper = ({
|
|
9
|
-
toolTipIsVisible,
|
|
10
|
-
anchorId,
|
|
11
|
-
closeToolTipInformationTextAriaLabel,
|
|
12
|
-
content
|
|
13
|
-
}) => {
|
|
14
|
-
if (!toolTipIsVisible) return null;
|
|
15
|
-
|
|
16
|
-
if (anchorId) {
|
|
17
|
-
return /*#__PURE__*/React.createElement(ReactTooltip, {
|
|
18
|
-
id: anchorId,
|
|
19
|
-
className: style.toolTipReact,
|
|
20
|
-
"data-event-off": "click",
|
|
21
|
-
place: "left",
|
|
22
|
-
effect: "solid",
|
|
23
|
-
"aria-label": closeToolTipInformationTextAriaLabel
|
|
24
|
-
}, content);
|
|
25
|
-
} else {
|
|
26
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: style.toolTip,
|
|
28
|
-
"data-testid": "tooltip",
|
|
29
|
-
"aria-label": closeToolTipInformationTextAriaLabel
|
|
30
|
-
}, content);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
ToolTipWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
35
|
-
toolTipIsVisible: PropTypes.bool,
|
|
36
|
-
anchorId: PropTypes.string,
|
|
37
|
-
closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,
|
|
38
|
-
content: PropTypes.node
|
|
39
|
-
} : {};
|
|
40
|
-
export const toggleStateOnKeyPress = (state, setState, ref) => event => {
|
|
41
|
-
if (event.key === 'Enter') {
|
|
42
|
-
if (ref) ref.current.focus();
|
|
43
|
-
event.stopPropagation();
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
setState(!state);
|
|
46
|
-
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
47
|
-
setState(false);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const ToolTip = ({
|
|
52
|
-
anchorId,
|
|
53
|
-
TooltipContent,
|
|
54
|
-
'aria-label': ariaLabel,
|
|
55
|
-
'data-testid': dataTestId,
|
|
56
|
-
closeToolTipInformationTextAriaLabel,
|
|
57
|
-
toolTipIsVisible: _toolTipIsVisible
|
|
58
|
-
}) => {
|
|
59
|
-
const isComponent = useMemo(() => !isString(TooltipContent) && /*#__PURE__*/isValidElement(TooltipContent()), [TooltipContent]);
|
|
60
|
-
const [toolTipIsVisible, setToolTipIsVisible] = useState(false);
|
|
61
|
-
const handleKeyPress = useCallback(event => {
|
|
62
|
-
toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);
|
|
63
|
-
}, [toolTipIsVisible]);
|
|
64
|
-
const handleMouseOver = useCallback(() => {
|
|
65
|
-
setToolTipIsVisible(true);
|
|
66
|
-
}, []);
|
|
67
|
-
const handleMouseLeave = useCallback(() => {
|
|
68
|
-
setToolTipIsVisible(false);
|
|
69
|
-
}, []);
|
|
70
|
-
const content = useMemo(() => {
|
|
71
|
-
return isComponent ? /*#__PURE__*/React.createElement(TooltipContent, null) : /*#__PURE__*/React.createElement("p", {
|
|
72
|
-
className: style.tooltipContent
|
|
73
|
-
}, TooltipContent);
|
|
74
|
-
}, [TooltipContent, isComponent]);
|
|
75
|
-
return anchorId ? /*#__PURE__*/React.createElement(ToolTipWrapper, {
|
|
76
|
-
toolTipIsVisible: _toolTipIsVisible,
|
|
77
|
-
anchorId: anchorId,
|
|
78
|
-
closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
|
|
79
|
-
content: content,
|
|
80
|
-
onMouseLeave: handleMouseLeave,
|
|
81
|
-
onMouseOver: handleMouseOver
|
|
82
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: style.tooltipContainer,
|
|
84
|
-
onMouseLeave: handleMouseLeave,
|
|
85
|
-
onMouseOver: handleMouseOver
|
|
86
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
87
|
-
type: "button",
|
|
88
|
-
className: style.tooltipIconContainer,
|
|
89
|
-
"data-testid": dataTestId,
|
|
90
|
-
onKeyDown: handleKeyPress,
|
|
91
|
-
tabIndex: 0
|
|
92
|
-
}, /*#__PURE__*/React.createElement(InformationIcon, {
|
|
93
|
-
className: style.informationIcon,
|
|
94
|
-
width: 12,
|
|
95
|
-
height: 12,
|
|
96
|
-
"aria-label": ariaLabel
|
|
97
|
-
})), /*#__PURE__*/React.createElement(ToolTipWrapper, {
|
|
98
|
-
toolTipIsVisible: toolTipIsVisible,
|
|
99
|
-
anchorId: anchorId,
|
|
100
|
-
closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
|
|
101
|
-
content: content
|
|
102
|
-
}));
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
106
|
-
TooltipContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node, PropTypes.string]),
|
|
107
|
-
'data-testid': PropTypes.string,
|
|
108
|
-
'aria-label': PropTypes.string,
|
|
109
|
-
closeToolTipInformationTextAriaLabel: PropTypes.string.isRequired,
|
|
110
|
-
// ---------- externalHandling --------------
|
|
111
|
-
// if passed down, React Tooltip is used instead, due to limitations on
|
|
112
|
-
// parents overflow hidden controls
|
|
113
|
-
anchorId: PropTypes.string,
|
|
114
|
-
toolTipIsVisible: PropTypes.bool
|
|
115
|
-
} : {};
|
|
116
|
-
export default ToolTip;
|
|
117
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","isValidElement","useState","useCallback","useMemo","PropTypes","ReactTooltip","isString","NovaCompositionCoorpacademyInformationIcon","InformationIcon","style","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","toolTipReact","toolTip","propTypes","bool","string","isRequired","node","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","isComponent","setToolTipIsVisible","handleKeyPress","handleMouseOver","handleMouseLeave","tooltipContent","tooltipContainer","tooltipIconContainer","informationIcon","oneOfType","func"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content\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={style.toolTip}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\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};\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}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleMouseOver = useCallback(() => {\n setToolTipIsVisible(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setToolTipIsVisible(false);\n }, []);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={style.tooltipContent}>{TooltipContent}</p>\n );\n }, [TooltipContent, 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 />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={ariaLabel}\n />\n </button>\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\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 // ---------- externalHandling --------------\n // if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,cAAf,EAA+BC,QAA/B,EAAyCC,WAAzC,EAAsDC,OAAtD,QAAoE,OAApE;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC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,OAJX;IAKE,YAAY,EAAE2B,gBALhB;IAME,WAAW,EAAED;EANf,EADa,gBAUb;IACE,SAAS,EAAE/B,KAAK,CAACkC,gBADnB;IAEE,YAAY,EAAEF,gBAFhB;IAGE,WAAW,EAAED;EAHf,gBAKE;IACE,IAAI,EAAC,QADP;IAEE,SAAS,EAAE/B,KAAK,CAACmC,oBAFnB;IAGE,eAAaT,UAHf;IAIE,SAAS,EAAEI,cAJb;IAKE,QAAQ,EAAE;EALZ,gBAOE,oBAAC,eAAD;IACE,SAAS,EAAE9B,KAAK,CAACoC,eADnB;IAEE,KAAK,EAAE,EAFT;IAGE,MAAM,EAAE,EAHV;IAIE,cAAYX;EAJd,EAPF,CALF,eAmBE,oBAAC,cAAD;IACE,gBAAgB,EAAEvB,gBADpB;IAEE,QAAQ,EAAEC,QAFZ;IAGE,oCAAoC,EAAEC,oCAHxC;IAIE,OAAO,EAAEC;EAJX,EAnBF,CAVF;AAqCD,CA3ED;;AA6EAkB,OAAO,CAACf,SAAR,2CAAoB;EAClBgB,cAAc,EAAE7B,SAAS,CAAC0C,SAAV,CAAoB,CAAC1C,SAAS,CAAC2C,IAAX,EAAiB3C,SAAS,CAACiB,IAA3B,EAAiCjB,SAAS,CAACe,MAA3C,CAApB,CADE;EAElB,eAAef,SAAS,CAACe,MAFP;EAGlB,cAAcf,SAAS,CAACe,MAHN;EAIlBN,oCAAoC,EAAET,SAAS,CAACe,MAAV,CAAiBC,UAJrC;EAKlB;EACA;EACA;EACAR,QAAQ,EAAER,SAAS,CAACe,MARF;EASlBR,gBAAgB,EAAEP,SAAS,CAACc;AATV,CAApB;AAYA,eAAec,OAAf"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
@value colors: "../../variables/colors.css";
|
|
2
|
-
@value cm_blue_900 from colors;
|
|
3
|
-
@value cm_grey_75 from colors;
|
|
4
|
-
@value cm_grey_500 from colors;
|
|
5
|
-
@value cm_grey_700 from colors;
|
|
6
|
-
|
|
7
|
-
.textBase {
|
|
8
|
-
font-family: "Gilroy";
|
|
9
|
-
font-style: normal;
|
|
10
|
-
color: cm_blue_900;
|
|
11
|
-
user-select: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tooltipContainer {
|
|
15
|
-
overflow: visible;
|
|
16
|
-
position: relative;
|
|
17
|
-
z-index: 10;
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
justify-self: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.tooltipIconContainer {
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: flex-end;
|
|
26
|
-
border: none;
|
|
27
|
-
background: cm_grey_75;
|
|
28
|
-
height: 25px;
|
|
29
|
-
align-items: center;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.toolTip {
|
|
33
|
-
transition: opacity 0.8s;
|
|
34
|
-
position: absolute;
|
|
35
|
-
border-radius: 7px;
|
|
36
|
-
background-color: cm_grey_700;
|
|
37
|
-
right: -75px;
|
|
38
|
-
bottom: 32px;
|
|
39
|
-
height: auto;
|
|
40
|
-
width: 200px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.toolTip::before {
|
|
44
|
-
content: '';
|
|
45
|
-
display: inline-block;
|
|
46
|
-
visibility: inherit;
|
|
47
|
-
opacity: inherit;
|
|
48
|
-
width: 15px;
|
|
49
|
-
height: 15px;
|
|
50
|
-
transform: rotate(-45deg);
|
|
51
|
-
background-color: cm_grey_700;
|
|
52
|
-
position: inherit;
|
|
53
|
-
border-radius: 2px;
|
|
54
|
-
bottom: -5px;
|
|
55
|
-
right: 40%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.tooltipContent {
|
|
59
|
-
composes: textBase;
|
|
60
|
-
font-weight: 500;
|
|
61
|
-
font-size: 14px;
|
|
62
|
-
display: inline-block;
|
|
63
|
-
border-radius: 3px;
|
|
64
|
-
word-wrap: break-word;
|
|
65
|
-
color: white;
|
|
66
|
-
padding: 8px 14px;
|
|
67
|
-
text-align: center;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.informationIcon {
|
|
71
|
-
color: cm_grey_500;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* ----------------------- ReactToolTip exclusive classes ------------------------- */
|
|
75
|
-
.toolTipReact {
|
|
76
|
-
pointer-events: all !important;
|
|
77
|
-
background-color: cm_grey_700;
|
|
78
|
-
border-radius: 7px !important;
|
|
79
|
-
visibility: visible !important;
|
|
80
|
-
opacity: 1 !important;
|
|
81
|
-
left: 5px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* for keyboard navigation, the position can't be obtained from the mouse */
|
|
85
|
-
[class*="__react_component_tooltip"]:not(.toolTipReact) {
|
|
86
|
-
border-radius: 7px !important;
|
|
87
|
-
top: 97px!important;
|
|
88
|
-
left: 628px!important;
|
|
89
|
-
visibility: visible !important;
|
|
90
|
-
opacity: 1!important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* same reason, arrow can't be placed effectively */
|
|
94
|
-
[class*="__react_component_tooltip"]:not(.toolTipReact)::after {
|
|
95
|
-
content: none !important;
|
|
96
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function toggleStateOnKeyPress(state: any, setState: any, ref: any): (event: any) => void;
|
|
2
|
-
export default ToolTip;
|
|
3
|
-
declare function ToolTip({ anchorId, TooltipContent, "aria-label": ariaLabel, "data-testid": dataTestId, closeToolTipInformationTextAriaLabel, toolTipIsVisible: _toolTipIsVisible }: {
|
|
4
|
-
anchorId: any;
|
|
5
|
-
TooltipContent: any;
|
|
6
|
-
"aria-label": any;
|
|
7
|
-
"data-testid": any;
|
|
8
|
-
closeToolTipInformationTextAriaLabel: any;
|
|
9
|
-
toolTipIsVisible: any;
|
|
10
|
-
}): JSX.Element;
|
|
11
|
-
declare namespace ToolTip {
|
|
12
|
-
const propTypes: {
|
|
13
|
-
TooltipContent: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
|
|
14
|
-
'data-testid': PropTypes.Requireable<string>;
|
|
15
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
16
|
-
closeToolTipInformationTextAriaLabel: PropTypes.Validator<string>;
|
|
17
|
-
anchorId: PropTypes.Requireable<string>;
|
|
18
|
-
toolTipIsVisible: PropTypes.Requireable<boolean>;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
import PropTypes from "prop-types";
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AA+CO,iGASN;;AAED;;;;;;;gBA2EC"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.toggleStateOnKeyPress = exports.default = void 0;
|
|
5
|
-
|
|
6
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
7
|
-
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
|
-
var _reactTooltip = _interopRequireDefault(require("react-tooltip"));
|
|
11
|
-
|
|
12
|
-
var _isString = _interopRequireDefault(require("lodash/fp/isString"));
|
|
13
|
-
|
|
14
|
-
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
15
|
-
|
|
16
|
-
var _style = _interopRequireDefault(require("./style.css"));
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
const ToolTipWrapper = ({
|
|
25
|
-
toolTipIsVisible,
|
|
26
|
-
anchorId,
|
|
27
|
-
closeToolTipInformationTextAriaLabel,
|
|
28
|
-
content
|
|
29
|
-
}) => {
|
|
30
|
-
if (!toolTipIsVisible) return null;
|
|
31
|
-
|
|
32
|
-
if (anchorId) {
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_reactTooltip.default, {
|
|
34
|
-
id: anchorId,
|
|
35
|
-
className: _style.default.toolTipReact,
|
|
36
|
-
"data-event-off": "click",
|
|
37
|
-
place: "left",
|
|
38
|
-
effect: "solid",
|
|
39
|
-
"aria-label": closeToolTipInformationTextAriaLabel
|
|
40
|
-
}, content);
|
|
41
|
-
} else {
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: _style.default.toolTip,
|
|
44
|
-
"data-testid": "tooltip",
|
|
45
|
-
"aria-label": closeToolTipInformationTextAriaLabel
|
|
46
|
-
}, content);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
ToolTipWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
51
|
-
toolTipIsVisible: _propTypes.default.bool,
|
|
52
|
-
anchorId: _propTypes.default.string,
|
|
53
|
-
closeToolTipInformationTextAriaLabel: _propTypes.default.string.isRequired,
|
|
54
|
-
content: _propTypes.default.node
|
|
55
|
-
} : {};
|
|
56
|
-
|
|
57
|
-
const toggleStateOnKeyPress = (state, setState, ref) => event => {
|
|
58
|
-
if (event.key === 'Enter') {
|
|
59
|
-
if (ref) ref.current.focus();
|
|
60
|
-
event.stopPropagation();
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
setState(!state);
|
|
63
|
-
} else if (event.key === 'Tab' || event.key === 'Escape') {
|
|
64
|
-
setState(false);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
exports.toggleStateOnKeyPress = toggleStateOnKeyPress;
|
|
69
|
-
|
|
70
|
-
const ToolTip = ({
|
|
71
|
-
anchorId,
|
|
72
|
-
TooltipContent,
|
|
73
|
-
'aria-label': ariaLabel,
|
|
74
|
-
'data-testid': dataTestId,
|
|
75
|
-
closeToolTipInformationTextAriaLabel,
|
|
76
|
-
toolTipIsVisible: _toolTipIsVisible
|
|
77
|
-
}) => {
|
|
78
|
-
const isComponent = (0, _react.useMemo)(() => !(0, _isString.default)(TooltipContent) && /*#__PURE__*/(0, _react.isValidElement)(TooltipContent()), [TooltipContent]);
|
|
79
|
-
const [toolTipIsVisible, setToolTipIsVisible] = (0, _react.useState)(false);
|
|
80
|
-
const handleKeyPress = (0, _react.useCallback)(event => {
|
|
81
|
-
toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);
|
|
82
|
-
}, [toolTipIsVisible]);
|
|
83
|
-
const handleMouseOver = (0, _react.useCallback)(() => {
|
|
84
|
-
setToolTipIsVisible(true);
|
|
85
|
-
}, []);
|
|
86
|
-
const handleMouseLeave = (0, _react.useCallback)(() => {
|
|
87
|
-
setToolTipIsVisible(false);
|
|
88
|
-
}, []);
|
|
89
|
-
const content = (0, _react.useMemo)(() => {
|
|
90
|
-
return isComponent ? /*#__PURE__*/_react.default.createElement(TooltipContent, null) : /*#__PURE__*/_react.default.createElement("p", {
|
|
91
|
-
className: _style.default.tooltipContent
|
|
92
|
-
}, TooltipContent);
|
|
93
|
-
}, [TooltipContent, isComponent]);
|
|
94
|
-
return anchorId ? /*#__PURE__*/_react.default.createElement(ToolTipWrapper, {
|
|
95
|
-
toolTipIsVisible: _toolTipIsVisible,
|
|
96
|
-
anchorId: anchorId,
|
|
97
|
-
closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
|
|
98
|
-
content: content,
|
|
99
|
-
onMouseLeave: handleMouseLeave,
|
|
100
|
-
onMouseOver: handleMouseOver
|
|
101
|
-
}) : /*#__PURE__*/_react.default.createElement("div", {
|
|
102
|
-
className: _style.default.tooltipContainer,
|
|
103
|
-
onMouseLeave: handleMouseLeave,
|
|
104
|
-
onMouseOver: handleMouseOver
|
|
105
|
-
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
106
|
-
type: "button",
|
|
107
|
-
className: _style.default.tooltipIconContainer,
|
|
108
|
-
"data-testid": dataTestId,
|
|
109
|
-
onKeyDown: handleKeyPress,
|
|
110
|
-
tabIndex: 0
|
|
111
|
-
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionCoorpacademyInformationIcon, {
|
|
112
|
-
className: _style.default.informationIcon,
|
|
113
|
-
width: 12,
|
|
114
|
-
height: 12,
|
|
115
|
-
"aria-label": ariaLabel
|
|
116
|
-
})), /*#__PURE__*/_react.default.createElement(ToolTipWrapper, {
|
|
117
|
-
toolTipIsVisible: toolTipIsVisible,
|
|
118
|
-
anchorId: anchorId,
|
|
119
|
-
closeToolTipInformationTextAriaLabel: closeToolTipInformationTextAriaLabel,
|
|
120
|
-
content: content
|
|
121
|
-
}));
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
ToolTip.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
125
|
-
TooltipContent: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node, _propTypes.default.string]),
|
|
126
|
-
'data-testid': _propTypes.default.string,
|
|
127
|
-
'aria-label': _propTypes.default.string,
|
|
128
|
-
closeToolTipInformationTextAriaLabel: _propTypes.default.string.isRequired,
|
|
129
|
-
// ---------- externalHandling --------------
|
|
130
|
-
// if passed down, React Tooltip is used instead, due to limitations on
|
|
131
|
-
// parents overflow hidden controls
|
|
132
|
-
anchorId: _propTypes.default.string,
|
|
133
|
-
toolTipIsVisible: _propTypes.default.bool
|
|
134
|
-
} : {};
|
|
135
|
-
var _default = ToolTip;
|
|
136
|
-
exports.default = _default;
|
|
137
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","style","toolTipReact","toolTip","propTypes","PropTypes","bool","string","isRequired","node","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","isComponent","useMemo","isString","isValidElement","setToolTipIsVisible","useState","handleKeyPress","useCallback","handleMouseOver","handleMouseLeave","tooltipContent","tooltipContainer","tooltipIconContainer","informationIcon","oneOfType","func"],"sources":["../../../src/atom/tooltip/index.js"],"sourcesContent":["import React, {isValidElement, useState, useCallback, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport ReactTooltip from 'react-tooltip';\nimport isString from 'lodash/fp/isString';\nimport {NovaCompositionCoorpacademyInformationIcon as InformationIcon} from '@coorpacademy/nova-icons';\nimport style from './style.css';\n\nconst ToolTipWrapper = ({\n toolTipIsVisible,\n anchorId,\n closeToolTipInformationTextAriaLabel,\n content\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={style.toolTip}\n data-testid=\"tooltip\"\n aria-label={closeToolTipInformationTextAriaLabel}\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};\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}) => {\n const isComponent = useMemo(\n () => !isString(TooltipContent) && isValidElement(TooltipContent()),\n [TooltipContent]\n );\n\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible)(event);\n },\n [toolTipIsVisible]\n );\n\n const handleMouseOver = useCallback(() => {\n setToolTipIsVisible(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setToolTipIsVisible(false);\n }, []);\n\n const content = useMemo(() => {\n return isComponent ? (\n <TooltipContent />\n ) : (\n <p className={style.tooltipContent}>{TooltipContent}</p>\n );\n }, [TooltipContent, 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 />\n ) : (\n <div\n className={style.tooltipContainer}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n >\n <button\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid={dataTestId}\n onKeyDown={handleKeyPress}\n tabIndex={0}\n >\n <InformationIcon\n className={style.informationIcon}\n width={12}\n height={12}\n aria-label={ariaLabel}\n />\n </button>\n <ToolTipWrapper\n toolTipIsVisible={toolTipIsVisible}\n anchorId={anchorId}\n closeToolTipInformationTextAriaLabel={closeToolTipInformationTextAriaLabel}\n content={content}\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 // ---------- externalHandling --------------\n // if passed down, React Tooltip is used instead, due to limitations on\n // parents overflow hidden controls\n anchorId: PropTypes.string,\n toolTipIsVisible: PropTypes.bool\n};\n\nexport default ToolTip;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAAC;EACtBC,gBADsB;EAEtBC,QAFsB;EAGtBC,oCAHsB;EAItBC;AAJsB,CAAD,KAKjB;EACJ,IAAI,CAACH,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,6BAAC,qBAAD;MACE,EAAE,EAAEA,QADN;MAEE,SAAS,EAAEG,cAAA,CAAMC,YAFnB;MAGE,kBAAe,OAHjB;MAIE,KAAK,EAAC,MAJR;MAKE,MAAM,EAAC,OALT;MAME,cAAYH;IANd,GAQGC,OARH,CADF;EAYD,CAbD,MAaO;IACL,oBACE;MACE,SAAS,EAAEC,cAAA,CAAME,OADnB;MAEE,eAAY,SAFd;MAGE,cAAYJ;IAHd,GAKGC,OALH,CADF;EASD;AACF,CA/BD;;AAiCAJ,cAAc,CAACQ,SAAf,2CAA2B;EACzBP,gBAAgB,EAAEQ,kBAAA,CAAUC,IADH;EAEzBR,QAAQ,EAAEO,kBAAA,CAAUE,MAFK;EAGzBR,oCAAoC,EAAEM,kBAAA,CAAUE,MAAV,CAAiBC,UAH9B;EAIzBR,OAAO,EAAEK,kBAAA,CAAUI;AAJM,CAA3B;;AAOO,M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B,cAAcF,kBAAA,CAAUE,MAHN;EAIlBR,oCAAoC,EAAEM,kBAAA,CAAUE,MAAV,CAAiBC,UAJrC;EAKlB;EACA;EACA;EACAV,QAAQ,EAAEO,kBAAA,CAAUE,MARF;EASlBV,gBAAgB,EAAEQ,kBAAA,CAAUC;AATV,CAApB;eAYec,O"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
@value colors: "../../variables/colors.css";
|
|
2
|
-
@value cm_blue_900 from colors;
|
|
3
|
-
@value cm_grey_75 from colors;
|
|
4
|
-
@value cm_grey_500 from colors;
|
|
5
|
-
@value cm_grey_700 from colors;
|
|
6
|
-
|
|
7
|
-
.textBase {
|
|
8
|
-
font-family: "Gilroy";
|
|
9
|
-
font-style: normal;
|
|
10
|
-
color: cm_blue_900;
|
|
11
|
-
user-select: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tooltipContainer {
|
|
15
|
-
overflow: visible;
|
|
16
|
-
position: relative;
|
|
17
|
-
z-index: 10;
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
justify-self: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.tooltipIconContainer {
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: flex-end;
|
|
26
|
-
border: none;
|
|
27
|
-
background: cm_grey_75;
|
|
28
|
-
height: 25px;
|
|
29
|
-
align-items: center;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.toolTip {
|
|
33
|
-
transition: opacity 0.8s;
|
|
34
|
-
position: absolute;
|
|
35
|
-
border-radius: 7px;
|
|
36
|
-
background-color: cm_grey_700;
|
|
37
|
-
right: -75px;
|
|
38
|
-
bottom: 32px;
|
|
39
|
-
height: auto;
|
|
40
|
-
width: 200px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.toolTip::before {
|
|
44
|
-
content: '';
|
|
45
|
-
display: inline-block;
|
|
46
|
-
visibility: inherit;
|
|
47
|
-
opacity: inherit;
|
|
48
|
-
width: 15px;
|
|
49
|
-
height: 15px;
|
|
50
|
-
transform: rotate(-45deg);
|
|
51
|
-
background-color: cm_grey_700;
|
|
52
|
-
position: inherit;
|
|
53
|
-
border-radius: 2px;
|
|
54
|
-
bottom: -5px;
|
|
55
|
-
right: 40%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.tooltipContent {
|
|
59
|
-
composes: textBase;
|
|
60
|
-
font-weight: 500;
|
|
61
|
-
font-size: 14px;
|
|
62
|
-
display: inline-block;
|
|
63
|
-
border-radius: 3px;
|
|
64
|
-
word-wrap: break-word;
|
|
65
|
-
color: white;
|
|
66
|
-
padding: 8px 14px;
|
|
67
|
-
text-align: center;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.informationIcon {
|
|
71
|
-
color: cm_grey_500;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* ----------------------- ReactToolTip exclusive classes ------------------------- */
|
|
75
|
-
.toolTipReact {
|
|
76
|
-
pointer-events: all !important;
|
|
77
|
-
background-color: cm_grey_700;
|
|
78
|
-
border-radius: 7px !important;
|
|
79
|
-
visibility: visible !important;
|
|
80
|
-
opacity: 1 !important;
|
|
81
|
-
left: 5px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* for keyboard navigation, the position can't be obtained from the mouse */
|
|
85
|
-
[class*="__react_component_tooltip"]:not(.toolTipReact) {
|
|
86
|
-
border-radius: 7px !important;
|
|
87
|
-
top: 97px!important;
|
|
88
|
-
left: 628px!important;
|
|
89
|
-
visibility: visible !important;
|
|
90
|
-
opacity: 1!important;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* same reason, arrow can't be placed effectively */
|
|
94
|
-
[class*="__react_component_tooltip"]:not(.toolTipReact)::after {
|
|
95
|
-
content: none !important;
|
|
96
|
-
}
|