@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.
- package/README.md +1 -1
- package/common/components/hover-slider/hover-slider-nav.d.ts +7 -0
- package/common/components/hover-slider/hover-slider-nav.js +21 -0
- package/common/components/hover-slider/hover-slider-nav.js.map +1 -0
- package/common/components/hover-slider/hover-slider-nav.m.scss +22 -0
- package/common/components/hover-slider/hover-slider.d.ts +9 -0
- package/common/components/hover-slider/hover-slider.js +88 -0
- package/common/components/hover-slider/hover-slider.js.map +1 -0
- package/common/components/hover-slider/hover-slider.m.scss +36 -0
- package/common/components/hover-slider/index.d.ts +3 -0
- package/common/components/hover-slider/index.js +9 -0
- package/common/components/hover-slider/index.js.map +1 -0
- package/common/components/hover-slider/types.d.ts +28 -0
- package/common/components/hover-slider/types.js.map +1 -0
- package/common/components/hover-slider/utils.d.ts +8 -0
- package/common/components/hover-slider/utils.js +23 -0
- package/common/components/hover-slider/utils.js.map +1 -0
- package/common/components/media-gallery/utils.d.ts +1 -1
- package/common/components/media-gallery/utils.js +1 -1
- package/common/components/product-image/index.d.ts +3 -0
- package/common/components/product-image/index.js +8 -0
- package/common/components/product-image/index.js.map +1 -0
- package/common/components/product-image/product-image.d.ts +10 -0
- package/common/components/product-image/product-image.js +33 -0
- package/common/components/product-image/product-image.js.map +1 -0
- package/common/components/product-image/product-image.m.scss +62 -0
- package/common/components/product-image/types.d.ts +30 -0
- package/common/components/product-image/types.js +3 -0
- package/common/components/product-image/types.js.map +1 -0
- package/common/components/product-image/utils.d.ts +3 -0
- package/common/components/product-image/utils.js +6 -0
- package/common/components/product-image/utils.js.map +1 -0
- package/common/components/product-info/index.d.ts +4 -1
- package/common/components/product-info/index.js +5 -2
- package/common/components/product-info/index.js.map +1 -1
- package/common/components/product-info/parts/adult-confirm-button.d.ts +7 -0
- package/common/components/product-info/parts/adult-confirm-button.js +20 -0
- package/common/components/product-info/parts/adult-confirm-button.js.map +1 -0
- package/common/components/product-info/parts/badges.d.ts +7 -0
- package/common/components/product-info/parts/badges.js +20 -0
- package/common/components/product-info/parts/badges.js.map +1 -0
- package/common/components/product-info/parts/badges.m.scss +3 -0
- package/common/components/product-info/parts/cart-control.d.ts +7 -0
- package/common/components/product-info/parts/cart-control.js +19 -0
- package/common/components/product-info/parts/cart-control.js.map +1 -0
- package/common/components/product-info/parts/cart-control.m.scss +41 -0
- package/common/components/product-info/parts/footer.d.ts +7 -0
- package/common/components/product-info/parts/footer.js +22 -0
- package/common/components/product-info/parts/footer.js.map +1 -0
- package/common/components/product-info/parts/footer.m.scss +3 -0
- package/common/components/product-info/parts/image-button.d.ts +7 -0
- package/common/components/product-info/parts/image-button.js +39 -0
- package/common/components/product-info/parts/image-button.js.map +1 -0
- package/common/components/product-info/parts/image-button.m.scss +40 -0
- package/common/components/product-info/parts/image.d.ts +7 -0
- package/common/components/product-info/parts/image.js +27 -0
- package/common/components/product-info/parts/image.js.map +1 -0
- package/common/components/product-info/parts/image.m.scss +24 -0
- package/common/components/product-info/parts/index.d.ts +34 -0
- package/common/components/product-info/parts/index.js +38 -0
- package/common/components/product-info/parts/index.js.map +1 -0
- package/common/components/product-info/parts/media.d.ts +7 -0
- package/common/components/product-info/parts/media.js +19 -0
- package/common/components/product-info/parts/media.js.map +1 -0
- package/common/components/product-info/parts/media.m.scss +10 -0
- package/common/components/product-info/parts/parts.m.scss +15 -0
- package/common/components/product-info/parts/prices.d.ts +7 -0
- package/common/components/product-info/parts/prices.js +26 -0
- package/common/components/product-info/parts/prices.js.map +1 -0
- package/common/components/product-info/parts/prices.m.scss +28 -0
- package/common/components/product-info/parts/rating-counter.m.scss +12 -0
- package/common/components/product-info/parts/rating-couter.d.ts +7 -0
- package/common/components/product-info/parts/rating-couter.js +20 -0
- package/common/components/product-info/parts/rating-couter.js.map +1 -0
- package/common/components/product-info/parts/secondary-info.d.ts +7 -0
- package/common/components/product-info/parts/secondary-info.js +19 -0
- package/common/components/product-info/parts/secondary-info.js.map +1 -0
- package/common/components/product-info/parts/secondary-info.m.scss +8 -0
- package/common/components/product-info/parts/title.d.ts +7 -0
- package/common/components/product-info/parts/title.js +24 -0
- package/common/components/product-info/parts/title.js.map +1 -0
- package/common/components/product-info/parts/title.m.scss +23 -0
- package/common/components/product-info/parts/trademark-link.d.ts +7 -0
- package/common/components/product-info/parts/trademark-link.js +20 -0
- package/common/components/product-info/parts/trademark-link.js.map +1 -0
- package/common/components/product-info/parts/trademark-link.m.scss +9 -0
- package/common/components/product-info/parts/wait-list-add-link.d.ts +7 -0
- package/common/components/product-info/parts/wait-list-add-link.js +20 -0
- package/common/components/product-info/parts/wait-list-add-link.js.map +1 -0
- package/common/components/product-info/parts/wait-list-added-link.d.ts +7 -0
- package/common/components/product-info/parts/wait-list-added-link.js +22 -0
- package/common/components/product-info/parts/wait-list-added-link.js.map +1 -0
- package/common/components/product-info/parts/wait-list-added-link.m.scss +13 -0
- package/common/components/product-info/product-info.d.ts +3 -6
- package/common/components/product-info/product-info.js +15 -10
- package/common/components/product-info/product-info.js.map +1 -1
- package/common/components/product-info/types.d.ts +59 -2
- package/common/components/product-info/utils.d.ts +3 -0
- package/common/components/product-info/utils.js +7 -2
- package/common/components/product-info/utils.js.map +1 -1
- package/common/components/rating-counter/rating-counter.js +1 -1
- package/common/components/rating-counter/rating-counter.js.map +1 -1
- package/common/hooks/index.d.ts +3 -19
- package/common/hooks/index.js +7 -36
- package/common/hooks/index.js.map +1 -1
- package/common/hooks/use-client-width.d.ts +8 -0
- package/common/hooks/use-client-width.js +28 -0
- package/common/hooks/use-client-width.js.map +1 -0
- package/common/hooks/use-image-stub.d.ts +14 -0
- package/common/hooks/use-image-stub.js +26 -0
- package/common/hooks/use-image-stub.js.map +1 -0
- package/common/hooks/use-mounted.d.ts +5 -0
- package/common/hooks/use-mounted.js +19 -0
- package/common/hooks/use-mounted.js.map +1 -0
- package/desktop/components/product-carousel/product-carousel.d.ts +1 -1
- package/desktop/components/product-carousel/product-carousel.js +20 -40
- package/desktop/components/product-carousel/product-carousel.js.map +1 -1
- package/desktop/components/product-carousel/product-carousel.m.scss +0 -6
- package/desktop/components/product-carousel/types.d.ts +1 -4
- package/package.json +2 -2
- package/common/components/product-info/parts.d.ts +0 -69
- package/common/components/product-info/parts.js +0 -160
- package/common/components/product-info/parts.js.map +0 -1
- package/common/components/product-info/product-info.m.scss +0 -280
- package/desktop/components/product-card/index.d.ts +0 -2
- package/desktop/components/product-card/index.js +0 -9
- package/desktop/components/product-card/index.js.map +0 -1
- package/desktop/components/product-card/product-card.d.ts +0 -23
- package/desktop/components/product-card/product-card.js +0 -94
- package/desktop/components/product-card/product-card.js.map +0 -1
- package/desktop/components/product-card/product-card.m.scss +0 -12
- package/desktop/components/product-card/types.d.ts +0 -19
- package/desktop/components/product-card/types.js.map +0 -1
- package/desktop/components/product-carousel/hover-card.d.ts +0 -7
- package/desktop/components/product-carousel/hover-card.js +0 -40
- package/desktop/components/product-carousel/hover-card.js.map +0 -1
- package/desktop/components/product-carousel/hover-card.m.scss +0 -14
- package/desktop/components/product-carousel/utils.d.ts +0 -16
- package/desktop/components/product-carousel/utils.js +0 -45
- package/desktop/components/product-carousel/utils.js.map +0 -1
- /package/{desktop/components/product-card → common/components/hover-slider}/types.js +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
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.ProductInfoCartControl = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const cart_control_m_scss_1 = __importDefault(require("./cart-control.m.scss"));
|
|
9
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
10
|
+
/**
|
|
11
|
+
* Блок управления корзиной.
|
|
12
|
+
* @param props Свойства.
|
|
13
|
+
* @return Элемент.
|
|
14
|
+
*/
|
|
15
|
+
function ProductInfoCartControl({ children, stepText, markupText, loading, }) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(cart_control_m_scss_1.default.root, loading && cart_control_m_scss_1.default.loading), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(cart_control_m_scss_1.default.main), children: !loading && children }), (loading || stepText) && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(cart_control_m_scss_1.default.aside), "data-testid": 'product-info:cart-step', children: !loading && stepText })), !loading && markupText && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(cart_control_m_scss_1.default.footer), "data-testid": 'product-info:cart-info', children: markupText }))] }));
|
|
17
|
+
}
|
|
18
|
+
exports.ProductInfoCartControl = ProductInfoCartControl;
|
|
19
|
+
//# sourceMappingURL=cart-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-control.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/cart-control.tsx"],"names":[],"mappings":";;;;;;;AACA,gFAA2C;AAC3C,4DAAoC;AAEpC;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,GACqB;IAC5B,OAAO,CACL,iCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,6BAAM,CAAC,IAAI,EAAE,OAAO,IAAI,6BAAM,CAAC,OAAO,CAAC,aAChE,gCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,6BAAM,CAAC,IAAI,CAAC,YAAG,CAAC,OAAO,IAAI,QAAQ,GAAO,EAEpE,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,CACxB,gCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,6BAAM,CAAC,KAAK,CAAC,iBAAc,wBAAwB,YAC3E,CAAC,OAAO,IAAI,QAAQ,GACjB,CACP,EAEA,CAAC,OAAO,IAAI,UAAU,IAAI,CACzB,gCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,6BAAM,CAAC,MAAM,CAAC,iBAAc,wBAAwB,YAC5E,UAAU,GACP,CACP,IACG,CACP,CAAC;AACJ,CAAC;AAvBD,wDAuBC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/colors';
|
|
2
|
+
|
|
3
|
+
.root {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
margin-top: 16px;
|
|
7
|
+
&.loading {
|
|
8
|
+
.main {
|
|
9
|
+
background: colors.$basic-gray4;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
}
|
|
12
|
+
.aside::before {
|
|
13
|
+
content: '';
|
|
14
|
+
display: block;
|
|
15
|
+
background: colors.$basic-gray4;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
width: 48px;
|
|
18
|
+
height: 16px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.main {
|
|
24
|
+
width: 122px;
|
|
25
|
+
height: 40px;
|
|
26
|
+
margin-right: 16px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.aside {
|
|
30
|
+
padding-top: 12px; // чтобы при переносе на следующую строку правильно отступил от кнопки
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
line-height: 16px;
|
|
33
|
+
color: colors.$basic-gray38;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.footer {
|
|
37
|
+
margin-top: 12px;
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
line-height: 16px;
|
|
40
|
+
color: colors.$basic-gray38;
|
|
41
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProductInfoFooterProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Слот - футер.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoFooter({ children, className, ...restProps }: ProductInfoFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
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.ProductInfoFooter = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
11
|
+
const footer_m_scss_1 = __importDefault(require("./footer.m.scss"));
|
|
12
|
+
/**
|
|
13
|
+
* Слот - футер.
|
|
14
|
+
* @param props Свойства.
|
|
15
|
+
* @return Элемент.
|
|
16
|
+
*/
|
|
17
|
+
function ProductInfoFooter({ children, className, ...restProps }) {
|
|
18
|
+
const { className: classNameFromContext } = (0, react_1.useContext)(utils_1.ProductInfoFooterContext);
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: classNameFromContext !== null && classNameFromContext !== void 0 ? classNameFromContext : (0, classnames_1.default)(footer_m_scss_1.default.root, className), ...restProps, children: children }));
|
|
20
|
+
}
|
|
21
|
+
exports.ProductInfoFooter = ProductInfoFooter;
|
|
22
|
+
//# sourceMappingURL=footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/footer.tsx"],"names":[],"mappings":";;;;;;;AACA,oCAAoD;AACpD,iCAAmC;AACnC,4DAAoC;AACpC,oEAAqC;AAErC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAA0B;IAC7F,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,GAAG,IAAA,kBAAU,EAAC,gCAAwB,CAAC,CAAC;IAEjF,OAAO,CACL,gCAAK,SAAS,EAAE,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,IAAA,oBAAU,EAAC,uBAAM,CAAC,IAAI,EAAE,SAAS,CAAC,KAAM,SAAS,YACtF,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AARD,8CAQC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ImageButtonProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Кнопка-иконка на изображении.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ImageButton({ icon, hint, hintDirection, position, 'data-testid': testId, className, ...restProps }: ImageButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
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.ImageButton = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const stroked_svg_1 = require("@sima-land/ui-nucleons/stroked-svg");
|
|
9
|
+
const hint_1 = require("@sima-land/ui-nucleons/hint");
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
12
|
+
const image_button_m_scss_1 = __importDefault(require("./image-button.m.scss"));
|
|
13
|
+
/**
|
|
14
|
+
* Кнопка-иконка на изображении.
|
|
15
|
+
* @param props Свойства.
|
|
16
|
+
* @return Элемент.
|
|
17
|
+
*/
|
|
18
|
+
function ImageButton({ icon, hint, hintDirection = 'left', position, 'data-testid': testId, className, ...restProps }) {
|
|
19
|
+
// состояние
|
|
20
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
21
|
+
// позиционирование
|
|
22
|
+
const { refs, ...floating } = (0, hint_1.useHintFloating)({
|
|
23
|
+
open,
|
|
24
|
+
onOpenChange: setOpen,
|
|
25
|
+
placement: hintDirection,
|
|
26
|
+
});
|
|
27
|
+
// пользовательское взаимодействие
|
|
28
|
+
const { getReferenceProps, getFloatingProps } = (0, hint_1.useHintOnHover)(floating);
|
|
29
|
+
const rootProps = {
|
|
30
|
+
role: 'banner',
|
|
31
|
+
...restProps,
|
|
32
|
+
strokeWidth: 1.5,
|
|
33
|
+
className: (0, classnames_1.default)(image_button_m_scss_1.default.root, position && image_button_m_scss_1.default[`${position.x}-${position.y}`], className),
|
|
34
|
+
'data-testid': testId,
|
|
35
|
+
};
|
|
36
|
+
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(rootProps) }), hint && ((0, jsx_runtime_1.jsx)(hint_1.Hint, { open: open, hintRef: refs.setFloating, arrowRef: refs.setArrow, ...getFloatingProps(), children: hint }))] }));
|
|
37
|
+
}
|
|
38
|
+
exports.ImageButton = ImageButton;
|
|
39
|
+
//# sourceMappingURL=image-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-button.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/image-button.tsx"],"names":[],"mappings":";;;;;;;AACA,oEAAsF;AACtF,sDAAoF;AACpF,iCAAiC;AACjC,4DAAoC;AACpC,gFAA2C;AAE3C;;;;GAIG;AACH,SAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,QAAQ,EACR,aAAa,EAAE,MAAM,EACrB,SAAS,EACT,GAAG,SAAS,EACK;IACjB,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,SAAS,EAAE,aAAa;KACzB,CAAC,CAAC;IAEH,kCAAkC;IAClC,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,IAAA,qBAAc,EAAC,QAAQ,CAAC,CAAC;IAEzE,MAAM,SAAS,GAAuC;QACpD,IAAI,EAAE,QAAQ;QACd,GAAG,SAAS;QACZ,WAAW,EAAE,GAAG;QAChB,SAAS,EAAE,IAAA,oBAAU,EACnB,6BAAM,CAAC,IAAI,EACX,QAAQ,IAAI,6BAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,CAAC,EACjD,SAAS,CACV;QACD,aAAa,EAAE,MAAM;KACtB,CAAC;IAEF,OAAO,CACL,6DACE,uBAAC,wBAAU,IAAC,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,KAAM,iBAAiB,CAAC,SAAS,CAAC,GAAI,EAExF,IAAI,IAAI,CACP,uBAAC,WAAI,IACH,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,KACnB,gBAAgB,EAAE,YAErB,IAAI,GACA,CACR,IACA,CACJ,CAAC;AACJ,CAAC;AAlDD,kCAkDC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/colors';
|
|
2
|
+
@use 'node_modules/@sima-land/ui-nucleons/breakpoints';
|
|
3
|
+
|
|
4
|
+
.root {
|
|
5
|
+
width: 24px;
|
|
6
|
+
height: 24px;
|
|
7
|
+
display: block;
|
|
8
|
+
border: 0;
|
|
9
|
+
outline: 0;
|
|
10
|
+
background: transparent;
|
|
11
|
+
position: absolute;
|
|
12
|
+
&:hover {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
fill: colors.$basic-gray54;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.left-top {
|
|
19
|
+
position: absolute;
|
|
20
|
+
left: 8px;
|
|
21
|
+
top: 8px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.left-bottom {
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 8px;
|
|
27
|
+
bottom: 8px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.right-top {
|
|
31
|
+
position: absolute;
|
|
32
|
+
right: 8px;
|
|
33
|
+
top: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.right-bottom {
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 8px;
|
|
39
|
+
bottom: 8px;
|
|
40
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProductInfoImageProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Картинки товара.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoImage({ src, href, children, anchorProps, ...restProps }: ProductInfoImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
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.ProductInfoImage = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const product_image_1 = require("../../product-image");
|
|
10
|
+
const hover_slider_1 = require("../../hover-slider");
|
|
11
|
+
const utils_1 = require("../utils");
|
|
12
|
+
const media_1 = require("./media");
|
|
13
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
14
|
+
const image_m_scss_1 = __importDefault(require("./image.m.scss"));
|
|
15
|
+
/**
|
|
16
|
+
* Картинки товара.
|
|
17
|
+
* @param props Свойства.
|
|
18
|
+
* @return Элемент.
|
|
19
|
+
*/
|
|
20
|
+
function ProductInfoImage({ src, href, children, anchorProps, ...restProps }) {
|
|
21
|
+
const { restriction } = (0, react_1.useContext)(utils_1.ProductInfoContext);
|
|
22
|
+
const adult = restriction === 'adult';
|
|
23
|
+
const rootClassName = (0, classnames_1.default)(image_m_scss_1.default.link, restriction && !adult && image_m_scss_1.default.unavailable, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(media_1.ProductInfoMedia, { ...restProps, children: [(0, jsx_runtime_1.jsx)("a", { ...anchorProps, "data-testid": 'product-image-link', href: adult ? undefined : href, className: rootClassName, children: Array.isArray(src) ? ((0, jsx_runtime_1.jsx)(hover_slider_1.HoverSlider, { className: image_m_scss_1.default.slider, children: src.map((item, index) => ((0, jsx_runtime_1.jsx)(hover_slider_1.HoverSliderItem, { children: (0, jsx_runtime_1.jsx)(product_image_1.ProductImage, { src: item, className: image_m_scss_1.default.image }) }, index))) })) : ((0, jsx_runtime_1.jsx)(product_image_1.ProductImage, { src: src, className: image_m_scss_1.default.image })) }), !adult && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children })] }));
|
|
25
|
+
}
|
|
26
|
+
exports.ProductInfoImage = ProductInfoImage;
|
|
27
|
+
//# sourceMappingURL=image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/image.tsx"],"names":[],"mappings":";;;;;;;AACA,iCAAmC;AACnC,uDAAmD;AACnD,qDAAkE;AAClE,oCAA8C;AAC9C,mCAA2C;AAC3C,4DAAoC;AACpC,kEAAoC;AAEpC;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,GAAG,SAAS,EACU;IACtB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,0BAAkB,CAAC,CAAC;IAEvD,MAAM,KAAK,GAAG,WAAW,KAAK,OAAO,CAAC;IAEtC,MAAM,aAAa,GAAG,IAAA,oBAAU,EAC9B,sBAAM,CAAC,IAAI,EACX,WAAW,IAAI,CAAC,KAAK,IAAI,sBAAM,CAAC,WAAW,EAC3C,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CACvB,CAAC;IAEF,OAAO,CACL,wBAAC,wBAAgB,OAAK,SAAS,aAC7B,iCACM,WAAW,iBACH,oBAAoB,EAChC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAC9B,SAAS,EAAE,aAAa,YAEvB,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACpB,uBAAC,0BAAW,IAAC,SAAS,EAAE,sBAAM,CAAC,MAAM,YAClC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACxB,uBAAC,8BAAe,cACd,uBAAC,4BAAY,IAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,sBAAM,CAAC,KAAK,GAAI,IADhC,KAAK,CAET,CACnB,CAAC,GACU,CACf,CAAC,CAAC,CAAC,CACF,uBAAC,4BAAY,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,sBAAM,CAAC,KAAK,GAAI,CACpD,GACC,EAGH,CAAC,KAAK,IAAI,2DAAG,QAAQ,GAAI,IACT,CACpB,CAAC;AACJ,CAAC;AA1CD,4CA0CC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/colors';
|
|
2
|
+
|
|
3
|
+
.link {
|
|
4
|
+
display: block;
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.unavailable .image {
|
|
13
|
+
opacity: 0.4;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.slider {
|
|
17
|
+
--hover-slider-width: 100%;
|
|
18
|
+
--hover-slider-height: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.image {
|
|
22
|
+
--product-image-width: 100%;
|
|
23
|
+
--product-image-height: 100%;
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProductInfoMedia } from './media';
|
|
3
|
+
import { ProductInfoImage } from './image';
|
|
4
|
+
import { ImageButton } from './image-button';
|
|
5
|
+
import { ProductInfoBadges } from './badges';
|
|
6
|
+
import { ProductInfoPrices } from './prices';
|
|
7
|
+
import { ProductInfoTitle } from './title';
|
|
8
|
+
import { ProductInfoSecondaryInfo } from './secondary-info';
|
|
9
|
+
import { ProductInfoTrademarkLink } from './trademark-link';
|
|
10
|
+
import { ProductInfoRatingCounter } from './rating-couter';
|
|
11
|
+
import { ProductInfoFooter } from './footer';
|
|
12
|
+
import { ProductInfoCartControl } from './cart-control';
|
|
13
|
+
import { WaitListAddedLink } from './wait-list-added-link';
|
|
14
|
+
import { WaitListAddLink } from './wait-list-add-link';
|
|
15
|
+
import { AdultConfirmButton } from './adult-confirm-button';
|
|
16
|
+
export declare const Parts: {
|
|
17
|
+
readonly Media: typeof ProductInfoMedia;
|
|
18
|
+
readonly Image: typeof ProductInfoImage;
|
|
19
|
+
readonly ImageButton: typeof ImageButton;
|
|
20
|
+
readonly Badges: typeof ProductInfoBadges;
|
|
21
|
+
readonly Prices: typeof ProductInfoPrices;
|
|
22
|
+
readonly Title: typeof ProductInfoTitle;
|
|
23
|
+
readonly SecondaryInfo: typeof ProductInfoSecondaryInfo;
|
|
24
|
+
readonly TrademarkLink: typeof ProductInfoTrademarkLink;
|
|
25
|
+
readonly RatingCounter: typeof ProductInfoRatingCounter;
|
|
26
|
+
readonly Footer: typeof ProductInfoFooter;
|
|
27
|
+
readonly FooterContext: import("react").Context<{
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
readonly CartControl: typeof ProductInfoCartControl;
|
|
31
|
+
readonly AdultConfirmButton: typeof AdultConfirmButton;
|
|
32
|
+
readonly WaitListAddButton: typeof WaitListAddLink;
|
|
33
|
+
readonly WaitListAddedLink: typeof WaitListAddedLink;
|
|
34
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parts = void 0;
|
|
4
|
+
const media_1 = require("./media");
|
|
5
|
+
const image_1 = require("./image");
|
|
6
|
+
const image_button_1 = require("./image-button");
|
|
7
|
+
const badges_1 = require("./badges");
|
|
8
|
+
const prices_1 = require("./prices");
|
|
9
|
+
const title_1 = require("./title");
|
|
10
|
+
const secondary_info_1 = require("./secondary-info");
|
|
11
|
+
const trademark_link_1 = require("./trademark-link");
|
|
12
|
+
const rating_couter_1 = require("./rating-couter");
|
|
13
|
+
const footer_1 = require("./footer");
|
|
14
|
+
const utils_1 = require("../utils");
|
|
15
|
+
const cart_control_1 = require("./cart-control");
|
|
16
|
+
const wait_list_added_link_1 = require("./wait-list-added-link");
|
|
17
|
+
const wait_list_add_link_1 = require("./wait-list-add-link");
|
|
18
|
+
const adult_confirm_button_1 = require("./adult-confirm-button");
|
|
19
|
+
exports.Parts = {
|
|
20
|
+
// основные компоненты-слоты и компоненты-запчасти
|
|
21
|
+
Media: media_1.ProductInfoMedia,
|
|
22
|
+
Image: image_1.ProductInfoImage,
|
|
23
|
+
ImageButton: image_button_1.ImageButton,
|
|
24
|
+
Badges: badges_1.ProductInfoBadges,
|
|
25
|
+
Prices: prices_1.ProductInfoPrices,
|
|
26
|
+
Title: title_1.ProductInfoTitle,
|
|
27
|
+
SecondaryInfo: secondary_info_1.ProductInfoSecondaryInfo,
|
|
28
|
+
TrademarkLink: trademark_link_1.ProductInfoTrademarkLink,
|
|
29
|
+
RatingCounter: rating_couter_1.ProductInfoRatingCounter,
|
|
30
|
+
// компоненты-слоты и компоненты-запчасти, предназначенные для вывода футера
|
|
31
|
+
Footer: footer_1.ProductInfoFooter,
|
|
32
|
+
FooterContext: utils_1.ProductInfoFooterContext,
|
|
33
|
+
CartControl: cart_control_1.ProductInfoCartControl,
|
|
34
|
+
AdultConfirmButton: adult_confirm_button_1.AdultConfirmButton,
|
|
35
|
+
WaitListAddButton: wait_list_add_link_1.WaitListAddLink,
|
|
36
|
+
WaitListAddedLink: wait_list_added_link_1.WaitListAddedLink,
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/index.ts"],"names":[],"mappings":";;;AAAA,mCAA2C;AAC3C,mCAA2C;AAC3C,iDAA6C;AAC7C,qCAA6C;AAC7C,qCAA6C;AAC7C,mCAA2C;AAC3C,qDAA4D;AAC5D,qDAA4D;AAC5D,mDAA2D;AAC3D,qCAA6C;AAC7C,oCAAoD;AACpD,iDAAwD;AACxD,iEAA2D;AAC3D,6DAAuD;AACvD,iEAA4D;AAE/C,QAAA,KAAK,GAAG;IACnB,kDAAkD;IAClD,KAAK,EAAE,wBAAgB;IACvB,KAAK,EAAE,wBAAgB;IACvB,WAAW,EAAX,0BAAW;IACX,MAAM,EAAE,0BAAiB;IACzB,MAAM,EAAE,0BAAiB;IACzB,KAAK,EAAE,wBAAgB;IACvB,aAAa,EAAE,yCAAwB;IACvC,aAAa,EAAE,yCAAwB;IACvC,aAAa,EAAE,wCAAwB;IAEvC,4EAA4E;IAC5E,MAAM,EAAE,0BAAiB;IACzB,aAAa,EAAE,gCAAwB;IACvC,WAAW,EAAE,qCAAsB;IACnC,kBAAkB,EAAlB,yCAAkB;IAClB,iBAAiB,EAAE,oCAAe;IAClC,iBAAiB,EAAjB,wCAAiB;CACT,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProductInfoMediaProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Слот для вывода медиа-файлов товара.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoMedia({ aspectRatio, children, className, ...restProps }: ProductInfoMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
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.ProductInfoMedia = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
+
const media_m_scss_1 = __importDefault(require("./media.m.scss"));
|
|
10
|
+
/**
|
|
11
|
+
* Слот для вывода медиа-файлов товара.
|
|
12
|
+
* @param props Свойства.
|
|
13
|
+
* @return Элемент.
|
|
14
|
+
*/
|
|
15
|
+
function ProductInfoMedia({ aspectRatio = true, children, className, ...restProps }) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { ...restProps, className: (0, classnames_1.default)(media_m_scss_1.default.root, aspectRatio && media_m_scss_1.default.ratio, className), children: children }));
|
|
17
|
+
}
|
|
18
|
+
exports.ProductInfoMedia = ProductInfoMedia;
|
|
19
|
+
//# sourceMappingURL=media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/media.tsx"],"names":[],"mappings":";;;;;;;AACA,4DAAoC;AACpC,kEAAoC;AAEpC;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAC/B,WAAW,GAAG,IAAI,EAClB,QAAQ,EACR,SAAS,EACT,GAAG,SAAS,EACU;IACtB,OAAO,CACL,mCAAS,SAAS,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAM,CAAC,IAAI,EAAE,WAAW,IAAI,sBAAM,CAAC,KAAK,EAAE,SAAS,CAAC,YAC3F,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAXD,4CAWC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/breakpoints';
|
|
2
|
+
|
|
3
|
+
.text-button {
|
|
4
|
+
font-size: 16px;
|
|
5
|
+
line-height: 24px;
|
|
6
|
+
font-weight: 600;
|
|
7
|
+
&:hover,
|
|
8
|
+
&:active {
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
}
|
|
11
|
+
@include breakpoints.down('ml') {
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
line-height: 20px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProductInfoPricesProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Слот для вывода цен.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoPrices({ price, oldPrice, currencyGrapheme, unavailableReason, }: ProductInfoPricesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
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.ProductInfoPrices = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const price_1 = require("@sima-land/ui-nucleons/price");
|
|
11
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
12
|
+
const prices_m_scss_1 = __importDefault(require("./prices.m.scss"));
|
|
13
|
+
/**
|
|
14
|
+
* Слот для вывода цен.
|
|
15
|
+
* @param props Свойства.
|
|
16
|
+
* @return Элемент.
|
|
17
|
+
*/
|
|
18
|
+
function ProductInfoPrices({ price, oldPrice, currencyGrapheme, unavailableReason = 'Товар недоступен', }) {
|
|
19
|
+
const { restriction } = (0, react_1.useContext)(utils_1.ProductInfoContext);
|
|
20
|
+
const rootClassName = (0, classnames_1.default)(prices_m_scss_1.default.root, {
|
|
21
|
+
[prices_m_scss_1.default['height-limit']]: !restriction || restriction === 'adult',
|
|
22
|
+
});
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: rootClassName, "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: prices_m_scss_1.default.price, "data-testid": 'product-info:price' }), restriction !== 'adult' && oldPrice && ((0, jsx_runtime_1.jsx)(price_1.Price, { value: oldPrice, currencyGrapheme: currencyGrapheme, className: prices_m_scss_1.default['old-price'], crossedOut: true, "data-testid": 'product-info:old-price' }))] })), restriction === 'unavailable' && unavailableReason] }));
|
|
24
|
+
}
|
|
25
|
+
exports.ProductInfoPrices = ProductInfoPrices;
|
|
26
|
+
//# sourceMappingURL=prices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prices.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/prices.tsx"],"names":[],"mappings":";;;;;;;AACA,iCAAmC;AACnC,oCAA8C;AAC9C,wDAAqD;AACrD,4DAAoC;AACpC,oEAAqC;AAErC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,GAAG,kBAAkB,GACf;IACvB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,0BAAkB,CAAC,CAAC;IAEvD,MAAM,aAAa,GAAG,IAAA,oBAAU,EAAC,uBAAM,CAAC,IAAI,EAAE;QAC5C,CAAC,uBAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,WAAW,IAAI,WAAW,KAAK,OAAO;KAClE,CAAC,CAAC;IAEH,OAAO,CACL,iCAAK,SAAS,EAAE,aAAa,iBAAc,qBAAqB,aAC7D,CAAC,CAAC,WAAW,IAAI,WAAW,KAAK,OAAO,CAAC,IAAI,CAC5C,6DACE,uBAAC,aAAK,IACJ,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,uBAAM,CAAC,KAAK,iBACX,oBAAoB,GAChC,EAED,WAAW,KAAK,OAAO,IAAI,QAAQ,IAAI,CACtC,uBAAC,aAAK,IACJ,KAAK,EAAE,QAAQ,EACf,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,uBAAM,CAAC,WAAW,CAAC,EAC9B,UAAU,uBACE,wBAAwB,GACpC,CACH,IACA,CACJ,EAEA,WAAW,KAAK,aAAa,IAAI,iBAAiB,IAC/C,CACP,CAAC;AACJ,CAAC;AAtCD,8CAsCC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
margin-bottom: 8px;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
|
|
6
|
+
font-size: 16px;
|
|
7
|
+
font-weight: 700;
|
|
8
|
+
line-height: 24px;
|
|
9
|
+
|
|
10
|
+
// чтобы старая цена скрывалась если не влазит
|
|
11
|
+
&.height-limit {
|
|
12
|
+
height: 24px;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.price {
|
|
19
|
+
font-size: inherit;
|
|
20
|
+
line-height: inherit;
|
|
21
|
+
margin-right: 8px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.old-price {
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
line-height: 16px;
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/breakpoints';
|
|
2
|
+
@use '../../rating-counter/rating-counter-util';
|
|
3
|
+
|
|
4
|
+
.root {
|
|
5
|
+
margin-top: 8px;
|
|
6
|
+
@include breakpoints.down('mm') {
|
|
7
|
+
@include rating-counter-util.size-s;
|
|
8
|
+
}
|
|
9
|
+
@include breakpoints.up('mm') {
|
|
10
|
+
@include rating-counter-util.size-m;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RatingCounterProps } from '../../rating-counter';
|
|
2
|
+
/**
|
|
3
|
+
* Счетчик рейтинга.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoRatingCounter({ size, hoverDisabled, className, ...restProps }: RatingCounterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
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.ProductInfoRatingCounter = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const rating_counter_1 = require("../../rating-counter");
|
|
9
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
10
|
+
const rating_counter_m_scss_1 = __importDefault(require("./rating-counter.m.scss"));
|
|
11
|
+
/**
|
|
12
|
+
* Счетчик рейтинга.
|
|
13
|
+
* @param props Свойства.
|
|
14
|
+
* @return Элемент.
|
|
15
|
+
*/
|
|
16
|
+
function ProductInfoRatingCounter({ size = 'unset', hoverDisabled = true, className, ...restProps }) {
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(rating_counter_1.RatingCounter, { ...restProps, size: size, hoverDisabled: hoverDisabled, className: (0, classnames_1.default)(rating_counter_m_scss_1.default.root, className) }));
|
|
18
|
+
}
|
|
19
|
+
exports.ProductInfoRatingCounter = ProductInfoRatingCounter;
|
|
20
|
+
//# sourceMappingURL=rating-couter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating-couter.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/rating-couter.tsx"],"names":[],"mappings":";;;;;;;AAAA,yDAA8E;AAC9E,4DAAoC;AACpC,oFAA6C;AAE7C;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,EACvC,IAAI,GAAG,OAAO,EACd,aAAa,GAAG,IAAI,EACpB,SAAS,EACT,GAAG,SAAS,EACO;IACnB,OAAO,CACL,uBAAC,8BAAa,OACR,SAAS,EACb,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,IAAA,oBAAU,EAAC,+BAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAC7C,CACH,CAAC;AACJ,CAAC;AAdD,4DAcC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Дополнительный контент после заголовка.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoSecondaryInfo({ children, className, ...restProps }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
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.ProductInfoSecondaryInfo = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
+
const secondary_info_m_scss_1 = __importDefault(require("./secondary-info.m.scss"));
|
|
10
|
+
/**
|
|
11
|
+
* Дополнительный контент после заголовка.
|
|
12
|
+
* @param props Свойства.
|
|
13
|
+
* @return Элемент.
|
|
14
|
+
*/
|
|
15
|
+
function ProductInfoSecondaryInfo({ children, className, ...restProps }) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { ...restProps, className: (0, classnames_1.default)(secondary_info_m_scss_1.default.root, className), children: children }));
|
|
17
|
+
}
|
|
18
|
+
exports.ProductInfoSecondaryInfo = ProductInfoSecondaryInfo;
|
|
19
|
+
//# sourceMappingURL=secondary-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secondary-info.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/secondary-info.tsx"],"names":[],"mappings":";;;;;;;AACA,4DAAoC;AACpC,oFAA6C;AAE7C;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,SAAS,EACT,GAAG,SAAS,EACmB;IAC/B,OAAO,CACL,mCAAS,SAAS,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,+BAAM,CAAC,IAAI,EAAE,SAAS,CAAC,YAC9D,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAVD,4DAUC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ProductInfoTitleProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Слот для вывода ссылки - названия товара.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProductInfoTitle({ children, href, className, color, adultPlaceholder, 'data-testid': testId, ...restProps }: ProductInfoTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
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.ProductInfoTitle = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const link_1 = require("@sima-land/ui-nucleons/link");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
12
|
+
const title_m_scss_1 = __importDefault(require("./title.m.scss"));
|
|
13
|
+
const defaultAdultPlaceholder = ((0, jsx_runtime_1.jsx)("span", { className: title_m_scss_1.default['adult-placeholder'], "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." }));
|
|
14
|
+
/**
|
|
15
|
+
* Слот для вывода ссылки - названия товара.
|
|
16
|
+
* @param props Свойства.
|
|
17
|
+
* @return Элемент.
|
|
18
|
+
*/
|
|
19
|
+
function ProductInfoTitle({ children, href, className, color = 'basic-gray87', adultPlaceholder = defaultAdultPlaceholder, 'data-testid': testId = 'product-info:name-link', ...restProps }) {
|
|
20
|
+
const { restriction } = (0, react_1.useContext)(utils_1.ProductInfoContext);
|
|
21
|
+
return restriction === 'adult' ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: adultPlaceholder })) : ((0, jsx_runtime_1.jsx)(link_1.Link, { ...restProps, className: (0, classnames_1.default)(title_m_scss_1.default.root, title_m_scss_1.default['line-clamp'], className), href: href, color: color, "data-testid": testId, children: children }));
|
|
22
|
+
}
|
|
23
|
+
exports.ProductInfoTitle = ProductInfoTitle;
|
|
24
|
+
//# sourceMappingURL=title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.js","sourceRoot":"","sources":["../../../../../src/common/components/product-info/parts/title.tsx"],"names":[],"mappings":";;;;;;;AACA,sDAAmD;AACnD,iCAAmC;AACnC,oCAA8C;AAC9C,4DAAoC;AACpC,kEAAoC;AAEpC,MAAM,uBAAuB,GAAG,CAC9B,iCAAM,SAAS,EAAE,sBAAM,CAAC,mBAAmB,CAAC,iBAAc,4BAA4B,4SAE/E,CACR,CAAC;AAEF;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,KAAK,GAAG,cAAc,EACtB,gBAAgB,GAAG,uBAAuB,EAC1C,aAAa,EAAE,MAAM,GAAG,wBAAwB,EAChD,GAAG,SAAS,EACU;IACtB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,0BAAkB,CAAC,CAAC;IAEvD,OAAO,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAC/B,2DAAG,gBAAgB,GAAI,CACxB,CAAC,CAAC,CAAC,CACF,uBAAC,WAAI,OACC,SAAS,EACb,SAAS,EAAE,IAAA,oBAAU,EAAC,sBAAM,CAAC,IAAI,EAAE,sBAAM,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,EACnE,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,iBACC,MAAM,YAElB,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC;AAxBD,4CAwBC"}
|