@ludo.ninja/components 2.1.46 → 2.1.47

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.
@@ -137,11 +137,12 @@ const StyledCardContent = styled_components_1.default.div `
137
137
  font-size: 12px;
138
138
  line-height: 16px;
139
139
  font-family: ${vars_1.poppinsFontVarCss.css};
140
- margin-top: 8px;
140
+ margin-top: 12px;
141
141
  }
142
142
  }
143
143
  }
144
144
 
145
+
145
146
  .date {
146
147
  color: #b0b2c0;
147
148
  font-size: 12px;
@@ -153,6 +154,11 @@ const StyledCardContent = styled_components_1.default.div `
153
154
  height: auto;
154
155
  padding: 12px;
155
156
  }
157
+ @media (max-width: 1199px) {
158
+ .categoryFooter {
159
+ flex-direction: column;
160
+ }
161
+ }
156
162
 
157
163
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
158
164
  padding: ${(0, _4k_1.adaptiveValueCalc)(12)} ${(0, _4k_1.adaptiveValueCalc)(16)};
@@ -172,7 +178,7 @@ const StyledCardContent = styled_components_1.default.div `
172
178
  .categoryName {
173
179
  font-size: ${(0, _4k_1.adaptiveValueCalc)(12)};
174
180
  line-height: ${(0, _4k_1.adaptiveValueCalc)(16)};
175
- margin-top: ${(0, _4k_1.adaptiveValueCalc)(8)};
181
+ margin-top: ${(0, _4k_1.adaptiveValueCalc)(12)};
176
182
  }
177
183
  }
178
184
  }
@@ -189,7 +195,7 @@ const SImage = styled_components_1.default.img `
189
195
  object-fit: cover;
190
196
  `;
191
197
  const OpportunityImage = ({ src, alt }) => {
192
- return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { className: 'imgWrapper', children: (0, jsx_runtime_1.jsx)(SImage, { src: src, alt: alt, width: 252, height: 152 }) }));
198
+ return ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { className: "imgWrapper", children: (0, jsx_runtime_1.jsx)(SImage, { src: src, alt: alt, width: 252, height: 152 }) }));
193
199
  };
194
200
  const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) => {
195
201
  const [isLiked, setIsLiked] = (0, react_1.useState)(isDefaultLiked);
@@ -201,7 +207,7 @@ const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) =>
201
207
  try {
202
208
  if (isLiked) {
203
209
  await dislikeOpportunityAction({ opportunityId });
204
- toolsForRemove?.('opportunity');
210
+ toolsForRemove?.("opportunity");
205
211
  setIsLiked(false);
206
212
  }
207
213
  else {
@@ -214,8 +220,8 @@ const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) =>
214
220
  }
215
221
  setIsLoadingMutation(false);
216
222
  };
217
- return ((0, jsx_runtime_1.jsx)("div", { className: `icon like ${isLiked ? 'liked' : ''}`, onClick: handleLikeToggle, style: {
218
- pointerEvents: isLoadingMutation ? 'none' : 'unset',
223
+ return ((0, jsx_runtime_1.jsx)("div", { className: `icon like ${isLiked ? "liked" : ""}`, onClick: handleLikeToggle, style: {
224
+ pointerEvents: isLoadingMutation ? "none" : "unset",
219
225
  }, children: (0, jsx_runtime_1.jsx)(heart_svg_1.default, {}) }));
220
226
  };
221
227
  const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
@@ -229,13 +235,13 @@ const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
229
235
  }));
230
236
  const getMediaENVDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
231
237
  const isProd = (0, env_1.useEnvStore)((state) => state.isProd);
232
- return ((0, jsx_runtime_1.jsxs)(SWrapperLink, { href: opportunity.projectUrl || opportunity.shareLink || '', target: "_blank", children: [(0, jsx_runtime_1.jsxs)(StyledCardHead, { children: [(0, jsx_runtime_1.jsx)(OpportunityImage, { alt: opportunity.name, src: opportunity.media
238
+ return ((0, jsx_runtime_1.jsxs)(SWrapperLink, { href: opportunity.projectUrl || opportunity.shareLink || "", target: "_blank", children: [(0, jsx_runtime_1.jsxs)(StyledCardHead, { children: [(0, jsx_runtime_1.jsx)(OpportunityImage, { alt: opportunity.name, src: opportunity.media
233
239
  ? `${getMediaENVDomain()}/opportunity-medias/${opportunity.media}`
234
- : '' }), (0, jsx_runtime_1.jsx)(Headicons_1.default, { isMobile: isMobile, onClick: (e) => {
240
+ : "" }), (0, jsx_runtime_1.jsx)(Headicons_1.default, { isMobile: isMobile, onClick: (e) => {
235
241
  e.stopPropagation();
236
242
  e.preventDefault();
237
243
  }, children: (0, jsx_runtime_1.jsxs)("div", { className: "icons", children: [(0, jsx_runtime_1.jsx)("div", { className: "icon", onClick: () => {
238
244
  openModalSidebarPortal((0, jsx_runtime_1.jsx)(OpportunityMenu_1.OpportunityMenu, { opportunity: opportunity, onClose: closeModalSidebarPortal }));
239
- }, 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)("h3", { className: `secondName`, children: opportunity.name }), (0, jsx_runtime_1.jsx)("h3", { className: `mainName`, children: opportunity.description }), (0, jsx_runtime_1.jsx)("h3", { 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', children: [(0, jsx_runtime_1.jsx)(CardCategory_1.default, { label: data_1.default.opportunity }), opportunity.activeUntil && ((0, jsx_runtime_1.jsx)("div", { className: "date", children: `till ${(0, moment_1.default)(opportunity.activeUntil).format('LL')}` }))] })] })] }));
245
+ }, 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`, children: opportunity.description }), (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 }), opportunity.activeUntil && ((0, jsx_runtime_1.jsx)("div", { className: "date", children: `till ${(0, moment_1.default)(opportunity.activeUntil).format("LL")}` }))] })] })] }));
240
246
  };
241
247
  exports.OpportunityCard = OpportunityCard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.1.46",
3
+ "version": "2.1.47",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",