@ludo.ninja/components 2.1.46 → 2.1.48

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,12 @@ 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
+ align-items: flex-start;
161
+ }
162
+ }
156
163
 
157
164
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
158
165
  padding: ${(0, _4k_1.adaptiveValueCalc)(12)} ${(0, _4k_1.adaptiveValueCalc)(16)};
@@ -172,7 +179,7 @@ const StyledCardContent = styled_components_1.default.div `
172
179
  .categoryName {
173
180
  font-size: ${(0, _4k_1.adaptiveValueCalc)(12)};
174
181
  line-height: ${(0, _4k_1.adaptiveValueCalc)(16)};
175
- margin-top: ${(0, _4k_1.adaptiveValueCalc)(8)};
182
+ margin-top: ${(0, _4k_1.adaptiveValueCalc)(12)};
176
183
  }
177
184
  }
178
185
  }
@@ -189,7 +196,7 @@ const SImage = styled_components_1.default.img `
189
196
  object-fit: cover;
190
197
  `;
191
198
  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 }) }));
199
+ 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
200
  };
194
201
  const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) => {
195
202
  const [isLiked, setIsLiked] = (0, react_1.useState)(isDefaultLiked);
@@ -201,7 +208,7 @@ const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) =>
201
208
  try {
202
209
  if (isLiked) {
203
210
  await dislikeOpportunityAction({ opportunityId });
204
- toolsForRemove?.('opportunity');
211
+ toolsForRemove?.("opportunity");
205
212
  setIsLiked(false);
206
213
  }
207
214
  else {
@@ -214,8 +221,8 @@ const OpportunityLike = ({ isDefaultLiked, opportunityId, toolsForRemove, }) =>
214
221
  }
215
222
  setIsLoadingMutation(false);
216
223
  };
217
- return ((0, jsx_runtime_1.jsx)("div", { className: `icon like ${isLiked ? 'liked' : ''}`, onClick: handleLikeToggle, style: {
218
- pointerEvents: isLoadingMutation ? 'none' : 'unset',
224
+ return ((0, jsx_runtime_1.jsx)("div", { className: `icon like ${isLiked ? "liked" : ""}`, onClick: handleLikeToggle, style: {
225
+ pointerEvents: isLoadingMutation ? "none" : "unset",
219
226
  }, children: (0, jsx_runtime_1.jsx)(heart_svg_1.default, {}) }));
220
227
  };
221
228
  const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
@@ -229,13 +236,13 @@ const OpportunityCard = ({ opportunity, toolsForRemove, }) => {
229
236
  }));
230
237
  const getMediaENVDomain = (0, env_1.useEnvStore)((state) => state.getMediaDomain);
231
238
  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
239
+ 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
240
  ? `${getMediaENVDomain()}/opportunity-medias/${opportunity.media}`
234
- : '' }), (0, jsx_runtime_1.jsx)(Headicons_1.default, { isMobile: isMobile, onClick: (e) => {
241
+ : "" }), (0, jsx_runtime_1.jsx)(Headicons_1.default, { isMobile: isMobile, onClick: (e) => {
235
242
  e.stopPropagation();
236
243
  e.preventDefault();
237
244
  }, children: (0, jsx_runtime_1.jsxs)("div", { className: "icons", children: [(0, jsx_runtime_1.jsx)("div", { className: "icon", onClick: () => {
238
245
  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')}` }))] })] })] }));
246
+ }, 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
247
  };
241
248
  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.48",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",