@sima-land/moleculas 16.0.0-alpha.34 → 16.0.0-alpha.36
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/common/components/badge/badge.m.scss +1 -1
- package/common/components/hover-slider/hover-slider.m.scss +1 -1
- package/common/components/interactive-image/interactive-image-util.scss +1 -1
- package/common/components/interactive-image/interactive-image.m.scss +1 -1
- package/common/components/media-modal/layout.m.scss +2 -2
- package/common/components/media-modal/parts/parts.m.scss +2 -2
- package/common/components/media-modal/parts/review.m.scss +1 -1
- package/common/components/media-modal/parts/scroll-section.m.scss +2 -2
- package/common/components/media-modal/parts/thumbnail.m.scss +1 -1
- package/common/components/media-modal/parts/thumbnails.m.scss +1 -1
- package/common/components/pagination-controls/pagination-controls.m.scss +1 -1
- package/common/components/product-info/parts/image-button.m.scss +1 -1
- package/common/components/product-info/parts/parts.m.scss +1 -1
- package/common/components/product-info/parts/rating-counter.m.scss +1 -1
- package/common/components/product-info/parts/wait-list-added-link.m.scss +1 -1
- package/common/components/rating-counter/rating-counter.m.scss +1 -1
- package/desktop/components/gallery-modal/components/gallery-modal.d.ts +3 -1
- package/desktop/components/gallery-modal/components/gallery-modal.js +2 -2
- package/desktop/components/gallery-modal/components/gallery-modal.js.map +1 -1
- package/desktop/components/gallery-modal/components/gallery-modal.m.scss +1 -1
- package/desktop/components/product-carousel/product-carousel.m.scss +1 -1
- package/desktop/components/promotion-card/placeholder.m.scss +1 -1
- package/desktop/components/promotion-card/promotion-card.m.scss +3 -3
- package/mobile/components/action-circles/action-circles.m.scss +1 -1
- package/mobile/components/action-list/action-list.m.scss +1 -1
- package/mobile/components/product-slider/product-slider.m.scss +1 -1
- package/mobile/components/select-screen/select-screen.m.scss +1 -1
- package/package.json +36 -4
- /package/desktop/components/promotion-card/{variables.scss → _variables.scss} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use 'pkg:@sima-land/ui-nucleons/breakpoints';
|
|
2
|
-
@use 'pkg:@sima-land/ui-nucleons/utils';
|
|
1
|
+
@use 'pkg:@sima-land/ui-nucleons/breakpoints.scss';
|
|
2
|
+
@use 'pkg:@sima-land/ui-nucleons/utils.scss';
|
|
3
3
|
|
|
4
4
|
.header-layout {
|
|
5
5
|
min-height: 40px; // ВАЖНО: чтобы при отсутствии табов не уменьшалась высота
|
|
@@ -16,10 +16,12 @@ export interface GalleryModalProps {
|
|
|
16
16
|
onClose?: () => void;
|
|
17
17
|
/** Будет вызвана при событиях проигрывания видео. */
|
|
18
18
|
onVideoEvent?: (event: SyntheticEvent<HTMLVideoElement>) => void;
|
|
19
|
+
/** Нужно ли выключать прокрутку body. */
|
|
20
|
+
withScrollDisable?: boolean;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Полноэкранное модальное окно галереи фото/видео.
|
|
22
24
|
* @param props Свойства.
|
|
23
25
|
* @return Элемент.
|
|
24
26
|
*/
|
|
25
|
-
export declare const GalleryModal: ({ media, defaultMediaIndex, review, onClose, onGoToReview, onMediaChange, onVideoEvent, }: GalleryModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const GalleryModal: ({ media, defaultMediaIndex, review, withScrollDisable, onClose, onGoToReview, onMediaChange, onVideoEvent, }: GalleryModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,7 +25,7 @@ const cx = bind_1.default.bind(gallery_modal_m_scss_1.default);
|
|
|
25
25
|
* @param props Свойства.
|
|
26
26
|
* @return Элемент.
|
|
27
27
|
*/
|
|
28
|
-
const GalleryModal = ({ media, defaultMediaIndex = 0, review, onClose, onGoToReview, onMediaChange, onVideoEvent, }) => {
|
|
28
|
+
const GalleryModal = ({ media, defaultMediaIndex = 0, review, withScrollDisable = false, onClose, onGoToReview, onMediaChange, onVideoEvent, }) => {
|
|
29
29
|
const [currentIndex, setCurrent] = (0, react_1.useState)(defaultMediaIndex);
|
|
30
30
|
const rootRef = (0, react_1.useRef)(null);
|
|
31
31
|
const handlerRef = (0, hooks_1.useIdentityRef)(onMediaChange);
|
|
@@ -43,7 +43,7 @@ const GalleryModal = ({ media, defaultMediaIndex = 0, review, onClose, onGoToRev
|
|
|
43
43
|
'--all-round-view-size': `${size}px`,
|
|
44
44
|
}
|
|
45
45
|
: {};
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)(modal_1.Modal, { size: 'fullscreen', onClose: onClose, children: [(0, jsx_runtime_1.jsx)(top_bar_1.TopBar, { buttons: (0, top_bar_1.navigationButtons)({ onClose }) }), (0, jsx_runtime_1.jsxs)(modal_1.ModalBody, { style: { position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(layout_1.DesktopLayout, { className: cx('root'), ref: rootRef, style: style, children: (0, jsx_runtime_1.jsxs)("div", { className: cx('main'), children: [(0, jsx_runtime_1.jsx)("div", { className: cx('thumbnails'), ref: thumbnailsRef, children: media.map((item, index) => ((0, jsx_runtime_1.jsx)(thumbnail_1.Thumbnail, { className: cx('thumbnail'), type: item.type, checked: index === currentIndex, onClick: () => setCurrent(index), ...(item.type === 'image' && {
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(modal_1.Modal, { size: 'fullscreen', onClose: onClose, children: [(0, jsx_runtime_1.jsx)(top_bar_1.TopBar, { buttons: (0, top_bar_1.navigationButtons)({ onClose }) }), (0, jsx_runtime_1.jsxs)(modal_1.ModalBody, { withScrollDisable: withScrollDisable, style: { position: 'relative' }, children: [(0, jsx_runtime_1.jsx)(layout_1.DesktopLayout, { className: cx('root'), ref: rootRef, style: style, children: (0, jsx_runtime_1.jsxs)("div", { className: cx('main'), children: [(0, jsx_runtime_1.jsx)("div", { className: cx('thumbnails'), ref: thumbnailsRef, children: media.map((item, index) => ((0, jsx_runtime_1.jsx)(thumbnail_1.Thumbnail, { className: cx('thumbnail'), type: item.type, checked: index === currentIndex, onClick: () => setCurrent(index), ...(item.type === 'image' && {
|
|
47
47
|
src: item.data.thumbnailSrc,
|
|
48
48
|
alt: item.data.alt || '',
|
|
49
49
|
}) }, index))) }), (0, jsx_runtime_1.jsxs)("div", { className: cx('square'), children: [(0, jsx_runtime_1.jsx)(Media, { ...media[currentIndex], onVideoEvent: onVideoEvent }), media.length > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(arrow_button_1.ArrowButton, { direction: 'left', className: cx('button', 'left'), onClick: () => setCurrent((media.length + currentIndex - 1) % media.length), "data-testid": 'gallery-modal:prev-media-button' }), (0, jsx_runtime_1.jsx)(arrow_button_1.ArrowButton, { direction: 'right', className: cx('button', 'right'), onClick: () => setCurrent((currentIndex + 1) % media.length), "data-testid": 'gallery-modal:next-media-button' })] }))] })] }) }), size !== null && ((0, jsx_runtime_1.jsx)("div", { className: cx('footer'), style: style, children: review && (0, jsx_runtime_1.jsx)(review_info_1.ReviewInfo, { ...review, onGoToReview: onGoToReview }) }))] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery-modal.js","sourceRoot":"","sources":["../../../../../src/desktop/components/gallery-modal/components/gallery-modal.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAAmF;AAEnF,0DAA8D;AAC9D,4DAA+D;AAC/D,wDAAgE;AAChE,sEAAkE;AAClE,qDAAgD;AAChD,+CAA4D;AAC5D,mDAA+C;AAC/C,2CAAwC;AACxC,wDAA8D;AAC9D,oCAAwC;AACxC,2DAAyC;AACzC,kFAA4C;AAC5C,4DAA2E;
|
|
1
|
+
{"version":3,"file":"gallery-modal.js","sourceRoot":"","sources":["../../../../../src/desktop/components/gallery-modal/components/gallery-modal.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAAmF;AAEnF,0DAA8D;AAC9D,4DAA+D;AAC/D,wDAAgE;AAChE,sEAAkE;AAClE,qDAAgD;AAChD,+CAA4D;AAC5D,mDAA+C;AAC/C,2CAAwC;AACxC,wDAA8D;AAC9D,oCAAwC;AACxC,2DAAyC;AACzC,kFAA4C;AAC5C,4DAA2E;AA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K,KAAK,IAAI,uBAAC,6BAAY,IAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAI,IAChE,CACP,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'pkg:@sima-land/ui-nucleons/colors.scss';
|
|
2
|
-
@use 'pkg:@sima-land/ui-nucleons/breakpoints';
|
|
3
|
-
@use 'pkg:@sima-land/ui-nucleons/shadows';
|
|
4
|
-
@use './
|
|
2
|
+
@use 'pkg:@sima-land/ui-nucleons/breakpoints.scss';
|
|
3
|
+
@use 'pkg:@sima-land/ui-nucleons/shadows.scss';
|
|
4
|
+
@use './_variables';
|
|
5
5
|
|
|
6
6
|
.root {
|
|
7
7
|
background: #fff;
|
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.
|
|
4
|
+
"version": "16.0.0-alpha.36",
|
|
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",
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
"node": ">=16.15.1"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "npm run build:clean && npm run build:scripts && npm run build:assets && npm run build:package",
|
|
13
|
+
"build": "npm run build:sync-exports && npm run build:clean && npm run build:scripts && npm run build:assets && npm run build:package",
|
|
14
14
|
"build:clean": "rm -rf build",
|
|
15
15
|
"build:scripts": "tsc --project tsconfig.build.json",
|
|
16
|
-
"build:assets": "node scripts/
|
|
16
|
+
"build:assets": "node scripts/copy-assets.mjs",
|
|
17
17
|
"build:package": "cd build && npm pkg delete scripts.prepare && cd ..",
|
|
18
|
+
"build:sync-exports": "node scripts/emit-exports.mjs && npm pkg set --json exports=\"$(cat ./temp/exports.json)\" && rm -rf temp/exports.json",
|
|
18
19
|
"type-check": "tsc -p . --noEmit",
|
|
19
20
|
"lint": "npm run lint:scripts && npm run lint:styles",
|
|
20
21
|
"lint:scripts": "eslint src",
|
|
@@ -56,8 +57,39 @@
|
|
|
56
57
|
"typescript": "^5.3.3"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
|
-
"@sima-land/ui-nucleons": "^45.0.0-alpha.
|
|
60
|
+
"@sima-land/ui-nucleons": "^45.0.0-alpha.25",
|
|
60
61
|
"@sima-land/ui-quarks": "^5.1.1",
|
|
61
62
|
"react": "^17.0 || ^18.0"
|
|
63
|
+
},
|
|
64
|
+
"exports": {
|
|
65
|
+
"./common/components/badge-list": "./common/components/badge-list/index.js",
|
|
66
|
+
"./common/components/badge": "./common/components/badge/index.js",
|
|
67
|
+
"./common/components/breadcrumbs": "./common/components/breadcrumbs/index.js",
|
|
68
|
+
"./common/components/hover-slider": "./common/components/hover-slider/index.js",
|
|
69
|
+
"./common/components/img-stub": "./common/components/img-stub/index.js",
|
|
70
|
+
"./common/components/interactive-image": "./common/components/interactive-image/index.js",
|
|
71
|
+
"./common/components/interactive-image/interactive-image-util.scss": "./common/components/interactive-image/interactive-image-util.scss",
|
|
72
|
+
"./common/components/media-gallery": "./common/components/media-gallery/index.js",
|
|
73
|
+
"./common/components/media-modal": "./common/components/media-modal/index.js",
|
|
74
|
+
"./common/components/modifier": "./common/components/modifier/index.js",
|
|
75
|
+
"./common/components/pagination-controls": "./common/components/pagination-controls/index.js",
|
|
76
|
+
"./common/components/product-image": "./common/components/product-image/index.js",
|
|
77
|
+
"./common/components/product-info": "./common/components/product-info/index.js",
|
|
78
|
+
"./common/components/rating-counter": "./common/components/rating-counter/index.js",
|
|
79
|
+
"./common/components/rating-counter/rating-counter-util.scss": "./common/components/rating-counter/rating-counter-util.scss",
|
|
80
|
+
"./common/hooks": "./common/hooks/index.js",
|
|
81
|
+
"./desktop/components/breadcrumbs": "./desktop/components/breadcrumbs/index.js",
|
|
82
|
+
"./desktop/components/gallery-modal": "./desktop/components/gallery-modal/index.js",
|
|
83
|
+
"./desktop/components/person-info": "./desktop/components/person-info/index.js",
|
|
84
|
+
"./desktop/components/product-carousel": "./desktop/components/product-carousel/index.js",
|
|
85
|
+
"./desktop/components/promotion-card": "./desktop/components/promotion-card/index.js",
|
|
86
|
+
"./mobile/components/action-circles": "./mobile/components/action-circles/index.js",
|
|
87
|
+
"./mobile/components/action-list": "./mobile/components/action-list/index.js",
|
|
88
|
+
"./mobile/components/breadcrumbs": "./mobile/components/breadcrumbs/index.js",
|
|
89
|
+
"./mobile/components/person-info": "./mobile/components/person-info/index.js",
|
|
90
|
+
"./mobile/components/product-row": "./mobile/components/product-row/index.js",
|
|
91
|
+
"./mobile/components/product-slider": "./mobile/components/product-slider/index.js",
|
|
92
|
+
"./mobile/components/search-bar": "./mobile/components/search-bar/index.js",
|
|
93
|
+
"./mobile/components/select-screen": "./mobile/components/select-screen/index.js"
|
|
62
94
|
}
|
|
63
95
|
}
|
|
File without changes
|