@coorpacademy/components 11.12.3-alpha.4 → 11.12.3-alpha.6
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/battle-opponent/index.d.ts.map +1 -1
- package/es/atom/battle-opponent/index.js +4 -2
- package/es/atom/battle-opponent/index.js.map +1 -1
- package/es/atom/battle-opponent/style.css +12 -0
- package/es/atom/button/index.d.ts +14 -3
- package/es/atom/button/index.d.ts.map +1 -1
- package/es/atom/button/index.js +60 -27
- package/es/atom/button/index.js.map +1 -1
- package/es/atom/tooltip/index.d.ts.map +1 -1
- package/es/atom/tooltip/index.js +2 -1
- package/es/atom/tooltip/index.js.map +1 -1
- package/es/molecule/brand-form-group/index.d.ts +14 -3
- package/es/molecule/card/customer.js +1 -1
- package/es/molecule/card/customer.js.map +1 -1
- package/es/molecule/card/favorite.css +15 -35
- package/es/molecule/card/favorite.d.ts +1 -0
- package/es/molecule/card/favorite.d.ts.map +1 -1
- package/es/molecule/card/favorite.js +73 -18
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/card/selectable.js +1 -1
- package/es/molecule/card/selectable.js.map +1 -1
- package/es/molecule/course-section/style.css +6 -4
- package/es/molecule/draggable/style.css +5 -9
- package/es/molecule/draggable-list/index.d.ts +2 -50
- package/es/molecule/draggable-list/index.d.ts.map +1 -1
- package/es/molecule/draggable-list/index.js +2 -4
- package/es/molecule/draggable-list/index.js.map +1 -1
- package/es/organism/brand-form/index.d.ts +14 -3
- package/es/organism/list-item/index.d.ts +0 -1
- package/es/organism/list-item/index.js +1 -2
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-item/style.css +4 -6
- package/es/organism/list-items/index.d.ts +1 -4
- package/es/organism/list-items/index.d.ts.map +1 -1
- package/es/organism/list-items/index.js +13 -31
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +14 -3
- package/es/template/back-office/brand-update/index.d.ts +28 -8
- package/es/template/common/search-page/index.d.ts +14 -3
- package/lib/atom/battle-opponent/index.d.ts.map +1 -1
- package/lib/atom/battle-opponent/index.js +4 -2
- package/lib/atom/battle-opponent/index.js.map +1 -1
- package/lib/atom/battle-opponent/style.css +12 -0
- package/lib/atom/button/index.d.ts +14 -3
- package/lib/atom/button/index.d.ts.map +1 -1
- package/lib/atom/button/index.js +65 -27
- package/lib/atom/button/index.js.map +1 -1
- package/lib/atom/tooltip/index.d.ts.map +1 -1
- package/lib/atom/tooltip/index.js +2 -1
- package/lib/atom/tooltip/index.js.map +1 -1
- package/lib/molecule/brand-form-group/index.d.ts +14 -3
- package/lib/molecule/card/customer.js +1 -1
- package/lib/molecule/card/customer.js.map +1 -1
- package/lib/molecule/card/favorite.css +15 -35
- package/lib/molecule/card/favorite.d.ts +1 -0
- package/lib/molecule/card/favorite.d.ts.map +1 -1
- package/lib/molecule/card/favorite.js +75 -16
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/card/selectable.js +1 -1
- package/lib/molecule/card/selectable.js.map +1 -1
- package/lib/molecule/course-section/style.css +6 -4
- package/lib/molecule/draggable/style.css +5 -9
- package/lib/molecule/draggable-list/index.d.ts +2 -50
- package/lib/molecule/draggable-list/index.d.ts.map +1 -1
- package/lib/molecule/draggable-list/index.js +2 -5
- package/lib/molecule/draggable-list/index.js.map +1 -1
- package/lib/organism/brand-form/index.d.ts +14 -3
- package/lib/organism/list-item/index.d.ts +0 -1
- package/lib/organism/list-item/index.js +1 -2
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-item/style.css +4 -6
- package/lib/organism/list-items/index.d.ts +1 -4
- package/lib/organism/list-items/index.d.ts.map +1 -1
- package/lib/organism/list-items/index.js +13 -33
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +14 -3
- package/lib/template/back-office/brand-update/index.d.ts +28 -8
- package/lib/template/common/search-page/index.d.ts +14 -3
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;gHASf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;gHASf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;;CA2GhC,CAAC;AAQF,eAAe,cAAc,CAAC"}
|
|
@@ -83,13 +83,15 @@ const BattleOpponent = ({
|
|
|
83
83
|
className: style.informationIcon,
|
|
84
84
|
width: 20,
|
|
85
85
|
height: 20
|
|
86
|
-
})), /*#__PURE__*/React.createElement(
|
|
86
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
87
|
+
className: style.toolTipWrapper
|
|
88
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
87
89
|
fontSize: 12,
|
|
88
90
|
anchorId: battleOpponentInfoId,
|
|
89
91
|
toolTipIsVisible: toolTipIsVisible,
|
|
90
92
|
TooltipContent: TooltipContent,
|
|
91
93
|
closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text')
|
|
92
|
-
})) : /*#__PURE__*/React.createElement(ArrowRight, {
|
|
94
|
+
}))) : /*#__PURE__*/React.createElement(ArrowRight, {
|
|
93
95
|
className: style.rightArrow,
|
|
94
96
|
width: 16,
|
|
95
97
|
height: 16
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","rightArrow","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <ToolTip\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","useRef","classnames","v5","uuidV5","has","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyInformationIcon","InformationIcon","ToolTip","toggleStateOnKeyPress","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","wrapperClassnames","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","URL","buttonRef","handleMouseOver","clearTimeout","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","toolTipWrapper","rightArrow","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo, useState, useRef} from 'react';\nimport classnames from 'classnames';\nimport {v5 as uuidV5} from 'uuid';\nimport has from 'lodash/fp/has';\nimport {\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyInformationIcon as InformationIcon\n} from '@coorpacademy/nova-icons';\nimport ToolTip, {toggleStateOnKeyPress} from '../tooltip';\nimport Provider, {GetTranslateFromContext} from '../provider';\nimport {WebContextValues} from '../provider/web-context';\nimport propTypes, {BattleOpponentProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponent = (\n {\n isAlreadyEngaged,\n isRandom,\n userAvatarSrc,\n onClick,\n displayName,\n tooltipText,\n 'aria-label': ariaLabel\n }: BattleOpponentProps,\n legacyContext: WebContextValues\n) => {\n const translate: Required<WebContextValues>['translate'] = GetTranslateFromContext(legacyContext);\n const wrapperClassnames = useMemo(\n () => classnames(style.card, style['opponent-card'], isRandom ? style.random : null),\n [isRandom]\n );\n\n const displayNameClassnames = useMemo(\n () => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null),\n [isAlreadyEngaged]\n );\n\n const [mouseLeaveTimer, setMouseLeaveTimer] = useState<number | undefined>(undefined);\n const [toolTipIsVisible, setToolTipIsVisible] = useState(false);\n\n // to be replaced by useId when React17 is bumped to React18\n const [battleOpponentInfoId] = useState(\n isAlreadyEngaged ? uuidV5('engaged-battle-', uuidV5.URL) : undefined\n );\n\n const buttonRef = useRef(null);\n\n const handleMouseOver = useCallback(() => {\n mouseLeaveTimer && clearTimeout(mouseLeaveTimer);\n // @ts-expect-error (error: focus does not exists on type never)\n /* istanbul ignore next */ has(['current', 'focus'], buttonRef) && buttonRef.current.focus();\n setToolTipIsVisible(true);\n }, [mouseLeaveTimer]);\n\n const handleMouseLeave = useCallback(() => {\n setMouseLeaveTimer(\n setTimeout(() => {\n setToolTipIsVisible(false);\n // @ts-expect-error (error: blur does not exists on type never)\n /* istanbul ignore next */ has(['current', 'blur'], buttonRef) && buttonRef.current.blur();\n }, 500) as unknown as number\n );\n }, []);\n\n const handleKeyPress = useCallback(\n event => {\n toggleStateOnKeyPress(toolTipIsVisible, setToolTipIsVisible, buttonRef)(event);\n },\n [toolTipIsVisible]\n );\n\n const TooltipContent = useCallback(\n _props => (\n <p\n {..._props}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-testid=\"battle-opponent-tooltip-content\"\n >\n {tooltipText}\n </p>\n ),\n [handleMouseLeave, handleMouseOver, tooltipText]\n );\n\n return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n tabIndex={0}\n >\n <div className={style.avatar}>{isRandom ? null : <img src={userAvatarSrc} alt=\"\" />}</div>\n <p className={displayNameClassnames} tabIndex={0}>\n {displayName}\n </p>\n {isAlreadyEngaged ? (\n <>\n <button\n ref={buttonRef}\n tabIndex={0}\n type=\"button\"\n className={style.tooltipIconContainer}\n data-testid=\"battle-engaged-opponent-information-button\"\n onKeyDown={handleKeyPress}\n onMouseLeave={handleMouseLeave}\n onMouseOver={handleMouseOver}\n data-for={battleOpponentInfoId}\n data-tooltip-place=\"left\"\n data-tip={isAlreadyEngaged}\n aria-label={ariaLabel}\n >\n <InformationIcon className={style.informationIcon} width={20} height={20} />\n </button>\n <span className={style.toolTipWrapper}>\n <ToolTip\n fontSize={12}\n anchorId={battleOpponentInfoId}\n toolTipIsVisible={toolTipIsVisible}\n TooltipContent={TooltipContent}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n />\n </span>\n </>\n ) : (\n <ArrowRight className={style.rightArrow} width={16} height={16} />\n )}\n </li>\n );\n};\n\nBattleOpponent.propTypes = propTypes;\n\nBattleOpponent.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default BattleOpponent;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,EAA+CC,MAA/C,QAA4D,OAA5D;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,EAAE,IAAIC,MAAd,QAA2B,MAA3B;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SACEC,mCAAmC,IAAIC,UADzC,EAEEC,0CAA0C,IAAIC,eAFhD,QAGO,0BAHP;AAIA,OAAOC,OAAP,IAAiBC,qBAAjB,QAA6C,YAA7C;AACA,OAAOC,QAAP,IAAkBC,uBAAlB,QAAgD,aAAhD;AAEA,OAAOC,SAAP,MAA6C,cAA7C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CACrB;EACEC,gBADF;EAEEC,QAFF;EAGEC,aAHF;EAIEC,OAJF;EAKEC,WALF;EAMEC,WANF;EAOE,cAAcC;AAPhB,CADqB,EAUrBC,aAVqB,KAWlB;EACH,MAAMC,SAAkD,GAAGZ,uBAAuB,CAACW,aAAD,CAAlF;EACA,MAAME,iBAAiB,GAAG3B,OAAO,CAC/B,MAAMG,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,SAAS,EAAER,KAAK,CAACsC,eAAlC;IAAmD,KAAK,EAAE,EAA1D;IAA8D,MAAM,EAAE;EAAtE,EAdF,CADF,eAiBE;IAAM,SAAS,EAAEtC,KAAK,CAACuC;EAAvB,gBACE,oBAAC,OAAD;IACE,QAAQ,EAAE,EADZ;IAEE,QAAQ,EAAEjB,oBAFZ;IAGE,gBAAgB,EAAEF,gBAHpB;IAIE,cAAc,EAAEc,cAJlB;IAKE,oCAAoC,EAAExB,SAAS,CAC7C,oDAD6C;EALjD,EADF,CAjBF,CADe,gBA+Bf,oBAAC,UAAD;IAAY,SAAS,EAAEV,KAAK,CAACwC,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EAzCJ,CADF;AA8CD,CArHD;;AAuHAvC,cAAc,CAACF,SAAf,2CAA2BA,SAA3B;AAEAE,cAAc,CAACwC,YAAf,GAA8B;EAC5B/B,SAAS,EAAEb,QAAQ,CAAC6C,iBAAT,CAA2BhC;AADV,CAA9B;AAIA,eAAeT,cAAf"}
|
|
@@ -112,6 +112,18 @@
|
|
|
112
112
|
align-items: center;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
.toolTipWrapper {
|
|
116
|
+
position: absolute;
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.card .tooltipIconContainer + .toolTipWrapper [class*="__react_component_tooltip"]:not([class*="toolTipReact"]) {
|
|
121
|
+
position: sticky;
|
|
122
|
+
top: unset !important;
|
|
123
|
+
left: unset !important;
|
|
124
|
+
max-width: 75%;
|
|
125
|
+
}
|
|
126
|
+
|
|
115
127
|
@media mobile {
|
|
116
128
|
.opponent-card {
|
|
117
129
|
width: 100%;
|
|
@@ -5,17 +5,28 @@ declare namespace Button {
|
|
|
5
5
|
color: any;
|
|
6
6
|
submitValue: PropTypes.Requireable<string>;
|
|
7
7
|
disabled: PropTypes.Requireable<boolean>;
|
|
8
|
-
isLinkDisabled: PropTypes.Requireable<boolean>;
|
|
9
8
|
href: PropTypes.Requireable<string>;
|
|
10
9
|
download: PropTypes.Requireable<boolean>;
|
|
11
10
|
target: PropTypes.Requireable<string>;
|
|
12
11
|
type: PropTypes.Requireable<string>;
|
|
13
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
12
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
15
13
|
className: PropTypes.Requireable<string>;
|
|
16
|
-
buttonContentClassName: PropTypes.Requireable<string>;
|
|
17
14
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
18
15
|
'data-name': PropTypes.Requireable<string>;
|
|
16
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
17
|
+
'data-testid': PropTypes.Requireable<string>;
|
|
18
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
19
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
+
onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
+
buttonRef: PropTypes.Requireable<string>;
|
|
24
|
+
'data-for': PropTypes.Requireable<string>;
|
|
25
|
+
'data-tooltip-place': PropTypes.Requireable<string>;
|
|
26
|
+
'data-tip': PropTypes.Requireable<boolean>;
|
|
27
|
+
isLinkDisabled: PropTypes.Requireable<boolean>;
|
|
28
|
+
useWrapper: PropTypes.Requireable<boolean>;
|
|
29
|
+
buttonContentClassName: PropTypes.Requireable<string>;
|
|
19
30
|
};
|
|
20
31
|
}
|
|
21
32
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button/index.js"],"names":[],"mappings":";AA0IA,iDAgCC"}
|
package/es/atom/button/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
|
+
import noop from 'lodash/fp/noop';
|
|
6
7
|
import { ColorPropType } from '../../util/proptypes';
|
|
7
8
|
import Link from '../link';
|
|
8
9
|
import cssStyle from './style.css';
|
|
@@ -16,12 +17,21 @@ const ButtonContent = props => {
|
|
|
16
17
|
href,
|
|
17
18
|
target,
|
|
18
19
|
onClick,
|
|
19
|
-
className
|
|
20
|
+
className,
|
|
20
21
|
children,
|
|
21
22
|
type,
|
|
22
23
|
style,
|
|
23
24
|
'data-name': dataName,
|
|
24
|
-
'aria-label': ariaLabel
|
|
25
|
+
'aria-label': ariaLabel,
|
|
26
|
+
'data-testid': dataTestid,
|
|
27
|
+
useButtonTag,
|
|
28
|
+
buttonRef,
|
|
29
|
+
'data-for': dataFor,
|
|
30
|
+
'data-tooltip-place': dataTooltipPlace,
|
|
31
|
+
'data-tip': dataTip,
|
|
32
|
+
onKeyDown = noop,
|
|
33
|
+
onMouseLeave = noop,
|
|
34
|
+
onMouseOver = noop
|
|
25
35
|
} = props;
|
|
26
36
|
const anchorClassName = disabled && `${className} ${cssStyle.disabledAnchor}` || className;
|
|
27
37
|
const anchorOnClick = disabled && null || onClick;
|
|
@@ -51,6 +61,26 @@ const ButtonContent = props => {
|
|
|
51
61
|
style: style
|
|
52
62
|
}, submitValue || children);
|
|
53
63
|
|
|
64
|
+
case 'button':
|
|
65
|
+
if (useButtonTag) return /*#__PURE__*/React.createElement("button", {
|
|
66
|
+
ref: buttonRef,
|
|
67
|
+
type: "button",
|
|
68
|
+
"data-for": dataFor,
|
|
69
|
+
"data-tooltip-place": dataTooltipPlace,
|
|
70
|
+
"data-tip": dataTip,
|
|
71
|
+
"data-name": dataName,
|
|
72
|
+
"data-testid": dataTestid,
|
|
73
|
+
"aria-label": ariaLabel.favorite,
|
|
74
|
+
className: className,
|
|
75
|
+
onClick: onClick,
|
|
76
|
+
style: style,
|
|
77
|
+
onKeyDown: onKeyDown,
|
|
78
|
+
onMouseLeave: onMouseLeave,
|
|
79
|
+
onMouseOver: onMouseOver,
|
|
80
|
+
tabIndex: 0
|
|
81
|
+
}, children);
|
|
82
|
+
// falls through in case type is button BUT no button tag is needed, for retro-compatibility
|
|
83
|
+
|
|
54
84
|
default:
|
|
55
85
|
return /*#__PURE__*/React.createElement("input", {
|
|
56
86
|
"data-name": dataName,
|
|
@@ -74,12 +104,23 @@ ButtonContent.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
74
104
|
download: PropTypes.bool,
|
|
75
105
|
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
|
76
106
|
type: PropTypes.string,
|
|
77
|
-
onClick: PropTypes.func,
|
|
78
107
|
children: PropTypes.node,
|
|
79
108
|
className: PropTypes.string,
|
|
80
109
|
style: PropTypes.shape({}),
|
|
81
110
|
'data-name': PropTypes.string,
|
|
82
|
-
'aria-label': PropTypes.string
|
|
111
|
+
'aria-label': PropTypes.string,
|
|
112
|
+
'data-testid': PropTypes.string,
|
|
113
|
+
useButtonTag: PropTypes.bool,
|
|
114
|
+
// event handlers
|
|
115
|
+
onClick: PropTypes.func,
|
|
116
|
+
onKeyDown: PropTypes.func,
|
|
117
|
+
onMouseLeave: PropTypes.func,
|
|
118
|
+
onMouseOver: PropTypes.func,
|
|
119
|
+
// for ReactTooltip handling
|
|
120
|
+
buttonRef: PropTypes.string,
|
|
121
|
+
'data-for': PropTypes.string,
|
|
122
|
+
'data-tooltip-place': PropTypes.string,
|
|
123
|
+
'data-tip': PropTypes.bool
|
|
83
124
|
} : {};
|
|
84
125
|
|
|
85
126
|
const Button = props => {
|
|
@@ -89,33 +130,25 @@ const Button = props => {
|
|
|
89
130
|
isLinkDisabled,
|
|
90
131
|
type = 'submit',
|
|
91
132
|
children,
|
|
92
|
-
|
|
133
|
+
useWrapper = true
|
|
93
134
|
} = props;
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
135
|
+
const buttonWrapperClassNames = useMemo(() => isLinkDisabled && classnames([cssStyle.disabledAnchor, className]) || classnames([cssStyle.button, className]), [className, isLinkDisabled]);
|
|
136
|
+
const contentClassName = useMemo(() => buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent, [buttonContentClassName]);
|
|
137
|
+
return useWrapper ? /*#__PURE__*/React.createElement("div", {
|
|
138
|
+
className: buttonWrapperClassNames
|
|
97
139
|
}, /*#__PURE__*/React.createElement(ButtonContent, _extends({}, props, {
|
|
98
140
|
type: type,
|
|
99
|
-
className:
|
|
100
|
-
|
|
101
|
-
|
|
141
|
+
className: contentClassName
|
|
142
|
+
}), children)) : /*#__PURE__*/React.createElement(ButtonContent, _extends({}, props, {
|
|
143
|
+
type: type,
|
|
144
|
+
className: contentClassName
|
|
145
|
+
}), children);
|
|
102
146
|
};
|
|
103
147
|
|
|
104
|
-
Button.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
105
|
-
color: ColorPropType,
|
|
106
|
-
submitValue: PropTypes.string,
|
|
107
|
-
disabled: PropTypes.bool,
|
|
148
|
+
Button.propTypes = process.env.NODE_ENV !== "production" ? _extends({
|
|
108
149
|
isLinkDisabled: PropTypes.bool,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
type: PropTypes.string,
|
|
113
|
-
onClick: PropTypes.func,
|
|
114
|
-
children: PropTypes.node,
|
|
115
|
-
className: PropTypes.string,
|
|
116
|
-
buttonContentClassName: PropTypes.string,
|
|
117
|
-
style: PropTypes.shape({}),
|
|
118
|
-
'data-name': PropTypes.string
|
|
119
|
-
} : {};
|
|
150
|
+
useWrapper: PropTypes.bool,
|
|
151
|
+
buttonContentClassName: PropTypes.string
|
|
152
|
+
}, ButtonContent.propTypes) : {};
|
|
120
153
|
export default Button;
|
|
121
154
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","ColorPropType","Link","cssStyle","ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","noop","ColorPropType","Link","cssStyle","ButtonContent","props","color","submitValue","disabled","download","href","target","onClick","className","children","type","style","dataName","ariaLabel","dataTestid","useButtonTag","buttonRef","dataFor","dataTooltipPlace","dataTip","onKeyDown","onMouseLeave","onMouseOver","anchorClassName","disabledAnchor","anchorOnClick","anchorHref","inputClassName","buttonDisabled","favorite","propTypes","string","bool","oneOf","node","shape","func","Button","buttonContentClassName","isLinkDisabled","useWrapper","buttonWrapperClassNames","button","contentClassName","buttonContent"],"sources":["../../../src/atom/button/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport noop from 'lodash/fp/noop';\nimport {ColorPropType} from '../../util/proptypes';\nimport Link from '../link';\nimport cssStyle from './style.css';\n\nconst ButtonContent = props => {\n const {\n color,\n submitValue,\n disabled,\n download,\n href,\n target,\n onClick,\n className,\n children,\n type,\n style,\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n 'data-testid': dataTestid,\n useButtonTag,\n buttonRef,\n 'data-for': dataFor,\n 'data-tooltip-place': dataTooltipPlace,\n 'data-tip': dataTip,\n onKeyDown = noop,\n onMouseLeave = noop,\n onMouseOver = noop\n } = props;\n const anchorClassName = (disabled && `${className} ${cssStyle.disabledAnchor}`) || className;\n const anchorOnClick = (disabled && null) || onClick;\n const anchorHref = (disabled && null) || href;\n const inputClassName = (disabled && `${className} ${cssStyle.buttonDisabled}`) || className;\n\n switch (type) {\n case 'link':\n return (\n <Link\n data-name={dataName}\n href={anchorHref}\n download={download}\n onClick={anchorOnClick}\n target={target}\n className={anchorClassName}\n style={style}\n aria-label={ariaLabel}\n >\n {submitValue || children || 'submit'}\n </Link>\n );\n\n case 'a':\n return (\n <a\n data-name={dataName}\n href={anchorHref}\n target={target}\n className={anchorClassName}\n onClick={anchorOnClick}\n style={style}\n >\n {submitValue || children}\n </a>\n );\n\n case 'button':\n if (useButtonTag)\n return (\n <button\n ref={buttonRef}\n type=\"button\"\n data-for={dataFor}\n data-tooltip-place={dataTooltipPlace}\n data-tip={dataTip}\n data-name={dataName}\n data-testid={dataTestid}\n aria-label={ariaLabel.favorite}\n className={className}\n onClick={onClick}\n style={style}\n onKeyDown={onKeyDown}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n tabIndex={0}\n >\n {children}\n </button>\n );\n // falls through in case type is button BUT no button tag is needed, for retro-compatibility\n default:\n return (\n <input\n data-name={dataName}\n type={type}\n value={submitValue}\n disabled={disabled}\n onClick={onClick}\n className={inputClassName}\n style={{\n color,\n ...style\n }}\n />\n );\n }\n};\n\nButtonContent.propTypes = {\n color: ColorPropType,\n submitValue: PropTypes.string,\n disabled: PropTypes.bool,\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),\n type: PropTypes.string,\n children: PropTypes.node,\n className: PropTypes.string,\n style: PropTypes.shape({}),\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-testid': PropTypes.string,\n useButtonTag: PropTypes.bool,\n // event handlers\n onClick: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onMouseOver: PropTypes.func,\n // for ReactTooltip handling\n buttonRef: PropTypes.string,\n 'data-for': PropTypes.string,\n 'data-tooltip-place': PropTypes.string,\n 'data-tip': PropTypes.bool\n};\n\nconst Button = props => {\n const {\n className,\n buttonContentClassName,\n isLinkDisabled,\n type = 'submit',\n children,\n useWrapper = true\n } = props;\n const buttonWrapperClassNames = useMemo(\n () =>\n (isLinkDisabled && classnames([cssStyle.disabledAnchor, className])) ||\n classnames([cssStyle.button, className]),\n [className, isLinkDisabled]\n );\n\n const contentClassName = useMemo(\n () => (buttonContentClassName ? buttonContentClassName : cssStyle.buttonContent),\n [buttonContentClassName]\n );\n\n return useWrapper ? (\n <div className={buttonWrapperClassNames}>\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n </div>\n ) : (\n <ButtonContent {...props} type={type} className={contentClassName}>\n {children}\n </ButtonContent>\n );\n};\n\nButton.propTypes = {\n isLinkDisabled: PropTypes.bool,\n useWrapper: PropTypes.bool,\n buttonContentClassName: PropTypes.string,\n ...ButtonContent.propTypes\n};\n\nexport default Button;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,QAAP,MAAqB,aAArB;;AAEA,MAAMC,aAAa,GAAGC,KAAK,IAAI;EAC7B,MAAM;IACJC,KADI;IAEJC,WAFI;IAGJC,QAHI;IAIJC,QAJI;IAKJC,IALI;IAMJC,MANI;IAOJC,OAPI;IAQJC,SARI;IASJC,QATI;IAUJC,IAVI;IAWJC,KAXI;IAYJ,aAAaC,QAZT;IAaJ,cAAcC,SAbV;IAcJ,eAAeC,UAdX;IAeJC,YAfI;IAgBJC,SAhBI;IAiBJ,YAAYC,OAjBR;IAkBJ,sBAAsBC,gBAlBlB;IAmBJ,YAAYC,OAnBR;IAoBJC,SAAS,GAAGzB,IApBR;IAqBJ0B,YAAY,GAAG1B,IArBX;IAsBJ2B,WAAW,GAAG3B;EAtBV,IAuBFK,KAvBJ;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/tooltip/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/tooltip/index.js"],"names":[],"mappings":"AAoEO,iGASN;;AAED;;;;;;;;;;;gBA0FC"}
|
package/es/atom/tooltip/index.js
CHANGED
|
@@ -23,6 +23,7 @@ const ToolTipWrapper = ({
|
|
|
23
23
|
handleContentMouseOver,
|
|
24
24
|
iconSize
|
|
25
25
|
}) => {
|
|
26
|
+
const coorpToolTipClasses = classnames(style.toolTip, iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip);
|
|
26
27
|
if (!toolTipIsVisible) return null;
|
|
27
28
|
|
|
28
29
|
if (anchorId) {
|
|
@@ -36,7 +37,7 @@ const ToolTipWrapper = ({
|
|
|
36
37
|
}, content);
|
|
37
38
|
} else {
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className:
|
|
40
|
+
className: coorpToolTipClasses,
|
|
40
41
|
"data-testid": "tooltip",
|
|
41
42
|
"aria-label": closeToolTipInformationTextAriaLabel,
|
|
42
43
|
onMouseOver: handleContentMouseOver
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","isValidElement","useState","useCallback","useMemo","classnames","PropTypes","ReactTooltip","isString","keys","NovaCompositionCoorpacademyInformationIcon","InformationIcon","style","FontSizes","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","toolTipReact","toolTip","bigIconToolTip","smallIconToolTip","propTypes","bool","string","isRequired","node","func","oneOf","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","isComponent","setToolTipIsVisible","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","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 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={classnames(\n style.toolTip,\n iconSize === 'big' ? style.bigIconToolTip : style.smallIconToolTip\n )}\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,OAAOA,KAAP,IAAeC,cAAf,EAA+BC,QAA/B,EAAyCC,WAAzC,EAAsDC,OAAtD,QAAoE,OAApE;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,YAAP,MAAyB,eAAzB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,0CAA0C,IAAIC,eAAtD,QAA4E,0BAA5E;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,SAAS,GAAG;EAChB,IAAID,KAAK,CAACE,wBADM;EAEhB,IAAIF,KAAK,CAACG;AAFM,CAAlB;AAKA,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,EADS;EAEhBC,GAAG,EAAE;AAFW,CAAlB;;AAKA,M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d,EAPF,CALF,eAmBE,oBAAC,cAAD;IACE,gBAAgB,EAAE7B,gBADpB;IAEE,QAAQ,EAAEC,QAFZ;IAGE,oCAAoC,EAAEC,oCAHxC;IAIE,OAAO,EAAEC,OAJX;IAKE,sBAAsB,EAAEC,sBAL1B;IAME,QAAQ,EAAE8B,QANZ;IAOE,QAAQ,EAAE7B;EAPZ,EAnBF,CAXF;AAyCD,CA1FD;;AA4FAsB,OAAO,CAACjB,SAAR,2CAAoB;EAClBkB,cAAc,EAAE1C,SAAS,CAAC+D,SAAV,CAAoB,CAAC/D,SAAS,CAAC6B,IAAX,EAAiB7B,SAAS,CAAC4B,IAA3B,EAAiC5B,SAAS,CAAC0B,MAA3C,CAApB,CADE;EAElB,eAAe1B,SAAS,CAAC0B,MAFP;EAGlB,cAAc1B,SAAS,CAAC0B,MAHN;EAIlBV,oCAAoC,EAAEhB,SAAS,CAAC0B,MAAV,CAAiBC,UAJrC;EAKlB;EACAmB,sBAAsB,EAAE9C,SAAS,CAAC0B,MANhB;EAOlBqB,SAAS,EAAE/C,SAAS,CAACgE,MAPH;EAQlBhB,QAAQ,EAAEhD,SAAS,CAAC8B,KAAV,CAAgB,CAAC,EAAD,EAAK,EAAL,CAAhB,CARQ;EASlBX,QAAQ,EAAEnB,SAAS,CAAC8B,KAAV,CAAgB3B,IAAI,CAACO,SAAD,CAApB,CATQ;EAUlB;EACA;EACA;EACA;EACAK,QAAQ,EAAEf,SAAS,CAAC0B,MAdF;EAelBZ,gBAAgB,EAAEd,SAAS,CAACyB;AAfV,CAApB;AAkBA,eAAegB,OAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","isValidElement","useState","useCallback","useMemo","classnames","PropTypes","ReactTooltip","isString","keys","NovaCompositionCoorpacademyInformationIcon","InformationIcon","style","FontSizes","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","coorpToolTipClasses","toolTip","bigIconToolTip","smallIconToolTip","toolTipReact","propTypes","bool","string","isRequired","node","func","oneOf","toggleStateOnKeyPress","state","setState","ref","event","key","current","focus","stopPropagation","preventDefault","ToolTip","TooltipContent","ariaLabel","dataTestId","_toolTipIsVisible","iconContainerClassName","delayHide","fontSize","isComponent","setToolTipIsVisible","mouseLeaveTimer","setMouseLeaveTimer","undefined","handleKeyPress","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,OAAOA,KAAP,IAAeC,cAAf,EAA+BC,QAA/B,EAAyCC,WAAzC,EAAsDC,OAAtD,QAAoE,OAApE;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,YAAP,MAAyB,eAAzB;AACA,OAAOC,QAAP,MAAqB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ACAK,QAAQ,EAAEf,SAAS,CAAC2B,MAdF;EAelBb,gBAAgB,EAAEd,SAAS,CAAC0B;AAfV,CAApB;AAkBA,eAAegB,OAAf"}
|
|
@@ -386,16 +386,27 @@ declare namespace BrandFormGroup {
|
|
|
386
386
|
color: any;
|
|
387
387
|
submitValue: PropTypes.Requireable<string>;
|
|
388
388
|
disabled: PropTypes.Requireable<boolean>;
|
|
389
|
-
isLinkDisabled: PropTypes.Requireable<boolean>;
|
|
390
389
|
href: PropTypes.Requireable<string>;
|
|
391
390
|
download: PropTypes.Requireable<boolean>;
|
|
392
391
|
target: PropTypes.Requireable<string>;
|
|
393
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
394
392
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
395
393
|
className: PropTypes.Requireable<string>;
|
|
396
|
-
buttonContentClassName: PropTypes.Requireable<string>;
|
|
397
394
|
style: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
398
395
|
'data-name': PropTypes.Requireable<string>;
|
|
396
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
397
|
+
'data-testid': PropTypes.Requireable<string>;
|
|
398
|
+
useButtonTag: PropTypes.Requireable<boolean>;
|
|
399
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
400
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
401
|
+
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
402
|
+
onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
|
|
403
|
+
buttonRef: PropTypes.Requireable<string>;
|
|
404
|
+
'data-for': PropTypes.Requireable<string>;
|
|
405
|
+
'data-tooltip-place': PropTypes.Requireable<string>;
|
|
406
|
+
'data-tip': PropTypes.Requireable<boolean>;
|
|
407
|
+
isLinkDisabled: PropTypes.Requireable<boolean>;
|
|
408
|
+
useWrapper: PropTypes.Requireable<boolean>;
|
|
409
|
+
buttonContentClassName: PropTypes.Requireable<string>;
|
|
399
410
|
}> | PropTypes.InferProps<{
|
|
400
411
|
buttonType: PropTypes.Requireable<string>;
|
|
401
412
|
type: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.js","names":["React","PropTypes","classnames","style","THEMES","default","coorpmanager","Customer","props","name","type","coorpOriginal","theme","disabled","ariaLabel","className","customer","chapterCustomer","content","coorp","original","propTypes","oneOf","string","bool","isRequired"],"sources":["../../../src/molecule/card/customer.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport style from './customer.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst Customer = props => {\n const {name, type, coorpOriginal, theme, disabled
|
|
1
|
+
{"version":3,"file":"customer.js","names":["React","PropTypes","classnames","style","THEMES","default","coorpmanager","Customer","props","name","type","coorpOriginal","theme","disabled","ariaLabel","className","customer","chapterCustomer","content","coorp","original","propTypes","oneOf","string","bool","isRequired"],"sources":["../../../src/molecule/card/customer.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {keys} from 'lodash/fp';\nimport style from './customer.css';\n\nexport const THEMES = {\n default: null,\n coorpmanager: style.coorpmanager\n};\n\nconst Customer = props => {\n const {name, type, coorpOriginal, theme, disabled, 'aria-label': ariaLabel} = props;\n const className = classnames(\n THEMES[theme],\n style.customer,\n type === 'chapter' ? style.chapterCustomer : null\n );\n\n return (\n <div className={className} disabled={disabled} aria-label={ariaLabel}>\n <div className={style.content}>\n {coorpOriginal ? <span className={style.coorp}>Coorp </span> : null}\n {coorpOriginal ? <span className={style.original}>Original </span> : null}\n {!coorpOriginal && name}\n </div>\n </div>\n );\n};\n\nCustomer.propTypes = {\n theme: PropTypes.oneOf(keys(THEMES)),\n type: PropTypes.string,\n name: PropTypes.string,\n coorpOriginal: PropTypes.bool.isRequired,\n disabled: PropTypes.bool,\n 'a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IALD;EAMnB,cAAcvB,SAAS,CAACsB;AANL,CAArB;AASA,eAAehB,QAAf"}
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
z-index: 1;
|
|
17
17
|
font-size: 30px;
|
|
18
18
|
overflow: hidden;
|
|
19
|
-
line-height:
|
|
19
|
+
line-height: 0px;
|
|
20
20
|
box-shadow: 0 0 13px 0 rgba(0, 0, 0, 0.11);
|
|
21
21
|
background-color: #ffffff;
|
|
22
22
|
border-radius: 100%;
|
|
23
|
+
border: none;
|
|
24
|
+
padding: 0;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
.favorite:hover .moreIcon {
|
|
@@ -29,10 +31,6 @@
|
|
|
29
31
|
.favorite .moreIcon {
|
|
30
32
|
color: color(black a(63%));
|
|
31
33
|
transition: color 0.25s ease-in-out;
|
|
32
|
-
margin: 6px;
|
|
33
|
-
}
|
|
34
|
-
.favorite .checkIcon {
|
|
35
|
-
margin: 6px;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
.favorite.selected .moreIcon {
|
|
@@ -47,48 +45,30 @@
|
|
|
47
45
|
color: inherit;
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
.
|
|
51
|
-
visibility: hidden;
|
|
52
|
-
background-color: color(black a(80%));
|
|
53
|
-
color: #fff;
|
|
54
|
-
text-align: center;
|
|
55
|
-
border-radius: 3px;
|
|
56
|
-
z-index: 1;
|
|
57
|
-
opacity: 0;
|
|
58
|
-
transition: opacity 0.8s;
|
|
48
|
+
.favoriteWrapper {
|
|
59
49
|
position: absolute;
|
|
60
|
-
|
|
61
|
-
right: 45px;
|
|
62
|
-
top: 8px;
|
|
50
|
+
width: 100%;
|
|
63
51
|
}
|
|
64
52
|
|
|
65
|
-
.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
border: solid 5px ;
|
|
71
|
-
border-color: transparent transparent transparent color(black a(80%));
|
|
53
|
+
.favoriteWrapper .favorite + [class*="__react_component_tooltip"]:not([class*="toolTipReact"]) {
|
|
54
|
+
position: sticky;
|
|
55
|
+
top: unset !important;
|
|
56
|
+
left: unset !important;
|
|
57
|
+
transform: translateX(25%);
|
|
72
58
|
}
|
|
73
59
|
|
|
74
|
-
.
|
|
75
|
-
|
|
76
|
-
opacity: 1;
|
|
60
|
+
.favoriteWrapper .favorite + [class*="__react_component_tooltip"] {
|
|
61
|
+
opacity: 0.95!important;
|
|
77
62
|
}
|
|
78
63
|
|
|
79
|
-
.showToolTip span {
|
|
80
|
-
display: block;
|
|
81
|
-
word-wrap: break-word;
|
|
82
|
-
padding: 3px 10px 5px;
|
|
83
|
-
font-family: "Gilroy";
|
|
84
|
-
font-size: 12px;
|
|
85
|
-
font-weight: bold;
|
|
86
|
-
}
|
|
87
64
|
|
|
88
65
|
@media mobile {
|
|
89
66
|
.favorite {
|
|
90
67
|
font-size: 33px;
|
|
91
68
|
}
|
|
69
|
+
.favoriteWrapper .favorite + [class*="__react_component_tooltip"]:not([class*="toolTipReact"]) {
|
|
70
|
+
transform: translateX(10%);
|
|
71
|
+
}
|
|
92
72
|
}
|
|
93
73
|
|
|
94
74
|
@media (hover: none) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"favorite.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/favorite.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"favorite.d.ts","sourceRoot":"","sources":["../../../src/molecule/card/favorite.js"],"names":[],"mappings":";AAcA;;;;;;;;oCA0IC"}
|