@ludo.ninja/components 2.4.29 → 2.4.31

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.
@@ -14,7 +14,7 @@ const react_1 = require("react");
14
14
  const styled_components_1 = __importDefault(require("styled-components"));
15
15
  const StyledButton = styled_components_1.default.button `
16
16
  position: fixed;
17
- inset: 50% 0 auto auto;
17
+ inset: calc(50% - 18px) 0 auto auto;
18
18
  z-index: 999999;
19
19
 
20
20
  display: flex;
@@ -52,9 +52,9 @@ const StyledButton = styled_components_1.default.button `
52
52
  }
53
53
 
54
54
  ${ScreenWidth_1.mediaQuery.minWidthFourK} {
55
- inset: auto auto ${(0, _4k_1.adaptiveValueCalc)(48)} 0;
56
- padding: ${(0, _4k_1.adaptiveValueCalc)(7)} ${(0, _4k_1.adaptiveValueCalc)(22)} ${(0, _4k_1.adaptiveValueCalc)(7)} ${(0, _4k_1.adaptiveValueCalc)(18)};
57
- border-radius: 0 ${(0, _4k_1.adaptiveValueCalc)(30)} ${(0, _4k_1.adaptiveValueCalc)(30)} 0;
55
+ inset: calc(50% - ${(0, _4k_1.adaptiveValueCalc)(18)}) 0 auto auto;
56
+ padding: ${(0, _4k_1.adaptiveValueCalc)(7)} ${(0, _4k_1.adaptiveValueCalc)(18)} ${(0, _4k_1.adaptiveValueCalc)(7)} ${(0, _4k_1.adaptiveValueCalc)(22)};
57
+ border-radius: ${(0, _4k_1.adaptiveValueCalc)(30)} 0 0 ${(0, _4k_1.adaptiveValueCalc)(30)};
58
58
 
59
59
  svg {
60
60
  width: ${(0, _4k_1.adaptiveValueCalc)(24)};
@@ -81,7 +81,7 @@ const SearchSuggestions = ({ searchTerm, assets = [], profiles = [], collections
81
81
  caption: "Projects",
82
82
  children: projects.map((project) => ((0, jsx_runtime_1.jsx)(searchSuggestionsItem_1.default, { name: project?.name || project?.slug || project.id.split('.')?.[1], link: `${ludoDomains_1.ludoDomains[NEXT_PUBLIC_ENV_VALUE]["welcome"]}/x/${project?.slug}`,
83
83
  // imgUrl={`${staticLink}/public/noContent/noContent.svg`}
84
- searchTerm: searchTerm, projectRank: project?.ludoRank }, `${project?.id}.${Math.random()}`))),
84
+ searchTerm: searchTerm, projectRank: project?.ludoRank, isRugged: project?.removalReason === 'possible_rug' }, `${project?.id}.${Math.random()}`))),
85
85
  },
86
86
  ]
87
87
  : []),
@@ -4,6 +4,7 @@ interface Props {
4
4
  link: string;
5
5
  imgUrl?: string;
6
6
  borderRadius?: boolean;
7
+ isRugged?: boolean;
7
8
  additionalHTML?: React.ReactNode;
8
9
  afterText?: React.ReactNode;
9
10
  searchTerm?: string;
@@ -12,6 +12,7 @@ const colors_1 = require("../../../../styles/colors");
12
12
  const typography_1 = require("../../../../styles/typography");
13
13
  const ImageInterceptor_1 = require("../../../../system/Img/ImageInterceptor");
14
14
  const ui_1 = require("@ludo.ninja/ui");
15
+ const helpers_1 = require("chart.js/helpers");
15
16
  // Styles
16
17
  const StyledSearchSuggestionsItem = styled_components_1.default.div `
17
18
  user-select: none;
@@ -127,10 +128,10 @@ const StyledSearchSuggestionsItem = styled_components_1.default.div `
127
128
  }
128
129
  `;
129
130
  // Components
130
- const SearchSuggestionsItem = ({ name, link, imgUrl, borderRadius, additionalHTML, searchTerm, projectRank, afterText }) => ((0, jsx_runtime_1.jsx)(StyledSearchSuggestionsItem, { borderRadius: borderRadius, children: (0, jsx_runtime_1.jsxs)("a", { href: link, className: 'link', children: [Boolean(imgUrl) && ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: borderRadius && 16, children: (0, jsx_runtime_1.jsx)("img", { src: imgUrl, alt: 'pirate', width: 32, height: 32 }) })), (0, jsx_runtime_1.jsxs)("div", { className: 'text', children: [(0, jsx_runtime_1.jsx)("p", { className: 'regular', children: (0, utils_1.searchQueryLetters)({
131
+ const SearchSuggestionsItem = ({ name, link, imgUrl, borderRadius, additionalHTML, searchTerm, projectRank, afterText, isRugged }) => ((0, jsx_runtime_1.jsx)(StyledSearchSuggestionsItem, { borderRadius: borderRadius, children: (0, jsx_runtime_1.jsxs)("a", { href: link, className: 'link', children: [Boolean(imgUrl) && ((0, jsx_runtime_1.jsx)(ImageInterceptor_1.ImageInterceptor, { borderRadiusSkeleton: borderRadius && 16, children: (0, jsx_runtime_1.jsx)("img", { src: imgUrl, alt: 'pirate', width: 32, height: 32 }) })), (0, jsx_runtime_1.jsxs)("div", { className: 'text', children: [(0, jsx_runtime_1.jsx)("p", { className: 'regular', children: (0, utils_1.searchQueryLetters)({
131
132
  text: name,
132
133
  searchQuery: searchTerm,
133
134
  className: 'strong',
134
- }) }), afterText] }), (0, jsx_runtime_1.jsx)(ui_1.H5, { className: 'ludo-rank', children: projectRank ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["LR ", (0, jsx_runtime_1.jsx)("span", { style: { color: (0, utils_1.getRankColor)(projectRank), fontWeight: 700 }, children: projectRank })] })) : ((0, jsx_runtime_1.jsx)("span", { style: { color: colors_1.ErrorColor }, children: "Rugged" })) }), additionalHTML] }) }));
135
+ }) }), afterText] }), (0, jsx_runtime_1.jsx)(ui_1.H5, { className: 'ludo-rank', children: !isRugged ? (0, helpers_1.isNumber)(projectRank) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["LR ", (0, jsx_runtime_1.jsx)("span", { style: { color: (0, utils_1.getRankColor)(projectRank), fontWeight: 700 }, children: projectRank })] })) : ((0, jsx_runtime_1.jsx)("span", { style: { color: colors_1.ErrorColor }, children: "Rugged" })) }), additionalHTML] }) }));
135
136
  // Export
136
137
  exports.default = SearchSuggestionsItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.4.29",
3
+ "version": "2.4.31",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",