@riosst100/pwa-marketplace 1.6.9 → 1.7.1
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/package.json +1 -1
- package/src/componentOverrideMapping.js +4 -0
- package/src/components/CollectibleGameSets/collectibleGameSets.js +0 -4
- package/src/components/FilterTop/filterTop.js +0 -2
- package/src/components/FilterTopBackup/CustomFilters/customFilters.js +0 -1
- package/src/components/ProductLabel/index.js +47 -0
- package/src/components/ProductListTab/productListTab.js +51 -5
- package/src/components/ProductListTab/productListTab.module.css +1 -1
- package/src/components/RelatedProduct/relatedProduct.js +1 -1
- package/src/components/ShopBy/shopBy copy.js +172 -0
- package/src/components/ShopBy/shopBy.js +0 -1
- package/src/components/ShopBySets/shopBySets.js +0 -3
- package/src/components/SportCardsSets/index.js +2 -0
- package/src/components/SportCardsSets/sportCardsSets.js +372 -0
- package/src/components/SportCardsSets/sportCardsSets.module.css +76 -0
- package/src/components/SportCardsSets/sportCardsSets.shimmer.js +50 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/__fixtures__/apolloMocks.js +33 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/carousel.gql.ce.js +16 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/carousel.gql.ee.js +17 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/carousel.js +38 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/index.js +1 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/useCarousel.js +25 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/configAggregator.js +26 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/index.js +1 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/products.js +369 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/products.module.css +0 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/banner.module.css +103 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/configAggregator.js +17 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/index.js +2 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/slider.js +221 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/slider.module.css +231 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/slider.shimmer.js +126 -0
- package/src/overwrites/pagebuilder/lib/ContentTypes/Slider/slider.shimmer.module.css +5 -0
- package/src/overwrites/pagebuilder/lib/utils.js +224 -0
- package/src/overwrites/peregrine/lib/talons/FilterSidebar/useFilterSidebar.js +60 -0
- package/src/overwrites/peregrine/lib/talons/ProductFullDetail/useProductFullDetail.js +4 -1
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryFragments.gql.js +8 -0
- package/src/overwrites/peregrine/lib/talons/RootComponents/Product/productDetailFragment.gql.js +44 -0
- package/src/overwrites/venia-ui/lib/RootComponents/CMS/cms.js +73 -0
- package/src/overwrites/venia-ui/lib/RootComponents/CMS/cms.module.css +25 -0
- package/src/overwrites/venia-ui/lib/RootComponents/CMS/cms.shimmer.js +18 -0
- package/src/overwrites/venia-ui/lib/RootComponents/CMS/index.js +7 -0
- package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +12 -1
- package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +3 -3
- package/src/overwrites/venia-ui/lib/components/App/app.js +131 -0
- package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.module.css +1 -0
- package/src/overwrites/venia-ui/lib/components/FilterModal/CurrentFilters/currentFilters.js +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.js +4 -1
- package/src/overwrites/venia-ui/lib/components/Gallery/item.js +13 -3
- package/src/overwrites/venia-ui/lib/components/Gallery/item.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/auctionDetail.js +176 -138
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/preOrderDetail.js +19 -10
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +5 -26
- package/src/overwrites/venia-ui/lib/components/RichContent/richContent.module.css +3 -3
- package/src/overwrites/venia-ui/lib/components/SearchBar/searchBar.js +0 -1
- package/src/overwrites/venia-ui/lib/index.module.css +137 -0
- package/src/overwrites/venia-ui/lib/tokens.module.css +167 -0
- package/src/talons/CollectibleGameSets/collectibleGameSets.gql.js +15 -1
- package/src/talons/CollectibleGameSets/useCollectibleGameSets.js +0 -11
- package/src/talons/FilterTop/useFilterTop.js +0 -2
- package/src/talons/ShopBy/useShopBy.js +0 -22
- package/src/talons/SportCardsSets/sportCardsSets.gql.js +46 -0
- package/src/talons/SportCardsSets/useSportCardsSets.js +170 -0
- package/src/talons/SubCategoryPage/useSubCategoryPage.js +0 -3
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { gql, useQuery } from '@apollo/client';
|
|
3
|
+
import { arrayOf, bool, number, oneOf, shape, string } from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
+
import Gallery from '@magento/venia-ui/lib/components/Gallery';
|
|
7
|
+
import Carousel from './Carousel/carousel';
|
|
8
|
+
import defaultClasses from './products.module.css';
|
|
9
|
+
import { ArrowLeft2, ArrowRight2 } from 'iconsax-react';
|
|
10
|
+
import cn from 'classnames';
|
|
11
|
+
import { primary900 } from '@riosst100/pwa-marketplace/src/theme/vars';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Sort products based on the original order
|
|
15
|
+
*
|
|
16
|
+
* @param {Array} urlKeys
|
|
17
|
+
* @param {Array} products
|
|
18
|
+
* @returns {Array}
|
|
19
|
+
*/
|
|
20
|
+
const restoreSortOrder = (urlKeys, products) => {
|
|
21
|
+
const productsByOriginalOrder = new Map();
|
|
22
|
+
products.forEach(product => {
|
|
23
|
+
productsByOriginalOrder.set(product.url_key, product);
|
|
24
|
+
});
|
|
25
|
+
return urlKeys
|
|
26
|
+
.map(urlKey => productsByOriginalOrder.get(urlKey))
|
|
27
|
+
.filter(Boolean);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// Custom Arrow
|
|
31
|
+
const CustomArrow = (props) => {
|
|
32
|
+
const { isNext = true, onClick, className } = props;
|
|
33
|
+
return (
|
|
34
|
+
<span
|
|
35
|
+
className={cn(
|
|
36
|
+
className,
|
|
37
|
+
'custom_arrow rounded-full w-10 h-10 p-2.5 bg-white hover_!bg-white z-[1] !border !border-solid !border-gray-100 before_hidden',
|
|
38
|
+
isNext ? 'right-2 lg_right-4' : 'left-2 lg_left-4',
|
|
39
|
+
)}
|
|
40
|
+
onClick={onClick}
|
|
41
|
+
>
|
|
42
|
+
{isNext ? (
|
|
43
|
+
<ArrowRight2 className='' size="20" color={primary900} />
|
|
44
|
+
) : (
|
|
45
|
+
<ArrowLeft2 size="20" color={primary900} />
|
|
46
|
+
)}
|
|
47
|
+
</span>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Page Builder Products component.
|
|
53
|
+
*
|
|
54
|
+
* This component is part of the Page Builder / PWA integration. It can be consumed without Page Builder.
|
|
55
|
+
*
|
|
56
|
+
* @typedef Products
|
|
57
|
+
* @kind functional component
|
|
58
|
+
*
|
|
59
|
+
* @param {props} props React component props
|
|
60
|
+
*
|
|
61
|
+
* @returns {React.Element} A React component that displays a Products based on a number of products
|
|
62
|
+
*/
|
|
63
|
+
const Products = props => {
|
|
64
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
65
|
+
const {
|
|
66
|
+
appearance,
|
|
67
|
+
autoplay,
|
|
68
|
+
autoplaySpeed,
|
|
69
|
+
infinite,
|
|
70
|
+
arrows,
|
|
71
|
+
dots,
|
|
72
|
+
draggable = false,
|
|
73
|
+
carouselMode,
|
|
74
|
+
centerPadding,
|
|
75
|
+
pathNames = [],
|
|
76
|
+
textAlign,
|
|
77
|
+
border,
|
|
78
|
+
borderColor,
|
|
79
|
+
borderWidth,
|
|
80
|
+
borderRadius,
|
|
81
|
+
marginTop,
|
|
82
|
+
marginRight,
|
|
83
|
+
marginBottom,
|
|
84
|
+
marginLeft,
|
|
85
|
+
paddingTop,
|
|
86
|
+
paddingRight,
|
|
87
|
+
paddingBottom,
|
|
88
|
+
paddingLeft,
|
|
89
|
+
cssClasses = [],
|
|
90
|
+
slidesToShow = 5,
|
|
91
|
+
slidesToShowMedium = 3,
|
|
92
|
+
slidesToShowSmall = 2,
|
|
93
|
+
slidesToShowSmallCenterMode = 1
|
|
94
|
+
} = props;
|
|
95
|
+
|
|
96
|
+
const dynamicStyles = {
|
|
97
|
+
textAlign,
|
|
98
|
+
border,
|
|
99
|
+
borderColor,
|
|
100
|
+
borderWidth,
|
|
101
|
+
borderRadius,
|
|
102
|
+
marginTop,
|
|
103
|
+
marginRight,
|
|
104
|
+
marginBottom,
|
|
105
|
+
marginLeft,
|
|
106
|
+
paddingTop,
|
|
107
|
+
paddingRight,
|
|
108
|
+
paddingBottom,
|
|
109
|
+
paddingLeft
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const { data: storeConfigData } = useQuery(GET_STORE_CONFIG_DATA, {
|
|
113
|
+
fetchPolicy: 'cache-and-network',
|
|
114
|
+
nextFetchPolicy: 'cache-first'
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const productUrlSuffix = useMemo(() => {
|
|
118
|
+
if (storeConfigData) {
|
|
119
|
+
return storeConfigData.storeConfig.product_url_suffix;
|
|
120
|
+
}
|
|
121
|
+
}, [storeConfigData]);
|
|
122
|
+
|
|
123
|
+
const urlKeys = pathNames.map(pathName => {
|
|
124
|
+
const slug = pathName.split('/').pop();
|
|
125
|
+
return productUrlSuffix ? slug.replace(productUrlSuffix, '') : slug;
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const { loading, error, data } = useQuery(GET_PRODUCTS_BY_URL_KEY, {
|
|
129
|
+
variables: { url_keys: urlKeys, pageSize: urlKeys.length },
|
|
130
|
+
fetchPolicy: 'cache-and-network',
|
|
131
|
+
nextFetchPolicy: 'cache-first'
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
if (loading) return null;
|
|
135
|
+
|
|
136
|
+
if (error || data.products.items.length === 0) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const items = restoreSortOrder(urlKeys, data.products.items);
|
|
141
|
+
|
|
142
|
+
if (appearance === 'carousel') {
|
|
143
|
+
//Settings conditions was made due to react-slick issues
|
|
144
|
+
const carouselCenterMode =
|
|
145
|
+
carouselMode === 'continuous' && items.length > slidesToShow;
|
|
146
|
+
const carouselSmallCenterMode =
|
|
147
|
+
carouselMode === 'continuous' &&
|
|
148
|
+
items.length > slidesToShowSmallCenterMode;
|
|
149
|
+
const carouselSettings = {
|
|
150
|
+
slidesToShow: items.length > 5 ? slidesToShow : items.length,
|
|
151
|
+
slidesToScroll: 1,//slidesToShow,
|
|
152
|
+
draggable,
|
|
153
|
+
nextArrow: <CustomArrow />,
|
|
154
|
+
prevArrow: <CustomArrow isNext={false} />,
|
|
155
|
+
autoplay,
|
|
156
|
+
autoplaySpeed,
|
|
157
|
+
arrows: items.length > 5 ? arrows : false,
|
|
158
|
+
dots,
|
|
159
|
+
centerMode: carouselCenterMode,
|
|
160
|
+
adaptiveHeight: true,
|
|
161
|
+
responsive: [
|
|
162
|
+
// {
|
|
163
|
+
// breakpoint: 640,
|
|
164
|
+
// settings: {
|
|
165
|
+
// slidesToShow: carouselSmallCenterMode
|
|
166
|
+
// ? slidesToShowSmallCenterMode
|
|
167
|
+
// : slidesToShowSmall,
|
|
168
|
+
// slidesToScroll: carouselSmallCenterMode
|
|
169
|
+
// ? slidesToShowSmallCenterMode
|
|
170
|
+
// : slidesToShowSmall,
|
|
171
|
+
// centerMode: carouselSmallCenterMode,
|
|
172
|
+
// ...(carouselSmallCenterMode && { centerPadding }),
|
|
173
|
+
// ...{
|
|
174
|
+
// infinite:
|
|
175
|
+
// items.length > slidesToShowSmall && infinite
|
|
176
|
+
// }
|
|
177
|
+
// }
|
|
178
|
+
// },
|
|
179
|
+
// {
|
|
180
|
+
// breakpoint: 960,
|
|
181
|
+
// settings: {
|
|
182
|
+
// slidesToShow: slidesToShowSmall + 1,
|
|
183
|
+
// slidesToScroll: slidesToShowSmall + 1
|
|
184
|
+
// }
|
|
185
|
+
// },
|
|
186
|
+
{
|
|
187
|
+
breakpoint: 1023,
|
|
188
|
+
settings: {
|
|
189
|
+
slidesToShow: slidesToShowMedium,
|
|
190
|
+
slidesToScroll: 1
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
breakpoint: 576,
|
|
195
|
+
settings: {
|
|
196
|
+
slidesToShow: slidesToShowSmall,
|
|
197
|
+
slidesToScroll: 1
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
...(carouselCenterMode && { centerPadding }),
|
|
202
|
+
infinite: items.length > 5 ? infinite : false,
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const centerModeClass = carouselCenterMode ? classes.centerMode : null;
|
|
206
|
+
const centerModeSmallClass = carouselSmallCenterMode
|
|
207
|
+
? classes.centerModeSmall
|
|
208
|
+
: null;
|
|
209
|
+
|
|
210
|
+
return (
|
|
211
|
+
<div
|
|
212
|
+
style={dynamicStyles}
|
|
213
|
+
className={[
|
|
214
|
+
classes.carousel,
|
|
215
|
+
...cssClasses,
|
|
216
|
+
centerModeClass,
|
|
217
|
+
centerModeSmallClass
|
|
218
|
+
].join(' ')}
|
|
219
|
+
>
|
|
220
|
+
<Carousel settings={carouselSettings} items={items} />
|
|
221
|
+
</div>
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<div
|
|
227
|
+
style={dynamicStyles}
|
|
228
|
+
className={[classes.root, ...cssClasses].join(' ')}
|
|
229
|
+
>
|
|
230
|
+
<Gallery items={items} classes={{ items: classes.galleryItems }} />
|
|
231
|
+
</div>
|
|
232
|
+
);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Props for {@link Products}
|
|
237
|
+
*
|
|
238
|
+
* @typedef props
|
|
239
|
+
*
|
|
240
|
+
* @property {Object} classes An object containing the class names for the Products
|
|
241
|
+
* @property {String} classes.root CSS class for products
|
|
242
|
+
* @property {String} classes.carousel CSS class for products carousel appearance
|
|
243
|
+
* @property {String} classes.centerMode CSS class for products carousel appearance with center mode
|
|
244
|
+
* @property {String} classes.centerModeSmall CSS class for products carousel appearance with center mode on small screen
|
|
245
|
+
* @property {String} classes.galleryItems CSS class to modify child gallery items
|
|
246
|
+
* @property {String} classes.error CSS class for displaying fetch errors
|
|
247
|
+
* @property {String} appearance Sets products appearance
|
|
248
|
+
* @property {Boolean} autoplay Whether the carousel should autoplay
|
|
249
|
+
* @property {Number} autoplaySpeed The speed at which the autoplay should move the slide on
|
|
250
|
+
* @property {Boolean} infinite Whether to infinitely scroll the carousel
|
|
251
|
+
* @property {Boolean} arrows Whether to show arrows on the slide for navigation
|
|
252
|
+
* @property {Boolean} dots Whether to show navigation dots at the bottom of the carousel
|
|
253
|
+
* @property {Boolean} draggable Enable scrollable via dragging on desktop
|
|
254
|
+
* @property {String} carouselMode Carousel mode
|
|
255
|
+
* @property {String} centerPadding Horizontal padding in centerMode
|
|
256
|
+
* @property {Array} pathNames List of Url path names to load into product list
|
|
257
|
+
* @property {String} textAlign Alignment of content within the products list
|
|
258
|
+
* @property {String} border CSS border property
|
|
259
|
+
* @property {String} borderColor CSS border color property
|
|
260
|
+
* @property {String} borderWidth CSS border width property
|
|
261
|
+
* @property {String} borderRadius CSS border radius property
|
|
262
|
+
* @property {String} marginTop CSS margin top property
|
|
263
|
+
* @property {String} marginRight CSS margin right property
|
|
264
|
+
* @property {String} marginBottom CSS margin bottom property
|
|
265
|
+
* @property {String} marginLeft CSS margin left property
|
|
266
|
+
* @property {String} paddingTop CSS padding top property
|
|
267
|
+
* @property {String} paddingRight CSS padding right property
|
|
268
|
+
* @property {String} paddingBottom CSS padding bottom property
|
|
269
|
+
* @property {String} paddingLeft CSS padding left property
|
|
270
|
+
* @property {Array} cssClasses List of CSS classes to be applied to the component
|
|
271
|
+
* @property {Number} slidesToShow # of slides to show at a time
|
|
272
|
+
* @property {Number} slidesToShowMedium # of slides to show at a time on medium sized screens
|
|
273
|
+
* @property {Number} slidesToShowSmall # of slides to show at a time on small screen
|
|
274
|
+
* @property {Number} slidesToShowSmallCenterMode # of slides to show at a time on small screen in centerMode
|
|
275
|
+
*/
|
|
276
|
+
Products.propTypes = {
|
|
277
|
+
classes: shape({
|
|
278
|
+
root: string,
|
|
279
|
+
carousel: string,
|
|
280
|
+
centerMode: string,
|
|
281
|
+
centerModeSmall: string,
|
|
282
|
+
galleryItems: string,
|
|
283
|
+
error: string
|
|
284
|
+
}),
|
|
285
|
+
appearance: oneOf(['grid', 'carousel']),
|
|
286
|
+
autoplay: bool,
|
|
287
|
+
autoplaySpeed: number,
|
|
288
|
+
infinite: bool,
|
|
289
|
+
arrows: bool,
|
|
290
|
+
dots: bool,
|
|
291
|
+
draggable: bool,
|
|
292
|
+
carouselMode: oneOf(['default', 'continuous']),
|
|
293
|
+
centerPadding: string,
|
|
294
|
+
pathNames: arrayOf(string),
|
|
295
|
+
textAlign: string,
|
|
296
|
+
border: string,
|
|
297
|
+
borderColor: string,
|
|
298
|
+
borderWidth: string,
|
|
299
|
+
borderRadius: string,
|
|
300
|
+
marginTop: string,
|
|
301
|
+
marginRight: string,
|
|
302
|
+
marginBottom: string,
|
|
303
|
+
marginLeft: string,
|
|
304
|
+
paddingTop: string,
|
|
305
|
+
paddingRight: string,
|
|
306
|
+
paddingBottom: string,
|
|
307
|
+
paddingLeft: string,
|
|
308
|
+
cssClasses: arrayOf(string),
|
|
309
|
+
slidesToShow: number,
|
|
310
|
+
slidesToShowMedium: number,
|
|
311
|
+
slidesToShowSmall: number,
|
|
312
|
+
slidesToShowSmallCenterMode: number
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
export default Products;
|
|
316
|
+
|
|
317
|
+
export const GET_PRODUCTS_BY_URL_KEY = gql`
|
|
318
|
+
query getProductsByUrlKey($url_keys: [String], $pageSize: Int!) {
|
|
319
|
+
products(filter: { url_key: { in: $url_keys } }, pageSize: $pageSize) {
|
|
320
|
+
items {
|
|
321
|
+
id
|
|
322
|
+
uid
|
|
323
|
+
name
|
|
324
|
+
price_range {
|
|
325
|
+
maximum_price {
|
|
326
|
+
final_price {
|
|
327
|
+
currency
|
|
328
|
+
value
|
|
329
|
+
}
|
|
330
|
+
regular_price {
|
|
331
|
+
currency
|
|
332
|
+
value
|
|
333
|
+
}
|
|
334
|
+
discount {
|
|
335
|
+
amount_off
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
sku
|
|
340
|
+
small_image {
|
|
341
|
+
url
|
|
342
|
+
}
|
|
343
|
+
stock_status
|
|
344
|
+
__typename
|
|
345
|
+
url_key
|
|
346
|
+
}
|
|
347
|
+
total_count
|
|
348
|
+
filters {
|
|
349
|
+
name
|
|
350
|
+
filter_items_count
|
|
351
|
+
request_var
|
|
352
|
+
filter_items {
|
|
353
|
+
label
|
|
354
|
+
value_string
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
`;
|
|
360
|
+
|
|
361
|
+
export const GET_STORE_CONFIG_DATA = gql`
|
|
362
|
+
query getStoreConfigData {
|
|
363
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
364
|
+
storeConfig {
|
|
365
|
+
store_code
|
|
366
|
+
product_url_suffix
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
`;
|
|
File without changes
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
}
|
|
3
|
+
a.link {
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
}
|
|
6
|
+
.wrapper {
|
|
7
|
+
background-clip: padding-box;
|
|
8
|
+
border-radius: inherit;
|
|
9
|
+
overflow-wrap: break-word;
|
|
10
|
+
word-wrap: break-word;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
}
|
|
13
|
+
.overlay {
|
|
14
|
+
padding: 30px;
|
|
15
|
+
transition: background-color 500ms ease;
|
|
16
|
+
align-items: center;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.videoOverlay {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
z-index: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.viewportElement {
|
|
32
|
+
height: 100%;
|
|
33
|
+
width: 1px;
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: var(--leftViewportElement);
|
|
36
|
+
top: 0;
|
|
37
|
+
z-index: -100;
|
|
38
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.content {
|
|
42
|
+
min-height: 50px;
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
.button {
|
|
46
|
+
margin: 20px 0 0 0;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
text-align: inherit;
|
|
49
|
+
transition: opacity 500ms ease;
|
|
50
|
+
word-break: break-word;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
.root:hover .buttonHover {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
.buttonHover {
|
|
57
|
+
composes: button;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
}
|
|
60
|
+
.posterOverlay {
|
|
61
|
+
composes: overlay;
|
|
62
|
+
align-content: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
}
|
|
65
|
+
.posterOverlayHover {
|
|
66
|
+
composes: posterOverlay;
|
|
67
|
+
background-color: transparent !important;
|
|
68
|
+
}
|
|
69
|
+
.collageLeftOverlay {
|
|
70
|
+
composes: overlay;
|
|
71
|
+
margin-right: auto;
|
|
72
|
+
max-width: 540px;
|
|
73
|
+
}
|
|
74
|
+
.collageLeftOverlayHover {
|
|
75
|
+
composes: collageLeftOverlay;
|
|
76
|
+
background-color: transparent !important;
|
|
77
|
+
}
|
|
78
|
+
.collageCenteredOverlay {
|
|
79
|
+
composes: overlay;
|
|
80
|
+
margin-right: auto;
|
|
81
|
+
margin-left: auto;
|
|
82
|
+
max-width: 540px;
|
|
83
|
+
}
|
|
84
|
+
.collageCenteredOverlayHover {
|
|
85
|
+
composes: collageCenteredOverlay;
|
|
86
|
+
background-color: transparent !important;
|
|
87
|
+
}
|
|
88
|
+
.collageRightOverlay {
|
|
89
|
+
composes: overlay;
|
|
90
|
+
margin-left: auto;
|
|
91
|
+
max-width: 540px;
|
|
92
|
+
}
|
|
93
|
+
.collageRightOverlayHover {
|
|
94
|
+
composes: collageRightOverlay;
|
|
95
|
+
background-color: transparent !important;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.root :global [id*='jarallax-container'] video,
|
|
99
|
+
.root :global [id*='jarallax-container'] iframe,
|
|
100
|
+
.root :global [id*='jarallax-container'] img {
|
|
101
|
+
margin: auto !important;
|
|
102
|
+
transform: none !important;
|
|
103
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getAdvanced, getMediaQueries } from '../../utils';
|
|
2
|
+
|
|
3
|
+
export default node => {
|
|
4
|
+
const autoplaySpeed = parseInt(node.getAttribute('data-autoplay-speed'));
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
minHeight: node.style.minHeight,
|
|
8
|
+
autoplay: node.getAttribute('data-autoplay') === 'true',
|
|
9
|
+
fade: node.getAttribute('data-fade') === 'true',
|
|
10
|
+
infinite: node.getAttribute('data-infinite-loop') === 'true',
|
|
11
|
+
showArrows: node.getAttribute('data-show-arrows') === 'true',
|
|
12
|
+
showDots: node.getAttribute('data-show-dots') === 'true',
|
|
13
|
+
...(!isNaN(autoplaySpeed) && { autoplaySpeed }),
|
|
14
|
+
...getAdvanced(node),
|
|
15
|
+
...getMediaQueries(node)
|
|
16
|
+
};
|
|
17
|
+
};
|