@sima-land/moleculas 16.0.0-alpha.21 → 16.0.0-alpha.23

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 (141) hide show
  1. package/README.md +1 -1
  2. package/common/components/hover-slider/hover-slider-nav.d.ts +7 -0
  3. package/common/components/hover-slider/hover-slider-nav.js +21 -0
  4. package/common/components/hover-slider/hover-slider-nav.js.map +1 -0
  5. package/common/components/hover-slider/hover-slider-nav.m.scss +22 -0
  6. package/common/components/hover-slider/hover-slider.d.ts +9 -0
  7. package/common/components/hover-slider/hover-slider.js +88 -0
  8. package/common/components/hover-slider/hover-slider.js.map +1 -0
  9. package/common/components/hover-slider/hover-slider.m.scss +36 -0
  10. package/common/components/hover-slider/index.d.ts +3 -0
  11. package/common/components/hover-slider/index.js +9 -0
  12. package/common/components/hover-slider/index.js.map +1 -0
  13. package/common/components/hover-slider/types.d.ts +28 -0
  14. package/common/components/hover-slider/types.js.map +1 -0
  15. package/common/components/hover-slider/utils.d.ts +8 -0
  16. package/common/components/hover-slider/utils.js +23 -0
  17. package/common/components/hover-slider/utils.js.map +1 -0
  18. package/common/components/media-gallery/utils.d.ts +1 -1
  19. package/common/components/media-gallery/utils.js +1 -1
  20. package/common/components/product-image/index.d.ts +3 -0
  21. package/common/components/product-image/index.js +8 -0
  22. package/common/components/product-image/index.js.map +1 -0
  23. package/common/components/product-image/product-image.d.ts +10 -0
  24. package/common/components/product-image/product-image.js +33 -0
  25. package/common/components/product-image/product-image.js.map +1 -0
  26. package/common/components/product-image/product-image.m.scss +62 -0
  27. package/common/components/product-image/types.d.ts +30 -0
  28. package/common/components/product-image/types.js +3 -0
  29. package/common/components/product-image/types.js.map +1 -0
  30. package/common/components/product-image/utils.d.ts +3 -0
  31. package/common/components/product-image/utils.js +6 -0
  32. package/common/components/product-image/utils.js.map +1 -0
  33. package/common/components/product-info/index.d.ts +4 -1
  34. package/common/components/product-info/index.js +5 -2
  35. package/common/components/product-info/index.js.map +1 -1
  36. package/common/components/product-info/parts/adult-confirm-button.d.ts +7 -0
  37. package/common/components/product-info/parts/adult-confirm-button.js +20 -0
  38. package/common/components/product-info/parts/adult-confirm-button.js.map +1 -0
  39. package/common/components/product-info/parts/badges.d.ts +7 -0
  40. package/common/components/product-info/parts/badges.js +20 -0
  41. package/common/components/product-info/parts/badges.js.map +1 -0
  42. package/common/components/product-info/parts/badges.m.scss +3 -0
  43. package/common/components/product-info/parts/cart-control.d.ts +7 -0
  44. package/common/components/product-info/parts/cart-control.js +19 -0
  45. package/common/components/product-info/parts/cart-control.js.map +1 -0
  46. package/common/components/product-info/parts/cart-control.m.scss +41 -0
  47. package/common/components/product-info/parts/footer.d.ts +7 -0
  48. package/common/components/product-info/parts/footer.js +22 -0
  49. package/common/components/product-info/parts/footer.js.map +1 -0
  50. package/common/components/product-info/parts/footer.m.scss +3 -0
  51. package/common/components/product-info/parts/image-button.d.ts +7 -0
  52. package/common/components/product-info/parts/image-button.js +39 -0
  53. package/common/components/product-info/parts/image-button.js.map +1 -0
  54. package/common/components/product-info/parts/image-button.m.scss +40 -0
  55. package/common/components/product-info/parts/image.d.ts +7 -0
  56. package/common/components/product-info/parts/image.js +27 -0
  57. package/common/components/product-info/parts/image.js.map +1 -0
  58. package/common/components/product-info/parts/image.m.scss +24 -0
  59. package/common/components/product-info/parts/index.d.ts +34 -0
  60. package/common/components/product-info/parts/index.js +38 -0
  61. package/common/components/product-info/parts/index.js.map +1 -0
  62. package/common/components/product-info/parts/media.d.ts +7 -0
  63. package/common/components/product-info/parts/media.js +19 -0
  64. package/common/components/product-info/parts/media.js.map +1 -0
  65. package/common/components/product-info/parts/media.m.scss +10 -0
  66. package/common/components/product-info/parts/parts.m.scss +15 -0
  67. package/common/components/product-info/parts/prices.d.ts +7 -0
  68. package/common/components/product-info/parts/prices.js +26 -0
  69. package/common/components/product-info/parts/prices.js.map +1 -0
  70. package/common/components/product-info/parts/prices.m.scss +28 -0
  71. package/common/components/product-info/parts/rating-counter.m.scss +12 -0
  72. package/common/components/product-info/parts/rating-couter.d.ts +7 -0
  73. package/common/components/product-info/parts/rating-couter.js +20 -0
  74. package/common/components/product-info/parts/rating-couter.js.map +1 -0
  75. package/common/components/product-info/parts/secondary-info.d.ts +7 -0
  76. package/common/components/product-info/parts/secondary-info.js +19 -0
  77. package/common/components/product-info/parts/secondary-info.js.map +1 -0
  78. package/common/components/product-info/parts/secondary-info.m.scss +8 -0
  79. package/common/components/product-info/parts/title.d.ts +7 -0
  80. package/common/components/product-info/parts/title.js +24 -0
  81. package/common/components/product-info/parts/title.js.map +1 -0
  82. package/common/components/product-info/parts/title.m.scss +23 -0
  83. package/common/components/product-info/parts/trademark-link.d.ts +7 -0
  84. package/common/components/product-info/parts/trademark-link.js +20 -0
  85. package/common/components/product-info/parts/trademark-link.js.map +1 -0
  86. package/common/components/product-info/parts/trademark-link.m.scss +9 -0
  87. package/common/components/product-info/parts/wait-list-add-link.d.ts +7 -0
  88. package/common/components/product-info/parts/wait-list-add-link.js +20 -0
  89. package/common/components/product-info/parts/wait-list-add-link.js.map +1 -0
  90. package/common/components/product-info/parts/wait-list-added-link.d.ts +7 -0
  91. package/common/components/product-info/parts/wait-list-added-link.js +22 -0
  92. package/common/components/product-info/parts/wait-list-added-link.js.map +1 -0
  93. package/common/components/product-info/parts/wait-list-added-link.m.scss +13 -0
  94. package/common/components/product-info/product-info.d.ts +3 -6
  95. package/common/components/product-info/product-info.js +15 -10
  96. package/common/components/product-info/product-info.js.map +1 -1
  97. package/common/components/product-info/types.d.ts +59 -2
  98. package/common/components/product-info/utils.d.ts +3 -0
  99. package/common/components/product-info/utils.js +7 -2
  100. package/common/components/product-info/utils.js.map +1 -1
  101. package/common/components/rating-counter/rating-counter.js +1 -1
  102. package/common/components/rating-counter/rating-counter.js.map +1 -1
  103. package/common/hooks/index.d.ts +3 -19
  104. package/common/hooks/index.js +7 -36
  105. package/common/hooks/index.js.map +1 -1
  106. package/common/hooks/use-client-width.d.ts +8 -0
  107. package/common/hooks/use-client-width.js +28 -0
  108. package/common/hooks/use-client-width.js.map +1 -0
  109. package/common/hooks/use-image-stub.d.ts +14 -0
  110. package/common/hooks/use-image-stub.js +26 -0
  111. package/common/hooks/use-image-stub.js.map +1 -0
  112. package/common/hooks/use-mounted.d.ts +5 -0
  113. package/common/hooks/use-mounted.js +19 -0
  114. package/common/hooks/use-mounted.js.map +1 -0
  115. package/desktop/components/product-carousel/product-carousel.d.ts +1 -1
  116. package/desktop/components/product-carousel/product-carousel.js +20 -40
  117. package/desktop/components/product-carousel/product-carousel.js.map +1 -1
  118. package/desktop/components/product-carousel/product-carousel.m.scss +0 -6
  119. package/desktop/components/product-carousel/types.d.ts +1 -4
  120. package/package.json +2 -2
  121. package/common/components/product-info/parts.d.ts +0 -69
  122. package/common/components/product-info/parts.js +0 -160
  123. package/common/components/product-info/parts.js.map +0 -1
  124. package/common/components/product-info/product-info.m.scss +0 -280
  125. package/desktop/components/product-card/index.d.ts +0 -2
  126. package/desktop/components/product-card/index.js +0 -9
  127. package/desktop/components/product-card/index.js.map +0 -1
  128. package/desktop/components/product-card/product-card.d.ts +0 -23
  129. package/desktop/components/product-card/product-card.js +0 -94
  130. package/desktop/components/product-card/product-card.js.map +0 -1
  131. package/desktop/components/product-card/product-card.m.scss +0 -12
  132. package/desktop/components/product-card/types.d.ts +0 -19
  133. package/desktop/components/product-card/types.js.map +0 -1
  134. package/desktop/components/product-carousel/hover-card.d.ts +0 -7
  135. package/desktop/components/product-carousel/hover-card.js +0 -40
  136. package/desktop/components/product-carousel/hover-card.js.map +0 -1
  137. package/desktop/components/product-carousel/hover-card.m.scss +0 -14
  138. package/desktop/components/product-carousel/utils.d.ts +0 -16
  139. package/desktop/components/product-carousel/utils.js +0 -45
  140. package/desktop/components/product-carousel/utils.js.map +0 -1
  141. /package/{desktop/components/product-card → common/components/hover-slider}/types.js +0 -0
@@ -7,12 +7,10 @@ exports.ProductCarousel = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const carousel_1 = require("@sima-land/ui-nucleons/carousel");
10
- const hover_card_1 = require("./hover-card");
11
- const utils_1 = require("./utils");
12
- const hooks_1 = require("@sima-land/ui-nucleons/hooks");
10
+ const hooks_1 = require("../../../common/hooks");
11
+ const hooks_2 = require("@sima-land/ui-nucleons/hooks");
13
12
  const product_info_1 = require("../../../common/components/product-info");
14
13
  const helpers_1 = require("@sima-land/ui-nucleons/helpers");
15
- const product_card_1 = require("../product-card");
16
14
  const bind_1 = __importDefault(require("classnames/bind"));
17
15
  const product_carousel_m_scss_1 = __importDefault(require("./product-carousel.m.scss"));
18
16
  const cx = bind_1.default.bind(product_carousel_m_scss_1.default);
@@ -31,15 +29,10 @@ const getSizeClasses = (size) => size && size !== 'unset'
31
29
  * @param props Свойства.
32
30
  * @return Элемент.
33
31
  */
34
- function ProductCarousel({ className, itemSize = { xs: 4, s: 3, m: 2, l: 2, xl: 2 }, itemProps, onInViewport, onNeedRequest, withHoverCard, children,
35
- // @todo не совсем правильно заставлять работать с внутренностями реакта - надо придумать что-то более простое
36
- reduceBaseInfo: reduceBaseInfoProp = withHoverCard ? product_card_1.reduceBaseInfo : element => element, reduceHoverInfo: reduceHoverInfoProp = product_card_1.reduceHoverInfo, }) {
32
+ function ProductCarousel({ className, itemSize = { xs: 4, s: 3, m: 2, l: 2, xl: 2 }, itemProps, onInViewport, onNeedRequest, children, }) {
37
33
  const layer = (0, helpers_1.useLayer)();
38
- const [activeItemIndex, setActiveItemIndex] = (0, react_1.useState)(null);
39
- const cardShow = (0, utils_1.useAllowFlag)();
40
- const needBigArrows = (0, hooks_1.useMedia)('(min-width: 1600px)');
34
+ const needBigArrows = (0, hooks_2.useMedia)('(min-width: 1600px)');
41
35
  const rootRef = (0, react_1.useRef)(null);
42
- const targetItemRef = (0, react_1.useRef)(null);
43
36
  const items = react_1.Children.toArray(children).reduce((acc, item) => {
44
37
  if ((0, react_1.isValidElement)(item) && item.type === product_info_1.ProductInfo) {
45
38
  acc.push(item);
@@ -48,40 +41,27 @@ reduceBaseInfo: reduceBaseInfoProp = withHoverCard ? product_card_1.reduceBaseIn
48
41
  }, []);
49
42
  // вычисляем ширину элемента карусели для позиционирования стрелок
50
43
  const firstItemRef = (0, react_1.useRef)(null);
51
- const itemWidth = (0, utils_1.useClientWidth)(firstItemRef, [items.length]);
44
+ const itemWidth = (0, hooks_1.useClientWidth)(firstItemRef, [items.length]);
52
45
  // инициируем загрузку данных, когда компонент почти попал в зону видимости
53
46
  const options = (0, react_1.useMemo)(() => ({ rootMargin: '200px 0px 200px 0px' }), []);
54
- (0, hooks_1.useIntersection)(rootRef, entry => {
47
+ (0, hooks_2.useIntersection)(rootRef, entry => {
55
48
  entry.isIntersecting && onNeedRequest && onNeedRequest();
56
49
  }, options);
57
50
  // отправляем статистку, когда компонент попадает в зону видимости
58
- (0, hooks_1.useIntersection)(rootRef, entry => {
51
+ (0, hooks_2.useIntersection)(rootRef, entry => {
59
52
  entry.isIntersecting && onInViewport && onInViewport();
60
53
  });
61
- return ((0, jsx_runtime_1.jsxs)("div", { ref: rootRef, className: cx('root', className), "data-testid": 'product-carousel:root', onMouseLeave: () => setActiveItemIndex(null), children: [items.length > 0 && ((0, jsx_runtime_1.jsx)(carousel_1.Carousel, { step: 3, draggable: false,
62
- // докидываем индекс чтобы позже брать актуальные данные из списка по нему
63
- items: items.map((item, index) => [item, index]),
64
- // ВАЖНО: скрываем кнопки ТОЛЬКО пока itemWidth не вычислен
65
- withControls: itemWidth !== null ? undefined : false, controlProps: itemWidth !== null
66
- ? {
67
- size: needBigArrows ? 'l' : 's',
68
- style: {
69
- zIndex: layer + 2, // чтобы кнопки были над HoverCard
70
- top: `${itemWidth / 2}px`,
71
- },
72
- }
73
- : undefined, renderItem: ([item, index], realIndex) => ((0, jsx_runtime_1.jsx)(CarouselItem, { rootRef: realIndex === 0 ? firstItemRef : undefined, className: cx(getSizeClasses(itemSize), itemProps === null || itemProps === void 0 ? void 0 : itemProps.className), style: itemProps === null || itemProps === void 0 ? void 0 : itemProps.style, onMouseEnter: e => {
74
- if (cardShow.allowed()) {
75
- targetItemRef.current = e.currentTarget;
76
- setActiveItemIndex(index);
77
- }
78
- }, children: reduceBaseInfoProp(item) })),
79
- // длительность прокрутки в Carousel - 320, делаем слегка с запасом
80
- // @todo после восстановления проверить позицию курсора чтобы показать карточку (если будет критично)
81
- onChangeTargetIndex: () => cardShow.disallowFor(360) })), withHoverCard &&
82
- activeItemIndex !== null &&
83
- items[activeItemIndex] &&
84
- [items[activeItemIndex]].map(item => ((0, jsx_runtime_1.jsx)(hover_card_1.HoverCard, { targetRef: targetItemRef, onMouseLeave: () => setActiveItemIndex(null), ...item.props, children: reduceHoverInfoProp(item) }, activeItemIndex)))] }));
54
+ return ((0, jsx_runtime_1.jsx)("div", { ref: rootRef, className: cx('root', className), "data-testid": 'product-carousel:root', children: items.length > 0 && ((0, jsx_runtime_1.jsx)(carousel_1.Carousel, { step: 3, draggable: false, items: items,
55
+ // ВАЖНО: скрываем кнопки ТОЛЬКО пока itemWidth не вычислен
56
+ withControls: itemWidth !== null ? undefined : false, controlProps: itemWidth !== null
57
+ ? {
58
+ size: needBigArrows ? 'l' : 's',
59
+ style: {
60
+ zIndex: layer + 2, // чтобы кнопки были над HoverCard
61
+ top: `${itemWidth / 2}px`,
62
+ },
63
+ }
64
+ : undefined, renderItem: (item, realIndex) => ((0, jsx_runtime_1.jsx)(CarouselItem, { rootRef: realIndex === 0 ? firstItemRef : undefined, className: cx(getSizeClasses(itemSize), itemProps === null || itemProps === void 0 ? void 0 : itemProps.className), style: itemProps === null || itemProps === void 0 ? void 0 : itemProps.style, children: item })) })) }));
85
65
  }
86
66
  exports.ProductCarousel = ProductCarousel;
87
67
  /**
@@ -89,7 +69,7 @@ exports.ProductCarousel = ProductCarousel;
89
69
  * Полное содержимое будет выведено во всплывающей карточке.
90
70
  * @inheritdoc
91
71
  */
92
- function CarouselItem({ rootRef, className, onMouseEnter, children, style, }) {
93
- return ((0, jsx_runtime_1.jsx)("div", { ref: rootRef, "data-testid": 'product-carousel:item', className: cx('item', className), onMouseEnter: onMouseEnter, style: style, children: children }));
72
+ function CarouselItem({ rootRef, className, children, style, }) {
73
+ return ((0, jsx_runtime_1.jsx)("div", { ref: rootRef, "data-testid": 'product-carousel:item', className: cx('item', className), style: style, children: children }));
94
74
  }
95
75
  //# sourceMappingURL=product-carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"product-carousel.js","sourceRoot":"","sources":["../../../../src/desktop/components/product-carousel/product-carousel.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAUe;AACf,8DAA2D;AAC3D,6CAAyC;AACzC,mCAAuD;AACvD,wDAAyE;AACzE,0EAAwF;AACxF,4DAA0D;AAC1D,kDAAkE;AAGlE,2DAAyC;AACzC,wFAA+C;AAE/C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,iCAAM,CAAC,CAAC;AAEnC,yCAAyC;AACzC,MAAM,cAAc,GAAG,CAAC,IAAsC,EAAE,EAAE,CAChE,IAAI,IAAI,IAAI,KAAK,OAAO;IACtB,CAAC,CAAC;QACE,WAAW,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE;QACzB,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;QACvB,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;QACvB,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;QACvB,WAAW,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE;KAC1B;IACH,CAAC,CAAC,EAAE,CAAC;AAET;;;;GAIG;AACH,SAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAC7C,SAAS,EACT,YAAY,EACZ,aAAa,EACb,aAA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,EAAE,KAAK,YAEX,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"product-carousel.js","sourceRoot":"","sources":["../../../../src/desktop/components/product-carousel/product-carousel.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAAiG;AACjG,8DAA2D;AAC3D,iDAAuD;AACvD,wDAAyE;AACzE,0EAAwF;AACxF,4DAA0D;AAE1D,2DAAyC;AACzC,wFAA+C;AAE/C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,iCAAM,CAAC,CAAC;AAEnC,yCAAyC;AACzC,MAAM,cAAc,GAAG,CAAC,IAAsC,EAAE,EAAE,CAChE,IAAI,IAAI,IAAI,KAAK,OAAO;IACtB,CAAC,CAAC;QACE,WAAW,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE;QACzB,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;QACvB,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;QACvB,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;QACvB,WAAW,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE;KAC1B;IACH,CAAC,CAAC,EAAE,CAAC;AAET;;;;GAIG;AACH,SAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAC7C,SAAS,EACT,YAAY,EACZ,aAAa,EACb,QAAQ,GACa;IACrB,MAAM,KAAK,GAAG,IAAA,kBAAQ,GAAE,CAAC;IACzB,MAAM,aAAa,GAAG,IAAA,gBAAQ,EAAC,qBAAqB,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAE7C,MAAM,KAAK,GAAG,gBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,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,YAAY,EACV,SAAS,KAAK,IAAI;gBAChB,CAAC,CAAC;oBACE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;oBAC/B,KAAK,EAAE;wBACL,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,kCAAkC;wBACrD,GAAG,EAAE,GAAG,SAAS,GAAG,CAAC,IAAI;qBAC1B;iBACF;gBACH,CAAC,CAAC,SAAS,EAEf,UAAU,EAAE,CAAC,IAAe,EAAE,SAAS,EAAE,EAAE,CAAC,CAC1C,uBAAC,YAAY,IACX,OAAO,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACnD,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,CAAC,EAC7D,KAAK,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,YAEtB,IAAI,GACQ,CAChB,GACD,CACH,GACG,CACP,CAAC;AACJ,CAAC;AAvED,0CAuEC;AAED;;;;GAIG;AACH,SAAS,YAAY,CAAC,EACpB,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAK,GAMN;IACC,OAAO,CACL,gCACE,GAAG,EAAE,OAAO,iBACA,uBAAuB,EACnC,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAChC,KAAK,EAAE,KAAK,YAEX,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -18,12 +18,6 @@ $gutter: 32px;
18
18
  width: 100%;
19
19
  }
20
20
 
21
- .title {
22
- font-size: 24px;
23
- font-weight: 600;
24
- margin: 0 0 32px;
25
- }
26
-
27
21
  .item {
28
22
  flex-shrink: 0;
29
23
  &:not(:last-child) {
@@ -1,5 +1,4 @@
1
1
  import type { CSSProperties, ReactNode, RefObject } from 'react';
2
- import type { ProductCardProps } from '../product-card';
3
2
  export interface ItemSize {
4
3
  xs?: 2 | 3 | 4;
5
4
  s?: 2 | 3 | 4;
@@ -7,7 +6,7 @@ export interface ItemSize {
7
6
  l?: 2 | 3 | 4;
8
7
  xl?: 2 | 3 | 4;
9
8
  }
10
- export interface ProductCarouselProps extends Pick<ProductCardProps, 'reduceBaseInfo' | 'reduceHoverInfo'> {
9
+ export interface ProductCarouselProps {
11
10
  /** CSS-класс для корневого элемента. */
12
11
  className?: string;
13
12
  /** Элементы карусели. */
@@ -18,8 +17,6 @@ export interface ProductCarouselProps extends Pick<ProductCardProps, 'reduceBase
18
17
  onInViewport?: () => void;
19
18
  /** Сработает при попадании карусели в область достаточно близкую к viewport'у. */
20
19
  onNeedRequest?: () => void;
21
- /** Нужно ли показывать всплывающую карточку при наведении на элемент карусели. */
22
- withHoverCard?: boolean;
23
20
  /** Предоставит свойства для элемента карусели. */
24
21
  itemProps?: {
25
22
  style?: CSSProperties;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sima-land/moleculas",
3
3
  "type": "commonjs",
4
- "version": "16.0.0-alpha.21",
4
+ "version": "16.0.0-alpha.23",
5
5
  "repository": "ssh://git@github.com:sima-land/moleculas.git",
6
6
  "author": "www.sima-land.ru team",
7
7
  "license": "Apache-2.0",
@@ -72,7 +72,7 @@
72
72
  "webpack": "^5.64.4"
73
73
  },
74
74
  "peerDependencies": {
75
- "@sima-land/ui-nucleons": "^45.0.0-alpha.14",
75
+ "@sima-land/ui-nucleons": "^45.0.0-alpha.17",
76
76
  "@sima-land/ui-quarks": "^5.0.0",
77
77
  "react": "^17.0 || ^18.0"
78
78
  }
@@ -1,69 +0,0 @@
1
- import { ReactNode, MouseEventHandler } from 'react';
2
- import { LinkProps } from '@sima-land/ui-nucleons/link';
3
- import { StrokedSVGProps } from '@sima-land/ui-nucleons/stroked-svg';
4
- import { BadgeListProps } from '../badge-list';
5
- import { RatingCounterProps } from '../rating-counter';
6
- export interface ImageProps {
7
- src?: string;
8
- alt?: string;
9
- href?: string;
10
- onClick?: MouseEventHandler<HTMLAnchorElement>;
11
- children?: ReactNode;
12
- opacity?: number;
13
- }
14
- /**
15
- * Дополнительный контент после заголовка.
16
- * @param props Свойства.
17
- * @return Элемент.
18
- */
19
- declare function SecondaryInfo({ children }: {
20
- children: ReactNode;
21
- }): import("react/jsx-runtime").JSX.Element;
22
- /**
23
- * Счетчик рейтинга.
24
- * @param props Свойства.
25
- * @return Элемент.
26
- */
27
- declare function CustomRatingCounter({ className, ...rest }: RatingCounterProps): import("react/jsx-runtime").JSX.Element;
28
- export declare const Parts: {
29
- readonly Image: ({ src, alt, href, onClick, children, opacity }: ImageProps) => import("react/jsx-runtime").JSX.Element;
30
- readonly ImageButton: ({ icon, fill, onClick, hint, hintDirection, "data-testid": testId, position, }: {
31
- icon: StrokedSVGProps['component'];
32
- fill?: string | undefined;
33
- onClick?: MouseEventHandler<HTMLDivElement> | undefined;
34
- hint?: string | undefined;
35
- hintDirection?: "left" | "right" | "bottom" | "top" | undefined;
36
- 'data-testid'?: string | undefined;
37
- position?: {
38
- x: 'left' | 'right';
39
- y: 'top' | 'bottom';
40
- } | undefined;
41
- }) => import("react/jsx-runtime").JSX.Element;
42
- readonly Badges: (props: BadgeListProps) => import("react/jsx-runtime").JSX.Element;
43
- readonly Prices: ({ price, oldPrice, currencyGrapheme, unavailableReason, }: {
44
- price: number;
45
- oldPrice?: number | undefined;
46
- currencyGrapheme?: string | undefined;
47
- unavailableReason?: string | undefined;
48
- }) => import("react/jsx-runtime").JSX.Element;
49
- readonly Title: ({ children, href, onClick }: Pick<LinkProps, 'children' | 'href' | 'onClick'>) => import("react/jsx-runtime").JSX.Element;
50
- readonly TrademarkLink: ({ href, children, onClick, }: Pick<LinkProps, 'href' | 'children' | 'onClick'>) => import("react/jsx-runtime").JSX.Element;
51
- readonly SecondaryInfo: typeof SecondaryInfo;
52
- readonly RatingCounter: typeof CustomRatingCounter;
53
- readonly Footer: ({ children }: {
54
- children?: ReactNode;
55
- }) => import("react/jsx-runtime").JSX.Element;
56
- readonly FooterContext: import("react").Context<{
57
- className?: string | undefined;
58
- }>;
59
- readonly CartControl: ({ children, stepText, markupText, loading, }: {
60
- children?: ReactNode;
61
- stepText?: string | undefined;
62
- markupText?: string | undefined;
63
- loading?: boolean | undefined;
64
- }) => import("react/jsx-runtime").JSX.Element;
65
- readonly AdultConfirmButton: ({ className, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
66
- readonly WaitListAddButton: ({ className, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
67
- readonly WaitListAddedLink: ({ className, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
68
- };
69
- export {};
@@ -1,160 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Parts = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const react_1 = require("react");
9
- const link_1 = require("@sima-land/ui-nucleons/link");
10
- const hint_1 = require("@sima-land/ui-nucleons/hint");
11
- const price_1 = require("@sima-land/ui-nucleons/price");
12
- const stroked_svg_1 = require("@sima-land/ui-nucleons/stroked-svg");
13
- const image_overlay_1 = require("../../../desktop/components/gallery-modal/components/image-overlay");
14
- const badge_list_1 = require("../badge-list");
15
- const utils_1 = require("./utils");
16
- const rating_counter_1 = require("../rating-counter");
17
- const EighteenPlus_1 = __importDefault(require("@sima-land/ui-quarks/icons/64x64/Stroked/EighteenPlus"));
18
- const img_stub_1 = require("../img-stub");
19
- const bind_1 = __importDefault(require("classnames/bind"));
20
- const product_info_m_scss_1 = __importDefault(require("./product-info.m.scss"));
21
- const cx = bind_1.default.bind(product_info_m_scss_1.default);
22
- /**
23
- * Кнопка-иконка на изображении.
24
- * @param props Свойства.
25
- * @return Элемент.
26
- */
27
- const ImageButton = ({ icon, fill, onClick, hint, hintDirection = 'left', 'data-testid': testId, position, }) => {
28
- const commonProps = {
29
- role: 'banner',
30
- fill,
31
- strokeWidth: 1.5,
32
- className: cx('image-button', position && 'positioned', position && `${position.x}-${position.y}`),
33
- onClick,
34
- 'data-testid': testId,
35
- };
36
- // состояние
37
- const [open, setOpen] = (0, react_1.useState)(false);
38
- // позиционирование
39
- const { refs, ...floating } = (0, hint_1.useHintFloating)({
40
- open,
41
- onOpenChange: setOpen,
42
- placement: hintDirection,
43
- });
44
- // пользовательское взаимодействие
45
- const { getReferenceProps, getFloatingProps } = (0, hint_1.useHintOnHover)(floating);
46
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(stroked_svg_1.StrokedSVG, { ref: refs.setReference, component: icon, ...getReferenceProps(commonProps) }), hint && ((0, jsx_runtime_1.jsx)(hint_1.Hint, { open: open, hintRef: refs.setFloating, arrowRef: refs.setArrow, ...getFloatingProps(), children: hint }))] }));
47
- };
48
- /**
49
- * Слот - изображение товара.
50
- * @param props Свойства.
51
- * @return Элемент.
52
- */
53
- const Image = ({ src, alt, href, onClick, children, opacity }) => {
54
- const { restriction } = (0, react_1.useContext)(utils_1.ProductInfoContext);
55
- const defaultOpacity = restriction ? 0.4 : undefined;
56
- const [broken, setBroken] = (0, react_1.useState)(false);
57
- (0, react_1.useEffect)(() => setBroken(false), [src]);
58
- return ((0, jsx_runtime_1.jsx)(image_overlay_1.ImageOverlay, { className: cx('image-overlay'), children: restriction === 'adult' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { onError: () => setBroken(true), alt: alt, src: src, className: cx('image', 'adult', { broken }), "data-testid": 'product-info:adult-image' }), (0, jsx_runtime_1.jsx)(EighteenPlus_1.default, { className: cx('adult-icon') })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("a", { href: href, className: cx('image-link'), onClick: onClick, "data-testid": 'product-info:image-link', children: [(0, jsx_runtime_1.jsx)("img", { onError: () => setBroken(true), alt: alt, src: src, className: cx('image', { broken }), style: { opacity: typeof opacity === 'number' ? opacity : defaultOpacity }, "data-testid": 'product-info:image' }), broken && (0, jsx_runtime_1.jsx)(img_stub_1.ImgStub, { className: cx('broken-icon') })] }), children && (0, jsx_runtime_1.jsx)("div", { className: cx('image-buttons'), children: children })] })) }));
59
- };
60
- /**
61
- * Слот для вывода шильдиков.
62
- * @param props Свойства.
63
- * @return Элемент.
64
- */
65
- const Badges = (props) => (0, jsx_runtime_1.jsx)(badge_list_1.BadgeList, { className: cx('badges'), ...props });
66
- /**
67
- * Слот для вывода цен.
68
- * @param props Свойства.
69
- * @return Элемент.
70
- */
71
- const Prices = ({ price, oldPrice, currencyGrapheme, unavailableReason = 'Товар недоступен', }) => {
72
- const { restriction } = (0, react_1.useContext)(utils_1.ProductInfoContext);
73
- return ((0, jsx_runtime_1.jsxs)("div", { className: cx('prices', { 'height-limit': !restriction || restriction === 'adult' }), "data-testid": 'product-info:prices', children: [(!restriction || restriction === 'adult') && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(price_1.Price, { value: price, currencyGrapheme: currencyGrapheme, className: cx('price'), "data-testid": 'product-info:price' }), restriction !== 'adult' && oldPrice && ((0, jsx_runtime_1.jsx)(price_1.Price, { value: oldPrice, currencyGrapheme: currencyGrapheme, className: cx('old-price'), crossedOut: true, "data-testid": 'product-info:old-price' }))] })), restriction === 'unavailable' && unavailableReason] }));
74
- };
75
- /**
76
- * Слот для вывода ссылки - названия товара.
77
- * @param props Свойства.
78
- * @return Элемент.
79
- */
80
- const Title = ({ children, href, onClick }) => {
81
- const { restriction } = (0, react_1.useContext)(utils_1.ProductInfoContext);
82
- return restriction === 'adult' ? ((0, jsx_runtime_1.jsx)("span", { className: cx('adult-info'), "data-testid": 'product-info:adult-warning', children: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043E \u0432\u044B \u0441\u0442\u0430\u0440\u0448\u0435 18 \u043B\u0435\u0442, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0442\u043E\u0432\u0430\u0440." })) : ((0, jsx_runtime_1.jsx)(link_1.Link, { onClick: onClick, className: cx('link', 'line-clamp'), href: href, color: 'basic-gray87', "data-testid": 'product-info:name-link', children: children }));
83
- };
84
- /**
85
- * Слот для вывода ссылки торговой марки.
86
- * @param props Свойства.
87
- * @return Элемент.
88
- */
89
- const TrademarkLink = ({ href, children, onClick, }) => ((0, jsx_runtime_1.jsx)(link_1.Link, { className: cx('trademark-link'), href: href, children: children, onClick: onClick, color: 'basic-blue', "data-testid": 'product-info:trademark-link' }));
90
- const FooterContext = (0, react_1.createContext)({
91
- className: undefined,
92
- });
93
- /**
94
- * Слот - футер.
95
- * @param props Свойства.
96
- * @return Элемент.
97
- */
98
- const Footer = ({ children }) => {
99
- const { className = cx('footer') } = (0, react_1.useContext)(FooterContext);
100
- return ((0, jsx_runtime_1.jsx)("div", { className: className, "data-testid": 'product-info:footer', children: children }));
101
- };
102
- /**
103
- * Блок управления корзиной.
104
- * @param props Свойства.
105
- * @return Элемент.
106
- */
107
- const CartControl = ({ children, stepText, markupText, loading, }) => ((0, jsx_runtime_1.jsxs)("div", { className: cx('control-wrapper', { loading }), children: [(0, jsx_runtime_1.jsx)("div", { className: cx('control'), children: !loading && children }), (loading || stepText) && ((0, jsx_runtime_1.jsx)("div", { className: cx('unit-text'), "data-testid": 'product-info:cart-step', children: !loading && stepText })), !loading && markupText && ((0, jsx_runtime_1.jsx)("div", { className: cx('bottom-text'), "data-testid": 'product-info:cart-info', children: markupText }))] }));
108
- /**
109
- * Кнопка "подтвердить".
110
- * @param props Свойства.
111
- * @return Элемент.
112
- */
113
- const AdultConfirmButton = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)(link_1.Link, { ...props, pseudo: true, color: 'basic-blue', className: cx('text-button', className), "data-testid": 'product-info:adult-confirm-button', children: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C" }));
114
- /**
115
- * Кнопка "В лист ожидания".
116
- * @param props Свойства.
117
- * @return Элемент.
118
- */
119
- const WaitListAddButton = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)(link_1.Link, { ...props, pseudo: true, color: 'basic-blue', className: cx('text-button', className), "data-testid": 'product-info:wait-list-add-button', children: "\u0412 \u043B\u0438\u0441\u0442 \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F" }));
120
- /**
121
- * Текст со ссылкой "Товар добавлен в лист ожидания".
122
- * @param props Свойства.
123
- * @return Элемент.
124
- */
125
- const WaitListAddedLink = ({ className, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { className: cx('wait-list-added-text'), children: ["\u0422\u043E\u0432\u0430\u0440 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u0432", ' ', (0, jsx_runtime_1.jsxs)(link_1.Link, { ...props, color: 'basic-blue', className: cx('text-button', className), "data-testid": 'product-info:wait-list-added-link', children: ["\u043B\u0438\u0441\u0442", '\u00A0', "\u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F"] })] }));
126
- /**
127
- * Дополнительный контент после заголовка.
128
- * @param props Свойства.
129
- * @return Элемент.
130
- */
131
- function SecondaryInfo({ children }) {
132
- return (0, jsx_runtime_1.jsx)("div", { className: cx('secondary-info'), children: children });
133
- }
134
- /**
135
- * Счетчик рейтинга.
136
- * @param props Свойства.
137
- * @return Элемент.
138
- */
139
- function CustomRatingCounter({ className, ...rest }) {
140
- return (0, jsx_runtime_1.jsx)(rating_counter_1.RatingCounter, { size: 'unset', className: cx('rating', className), hoverDisabled: true, ...rest });
141
- }
142
- exports.Parts = {
143
- // основные компоненты-слоты и компоненты-запчасти
144
- Image,
145
- ImageButton,
146
- Badges,
147
- Prices,
148
- Title,
149
- TrademarkLink,
150
- SecondaryInfo,
151
- RatingCounter: CustomRatingCounter,
152
- // компоненты-слоты и компоненты-запчасти, предназначенные для вывода футера (вcё что ниже ссылки на торговую марку)
153
- Footer,
154
- FooterContext,
155
- CartControl,
156
- AdultConfirmButton,
157
- WaitListAddButton,
158
- WaitListAddedLink,
159
- };
160
- //# sourceMappingURL=parts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../../src/common/components/product-info/parts.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAOe;AACf,sDAA8D;AAC9D,sDAAoF;AACpF,wDAAqD;AACrD,oEAAiF;AACjF,sGAAkG;AAClG,8CAA0D;AAC1D,mCAA6C;AAC7C,sDAAsE;AACtE,yGAA6E;AAC7E,0CAAsC;AACtC,2DAAyC;AACzC,gFAA2C;AAE3C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,6BAAM,CAAC,CAAC;AAWnC;;;;GAIG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,QAAQ,GAYT,EAAE,EAAE;IACH,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,QAAQ;QACd,IAAI;QACJ,WAAW,EAAE,GAAG;QAChB,SAAS,EAAE,EAAE,CACX,cAAc,EACd,QAAQ,IAAI,YAAY,EACxB,QAAQ,IAAI,GAAG,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,CAC1C;QACD,OAAO;QACP,aAAa,EAAE,MAAM;KACtB,CAAC;IAEF,YAAY;IACZ,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAEjD,mBAAmB;IACnB,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAA,sBAAe,EAAC;QAC5C,IAAI;QACJ,YAAY,EAAE,OAAO;QACrB,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