@asantemedia-org/edwardsvacuum-design-system 1.6.47 → 1.6.49
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 +12 -3
- package/dist/index.esm.css +12 -3
- package/dist/index.esm.js +48 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -22
- package/dist/index.js.map +1 -1
- package/dist/index.scss +12 -3
- package/dist/stories/components/Button/Button.d.ts +2 -1
- package/dist/stories/components/Card/card.d.ts +1 -0
- package/dist/stories/experiences/Algolia-dynamic-search/algolia-dynamic-search-base.d.ts +3 -25
- package/dist/stories/experiences/Algolia-dynamic-search/algolia-dynamic-search.d.ts +1 -2
- package/dist/stories/experiences/Algolia-dynamic-search/algolia-dynamic-search.types.d.ts +34 -0
- package/dist/stories/experiences/QRFormJourney/Qr-form/Qr-form.d.ts +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -786,15 +786,24 @@
|
|
|
786
786
|
|
|
787
787
|
@font-face {
|
|
788
788
|
font-family: "Calibri";
|
|
789
|
-
src: url("/
|
|
789
|
+
src: url("/fonts/calibri.ttf") format("truetype");
|
|
790
|
+
font-weight: normal;
|
|
791
|
+
font-style: normal;
|
|
792
|
+
font-display: swap;
|
|
790
793
|
}
|
|
791
794
|
@font-face {
|
|
792
795
|
font-family: "CalibriLight";
|
|
793
|
-
src: url("/
|
|
796
|
+
src: url("/fonts/calibril.ttf") format("truetype");
|
|
797
|
+
font-weight: 300;
|
|
798
|
+
font-style: normal;
|
|
799
|
+
font-display: swap;
|
|
794
800
|
}
|
|
795
801
|
@font-face {
|
|
796
802
|
font-family: "CalibriBold";
|
|
797
|
-
src: url("/
|
|
803
|
+
src: url("/fonts/calibrib.ttf") format("truetype");
|
|
804
|
+
font-weight: 700;
|
|
805
|
+
font-style: normal;
|
|
806
|
+
font-display: swap;
|
|
798
807
|
}
|
|
799
808
|
.p-1 {
|
|
800
809
|
padding: 0.5rem;
|
package/dist/index.esm.css
CHANGED
|
@@ -786,15 +786,24 @@
|
|
|
786
786
|
|
|
787
787
|
@font-face {
|
|
788
788
|
font-family: "Calibri";
|
|
789
|
-
src: url("/
|
|
789
|
+
src: url("/fonts/calibri.ttf") format("truetype");
|
|
790
|
+
font-weight: normal;
|
|
791
|
+
font-style: normal;
|
|
792
|
+
font-display: swap;
|
|
790
793
|
}
|
|
791
794
|
@font-face {
|
|
792
795
|
font-family: "CalibriLight";
|
|
793
|
-
src: url("/
|
|
796
|
+
src: url("/fonts/calibril.ttf") format("truetype");
|
|
797
|
+
font-weight: 300;
|
|
798
|
+
font-style: normal;
|
|
799
|
+
font-display: swap;
|
|
794
800
|
}
|
|
795
801
|
@font-face {
|
|
796
802
|
font-family: "CalibriBold";
|
|
797
|
-
src: url("/
|
|
803
|
+
src: url("/fonts/calibrib.ttf") format("truetype");
|
|
804
|
+
font-weight: 700;
|
|
805
|
+
font-style: normal;
|
|
806
|
+
font-display: swap;
|
|
798
807
|
}
|
|
799
808
|
.p-1 {
|
|
800
809
|
padding: 0.5rem;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import { faChevronDown,
|
|
3
|
+
import { faChevronDown, faArrowRight, faChevronRight } from '@fortawesome/pro-solid-svg-icons';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
import { PhoneInput } from 'react-international-phone';
|
|
6
6
|
|
|
@@ -560,8 +560,10 @@ var Button = function (_a) {
|
|
|
560
560
|
href = _a.href,
|
|
561
561
|
target = _a.target,
|
|
562
562
|
rel = _a.rel,
|
|
563
|
+
_c = _a.type,
|
|
564
|
+
type = _c === void 0 ? 'button' : _c,
|
|
563
565
|
dataTargetSelector = _a["data-target-selector"],
|
|
564
|
-
props = __rest(_a, ["className", "buttonStyle", "label", "element", "onClick", "href", "target", "rel", 'data-target-selector']);
|
|
566
|
+
props = __rest(_a, ["className", "buttonStyle", "label", "element", "onClick", "href", "target", "rel", "type", 'data-target-selector']);
|
|
565
567
|
var mode = buttonStyle ? getStyle("cmp-button--style-".concat(buttonStyle)) : '';
|
|
566
568
|
var baseClass = getStyle('cmp-button');
|
|
567
569
|
// Add js-modal class if data-target-selector is present
|
|
@@ -579,7 +581,7 @@ var Button = function (_a) {
|
|
|
579
581
|
}
|
|
580
582
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
581
583
|
className: conditionalClasses,
|
|
582
|
-
type:
|
|
584
|
+
type: type,
|
|
583
585
|
onClick: onClick
|
|
584
586
|
}, props), label);
|
|
585
587
|
};
|
|
@@ -636,7 +638,13 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
636
638
|
isLoading = _f === void 0 ? false : _f,
|
|
637
639
|
placeholder = _a.placeholder,
|
|
638
640
|
analytics = _a.analytics,
|
|
639
|
-
facets = _a.facets
|
|
641
|
+
facets = _a.facets,
|
|
642
|
+
innerComponents = _a.innerComponents;
|
|
643
|
+
// Extract components from innerComponents with defaults
|
|
644
|
+
var Card$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.Card) || Card;
|
|
645
|
+
var ProductCard$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.ProductCard) || ProductCard;
|
|
646
|
+
var ProductDetailsCard$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.ProductDetailsCard) || ProductDetailsCard;
|
|
647
|
+
var Button$1 = (innerComponents === null || innerComponents === void 0 ? void 0 : innerComponents.Button) || Button;
|
|
640
648
|
// Helper to resolve CSS module class names properly
|
|
641
649
|
var getClass = useCallback(function (suffix) {
|
|
642
650
|
var fullClassName = "cmpAlgoliaDynamicSearchWidget".concat(suffix);
|
|
@@ -695,7 +703,7 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
695
703
|
finalUrl = _a.finalUrl,
|
|
696
704
|
target = _a.target;
|
|
697
705
|
var isAnchor = !!callToActionTargetSelector || (callToActionType === null || callToActionType === void 0 ? void 0 : callToActionType.toLowerCase()) !== 'internal';
|
|
698
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
706
|
+
return /*#__PURE__*/React.createElement(Button$1, {
|
|
699
707
|
element: isAnchor ? 'a' : 'button',
|
|
700
708
|
buttonStyle: widgetStyleProps === null || widgetStyleProps === void 0 ? void 0 : widgetStyleProps.buttonStyle,
|
|
701
709
|
label: callToActionText,
|
|
@@ -712,7 +720,7 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
712
720
|
}()))), /*#__PURE__*/React.createElement("div", {
|
|
713
721
|
className: queryType == PRODUCT_DETAILS ? getClass('__cards__cardSingle') : getClass('__cards')
|
|
714
722
|
}, hits.slice(0, maxResults).map(function (hit, index) {
|
|
715
|
-
var Component = Card;
|
|
723
|
+
var Component = Card$1;
|
|
716
724
|
var title = hit.title;
|
|
717
725
|
var cardStyle = "";
|
|
718
726
|
var imageUrl = hit.imageUrl || placeholder;
|
|
@@ -729,7 +737,7 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
729
737
|
var cardClassName = styles === null || styles === void 0 ? void 0 : styles.cmpCard;
|
|
730
738
|
switch (queryType) {
|
|
731
739
|
case "products":
|
|
732
|
-
Component = ProductCard;
|
|
740
|
+
Component = ProductCard$1;
|
|
733
741
|
cardStyle = "type-card-product";
|
|
734
742
|
break;
|
|
735
743
|
case "content":
|
|
@@ -742,7 +750,7 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
742
750
|
break;
|
|
743
751
|
case PRODUCT_DETAILS:
|
|
744
752
|
cardStyle = "type-card-panel";
|
|
745
|
-
Component = ProductDetailsCard;
|
|
753
|
+
Component = ProductDetailsCard$1;
|
|
746
754
|
break;
|
|
747
755
|
default:
|
|
748
756
|
return null;
|
|
@@ -779,8 +787,17 @@ var AlgoliaDynamicSearch = function (_a, useScopedStyles, styles) {
|
|
|
779
787
|
|
|
780
788
|
var styles = {"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","cmpAlgoliaDynamicSearchWidget__cards__cardSingle":"algolia-dynamic-search-module__cmpAlgoliaDynamicSearchWidget__cards__cardSingle___fcWfV","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"};
|
|
781
789
|
|
|
790
|
+
// Edwards-specific components
|
|
791
|
+
var edwardsComponents = {
|
|
792
|
+
Card: Card,
|
|
793
|
+
ProductCard: ProductCard,
|
|
794
|
+
ProductDetailsCard: ProductDetailsCard,
|
|
795
|
+
Button: Button
|
|
796
|
+
};
|
|
782
797
|
var AlgoliaDynamicSearchEdwards = function (props) {
|
|
783
|
-
return AlgoliaDynamicSearch(
|
|
798
|
+
return AlgoliaDynamicSearch(__assign(__assign({}, props), {
|
|
799
|
+
innerComponents: edwardsComponents
|
|
800
|
+
}), true, styles);
|
|
784
801
|
};
|
|
785
802
|
var AlgoliaDynamicSearchRaw = function (props) {
|
|
786
803
|
return AlgoliaDynamicSearch(props, false);
|
|
@@ -1010,6 +1027,8 @@ var QrForm = function (props) {
|
|
|
1010
1027
|
var _g = useState(true);
|
|
1011
1028
|
_g[0];
|
|
1012
1029
|
var setIsLoadingCountries = _g[1];
|
|
1030
|
+
// Use custom Button component if provided, otherwise use default
|
|
1031
|
+
var Button$1 = props.ButtonComponent || Button;
|
|
1013
1032
|
var i18n = __assign(__assign({}, defaultQrFormTranslations), props);
|
|
1014
1033
|
var buttonProps = props;
|
|
1015
1034
|
var consentFields = ((_a = props.consents) === null || _a === void 0 ? void 0 : _a.map(function (consent, index) {
|
|
@@ -1128,20 +1147,23 @@ var QrForm = function (props) {
|
|
|
1128
1147
|
selected: true,
|
|
1129
1148
|
disabled: true
|
|
1130
1149
|
}, {
|
|
1131
|
-
label: i18n.
|
|
1132
|
-
value: "
|
|
1150
|
+
label: i18n.label_warrantyClaim,
|
|
1151
|
+
value: "warranty claim"
|
|
1133
1152
|
}, {
|
|
1134
|
-
label: i18n.
|
|
1135
|
-
value: "
|
|
1153
|
+
label: i18n.label_serviceRequest,
|
|
1154
|
+
value: "service request"
|
|
1136
1155
|
}, {
|
|
1137
|
-
label: i18n.
|
|
1138
|
-
value: "
|
|
1156
|
+
label: i18n.label_oilAndSpares,
|
|
1157
|
+
value: "oil and spares"
|
|
1158
|
+
}, {
|
|
1159
|
+
label: i18n.label_other,
|
|
1160
|
+
value: "other"
|
|
1139
1161
|
}]
|
|
1140
1162
|
}, {
|
|
1141
1163
|
type: "textarea",
|
|
1142
1164
|
name: "tell_us_more",
|
|
1143
|
-
placeholder: i18n.
|
|
1144
|
-
label: i18n.
|
|
1165
|
+
placeholder: i18n.label_tellUsMoreOptional,
|
|
1166
|
+
label: i18n.label_tellUsMoreOptional
|
|
1145
1167
|
}], false), /*page 2*/
|
|
1146
1168
|
[{
|
|
1147
1169
|
type: "text",
|
|
@@ -1331,19 +1353,22 @@ var QrForm = function (props) {
|
|
|
1331
1353
|
var isLastPage = pageIndex === pages.length - 1;
|
|
1332
1354
|
var navButtons = generateButtons && /*#__PURE__*/React.createElement("div", {
|
|
1333
1355
|
className: "qr-form-navigation"
|
|
1334
|
-
}, !isFirstPage ? /*#__PURE__*/React.createElement(Button, {
|
|
1356
|
+
}, !isFirstPage ? /*#__PURE__*/React.createElement(Button$1, {
|
|
1335
1357
|
label: i18n === null || i18n === void 0 ? void 0 : i18n.previous,
|
|
1336
1358
|
onClick: formNavigate,
|
|
1337
1359
|
"data-page_target": pageIndex - 1,
|
|
1338
1360
|
buttonStyle: "secondary"
|
|
1339
|
-
}) : /*#__PURE__*/React.createElement("div", null), !isLastPage ? /*#__PURE__*/React.createElement(Button, {
|
|
1361
|
+
}) : /*#__PURE__*/React.createElement("div", null), !isLastPage ? /*#__PURE__*/React.createElement(Button$1, {
|
|
1340
1362
|
label: i18n === null || i18n === void 0 ? void 0 : i18n.next,
|
|
1341
1363
|
onClick: formNavigate,
|
|
1342
1364
|
"data-page_target": pageIndex + 1,
|
|
1343
1365
|
buttonStyle: "primary"
|
|
1344
|
-
}) : /*#__PURE__*/React.createElement(
|
|
1345
|
-
|
|
1346
|
-
|
|
1366
|
+
}) : /*#__PURE__*/React.createElement(Button$1, {
|
|
1367
|
+
label: i18n === null || i18n === void 0 ? void 0 : i18n.submit,
|
|
1368
|
+
onClick: handleSubmit,
|
|
1369
|
+
buttonStyle: "primary",
|
|
1370
|
+
element: "button",
|
|
1371
|
+
type: "submit"
|
|
1347
1372
|
}));
|
|
1348
1373
|
if (isPartial) {
|
|
1349
1374
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1417,7 +1442,7 @@ var QrForm = function (props) {
|
|
|
1417
1442
|
className: "title-wrapper"
|
|
1418
1443
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1419
1444
|
className: "submitted-checked"
|
|
1420
|
-
}), /*#__PURE__*/React.createElement("h2", null, props.thankYouTitle)), /*#__PURE__*/React.createElement("p", null, props.thankYouText), /*#__PURE__*/React.createElement(Button, {
|
|
1445
|
+
}), /*#__PURE__*/React.createElement("h2", null, props.thankYouTitle)), /*#__PURE__*/React.createElement("p", null, props.thankYouText), /*#__PURE__*/React.createElement(Button$1, {
|
|
1421
1446
|
label: buttonProps.buttonText,
|
|
1422
1447
|
href: buttonProps.url,
|
|
1423
1448
|
target: buttonProps.newTab ? '_blank' : '',
|