@coorpacademy/components 11.12.3-alpha.3 → 11.12.3-alpha.5
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/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/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 +70 -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/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 -29
- package/es/organism/list-items/index.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +0 -2
- 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/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/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 +71 -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/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 -31
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +0 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/draggable-list/index.js"],"names":[],"mappings":";AAQA;;;;gBAmDC"}
|
|
@@ -5,11 +5,9 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import Draggable from '../draggable';
|
|
6
6
|
import SetupSection from '../setup-section';
|
|
7
7
|
import CourseSection from '../course-section';
|
|
8
|
-
import ListItem from '../../organism/list-item';
|
|
9
8
|
const ITEMS = {
|
|
10
9
|
'setup-section': SetupSection,
|
|
11
|
-
'course-section': CourseSection
|
|
12
|
-
'list-item': ListItem
|
|
10
|
+
'course-section': CourseSection
|
|
13
11
|
};
|
|
14
12
|
|
|
15
13
|
const DraggableList = ({
|
|
@@ -50,7 +48,7 @@ const DraggableList = ({
|
|
|
50
48
|
};
|
|
51
49
|
|
|
52
50
|
DraggableList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
53
|
-
items: PropTypes.arrayOf(PropTypes.
|
|
51
|
+
items: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),
|
|
54
52
|
onDrop: PropTypes.func,
|
|
55
53
|
itemType: PropTypes.string
|
|
56
54
|
} : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Draggable","SetupSection","CourseSection","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Draggable","SetupSection","CourseSection","ITEMS","DraggableList","items","onDrop","itemType","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","Item","itemsView","map","item","propTypes","arrayOf","shape","func","string"],"sources":["../../../src/molecule/draggable-list/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport CourseSection from '../course-section';\n\nconst ITEMS = {'setup-section': SetupSection, 'course-section': CourseSection};\n\nconst DraggableList = ({items, onDrop, itemType}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n const Item = ITEMS[itemType];\n const itemsView = items.map(item => (\n <Draggable\n key={item.id}\n id={item.id}\n dragging={dragTo === item.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <Item {...item} key={item.id} />\n </Draggable>\n ));\n return <div>{itemsView}</div>;\n};\n\nDraggableList.propTypes = {\n items: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),\n onDrop: PropTypes.func,\n itemType: PropTypes.string\n};\n\nexport default DraggableList;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AAEA,MAAMC,KAAK,GAAG;EAAC,iBAAiBF,YAAlB;EAAgC,kBAAkBC;AAAlD,CAAd;;AAEA,MAAME,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,MAAR;EAAgBC;AAAhB,CAAD,KAA+B;EACnD,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBZ,QAAQ,CAAC,IAAD,CAApC;EACA,MAAM,CAACa,QAAD,EAAWC,WAAX,IAA0Bd,QAAQ,CAAC,IAAD,CAAxC;EAEA,MAAMe,gBAAgB,GAAGd,WAAW,CAClCe,EAAE,IAAI;IACJF,WAAW,CAACE,EAAD,CAAX;EACD,CAHiC,EAIlC,CAACF,WAAD,CAJkC,CAApC;EAOA,MAAMG,eAAe,GAAGhB,WAAW,CACjCe,EAAE,IAAI;IACJ,IAAIL,MAAM,KAAKK,EAAf,EAAmB;IACnBJ,SAAS,CAACI,EAAD,CAAT;EACD,CAJgC,EAKjC,CAACL,MAAD,EAASC,SAAT,CALiC,CAAnC;EAQA,MAAMM,gBAAgB,GAAGjB,WAAW,CAClCe,EAAE,IAAI;IACJJ,SAAS,CAAC,IAAD,CAAT;EACD,CAHiC,EAIlC,CAACA,SAAD,CAJkC,CAApC;EAOA,MAAMO,WAAW,GAAGlB,WAAW,CAC7Be,EAAE,IAAI;IACJ,IAAIP,MAAM,IAAII,QAAd,EAAwBJ,MAAM,CAACI,QAAD,EAAWG,EAAX,CAAN;IAExBJ,SAAS,CAAC,IAAD,CAAT;IACAE,WAAW,CAAC,IAAD,CAAX;EACD,CAN4B,EAO7B,CAACL,MAAD,EAASG,SAAT,EAAoBE,WAApB,EAAiCD,QAAjC,CAP6B,CAA/B;EAUA,MAAMO,IAAI,GAAGd,KAAK,CAACI,QAAD,CAAlB;EACA,MAAMW,SAAS,GAAGb,KAAK,CAACc,GAAN,CAAUC,IAAI,iBAC9B,oBAAC,SAAD;IACE,GAAG,EAAEA,IAAI,CAACP,EADZ;IAEE,EAAE,EAAEO,IAAI,CAACP,EAFX;IAGE,QAAQ,EAAEL,MAAM,KAAKY,IAAI,CAACP,EAH5B;IAIE,WAAW,EAAED,gBAJf;IAKE,UAAU,EAAEE,eALd;IAME,WAAW,EAAEC,gBANf;IAOE,MAAM,EAAEC;EAPV,gBASE,oBAAC,IAAD,eAAUI,IAAV;IAAgB,GAAG,EAAEA,IAAI,CAACP;EAA1B,GATF,CADgB,CAAlB;EAaA,oBAAO,iCAAMK,SAAN,CAAP;AACD,CAnDD;;AAqDAd,aAAa,CAACiB,SAAd,2CAA0B;EACxBhB,KAAK,EAAEN,SAAS,CAACuB,OAAV,CAAkBvB,SAAS,CAACwB,KAAV,CAAgBtB,YAAY,CAACoB,SAA7B,CAAlB,CADiB;EAExBf,MAAM,EAAEP,SAAS,CAACyB,IAFM;EAGxBjB,QAAQ,EAAER,SAAS,CAAC0B;AAHI,CAA1B;AAMA,eAAerB,aAAf"}
|
|
@@ -78,8 +78,7 @@ ListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
78
78
|
title: PropTypes.string.isRequired,
|
|
79
79
|
order: PropTypes.number,
|
|
80
80
|
'aria-label': PropTypes.string,
|
|
81
|
-
contentType: PropTypes.string
|
|
82
|
-
id: PropTypes.string
|
|
81
|
+
contentType: PropTypes.string
|
|
83
82
|
} : {};
|
|
84
83
|
export default ListItem;
|
|
85
84
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","wrapper","orderWrapper","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Tag","ButtonLink","BulletPointMenuButton","style","ListItem","props","isPublished","bulletPointMenuButton","buttonLink","tags","title","order","ariaLabel","contentType","tagsView","convert","cap","tag","index","type","wrapper","orderWrapper","settings","edit","propTypes","shape","buttonAriaLabel","string","menuAriaLabel","buttons","arrayOf","label","onClick","func","dataName","icon","position","oneOf","isRequired","number"],"sources":["../../../src/organism/list-item/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport style from './style.css';\n\nconst ListItem = props => {\n let isPublished = false;\n const {\n bulletPointMenuButton,\n buttonLink,\n tags,\n title,\n order,\n 'aria-label': ariaLabel,\n contentType\n } = props;\n const tagsView = map.convert({cap: false})((tag, index) => {\n isPublished = tag.type === 'published';\n return (\n <div key={index} className={style.tag}>\n <Tag {...tag} />\n </div>\n );\n })(tags);\n return (\n <div className={style.wrapper}>\n {isPublished && contentType === 'certification' ? (\n <div className={style.orderWrapper}>\n <div className={style.order} aria-label={ariaLabel}>\n {order + 1}\n </div>\n <div className={style.title} title={title}>\n {title}\n </div>\n </div>\n ) : (\n <div className={style.title} title={title}>\n {title}\n </div>\n )}\n <div className={style.settings}>\n {tagsView}\n <div className={style.edit}>\n <ButtonLink {...buttonLink} />\n </div>\n <BulletPointMenuButton {...bulletPointMenuButton} />\n </div>\n </div>\n );\n};\n\nListItem.propTypes = {\n bulletPointMenuButton: PropTypes.shape({\n buttonAriaLabel: PropTypes.string,\n menuAriaLabel: PropTypes.string,\n buttons: PropTypes.arrayOf(\n PropTypes.shape({\n 'data-name': PropTypes.string,\n label: PropTypes.string,\n type: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n onClick: PropTypes.func\n }),\n buttonLink: PropTypes.shape({\n type: PropTypes.string,\n label: PropTypes.string,\n ariaLabel: PropTypes.string,\n dataName: PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.string,\n type: PropTypes.string\n }),\n onClick: PropTypes.func\n }),\n tags: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.oneOf(['published', 'draft', 'archived', 'revised', 'default'])\n })\n ),\n title: PropTypes.string.isRequired,\n order: PropTypes.number,\n 'aria-label': PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItem;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,qBAAP,MAAkC,yCAAlC;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAGC,KAAK,IAAI;EACxB,IAAIC,WAAW,GAAG,KAAlB;EACA,MAAM;IACJC,qBADI;IAEJC,UAFI;IAGJC,IAHI;IAIJC,KAJI;IAKJC,KALI;IAMJ,cAAcC,SANV;IAOJC;EAPI,IAQFR,KARJ;;EASA,MAAMS,QAAQ,GAAG,KAAIC,OAAJ,CAAY;IAACC,GAAG,EAAE;EAAN,CAAZ,EAA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|
display: flex;
|
|
42
|
-
height: 100%;
|
|
42
|
+
height: 100%;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.tag {
|
|
46
|
-
margin: 0 16px 0 0;
|
|
46
|
+
margin: 0 16px 0 0;
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
}
|
|
@@ -64,10 +64,8 @@
|
|
|
64
64
|
color: cm_grey_400;
|
|
65
65
|
margin: 0 16px 0 0;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
67
|
.orderWrapper {
|
|
69
68
|
align-items: center;
|
|
70
69
|
display: flex;
|
|
71
70
|
width: 100%;
|
|
72
|
-
|
|
73
|
-
}
|
|
71
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export default ListItems;
|
|
2
|
-
declare function ListItems({ title, buttonLink, items, "aria-label": ariaLabel, contentType
|
|
2
|
+
declare function ListItems({ title, buttonLink, items, "aria-label": ariaLabel, contentType }: {
|
|
3
3
|
title: any;
|
|
4
4
|
buttonLink: any;
|
|
5
5
|
items: any;
|
|
6
6
|
"aria-label": any;
|
|
7
7
|
contentType: any;
|
|
8
|
-
onDrop: any;
|
|
9
8
|
}): JSX.Element;
|
|
10
9
|
declare namespace ListItems {
|
|
11
10
|
const propTypes: {
|
|
@@ -61,11 +60,9 @@ declare namespace ListItems {
|
|
|
61
60
|
order: PropTypes.Requireable<number>;
|
|
62
61
|
'aria-label': PropTypes.Requireable<string>;
|
|
63
62
|
contentType: PropTypes.Requireable<string>;
|
|
64
|
-
id: PropTypes.Requireable<string>;
|
|
65
63
|
}> | null | undefined)[]>;
|
|
66
64
|
title: PropTypes.Requireable<string>;
|
|
67
65
|
contentType: PropTypes.Requireable<string>;
|
|
68
|
-
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
69
66
|
};
|
|
70
67
|
}
|
|
71
68
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/list-items/index.js"],"names":[],"mappings":";AAOA;;;;;;gBAsBC"}
|
|
@@ -1,23 +1,19 @@
|
|
|
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
3
|
import React from 'react';
|
|
4
|
-
import findIndex from 'lodash/fp/findIndex';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import ListItem from '../list-item';
|
|
7
|
-
import DraggableList from '../../molecule/draggable-list';
|
|
8
6
|
import Title from '../../atom/title';
|
|
9
7
|
import ButtonLink from '../../atom/button-link';
|
|
10
8
|
import style from './style.css';
|
|
11
9
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
onDrop: onDrop
|
|
20
|
-
});
|
|
10
|
+
const ListItems = ({
|
|
11
|
+
title,
|
|
12
|
+
buttonLink,
|
|
13
|
+
items,
|
|
14
|
+
'aria-label': ariaLabel,
|
|
15
|
+
contentType
|
|
16
|
+
}) => {
|
|
21
17
|
const itemsView = items.map((item, index) => /*#__PURE__*/React.createElement("li", {
|
|
22
18
|
key: item.id,
|
|
23
19
|
className: style.item,
|
|
@@ -26,21 +22,6 @@ const buildItemsView = (items, contentType, onDrop, ariaLabel) => {
|
|
|
26
22
|
order: index,
|
|
27
23
|
contentType: contentType
|
|
28
24
|
}))));
|
|
29
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
30
|
-
className: style.list,
|
|
31
|
-
"aria-label": ariaLabel,
|
|
32
|
-
"data-name": 'content-list'
|
|
33
|
-
}, itemsView);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const ListItems = ({
|
|
37
|
-
title,
|
|
38
|
-
buttonLink,
|
|
39
|
-
items,
|
|
40
|
-
'aria-label': ariaLabel,
|
|
41
|
-
contentType,
|
|
42
|
-
onDrop
|
|
43
|
-
}) => {
|
|
44
25
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
45
26
|
className: style.header
|
|
46
27
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -51,7 +32,11 @@ const ListItems = ({
|
|
|
51
32
|
"data-name": 'list-title'
|
|
52
33
|
})), /*#__PURE__*/React.createElement("div", {
|
|
53
34
|
className: style.buttonCreate
|
|
54
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink))),
|
|
35
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink))), /*#__PURE__*/React.createElement("ul", {
|
|
36
|
+
className: style.list,
|
|
37
|
+
"aria-label": ariaLabel,
|
|
38
|
+
"data-name": 'content-list'
|
|
39
|
+
}, itemsView));
|
|
55
40
|
};
|
|
56
41
|
|
|
57
42
|
ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -59,8 +44,7 @@ ListItems.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
59
44
|
buttonLink: PropTypes.shape(ButtonLink.propTypes),
|
|
60
45
|
items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),
|
|
61
46
|
title: PropTypes.string,
|
|
62
|
-
contentType: PropTypes.string
|
|
63
|
-
onDrop: PropTypes.func
|
|
47
|
+
contentType: PropTypes.string
|
|
64
48
|
} : {};
|
|
65
49
|
export default ListItems;
|
|
66
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","ListItem","Title","ButtonLink","style","ListItems","title","buttonLink","items","ariaLabel","contentType","itemsView","map","item","index","id","header","buttonCreate","list","propTypes","string","shape","arrayOf"],"sources":["../../../src/organism/list-items/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel, contentType}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} order={index} contentType={contentType} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string,\n contentType: PropTypes.string\n};\n\nexport default ListItems;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC,KAAD;EAAQC,UAAR;EAAoBC,KAApB;EAA2B,cAAcC,SAAzC;EAAoDC;AAApD,CAAD,KAAsE;EACtF,MAAMC,SAAS,GAAGH,KAAK,CAACI,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;IAAI,GAAG,EAAED,IAAI,CAACE,EAAd;IAAkB,SAAS,EAAEX,KAAK,CAACS,IAAnC;IAAyC,aAAY,WAAUC,KAAM;EAArE,gBACE,oBAAC,QAAD,eAAcD,IAAd;IAAoB,KAAK,EAAEC,KAA3B;IAAkC,WAAW,EAAEJ;EAA/C,GADF,CADgB,CAAlB;EAMA,oBACE,8CACE;IAAK,SAAS,EAAEN,KAAK,CAACY;EAAtB,gBACE;IAAK,SAAS,EAAEZ,KAAK,CAACE;EAAtB,gBACE,oBAAC,KAAD;IAAO,KAAK,EAAEA,KAAd;IAAqB,IAAI,EAAE,YAA3B;IAAyC,aAAW;EAApD,EADF,CADF,eAIE;IAAK,SAAS,EAAEF,KAAK,CAACa;EAAtB,gBACE,oBAAC,UAAD,EAAgBV,UAAhB,CADF,CAJF,CADF,eASE;IAAI,SAAS,EAAEH,KAAK,CAACc,IAArB;IAA2B,cAAYT,SAAvC;IAAkD,aAAW;EAA7D,GACGE,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAN,SAAS,CAACc,SAAV,2CAAsB;EACpB,cAAcnB,SAAS,CAACoB,MADJ;EAEpBb,UAAU,EAAEP,SAAS,CAACqB,KAAV,CAAgBlB,UAAU,CAACgB,SAA3B,CAFQ;EAGpBX,KAAK,EAAER,SAAS,CAACsB,OAAV,CAAkBtB,SAAS,CAACqB,KAAV,CAAgBpB,QAAQ,CAACkB,SAAzB,CAAlB,CAHa;EAIpBb,KAAK,EAAEN,SAAS,CAACoB,MAJG;EAKpBV,WAAW,EAAEV,SAAS,CAACoB;AALH,CAAtB;AAQA,eAAef,SAAf"}
|
|
@@ -1522,10 +1522,8 @@ declare namespace BrandUpdate {
|
|
|
1522
1522
|
order: PropTypes.Requireable<number>;
|
|
1523
1523
|
'aria-label': PropTypes.Requireable<string>;
|
|
1524
1524
|
contentType: PropTypes.Requireable<string>;
|
|
1525
|
-
id: PropTypes.Requireable<string>;
|
|
1526
1525
|
}> | null | undefined)[]>;
|
|
1527
1526
|
title: PropTypes.Requireable<string>;
|
|
1528
|
-
onDrop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1529
1527
|
}> | PropTypes.InferProps<{
|
|
1530
1528
|
key: PropTypes.Requireable<string>;
|
|
1531
1529
|
type: PropTypes.Requireable<string>;
|
|
@@ -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"}
|
|
@@ -102,13 +102,15 @@ const BattleOpponent = ({
|
|
|
102
102
|
className: _style.default.informationIcon,
|
|
103
103
|
width: 20,
|
|
104
104
|
height: 20
|
|
105
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
105
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
106
|
+
className: _style.default.toolTipWrapper
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
106
108
|
fontSize: 12,
|
|
107
109
|
anchorId: battleOpponentInfoId,
|
|
108
110
|
toolTipIsVisible: toolTipIsVisible,
|
|
109
111
|
TooltipContent: TooltipContent,
|
|
110
112
|
closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text')
|
|
111
|
-
})) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
|
|
113
|
+
}))) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
|
|
112
114
|
className: _style.default.rightArrow,
|
|
113
115
|
width: 16,
|
|
114
116
|
height: 16
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","GetTranslateFromContext","wrapperClassnames","useMemo","classnames","style","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","useState","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","uuidV5","URL","buttonRef","useRef","handleMouseOver","useCallback","clearTimeout","has","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","toggleStateOnKeyPress","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","rightArrow","propTypes","contextTypes","Provider","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":["BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","ariaLabel","legacyContext","translate","GetTranslateFromContext","wrapperClassnames","useMemo","classnames","style","card","random","displayNameClassnames","name","alreadyEngaged","mouseLeaveTimer","setMouseLeaveTimer","useState","undefined","toolTipIsVisible","setToolTipIsVisible","battleOpponentInfoId","uuidV5","URL","buttonRef","useRef","handleMouseOver","useCallback","clearTimeout","has","current","focus","handleMouseLeave","setTimeout","blur","handleKeyPress","event","toggleStateOnKeyPress","TooltipContent","_props","avatar","tooltipIconContainer","informationIcon","toolTipWrapper","rightArrow","propTypes","contextTypes","Provider","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;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,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,GAAG,IAAAC,iCAAA,EAAwBF,aAAxB,CAA3D;EACA,MAAMG,iBAAiB,GAAG,IAAAC,cAAA,EACxB,MAAM,IAAAC,mBAAA,EAAWC,cAAA,CAAMC,IAAjB,EAAuBD,cAAA,CAAM,eAAN,CAAvB,EAA+CZ,QAAQ,GAAGY,cAAA,CAAME,MAAT,GAAkB,IAAzE,CADkB,EAExB,CAACd,QAAD,CAFwB,CAA1B;EAKA,MAAMe,qBAAqB,GAAG,IAAAL,cAAA,EAC5B,MAAM,IAAAC,mBAAA,EAAWC,cAAA,CAAMI,IAAjB,EAAuBjB,gBAAgB,GAAGa,cAAA,CAAMK,cAAT,GAA0B,IAAjE,CADsB,EAE5B,CAAClB,gBAAD,CAF4B,C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B,cAJlB;IAKE,oCAAoC,EAAElC,SAAS,CAC7C,oDAD6C;EALjD,EADF,CAjBF,CADe,gBA+Bf,6BAAC,8CAAD;IAAY,SAAS,EAAEK,cAAA,CAAMmC,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EAzCJ,CADF;AA8CD,CArHD;;AAuHAjD,cAAc,CAACkD,SAAf,2CAA2BA,kBAA3B;AAEAlD,cAAc,CAACmD,YAAf,GAA8B;EAC5B1C,SAAS,EAAE2C,iBAAA,CAASC,iBAAT,CAA2B5C;AADV,CAA9B;eAIeT,c"}
|
|
@@ -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%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/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"}
|
|
@@ -42,6 +42,7 @@ const ToolTipWrapper = ({
|
|
|
42
42
|
handleContentMouseOver,
|
|
43
43
|
iconSize
|
|
44
44
|
}) => {
|
|
45
|
+
const coorpToolTipClasses = (0, _classnames.default)(_style.default.toolTip, iconSize === 'big' ? _style.default.bigIconToolTip : _style.default.smallIconToolTip);
|
|
45
46
|
if (!toolTipIsVisible) return null;
|
|
46
47
|
|
|
47
48
|
if (anchorId) {
|
|
@@ -55,7 +56,7 @@ const ToolTipWrapper = ({
|
|
|
55
56
|
}, content);
|
|
56
57
|
} else {
|
|
57
58
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
className:
|
|
59
|
+
className: coorpToolTipClasses,
|
|
59
60
|
"data-testid": "tooltip",
|
|
60
61
|
"aria-label": closeToolTipInformationTextAriaLabel,
|
|
61
62
|
onMouseOver: handleContentMouseOver
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["FontSizes","style","tooltipContentFontSize12","tooltipContentFontSize14","IconSizes","small","big","ToolTipWrapper","toolTipIsVisible","anchorId","closeToolTipInformationTextAriaLabel","content","handleContentMouseOver","iconSize","toolTipReact","classnames","toolTip","bigIconToolTip","smallIconToolTip","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 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;;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;AANsB,CAAD,KAOjB;EACJ,IAAI,CAACL,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,6BAAC,qBAAD;MACE,EAAE,EAAEA,QADN;MAEE,SAAS,EAAER,cAAA,CAAMa,YAFnB;MAGE,kBAAe,OAHjB;MAIE,KAAK,EAAC,MAJR;MAKE,MAAM,EAAC,OALT;MAME,cAAYJ;IANd,GAQGC,OARH,CADF;EAYD,CAbD,MAaO;IACL,oBACE;MACE,SAAS,EAAE,IAAAI,mBAAA,EACTd,cAAA,CAAMe,OADG,EAETH,QAAQ,KAAK,KAAb,GAAqBZ,cAAA,CAAMgB,cAA3B,GAA4ChB,cAAA,CAAMiB,gBAFzC,CADb;MAKE,eAAY,SALd;MAME,cAAYR,oCANd;MAOE,WAAW,EAAEE;IAPf,GASGD,OATH,CADF;EAaD;AACF,CArCD;;AAuCAJ,cAAc,C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B,sBAAsB,EAAEvB,kBAAA,CAAUE,MANhB;EAOlBsB,SAAS,EAAExB,kBAAA,CAAU8C,MAPH;EAQlBrB,QAAQ,EAAEzB,kBAAA,CAAUM,KAAV,CAAgB,CAAC,EAAD,EAAK,EAAL,CAAhB,CARQ;EASlBb,QAAQ,EAAEO,kBAAA,CAAUM,KAAV,CAAgB,IAAAC,aAAA,EAAKvB,SAAL,CAAhB,CATQ;EAUlB;EACA;EACA;EACA;EACAK,QAAQ,EAAEW,kBAAA,CAAUE,MAdF;EAelBd,gBAAgB,EAAEY,kBAAA,CAAUC;AAfV,CAApB;eAkBeiB,O"}
|
|
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,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;AANsB,CAAD,KAOjB;EACJ,MAAMC,mBAAmB,GAAG,IAAAC,mBAAA,EAC1Bd,cAAA,CAAMe,OADoB,EAE1BH,QAAQ,KAAK,KAAb,GAAqBZ,cAAA,CAAMgB,cAA3B,GAA4ChB,cAAA,CAAMiB,gBAFxB,CAA5B;EAIA,IAAI,CAACV,gBAAL,EAAuB,OAAO,IAAP;;EACvB,IAAIC,QAAJ,EAAc;IACZ,oBACE,6BAAC,qBAAD;MACE,EAAE,EAAEA,QADN;MAEE,SAAS,EAAER,cAAA,CAAMkB,YAFnB;MAGE,kBAAe,OAHjB;MAIE,KAAK,EAAC,MAJR;MAKE,MAAM,EAAC,OALT;MAME,cAAYT;IANd,GAQGC,OARH,CADF;EAYD,CAbD,MAaO;IACL,oBACE;MACE,SAAS,EAAE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AUE,MAFP;EAGlB,cAAcF,kBAAA,CAAUE,MAHN;EAIlBb,oCAAoC,EAAEW,kBAAA,CAAUE,MAAV,CAAiBC,UAJrC;EAKlB;EACAoB,sBAAsB,EAAEvB,kBAAA,CAAUE,MANhB;EAOlBsB,SAAS,EAAExB,kBAAA,CAAU8C,MAPH;EAQlBrB,QAAQ,EAAEzB,kBAAA,CAAUM,KAAV,CAAgB,CAAC,EAAD,EAAK,EAAL,CAAhB,CARQ;EASlBd,QAAQ,EAAEQ,kBAAA,CAAUM,KAAV,CAAgB,IAAAC,aAAA,EAAKxB,SAAL,CAAhB,CATQ;EAUlB;EACA;EACA;EACA;EACAK,QAAQ,EAAEY,kBAAA,CAAUE,MAdF;EAelBf,gBAAgB,EAAEa,kBAAA,CAAUC;AAfV,CAApB;eAkBeiB,O"}
|
|
@@ -27,7 +27,7 @@ const Customer = props => {
|
|
|
27
27
|
type,
|
|
28
28
|
coorpOriginal,
|
|
29
29
|
theme,
|
|
30
|
-
disabled
|
|
30
|
+
disabled,
|
|
31
31
|
'aria-label': ariaLabel
|
|
32
32
|
} = props;
|
|
33
33
|
const className = (0, _classnames.default)(THEMES[theme], _customer.default.customer, type === 'chapter' ? _customer.default.chapterCustomer : null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer.js","names":["THEMES","default","coorpmanager","style","Customer","props","name","type","coorpOriginal","theme","disabled","ariaLabel","className","classnames","customer","chapterCustomer","content","coorp","original","propTypes","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":["THEMES","default","coorpmanager","style","Customer","props","name","type","coorpOriginal","theme","disabled","ariaLabel","className","classnames","customer","chapterCustomer","content","coorp","original","propTypes","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 'aria-label': PropTypes.string\n};\n\nexport default Customer;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;AAEO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,IADW;EAEpBC,YAAY,EAAEC,iBAAA,CAAMD;AAFA,CAAf;;;AAKP,MAAME,QAAQ,GAAGC,KAAK,IAAI;EACxB,MAAM;IAACC,IAAD;IAAOC,IAAP;IAAaC,aAAb;IAA4BC,KAA5B;IAAmCC,QAAnC;IAA6C,cAAcC;EAA3D,IAAwEN,KAA9E;EACA,MAAMO,SAAS,GAAG,IAAAC,mBAAA,EAChBb,MAAM,CAACS,KAAD,CADU,EAEhBN,iBAAA,CAAMW,QAFU,EAGhBP,IAAI,KAAK,SAAT,GAAqBJ,iBAAA,CAAMY,eAA3B,GAA6C,IAH7B,CAAlB;EAMA,oBACE;IAAK,SAAS,EAAEH,SAAhB;IAA2B,QAAQ,EAAEF,QAArC;IAA+C,cAAYC;EAA3D,gBACE;IAAK,SAAS,EAAER,iBAAA,CAAMa;EAAtB,GACGR,aAAa,gBAAG;IAAM,SAAS,EAAEL,iBAAA,CAAMc;EAAvB,YAAH,GAAiD,IADjE,EAEGT,aAAa,gBAAG;IAAM,SAAS,EAAEL,iBAAA,CAAMe;EAAvB,eAAH,GAAuD,IAFvE,EAGG,CAACV,aAAD,IAAkBF,IAHrB,CADF,CADF;AASD,CAjBD;;AAmBAF,QAAQ,CAACe,SAAT,2CAAqB;EACnBV,KAAK,EAAEW,kBAAA,CAAUC,KAAV,CAAgB,oBAAKrB,MAAL,CAAhB,CADY;EAEnBO,IAAI,EAAEa,kBAAA,CAAUE,MAFG;EAGnBhB,IAAI,EAAEc,kBAAA,CAAUE,MAHG;EAInBd,aAAa,EAAEY,kBAAA,CAAUG,IAAV,CAAeC,UAJX;EAKnBd,QAAQ,EAAEU,kBAAA,CAAUG,IALD;EAMnB,cAAcH,kBAAA,CAAUE;AANL,CAArB;eASelB,Q"}
|
|
@@ -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":";AAaA;;;;;;;;oCAwIC"}
|