@redneckz/wildless-cms-uni-blocks 0.14.44 → 0.14.46

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 (150) hide show
  1. package/bin/migration-scripts/0.14.44.js +103 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +27 -36
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/dist/components/Blocks.js +0 -2
  6. package/dist/components/Blocks.js.map +1 -1
  7. package/dist/components/CardTransfer/CardTransfer.js +8 -4
  8. package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  9. package/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
  10. package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  11. package/dist/components/Header/DropdownMenu.js +2 -1
  12. package/dist/components/Header/DropdownMenu.js.map +1 -1
  13. package/dist/components/LinkDocs/LinkDocItem.js +2 -2
  14. package/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
  15. package/dist/ui-kit/Button/LikeButton.js +5 -9
  16. package/dist/ui-kit/Button/LikeButton.js.map +1 -1
  17. package/dist/ui-kit/Img/ImgAsPicture.js +2 -2
  18. package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  19. package/dist/ui-kit/SVG.js +4 -1
  20. package/dist/ui-kit/SVG.js.map +1 -1
  21. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  22. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  23. package/lib/common.css +1 -1
  24. package/lib/components/Blocks.js +0 -2
  25. package/lib/components/Blocks.js.map +1 -1
  26. package/lib/components/CardTransfer/CardTransfer.js +8 -4
  27. package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  28. package/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
  29. package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  30. package/lib/components/Header/DropdownMenu.js +2 -1
  31. package/lib/components/Header/DropdownMenu.js.map +1 -1
  32. package/lib/components/LinkDocs/LinkDocItem.js +2 -2
  33. package/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
  34. package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +1 -0
  35. package/lib/ui-kit/Button/LikeButton.js +5 -9
  36. package/lib/ui-kit/Button/LikeButton.js.map +1 -1
  37. package/lib/ui-kit/Img/ImgAsPicture.js +2 -2
  38. package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  39. package/lib/ui-kit/SVG.js +4 -1
  40. package/lib/ui-kit/SVG.js.map +1 -1
  41. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  42. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  43. package/mobile/bundle/bundle.umd.js +25 -23
  44. package/mobile/bundle/bundle.umd.min.js +1 -1
  45. package/mobile/dist/components/CardTransfer/CardTransfer.js +8 -4
  46. package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
  47. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +3 -3
  48. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  49. package/mobile/dist/components/Header/DropdownMenu.js +2 -1
  50. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  51. package/mobile/dist/components/LinkDocs/LinkDocItem.js +2 -2
  52. package/mobile/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
  53. package/mobile/dist/ui-kit/Button/LikeButton.js +5 -9
  54. package/mobile/dist/ui-kit/Button/LikeButton.js.map +1 -1
  55. package/mobile/dist/ui-kit/Img/ImgAsPicture.js +2 -2
  56. package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  57. package/mobile/dist/ui-kit/SVG.js +4 -1
  58. package/mobile/dist/ui-kit/SVG.js.map +1 -1
  59. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  60. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  61. package/mobile/lib/common.css +1 -1
  62. package/mobile/lib/components/CardTransfer/CardTransfer.js +8 -4
  63. package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
  64. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +3 -3
  65. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  66. package/mobile/lib/components/Header/DropdownMenu.js +2 -1
  67. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  68. package/mobile/lib/components/LinkDocs/LinkDocItem.js +2 -2
  69. package/mobile/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
  70. package/mobile/lib/ui-kit/Button/LikeButton.js +5 -9
  71. package/mobile/lib/ui-kit/Button/LikeButton.js.map +1 -1
  72. package/mobile/lib/ui-kit/Img/ImgAsPicture.js +2 -2
  73. package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  74. package/mobile/lib/ui-kit/SVG.js +4 -1
  75. package/mobile/lib/ui-kit/SVG.js.map +1 -1
  76. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  77. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  78. package/mobile/src/components/CardTransfer/CardTransfer.tsx +10 -7
  79. package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
  80. package/mobile/src/components/Header/DropdownMenu.tsx +5 -2
  81. package/mobile/src/components/LinkDocs/LinkDocItem.tsx +4 -5
  82. package/mobile/src/ui-kit/Button/LikeButton.tsx +18 -17
  83. package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
  84. package/mobile/src/ui-kit/SVG.tsx +16 -3
  85. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
  86. package/package.json +1 -1
  87. package/src/components/Blocks.ts +0 -2
  88. package/src/components/CardTransfer/CardTransfer.tsx +10 -7
  89. package/src/components/CarouselLinks/CarouselLinkButton.tsx +5 -3
  90. package/src/components/Header/DropdownMenu.tsx +5 -2
  91. package/src/components/LinkDocs/LinkDocItem.tsx +4 -5
  92. package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +62 -0
  93. package/src/ui-kit/Button/LikeButton.tsx +18 -17
  94. package/src/ui-kit/Img/ImgAsPicture.tsx +4 -2
  95. package/src/ui-kit/SVG.tsx +16 -3
  96. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
  97. package/bundle/components/BusinessBlock/BusinessBlock.d.ts +0 -5
  98. package/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
  99. package/bundle/components/BusinessBlock/BusinessCard.d.ts +0 -2
  100. package/dist/components/BusinessBlock/BusinessBlock.d.ts +0 -5
  101. package/dist/components/BusinessBlock/BusinessBlock.js +0 -9
  102. package/dist/components/BusinessBlock/BusinessBlock.js.map +0 -1
  103. package/dist/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
  104. package/dist/components/BusinessBlock/BusinessBlockContent.js +0 -2
  105. package/dist/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
  106. package/dist/components/BusinessBlock/BusinessCard.d.ts +0 -2
  107. package/dist/components/BusinessBlock/BusinessCard.js +0 -17
  108. package/dist/components/BusinessBlock/BusinessCard.js.map +0 -1
  109. package/lib/components/BusinessBlock/BusinessBlock.d.ts +0 -5
  110. package/lib/components/BusinessBlock/BusinessBlock.fixture.d.ts +0 -6
  111. package/lib/components/BusinessBlock/BusinessBlock.js +0 -7
  112. package/lib/components/BusinessBlock/BusinessBlock.js.map +0 -1
  113. package/lib/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
  114. package/lib/components/BusinessBlock/BusinessBlockContent.js +0 -2
  115. package/lib/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
  116. package/lib/components/BusinessBlock/BusinessCard.d.ts +0 -2
  117. package/lib/components/BusinessBlock/BusinessCard.js +0 -15
  118. package/lib/components/BusinessBlock/BusinessCard.js.map +0 -1
  119. package/mobile/bundle/components/BusinessBlock/BusinessBlock.d.ts +0 -5
  120. package/mobile/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
  121. package/mobile/bundle/components/BusinessBlock/BusinessCard.d.ts +0 -2
  122. package/mobile/dist/components/BusinessBlock/BusinessBlock.d.ts +0 -5
  123. package/mobile/dist/components/BusinessBlock/BusinessBlock.js +0 -9
  124. package/mobile/dist/components/BusinessBlock/BusinessBlock.js.map +0 -1
  125. package/mobile/dist/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
  126. package/mobile/dist/components/BusinessBlock/BusinessBlockContent.js +0 -2
  127. package/mobile/dist/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
  128. package/mobile/dist/components/BusinessBlock/BusinessCard.d.ts +0 -2
  129. package/mobile/dist/components/BusinessBlock/BusinessCard.js +0 -17
  130. package/mobile/dist/components/BusinessBlock/BusinessCard.js.map +0 -1
  131. package/mobile/lib/components/BusinessBlock/BusinessBlock.d.ts +0 -5
  132. package/mobile/lib/components/BusinessBlock/BusinessBlock.js +0 -7
  133. package/mobile/lib/components/BusinessBlock/BusinessBlock.js.map +0 -1
  134. package/mobile/lib/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
  135. package/mobile/lib/components/BusinessBlock/BusinessBlockContent.js +0 -2
  136. package/mobile/lib/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
  137. package/mobile/lib/components/BusinessBlock/BusinessCard.d.ts +0 -2
  138. package/mobile/lib/components/BusinessBlock/BusinessCard.js +0 -15
  139. package/mobile/lib/components/BusinessBlock/BusinessCard.js.map +0 -1
  140. package/mobile/src/components/BusinessBlock/BusinessBlock.example.json +0 -97
  141. package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +0 -17
  142. package/mobile/src/components/BusinessBlock/BusinessBlock.ui.json +0 -29
  143. package/mobile/src/components/BusinessBlock/BusinessBlockContent.ts +0 -30
  144. package/mobile/src/components/BusinessBlock/BusinessCard.tsx +0 -42
  145. package/src/components/BusinessBlock/BusinessBlock.example.json +0 -97
  146. package/src/components/BusinessBlock/BusinessBlock.fixture.tsx +0 -75
  147. package/src/components/BusinessBlock/BusinessBlock.tsx +0 -17
  148. package/src/components/BusinessBlock/BusinessBlock.ui.json +0 -29
  149. package/src/components/BusinessBlock/BusinessBlockContent.ts +0 -30
  150. package/src/components/BusinessBlock/BusinessCard.tsx +0 -42
@@ -2,14 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  export const LikeButton = JSX(({ className, onClick, ariaLabel }) => (_jsx("button", { type: "button", className: `border-0 w-9 bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
4
4
  const renderLikeIcon = () => {
5
- const params = {
6
- stroke: '#292D32',
7
- strokeLinecap: 'round',
8
- strokeLinejoin: 'round',
9
- strokeWidth: '1.5',
10
- };
11
- return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("path", { ...params, strokeMiterlimit: "10",
12
- /* eslint-disable max-len */
13
- d: "M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77" }), _jsx("path", { ...params, d: "M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" })] }));
5
+ const handPath = 'M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1' +
6
+ ' 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77';
7
+ const cuffPath = 'M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z';
8
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [renderLinkIconPath(handPath), renderLinkIconPath(cuffPath)] }));
14
9
  };
10
+ const renderLinkIconPath = (d) => (_jsx("path", { stroke: "#292D32", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", strokeMiterlimit: "10", d: d }));
15
11
  //# sourceMappingURL=LikeButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LikeButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/LikeButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AASxC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CACpF,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,0CAA0C,SAAS,IAAI,EAAE,EAAE,EACtE,OAAO,EAAE,OAAO,gBACJ,SAAS,YAEpB,cAAc,EAAE,GACV,CACV,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,MAAM,GAAG;QACb,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,OAAO;QACtB,cAAc,EAAE,OAAO;QACvB,WAAW,EAAE,KAAK;KACD,CAAC;IAEpB,OAAO,CACL,eAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACrE,kBACM,MAAM,EACV,gBAAgB,EAAC,IAAI;gBACrB,4BAA4B;gBAC5B,CAAC,EAAC,wLAAwL,GAC1L,EACF,kBACM,MAAM,EACV,CAAC,EAAC,oGAAoG,GACtG,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"LikeButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/LikeButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CACpF,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,0CAA0C,SAAS,IAAI,EAAE,EAAE,EACtE,OAAO,EAAE,OAAO,gBACJ,SAAS,YAEpB,cAAc,EAAE,GACV,CACV,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,QAAQ,GACZ,6GAA6G;QAC7G,6EAA6E,CAAC;IAChF,MAAM,QAAQ,GACZ,oGAAoG,CAAC;IAEvG,OAAO,CACL,eAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,aACpE,kBAAkB,CAAC,QAAQ,CAAC,EAC5B,kBAAkB,CAAC,QAAQ,CAAC,IACzB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CACxC,eACE,MAAM,EAAC,SAAS,EAChB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAC,KAAK,EACjB,gBAAgB,EAAC,IAAI,EACrB,CAAC,EAAE,CAAC,GACJ,CACH,CAAC"}
@@ -11,7 +11,7 @@ export const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', p
11
11
  ? image.sources
12
12
  .filter((_) => _?.src)
13
13
  .sort(sourcesComparator)
14
- .map(({ src, format, media }, index) => (_jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
14
+ .map(({ src, format, media }, index) => (_jsx("source", { srcSet: adjustSrc(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', width: image.size?.width, height: image.size?.height }, `${index}_${src}`)))
15
15
  : null, image?.src
16
16
  ? renderImg({ ...image, src: adjustSrc(router, pathPrefix)(image.src) }, imageClassName)
17
17
  : null] }));
@@ -19,7 +19,7 @@ export const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', p
19
19
  const renderImg = (image, imageClassName = '') => (_jsx("img", { src: image.src, className: style('object-contain', imageClassName), alt: image.alt || image.title, title: image.title || '', style: {
20
20
  width: image.size?.width ? `${image.size?.width}px` : '100%',
21
21
  height: image.size?.height ? `${image.size?.height}px` : 'auto',
22
- }, ...image.size }));
22
+ }, width: image.size?.width, height: image.size?.height }));
23
23
  const adjustSrc = (router, pathPrefix) => (src) => src && !isURL(src) ? adjustHref(router)(joinPath(pathPrefix, src)) : src;
24
24
  const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
25
25
  //# sourceMappingURL=ImgAsPicture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImgAsPicture.js","sourceRoot":"","sources":["../../../src/ui-kit/Img/ImgAsPicture.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAe,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,iBAAiB,GAAG,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE,CACnD,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAA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AC,CAAC,CAAC,SAAS,CAAC"}
@@ -1,6 +1,9 @@
1
1
  import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  export const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
4
- return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (_jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
4
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
5
+ const resultOptions = { ...commonOptions, ...options };
6
+ return (_jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
7
+ }) }));
5
8
  });
6
9
  //# sourceMappingURL=SVG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SVG.js","sourceRoot":"","sources":["../../src/ui-kit/SVG.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAuBxC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CACpB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,EAAE,EAAE,EAAE;IAChF,OAAO,CACL,cACE,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,YAEb,KAAK,CAAC,GAAG,CAAC,CAAC,E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E,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -20,6 +20,6 @@ export const SwipeListControlDots = JSX(({ className = '', containerRef, activeI
20
20
  });
21
21
  }
22
22
  };
23
- return dotCount ? (_jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className), ...(version ? { 'data-ver': version } : {}), children: new Array(dotCount).fill(null).map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
23
+ return dotCount ? (_jsx("div", { className: style('flex gap-xs', containerStyles[listType], version ? 'group' : '', className), "data-ver": version, children: new Array(dotCount).fill(null).map((_, idx) => (_jsx("div", { className: `${dotStyle} ${idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle}`, role: "button", "aria-hidden": true, onClick: () => handleClick(idx) }, String(idx)))) })) : null;
24
24
  });
25
25
  //# sourceMappingURL=SwipeListControlDots.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListControlDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControlDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,qBAAqB;IACxC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAEF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yIAAyI,CAAC;AAE5I,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAW9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,YAAY,EACZ,WAAW,EACX,QAAQ,GAAG,CAAC,EAC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IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAN1B,MAAM,CAAC,GAAG,CAAC,CAOhB,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
3
  import { useForm } from '../../hooks/useForm';
3
4
  import { useLink } from '../../hooks/useLink';
4
5
  import { type UniBlockProps } from '../../model/JSXBlock';
@@ -21,7 +22,6 @@ const FORM_URL_MAP = {
21
22
 
22
23
  const INITIAL_FORM_STATE = {
23
24
  amount: 1500,
24
- _amount: 1500,
25
25
  };
26
26
 
27
27
  export interface CardTransferProps extends CardTransferContent, UniBlockProps {}
@@ -36,15 +36,19 @@ export const CardTransfer = JSX<CardTransferProps>(
36
36
  formType = 'private',
37
37
  ...rest
38
38
  }) => {
39
- const [{ amount, _amount }, { field }] = useForm(INITIAL_FORM_STATE);
39
+ const [{ amount }, { field }] = useForm(INITIAL_FORM_STATE);
40
+ const [isDisabled, setDisabled] = useState(false);
40
41
 
41
- const isDisabled = amount <= 0;
42
+ useEffect(() => {
43
+ setDisabled(amount <= 0);
44
+ }, [amount]);
42
45
 
43
46
  const buttonStyle = isDisabled
44
47
  ? getDisabledButtonClasses({ version: button?.version })
45
48
  : getRegularButtonClasses({ className: 'text-white', version: button?.version });
46
49
 
47
50
  const link = useLink();
51
+ const { onClick } = link(button || {});
48
52
 
49
53
  return (
50
54
  <BlockWrapper
@@ -61,19 +65,18 @@ export const CardTransfer = JSX<CardTransferProps>(
61
65
  ) : null}
62
66
  <form className="w-full xl:max-w-[468px]" method="POST" action={FORM_URL_MAP[formType]}>
63
67
  <CurrencyInput
64
- name="_amount"
65
68
  valid={!isDisabled}
66
69
  placeholder={placeholder}
67
70
  label={label}
68
- {...field('_amount', { parse: Number, format: String })}
71
+ {...field('amount', { parse: Number, format: String })}
69
72
  />
70
- <input type="hidden" name="amount" value={_amount} />
73
+ <input type="hidden" name="amount" value={amount} />
71
74
  {button?.text ? (
72
75
  <button
73
76
  type="submit"
74
77
  className={style('w-full p-m mt-lg', buttonStyle)}
75
78
  disabled={isDisabled}
76
- {...link(button)}
79
+ onClick={onClick}
77
80
  >
78
81
  {button.text}
79
82
  </button>
@@ -15,9 +15,9 @@ export type CarouselLinkButtonProps = LinkProps & {
15
15
  };
16
16
 
17
17
  export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
18
- ({ text, href = '', target = '', className = '' }) => {
18
+ ({ className = '', ...linkProps }) => {
19
19
  const link = useLink();
20
- const adjustedProps = link({ href, target });
20
+ const { text, href, target, onClick } = link(linkProps);
21
21
 
22
22
  return text ? (
23
23
  <div
@@ -33,7 +33,9 @@ export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
33
33
  'sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10',
34
34
  )}
35
35
  role="link"
36
- {...adjustedProps}
36
+ href={href}
37
+ target={target}
38
+ onClick={onClick}
37
39
  >
38
40
  <Text size="text-l" font="font-light" color="text-primary-text">
39
41
  {text}
@@ -48,15 +48,18 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
48
48
  >
49
49
  {items?.map((item, i) => {
50
50
  const { text, ...linkProps } = item;
51
+ const { href, target, onClick } = link(linkProps);
51
52
 
52
53
  return (
53
54
  <a
54
- key={item.href || String(i)}
55
+ key={href || String(i)}
55
56
  className={style(
56
57
  'text-l font-light pb-m hover:text-primary-main',
57
58
  item === activeItem ? 'text-primary-main' : '',
58
59
  )}
59
- {...link(linkProps)}
60
+ href={href}
61
+ target={target}
62
+ onClick={onClick}
60
63
  >
61
64
  {text}
62
65
  </a>
@@ -8,7 +8,7 @@ export interface LinkDocItemProps extends LinkDoc {
8
8
  }
9
9
 
10
10
  export const LinkDocItem = JSX<LinkDocItemProps>(
11
- ({ icon, text, fileFormat, fileSize, ...linkProps }) => {
11
+ ({ icon, text, href, target, fileFormat, fileSize }) => {
12
12
  const prefix = fileFormat || fileSize ? ',' : '';
13
13
  const size = fileSize ?? '';
14
14
  const format = fileFormat ? String(fileFormat) : '';
@@ -17,15 +17,14 @@ export const LinkDocItem = JSX<LinkDocItemProps>(
17
17
  <a
18
18
  className="flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main"
19
19
  role="link"
20
- {...linkProps}
20
+ href={href}
21
+ target={target}
21
22
  >
22
23
  {icon}
23
24
  {text ? (
24
25
  <Text size="text-l" font="font-light">
25
26
  {text}
26
- <Text color="text-secondary-text">
27
- {linkProps?.href && `${size} ${prefix} ${format}`}
28
- </Text>
27
+ <Text color="text-secondary-text">{href && `${size} ${prefix} ${format}`}</Text>
29
28
  </Text>
30
29
  ) : null}
31
30
  </a>
@@ -1,5 +1,4 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type SVGPathOptions } from '../SVG';
3
2
 
4
3
  export interface LikeButtonProps {
5
4
  className?: string;
@@ -19,25 +18,27 @@ export const LikeButton = JSX<LikeButtonProps>(({ className, onClick, ariaLabel
19
18
  ));
20
19
 
21
20
  const renderLikeIcon = () => {
22
- const params = {
23
- stroke: '#292D32',
24
- strokeLinecap: 'round',
25
- strokeLinejoin: 'round',
26
- strokeWidth: '1.5',
27
- } as SVGPathOptions;
21
+ const handPath =
22
+ 'M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1' +
23
+ ' 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77';
24
+ const cuffPath =
25
+ 'M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z';
28
26
 
29
27
  return (
30
28
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
31
- <path
32
- {...params}
33
- strokeMiterlimit="10"
34
- /* eslint-disable max-len */
35
- d="M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"
36
- />
37
- <path
38
- {...params}
39
- d="M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"
40
- />
29
+ {renderLinkIconPath(handPath)}
30
+ {renderLinkIconPath(cuffPath)}
41
31
  </svg>
42
32
  );
43
33
  };
34
+
35
+ const renderLinkIconPath = (d: string) => (
36
+ <path
37
+ stroke="#292D32"
38
+ strokeLinecap="round"
39
+ strokeLinejoin="round"
40
+ strokeWidth="1.5"
41
+ strokeMiterlimit="10"
42
+ d={d}
43
+ />
44
+ );
@@ -25,7 +25,8 @@ export const ImgAsPicture = JSX<ImageProps>(
25
25
  srcSet={adjustSrc(router, pathPrefix)(src)}
26
26
  type={formatToMimeType(format)}
27
27
  media={media ? `(max-width: ${media}px)` : ''}
28
- {...image.size}
28
+ width={image.size?.width}
29
+ height={image.size?.height}
29
30
  />
30
31
  ))
31
32
  : null}
@@ -47,7 +48,8 @@ const renderImg = (image: Picture, imageClassName = '') => (
47
48
  width: image.size?.width ? `${image.size?.width}px` : '100%',
48
49
  height: image.size?.height ? `${image.size?.height}px` : 'auto',
49
50
  }}
50
- {...image.size}
51
+ width={image.size?.width}
52
+ height={image.size?.height}
51
53
  />
52
54
  );
53
55
 
@@ -32,9 +32,22 @@ export const SVG = JSX<SVGProps>(
32
32
  width={width}
33
33
  height={height}
34
34
  >
35
- {paths.map(({ d, fill: pathFill, ...options }, i) => (
36
- <path key={i} d={d} fill={pathFill || 'currentColor'} {...commonOptions} {...options} />
37
- ))}
35
+ {paths.map(({ d, fill: pathFill, ...options }, i) => {
36
+ const resultOptions = { ...commonOptions, ...options };
37
+
38
+ return (
39
+ <path
40
+ key={i}
41
+ d={d}
42
+ fill={pathFill || 'currentColor'}
43
+ stroke={resultOptions.stroke}
44
+ strokeLinecap={resultOptions.strokeLinecap}
45
+ strokeLinejoin={resultOptions.strokeLinejoin}
46
+ strokeWidth={resultOptions.strokeWidth}
47
+ strokeMiterlimit={resultOptions.strokeMiterlimit}
48
+ />
49
+ );
50
+ })}
38
51
  </svg>
39
52
  );
40
53
  },
@@ -53,7 +53,7 @@ export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
53
53
  version ? 'group' : '',
54
54
  className,
55
55
  )}
56
- {...(version ? { 'data-ver': version } : {})}
56
+ data-ver={version}
57
57
  >
58
58
  {new Array(dotCount).fill(null).map((_, idx: number) => (
59
59
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.44",
3
+ "version": "0.14.46",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -3,7 +3,6 @@ import { ApplicationForm } from './ApplicationForm/ApplicationForm';
3
3
  import { BenefitsBlock } from './BenefitsBlock/BenefitsBlock';
4
4
  import { Bonus } from './Bonus/Bonus';
5
5
  import { BonusBenefitsBlock } from './BonusBenefitsBlock/BonusBenefitsBlock';
6
- import { BusinessBlock } from './BusinessBlock/BusinessBlock';
7
6
  import { ButtonsBlock } from './ButtonsBlock/ButtonsBlock';
8
7
  import { Calculator } from './Calculator/Calculator';
9
8
  import { CardTransfer } from './CardTransfer/CardTransfer';
@@ -57,7 +56,6 @@ export const Blocks: BlocksRegistry = {
57
56
  BenefitsBlock,
58
57
  Bonus,
59
58
  BonusBenefitsBlock,
60
- BusinessBlock,
61
59
  ButtonsBlock,
62
60
  Calculator,
63
61
  CardTransfer,
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
3
  import { useForm } from '../../hooks/useForm';
3
4
  import { useLink } from '../../hooks/useLink';
4
5
  import { type UniBlockProps } from '../../model/JSXBlock';
@@ -21,7 +22,6 @@ const FORM_URL_MAP = {
21
22
 
22
23
  const INITIAL_FORM_STATE = {
23
24
  amount: 1500,
24
- _amount: 1500,
25
25
  };
26
26
 
27
27
  export interface CardTransferProps extends CardTransferContent, UniBlockProps {}
@@ -36,15 +36,19 @@ export const CardTransfer = JSX<CardTransferProps>(
36
36
  formType = 'private',
37
37
  ...rest
38
38
  }) => {
39
- const [{ amount, _amount }, { field }] = useForm(INITIAL_FORM_STATE);
39
+ const [{ amount }, { field }] = useForm(INITIAL_FORM_STATE);
40
+ const [isDisabled, setDisabled] = useState(false);
40
41
 
41
- const isDisabled = amount <= 0;
42
+ useEffect(() => {
43
+ setDisabled(amount <= 0);
44
+ }, [amount]);
42
45
 
43
46
  const buttonStyle = isDisabled
44
47
  ? getDisabledButtonClasses({ version: button?.version })
45
48
  : getRegularButtonClasses({ className: 'text-white', version: button?.version });
46
49
 
47
50
  const link = useLink();
51
+ const { onClick } = link(button || {});
48
52
 
49
53
  return (
50
54
  <BlockWrapper
@@ -61,19 +65,18 @@ export const CardTransfer = JSX<CardTransferProps>(
61
65
  ) : null}
62
66
  <form className="w-full xl:max-w-[468px]" method="POST" action={FORM_URL_MAP[formType]}>
63
67
  <CurrencyInput
64
- name="_amount"
65
68
  valid={!isDisabled}
66
69
  placeholder={placeholder}
67
70
  label={label}
68
- {...field('_amount', { parse: Number, format: String })}
71
+ {...field('amount', { parse: Number, format: String })}
69
72
  />
70
- <input type="hidden" name="amount" value={_amount} />
73
+ <input type="hidden" name="amount" value={amount} />
71
74
  {button?.text ? (
72
75
  <button
73
76
  type="submit"
74
77
  className={style('w-full p-m mt-lg', buttonStyle)}
75
78
  disabled={isDisabled}
76
- {...link(button)}
79
+ onClick={onClick}
77
80
  >
78
81
  {button.text}
79
82
  </button>
@@ -15,9 +15,9 @@ export type CarouselLinkButtonProps = LinkProps & {
15
15
  };
16
16
 
17
17
  export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
18
- ({ text, href = '', target = '', className = '' }) => {
18
+ ({ className = '', ...linkProps }) => {
19
19
  const link = useLink();
20
- const adjustedProps = link({ href, target });
20
+ const { text, href, target, onClick } = link(linkProps);
21
21
 
22
22
  return text ? (
23
23
  <div
@@ -33,7 +33,9 @@ export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
33
33
  'sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10',
34
34
  )}
35
35
  role="link"
36
- {...adjustedProps}
36
+ href={href}
37
+ target={target}
38
+ onClick={onClick}
37
39
  >
38
40
  <Text size="text-l" font="font-light" color="text-primary-text">
39
41
  {text}
@@ -48,15 +48,18 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
48
48
  >
49
49
  {items?.map((item, i) => {
50
50
  const { text, ...linkProps } = item;
51
+ const { href, target, onClick } = link(linkProps);
51
52
 
52
53
  return (
53
54
  <a
54
- key={item.href || String(i)}
55
+ key={href || String(i)}
55
56
  className={style(
56
57
  'text-l font-light pb-m hover:text-primary-main',
57
58
  item === activeItem ? 'text-primary-main' : '',
58
59
  )}
59
- {...link(linkProps)}
60
+ href={href}
61
+ target={target}
62
+ onClick={onClick}
60
63
  >
61
64
  {text}
62
65
  </a>
@@ -8,7 +8,7 @@ export interface LinkDocItemProps extends LinkDoc {
8
8
  }
9
9
 
10
10
  export const LinkDocItem = JSX<LinkDocItemProps>(
11
- ({ icon, text, fileFormat, fileSize, ...linkProps }) => {
11
+ ({ icon, text, href, target, fileFormat, fileSize }) => {
12
12
  const prefix = fileFormat || fileSize ? ',' : '';
13
13
  const size = fileSize ?? '';
14
14
  const format = fileFormat ? String(fileFormat) : '';
@@ -17,15 +17,14 @@ export const LinkDocItem = JSX<LinkDocItemProps>(
17
17
  <a
18
18
  className="flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main"
19
19
  role="link"
20
- {...linkProps}
20
+ href={href}
21
+ target={target}
21
22
  >
22
23
  {icon}
23
24
  {text ? (
24
25
  <Text size="text-l" font="font-light">
25
26
  {text}
26
- <Text color="text-secondary-text">
27
- {linkProps?.href && `${size} ${prefix} ${format}`}
28
- </Text>
27
+ <Text color="text-secondary-text">{href && `${size} ${prefix} ${format}`}</Text>
29
28
  </Text>
30
29
  ) : null}
31
30
  </a>
@@ -1,7 +1,11 @@
1
1
  import { type BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
2
2
  import '../../setup-fixture';
3
3
  import { Blocks } from '../Blocks';
4
+ import { Headline } from '../Headline/Headline';
5
+ import { HorizontalLayout } from '../HorizontalLayout/HorizontalLayout';
4
6
  import { type LinkDocsContent } from '../LinkDocs/LinkDocsContent';
7
+ import { ProductBlock } from '../ProductBlock/ProductBlock';
8
+ import { type ProductBlockContent } from '../ProductBlock/ProductBlockContent';
5
9
  import { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
6
10
  import { RICH_TEXT_SEPARATOR } from '../RichTextBlock/RichTextBlock.fixture';
7
11
  import { TEXT_BLOCK } from '../TextBlock/TextBlock.fixture';
@@ -31,6 +35,41 @@ const carouselRecommendationCard = {
31
35
  type: 'CarouselRecommendationCard',
32
36
  };
33
37
 
38
+ const PRODUCT_BLOCK_CONTENT: ProductBlockContent = {
39
+ title: 'Бизнесу и корпорациям',
40
+ headlineVersion: 'S',
41
+ padding: 'p-xl',
42
+ image: {
43
+ src: 'business-block-1.png',
44
+ format: 'png',
45
+ size: {
46
+ width: 319,
47
+ },
48
+ title: 'business-block-1',
49
+ },
50
+ imageOptions: {
51
+ directionRight: false,
52
+ },
53
+ benefits: [
54
+ {
55
+ type: 'default',
56
+ description: 'Поможем увеличить прибыль: запустить продажи на маркетплейсах',
57
+ icon: { icon: 'ShieldTickIcon' },
58
+ },
59
+ {
60
+ type: 'default',
61
+ description: 'Автоматизируем ручные операции и настроим выплаты',
62
+ icon: { icon: 'ShieldTickIcon' },
63
+ },
64
+ {
65
+ type: 'default',
66
+ description: 'Убережём ваш счёт от блокировок',
67
+ icon: { icon: 'ShieldTickIcon' },
68
+ },
69
+ ],
70
+ buttons: [{ text: 'Открыть счёт для бизнеса', version: 'primary' }],
71
+ };
72
+
34
73
  export default {
35
74
  default: (
36
75
  <div className="container grid grid-cols-12">
@@ -223,4 +262,27 @@ export default {
223
262
  />
224
263
  </div>
225
264
  ),
265
+ business: (
266
+ <div className="container grid grid-cols-12">
267
+ <VerticalLayout
268
+ className="col-span-12"
269
+ defaultPadding="p-6xl"
270
+ gap="M"
271
+ options={options}
272
+ version="primary"
273
+ isPadding={true}
274
+ isInnerPadding={true}
275
+ >
276
+ <Headline
277
+ title="Настроим бизнес-процессы и поможем увеличить прибыль"
278
+ headlineVersion="M"
279
+ isEmbedded={true}
280
+ />
281
+ <HorizontalLayout isCardBorder={true} isPadding={false}>
282
+ <ProductBlock className="col-span-6" {...PRODUCT_BLOCK_CONTENT} />
283
+ <ProductBlock className="col-span-6" {...PRODUCT_BLOCK_CONTENT} />
284
+ </HorizontalLayout>
285
+ </VerticalLayout>
286
+ </div>
287
+ ),
226
288
  };
@@ -1,5 +1,4 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type SVGPathOptions } from '../SVG';
3
2
 
4
3
  export interface LikeButtonProps {
5
4
  className?: string;
@@ -19,25 +18,27 @@ export const LikeButton = JSX<LikeButtonProps>(({ className, onClick, ariaLabel
19
18
  ));
20
19
 
21
20
  const renderLikeIcon = () => {
22
- const params = {
23
- stroke: '#292D32',
24
- strokeLinecap: 'round',
25
- strokeLinejoin: 'round',
26
- strokeWidth: '1.5',
27
- } as SVGPathOptions;
21
+ const handPath =
22
+ 'M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1' +
23
+ ' 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77';
24
+ const cuffPath =
25
+ 'M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z';
28
26
 
29
27
  return (
30
28
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
31
- <path
32
- {...params}
33
- strokeMiterlimit="10"
34
- /* eslint-disable max-len */
35
- d="M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"
36
- />
37
- <path
38
- {...params}
39
- d="M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z"
40
- />
29
+ {renderLinkIconPath(handPath)}
30
+ {renderLinkIconPath(cuffPath)}
41
31
  </svg>
42
32
  );
43
33
  };
34
+
35
+ const renderLinkIconPath = (d: string) => (
36
+ <path
37
+ stroke="#292D32"
38
+ strokeLinecap="round"
39
+ strokeLinejoin="round"
40
+ strokeWidth="1.5"
41
+ strokeMiterlimit="10"
42
+ d={d}
43
+ />
44
+ );