@ludo.ninja/components 2.3.80 → 2.3.82

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.
@@ -24,7 +24,6 @@ const useRefCode = () => {
24
24
  await activateInviteCode({ inviteCode: refcode });
25
25
  (0, nookies_1.destroyCookie)(null, 'refcode', {
26
26
  path: '/',
27
- domain: NEXT_PUBLIC_ENV_DOMAIN,
28
27
  });
29
28
  }
30
29
  // eslint-disable-next-line
@@ -1,5 +1,7 @@
1
1
  import { TOpportunity } from './type';
2
- export declare const OpportunityCard: ({ opportunity, toolsForRemove, }: {
2
+ export declare const HEADER_BACKGROUNDS: string[];
3
+ export declare const OpportunityCard: ({ opportunity, toolsForRemove, headColorImage }: {
3
4
  opportunity: TOpportunity;
4
5
  toolsForRemove?: ((itemType: "asset" | "collection" | "opportunity") => void) | undefined;
6
+ headColorImage?: string;
5
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OpportunityCard = void 0;
6
+ exports.OpportunityCard = exports.HEADER_BACKGROUNDS = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const useDislikeOpportunity_1 = require("../../api/server-opportunities/mutations/useDislikeOpportunity");
9
9
  const useLikeOpportunity_1 = require("../../api/server-opportunities/mutations/useLikeOpportunity");
@@ -11,8 +11,6 @@ const useOpenOpportunity_1 = __importDefault(require("../../api/server-opportuni
11
11
  const data_1 = __importDefault(require("../../entities/labelCreationType/data"));
12
12
  const vars_1 = require("../../fonts/vars");
13
13
  const OpportunityDropDown_1 = require("./OpportunityDropDown");
14
- const ShareIcon_1 = require("./ShareIcon");
15
- const OpportunityMenu_1 = require("./popup/OpportunityMenu");
16
14
  const store_1 = require("../user/store");
17
15
  const heart_svg_1 = __importDefault(require("../../public/cards/heart"));
18
16
  const env_1 = require("../../store/env");
@@ -28,6 +26,7 @@ const ImageInterceptor_1 = require("../../system/Img/ImageInterceptor");
28
26
  const index_1 = require("../../system/index");
29
27
  const screen_1 = require("../../utils/screen");
30
28
  const schema_1 = require("@ludo.ninja/api/build/graphql_tools/__generated__/opportunitiesHost/schema");
29
+ const constants_1 = require("@ludo.ninja/core/build/constants");
31
30
  const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
32
31
  const colors_2 = require("@ludo.ninja/ui/build/styles/colors");
33
32
  const boxShadow_1 = __importDefault(require("@ludo.ninja/ui/build/styles/mixins/boxShadow"));
@@ -36,61 +35,79 @@ const moment_1 = __importDefault(require("moment/moment"));
36
35
  const react_1 = require("react");
37
36
  const sanitize_html_1 = __importDefault(require("sanitize-html"));
38
37
  const styled_components_1 = __importDefault(require("styled-components"));
38
+ exports.HEADER_BACKGROUNDS = ['green', 'blue', 'pink', 'orange'];
39
39
  const SWrapperLink = styled_components_1.default.a `
40
- position: relative;
41
- background-color: ${colors_2.WhiteColor};
42
- border-radius: 6px;
43
- ${boxShadow_1.default};
44
- ${boxTransform_1.default};
45
- width: 252px;
46
- overflow: hidden;
47
- display: flex;
48
- flex-direction: column;
40
+ position: relative;
41
+ background-color: ${colors_2.WhiteColor};
42
+ border-radius: 6px;
43
+ ${boxShadow_1.default};
44
+ ${boxTransform_1.default};
45
+ width: 252px;
46
+ overflow: hidden;
47
+ display: flex;
48
+ flex-direction: column;
49
49
 
50
- &:hover ${Headicons_1.default} {
51
- transition: 0.2s opacity ease-in;
52
- opacity: 1 !important;
53
- }
50
+ &:hover ${Headicons_1.default} {
51
+ transition: 0.2s opacity ease-in;
52
+ opacity: 1 !important;
53
+ }
54
54
 
55
- ${ScreenWidth_1.mediaQuery.maxWidthTablet} {
56
- width: 164px;
57
- }
55
+ // ${ScreenWidth_1.mediaQuery.maxWidthTablet} {
56
+ // width: 164px;
57
+ // }
58
58
 
59
- ${ScreenWidth_1.mediaQuery.mobile} {
60
- width: 154px;
61
- }
59
+ ${ScreenWidth_1.mediaQuery.mobile} {
60
+ width: 100%;
61
+ }
62
62
 
63
- ${ScreenWidth_1.mediaQuery.minWidthFourK} {
64
- width: ${(0, _4k_1.adaptiveValueCalc)(252)};
65
- border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
66
- }
63
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
64
+ width: ${(0, _4k_1.adaptiveValueCalc)(252)};
65
+ border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
66
+ }
67
67
  `;
68
68
  const StyledCardHead = styled_components_1.default.div `
69
69
  position: relative;
70
- height: 152px;
70
+ height: 40px;
71
71
  width: 252px;
72
72
  margin: 0 auto;
73
+ display: flex;
74
+ align-items: center;
73
75
 
74
- .imgWrapper {
75
- width: 100%;
76
- height: 100%;
77
- }
76
+ background-image: url("${({ backgroundImage }) => `${constants_1.staticLink}/background_images/${backgroundImage || exports.HEADER_BACKGROUNDS[0]}.svg`}");
77
+ background-size: cover;
78
+ //.imgWrapper {
79
+ // width: 100%;
80
+ // height: 100%;
81
+ //}
78
82
 
79
- @media (max-width: 1200px) {
80
- height: 100px;
81
- width: 164px;
82
- }
83
+ //@media (max-width: 1200px) {
84
+ // height: 40px;
85
+ // width: 164px;
86
+ //}
83
87
 
84
- @media (max-width: 767px) {
85
- height: 92px;
86
- width: 154px;
88
+ ${ScreenWidth_1.mediaQuery.mobile} {
89
+ height: 40px;
90
+ width: 100%;
87
91
  }
88
92
 
89
93
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
90
- height: ${(0, _4k_1.adaptiveValueCalc)(152)};
94
+ height: ${(0, _4k_1.adaptiveValueCalc)(40)};
91
95
  width: ${(0, _4k_1.adaptiveValueCalc)(252)};
92
96
  }
93
97
  `;
98
+ const OpportunityName = styled_components_1.default.div `
99
+ ${typography_1.FH5};
100
+ color: ${colors_2.WhiteColor};
101
+ font-weight: 700;
102
+ padding: 6px 16px;
103
+ overflow: hidden;
104
+ text-overflow: ellipsis;
105
+ white-space: nowrap;
106
+
107
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
108
+ padding: ${(0, _4k_1.adaptiveValueCalc)(6)} ${(0, _4k_1.adaptiveValueCalc)(16)};
109
+ }
110
+ `;
94
111
  const StyledCardContent = styled_components_1.default.div `
95
112
  display: flex;
96
113
  flex-direction: column;
@@ -98,8 +115,8 @@ const StyledCardContent = styled_components_1.default.div `
98
115
  min-height: 212px;
99
116
  //max-height: 212px;
100
117
  flex-grow: 1;
101
- @media (max-width: 767px) {
102
- min-height: 190px;
118
+ ${ScreenWidth_1.mediaQuery.mobile} {
119
+ min-height: 172px;
103
120
  //max-height: 84px;
104
121
  }
105
122
 
@@ -145,6 +162,7 @@ const StyledCardContent = styled_components_1.default.div `
145
162
  margin-top: 12px;
146
163
  display: inline-flex;
147
164
  justify-content: space-between;
165
+ align-items: center;
148
166
  flex-wrap: wrap;
149
167
 
150
168
  .participantsCount {
@@ -154,9 +172,11 @@ const StyledCardContent = styled_components_1.default.div `
154
172
  }
155
173
  }
156
174
  }
175
+
157
176
  .btnClaim {
158
177
  border-radius: 6px;
159
178
  }
179
+
160
180
  .date {
161
181
  color: #b0b2c0;
162
182
  font-size: 12px;
@@ -168,13 +188,13 @@ const StyledCardContent = styled_components_1.default.div `
168
188
  height: auto;
169
189
  padding: 12px;
170
190
  }
171
- @media (max-width: 1199px) {
172
- .categoryFooter {
173
- flex-direction: column;
174
- align-items: center;
175
- gap: 6px;
176
- }
177
- }
191
+ //@media (max-width: 1199px) {
192
+ // .categoryFooter {
193
+ // flex-direction: column;
194
+ // align-items: center;
195
+ // gap: 6px;
196
+ // }
197
+ //}
178
198
 
179
199
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
180
200
  padding: ${(0, _4k_1.adaptiveValueCalc)(12)} ${(0, _4k_1.adaptiveValueCalc)(16)};
@@ -198,11 +218,11 @@ const StyledCardContent = styled_components_1.default.div `
198
218
  }
199
219
  }
200
220
  }
201
-
221
+
202
222
  .btnClaim {
203
223
  border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
204
224
  }
205
-
225
+
206
226
  .date {
207
227
  font-size: ${(0, _4k_1.adaptiveValueCalc)(12)};
208
228
  line-height: ${(0, _4k_1.adaptiveValueCalc)(16)};
@@ -244,7 +264,7 @@ const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) =>
244
264
  pointerEvents: isLoadingMutation ? "none" : "unset",
245
265
  }, children: (0, jsx_runtime_1.jsx)(heart_svg_1.default, {}) }));
246
266
  };
247
- const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
267
+ const OpportunityCard = ({ opportunity, toolsForRemove, headColorImage }) => {
248
268
  const { NEXT_PUBLIC_ENV_VALUE } = (0, env_1.useEnvStore)((state) => ({
249
269
  NEXT_PUBLIC_ENV_VALUE: state.NEXT_PUBLIC_ENV_VALUE,
250
270
  }));
@@ -267,12 +287,7 @@ const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
267
287
  const sanitizedHtml = (0, sanitize_html_1.default)(opportunity?.description || "", {
268
288
  allowedTags: ["b", "i", "em", "strong", "br", "div"],
269
289
  });
270
- return ((0, jsx_runtime_1.jsxs)(SWrapperLink, { href: opportunityLink, target: "_blank", onClick: () => openOpportunityAction({ opportunityId: opportunity.opportunityId }), children: [(0, jsx_runtime_1.jsxs)(StyledCardHead, { children: [(0, jsx_runtime_1.jsx)(OpportunityImage, { alt: opportunity.name, src: opportunity.media ? `${getMediaENVDomain()}/opportunity-medias/${opportunity.media}` : "" }), (0, jsx_runtime_1.jsx)(Headicons_1.default, { isMobile: isMobile, onClick: (e) => {
271
- e.stopPropagation();
272
- e.preventDefault();
273
- }, children: (0, jsx_runtime_1.jsxs)("div", { className: "icons", children: [(0, jsx_runtime_1.jsx)("div", { className: "icon", onClick: () => {
274
- openModalSidebarPortal((0, jsx_runtime_1.jsx)(OpportunityMenu_1.OpportunityMenu, { opportunity: opportunity, onClose: closeModalSidebarPortal }));
275
- }, children: (0, jsx_runtime_1.jsx)(ShareIcon_1.ShareIcon, {}) }), !isProd() && ((0, jsx_runtime_1.jsx)(OpportunityLike, { isDefaultLiked: !!(isSignedIn && opportunity.liked), opportunityId: opportunity.opportunityId, toolsForRemove: toolsForRemove }))] }) })] }), (0, jsx_runtime_1.jsxs)(StyledCardContent, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "cardContent", children: [(0, jsx_runtime_1.jsxs)("div", { className: "cardContentWrapper", children: [(0, jsx_runtime_1.jsx)("p", { className: `secondName`, children: opportunity.name }), (0, jsx_runtime_1.jsx)("p", { className: `mainName`, dangerouslySetInnerHTML: { __html: sanitizedHtml } }), (0, jsx_runtime_1.jsx)("p", { className: `categoryName`, children: opportunity.categoryName })] }), (0, jsx_runtime_1.jsx)(OpportunityDropDown_1.OpportunityDropDown, { opportunity: opportunity })] }), (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "end", justifyContent: "space-between", className: `categoryFooter`, children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: data_1.default[opportunity.opportunityType] || data_1.default.opportunity }), isAirdrop && !opportunity.subscribed ? ((0, jsx_runtime_1.jsx)(MainButton_1.default, { className: 'btnClaim', variant: "primaryXS", text: "Claim", onClick: () => {
290
+ return ((0, jsx_runtime_1.jsxs)(SWrapperLink, { href: opportunityLink, target: "_blank", onClick: () => openOpportunityAction({ opportunityId: opportunity.opportunityId }), children: [(0, jsx_runtime_1.jsx)(StyledCardHead, { backgroundImage: headColorImage, children: (0, jsx_runtime_1.jsx)(OpportunityName, { title: opportunity.name, children: opportunity.name }) }), (0, jsx_runtime_1.jsxs)(StyledCardContent, { children: [(0, jsx_runtime_1.jsx)("div", { className: "cardContent", children: (0, jsx_runtime_1.jsxs)("div", { className: "cardContentWrapper", children: [(0, jsx_runtime_1.jsx)("p", { className: `mainName`, dangerouslySetInnerHTML: { __html: sanitizedHtml } }), (0, jsx_runtime_1.jsxs)("div", { className: `categoryName`, children: [opportunity.categoryName, (0, jsx_runtime_1.jsx)(OpportunityDropDown_1.OpportunityDropDown, { opportunity: opportunity })] })] }) }), (0, jsx_runtime_1.jsxs)(index_1.Flex, { alignItems: "end", justifyContent: "space-between", className: `categoryFooter`, children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: data_1.default[opportunity.opportunityType] || data_1.default.opportunity }), isAirdrop && !opportunity.subscribed ? ((0, jsx_runtime_1.jsx)(MainButton_1.default, { className: "btnClaim", variant: "primaryXS", text: "Claim", onClick: () => {
276
291
  window.location.replace(opportunityLink);
277
292
  } })) : (opportunity.activeUntil && ((0, jsx_runtime_1.jsx)("div", { className: "date", children: `till ${(0, moment_1.default)(opportunity.activeUntil).format("LL")}` })))] })] })] }));
278
293
  };
@@ -1,5 +1,5 @@
1
1
  import { TOpportunity } from './type';
2
2
  export declare const GOOGLE_FORM_REPORT_OPPORTUNITY = "https://docs.google.com/forms/d/e/1FAIpQLScjeZ0ZHrsOKteM1FtWx6GfolXfWa9W2JFSwpwwI_sz-dsrkg/viewform";
3
- export declare const OpportunityDropDown: ({ opportunity, }: {
3
+ export declare const OpportunityDropDown: ({ opportunity }: {
4
4
  opportunity: TOpportunity;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
@@ -5,12 +5,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.OpportunityDropDown = exports.GOOGLE_FORM_REPORT_OPPORTUNITY = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
+ // import { alertVariants } from '@ludo.ninja/ui/build/system/Alert/type';
9
+ // import { copyToClipboard } from '@ludo.ninja/utils';
10
+ const encodeQuery_1 = require("./encodeQuery");
11
+ const OpportunityMenu_1 = require("./popup/OpportunityMenu");
12
+ const moreBtnVertical_svg_1 = __importDefault(require("../../public/creation/card/moreBtnVertical"));
13
+ const ui_1 = require("../../store/ui");
8
14
  // import { useUiStore } from '@/store/ui';
9
15
  const CardShowMore_1 = require("../../system/Cards/CardContent/CardShowMore");
10
- const moreBtnVertical_svg_1 = __importDefault(require("../../public/creation/card/moreBtnVertical"));
11
- const encodeQuery_1 = require("./encodeQuery");
12
- exports.GOOGLE_FORM_REPORT_OPPORTUNITY = 'https://docs.google.com/forms/d/e/1FAIpQLScjeZ0ZHrsOKteM1FtWx6GfolXfWa9W2JFSwpwwI_sz-dsrkg/viewform';
13
- const OpportunityDropDown = ({ opportunity, }) => {
16
+ const env_1 = require("../../store/env");
17
+ const ludoDomains_1 = require("@ludo.ninja/core/build/ludoDomains");
18
+ const ShareIcon = () => ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "10.1883", cy: "3.94221", r: "1.94221", stroke: "currentColor", strokeWidth: "1.5" }), (0, jsx_runtime_1.jsx)("circle", { cx: "4.12971", cy: "12.6921", r: "1.94221", stroke: "currentColor", strokeWidth: "1.5" }), (0, jsx_runtime_1.jsx)("path", { d: "M11.9763 15.3925C12.3788 15.4901 12.7843 15.2429 12.8819 14.8404C12.9795 14.4378 12.7323 14.0324 12.3298 13.9348L11.9763 15.3925ZM9.06939 5.41272L8.44771 4.99318L4.59316 10.7049L5.21484 11.1244L5.83652 11.544L9.69107 5.83226L9.06939 5.41272ZM5.7946 13.1218L5.61786 13.8507L11.9763 15.3925L12.153 14.6636L12.3298 13.9348L5.97134 12.3929L5.7946 13.1218Z", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("path", { d: "M14.8984 12.7695C16.3428 12.7695 17.5137 13.9404 17.5137 15.3848C17.5137 16.8291 16.3428 18 14.8984 18C13.4541 18 12.2832 16.8291 12.2832 15.3848C12.2832 13.9404 13.4541 12.7695 14.8984 12.7695Z", stroke: "currentColor", strokeWidth: "1.5" })] }));
19
+ const ReportIcon = () => ((0, jsx_runtime_1.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M13.2617 15.5902V4.15036C13.2618 3.58415 13.7209 3.12505 14.2871 3.125C14.8533 3.12508 15.3124 3.58413 15.3124 4.15036V15.5902C15.3124 16.1564 14.8532 16.6155 14.2871 16.6156C13.7209 16.6155 13.2618 16.1563 13.2617 15.5902Z", fill: "currentColor" }), (0, jsx_runtime_1.jsx)("path", { d: "M15.3125 9.28977L15.307 9.39498C15.2527 9.91035 14.8036 10.3124 14.2578 10.3125L5.11719 10.3125C4.83755 10.3125 4.56927 10.2046 4.37149 10.0129C4.1737 9.82107 4.0625 9.56102 4.0625 9.28977L4.0625 7.92614C4.0625 7.56689 4.25706 7.23339 4.57474 7.04856L11.606 2.95765C11.7697 2.86253 11.9575 2.8125 12.1484 2.8125L14.2578 2.8125C14.7866 2.81255 15.2333 3.1924 15.3029 3.70073C15.3105 3.7562 15.3114 3.81149 15.3098 3.86586C15.3103 3.86444 15.312 3.86328 15.3125 3.86186L15.3125 9.28977ZM12.4423 4.85795L6.58249 8.26705L13.2031 8.26705L13.2031 4.85795L12.4423 4.85795Z", fill: "currentColor" })] }));
20
+ exports.GOOGLE_FORM_REPORT_OPPORTUNITY = "https://docs.google.com/forms/d/e/1FAIpQLScjeZ0ZHrsOKteM1FtWx6GfolXfWa9W2JFSwpwwI_sz-dsrkg/viewform";
21
+ const OpportunityDropDown = ({ opportunity }) => {
22
+ const { openModalSidebarPortal, closeModalSidebarPortal } = (0, ui_1.useUiStore)((state) => ({
23
+ openModalSidebarPortal: state.openModalSidebarPortal,
24
+ closeModalSidebarPortal: state.closeModalSidebarPortal,
25
+ }));
26
+ const NEXT_PUBLIC_ENV_VALUE = (0, env_1.useEnvStore)((state) => state.NEXT_PUBLIC_ENV_VALUE);
14
27
  // const openAlert = useUiStore((state) => state.openAlert);
15
28
  // const copyAssetLinkToClipboard = (e: { preventDefault: () => void }) => {
16
29
  // e.preventDefault();
@@ -19,24 +32,23 @@ const OpportunityDropDown = ({ opportunity, }) => {
19
32
  // type: alertVariants.copied,
20
33
  // });
21
34
  // };
35
+ const onShareClick = (event) => {
36
+ event.preventDefault();
37
+ openModalSidebarPortal((0, jsx_runtime_1.jsx)(OpportunityMenu_1.OpportunityMenu, { opportunity: opportunity, onClose: closeModalSidebarPortal }));
38
+ };
22
39
  const onReportClick = () => {
23
- const opportunityId = opportunity.opportunityId
24
- ? `ID: ${opportunity.opportunityId}`
25
- : '';
26
- const link = opportunity.projectUrl
27
- ? ` Link: ${opportunity.projectUrl}`
28
- : '';
40
+ const opportunityId = opportunity.opportunityId ? `ID: ${opportunity.opportunityId}` : "";
41
+ const link = opportunity.projectUrl ? ` Link: ${opportunity.projectUrl}` : "";
29
42
  const generatedQueryParams = encodeQuery_1.encodeQuery.stringify({
30
- 'entry.1716021430': 'Opportunity',
31
- 'entry.102149572': `${opportunityId}${link}`,
32
- 'entry.483745074': `Opportunity: ${opportunity.name}`,
33
- }, { format: 'RFC1738' } // "RFC1738" format - replaces spaces ' ' with '+'.
34
- );
35
- const url = `${exports.GOOGLE_FORM_REPORT_OPPORTUNITY}?usp=pp_url&${generatedQueryParams}`;
36
- window.open(url, '_blank');
43
+ "entry.1716021430": "Opportunity",
44
+ "entry.102149572": `${opportunityId}${link}`,
45
+ "entry.483745074": `Opportunity: ${opportunity.name}`,
46
+ }, { format: "RFC1738" });
47
+ window.open(`${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]['app']}/forms/report?contentType=Opportunity&nameOfSubject=${opportunity.name}p&contentId=${opportunityId}${link}`, "_blank");
37
48
  };
38
49
  return ((0, jsx_runtime_1.jsx)(CardShowMore_1.StyledCardShowMore, { onClick: (e) => {
50
+ e.preventDefault();
39
51
  e.stopPropagation();
40
- }, children: (0, jsx_runtime_1.jsxs)("div", { className: "cardShowMore", children: [(0, jsx_runtime_1.jsx)(moreBtnVertical_svg_1.default, {}), (0, jsx_runtime_1.jsx)("div", { className: `cardShowMoreDropDown`, children: (0, jsx_runtime_1.jsx)("span", { className: 'cardShowMoreDropDownItem', onClick: onReportClick, children: "Report" }) })] }) }));
52
+ }, children: (0, jsx_runtime_1.jsxs)("div", { className: "cardShowMore", children: [(0, jsx_runtime_1.jsx)(moreBtnVertical_svg_1.default, { className: 'moreButton' }), (0, jsx_runtime_1.jsxs)("div", { className: `cardShowMoreDropDown`, children: [(0, jsx_runtime_1.jsxs)("span", { className: "cardShowMoreDropDownItem", onClick: onReportClick, children: [(0, jsx_runtime_1.jsx)(ReportIcon, {}), "Report"] }), (0, jsx_runtime_1.jsxs)("span", { className: "cardShowMoreDropDownItem", onClick: onShareClick, children: [(0, jsx_runtime_1.jsx)(ShareIcon, {}), "Share"] })] })] }) }));
41
53
  };
42
54
  exports.OpportunityDropDown = OpportunityDropDown;
@@ -9,19 +9,19 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
9
9
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
10
10
  var MoreBtnVerticalIcon = function MoreBtnVerticalIcon(props) {
11
11
  return /*#__PURE__*/_react["default"].createElement("svg", _extends({}, props, {
12
- width: "4",
13
- height: "14",
14
- viewBox: "0 0 4 14",
15
- fill: "none",
16
- xmlns: "http://www.w3.org/2000/svg"
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ width: "14",
14
+ height: "18",
15
+ viewBox: "0 0 14 18",
16
+ fill: "none"
17
17
  }), /*#__PURE__*/_react["default"].createElement("path", {
18
- d: "M3.5 12.5C3.5 13.3284 2.82843 14 2 14C1.17157 14 0.5 13.3284 0.5 12.5C0.5 11.6716 1.17157 11 2 11C2.82843 11 3.5 11.6716 3.5 12.5Z",
18
+ d: "M8.5 14.5C8.5 15.3284 7.82843 16 7 16C6.17157 16 5.5 15.3284 5.5 14.5C5.5 13.6716 6.17157 13 7 13C7.82843 13 8.5 13.6716 8.5 14.5Z",
19
19
  fill: "#B0B2C0"
20
20
  }), /*#__PURE__*/_react["default"].createElement("path", {
21
- d: "M3.5 7.0022C3.5 7.83062 2.82843 8.5022 2 8.5022C1.17157 8.5022 0.5 7.83062 0.5 7.0022C0.5 6.17377 1.17157 5.5022 2 5.5022C2.82843 5.5022 3.5 6.17377 3.5 7.0022Z",
21
+ d: "M8.5 9.0022C8.5 9.83062 7.82843 10.5022 7 10.5022C6.17157 10.5022 5.5 9.83062 5.5 9.0022C5.5 8.17377 6.17157 7.5022 7 7.5022C7.82843 7.5022 8.5 8.17377 8.5 9.0022Z",
22
22
  fill: "#B0B2C0"
23
23
  }), /*#__PURE__*/_react["default"].createElement("path", {
24
- d: "M3.5024 1.49992C3.5024 2.32835 2.83083 2.99992 2.0024 2.99992C1.17397 2.99992 0.502398 2.32835 0.502398 1.49992C0.502398 0.671497 1.17397 -7.62542e-05 2.0024 -7.62542e-05C2.83083 -7.62542e-05 3.5024 0.671497 3.5024 1.49992Z",
24
+ d: "M8.50191 3.49988C8.50191 4.32831 7.83034 4.99988 7.00191 4.99988C6.17348 4.99988 5.50191 4.32831 5.50191 3.49988C5.50191 2.67145 6.17348 1.99988 7.00191 1.99988C7.83034 1.99988 8.50191 2.67145 8.50191 3.49988Z",
25
25
  fill: "#B0B2C0"
26
26
  }));
27
27
  };
@@ -15,12 +15,39 @@ const colors_1 = require("../../../../styles/colors");
15
15
  const typography_1 = require("../../../../styles/typography");
16
16
  const vars_1 = require("../../../../fonts/vars");
17
17
  const moreBtnVertical_svg_1 = __importDefault(require("../../../../public/creation/card/moreBtnVertical"));
18
+ const colors_2 = require("@ludo.ninja/ui/build/styles/colors");
18
19
  // Styles
19
20
  exports.StyledCardShowMore = styled_components_1.default.div `
20
21
  .cardShowMore {
21
22
  position: relative;
22
23
  cursor: pointer;
23
24
  z-index: 100;
25
+ svg {
26
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
27
+ width: ${(0, _4k_1.adaptiveValueCalc)(14)};
28
+ height: ${(0, _4k_1.adaptiveValueCalc)(18)};
29
+ }
30
+ }
31
+
32
+ .cardShowMoreDropDownItem{
33
+ display: flex;
34
+ gap: 8px;
35
+ svg {
36
+ color: ${colors_1.TextDarkGrayColor};
37
+ }
38
+ :hover {
39
+ svg {
40
+ color: ${colors_2.TextGrayColor};
41
+ }
42
+ }
43
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
44
+ gap: ${(0, _4k_1.adaptiveValueCalc)(8)};
45
+ svg {
46
+ width: ${(0, _4k_1.adaptiveValueCalc)(20)};
47
+ height: ${(0, _4k_1.adaptiveValueCalc)(20)};
48
+ }
49
+ }
50
+ }
24
51
 
25
52
  &:before {
26
53
  content: '';
@@ -33,18 +60,18 @@ exports.StyledCardShowMore = styled_components_1.default.div `
33
60
  z-index: -1;
34
61
  }
35
62
 
36
- @media (max-width: 1200px) {
37
- display: none;
38
- }
63
+ //@media (max-width: 1200px) {
64
+ // display: none;
65
+ //}
39
66
 
40
67
  &DropDown {
41
68
  font-family: ${vars_1.dmsansFontVarCss.css};
42
69
  display: none;
43
70
  position: absolute;
44
71
  background-color: white;
45
- top: 20px;
46
- left: -170px;
47
- width: 184px;
72
+ left: -120px;
73
+ top: -70px;
74
+ width: 118px;
48
75
  box-shadow: 0px 0px 10px 5px rgba(33, 21, 95, 0.1);
49
76
  border-radius: 6px;
50
77
  padding: 8px;;
@@ -82,9 +109,9 @@ exports.StyledCardShowMore = styled_components_1.default.div `
82
109
  height: ${(0, _4k_1.adaptiveValueCalc)(40)};
83
110
  }
84
111
  &DropDown {
85
- top: ${(0, _4k_1.adaptiveValueCalc)(20)};
86
- left:${(0, _4k_1.adaptiveValueCalc)(-170)};
87
- width: ${(0, _4k_1.adaptiveValueCalc)(184)};
112
+ top: ${(0, _4k_1.adaptiveValueCalc)(-70)};
113
+ left:${(0, _4k_1.adaptiveValueCalc)(-120)};
114
+ width: ${(0, _4k_1.adaptiveValueCalc)(118)};
88
115
  box-shadow: 0px 0px ${(0, _4k_1.adaptiveValueCalc)(10)} ${(0, _4k_1.adaptiveValueCalc)(5)} rgba(33, 21, 95, 0.1);
89
116
  border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
90
117
  padding: ${(0, _4k_1.adaptiveValueCalc)(8)};
@@ -115,7 +142,7 @@ const CardShowMore = ({ itemId, href }) => {
115
142
  type: type_1.alertVariants.copied,
116
143
  });
117
144
  };
118
- return ((0, jsx_runtime_1.jsx)(exports.StyledCardShowMore, { children: (0, jsx_runtime_1.jsxs)("div", { className: "cardShowMore", children: [(0, jsx_runtime_1.jsx)(moreBtnVertical_svg_1.default, {}), (0, jsx_runtime_1.jsx)("div", { className: `cardShowMoreDropDown`, id: itemId, onClick: copyAssetLinkToClipboard, children: (0, jsx_runtime_1.jsx)("span", { className: 'cardShowMoreDropDownItem', children: "Copy link" }) })] }) }));
145
+ return ((0, jsx_runtime_1.jsx)(exports.StyledCardShowMore, { children: (0, jsx_runtime_1.jsxs)("div", { className: "cardShowMore", children: [(0, jsx_runtime_1.jsx)(moreBtnVertical_svg_1.default, { className: 'moreButton' }), (0, jsx_runtime_1.jsx)("div", { className: `cardShowMoreDropDown`, id: itemId, onClick: copyAssetLinkToClipboard, children: (0, jsx_runtime_1.jsx)("span", { className: 'cardShowMoreDropDownItem', children: "Copy link" }) })] }) }));
119
146
  };
120
147
  // Export
121
148
  exports.default = CardShowMore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.3.80",
3
+ "version": "2.3.82",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",