@sima-land/moleculas 12.3.3 → 13.1.2

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 (66) hide show
  1. package/common/components/adult-block/{adult-block.d.ts → index.d.ts} +1 -2
  2. package/common/components/adult-block/{adult-block.js → index.js} +2 -1
  3. package/common/components/badge-list/badge-list.module.scss +0 -1
  4. package/common/components/badge-list/index.d.ts +2 -6
  5. package/common/components/badge-list/index.js +26 -5
  6. package/common/components/product-info/index.d.ts +11 -49
  7. package/common/components/product-info/index.js +24 -35
  8. package/common/components/product-info/parts.d.ts +41 -0
  9. package/common/components/product-info/parts.js +176 -0
  10. package/common/components/product-info/product-info.module.scss +159 -28
  11. package/common/components/product-info/types.d.ts +5 -0
  12. package/common/components/product-info/types.js +2 -0
  13. package/common/components/product-info/utils.d.ts +3 -0
  14. package/{mobile/components/product-slider → common/components/product-info}/utils.js +2 -2
  15. package/common/icons/eighteen-plus.svg +3 -1
  16. package/desktop/components/item-image/index.d.ts +1 -1
  17. package/desktop/components/item-image/index.js +5 -3
  18. package/desktop/components/person-modal/index.d.ts +0 -1
  19. package/desktop/components/person-modal/index.js +0 -1
  20. package/desktop/components/product-card/index.d.ts +11 -24
  21. package/desktop/components/product-card/index.js +47 -31
  22. package/desktop/components/product-card/product-card.module.scss +7 -48
  23. package/desktop/components/product-carousel/hover-card.d.ts +1 -4
  24. package/desktop/components/product-carousel/hover-card.js +18 -6
  25. package/desktop/components/product-carousel/index.d.ts +5 -9
  26. package/desktop/components/product-carousel/index.js +28 -25
  27. package/desktop/components/product-carousel/utils.js +4 -1
  28. package/mobile/components/garland-calculator-button/garland-calculator-button.module.scss +32 -3
  29. package/mobile/components/garland-calculator-button/index.d.ts +2 -3
  30. package/mobile/components/garland-calculator-button/index.js +9 -14
  31. package/mobile/components/item-image/index.d.ts +4 -4
  32. package/mobile/components/item-image/index.js +9 -10
  33. package/mobile/components/person-screen/index.d.ts +3 -3
  34. package/mobile/components/person-screen/index.js +16 -14
  35. package/mobile/components/product-actions-alert/index.d.ts +2 -5
  36. package/mobile/components/product-actions-alert/index.js +2 -5
  37. package/mobile/components/product-slider/index.d.ts +6 -9
  38. package/mobile/components/product-slider/index.js +14 -11
  39. package/mobile/components/product-slider/{item.module.scss → product-slider.module.scss} +1 -12
  40. package/mobile/components/pseudo-input/index.d.ts +5 -8
  41. package/mobile/components/pseudo-input/index.js +21 -10
  42. package/mobile/components/pseudo-input/pseudo-input.module.scss +6 -9
  43. package/mobile/components/select-screen/index.d.ts +11 -2
  44. package/mobile/components/select-screen/index.js +46 -12
  45. package/mobile/components/select-screen/select-screen.module.scss +3 -1
  46. package/package.json +3 -3
  47. package/common/__fixtures__/list-item.d.ts +0 -53
  48. package/common/__fixtures__/list-item.js +0 -107
  49. package/common/helpers/get-contained-items.d.ts +0 -7
  50. package/common/helpers/get-contained-items.js +0 -18
  51. package/common/icons/filled-rate.svg +0 -3
  52. package/common/icons/full-left-arrow.svg +0 -1
  53. package/common/icons/full-right-arrow.svg +0 -1
  54. package/common/icons/grid-small.svg +0 -11
  55. package/common/icons/grid.svg +0 -6
  56. package/common/icons/list.svg +0 -5
  57. package/common/icons/page.svg +0 -1
  58. package/common/icons/step-arrows.svg +0 -4
  59. package/common/icons/triple-dots.svg +0 -3
  60. package/common/icons/white-spinner.svg +0 -3
  61. package/desktop/components/breadcrumbs/items.d.ts +0 -3
  62. package/desktop/components/breadcrumbs/items.js +0 -157
  63. package/mobile/components/garland-calculator-button/tree-in-circle.svg +0 -6
  64. package/mobile/components/product-slider/item.d.ts +0 -18
  65. package/mobile/components/product-slider/item.js +0 -58
  66. package/mobile/components/product-slider/utils.d.ts +0 -4
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
2
21
  var __rest = (this && this.__rest) || function (s, e) {
3
22
  var t = {};
4
23
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -14,7 +33,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
33
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
34
  };
16
35
  Object.defineProperty(exports, "__esModule", { value: true });
17
- const react_1 = __importDefault(require("react"));
36
+ exports.SelectScreenOption = exports.SelectScreenLayout = exports.SelectScreen = void 0;
37
+ const react_1 = __importStar(require("react"));
18
38
  const lodash_1 = require("lodash");
19
39
  const prop_1 = __importDefault(require("lodash/fp/prop"));
20
40
  const screen_1 = require("@sima-land/ui-nucleons/screen");
@@ -22,9 +42,11 @@ const text_1 = require("@sima-land/ui-nucleons/text");
22
42
  const colors_1 = require("@sima-land/ui-nucleons/colors");
23
43
  const layout_1 = require("@sima-land/ui-nucleons/layout");
24
44
  const check_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/check"));
45
+ const classnames_1 = __importDefault(require("classnames"));
25
46
  const select_screen_module_scss_1 = __importDefault(require("./select-screen.module.scss"));
26
47
  /**
27
48
  * Экран выбора опции.
49
+ * @deprecated Вместо SelectScreen используйте SelectScreenLayout и SelectScreenOption вместе с Screen.
28
50
  * @param props Свойства. Поддерживаются свойства Screen.
29
51
  * @param props.items Список опций.
30
52
  * @param props.getItemName Вернет имя опции.
@@ -33,23 +55,35 @@ const select_screen_module_scss_1 = __importDefault(require("./select-screen.mod
33
55
  * @param props.onItemClick Сработает при клике на опцию.
34
56
  * @return Экран выбора опции.
35
57
  */
36
- const SelectScreen = (_a) => {
37
- var { items, getItemName = (0, prop_1.default)('name'), displayItem = displayOption, isItemSelected = lodash_1.noop, onItemClick } = _a, screenProps = __rest(_a, ["items", "getItemName", "displayItem", "isItemSelected", "onItemClick"]);
38
- return (react_1.default.createElement(screen_1.Screen, Object.assign({ withDivideHeader: false }, screenProps),
39
- react_1.default.createElement(layout_1.MobileLayout, { disabledOn: ['mxs', 'ms'] },
40
- react_1.default.createElement("div", { className: select_screen_module_scss_1.default.container }, (0, lodash_1.map)(items, (item, index) => {
41
- const isSelected = Boolean(isItemSelected(item));
42
- return (react_1.default.createElement("button", { key: index, className: select_screen_module_scss_1.default.item, onClick: () => onItemClick && onItemClick(item) },
43
- displayItem(item, { getItemName, isSelected }),
44
- isSelected && react_1.default.createElement(check_1.default, { fill: colors_1.COLORS.get('gray87') })));
45
- })))));
58
+ const SelectScreen = ({ items, getItemName = (0, prop_1.default)('name'), displayItem = displayOption, isItemSelected = lodash_1.noop, onItemClick, title, subtitle, onBack, onClose, }) => (react_1.default.createElement(screen_1.Screen, null,
59
+ react_1.default.createElement(screen_1.Screen.Header, { title: title, subtitle: subtitle, onBack: onBack, onClose: onClose }),
60
+ react_1.default.createElement(screen_1.Screen.Body, null,
61
+ react_1.default.createElement(exports.SelectScreenLayout, { style: { padding: '16px 0' } }, (0, lodash_1.map)(items, (item, index) => {
62
+ const isSelected = Boolean(isItemSelected(item));
63
+ return (react_1.default.createElement(exports.SelectScreenOption, { key: index, onClick: () => onItemClick && onItemClick(item) },
64
+ displayItem(item, { getItemName, isSelected }),
65
+ isSelected && react_1.default.createElement(check_1.default, { fill: colors_1.COLORS.get('gray87') })));
66
+ })))));
67
+ exports.SelectScreen = SelectScreen;
68
+ const SelectScreenLayout = (_a) => {
69
+ var { children } = _a, props = __rest(_a, ["children"]);
70
+ return (react_1.default.createElement(layout_1.MobileLayout, Object.assign({}, props, { disabledOn: ['mxs', 'ms'] }),
71
+ react_1.default.createElement("div", { className: select_screen_module_scss_1.default.container }, react_1.Children.toArray(children).filter(x => (0, react_1.isValidElement)(x) && x.type === exports.SelectScreenOption))));
72
+ };
73
+ exports.SelectScreenLayout = SelectScreenLayout;
74
+ const SelectScreenOption = (_a) => {
75
+ var { children, className, selected } = _a, props = __rest(_a, ["children", "className", "selected"]);
76
+ return (react_1.default.createElement("button", Object.assign({}, props, { type: 'button', className: (0, classnames_1.default)(select_screen_module_scss_1.default.item, className), "data-testid": 'select-screen:option' }),
77
+ children,
78
+ selected && react_1.default.createElement(check_1.default, { fill: colors_1.COLORS.get('gray87') })));
46
79
  };
80
+ exports.SelectScreenOption = SelectScreenOption;
47
81
  /**
48
82
  * Выводит опцию в текстовом виде.
83
+ * @deprecated
49
84
  * @param item Элемент списка.
50
85
  * @param options Опции вывода.
51
86
  * @param options.getItemName Вернет имя опции.
52
87
  * @return Опция в текстовом виде.
53
88
  */
54
89
  const displayOption = (item, { getItemName }) => (react_1.default.createElement(text_1.Text, { size: 16, lineHeight: 24, color: 'gray87', children: getItemName(item) }));
55
- exports.default = SelectScreen;
@@ -3,7 +3,6 @@
3
3
 
4
4
  .container {
5
5
  --gutter: 24px;
6
- padding: 16px 0;
7
6
  margin: 0 auto;
8
7
  max-width: calc((var(--gutter) * 5) + ((var(--layoutWidth) - (var(--gutter) * 7)) * 6 / 8));
9
8
 
@@ -22,6 +21,9 @@
22
21
  justify-content: space-between;
23
22
  width: 100%;
24
23
  padding: 16px;
24
+ font-size: 16px;
25
+ line-height: 24px;
26
+ height: 48px;
25
27
  margin: 0;
26
28
  border: 0;
27
29
  outline: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sima-land/moleculas",
3
- "version": "12.3.3",
3
+ "version": "13.1.2",
4
4
  "repository": "ssh://git@github.com:sima-land/moleculas.git",
5
5
  "author": "www.sima-land.ru team",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,7 @@
25
25
  "prettier:check": "prettier --check \"./src/**/*.{js,jsx,ts,tsx,css,scss}\" --loglevel error"
26
26
  },
27
27
  "dependencies": {
28
- "@sima-land/ui-nucleons": "^40.3.0",
28
+ "@sima-land/ui-nucleons": "^41.2.0",
29
29
  "@sima-land/ui-quarks": "^2.2.0",
30
30
  "classnames": "^2.3.1",
31
31
  "date-fns": "^2.26.0",
@@ -80,7 +80,7 @@
80
80
  "style-loader": "^2.0.0",
81
81
  "stylelint": "^14.1.0",
82
82
  "ts-jest": "^27.0.7",
83
- "typescript": "^4.2.4",
83
+ "typescript": "^4.5.4",
84
84
  "webpack": "^5.64.4"
85
85
  }
86
86
  }
@@ -1,53 +0,0 @@
1
- export declare const data: {
2
- viewType: string;
3
- wrapperClassName: string;
4
- size: string;
5
- asTile: boolean;
6
- isWished: boolean;
7
- isAuthUser: boolean;
8
- shouldHideAdultContent: boolean;
9
- filtersHidden: boolean;
10
- isFetchingWishItems: boolean;
11
- reviewsCount: number;
12
- unitPrice: null;
13
- name: string;
14
- sid: number;
15
- rating: number;
16
- additionStepText: string;
17
- badges: {
18
- title: null;
19
- link: string;
20
- color: string;
21
- fields: {
22
- type: string;
23
- value: string;
24
- }[];
25
- }[];
26
- bigImg: string;
27
- canAddMoreToCart: boolean;
28
- currencyGrapheme: string;
29
- deliveryInfo: string;
30
- image: string;
31
- isCartFetching: boolean;
32
- isFloatQty: boolean;
33
- markupData: {};
34
- measure: null;
35
- modifierProps: null;
36
- price: number;
37
- priceMax: number;
38
- properties: ({
39
- text: string;
40
- href: string;
41
- } | {
42
- text: string;
43
- href: null;
44
- } | {
45
- text: string;
46
- href?: undefined;
47
- })[];
48
- wholesaleProps: {
49
- price: number;
50
- description: string;
51
- text: string;
52
- };
53
- };
@@ -1,107 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = void 0;
4
- exports.data = {
5
- viewType: 'list',
6
- wrapperClassName: ' catalog__item',
7
- size: 'small',
8
- asTile: false,
9
- isWished: false,
10
- isAuthUser: true,
11
- shouldHideAdultContent: false,
12
- filtersHidden: false,
13
- isFetchingWishItems: false,
14
- reviewsCount: 1,
15
- unitPrice: null,
16
- name: 'Новогодний венок "Рождественская сказка", набор для создания, Me To You',
17
- sid: 1,
18
- rating: 2,
19
- additionStepText: 'по 1 набору',
20
- badges: [
21
- {
22
- title: null,
23
- link: '/sale/?is_label=1',
24
- color: '#64a0eb',
25
- fields: [
26
- {
27
- type: 'text',
28
- value: '-10%',
29
- },
30
- ],
31
- },
32
- {
33
- title: null,
34
- link: '/nasha-razrabotka/?is_label=1',
35
- color: '#000000',
36
- fields: [
37
- {
38
- type: 'text',
39
- value: 'Наша разработка',
40
- },
41
- ],
42
- },
43
- {
44
- title: null,
45
- link: '/markdown/?is_label=1',
46
- color: '#607d8b',
47
- fields: [
48
- {
49
- type: 'text',
50
- value: 'Уценённый товар',
51
- },
52
- ],
53
- },
54
- {
55
- link: '/opt/?is_label=1#detskie-tovary',
56
- title: null,
57
- fields: [
58
- {
59
- type: 'text',
60
- value: 'Опт «Детские товары»',
61
- },
62
- ],
63
- color: '#ff4824',
64
- },
65
- ],
66
- bigImg: 'https://cdn2.static1-sima-land.com/items/3311827/6/400.jpg?v=1566383235',
67
- canAddMoreToCart: true,
68
- currencyGrapheme: '₽',
69
- deliveryInfo: 'Доставим 21 октября',
70
- image: 'https://cdn2.static1-sima-land.com/items/3311827/6/280.jpg?v=1566383235',
71
- isCartFetching: false,
72
- isFloatQty: false,
73
- markupData: {},
74
- measure: null,
75
- modifierProps: null,
76
- price: 179,
77
- priceMax: 205,
78
- properties: [
79
- {
80
- text: 'Me to You',
81
- href: '/trademark/me-to-you/',
82
- },
83
- {
84
- text: 'Новый Год. Me To You',
85
- href: '/series/novyy-god-me-to-you/',
86
- },
87
- {
88
- text: 'Китай',
89
- href: null,
90
- },
91
- {
92
- text: '22 см × 3 см × 22 см',
93
- },
94
- {
95
- text: 'Картон, пластик, текстиль',
96
- },
97
- {
98
- text: 'В боксе 38',
99
- },
100
- ],
101
- wholesaleProps: {
102
- price: 179,
103
- // eslint-disable-next-line max-len
104
- description: '<p>При покупке изделий из раздела «Игрушки» и «Товары для детей» со значком <span class="flag flag_orange_superopt flag_compensated">Опт «Детские товары»</span> действительны специальные цены. Они указаны в карточках товаров после информации о доставке. Чтобы приобрести товары по таким ценам, нужно заказать их на сумму от 10 000 рублей единовременно. Она рассчитывается с учётом всех скидок. </p><p>Также мы предоставим вам дополнительную скидку при покупке: </p><ul><li>от 50 000 рублей (в ценах опта) — до 5 % от оптовой цены, </li><li>от 80 000 рублей (в ценах опта) — до 8 % от оптовой цены, </li><li>от 100 000 рублей (в ценах опта) — до 10 % от оптовой цены. </li><li>от 150 000 рублей (в ценах опта) — до 12 % от оптовой цены. </li><li>от 200 000 рублей (в ценах опта) — до 15 % от оптовой цены. </li></ul><p>Планируете крупный заказ? <a href=https://www.sima-land.ru/kontakty/managers/?sort=-created_at&per-page=10>Позвоните нам</a> и узнайте, как сделать покупку на особых условиях. </p><p>На часть позиций со значком <span class="flag flag_orange_superopt flag_compensated">Опт «Детские товары»</span> дополнительные скидки не распространяются. </p>',
105
- text: 'Детские товары',
106
- },
107
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * Возвращает количество HTML элементов, размещенных по горизонтали в родительском элементе.
3
- * @param node DOM Элемент.
4
- * @return Количество дочерних элементов.
5
- */
6
- declare const getContainedItems: (node: any) => number;
7
- export default getContainedItems;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Возвращает количество HTML элементов, размещенных по горизонтали в родительском элементе.
5
- * @param node DOM Элемент.
6
- * @return Количество дочерних элементов.
7
- */
8
- const getContainedItems = (node) => {
9
- let count = 0;
10
- if (node instanceof HTMLElement) {
11
- const children = Array.from(node.childNodes);
12
- const farItemIndex = children.findIndex((item, index, arr) => !arr[index + 1] ||
13
- item.getBoundingClientRect().right > arr[index + 1].getBoundingClientRect().right);
14
- count = farItemIndex + 1;
15
- }
16
- return count;
17
- };
18
- exports.default = getContainedItems;
@@ -1,3 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00132 11.8447L3.89999 14.4194C3.83234 14.4619 3.7535 14.4832 3.67364 14.4805C3.59378 14.4778 3.51656 14.4513 3.45193 14.4043C3.38729 14.3573 3.33822 14.292 3.31102 14.2169C3.28382 14.1417 3.27975 14.0602 3.29932 13.9827L4.48066 9.28739L0.765324 6.18339C0.703829 6.13224 0.659079 6.06384 0.636851 5.98701C0.614623 5.91018 0.615939 5.82845 0.640627 5.75237C0.665316 5.6763 0.712244 5.60937 0.775353 5.56023C0.838461 5.5111 0.91485 5.48201 0.994657 5.47672L5.82466 5.15005L7.62932 0.656721C7.65914 0.582739 7.7104 0.519361 7.77651 0.474729C7.84261 0.430098 7.92056 0.40625 8.00032 0.40625C8.08009 0.40625 8.15803 0.430098 8.22414 0.474729C8.29025 0.519361 8.34151 0.582739 8.37132 0.656721L10.1753 5.15005L15.006 5.47672C15.0858 5.48201 15.1622 5.5111 15.2253 5.56023C15.2884 5.60937 15.3353 5.6763 15.36 5.75237C15.3847 5.82845 15.386 5.91018 15.3638 5.98701C15.3416 6.06384 15.2968 6.13224 15.2353 6.18339L11.52 9.28739L12.7013 13.9827C12.7209 14.0602 12.7168 14.1417 12.6896 14.2169C12.6624 14.292 12.6133 14.3573 12.5487 14.4043C12.4841 14.4513 12.4069 14.4778 12.327 14.4805C12.2471 14.4832 12.1683 14.4619 12.1007 14.4194L8.00132 11.8447Z" fill="#FFAB00"/>
3
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M 8.121094 19.5 L 16.0625 27.4375 C 16.644531 28.023438 16.644531 28.976562 16.0625 29.5625 C 15.476562 30.144531 14.523438 30.144531 13.9375 29.5625 L 3.4375 19.0625 C 2.855469 18.476562 2.855469 17.523438 3.4375 16.9375 L 13.9375 6.4375 C 14.523438 5.855469 15.476562 5.855469 16.0625 6.4375 C 16.644531 7.023438 16.644531 7.976562 16.0625 8.5625 L 8.121094 16.5 L 31.5 16.5 C 32.328125 16.5 33 17.171875 33 18 C 33 18.828125 32.328125 19.5 31.5 19.5 Z M 8.121094 19.5 "/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path d="M 18.371094 6.511719 C 17.824219 7.136719 17.890625 8.082031 18.511719 8.628906 L 27.507812 16.5 L 4.5 16.5 C 3.671875 16.5 3 17.171875 3 18 C 3 18.828125 3.671875 19.5 4.5 19.5 L 27.507812 19.5 L 18.511719 27.371094 C 17.890625 27.917969 17.824219 28.863281 18.371094 29.488281 C 18.917969 30.109375 19.863281 30.175781 20.488281 29.628906 L 32.488281 19.128906 C 33.171875 18.53125 33.171875 17.46875 32.488281 16.871094 L 20.488281 6.371094 C 19.863281 5.824219 18.917969 5.890625 18.371094 6.511719 Z M 18.371094 6.511719 "/></svg>
@@ -1,11 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M9 1.5H3C2.17157 1.5 1.5 2.17157 1.5 3V9C1.5 9.82843 2.17157 10.5 3 10.5H9C9.82843 10.5 10.5 9.82843 10.5 9V3C10.5 2.17157 9.82843 1.5 9 1.5Z" />
3
- <path d="M21 1.5H15C14.1716 1.5 13.5 2.17157 13.5 3V9C13.5 9.82843 14.1716 10.5 15 10.5H21C21.8284 10.5 22.5 9.82843 22.5 9V3C22.5 2.17157 21.8284 1.5 21 1.5Z" />
4
- <path d="M33 1.5H27C26.1716 1.5 25.5 2.17157 25.5 3V9C25.5 9.82843 26.1716 10.5 27 10.5H33C33.8284 10.5 34.5 9.82843 34.5 9V3C34.5 2.17157 33.8284 1.5 33 1.5Z" />
5
- <path d="M9 13.5H3C2.17157 13.5 1.5 14.1716 1.5 15V21C1.5 21.8284 2.17157 22.5 3 22.5H9C9.82843 22.5 10.5 21.8284 10.5 21V15C10.5 14.1716 9.82843 13.5 9 13.5Z" />
6
- <path d="M21 13.5H15C14.1716 13.5 13.5 14.1716 13.5 15V21C13.5 21.8284 14.1716 22.5 15 22.5H21C21.8284 22.5 22.5 21.8284 22.5 21V15C22.5 14.1716 21.8284 13.5 21 13.5Z" />
7
- <path d="M33 13.5H27C26.1716 13.5 25.5 14.1716 25.5 15V21C25.5 21.8284 26.1716 22.5 27 22.5H33C33.8284 22.5 34.5 21.8284 34.5 21V15C34.5 14.1716 33.8284 13.5 33 13.5Z" />
8
- <path d="M9 25.5H3C2.17157 25.5 1.5 26.1716 1.5 27V33C1.5 33.8284 2.17157 34.5 3 34.5H9C9.82843 34.5 10.5 33.8284 10.5 33V27C10.5 26.1716 9.82843 25.5 9 25.5Z" />
9
- <path d="M21 25.5H15C14.1716 25.5 13.5 26.1716 13.5 27V33C13.5 33.8284 14.1716 34.5 15 34.5H21C21.8284 34.5 22.5 33.8284 22.5 33V27C22.5 26.1716 21.8284 25.5 21 25.5Z" />
10
- <path d="M33 25.5H27C26.1716 25.5 25.5 26.1716 25.5 27V33C25.5 33.8284 26.1716 34.5 27 34.5H33C33.8284 34.5 34.5 33.8284 34.5 33V27C34.5 26.1716 33.8284 25.5 33 25.5Z" />
11
- </svg>
@@ -1,6 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M13.5 1.5H4.5C2.84315 1.5 1.5 2.84315 1.5 4.5V13.5C1.5 15.1569 2.84315 16.5 4.5 16.5H13.5C15.1569 16.5 16.5 15.1569 16.5 13.5V4.5C16.5 2.84315 15.1569 1.5 13.5 1.5Z" />
3
- <path d="M13.5 19.5H4.5C2.84315 19.5 1.5 20.8431 1.5 22.5V31.5C1.5 33.1569 2.84315 34.5 4.5 34.5H13.5C15.1569 34.5 16.5 33.1569 16.5 31.5V22.5C16.5 20.8431 15.1569 19.5 13.5 19.5Z" />
4
- <path d="M31.5 1.5H22.5C20.8431 1.5 19.5 2.84315 19.5 4.5V13.5C19.5 15.1569 20.8431 16.5 22.5 16.5H31.5C33.1569 16.5 34.5 15.1569 34.5 13.5V4.5C34.5 2.84315 33.1569 1.5 31.5 1.5Z" />
5
- <path d="M31.5 19.5H22.5C20.8431 19.5 19.5 20.8431 19.5 22.5V31.5C19.5 33.1569 20.8431 34.5 22.5 34.5H31.5C33.1569 34.5 34.5 33.1569 34.5 31.5V22.5C34.5 20.8431 33.1569 19.5 31.5 19.5Z" />
6
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M31.5 1.5H4.5C2.84315 1.5 1.5 2.84315 1.5 4.5V7.5C1.5 9.15685 2.84315 10.5 4.5 10.5H31.5C33.1569 10.5 34.5 9.15685 34.5 7.5V4.5C34.5 2.84315 33.1569 1.5 31.5 1.5Z" />
3
- <path d="M31.5 13.5H4.5C2.84315 13.5 1.5 14.8431 1.5 16.5V19.5C1.5 21.1569 2.84315 22.5 4.5 22.5H31.5C33.1569 22.5 34.5 21.1569 34.5 19.5V16.5C34.5 14.8431 33.1569 13.5 31.5 13.5Z" />
4
- <path d="M31.5 25.5H4.5C2.84315 25.5 1.5 26.8431 1.5 28.5V31.5C1.5 33.1569 2.84315 34.5 4.5 34.5H31.5C33.1569 34.5 34.5 33.1569 34.5 31.5V28.5C34.5 26.8431 33.1569 25.5 31.5 25.5Z" />
5
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36"><path d="M8 26c0 1.105 1.194 2 2.667 2h10.666C22.806 28 24 27.105 24 26s-1.194-2-2.667-2H10.667C9.194 24 8 24.895 8 26z" stroke-width="2.309"/><path d="M10.5 20C9.12 20 8 19.105 8 18s1.12-2 2.5-2h15c1.38 0 2.5.895 2.5 2s-1.12 2-2.5 2zM8 10c0 1.105 1.12 2 2.5 2h15c1.38 0 2.5-.895 2.5-2s-1.12-2-2.5-2h-15C9.12 8 8 8.895 8 10z" stroke-width="2.236"/><path d="M7.333 0h21.334C31.612 0 34 2.418 34 5.4v25.2c0 2.982-2.388 5.4-5.333 5.4H7.333C4.388 36 2 33.582 2 30.6V5.4C2 2.418 4.388 0 7.333 0zm0 3.6c-.981 0-1.777.806-1.777 1.8v25.2c0 .994.796 1.8 1.777 1.8h21.334c.982 0 1.777-.806 1.777-1.8V5.4c0-.994-.795-1.8-1.777-1.8z" clip-rule="evenodd" stroke-width="1.789"/></svg>
@@ -1,4 +0,0 @@
1
- <svg width="14" height="14" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M0.719168 3.62469C0.374158 3.19343 0.44408 2.56414 0.875342 2.21913L3.37534 0.219131C3.74056 -0.0730438 4.25951 -0.0730437 4.62473 0.219131L7.12473 2.21913C7.55599 2.56414 7.62592 3.19343 7.28091 3.62469C6.9359 4.05596 6.3066 4.12588 5.87534 3.78087L4.00004 2.28062L2.12473 3.78087C1.69347 4.12588 1.06418 4.05596 0.719168 3.62469Z" fill="#212121" transform="matrix(2.571428571,0,0,2.571428571,7,0)"/>
3
- <path d="M0.719168 10.3753C1.06418 9.94404 1.69347 9.87412 2.12473 10.2191L4.00004 11.7194L5.87534 10.2191C6.3066 9.87412 6.9359 9.94404 7.28091 10.3753C7.62592 10.8066 7.55599 11.4359 7.12473 11.7809L4.62473 13.7809C4.25951 14.073 3.74056 14.073 3.37534 13.7809L0.875342 11.7809C0.44408 11.4359 0.374159 10.8066 0.719168 10.3753Z" fill="#212121" transform="matrix(2.571428571,0,0,2.571428571,7,0)"/>
4
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="36" height="36" xmlns="http://www.w3.org/2000/svg">
2
- <path fill="#9E9E9E" d="m11.94512,18c0,1.67205 -1.35543,3.02744 -3.02744,3.02744c-1.67201,0 -3.02744,-1.35538 -3.02744,-3.02744c0,-1.67205 1.35543,-3.02744 3.02744,-3.02744c1.67201,0 3.02744,1.35538 3.02744,3.02744zm6.05488,3.02744c1.67205,0 3.02744,-1.35538 3.02744,-3.02744c0,-1.67205 -1.35538,-3.02744 -3.02744,-3.02744c-1.67205,0 -3.02744,1.35538 -3.02744,3.02744c0,1.67205 1.35538,3.02744 3.02744,3.02744zm9.08231,0c1.67205,0 3.02744,-1.35538 3.02744,-3.02744c0,-1.67205 -1.35538,-3.02744 -3.02744,-3.02744c-1.67205,0 -3.02744,1.35538 -3.02744,3.02744c0,1.67205 1.35538,3.02744 3.02744,3.02744z" />
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12" stroke="white" stroke-width="2" stroke-linecap="round"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- import { Breadcrumb } from '.';
2
- declare const items: Breadcrumb[];
3
- export default items;
@@ -1,157 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const items = [
4
- {
5
- name: 'Root',
6
- url: '/root_path',
7
- },
8
- {
9
- name: 'First Level',
10
- url: '/first_level_path',
11
- siblings: {
12
- state: 'ready',
13
- data: [
14
- {
15
- name: 'First Level Previous Sibling',
16
- url: '/first_level_previous_sibling_path',
17
- },
18
- {
19
- name: 'First Level',
20
- url: '/first_level_path',
21
- isActive: true,
22
- },
23
- {
24
- name: 'First Level Next Sibling',
25
- url: '/first_level_next_sibling_path',
26
- },
27
- {
28
- name: 'First Level Next Sibling',
29
- url: '/first_level_next_sibling_path',
30
- },
31
- {
32
- name: 'First Level Next Sibling',
33
- url: '/first_level_next_sibling_path',
34
- },
35
- {
36
- name: 'First Level Next Sibling',
37
- url: '/first_level_next_sibling_path',
38
- },
39
- {
40
- name: 'First Level Next Sibling',
41
- url: '/first_level_next_sibling_path',
42
- },
43
- ],
44
- },
45
- },
46
- {
47
- name: 'Second Level very long title here',
48
- url: '/second_level_path',
49
- siblings: {
50
- state: 'ready',
51
- data: [
52
- {
53
- name: 'Second Level Previous Sibling',
54
- url: '/second_level_previous_sibling_path',
55
- },
56
- {
57
- name: 'Second Level',
58
- url: '/second_level_path',
59
- isActive: true,
60
- },
61
- ],
62
- },
63
- },
64
- {
65
- name: 'Third Level',
66
- url: '/third_level_path',
67
- siblings: {
68
- state: 'ready',
69
- data: [
70
- {
71
- name: 'Third Level',
72
- url: '/third_level_path',
73
- isActive: true,
74
- },
75
- {
76
- name: 'Third Level Next Sibling',
77
- url: '/third_level_next_sibling_path',
78
- },
79
- ],
80
- },
81
- },
82
- {
83
- name: 'Fourth Level',
84
- url: '/first_level_path',
85
- siblings: {
86
- state: 'fetching',
87
- data: [
88
- {
89
- name: 'Fourth Level Previous Sibling',
90
- url: '/fourth_level_previous_sibling_path',
91
- },
92
- {
93
- name: 'Fourth Level',
94
- url: '/fourth_level_path',
95
- isActive: true,
96
- },
97
- {
98
- name: 'Fourth Level Next Sibling',
99
- url: '/fourth_level_next_sibling_path',
100
- },
101
- {
102
- name: 'Fourth Level Next Sibling',
103
- url: '/fourth_level_next_sibling_path',
104
- },
105
- {
106
- name: 'Fourth Level Next Sibling',
107
- url: '/Fourth_level_next_sibling_path',
108
- },
109
- {
110
- name: 'Fourth Level Next Sibling',
111
- url: '/fourth_level_next_sibling_path',
112
- },
113
- {
114
- name: 'Fourth Level Next Sibling',
115
- url: '/fourth_level_next_sibling_path',
116
- },
117
- ],
118
- },
119
- },
120
- {
121
- name: 'Fifth Level',
122
- url: '/fifth_level_path',
123
- siblings: {
124
- state: 'ready',
125
- data: [
126
- {
127
- name: 'Fifth Level Previous Sibling',
128
- url: '/fifth_level_previous_sibling_path',
129
- },
130
- {
131
- name: 'Fifth Level',
132
- url: '/fifth_level_path',
133
- isActive: true,
134
- },
135
- ],
136
- },
137
- },
138
- {
139
- name: 'Sixth Level',
140
- url: '/sixth_level_path',
141
- siblings: {
142
- state: 'ready',
143
- data: [
144
- {
145
- name: 'Sixth Level',
146
- url: '/sixth_level_path',
147
- isActive: true,
148
- },
149
- {
150
- name: 'Sixth Level Next Sibling',
151
- url: '/sixth_level_next_sibling_path',
152
- },
153
- ],
154
- },
155
- },
156
- ];
157
- exports.default = items;
@@ -1,6 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <circle opacity="0.5" cx="24" cy="24" r="24" fill="#FFAB00" transform="matrix(0.75,0,0,0.75,0,0)"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19.6727 26.2601C20.0813 26.6316 20.1115 27.264 19.74 27.6727L15.8063 31.9997C16.1392 32.0862 16.525 32.1791 16.9595 32.2722C18.6534 32.6352 21.0824 33 24 33C26.9176 33 29.3466 32.6352 31.0405 32.2722C31.4751 32.1791 31.8609 32.0862 32.1937 31.9997L28.2601 27.6727C27.8886 27.264 27.9187 26.6316 28.3273 26.2601C28.736 25.8886 29.3684 25.9187 29.74 26.3273L34.74 31.8273C34.963 32.0727 35.0499 32.4126 34.972 32.7349C34.8942 33.0572 34.6616 33.3199 34.3511 33.4363L34 32.5C34.3511 33.4363 34.3514 33.4362 34.3511 33.4363L34.3486 33.4373L34.3446 33.4388L34.3322 33.4433L34.29 33.4586C34.2542 33.4714 34.2031 33.4893 34.1372 33.5116C34.0055 33.5562 33.8147 33.6184 33.5686 33.6922C33.0766 33.8398 32.363 34.0342 31.4595 34.2278C29.6534 34.6148 27.0824 35 24 35C20.9176 35 18.3466 34.6148 16.5405 34.2278C15.637 34.0342 14.9235 33.8398 14.4314 33.6922C14.1853 33.6184 13.9945 33.5562 13.8628 33.5116C13.797 33.4893 13.7459 33.4714 13.7101 33.4586L13.6679 33.4433L13.6554 33.4388L13.6514 33.4373L13.65 33.4367C13.6497 33.4366 13.6489 33.4363 14 32.5L13.6489 33.4363C13.3384 33.3199 13.1059 33.0572 13.028 32.7349C12.9501 32.4126 13.037 32.0727 13.2601 31.8273L18.2601 26.3273C18.6316 25.9187 19.264 25.8886 19.6727 26.2601Z" fill="white" transform="matrix(0.75,0,0,0.75,0,0)"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M23.3161 13.2705C23.7007 12.9098 24.2993 12.9098 24.6839 13.2705L32.684 20.7705C32.9668 21.0357 33.0709 21.4405 32.951 21.8092C32.8311 22.178 32.5088 22.4442 32.1241 22.4923L28.1241 22.9923C27.576 23.0608 27.0762 22.6721 27.0077 22.124C26.9392 21.576 27.328 21.0762 27.876 21.0077L29.7614 20.772L24 15.3707L18.2386 20.772L20.124 21.0077C20.6721 21.0762 21.0608 21.576 20.9923 22.124C20.9238 22.6721 20.424 23.0608 19.876 22.9923L15.876 22.4923C15.4912 22.4442 15.1689 22.178 15.049 21.8092C14.9291 21.4405 15.0332 21.0357 15.3161 20.7705L23.3161 13.2705Z" fill="white" transform="matrix(0.75,0,0,0.75,0,0)"/>
5
- <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7433 21.331C21.1128 21.7415 21.0795 22.3738 20.669 22.7433L17.2958 25.7792L19.1241 26.0077C19.6721 26.0762 20.0608 26.576 19.9923 27.124C19.9238 27.6721 19.424 28.0608 18.876 27.9923L14.876 27.4923C14.4876 27.4437 14.1632 27.173 14.0459 26.7996C13.9287 26.4261 14.0401 26.0186 14.3311 25.7567L19.3311 21.2567C19.7416 20.8872 20.3739 20.9205 20.7433 21.331ZM27.2567 21.331C27.6262 20.9205 28.2585 20.8872 28.669 21.2567L33.669 25.7567C33.9599 26.0186 34.0714 26.4261 33.9541 26.7996C33.8368 27.173 33.5125 27.4437 33.1241 27.4923L29.1241 27.9923C28.576 28.0608 28.0762 27.6721 28.0077 27.124C27.9392 26.576 28.328 26.0762 28.876 26.0077L30.7043 25.7792L27.331 22.7433C26.9205 22.3738 26.8873 21.7415 27.2567 21.331Z" fill="white" transform="matrix(0.75,0,0,0.75,0,0)"/>
6
- </svg>
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { ProductInfoProps } from '../../../common/components/product-info';
3
- export interface ProductSliderItemProps extends ProductInfoProps {
4
- /** Обработчик клика по товару. */
5
- onLinkClick?: React.MouseEventHandler<HTMLAnchorElement>;
6
- /** Сработает при клике на сердечко. */
7
- onFavoriteClick?: React.MouseEventHandler<SVGSVGElement>;
8
- /** Должна вернуть содержимое для футера. */
9
- footer?: React.ReactNode;
10
- /** Нужно ли отображать кнопку-сердечко как нажатую. */
11
- favorite?: boolean;
12
- }
13
- /**
14
- * Компонент элемента карусели рекомендаций.
15
- * @param props Свойства компонента.
16
- * @return Элемент.
17
- */
18
- export declare const ProductSliderItem: ({ data, favorite, footer, onFavoriteClick, ...restProps }: ProductSliderItemProps) => JSX.Element;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __rest = (this && this.__rest) || function (s, e) {
22
- var t = {};
23
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
- t[p] = s[p];
25
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
- t[p[i]] = s[p[i]];
29
- }
30
- return t;
31
- };
32
- var __importDefault = (this && this.__importDefault) || function (mod) {
33
- return (mod && mod.__esModule) ? mod : { "default": mod };
34
- };
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.ProductSliderItem = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const bind_1 = __importDefault(require("classnames/bind"));
39
- const wish_button_1 = require("../../../common/components/wish-button");
40
- const utils_1 = require("./utils");
41
- const product_info_1 = require("../../../common/components/product-info");
42
- const item_module_scss_1 = __importDefault(require("./item.module.scss"));
43
- const cx = bind_1.default.bind(item_module_scss_1.default);
44
- /**
45
- * Компонент элемента карусели рекомендаций.
46
- * @param props Свойства компонента.
47
- * @return Элемент.
48
- */
49
- const ProductSliderItem = (_a) => {
50
- var { data, favorite, footer, onFavoriteClick } = _a, restProps = __rest(_a, ["data", "favorite", "footer", "onFavoriteClick"]);
51
- const { needLoadImages } = (0, react_1.useContext)(utils_1.SliderContext);
52
- return (react_1.default.createElement("div", { className: cx('root') },
53
- react_1.default.createElement(product_info_1.ProductInfo, Object.assign({}, restProps, { data: Object.assign(Object.assign({}, data), { imageSrc: needLoadImages ? data.imageSrc : undefined }) }),
54
- react_1.default.createElement(product_info_1.ProductInfo.OnImage, null,
55
- react_1.default.createElement(wish_button_1.WishButton, { checked: favorite, onClick: onFavoriteClick, className: cx('favorite-button') }))),
56
- footer && react_1.default.createElement("div", { className: cx('footer') }, footer)));
57
- };
58
- exports.ProductSliderItem = ProductSliderItem;