@coorpacademy/components 11.11.3-alpha.3 → 11.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/es/atom/tooltip/index.d.ts +1 -3
  2. package/es/atom/tooltip/index.d.ts.map +1 -1
  3. package/es/atom/tooltip/index.js +7 -17
  4. package/es/atom/tooltip/index.js.map +1 -1
  5. package/es/atom/tooltip/style.css +2 -10
  6. package/es/globals.d.js.map +1 -1
  7. package/es/molecule/video-player-mobile/index.native.d.ts +2 -1
  8. package/es/molecule/video-player-mobile/index.native.d.ts.map +1 -1
  9. package/es/molecule/video-player-mobile/index.native.js +23 -11
  10. package/es/molecule/video-player-mobile/index.native.js.map +1 -1
  11. package/es/organism/review-slide/index.native.d.ts.map +1 -1
  12. package/es/organism/review-slide/index.native.js +29 -15
  13. package/es/organism/review-slide/index.native.js.map +1 -1
  14. package/es/organism/user-preferences/index.d.ts.map +1 -1
  15. package/es/organism/user-preferences/index.js +3 -6
  16. package/es/organism/user-preferences/index.js.map +1 -1
  17. package/lib/atom/tooltip/index.d.ts +1 -3
  18. package/lib/atom/tooltip/index.d.ts.map +1 -1
  19. package/lib/atom/tooltip/index.js +7 -18
  20. package/lib/atom/tooltip/index.js.map +1 -1
  21. package/lib/atom/tooltip/style.css +2 -10
  22. package/lib/globals.d.js.map +1 -1
  23. package/lib/molecule/video-player-mobile/index.native.d.ts +2 -1
  24. package/lib/molecule/video-player-mobile/index.native.d.ts.map +1 -1
  25. package/lib/molecule/video-player-mobile/index.native.js +23 -11
  26. package/lib/molecule/video-player-mobile/index.native.js.map +1 -1
  27. package/lib/organism/review-slide/index.native.d.ts.map +1 -1
  28. package/lib/organism/review-slide/index.native.js +37 -23
  29. package/lib/organism/review-slide/index.native.js.map +1 -1
  30. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  31. package/lib/organism/user-preferences/index.js +3 -10
  32. package/lib/organism/user-preferences/index.js.map +1 -1
  33. package/locales/.mtslconfig.json +1 -0
  34. package/package.json +2 -3
  35. package/es/atom/battle-opponent/index.d.ts +0 -19
  36. package/es/atom/battle-opponent/index.d.ts.map +0 -1
  37. package/es/atom/battle-opponent/index.js +0 -52
  38. package/es/atom/battle-opponent/index.js.map +0 -1
  39. package/es/atom/battle-opponent/prop-types.d.ts +0 -19
  40. package/es/atom/battle-opponent/prop-types.d.ts.map +0 -1
  41. package/es/atom/battle-opponent/prop-types.js +0 -11
  42. package/es/atom/battle-opponent/prop-types.js.map +0 -1
  43. package/es/atom/battle-opponent/style.css +0 -124
  44. package/es/molecule/battle-opponent-list/index.d.ts +0 -18
  45. package/es/molecule/battle-opponent-list/index.d.ts.map +0 -1
  46. package/es/molecule/battle-opponent-list/index.js +0 -25
  47. package/es/molecule/battle-opponent-list/index.js.map +0 -1
  48. package/es/molecule/battle-opponent-list/prop-types.d.ts +0 -26
  49. package/es/molecule/battle-opponent-list/prop-types.d.ts.map +0 -1
  50. package/es/molecule/battle-opponent-list/prop-types.js +0 -14
  51. package/es/molecule/battle-opponent-list/prop-types.js.map +0 -1
  52. package/es/molecule/battle-opponent-list/style.css +0 -5
  53. package/lib/atom/battle-opponent/index.d.ts +0 -19
  54. package/lib/atom/battle-opponent/index.d.ts.map +0 -1
  55. package/lib/atom/battle-opponent/index.js +0 -70
  56. package/lib/atom/battle-opponent/index.js.map +0 -1
  57. package/lib/atom/battle-opponent/prop-types.d.ts +0 -19
  58. package/lib/atom/battle-opponent/prop-types.d.ts.map +0 -1
  59. package/lib/atom/battle-opponent/prop-types.js +0 -20
  60. package/lib/atom/battle-opponent/prop-types.js.map +0 -1
  61. package/lib/atom/battle-opponent/style.css +0 -124
  62. package/lib/molecule/battle-opponent-list/index.d.ts +0 -18
  63. package/lib/molecule/battle-opponent-list/index.d.ts.map +0 -1
  64. package/lib/molecule/battle-opponent-list/index.js +0 -43
  65. package/lib/molecule/battle-opponent-list/index.js.map +0 -1
  66. package/lib/molecule/battle-opponent-list/prop-types.d.ts +0 -26
  67. package/lib/molecule/battle-opponent-list/prop-types.d.ts.map +0 -1
  68. package/lib/molecule/battle-opponent-list/prop-types.js +0 -23
  69. package/lib/molecule/battle-opponent-list/prop-types.js.map +0 -1
  70. package/lib/molecule/battle-opponent-list/style.css +0 -5
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { WebContextValues } from '../provider/web-context';
3
- import { BattleOpponentProps } from './prop-types';
4
- declare const BattleOpponent: {
5
- ({ isAlreadyEngaged, isRandom, userAvatarSrc, onClick, displayName, tooltipText }: BattleOpponentProps, legacyContext: WebContextValues): JSX.Element;
6
- propTypes: {
7
- isAlreadyEngaged: import("prop-types").Requireable<boolean>;
8
- isRandom: import("prop-types").Requireable<boolean>;
9
- userAvatarSrc: import("prop-types").Requireable<string>;
10
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
11
- displayName: import("prop-types").Requireable<string>;
12
- tooltipText: import("prop-types").Requireable<string>;
13
- };
14
- contextTypes: {
15
- translate: import("prop-types").Requireable<(...args: any[]) => any>;
16
- };
17
- };
18
- export default BattleOpponent;
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;uFAQf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;CAsChC,CAAC;AAQF,eAAe,cAAc,CAAC"}
@@ -1,52 +0,0 @@
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
-
3
- import React, { useMemo } from 'react';
4
- import classnames from 'classnames';
5
- import { NovaCompositionNavigationArrowRight as ArrowRight } from '@coorpacademy/nova-icons';
6
- import ToolTip from '../tooltip';
7
- import Provider, { GetTranslateFromContext } from '../provider';
8
- import propTypes from './prop-types';
9
- import style from './style.css';
10
-
11
- const BattleOpponent = ({
12
- isAlreadyEngaged,
13
- isRandom,
14
- userAvatarSrc,
15
- onClick,
16
- displayName,
17
- tooltipText
18
- }, legacyContext) => {
19
- const translate = GetTranslateFromContext(legacyContext);
20
- const wrapperClassnames = useMemo(() => classnames(style.card, style['opponent-card'], isRandom ? style.random : null), [isRandom]);
21
- const displayNameClassnames = useMemo(() => classnames(style.name, isAlreadyEngaged ? style.alreadyEngaged : null), [isAlreadyEngaged]);
22
- return /*#__PURE__*/React.createElement("li", _extends({}, !isAlreadyEngaged && {
23
- onClick
24
- }, {
25
- className: wrapperClassnames,
26
- "data-testid": "battle-opponent-wrapper"
27
- }), /*#__PURE__*/React.createElement("div", {
28
- className: style.avatar
29
- }, isRandom ? null : /*#__PURE__*/React.createElement("img", {
30
- src: userAvatarSrc,
31
- "aria-hidden": "true"
32
- })), /*#__PURE__*/React.createElement("p", {
33
- className: displayNameClassnames
34
- }, " ", displayName), isAlreadyEngaged ? /*#__PURE__*/React.createElement(ToolTip, {
35
- fontSize: 12,
36
- iconSize: "big",
37
- TooltipContent: tooltipText,
38
- closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text'),
39
- iconContainerClassName: style.infoIconTooltip
40
- }) : /*#__PURE__*/React.createElement(ArrowRight, {
41
- className: style.rightArrow,
42
- width: 16,
43
- height: 16
44
- }));
45
- };
46
-
47
- BattleOpponent.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
48
- BattleOpponent.contextTypes = {
49
- translate: Provider.childContextTypes.translate
50
- };
51
- export default BattleOpponent;
52
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","classnames","NovaCompositionNavigationArrowRight","ArrowRight","ToolTip","Provider","GetTranslateFromContext","propTypes","style","BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","legacyContext","translate","wrapperClassnames","card","random","displayNameClassnames","name","alreadyEngaged","avatar","infoIconTooltip","rightArrow","contextTypes","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport {NovaCompositionNavigationArrowRight as ArrowRight} from '@coorpacademy/nova-icons';\nimport ToolTip 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 }: 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 return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n >\n <div className={style.avatar}>\n {isRandom ? null : <img src={userAvatarSrc} aria-hidden=\"true\" />}\n </div>\n <p className={displayNameClassnames}> {displayName}</p>\n {isAlreadyEngaged ? (\n <ToolTip\n fontSize={12}\n iconSize=\"big\"\n TooltipContent={tooltipText}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n iconContainerClassName={style.infoIconTooltip}\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,OAAf,QAA6B,OAA7B;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,mCAAmC,IAAIC,UAA/C,QAAgE,0BAAhE;AACA,OAAOC,OAAP,MAAoB,YAApB;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;AANF,CADqB,EASrBC,aATqB,KAUlB;EACH,MAAMC,SAAkD,GAAGX,uBAAuB,CAACU,aAAD,CAAlF;EACA,MAAME,iBAAiB,GAAGlB,OAAO,CAC/B,MAAMC,UAAU,CAACO,KAAK,CAACW,IAAP,EAAaX,KAAK,CAAC,eAAD,CAAlB,EAAqCG,QAAQ,GAAGH,KAAK,CAACY,MAAT,GAAkB,IAA/D,CADe,EAE/B,CAACT,QAAD,CAF+B,CAAjC;EAKA,MAAMU,qBAAqB,GAAGrB,OAAO,CACnC,MAAMC,UAAU,CAACO,KAAK,CAACc,IAAP,EAAaZ,gBAAgB,GAAGF,KAAK,CAACe,cAAT,GAA0B,IAAvD,CADmB,EAEnC,CAACb,gBAAD,CAFmC,CAArC;EAKA,oBACE,uCACO,CAACA,gBAAD,IAAqB;IAACG;EAAD,CAD5B;IAEE,SAAS,EAAEK,iBAFb;IAGE,eAAY;EAHd,iBAKE;IAAK,SAAS,EAAEV,KAAK,CAACgB;EAAtB,GACGb,QAAQ,GAAG,IAAH,gBAAU;IAAK,GAAG,EAAEC,aAAV;IAAyB,eAAY;EAArC,EADrB,CALF,eAQE;IAAG,SAAS,EAAES;EAAd,QAAuCP,WAAvC,CARF,EASGJ,gBAAgB,gBACf,oBAAC,OAAD;IACE,QAAQ,EAAE,EADZ;IAEE,QAAQ,EAAC,KAFX;IAGE,cAAc,EAAEK,WAHlB;IAIE,oCAAoC,EAAEE,SAAS,CAC7C,oDAD6C,CAJjD;IAOE,sBAAsB,EAAET,KAAK,CAACiB;EAPhC,EADe,gBAWf,oBAAC,UAAD;IAAY,SAAS,EAAEjB,KAAK,CAACkB,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EApBJ,CADF;AAyBD,CA/CD;;AAiDAjB,cAAc,CAACF,SAAf,2CAA2BA,SAA3B;AAEAE,cAAc,CAACkB,YAAf,GAA8B;EAC5BV,SAAS,EAAEZ,QAAQ,CAACuB,iBAAT,CAA2BX;AADV,CAA9B;AAIA,eAAeR,cAAf"}
@@ -1,19 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- declare const propTypes: {
3
- isAlreadyEngaged: PropTypes.Requireable<boolean>;
4
- isRandom: PropTypes.Requireable<boolean>;
5
- userAvatarSrc: PropTypes.Requireable<string>;
6
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
7
- displayName: PropTypes.Requireable<string>;
8
- tooltipText: PropTypes.Requireable<string>;
9
- };
10
- export declare type BattleOpponentProps = {
11
- isAlreadyEngaged?: boolean;
12
- isRandom?: boolean;
13
- userAvatarSrc?: string;
14
- onClick?: () => void;
15
- displayName: string;
16
- tooltipText?: string;
17
- };
18
- export default propTypes;
19
- //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;CAOd,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,11 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- const propTypes = {
3
- isAlreadyEngaged: PropTypes.bool,
4
- isRandom: PropTypes.bool,
5
- userAvatarSrc: PropTypes.string,
6
- onClick: PropTypes.func,
7
- displayName: PropTypes.string,
8
- tooltipText: PropTypes.string
9
- };
10
- export default propTypes;
11
- //# sourceMappingURL=prop-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.js","names":["PropTypes","propTypes","isAlreadyEngaged","bool","isRandom","userAvatarSrc","string","onClick","func","displayName","tooltipText"],"sources":["../../../src/atom/battle-opponent/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n isAlreadyEngaged: PropTypes.bool,\n isRandom: PropTypes.bool,\n userAvatarSrc: PropTypes.string,\n onClick: PropTypes.func,\n displayName: PropTypes.string,\n tooltipText: PropTypes.string\n};\n\nexport type BattleOpponentProps = {\n isAlreadyEngaged?: boolean;\n isRandom?: boolean;\n userAvatarSrc?: string;\n onClick?: () => void;\n displayName: string;\n tooltipText?: string;\n};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,MAAMC,SAAS,GAAG;EAChBC,gBAAgB,EAAEF,SAAS,CAACG,IADZ;EAEhBC,QAAQ,EAAEJ,SAAS,CAACG,IAFJ;EAGhBE,aAAa,EAAEL,SAAS,CAACM,MAHT;EAIhBC,OAAO,EAAEP,SAAS,CAACQ,IAJH;EAKhBC,WAAW,EAAET,SAAS,CAACM,MALP;EAMhBI,WAAW,EAAEV,SAAS,CAACM;AANP,CAAlB;AAkBA,eAAeL,SAAf"}
@@ -1,124 +0,0 @@
1
- @value breakpoints: "../../variables/breakpoints.css";
2
- @value mobile from breakpoints;
3
- @value colors: "../../variables/colors.css";
4
- @value white from colors;
5
- @value dark from colors;
6
- @value black from colors;
7
- @value cm_grey_75 from colors;
8
- @value medium from colors;
9
- @value light from colors;
10
- @value brand from colors;
11
-
12
- .rightArrow {
13
- position: flex;
14
- padding: 9px;
15
- cursor: pointer;
16
- opacity: 1;
17
- user-select: none;
18
- text-align: right;
19
- color: dark;
20
- }
21
-
22
- .card {
23
- margin: 5px;
24
- }
25
-
26
- .opponent-card {
27
- flex: 1 1 350px;
28
- height: 80px;
29
- background-color: white;
30
- box-shadow: 0 0 4px 1px rgba(0,0,0,0.10);
31
- border-radius: 3px;
32
- padding: 20px;
33
- box-sizing: border-box;
34
- display: flex;
35
- align-items: center;
36
- justify-content: space-between;
37
- cursor: pointer;
38
- }
39
-
40
- .opponent-card .name {
41
- font-family: 'Gilroy';
42
- font-size: 15px;
43
- font-weight: 700;
44
- color: black;
45
- flex-grow: 1;
46
- }
47
-
48
-
49
- .opponent-card .rightArrow {
50
- margin-left: 20px;
51
- }
52
-
53
- .avatar {
54
- width: 50px;
55
- height: 50px;
56
- border-radius: 50%;
57
- overflow: hidden;
58
- background-color: light;
59
- margin-right: 20px;
60
- flex-shrink: 0;
61
- }
62
-
63
- .avatar img {
64
- width: 100%;
65
- height: auto;
66
- }
67
-
68
-
69
- .random {
70
- color: medium;
71
- }
72
-
73
- .alreadyEngaged.name,
74
- .random .name {
75
- color: medium;
76
- }
77
-
78
- .random .avatar {
79
- background-color: brand;
80
- display: flex;
81
- align-items: center;
82
- justify-content: center;
83
- }
84
-
85
- .random .avatar:before {
86
- content: '?';
87
- font-family: 'Gilroy';
88
- font-size: 32px;
89
- font-weight: 600;
90
- color: white;
91
- text-align: center;
92
- }
93
-
94
- .random .avatar img {
95
- display: none;
96
- }
97
-
98
- .opponent-card:hover {
99
- background-color: cm_grey_75;
100
- }
101
-
102
- .card .infoIconTooltip {
103
- background: transparent;
104
- }
105
-
106
- @media mobile {
107
- .opponent-card {
108
- width: 100%;
109
- padding: 10px;
110
- }
111
-
112
- .opponent-card .avatar {
113
- margin-right: 10px;
114
- }
115
-
116
- .opponent-card .rightArrow {
117
- margin-left: 10px;
118
- }
119
-
120
- .card {
121
- margin: 0 0 10px;
122
- }
123
- }
124
-
@@ -1,18 +0,0 @@
1
- /// <reference types="react" />
2
- import { BattleOpponentListProps } from './prop-types';
3
- declare const BattleOpponentList: {
4
- ({ opponents }: BattleOpponentListProps): JSX.Element;
5
- propTypes: {
6
- opponents: import("prop-types").Requireable<(import("prop-types").InferProps<{
7
- isAlreadyEngaged: import("prop-types").Requireable<boolean>;
8
- isRandom: import("prop-types").Requireable<boolean>;
9
- photo: import("prop-types").Requireable<string>;
10
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
11
- displayName: import("prop-types").Requireable<string>;
12
- tooltipText: import("prop-types").Requireable<string>;
13
- user_id: import("prop-types").Requireable<string>;
14
- }> | null | undefined)[]>;
15
- };
16
- };
17
- export default BattleOpponentList;
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/battle-opponent-list/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAGhE,QAAA,MAAM,kBAAkB;oBAAiB,uBAAuB;;;;;;;;;;;;CAiB/D,CAAC;AAIF,eAAe,kBAAkB,CAAC"}
@@ -1,25 +0,0 @@
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
-
3
- import React, { useMemo } from 'react';
4
- import get from 'lodash/fp/get';
5
- import map from 'lodash/fp/map';
6
- import { v5 as uuidV5 } from 'uuid';
7
- import BattleOpponent from '../../atom/battle-opponent';
8
- import propTypes from './prop-types';
9
- import style from './style.css';
10
-
11
- const BattleOpponentList = ({
12
- opponents
13
- }) => {
14
- const opponentList = useMemo(() => map(opponent => /*#__PURE__*/React.createElement(BattleOpponent, _extends({}, opponent, {
15
- key: uuidV5('battle-', uuidV5.URL),
16
- userAvatarSrc: get('photo', opponent)
17
- })), opponents), [opponents]);
18
- return /*#__PURE__*/React.createElement("ul", {
19
- className: style.opponentList
20
- }, opponentList);
21
- };
22
-
23
- BattleOpponentList.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
24
- export default BattleOpponentList;
25
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","get","map","v5","uuidV5","BattleOpponent","propTypes","style","BattleOpponentList","opponents","opponentList","opponent","URL"],"sources":["../../../src/molecule/battle-opponent-list/index.tsx"],"sourcesContent":["import React, {useMemo} from 'react';\nimport get from 'lodash/fp/get';\nimport map from 'lodash/fp/map';\nimport {v5 as uuidV5} from 'uuid';\nimport BattleOpponent from '../../atom/battle-opponent';\nimport propTypes, {BattleOpponentListProps} from './prop-types';\nimport style from './style.css';\n\nconst BattleOpponentList = ({opponents}: BattleOpponentListProps) => {\n const opponentList = useMemo(\n () =>\n map(\n opponent => (\n <BattleOpponent\n {...opponent}\n key={uuidV5('battle-', uuidV5.URL)}\n userAvatarSrc={get('photo', opponent)}\n />\n ),\n opponents\n ),\n [opponents]\n );\n\n return <ul className={style.opponentList}>{opponentList}</ul>;\n};\n\nBattleOpponentList.propTypes = propTypes;\n\nexport default BattleOpponentList;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,SAAQC,EAAE,IAAIC,MAAd,QAA2B,MAA3B;AACA,OAAOC,cAAP,MAA2B,4BAA3B;AACA,OAAOC,SAAP,MAAiD,cAAjD;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,kBAAkB,GAAG,CAAC;EAACC;AAAD,CAAD,KAA0C;EACnE,MAAMC,YAAY,GAAGV,OAAO,CAC1B,MACEE,GAAG,CACDS,QAAQ,iBACN,oBAAC,cAAD,eACMA,QADN;IAEE,GAAG,EAAEP,MAAM,CAAC,SAAD,EAAYA,MAAM,CAACQ,GAAnB,CAFb;IAGE,aAAa,EAAEX,GAAG,CAAC,OAAD,EAAUU,QAAV;EAHpB,GAFD,EAQDF,SARC,CAFqB,EAY1B,CAACA,SAAD,CAZ0B,CAA5B;EAeA,oBAAO;IAAI,SAAS,EAAEF,KAAK,CAACG;EAArB,GAAoCA,YAApC,CAAP;AACD,CAjBD;;AAmBAF,kBAAkB,CAACF,SAAnB,2CAA+BA,SAA/B;AAEA,eAAeE,kBAAf"}
@@ -1,26 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- declare const propTypes: {
3
- opponents: PropTypes.Requireable<(PropTypes.InferProps<{
4
- isAlreadyEngaged: PropTypes.Requireable<boolean>;
5
- isRandom: PropTypes.Requireable<boolean>;
6
- photo: PropTypes.Requireable<string>;
7
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
8
- displayName: PropTypes.Requireable<string>;
9
- tooltipText: PropTypes.Requireable<string>;
10
- user_id: PropTypes.Requireable<string>;
11
- }> | null | undefined)[]>;
12
- };
13
- declare type MoocBattleOpponent = {
14
- isAlreadyEngaged?: boolean;
15
- isRandom?: boolean;
16
- photo?: string;
17
- onClick?: () => void;
18
- displayName: string;
19
- tooltipText: string;
20
- user_id: string;
21
- };
22
- export declare type BattleOpponentListProps = {
23
- opponents: MoocBattleOpponent[];
24
- };
25
- export default propTypes;
26
- //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/battle-opponent-list/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;CAYd,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IAAC,SAAS,EAAE,kBAAkB,EAAE,CAAA;CAAC,CAAC;AAExE,eAAe,SAAS,CAAC"}
@@ -1,14 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- const propTypes = {
3
- opponents: PropTypes.arrayOf(PropTypes.shape({
4
- isAlreadyEngaged: PropTypes.bool,
5
- isRandom: PropTypes.bool,
6
- photo: PropTypes.string,
7
- onClick: PropTypes.func,
8
- displayName: PropTypes.string,
9
- tooltipText: PropTypes.string,
10
- user_id: PropTypes.string
11
- }))
12
- };
13
- export default propTypes;
14
- //# sourceMappingURL=prop-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.js","names":["PropTypes","propTypes","opponents","arrayOf","shape","isAlreadyEngaged","bool","isRandom","photo","string","onClick","func","displayName","tooltipText","user_id"],"sources":["../../../src/molecule/battle-opponent-list/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n opponents: PropTypes.arrayOf(\n PropTypes.shape({\n isAlreadyEngaged: PropTypes.bool,\n isRandom: PropTypes.bool,\n photo: PropTypes.string,\n onClick: PropTypes.func,\n displayName: PropTypes.string,\n tooltipText: PropTypes.string,\n user_id: PropTypes.string\n })\n )\n};\n\ntype MoocBattleOpponent = {\n isAlreadyEngaged?: boolean;\n isRandom?: boolean;\n photo?: string;\n onClick?: () => void;\n displayName: string;\n tooltipText: string;\n user_id: string;\n};\n\nexport type BattleOpponentListProps = {opponents: MoocBattleOpponent[]};\n\nexport default propTypes;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AAEA,MAAMC,SAAS,GAAG;EAChBC,SAAS,EAAEF,SAAS,CAACG,OAAV,CACTH,SAAS,CAACI,KAAV,CAAgB;IACdC,gBAAgB,EAAEL,SAAS,CAACM,IADd;IAEdC,QAAQ,EAAEP,SAAS,CAACM,IAFN;IAGdE,KAAK,EAAER,SAAS,CAACS,MAHH;IAIdC,OAAO,EAAEV,SAAS,CAACW,IAJL;IAKdC,WAAW,EAAEZ,SAAS,CAACS,MALT;IAMdI,WAAW,EAAEb,SAAS,CAACS,MANT;IAOdK,OAAO,EAAEd,SAAS,CAACS;EAPL,CAAhB,CADS;AADK,CAAlB;AA0BA,eAAeR,SAAf"}
@@ -1,5 +0,0 @@
1
- .opponentList {
2
- margin: 0;
3
- padding: 0;
4
- display: contents;
5
- }
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { WebContextValues } from '../provider/web-context';
3
- import { BattleOpponentProps } from './prop-types';
4
- declare const BattleOpponent: {
5
- ({ isAlreadyEngaged, isRandom, userAvatarSrc, onClick, displayName, tooltipText }: BattleOpponentProps, legacyContext: WebContextValues): JSX.Element;
6
- propTypes: {
7
- isAlreadyEngaged: import("prop-types").Requireable<boolean>;
8
- isRandom: import("prop-types").Requireable<boolean>;
9
- userAvatarSrc: import("prop-types").Requireable<string>;
10
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
11
- displayName: import("prop-types").Requireable<string>;
12
- tooltipText: import("prop-types").Requireable<string>;
13
- };
14
- contextTypes: {
15
- translate: import("prop-types").Requireable<(...args: any[]) => any>;
16
- };
17
- };
18
- export default BattleOpponent;
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAkB,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAG5D,QAAA,MAAM,cAAc;uFAQf,mBAAmB,iBACP,gBAAgB;;;;;;;;;;;;CAsChC,CAAC;AAQF,eAAe,cAAc,CAAC"}
@@ -1,70 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _react = _interopRequireWildcard(require("react"));
7
-
8
- var _classnames = _interopRequireDefault(require("classnames"));
9
-
10
- var _novaIcons = require("@coorpacademy/nova-icons");
11
-
12
- var _tooltip = _interopRequireDefault(require("../tooltip"));
13
-
14
- var _provider = _interopRequireWildcard(require("../provider"));
15
-
16
- var _propTypes = _interopRequireDefault(require("./prop-types"));
17
-
18
- var _style = _interopRequireDefault(require("./style.css"));
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- 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); }
27
-
28
- const BattleOpponent = ({
29
- isAlreadyEngaged,
30
- isRandom,
31
- userAvatarSrc,
32
- onClick,
33
- displayName,
34
- tooltipText
35
- }, legacyContext) => {
36
- const translate = (0, _provider.GetTranslateFromContext)(legacyContext);
37
- const wrapperClassnames = (0, _react.useMemo)(() => (0, _classnames.default)(_style.default.card, _style.default['opponent-card'], isRandom ? _style.default.random : null), [isRandom]);
38
- const displayNameClassnames = (0, _react.useMemo)(() => (0, _classnames.default)(_style.default.name, isAlreadyEngaged ? _style.default.alreadyEngaged : null), [isAlreadyEngaged]);
39
- return /*#__PURE__*/_react.default.createElement("li", _extends({}, !isAlreadyEngaged && {
40
- onClick
41
- }, {
42
- className: wrapperClassnames,
43
- "data-testid": "battle-opponent-wrapper"
44
- }), /*#__PURE__*/_react.default.createElement("div", {
45
- className: _style.default.avatar
46
- }, isRandom ? null : /*#__PURE__*/_react.default.createElement("img", {
47
- src: userAvatarSrc,
48
- "aria-hidden": "true"
49
- })), /*#__PURE__*/_react.default.createElement("p", {
50
- className: displayNameClassnames
51
- }, " ", displayName), isAlreadyEngaged ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
52
- fontSize: 12,
53
- iconSize: "big",
54
- TooltipContent: tooltipText,
55
- closeToolTipInformationTextAriaLabel: translate('Press the escape key to close the information text'),
56
- iconContainerClassName: _style.default.infoIconTooltip
57
- }) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
58
- className: _style.default.rightArrow,
59
- width: 16,
60
- height: 16
61
- }));
62
- };
63
-
64
- BattleOpponent.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
65
- BattleOpponent.contextTypes = {
66
- translate: _provider.default.childContextTypes.translate
67
- };
68
- var _default = BattleOpponent;
69
- exports.default = _default;
70
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["BattleOpponent","isAlreadyEngaged","isRandom","userAvatarSrc","onClick","displayName","tooltipText","legacyContext","translate","GetTranslateFromContext","wrapperClassnames","useMemo","classnames","style","card","random","displayNameClassnames","name","alreadyEngaged","avatar","infoIconTooltip","rightArrow","propTypes","contextTypes","Provider","childContextTypes"],"sources":["../../../src/atom/battle-opponent/index.tsx"],"sourcesContent":["import React, {useMemo} from 'react';\nimport classnames from 'classnames';\nimport {NovaCompositionNavigationArrowRight as ArrowRight} from '@coorpacademy/nova-icons';\nimport ToolTip 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 }: 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 return (\n <li\n {...(!isAlreadyEngaged && {onClick})}\n className={wrapperClassnames}\n data-testid=\"battle-opponent-wrapper\"\n >\n <div className={style.avatar}>\n {isRandom ? null : <img src={userAvatarSrc} aria-hidden=\"true\" />}\n </div>\n <p className={displayNameClassnames}> {displayName}</p>\n {isAlreadyEngaged ? (\n <ToolTip\n fontSize={12}\n iconSize=\"big\"\n TooltipContent={tooltipText}\n closeToolTipInformationTextAriaLabel={translate(\n 'Press the escape key to close the information text'\n )}\n iconContainerClassName={style.infoIconTooltip}\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;;AAEA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CACrB;EACEC,gBADF;EAEEC,QAFF;EAGEC,aAHF;EAIEC,OAJF;EAKEC,WALF;EAMEC;AANF,CADqB,EASrBC,aATqB,KAUlB;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+CX,QAAQ,GAAGW,cAAA,CAAME,MAAT,GAAkB,IAAzE,CADkB,EAExB,CAACb,QAAD,CAFwB,CAA1B;EAKA,MAAMc,qBAAqB,GAAG,IAAAL,cAAA,EAC5B,MAAM,IAAAC,mBAAA,EAAWC,cAAA,CAAMI,IAAjB,EAAuBhB,gBAAgB,GAAGY,cAAA,CAAMK,cAAT,GAA0B,IAAjE,CADsB,EAE5B,CAACjB,gBAAD,CAF4B,CAA9B;EAKA,oBACE,gDACO,CAACA,gBAAD,IAAqB;IAACG;EAAD,CAD5B;IAEE,SAAS,EAAEM,iBAFb;IAGE,eAAY;EAHd,iBAKE;IAAK,SAAS,EAAEG,cAAA,CAAMM;EAAtB,GACGjB,QAAQ,GAAG,IAAH,gBAAU;IAAK,GAAG,EAAEC,aAAV;IAAyB,eAAY;EAArC,EADrB,CALF,eAQE;IAAG,SAAS,EAAEa;EAAd,QAAuCX,WAAvC,CARF,EASGJ,gBAAgB,gBACf,6BAAC,gBAAD;IACE,QAAQ,EAAE,EADZ;IAEE,QAAQ,EAAC,KAFX;IAGE,cAAc,EAAEK,WAHlB;IAIE,oCAAoC,EAAEE,SAAS,CAC7C,oDAD6C,CAJjD;IAOE,sBAAsB,EAAEK,cAAA,CAAMO;EAPhC,EADe,gBAWf,6BAAC,8CAAD;IAAY,SAAS,EAAEP,cAAA,CAAMQ,UAA7B;IAAyC,KAAK,EAAE,EAAhD;IAAoD,MAAM,EAAE;EAA5D,EApBJ,CADF;AAyBD,CA/CD;;AAiDArB,cAAc,CAACsB,SAAf,2CAA2BA,kBAA3B;AAEAtB,cAAc,CAACuB,YAAf,GAA8B;EAC5Bf,SAAS,EAAEgB,iBAAA,CAASC,iBAAT,CAA2BjB;AADV,CAA9B;eAIeR,c"}
@@ -1,19 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- declare const propTypes: {
3
- isAlreadyEngaged: PropTypes.Requireable<boolean>;
4
- isRandom: PropTypes.Requireable<boolean>;
5
- userAvatarSrc: PropTypes.Requireable<string>;
6
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
7
- displayName: PropTypes.Requireable<string>;
8
- tooltipText: PropTypes.Requireable<string>;
9
- };
10
- export declare type BattleOpponentProps = {
11
- isAlreadyEngaged?: boolean;
12
- isRandom?: boolean;
13
- userAvatarSrc?: string;
14
- onClick?: () => void;
15
- displayName: string;
16
- tooltipText?: string;
17
- };
18
- export default propTypes;
19
- //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/atom/battle-opponent/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;CAOd,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _propTypes = _interopRequireDefault(require("prop-types"));
7
-
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
-
10
- const propTypes = {
11
- isAlreadyEngaged: _propTypes.default.bool,
12
- isRandom: _propTypes.default.bool,
13
- userAvatarSrc: _propTypes.default.string,
14
- onClick: _propTypes.default.func,
15
- displayName: _propTypes.default.string,
16
- tooltipText: _propTypes.default.string
17
- };
18
- var _default = propTypes;
19
- exports.default = _default;
20
- //# sourceMappingURL=prop-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prop-types.js","names":["propTypes","isAlreadyEngaged","PropTypes","bool","isRandom","userAvatarSrc","string","onClick","func","displayName","tooltipText"],"sources":["../../../src/atom/battle-opponent/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n isAlreadyEngaged: PropTypes.bool,\n isRandom: PropTypes.bool,\n userAvatarSrc: PropTypes.string,\n onClick: PropTypes.func,\n displayName: PropTypes.string,\n tooltipText: PropTypes.string\n};\n\nexport type BattleOpponentProps = {\n isAlreadyEngaged?: boolean;\n isRandom?: boolean;\n userAvatarSrc?: string;\n onClick?: () => void;\n displayName: string;\n tooltipText?: string;\n};\n\nexport default propTypes;\n"],"mappings":";;;;;AAAA;;;;AAEA,MAAMA,SAAS,GAAG;EAChBC,gBAAgB,EAAEC,kBAAA,CAAUC,IADZ;EAEhBC,QAAQ,EAAEF,kBAAA,CAAUC,IAFJ;EAGhBE,aAAa,EAAEH,kBAAA,CAAUI,MAHT;EAIhBC,OAAO,EAAEL,kBAAA,CAAUM,IAJH;EAKhBC,WAAW,EAAEP,kBAAA,CAAUI,MALP;EAMhBI,WAAW,EAAER,kBAAA,CAAUI;AANP,CAAlB;eAkBeN,S"}
@@ -1,124 +0,0 @@
1
- @value breakpoints: "../../variables/breakpoints.css";
2
- @value mobile from breakpoints;
3
- @value colors: "../../variables/colors.css";
4
- @value white from colors;
5
- @value dark from colors;
6
- @value black from colors;
7
- @value cm_grey_75 from colors;
8
- @value medium from colors;
9
- @value light from colors;
10
- @value brand from colors;
11
-
12
- .rightArrow {
13
- position: flex;
14
- padding: 9px;
15
- cursor: pointer;
16
- opacity: 1;
17
- user-select: none;
18
- text-align: right;
19
- color: dark;
20
- }
21
-
22
- .card {
23
- margin: 5px;
24
- }
25
-
26
- .opponent-card {
27
- flex: 1 1 350px;
28
- height: 80px;
29
- background-color: white;
30
- box-shadow: 0 0 4px 1px rgba(0,0,0,0.10);
31
- border-radius: 3px;
32
- padding: 20px;
33
- box-sizing: border-box;
34
- display: flex;
35
- align-items: center;
36
- justify-content: space-between;
37
- cursor: pointer;
38
- }
39
-
40
- .opponent-card .name {
41
- font-family: 'Gilroy';
42
- font-size: 15px;
43
- font-weight: 700;
44
- color: black;
45
- flex-grow: 1;
46
- }
47
-
48
-
49
- .opponent-card .rightArrow {
50
- margin-left: 20px;
51
- }
52
-
53
- .avatar {
54
- width: 50px;
55
- height: 50px;
56
- border-radius: 50%;
57
- overflow: hidden;
58
- background-color: light;
59
- margin-right: 20px;
60
- flex-shrink: 0;
61
- }
62
-
63
- .avatar img {
64
- width: 100%;
65
- height: auto;
66
- }
67
-
68
-
69
- .random {
70
- color: medium;
71
- }
72
-
73
- .alreadyEngaged.name,
74
- .random .name {
75
- color: medium;
76
- }
77
-
78
- .random .avatar {
79
- background-color: brand;
80
- display: flex;
81
- align-items: center;
82
- justify-content: center;
83
- }
84
-
85
- .random .avatar:before {
86
- content: '?';
87
- font-family: 'Gilroy';
88
- font-size: 32px;
89
- font-weight: 600;
90
- color: white;
91
- text-align: center;
92
- }
93
-
94
- .random .avatar img {
95
- display: none;
96
- }
97
-
98
- .opponent-card:hover {
99
- background-color: cm_grey_75;
100
- }
101
-
102
- .card .infoIconTooltip {
103
- background: transparent;
104
- }
105
-
106
- @media mobile {
107
- .opponent-card {
108
- width: 100%;
109
- padding: 10px;
110
- }
111
-
112
- .opponent-card .avatar {
113
- margin-right: 10px;
114
- }
115
-
116
- .opponent-card .rightArrow {
117
- margin-left: 10px;
118
- }
119
-
120
- .card {
121
- margin: 0 0 10px;
122
- }
123
- }
124
-