@asantemedia-org/edwardsvacuum-design-system 1.3.8 → 1.3.9
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/README.md +11 -29
- package/dist/index.css +58 -0
- package/dist/index.esm.css +58 -0
- package/dist/index.esm.js +46 -38
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +52 -43
- package/dist/index.js.map +1 -1
- package/dist/index.scss +58 -0
- package/dist/stories/components/Button/Button.d.ts +1 -0
- package/dist/stories/components/Card/card.d.ts +1 -0
- package/dist/stories/experiences/Algolia-dynamic-search/algolia-dynamic-search.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ The project is organized with the following key scripts and dependencies:
|
|
|
11
11
|
- **Next.js** for server-side rendering and building the design system.
|
|
12
12
|
- **Storybook** for developing and showcasing UI components in isolation.
|
|
13
13
|
- **FontAwesome** for incorporating scalable vector icons and social logos.
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
@@ -52,82 +52,64 @@ Replace `your_token_here` with the actual token.
|
|
|
52
52
|
|
|
53
53
|
The following scripts are available in the project:
|
|
54
54
|
|
|
55
|
-
- **Development**:
|
|
56
|
-
```bash
|
|
57
|
-
yarn dev
|
|
58
|
-
```
|
|
59
|
-
Starts the Next.js development server.
|
|
60
|
-
|
|
61
|
-
- **Build**:
|
|
62
|
-
```bash
|
|
63
|
-
yarn build
|
|
64
|
-
```
|
|
65
|
-
Builds the project for production.
|
|
66
|
-
|
|
67
|
-
- **Start**:
|
|
68
|
-
```bash
|
|
69
|
-
yarn start
|
|
70
|
-
```
|
|
71
|
-
Starts the Next.js production server.
|
|
72
|
-
|
|
73
55
|
- **Lint**:
|
|
74
56
|
```bash
|
|
75
|
-
|
|
57
|
+
npm run lint
|
|
76
58
|
```
|
|
77
59
|
Runs ESLint to analyze the code for potential errors.
|
|
78
60
|
|
|
79
61
|
- **Storybook**:
|
|
80
62
|
```bash
|
|
81
|
-
|
|
63
|
+
npm run storybook
|
|
82
64
|
```
|
|
83
65
|
Starts the Storybook development server.
|
|
84
66
|
|
|
85
67
|
- **Build Storybook**:
|
|
86
68
|
```bash
|
|
87
|
-
|
|
69
|
+
npm run build-storybook
|
|
88
70
|
```
|
|
89
71
|
Builds the Storybook static files.
|
|
90
72
|
|
|
91
73
|
- **AEM Integration**:
|
|
92
74
|
- **Build AEM Dialogs**:
|
|
93
75
|
```bash
|
|
94
|
-
|
|
76
|
+
npm run build-aem-dialogs
|
|
95
77
|
```
|
|
96
78
|
Generates AEM component dialogs.
|
|
97
79
|
|
|
98
80
|
- **Copy Static AEM Files**:
|
|
99
81
|
```bash
|
|
100
|
-
|
|
82
|
+
npm run copy-static-aem-files
|
|
101
83
|
```
|
|
102
84
|
Copies the necessary static files for AEM integration.
|
|
103
85
|
|
|
104
86
|
- **Clean AEM**:
|
|
105
87
|
```bash
|
|
106
|
-
|
|
88
|
+
npm run aem-clean
|
|
107
89
|
```
|
|
108
90
|
Cleans the target location for AEM deployment.
|
|
109
91
|
|
|
110
92
|
- **Install AEM**:
|
|
111
93
|
```bash
|
|
112
|
-
|
|
94
|
+
npm run aem-install
|
|
113
95
|
```
|
|
114
96
|
Builds and copies AEM dialogs and static files.
|
|
115
97
|
|
|
116
98
|
- **Clean & Install AEM**:
|
|
117
99
|
```bash
|
|
118
|
-
|
|
100
|
+
npm run aem-clean-install
|
|
119
101
|
```
|
|
120
102
|
Cleans and installs AEM files in one command.
|
|
121
103
|
|
|
122
104
|
- **Chromatic**:
|
|
123
105
|
```bash
|
|
124
|
-
|
|
106
|
+
npm run chromatic
|
|
125
107
|
```
|
|
126
108
|
Publishes Storybook to Chromatic for visual regression testing.
|
|
127
109
|
|
|
128
110
|
## CI/CD Implementation
|
|
129
111
|
|
|
130
|
-
The project is set up with a CI/CD pipeline that triggers deployments only on merges to the `development` branch. This ensures that changes are properly reviewed and tested before being deployed to production.
|
|
112
|
+
The project is set up with a CI/CD pipeline that triggers deployments only on merges to the `development` branch. This ensures that changes are properly reviewed and tested before being deployed to production. If new dependencies are added, the project will require a manual deployment to update the dependencies in the develoment environment.
|
|
131
113
|
|
|
132
114
|
## License
|
|
133
115
|
|
package/dist/index.css
CHANGED
|
@@ -460,4 +460,62 @@
|
|
|
460
460
|
100% {
|
|
461
461
|
transform: rotateY(0);
|
|
462
462
|
}
|
|
463
|
+
}
|
|
464
|
+
.Button-module__cmp-button___SMjDF {
|
|
465
|
+
font-family: "Calibri", "Calibri W05 Light", sans-serif;
|
|
466
|
+
text-transform: uppercase;
|
|
467
|
+
font-size: 1rem;
|
|
468
|
+
display: flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
min-width: calc(200px - 2rem);
|
|
471
|
+
min-height: 50px;
|
|
472
|
+
padding: 0 3rem 0 1rem;
|
|
473
|
+
transition: all 0.3s ease-in-out;
|
|
474
|
+
border: 2px solid transparent;
|
|
475
|
+
}
|
|
476
|
+
.Button-module__cmp-button--style-primary___hfLAd {
|
|
477
|
+
background: linear-gradient(45deg, rgb(196, 38, 46), rgb(135, 10, 32));
|
|
478
|
+
color: rgb(255, 255, 255);
|
|
479
|
+
border: none;
|
|
480
|
+
}
|
|
481
|
+
.Button-module__cmp-button--style-primary___hfLAd:hover {
|
|
482
|
+
background: rgb(255, 255, 255);
|
|
483
|
+
color: #2d363a;
|
|
484
|
+
}
|
|
485
|
+
.Button-module__cmp-button--style-secondary___3Dqvg {
|
|
486
|
+
background: #2d363a;
|
|
487
|
+
color: rgb(255, 255, 255);
|
|
488
|
+
}
|
|
489
|
+
.Button-module__cmp-button--style-secondary___3Dqvg:hover {
|
|
490
|
+
background: linear-gradient(45deg, rgb(172, 174, 176), rgb(130, 134, 136));
|
|
491
|
+
color: rgb(255, 255, 255);
|
|
492
|
+
}
|
|
493
|
+
.Button-module__cmp-button--style-tertiary___Akcep {
|
|
494
|
+
background: rgb(255, 255, 255);
|
|
495
|
+
color: #2d363a;
|
|
496
|
+
border: none;
|
|
497
|
+
}
|
|
498
|
+
.Button-module__cmp-button--style-tertiary___Akcep:hover {
|
|
499
|
+
background: #2d363a;
|
|
500
|
+
color: rgb(255, 255, 255);
|
|
501
|
+
}
|
|
502
|
+
.Button-module__cmp-button--style-outlineWhite___v69nN {
|
|
503
|
+
background: transparent;
|
|
504
|
+
color: rgb(255, 255, 255);
|
|
505
|
+
border: 2px solid rgb(255, 255, 255);
|
|
506
|
+
}
|
|
507
|
+
.Button-module__cmp-button--style-outlineWhite___v69nN:hover {
|
|
508
|
+
background: rgb(255, 255, 255);
|
|
509
|
+
color: #2d363a;
|
|
510
|
+
border-color: rgb(255, 255, 255);
|
|
511
|
+
}
|
|
512
|
+
.Button-module__cmp-button--style-outlineGrey___sG5nd {
|
|
513
|
+
background: transparent;
|
|
514
|
+
color: #2d363a;
|
|
515
|
+
border: 2px solid #2d363a;
|
|
516
|
+
}
|
|
517
|
+
.Button-module__cmp-button--style-outlineGrey___sG5nd:hover {
|
|
518
|
+
background: #2d363a;
|
|
519
|
+
color: rgb(255, 255, 255);
|
|
520
|
+
border-color: #2d363a;
|
|
463
521
|
}
|
package/dist/index.esm.css
CHANGED
|
@@ -460,4 +460,62 @@
|
|
|
460
460
|
100% {
|
|
461
461
|
transform: rotateY(0);
|
|
462
462
|
}
|
|
463
|
+
}
|
|
464
|
+
.Button-module__cmp-button___SMjDF {
|
|
465
|
+
font-family: "Calibri", "Calibri W05 Light", sans-serif;
|
|
466
|
+
text-transform: uppercase;
|
|
467
|
+
font-size: 1rem;
|
|
468
|
+
display: flex;
|
|
469
|
+
align-items: center;
|
|
470
|
+
min-width: calc(200px - 2rem);
|
|
471
|
+
min-height: 50px;
|
|
472
|
+
padding: 0 3rem 0 1rem;
|
|
473
|
+
transition: all 0.3s ease-in-out;
|
|
474
|
+
border: 2px solid transparent;
|
|
475
|
+
}
|
|
476
|
+
.Button-module__cmp-button--style-primary___hfLAd {
|
|
477
|
+
background: linear-gradient(45deg, rgb(196, 38, 46), rgb(135, 10, 32));
|
|
478
|
+
color: rgb(255, 255, 255);
|
|
479
|
+
border: none;
|
|
480
|
+
}
|
|
481
|
+
.Button-module__cmp-button--style-primary___hfLAd:hover {
|
|
482
|
+
background: rgb(255, 255, 255);
|
|
483
|
+
color: #2d363a;
|
|
484
|
+
}
|
|
485
|
+
.Button-module__cmp-button--style-secondary___3Dqvg {
|
|
486
|
+
background: #2d363a;
|
|
487
|
+
color: rgb(255, 255, 255);
|
|
488
|
+
}
|
|
489
|
+
.Button-module__cmp-button--style-secondary___3Dqvg:hover {
|
|
490
|
+
background: linear-gradient(45deg, rgb(172, 174, 176), rgb(130, 134, 136));
|
|
491
|
+
color: rgb(255, 255, 255);
|
|
492
|
+
}
|
|
493
|
+
.Button-module__cmp-button--style-tertiary___Akcep {
|
|
494
|
+
background: rgb(255, 255, 255);
|
|
495
|
+
color: #2d363a;
|
|
496
|
+
border: none;
|
|
497
|
+
}
|
|
498
|
+
.Button-module__cmp-button--style-tertiary___Akcep:hover {
|
|
499
|
+
background: #2d363a;
|
|
500
|
+
color: rgb(255, 255, 255);
|
|
501
|
+
}
|
|
502
|
+
.Button-module__cmp-button--style-outlineWhite___v69nN {
|
|
503
|
+
background: transparent;
|
|
504
|
+
color: rgb(255, 255, 255);
|
|
505
|
+
border: 2px solid rgb(255, 255, 255);
|
|
506
|
+
}
|
|
507
|
+
.Button-module__cmp-button--style-outlineWhite___v69nN:hover {
|
|
508
|
+
background: rgb(255, 255, 255);
|
|
509
|
+
color: #2d363a;
|
|
510
|
+
border-color: rgb(255, 255, 255);
|
|
511
|
+
}
|
|
512
|
+
.Button-module__cmp-button--style-outlineGrey___sG5nd {
|
|
513
|
+
background: transparent;
|
|
514
|
+
color: #2d363a;
|
|
515
|
+
border: 2px solid #2d363a;
|
|
516
|
+
}
|
|
517
|
+
.Button-module__cmp-button--style-outlineGrey___sG5nd:hover {
|
|
518
|
+
background: #2d363a;
|
|
519
|
+
color: rgb(255, 255, 255);
|
|
520
|
+
border-color: #2d363a;
|
|
463
521
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import './algolia-dynamic-search.scss';
|
|
3
|
-
import './card.scss';
|
|
4
|
-
import './button.scss';
|
|
5
2
|
|
|
6
3
|
/******************************************************************************
|
|
7
4
|
Copyright (c) Microsoft Corporation.
|
|
@@ -971,7 +968,7 @@ function defineIcons(prefix, icons) {
|
|
|
971
968
|
}
|
|
972
969
|
|
|
973
970
|
const {
|
|
974
|
-
styles,
|
|
971
|
+
styles: styles$1,
|
|
975
972
|
shims
|
|
976
973
|
} = namespace;
|
|
977
974
|
const FAMILY_NAMES = Object.keys(PREFIX_TO_LONG_STYLE);
|
|
@@ -1000,7 +997,7 @@ function getIconName(cssPrefix, cls) {
|
|
|
1000
997
|
}
|
|
1001
998
|
const build = () => {
|
|
1002
999
|
const lookup = reducer => {
|
|
1003
|
-
return reduce(styles, (o$$1, style, prefix) => {
|
|
1000
|
+
return reduce(styles$1, (o$$1, style, prefix) => {
|
|
1004
1001
|
o$$1[prefix] = reduce(style, reducer, {});
|
|
1005
1002
|
return o$$1;
|
|
1006
1003
|
}, {});
|
|
@@ -1042,7 +1039,7 @@ const build = () => {
|
|
|
1042
1039
|
|
|
1043
1040
|
// If we have a Kit, we can't determine if regular is available since we
|
|
1044
1041
|
// could be auto-fetching it. We'll have to assume that it is available.
|
|
1045
|
-
const hasRegular = 'far' in styles || config.autoFetchSvg;
|
|
1042
|
+
const hasRegular = 'far' in styles$1 || config.autoFetchSvg;
|
|
1046
1043
|
const shimLookups = reduce(shims, (acc, shim) => {
|
|
1047
1044
|
const maybeNameMaybeUnicode = shim[0];
|
|
1048
1045
|
let prefix = shim[1];
|
|
@@ -1188,7 +1185,7 @@ function getCanonicalIcon(values) {
|
|
|
1188
1185
|
return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, canonical), getDefaultCanonicalPrefix({
|
|
1189
1186
|
values,
|
|
1190
1187
|
family,
|
|
1191
|
-
styles,
|
|
1188
|
+
styles: styles$1,
|
|
1192
1189
|
config,
|
|
1193
1190
|
canonical,
|
|
1194
1191
|
givenPrefix
|
|
@@ -1209,7 +1206,7 @@ function applyShimAndAlias(skipLookups, givenPrefix, canonical) {
|
|
|
1209
1206
|
const aliasIconName = byAlias(prefix, iconName);
|
|
1210
1207
|
iconName = shim.iconName || aliasIconName || iconName;
|
|
1211
1208
|
prefix = shim.prefix || prefix;
|
|
1212
|
-
if (prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {
|
|
1209
|
+
if (prefix === 'far' && !styles$1['far'] && styles$1['fas'] && !config.autoFetchSvg) {
|
|
1213
1210
|
// Allow a fallback from the regular style to solid if regular is not available
|
|
1214
1211
|
// but only if we aren't auto-fetching SVGs
|
|
1215
1212
|
prefix = 'fas';
|
|
@@ -1711,7 +1708,7 @@ function makeLayersCounterAbstract(params) {
|
|
|
1711
1708
|
}
|
|
1712
1709
|
|
|
1713
1710
|
const {
|
|
1714
|
-
styles: styles$1
|
|
1711
|
+
styles: styles$1$1
|
|
1715
1712
|
} = namespace;
|
|
1716
1713
|
function asFoundIcon(icon) {
|
|
1717
1714
|
const width = icon[0];
|
|
@@ -1777,8 +1774,8 @@ function findIcon(iconName, prefix) {
|
|
|
1777
1774
|
iconName = shim.iconName || iconName;
|
|
1778
1775
|
prefix = shim.prefix || prefix;
|
|
1779
1776
|
}
|
|
1780
|
-
if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
|
|
1781
|
-
const icon = styles$1[prefix][iconName];
|
|
1777
|
+
if (iconName && prefix && styles$1$1[prefix] && styles$1$1[prefix][iconName]) {
|
|
1778
|
+
const icon = styles$1$1[prefix][iconName];
|
|
1782
1779
|
return resolve(asFoundIcon(icon));
|
|
1783
1780
|
}
|
|
1784
1781
|
maybeNotifyMissing(iconName, prefix);
|
|
@@ -4574,7 +4571,7 @@ const faChevronRight = {
|
|
|
4574
4571
|
};
|
|
4575
4572
|
|
|
4576
4573
|
// Utility function to retrieve correct SCSS module class names
|
|
4577
|
-
var getStyle = function (className) {
|
|
4574
|
+
var getStyle$1 = function (className) {
|
|
4578
4575
|
if (styles$3[className]) return styles$3[className];
|
|
4579
4576
|
var nestedMatch = Object.keys(styles$3).find(function (key) {
|
|
4580
4577
|
return key.includes(className);
|
|
@@ -4627,43 +4624,44 @@ var Card = function (_a) {
|
|
|
4627
4624
|
country = _a.country,
|
|
4628
4625
|
placeholder = _a.placeholder,
|
|
4629
4626
|
onClick = _a.onClick;
|
|
4630
|
-
var mode = getStyle("cmp-card--".concat(cardStyle));
|
|
4627
|
+
var mode = getStyle$1("cmp-card--".concat(cardStyle));
|
|
4631
4628
|
var width = cardSizeMapping(size);
|
|
4632
|
-
var categoryColour = colour ? "cmp-card__content-category-wrapper__colour-".concat(colour) : '';
|
|
4629
|
+
var categoryColour = colour ? getStyle$1("cmp-card__content-category-wrapper__colour-".concat(colour)) : '';
|
|
4630
|
+
var cardFooterColour = colour ? getStyle$1("cmp-card__footer--color-".concat(colour)) : '';
|
|
4633
4631
|
var contentImage = getImageUrl(imageUrl);
|
|
4634
4632
|
return /*#__PURE__*/React.createElement("div", {
|
|
4635
|
-
className: classnames(getStyle('cmp-card'), mode, width, className && getStyle(className))
|
|
4633
|
+
className: classnames(getStyle$1('cmp-card'), mode, width, className && getStyle$1(className))
|
|
4636
4634
|
}, /*#__PURE__*/React.createElement("a", {
|
|
4637
|
-
className: getStyle('cmp-card__link'),
|
|
4635
|
+
className: getStyle$1('cmp-card__link'),
|
|
4638
4636
|
href: cardLink,
|
|
4639
4637
|
onClick: onClick
|
|
4640
4638
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4641
|
-
className: getStyle('cmp-card__content-wrapper')
|
|
4642
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
4643
|
-
className: "".concat(getStyle('cmp-card__image-wrapper'), " ").concat(!imageUrl || placeholder ? getStyle('placeholderImage') : '')
|
|
4639
|
+
className: getStyle$1('cmp-card__content-wrapper')
|
|
4640
|
+
}, cardStyle !== 'type-card-panel' && cardStyle !== 'type-card-no-image' && /*#__PURE__*/React.createElement("div", {
|
|
4641
|
+
className: "".concat(getStyle$1('cmp-card__image-wrapper'), " ").concat(!imageUrl || placeholder ? getStyle$1('placeholderImage') : '')
|
|
4644
4642
|
}, /*#__PURE__*/React.createElement("picture", null, /*#__PURE__*/React.createElement("img", {
|
|
4645
4643
|
src: contentImage,
|
|
4646
4644
|
alt: imageAlt
|
|
4647
4645
|
}))), cardStyle === 'type-card-label' && /*#__PURE__*/React.createElement("div", {
|
|
4648
|
-
className: classnames(getStyle('cmp-card__content-category-wrapper'), categoryColour)
|
|
4646
|
+
className: classnames(getStyle$1('cmp-card__content-category-wrapper'), categoryColour)
|
|
4649
4647
|
}, contentCategoryLabel && /*#__PURE__*/React.createElement("p", null, contentCategoryLabel)), /*#__PURE__*/React.createElement("div", {
|
|
4650
|
-
className: getStyle('cmp-card__title-wrapper')
|
|
4648
|
+
className: getStyle$1('cmp-card__title-wrapper')
|
|
4651
4649
|
}, date && /*#__PURE__*/React.createElement("div", {
|
|
4652
|
-
className: getStyle('cmp-card__date')
|
|
4650
|
+
className: getStyle$1('cmp-card__date')
|
|
4653
4651
|
}, date), title && /*#__PURE__*/React.createElement("h4", {
|
|
4654
|
-
className: getStyle('cmp-card__title')
|
|
4652
|
+
className: getStyle$1('cmp-card__title')
|
|
4655
4653
|
}, title), (city || country) && /*#__PURE__*/React.createElement("p", {
|
|
4656
|
-
className: getStyle('cmp-card__city-country')
|
|
4654
|
+
className: getStyle$1('cmp-card__city-country')
|
|
4657
4655
|
}, city, " ", city && country ? ', ' : '', " ", country), cardStyle === 'type-card-panel' ? /*#__PURE__*/React.createElement("span", {
|
|
4658
|
-
className: classnames(getStyle('cmp-card__footer'),
|
|
4656
|
+
className: classnames(getStyle$1('cmp-card__footer'), cardFooterColour)
|
|
4659
4657
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
4660
4658
|
icon: faChevronRight
|
|
4661
4659
|
})) : cardStyle === 'label' ? /*#__PURE__*/React.createElement("span", {
|
|
4662
|
-
className: getStyle('cmp-card__footer')
|
|
4660
|
+
className: getStyle$1('cmp-card__footer')
|
|
4663
4661
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
4664
4662
|
icon: faArrowRight
|
|
4665
4663
|
})) : /*#__PURE__*/React.createElement("span", {
|
|
4666
|
-
className: getStyle('cmp-card__footer')
|
|
4664
|
+
className: getStyle$1('cmp-card__footer')
|
|
4667
4665
|
}, /*#__PURE__*/React.createElement("span", null, cta))))));
|
|
4668
4666
|
};
|
|
4669
4667
|
var ProductCard = function (_a) {
|
|
@@ -4680,30 +4678,30 @@ var ProductCard = function (_a) {
|
|
|
4680
4678
|
placeholder = _a.placeholder,
|
|
4681
4679
|
onClick = _a.onClick;
|
|
4682
4680
|
var width = cardSizeMapping(size);
|
|
4683
|
-
var mode = getStyle("cmp-card--".concat(cardStyle));
|
|
4681
|
+
var mode = getStyle$1("cmp-card--".concat(cardStyle));
|
|
4684
4682
|
var productImage = getImageUrl(imageUrl);
|
|
4685
4683
|
return /*#__PURE__*/React.createElement("div", {
|
|
4686
|
-
className: classnames(getStyle('cmp-card'), mode, width, className)
|
|
4684
|
+
className: classnames(getStyle$1('cmp-card'), mode, width, className)
|
|
4687
4685
|
}, /*#__PURE__*/React.createElement("a", {
|
|
4688
4686
|
href: cardLink,
|
|
4689
|
-
className: getStyle('cmp-card__link'),
|
|
4687
|
+
className: getStyle$1('cmp-card__link'),
|
|
4690
4688
|
onClick: onClick
|
|
4691
4689
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4692
|
-
className: getStyle('cmp-card--type-card-product__wrapper')
|
|
4690
|
+
className: getStyle$1('cmp-card--type-card-product__wrapper')
|
|
4693
4691
|
}, /*#__PURE__*/React.createElement("div", {
|
|
4694
|
-
className: getStyle('cmp-card--type-card-product__image')
|
|
4692
|
+
className: getStyle$1('cmp-card--type-card-product__image')
|
|
4695
4693
|
}, /*#__PURE__*/React.createElement("figure", null, /*#__PURE__*/React.createElement("img", {
|
|
4696
4694
|
src: productImage,
|
|
4697
4695
|
alt: imageAlt,
|
|
4698
4696
|
className: !imageUrl || placeholder ? 'placeholderImage' : undefined
|
|
4699
4697
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
4700
|
-
className: getStyle('cmp-card--type-card-product__meta')
|
|
4698
|
+
className: getStyle$1('cmp-card--type-card-product__meta')
|
|
4701
4699
|
}, /*#__PURE__*/React.createElement("p", {
|
|
4702
|
-
className: getStyle('cmp-card--type-card-product__title')
|
|
4700
|
+
className: getStyle$1('cmp-card--type-card-product__title')
|
|
4703
4701
|
}, title), productPrice && showProductPrice !== false ? /*#__PURE__*/React.createElement("p", {
|
|
4704
|
-
className: getStyle('cmp-card--type-card-product__prices')
|
|
4702
|
+
className: getStyle$1('cmp-card--type-card-product__prices')
|
|
4705
4703
|
}, productPrice) : '', /*#__PURE__*/React.createElement("p", {
|
|
4706
|
-
className: getStyle('cmp-card--type-card-product__cta')
|
|
4704
|
+
className: getStyle$1('cmp-card--type-card-product__cta')
|
|
4707
4705
|
}, cta ? cta : /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
4708
4706
|
icon: faArrowRight
|
|
4709
4707
|
}))))));
|
|
@@ -4719,6 +4717,16 @@ function _extends() {
|
|
|
4719
4717
|
}, _extends.apply(null, arguments);
|
|
4720
4718
|
}
|
|
4721
4719
|
|
|
4720
|
+
var styles = {"cmp-button":"Button-module__cmp-button___SMjDF","cmp-button--style-primary":"Button-module__cmp-button--style-primary___hfLAd","cmp-button--style-secondary":"Button-module__cmp-button--style-secondary___3Dqvg","cmp-button--style-tertiary":"Button-module__cmp-button--style-tertiary___Akcep","cmp-button--style-outlineWhite":"Button-module__cmp-button--style-outlineWhite___v69nN","cmp-button--style-outlineGrey":"Button-module__cmp-button--style-outlineGrey___sG5nd"};
|
|
4721
|
+
|
|
4722
|
+
// Utility function to retrieve correct SCSS module class names
|
|
4723
|
+
var getStyle = function (className) {
|
|
4724
|
+
if (styles[className]) return styles[className];
|
|
4725
|
+
var nestedMatch = Object.keys(styles).find(function (key) {
|
|
4726
|
+
return key.includes(className);
|
|
4727
|
+
});
|
|
4728
|
+
return nestedMatch ? styles[nestedMatch] : '';
|
|
4729
|
+
};
|
|
4722
4730
|
/**
|
|
4723
4731
|
* Primary UI component for user interaction
|
|
4724
4732
|
*/
|
|
@@ -4726,9 +4734,9 @@ var Button = function (_a) {
|
|
|
4726
4734
|
var style = _a.style,
|
|
4727
4735
|
label = _a.label,
|
|
4728
4736
|
props = __rest(_a, ["style", "label"]);
|
|
4729
|
-
var mode = style ? "cmp-button--style-".concat(style) : '';
|
|
4737
|
+
var mode = style ? getStyle("cmp-button--style-".concat(style)) : '';
|
|
4730
4738
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
4731
|
-
className: ['cmp-button', mode].join(' ')
|
|
4739
|
+
className: [getStyle('cmp-button'), mode].join(' ')
|
|
4732
4740
|
}, props), label);
|
|
4733
4741
|
};
|
|
4734
4742
|
|