@asantemedia-org/edwardsvacuum-design-system 1.6.12 → 1.6.13
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/dist/index.css +31 -0
- package/dist/index.esm.css +31 -0
- package/dist/index.esm.js +52 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +50 -5
- package/dist/index.js.map +1 -1
- package/dist/index.scss +31 -0
- package/dist/src/stories/components/Card/card.d.ts +1 -1
- package/dist/src/stories/components/Card/card.types.d.ts +7 -0
- package/dist/src/stories/experiences/Algolia-dynamic-search/algolia-dynamic-search.d.ts +3 -2
- package/dist/src/stories/experiences/Algolia-dynamic-search/algolia-dynamic-search.stories.d.ts +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -124,6 +124,7 @@
|
|
|
124
124
|
left: 0;
|
|
125
125
|
animation: algolia-dynamic-search-module__loading___Hb3Uw 1s infinite;
|
|
126
126
|
}
|
|
127
|
+
@charset "UTF-8";
|
|
127
128
|
.card-module__cmp-card___45x9k img {
|
|
128
129
|
transition: all 0.3s ease-in-out;
|
|
129
130
|
}
|
|
@@ -443,6 +444,36 @@
|
|
|
443
444
|
.card-module__cmp-card--type-careers___Wqzcf.card-module__cmp-card--type-card-panel___95jYv .card-module__cmp-card__title-wrapper___XHfZg .card-module__cmp-card__city-country___dI13- {
|
|
444
445
|
margin-top: auto;
|
|
445
446
|
}
|
|
447
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ {
|
|
448
|
+
position: relative;
|
|
449
|
+
}
|
|
450
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ.card-module__open___JQrDU h4 svg {
|
|
451
|
+
transform: rotateX(180deg);
|
|
452
|
+
}
|
|
453
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ.card-module__open___JQrDU ul {
|
|
454
|
+
height: auto;
|
|
455
|
+
top: -100%;
|
|
456
|
+
}
|
|
457
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ h4 {
|
|
458
|
+
cursor: pointer;
|
|
459
|
+
}
|
|
460
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ h4 svg {
|
|
461
|
+
font-weight: 900;
|
|
462
|
+
color: rgb(196, 38, 46);
|
|
463
|
+
transition: 300ms;
|
|
464
|
+
transform-origin: 50% 50%;
|
|
465
|
+
content: "⌵";
|
|
466
|
+
position: absolute;
|
|
467
|
+
right: 0;
|
|
468
|
+
}
|
|
469
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ ul {
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
}
|
|
472
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ ul li {
|
|
473
|
+
position: relative;
|
|
474
|
+
transition: 300ms;
|
|
475
|
+
top: 0;
|
|
476
|
+
}
|
|
446
477
|
|
|
447
478
|
@keyframes card-module__rotate___NxhZk {
|
|
448
479
|
0% {
|
package/dist/index.esm.css
CHANGED
|
@@ -124,6 +124,7 @@
|
|
|
124
124
|
left: 0;
|
|
125
125
|
animation: algolia-dynamic-search-module__loading___Hb3Uw 1s infinite;
|
|
126
126
|
}
|
|
127
|
+
@charset "UTF-8";
|
|
127
128
|
.card-module__cmp-card___45x9k img {
|
|
128
129
|
transition: all 0.3s ease-in-out;
|
|
129
130
|
}
|
|
@@ -443,6 +444,36 @@
|
|
|
443
444
|
.card-module__cmp-card--type-careers___Wqzcf.card-module__cmp-card--type-card-panel___95jYv .card-module__cmp-card__title-wrapper___XHfZg .card-module__cmp-card__city-country___dI13- {
|
|
444
445
|
margin-top: auto;
|
|
445
446
|
}
|
|
447
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ {
|
|
448
|
+
position: relative;
|
|
449
|
+
}
|
|
450
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ.card-module__open___JQrDU h4 svg {
|
|
451
|
+
transform: rotateX(180deg);
|
|
452
|
+
}
|
|
453
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ.card-module__open___JQrDU ul {
|
|
454
|
+
height: auto;
|
|
455
|
+
top: -100%;
|
|
456
|
+
}
|
|
457
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ h4 {
|
|
458
|
+
cursor: pointer;
|
|
459
|
+
}
|
|
460
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ h4 svg {
|
|
461
|
+
font-weight: 900;
|
|
462
|
+
color: rgb(196, 38, 46);
|
|
463
|
+
transition: 300ms;
|
|
464
|
+
transform-origin: 50% 50%;
|
|
465
|
+
content: "⌵";
|
|
466
|
+
position: absolute;
|
|
467
|
+
right: 0;
|
|
468
|
+
}
|
|
469
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ ul {
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
}
|
|
472
|
+
.card-module__cmp-card--type-product_details___vsNOc .card-module__folding-specification-holder___OtcQQ ul li {
|
|
473
|
+
position: relative;
|
|
474
|
+
transition: 300ms;
|
|
475
|
+
top: 0;
|
|
476
|
+
}
|
|
446
477
|
|
|
447
478
|
@keyframes card-module__rotate___NxhZk {
|
|
448
479
|
0% {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
1
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import { faChevronRight, faArrowRight } from '@fortawesome/pro-solid-svg-icons';
|
|
3
|
+
import { faChevronRight, faArrowRight, faChevronDown } from '@fortawesome/pro-solid-svg-icons';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
|
|
6
6
|
/******************************************************************************
|
|
@@ -155,7 +155,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
155
155
|
|
|
156
156
|
var styles$2 = {"cmpAlgoliaDynamicSearchWidget":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget___WY9hc","isLoading":"algolia-dynamic-search-module__isLoading___X6nUw","cmpAlgoliaDynamicSearchWidget__placeholder":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__placeholder___IWqoU","cmpAlgoliaDynamicSearchWidget__container":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__container___HB7g0","cmpAlgoliaDynamicSearchWidget__header":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__header___vxNjS","cmpAlgoliaDynamicSearchWidget__header__text":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__header__text___23-nk","cmpAlgoliaDynamicSearchWidget__cards":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__cards___wOPVj","isQueryContent":"algolia-dynamic-search-module__isQueryContent___KXy6j","hasStyleSilverGradientBackground":"algolia-dynamic-search-module__hasStyleSilverGradientBackground___D3SQQ","hasStyleGreyBackground":"algolia-dynamic-search-module__hasStyleGreyBackground___SuPIH","cmpAlgoliaDynamicSearchWidget__placeholder__loading":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__placeholder__loading___hbH4m","loading":"algolia-dynamic-search-module__loading___Hb3Uw"};
|
|
157
157
|
|
|
158
|
-
var styles$1 = {"cmp-card":"card-module__cmp-card___45x9k","cmp-card__link":"card-module__cmp-card__link___OdszC","cmp-card__content-wrapper":"card-module__cmp-card__content-wrapper___gh335","cmp-card__content-category-wrapper":"card-module__cmp-card__content-category-wrapper___2vOjQ","cmp-card__content-category-wrapper__colour-edwards-red":"card-module__cmp-card__content-category-wrapper__colour-edwards-red___DYmt8","cmp-card__city-country":"card-module__cmp-card__city-country___dI13-","cmp-card__image-wrapper":"card-module__cmp-card__image-wrapper___IhPHw","placeholderImage":"card-module__placeholderImage___AXOh5","cmp-card--type-card-overlay":"card-module__cmp-card--type-card-overlay___344ul","cmp-card__title-wrapper":"card-module__cmp-card__title-wrapper___XHfZg","cmp-card__date":"card-module__cmp-card__date___7w-Ka","cmp-card__title":"card-module__cmp-card__title___cFKG8","cmp-card__footer":"card-module__cmp-card__footer___xcNXM","cmp-card--type-card-no-image":"card-module__cmp-card--type-card-no-image___G75ye","cmp-card--type-card-product":"card-module__cmp-card--type-card-product___IfqTr","cmp-card--type-card-product__wrapper":"card-module__cmp-card--type-card-product__wrapper___kulaR","cmp-card--type-card-product__image":"card-module__cmp-card--type-card-product__image___Bkb0A","cmp-card--type-card-product__meta":"card-module__cmp-card--type-card-product__meta___a7Tzc","cmp-card--type-card-product__title":"card-module__cmp-card--type-card-product__title___0JMQp","cmp-card--type-card-product__cta":"card-module__cmp-card--type-card-product__cta___qDSNo","cmp-card--type-card-product__prices":"card-module__cmp-card--type-card-product__prices___KWPS7","cmp-card--type-card-product__prices--login":"card-module__cmp-card--type-card-product__prices--login___gMhTo","show_prices":"card-module__show_prices___gjVhn","cmp-card--type-card-panel":"card-module__cmp-card--type-card-panel___95jYv","cmp-card__footer--color-malachite":"card-module__cmp-card__footer--color-malachite___jEnvy","cmp-card__footer--color-amethyst":"card-module__cmp-card__footer--color-amethyst___N55PL","cmp-card__footer--color-smokey-quartz-bright":"card-module__cmp-card__footer--color-smokey-quartz-bright___1mqyn","cmp-card__footer--color-olivine-bright":"card-module__cmp-card__footer--color-olivine-bright___O2urI","cmp-card--type-careers":"card-module__cmp-card--type-careers___Wqzcf","rotate":"card-module__rotate___NxhZk","rotate-inverse":"card-module__rotate-inverse___JbaES"};
|
|
158
|
+
var styles$1 = {"cmp-card":"card-module__cmp-card___45x9k","cmp-card__link":"card-module__cmp-card__link___OdszC","cmp-card__content-wrapper":"card-module__cmp-card__content-wrapper___gh335","cmp-card__content-category-wrapper":"card-module__cmp-card__content-category-wrapper___2vOjQ","cmp-card__content-category-wrapper__colour-edwards-red":"card-module__cmp-card__content-category-wrapper__colour-edwards-red___DYmt8","cmp-card__city-country":"card-module__cmp-card__city-country___dI13-","cmp-card__image-wrapper":"card-module__cmp-card__image-wrapper___IhPHw","placeholderImage":"card-module__placeholderImage___AXOh5","cmp-card--type-card-overlay":"card-module__cmp-card--type-card-overlay___344ul","cmp-card__title-wrapper":"card-module__cmp-card__title-wrapper___XHfZg","cmp-card__date":"card-module__cmp-card__date___7w-Ka","cmp-card__title":"card-module__cmp-card__title___cFKG8","cmp-card__footer":"card-module__cmp-card__footer___xcNXM","cmp-card--type-card-no-image":"card-module__cmp-card--type-card-no-image___G75ye","cmp-card--type-card-product":"card-module__cmp-card--type-card-product___IfqTr","cmp-card--type-card-product__wrapper":"card-module__cmp-card--type-card-product__wrapper___kulaR","cmp-card--type-card-product__image":"card-module__cmp-card--type-card-product__image___Bkb0A","cmp-card--type-card-product__meta":"card-module__cmp-card--type-card-product__meta___a7Tzc","cmp-card--type-card-product__title":"card-module__cmp-card--type-card-product__title___0JMQp","cmp-card--type-card-product__cta":"card-module__cmp-card--type-card-product__cta___qDSNo","cmp-card--type-card-product__prices":"card-module__cmp-card--type-card-product__prices___KWPS7","cmp-card--type-card-product__prices--login":"card-module__cmp-card--type-card-product__prices--login___gMhTo","show_prices":"card-module__show_prices___gjVhn","cmp-card--type-card-panel":"card-module__cmp-card--type-card-panel___95jYv","cmp-card__footer--color-malachite":"card-module__cmp-card__footer--color-malachite___jEnvy","cmp-card__footer--color-amethyst":"card-module__cmp-card__footer--color-amethyst___N55PL","cmp-card__footer--color-smokey-quartz-bright":"card-module__cmp-card__footer--color-smokey-quartz-bright___1mqyn","cmp-card__footer--color-olivine-bright":"card-module__cmp-card__footer--color-olivine-bright___O2urI","cmp-card--type-careers":"card-module__cmp-card--type-careers___Wqzcf","cmp-card--type-product_details":"card-module__cmp-card--type-product_details___vsNOc","folding-specification-holder":"card-module__folding-specification-holder___OtcQQ","open":"card-module__open___JQrDU","rotate":"card-module__rotate___NxhZk","rotate-inverse":"card-module__rotate-inverse___JbaES"};
|
|
159
159
|
|
|
160
160
|
function getDefaultExportFromCjs (x) {
|
|
161
161
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -369,6 +369,42 @@ var ProductCard = function (_a) {
|
|
|
369
369
|
icon: faArrowRight
|
|
370
370
|
}))))));
|
|
371
371
|
};
|
|
372
|
+
var ProductDetailsCard = function (_a) {
|
|
373
|
+
var className = _a.className,
|
|
374
|
+
title = _a.title;
|
|
375
|
+
_a.imageUrl;
|
|
376
|
+
var imageAlt = _a.imageAlt;
|
|
377
|
+
_a.placeholder;
|
|
378
|
+
_a.onClick;
|
|
379
|
+
var hit = _a.hit,
|
|
380
|
+
facets = _a.facets;
|
|
381
|
+
var specificationRef = useRef();
|
|
382
|
+
var handleClick = function () {
|
|
383
|
+
var _a;
|
|
384
|
+
(_a = specificationRef.current) === null || _a === void 0 ? void 0 : _a.classList.toggle("open");
|
|
385
|
+
};
|
|
386
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
387
|
+
className: className
|
|
388
|
+
}, /*#__PURE__*/React.createElement("h3", null, title), /*#__PURE__*/React.createElement("p", null, "Product:", hit.code), /*#__PURE__*/React.createElement("img", {
|
|
389
|
+
src: hit["img-product"],
|
|
390
|
+
alt: imageAlt
|
|
391
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
392
|
+
className: "folding-specification-holder",
|
|
393
|
+
onClick: handleClick,
|
|
394
|
+
ref: specificationRef
|
|
395
|
+
}, /*#__PURE__*/React.createElement("h4", null, "Specifications ", /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
396
|
+
icon: faChevronDown,
|
|
397
|
+
color: "#C4262EFF"
|
|
398
|
+
})), /*#__PURE__*/React.createElement("ul", null, facets && facets.map(function (facet) {
|
|
399
|
+
return hit[facet.name] && /*#__PURE__*/React.createElement("li", {
|
|
400
|
+
key: facet.name
|
|
401
|
+
}, /*#__PURE__*/React.createElement("strong", null, facet.label), /*#__PURE__*/React.createElement("br", null), facet.returnsHTML ? /*#__PURE__*/React.createElement("span", {
|
|
402
|
+
dangerouslySetInnerHTML: {
|
|
403
|
+
__html: hit[facet.name]
|
|
404
|
+
}
|
|
405
|
+
}) : hit[facet.name]);
|
|
406
|
+
}))));
|
|
407
|
+
};
|
|
372
408
|
|
|
373
409
|
function _extends() {
|
|
374
410
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -433,6 +469,7 @@ var Button = function (_a) {
|
|
|
433
469
|
var cleanClassNames = function (className, prefixToRemove) {
|
|
434
470
|
return className.startsWith(prefixToRemove) ? className.replace("".concat(prefixToRemove, "__"), "") : className;
|
|
435
471
|
};
|
|
472
|
+
var PRODUCT_DETAILS = 'productDetails';
|
|
436
473
|
var DynamicHeading = function (_a) {
|
|
437
474
|
var _b = _a.titleSize,
|
|
438
475
|
titleSize = _b === void 0 ? "h2" : _b,
|
|
@@ -484,7 +521,8 @@ var AlgoliaDynamicSearch = function (_a) {
|
|
|
484
521
|
_f = _a.isLoading,
|
|
485
522
|
isLoading = _f === void 0 ? false : _f,
|
|
486
523
|
placeholder = _a.placeholder,
|
|
487
|
-
analytics = _a.analytics
|
|
524
|
+
analytics = _a.analytics,
|
|
525
|
+
facets = _a.facets;
|
|
488
526
|
var _g = useState(isLoading),
|
|
489
527
|
isLoadingState = _g[0],
|
|
490
528
|
setIsLoadingState = _g[1];
|
|
@@ -522,7 +560,7 @@ var AlgoliaDynamicSearch = function (_a) {
|
|
|
522
560
|
className: styles$2.cmpAlgoliaDynamicSearchWidget__placeholder__loading
|
|
523
561
|
})), /*#__PURE__*/React.createElement("div", {
|
|
524
562
|
className: styles$2.cmpAlgoliaDynamicSearchWidget__container
|
|
525
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
563
|
+
}, queryType != PRODUCT_DETAILS && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
526
564
|
className: styles$2.cmpAlgoliaDynamicSearchWidget__header
|
|
527
565
|
}, /*#__PURE__*/React.createElement("div", {
|
|
528
566
|
className: styles$2.cmpAlgoliaDynamicSearchWidget__header__text
|
|
@@ -549,13 +587,13 @@ var AlgoliaDynamicSearch = function (_a) {
|
|
|
549
587
|
}
|
|
550
588
|
} : undefined
|
|
551
589
|
});
|
|
552
|
-
}())), /*#__PURE__*/React.createElement("div", {
|
|
590
|
+
}()))), /*#__PURE__*/React.createElement("div", {
|
|
553
591
|
className: styles$2.cmpAlgoliaDynamicSearchWidget__cards
|
|
554
592
|
}, hits.slice(0, maxResults).map(function (hit, index) {
|
|
555
593
|
var Component = Card;
|
|
556
594
|
var title = hit.title;
|
|
557
595
|
var cardStyle = "";
|
|
558
|
-
var imageUrl = hit.
|
|
596
|
+
var imageUrl = hit.imageUrl || placeholder;
|
|
559
597
|
var hitUtm = new URLSearchParams({
|
|
560
598
|
utm_source: "web",
|
|
561
599
|
utm_medium: "alg",
|
|
@@ -580,6 +618,11 @@ var AlgoliaDynamicSearch = function (_a) {
|
|
|
580
618
|
cardClassName = "cmp-card--type-careers";
|
|
581
619
|
imageUrl = "";
|
|
582
620
|
break;
|
|
621
|
+
case PRODUCT_DETAILS:
|
|
622
|
+
cardStyle = "type-card-panel";
|
|
623
|
+
Component = ProductDetailsCard;
|
|
624
|
+
cardClassName = "cmp-card--type-product_details";
|
|
625
|
+
break;
|
|
583
626
|
default:
|
|
584
627
|
return null;
|
|
585
628
|
}
|
|
@@ -589,9 +632,11 @@ var AlgoliaDynamicSearch = function (_a) {
|
|
|
589
632
|
title: title,
|
|
590
633
|
imageUrl: imageUrl,
|
|
591
634
|
placeholder: hit.image ? false : true,
|
|
635
|
+
hit: hit,
|
|
592
636
|
cta: hitCta,
|
|
593
637
|
size: "",
|
|
594
638
|
cardStyle: cardStyle,
|
|
639
|
+
facets: facets,
|
|
595
640
|
contentCategoryLabel: contentCategoryLabel,
|
|
596
641
|
colour: contentCategoryColour,
|
|
597
642
|
productPrice: price,
|