@sima-land/moleculas 16.0.0-alpha.2 → 16.0.0-alpha.4
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/media-modal/__mocks__/index.d.ts +3 -0
- package/common/components/media-modal/__mocks__/index.js +225 -0
- package/common/components/media-modal/index.d.ts +11 -0
- package/common/components/media-modal/index.js +26 -0
- package/common/components/media-modal/layout.d.ts +36 -0
- package/common/components/media-modal/layout.js +106 -0
- package/common/components/media-modal/layout.module.scss +80 -0
- package/common/components/media-modal/parts/all-round-view.d.ts +8 -0
- package/common/components/media-modal/parts/all-round-view.js +78 -0
- package/common/components/media-modal/parts/all-round-view.module.scss +30 -0
- package/common/components/media-modal/parts/index.d.ts +36 -0
- package/common/components/media-modal/parts/index.js +60 -0
- package/common/components/media-modal/parts/media-content.d.ts +19 -0
- package/common/components/media-modal/parts/media-content.js +103 -0
- package/common/components/media-modal/parts/media-content.module.scss +42 -0
- package/common/components/media-modal/parts/media-view.d.ts +13 -0
- package/common/components/media-modal/parts/media-view.js +30 -0
- package/common/components/media-modal/parts/media-view.module.scss +30 -0
- package/common/components/media-modal/parts/parts.module.scss +21 -0
- package/common/components/media-modal/parts/product-brief.d.ts +18 -0
- package/common/components/media-modal/parts/product-brief.js +57 -0
- package/common/components/media-modal/parts/product-brief.module.scss +147 -0
- package/common/components/media-modal/parts/review.d.ts +15 -0
- package/common/components/media-modal/parts/review.js +44 -0
- package/common/components/media-modal/parts/review.module.scss +86 -0
- package/common/components/media-modal/parts/scroll-section.d.ts +11 -0
- package/common/components/media-modal/parts/scroll-section.js +22 -0
- package/common/components/media-modal/parts/scroll-section.module.scss +32 -0
- package/common/components/media-modal/parts/thumbnail.d.ts +22 -0
- package/common/components/media-modal/parts/thumbnail.js +65 -0
- package/common/components/media-modal/parts/thumbnail.module.scss +134 -0
- package/common/components/media-modal/parts/thumbnails.d.ts +13 -0
- package/common/components/media-modal/parts/thumbnails.js +94 -0
- package/common/components/media-modal/parts/thumbnails.module.scss +16 -0
- package/common/components/media-modal/types.d.ts +17 -0
- package/common/components/media-modal/types.js +2 -0
- package/common/components/media-modal/utils.d.ts +47 -0
- package/common/components/media-modal/utils.js +122 -0
- package/common/components/modifier/index.d.ts +3 -1
- package/common/components/modifier/index.js +3 -2
- package/common/components/modifier/modifiers.module.scss +31 -0
- package/common/components/product-info/parts.js +6 -2
- package/common/components/product-info/product-info.module.scss +9 -0
- package/common/icons/image-broken.svg +7 -0
- package/common/icons/touch-x.svg +6 -0
- package/desktop/components/gallery-modal/components/all-round-view.d.ts +5 -1
- package/desktop/components/gallery-modal/components/all-round-view.js +9 -6
- package/desktop/components/gallery-modal/components/image-overlay.js +1 -1
- package/desktop/components/gallery-modal/components/image-overlay.module.scss +1 -0
- package/package.json +6 -5
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.videos = exports.mixed = void 0;
|
|
4
|
+
exports.mixed = [
|
|
5
|
+
{
|
|
6
|
+
type: '360',
|
|
7
|
+
data: {
|
|
8
|
+
photos: [
|
|
9
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/0/700.jpg',
|
|
10
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/1/700.jpg',
|
|
11
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/2/700.jpg',
|
|
12
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/3/700.jpg',
|
|
13
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/4/700.jpg',
|
|
14
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/5/700.jpg',
|
|
15
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/6/700.jpg',
|
|
16
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/7/700.jpg',
|
|
17
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/8/700.jpg',
|
|
18
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/9/700.jpg',
|
|
19
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/10/700.jpg',
|
|
20
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/11/700.jpg',
|
|
21
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/12/700.jpg',
|
|
22
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/13/700.jpg',
|
|
23
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/14/700.jpg',
|
|
24
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/15/700.jpg',
|
|
25
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/16/700.jpg',
|
|
26
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/17/700.jpg',
|
|
27
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/18/700.jpg',
|
|
28
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/19/700.jpg',
|
|
29
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/20/700.jpg',
|
|
30
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/21/700.jpg',
|
|
31
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/22/700.jpg',
|
|
32
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/23/700.jpg',
|
|
33
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/24/700.jpg',
|
|
34
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/25/700.jpg',
|
|
35
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/26/700.jpg',
|
|
36
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/27/700.jpg',
|
|
37
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/28/700.jpg',
|
|
38
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/29/700.jpg',
|
|
39
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/30/700.jpg',
|
|
40
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/31/700.jpg',
|
|
41
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/32/700.jpg',
|
|
42
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/33/700.jpg',
|
|
43
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/34/700.jpg',
|
|
44
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/35/700.jpg',
|
|
45
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/36/700.jpg',
|
|
46
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/37/700.jpg',
|
|
47
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/38/700.jpg',
|
|
48
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/39/700.jpg',
|
|
49
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/40/700.jpg',
|
|
50
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/41/700.jpg',
|
|
51
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/42/700.jpg',
|
|
52
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/43/700.jpg',
|
|
53
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/44/700.jpg',
|
|
54
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/45/700.jpg',
|
|
55
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/46/700.jpg',
|
|
56
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/47/700.jpg',
|
|
57
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/48/700.jpg',
|
|
58
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/49/700.jpg',
|
|
59
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/50/700.jpg',
|
|
60
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/51/700.jpg',
|
|
61
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/52/700.jpg',
|
|
62
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/53/700.jpg',
|
|
63
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/54/700.jpg',
|
|
64
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/55/700.jpg',
|
|
65
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/56/700.jpg',
|
|
66
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/57/700.jpg',
|
|
67
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/58/700.jpg',
|
|
68
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/59/700.jpg',
|
|
69
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/60/700.jpg',
|
|
70
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/61/700.jpg',
|
|
71
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/62/700.jpg',
|
|
72
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/63/700.jpg',
|
|
73
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/64/700.jpg',
|
|
74
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/65/700.jpg',
|
|
75
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/66/700.jpg',
|
|
76
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/67/700.jpg',
|
|
77
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/68/700.jpg',
|
|
78
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/69/700.jpg',
|
|
79
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/70/700.jpg',
|
|
80
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/71/700.jpg',
|
|
81
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/72/700.jpg',
|
|
82
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/73/700.jpg',
|
|
83
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/74/700.jpg',
|
|
84
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/75/700.jpg',
|
|
85
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/76/700.jpg',
|
|
86
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/77/700.jpg',
|
|
87
|
+
'https://cdn2.static1-sima-land.com/3d/3243668/78/700.jpg',
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'video',
|
|
93
|
+
data: {
|
|
94
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: 'image',
|
|
99
|
+
data: {
|
|
100
|
+
alt: 'Сапоги детские MINAKU, цвет синий, размер 31 - Фото 1',
|
|
101
|
+
src: 'https://loremflickr.com/240/240?random=1',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'image',
|
|
106
|
+
data: {
|
|
107
|
+
alt: 'Фото из отзыва, не квадратное',
|
|
108
|
+
src: 'https://loremflickr.com/240/240?random=2',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'image',
|
|
113
|
+
data: {
|
|
114
|
+
alt: 'Сапоги детские MINAKU, цвет синий, размер 31 - Фото 2',
|
|
115
|
+
src: 'https://loremflickr.com/240/240?random=3',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'image',
|
|
120
|
+
data: {
|
|
121
|
+
alt: 'Сапоги детские MINAKU, цвет синий, размер 31 - Фото 3',
|
|
122
|
+
src: 'https://loremflickr.com/240/240?random=4',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'image',
|
|
127
|
+
data: {
|
|
128
|
+
alt: 'Сапоги детские MINAKU, цвет синий, размер 31 - Фото 4',
|
|
129
|
+
src: 'https://loremflickr.com/240/240?random=5',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'image',
|
|
134
|
+
data: {
|
|
135
|
+
alt: 'Сапоги детские MINAKU, цвет синий, размер 31 - Фото 5',
|
|
136
|
+
src: 'https://loremflickr.com/240/240?random=6',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
exports.videos = [
|
|
141
|
+
{
|
|
142
|
+
type: 'video',
|
|
143
|
+
data: {
|
|
144
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
145
|
+
thumbnail: 'https://loremflickr.com/240/240?random=6',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'video',
|
|
150
|
+
data: {
|
|
151
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
152
|
+
thumbnail: 'https://loremflickr.com/240/240?random=7',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: 'video',
|
|
157
|
+
data: {
|
|
158
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
159
|
+
thumbnail: 'https://loremflickr.com/240/240?random=8',
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
type: 'video',
|
|
164
|
+
data: {
|
|
165
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
166
|
+
thumbnail: 'https://loremflickr.com/240/240?random=9',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: 'video',
|
|
171
|
+
data: {
|
|
172
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
173
|
+
thumbnail: 'https://loremflickr.com/240/240?random=10',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: 'video',
|
|
178
|
+
data: {
|
|
179
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
180
|
+
thumbnail: 'https://loremflickr.com/240/240?random=11',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: 'video',
|
|
185
|
+
data: {
|
|
186
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
187
|
+
thumbnail: 'https://loremflickr.com/240/240?random=12',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
type: 'video',
|
|
192
|
+
data: {
|
|
193
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
194
|
+
thumbnail: 'https://loremflickr.com/240/240?random=13',
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: 'video',
|
|
199
|
+
data: {
|
|
200
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
201
|
+
thumbnail: 'https://loremflickr.com/240/240?random=14',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: 'video',
|
|
206
|
+
data: {
|
|
207
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
208
|
+
thumbnail: 'https://loremflickr.com/240/240?random=15',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
type: 'video',
|
|
213
|
+
data: {
|
|
214
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
215
|
+
thumbnail: 'https://loremflickr.com/240/240?random=16',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
type: 'video',
|
|
220
|
+
data: {
|
|
221
|
+
src: 'https://cdn2.static1-sima-land.com/flv/3404953.mp4',
|
|
222
|
+
thumbnail: 'https://loremflickr.com/240/240?random=17',
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MediaLayout, MediaHeader, MediaMain, MediaAside, MediaFooter } from './layout';
|
|
2
|
+
import { Preset, HeaderLayout } from './parts';
|
|
3
|
+
import { ScrollSection } from './parts/scroll-section';
|
|
4
|
+
import { Thumbnail, ThumbnailProps } from './parts/thumbnail';
|
|
5
|
+
import { Thumbnails, ThumbnailsProps } from './parts/thumbnails';
|
|
6
|
+
import { MediaContentProps, MediaContent } from './parts/media-content';
|
|
7
|
+
import { MediaViewProps, MediaView } from './parts/media-view';
|
|
8
|
+
import { ReviewProps, Review } from './parts/review';
|
|
9
|
+
import { ProductBriefProps, ProductBrief } from './parts/product-brief';
|
|
10
|
+
export type { MediaContentProps, MediaViewProps, ThumbnailProps, ThumbnailsProps, ReviewProps, ProductBriefProps, };
|
|
11
|
+
export { MediaLayout, MediaHeader, MediaMain, MediaAside, MediaFooter, MediaContent, MediaView, HeaderLayout, Thumbnails, Thumbnail, Review, ProductBrief, Preset, ScrollSection, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScrollSection = exports.Preset = exports.ProductBrief = exports.Review = exports.Thumbnail = exports.Thumbnails = exports.HeaderLayout = exports.MediaView = exports.MediaContent = exports.MediaFooter = exports.MediaAside = exports.MediaMain = exports.MediaHeader = exports.MediaLayout = void 0;
|
|
4
|
+
const layout_1 = require("./layout");
|
|
5
|
+
Object.defineProperty(exports, "MediaLayout", { enumerable: true, get: function () { return layout_1.MediaLayout; } });
|
|
6
|
+
Object.defineProperty(exports, "MediaHeader", { enumerable: true, get: function () { return layout_1.MediaHeader; } });
|
|
7
|
+
Object.defineProperty(exports, "MediaMain", { enumerable: true, get: function () { return layout_1.MediaMain; } });
|
|
8
|
+
Object.defineProperty(exports, "MediaAside", { enumerable: true, get: function () { return layout_1.MediaAside; } });
|
|
9
|
+
Object.defineProperty(exports, "MediaFooter", { enumerable: true, get: function () { return layout_1.MediaFooter; } });
|
|
10
|
+
const parts_1 = require("./parts");
|
|
11
|
+
Object.defineProperty(exports, "Preset", { enumerable: true, get: function () { return parts_1.Preset; } });
|
|
12
|
+
Object.defineProperty(exports, "HeaderLayout", { enumerable: true, get: function () { return parts_1.HeaderLayout; } });
|
|
13
|
+
const scroll_section_1 = require("./parts/scroll-section");
|
|
14
|
+
Object.defineProperty(exports, "ScrollSection", { enumerable: true, get: function () { return scroll_section_1.ScrollSection; } });
|
|
15
|
+
const thumbnail_1 = require("./parts/thumbnail");
|
|
16
|
+
Object.defineProperty(exports, "Thumbnail", { enumerable: true, get: function () { return thumbnail_1.Thumbnail; } });
|
|
17
|
+
const thumbnails_1 = require("./parts/thumbnails");
|
|
18
|
+
Object.defineProperty(exports, "Thumbnails", { enumerable: true, get: function () { return thumbnails_1.Thumbnails; } });
|
|
19
|
+
const media_content_1 = require("./parts/media-content");
|
|
20
|
+
Object.defineProperty(exports, "MediaContent", { enumerable: true, get: function () { return media_content_1.MediaContent; } });
|
|
21
|
+
const media_view_1 = require("./parts/media-view");
|
|
22
|
+
Object.defineProperty(exports, "MediaView", { enumerable: true, get: function () { return media_view_1.MediaView; } });
|
|
23
|
+
const review_1 = require("./parts/review");
|
|
24
|
+
Object.defineProperty(exports, "Review", { enumerable: true, get: function () { return review_1.Review; } });
|
|
25
|
+
const product_brief_1 = require("./parts/product-brief");
|
|
26
|
+
Object.defineProperty(exports, "ProductBrief", { enumerable: true, get: function () { return product_brief_1.ProductBrief; } });
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ContainerProps {
|
|
3
|
+
/** Содержимое. */
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Формирует layout для модального окна медиа товара.
|
|
8
|
+
* @param props Свойства.
|
|
9
|
+
* @return Элемент.
|
|
10
|
+
*/
|
|
11
|
+
export declare function MediaLayout({ children }: ContainerProps): JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Слот шапки MediaLayout.
|
|
14
|
+
* @param props Свойства.
|
|
15
|
+
* @return Элемент.
|
|
16
|
+
*/
|
|
17
|
+
export declare function MediaHeader({ children }: ContainerProps): JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Слот основного контента MediaLayout.
|
|
20
|
+
* @param props Свойства.
|
|
21
|
+
* @return Элемент.
|
|
22
|
+
*/
|
|
23
|
+
export declare function MediaMain({ children }: ContainerProps): JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Слот дополнительного контента MediaLayout.
|
|
26
|
+
* @param props Свойства.
|
|
27
|
+
* @return Элемент.
|
|
28
|
+
*/
|
|
29
|
+
export declare function MediaAside({ children }: ContainerProps): JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Слот футера MediaLayout.
|
|
32
|
+
* @param props Свойства.
|
|
33
|
+
* @return Элемент.
|
|
34
|
+
*/
|
|
35
|
+
export declare function MediaFooter({ children }: ContainerProps): JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.MediaFooter = exports.MediaAside = exports.MediaMain = exports.MediaHeader = exports.MediaLayout = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const define_slots_1 = require("@sima-land/ui-nucleons/helpers/define-slots");
|
|
32
|
+
const layout_1 = require("@sima-land/ui-nucleons/layout");
|
|
33
|
+
const utils_1 = require("./utils");
|
|
34
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
35
|
+
const layout_module_scss_1 = __importDefault(require("./layout.module.scss"));
|
|
36
|
+
const cx = bind_1.default.bind(layout_module_scss_1.default);
|
|
37
|
+
/**
|
|
38
|
+
* Формирует layout для модального окна медиа товара.
|
|
39
|
+
* @param props Свойства.
|
|
40
|
+
* @return Элемент.
|
|
41
|
+
*/
|
|
42
|
+
function MediaLayout({ children }) {
|
|
43
|
+
var _a;
|
|
44
|
+
const mobile = ['mxs', 'ms', 'mm', 'ml'];
|
|
45
|
+
const { header, main, aside, footer } = (0, define_slots_1.defineSlots)(children, {
|
|
46
|
+
header: MediaHeader,
|
|
47
|
+
main: MediaMain,
|
|
48
|
+
aside: MediaAside,
|
|
49
|
+
footer: MediaFooter,
|
|
50
|
+
});
|
|
51
|
+
const [vh, setVh] = (0, react_1.useState)(null);
|
|
52
|
+
const mainRef = (0, react_1.useRef)(null);
|
|
53
|
+
const mainRect = (0, utils_1.useClientRect)(mainRef);
|
|
54
|
+
(0, utils_1.useVisualViewport)(viewport => {
|
|
55
|
+
setVh(viewport.height / 100);
|
|
56
|
+
});
|
|
57
|
+
const mainStyle = {
|
|
58
|
+
'--vh': (_a = `${vh}px`) !== null && _a !== void 0 ? _a : '1vh',
|
|
59
|
+
'--media-width': `${mainRect.width}px`,
|
|
60
|
+
'--media-height': `${mainRect.height}px`,
|
|
61
|
+
};
|
|
62
|
+
return (react_1.default.createElement("div", { className: layout_module_scss_1.default.layout },
|
|
63
|
+
header && (react_1.default.createElement(layout_1.Layout, { disabledOn: mobile, className: layout_module_scss_1.default.header }, header)),
|
|
64
|
+
react_1.default.createElement(layout_1.Layout, { disabledOn: mobile, className: layout_module_scss_1.default.body },
|
|
65
|
+
aside && react_1.default.createElement("div", { className: layout_module_scss_1.default.aside }, aside),
|
|
66
|
+
react_1.default.createElement("div", { ref: mainRef, className: layout_module_scss_1.default.main, style: mainStyle }, main)),
|
|
67
|
+
footer && (react_1.default.createElement(layout_1.Layout, { disabledOn: mobile, className: layout_module_scss_1.default.footer },
|
|
68
|
+
react_1.default.createElement("div", { className: cx('footer-inner', aside && 'with-aside') }, footer)))));
|
|
69
|
+
}
|
|
70
|
+
exports.MediaLayout = MediaLayout;
|
|
71
|
+
/**
|
|
72
|
+
* Слот шапки MediaLayout.
|
|
73
|
+
* @param props Свойства.
|
|
74
|
+
* @return Элемент.
|
|
75
|
+
*/
|
|
76
|
+
function MediaHeader({ children }) {
|
|
77
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
78
|
+
}
|
|
79
|
+
exports.MediaHeader = MediaHeader;
|
|
80
|
+
/**
|
|
81
|
+
* Слот основного контента MediaLayout.
|
|
82
|
+
* @param props Свойства.
|
|
83
|
+
* @return Элемент.
|
|
84
|
+
*/
|
|
85
|
+
function MediaMain({ children }) {
|
|
86
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
87
|
+
}
|
|
88
|
+
exports.MediaMain = MediaMain;
|
|
89
|
+
/**
|
|
90
|
+
* Слот дополнительного контента MediaLayout.
|
|
91
|
+
* @param props Свойства.
|
|
92
|
+
* @return Элемент.
|
|
93
|
+
*/
|
|
94
|
+
function MediaAside({ children }) {
|
|
95
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
96
|
+
}
|
|
97
|
+
exports.MediaAside = MediaAside;
|
|
98
|
+
/**
|
|
99
|
+
* Слот футера MediaLayout.
|
|
100
|
+
* @param props Свойства.
|
|
101
|
+
* @return Элемент.
|
|
102
|
+
*/
|
|
103
|
+
function MediaFooter({ children }) {
|
|
104
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
105
|
+
}
|
|
106
|
+
exports.MediaFooter = MediaFooter;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/breakpoints';
|
|
2
|
+
@use 'node_modules/@sima-land/ui-nucleons/utils';
|
|
3
|
+
|
|
4
|
+
.layout {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
min-height: calc((100 * var(--vh, 1vh)) - var(--modal-header-height));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.body {
|
|
11
|
+
flex-grow: 1;
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.main {
|
|
16
|
+
--media-width: var(--square-size);
|
|
17
|
+
--media-height: var(--square-size);
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
flex-grow: 1;
|
|
22
|
+
position: relative; // ВАЖНО: что иметь возможность заполнить доступную область содержимым
|
|
23
|
+
min-height: max(50vh, 240px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include breakpoints.down('xs') {
|
|
27
|
+
.header + .body {
|
|
28
|
+
margin-top: 24px;
|
|
29
|
+
}
|
|
30
|
+
.body {
|
|
31
|
+
flex-direction: column-reverse;
|
|
32
|
+
&:first-child {
|
|
33
|
+
margin-top: 24px;
|
|
34
|
+
}
|
|
35
|
+
&:last-child {
|
|
36
|
+
margin-bottom: 24px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.aside + .main {
|
|
40
|
+
margin-bottom: 24px;
|
|
41
|
+
}
|
|
42
|
+
.body + .footer {
|
|
43
|
+
margin-top: 24px;
|
|
44
|
+
}
|
|
45
|
+
.footer {
|
|
46
|
+
margin-bottom: 24px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@include breakpoints.up('xs') {
|
|
51
|
+
.header + .body {
|
|
52
|
+
margin-top: 40px;
|
|
53
|
+
}
|
|
54
|
+
.body {
|
|
55
|
+
&:first-child {
|
|
56
|
+
margin-top: 40px;
|
|
57
|
+
}
|
|
58
|
+
&:last-child {
|
|
59
|
+
margin-bottom: 40px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.aside {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
width: 104px;
|
|
66
|
+
max-height: 100%;
|
|
67
|
+
}
|
|
68
|
+
.aside + .main {
|
|
69
|
+
margin-left: 16px;
|
|
70
|
+
}
|
|
71
|
+
.body + .footer {
|
|
72
|
+
margin-top: 32px;
|
|
73
|
+
}
|
|
74
|
+
.footer {
|
|
75
|
+
margin-bottom: 40px;
|
|
76
|
+
}
|
|
77
|
+
.footer-inner.with-aside {
|
|
78
|
+
margin-left: calc(104px + 16px);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AllRoundViewProps } from '../../../../desktop/components/gallery-modal/components/all-round-view';
|
|
3
|
+
/**
|
|
4
|
+
* Просмотр 360.
|
|
5
|
+
* @param props Свойства.
|
|
6
|
+
* @return Элемент.
|
|
7
|
+
*/
|
|
8
|
+
export declare function AllRoundView(props: AllRoundViewProps): JSX.Element | null;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
+
var t = {};
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
+
t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
+
t[p[i]] = s[p[i]];
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.AllRoundView = void 0;
|
|
41
|
+
const react_1 = __importStar(require("react"));
|
|
42
|
+
const breakpoint_1 = require("@sima-land/ui-nucleons/hooks/breakpoint");
|
|
43
|
+
const all_round_view_1 = require("../../../../desktop/components/gallery-modal/components/all-round-view");
|
|
44
|
+
const utils_1 = require("../utils");
|
|
45
|
+
const touch_x_svg_1 = __importDefault(require("../../../icons/touch-x.svg"));
|
|
46
|
+
const all_round_view_module_scss_1 = __importDefault(require("./all-round-view.module.scss"));
|
|
47
|
+
/**
|
|
48
|
+
* Просмотр 360.
|
|
49
|
+
* @param props Свойства.
|
|
50
|
+
* @return Элемент.
|
|
51
|
+
*/
|
|
52
|
+
function AllRoundView(props) {
|
|
53
|
+
const mounted = (0, utils_1.useMounted)();
|
|
54
|
+
const desktop = (0, breakpoint_1.useBreakpoint)('xs+');
|
|
55
|
+
if (!mounted) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return react_1.default.createElement(AfterMount, Object.assign({ desktop: desktop }, props));
|
|
59
|
+
}
|
|
60
|
+
exports.AllRoundView = AllRoundView;
|
|
61
|
+
/**
|
|
62
|
+
* Внутренний компонент который будет выведен только после монтирования.
|
|
63
|
+
* @param props Свойства.
|
|
64
|
+
* @return Элемент.
|
|
65
|
+
*/
|
|
66
|
+
function AfterMount(_a) {
|
|
67
|
+
var { desktop } = _a, props = __rest(_a, ["desktop"]);
|
|
68
|
+
const [state, setState] = (0, react_1.useState)(() => (desktop ? 'autoplay' : 'default'));
|
|
69
|
+
const [tutorial, setTutorial] = (0, react_1.useState)(() => !desktop);
|
|
70
|
+
const acceptTutorial = (0, react_1.useCallback)(() => {
|
|
71
|
+
setTutorial(false);
|
|
72
|
+
setState('autoplay');
|
|
73
|
+
}, []);
|
|
74
|
+
return (react_1.default.createElement("div", { className: all_round_view_module_scss_1.default.root },
|
|
75
|
+
!desktop && tutorial && (react_1.default.createElement("div", { className: all_round_view_module_scss_1.default.tutorial, onPointerUp: acceptTutorial },
|
|
76
|
+
react_1.default.createElement(touch_x_svg_1.default, null))),
|
|
77
|
+
react_1.default.createElement(all_round_view_1.AllRoundView, Object.assign({}, props, { controls: desktop, state: state, onStateChange: setState }))));
|
|
78
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
width: var(--all-round-view-size, 360px);
|
|
3
|
+
height: var(--all-round-view-size, 360px);
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tutorial {
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
z-index: 2;
|
|
15
|
+
> svg {
|
|
16
|
+
animation: 2s ease-in-out infinite bounce;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@keyframes bounce {
|
|
21
|
+
0% {
|
|
22
|
+
transform: translateX(-24px);
|
|
23
|
+
}
|
|
24
|
+
50% {
|
|
25
|
+
transform: translateX(24px);
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
transform: translateX(-24px);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TabsProps } from '@sima-land/ui-nucleons/tabs';
|
|
3
|
+
import { TextButtonProps } from '@sima-land/ui-nucleons/text-button';
|
|
4
|
+
export declare const Preset: {
|
|
5
|
+
readonly headerTabs: (userProps?: TabsProps) => TabsProps;
|
|
6
|
+
readonly headerButton: (userProps?: TextButtonProps) => TextButtonProps;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Формирует layout для шапки модального окна медиа.
|
|
10
|
+
* @param props Свойства.
|
|
11
|
+
* @return Элемент.
|
|
12
|
+
*/
|
|
13
|
+
export declare function HeaderLayout({ children }: {
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
export declare namespace HeaderLayout {
|
|
17
|
+
var Tabs: typeof HeaderLayoutTabs;
|
|
18
|
+
var Button: typeof HeaderLayoutButton;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Слот вкладок для layout'а шапки модального окна медиа.
|
|
22
|
+
* @param props Свойства.
|
|
23
|
+
* @return Элемент.
|
|
24
|
+
*/
|
|
25
|
+
declare function HeaderLayoutTabs({ children }: {
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}): JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* Слот кнопки для layout'а шапки модального окна медиа.
|
|
30
|
+
* @param props Свойства.
|
|
31
|
+
* @return Элемент.
|
|
32
|
+
*/
|
|
33
|
+
declare function HeaderLayoutButton({ children }: {
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
}): JSX.Element;
|
|
36
|
+
export {};
|