@tet/tet-components 1.3.125-testing → 1.3.126-testing
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/cjs/tet-compare-card-v2.cjs.entry.js +6 -15
- package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.css +4 -2
- package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.js +5 -14
- package/dist/components/tet-compare-card-v2.js +6 -15
- package/dist/esm/tet-compare-card-v2.entry.js +6 -15
- package/dist/tet-components/p-0835a2ff.entry.js +1 -0
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/tet-components/p-ee60c495.entry.js +0 -1
package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.css
CHANGED
|
@@ -7730,8 +7730,10 @@
|
|
|
7730
7730
|
font-weight: 500;
|
|
7731
7731
|
color: var(--compare-card-benefit-text-color);
|
|
7732
7732
|
position: relative;
|
|
7733
|
-
padding
|
|
7734
|
-
|
|
7733
|
+
padding: 1rem 0.5rem 1rem 0.5rem;
|
|
7734
|
+
}
|
|
7735
|
+
.benefit-wrapper .benefit__dropdown {
|
|
7736
|
+
padding-bottom: 0.75rem;
|
|
7735
7737
|
}
|
|
7736
7738
|
.benefit-wrapper .benefit__name {
|
|
7737
7739
|
position: relative;
|
package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.js
CHANGED
|
@@ -196,16 +196,7 @@ export class TetCompareCardV2 {
|
|
|
196
196
|
return (_a = option === null || option === void 0 ? void 0 : option.bonuses) !== null && _a !== void 0 ? _a : [];
|
|
197
197
|
}
|
|
198
198
|
allBonuses() {
|
|
199
|
-
|
|
200
|
-
this.options.forEach(option => {
|
|
201
|
-
var _a;
|
|
202
|
-
(_a = option.bonuses) === null || _a === void 0 ? void 0 : _a.forEach(bonus => {
|
|
203
|
-
if (bonus.modalId && !unique[bonus.modalId]) {
|
|
204
|
-
unique[bonus.modalId] = bonus;
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
return Object.values(unique);
|
|
199
|
+
return this.options.flatMap(option => option.bonuses || []);
|
|
209
200
|
}
|
|
210
201
|
getTheme() {
|
|
211
202
|
if (this.darkMode) {
|
|
@@ -216,10 +207,10 @@ export class TetCompareCardV2 {
|
|
|
216
207
|
}
|
|
217
208
|
return this.theme;
|
|
218
209
|
}
|
|
219
|
-
benefitHandler(benefit) {
|
|
210
|
+
benefitHandler(benefit, isDropdownType = false) {
|
|
220
211
|
const benefitAsLink = benefit.dataAttributes && Object.keys(benefit.dataAttributes).length > 0;
|
|
221
212
|
const benefitAsImg = !!benefit.img;
|
|
222
|
-
return (h("div", { class:
|
|
213
|
+
return (h("div", { class: { 'benefit': true, 'benefit__dropdown': isDropdownType }, key: benefit.toggleKey }, benefitAsImg ? (h("img", { src: benefit.img, class: "benefit__icon benefit__img" })) : (h("tet-icon", { class: "benefit__icon icon", name: benefit.icon })), benefitAsLink ? (h("a", Object.assign({ class: "benefit__name benefit__link" }, (benefit.dataAttributes || {})), benefit.name)) : (h("span", { class: "benefit__name" }, benefit.name))));
|
|
223
214
|
}
|
|
224
215
|
/**
|
|
225
216
|
* Renders the card body.
|
|
@@ -274,7 +265,7 @@ export class TetCompareCardV2 {
|
|
|
274
265
|
"bonuss--inactive": !isActive
|
|
275
266
|
}, key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, tabindex: "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))));
|
|
276
267
|
}))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_m = this === null || this === void 0 ? void 0 : this.benefits) === null || _m === void 0 ? void 0 :
|
|
277
|
-
_m.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
|
|
268
|
+
_m.map((benefit) => (this.benefitHandler(benefit, true))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
|
|
278
269
|
const benefitAsLink = benefit.dataAttributes && Object.keys(benefit.dataAttributes).length > 0;
|
|
279
270
|
const benefitAsImg = !!benefit.img;
|
|
280
271
|
const isPreselected = this.preselectedKeys.includes(benefit.toggleKey);
|
|
@@ -285,7 +276,7 @@ export class TetCompareCardV2 {
|
|
|
285
276
|
}))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_o = this === null || this === void 0 ? void 0 : this.benefits) === null || _o === void 0 ? void 0 :
|
|
286
277
|
_o.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
|
|
287
278
|
'secondary-link': true
|
|
288
|
-
} }, this.secondaryLinkOpenBlank ? (h("a", { target: "_blank", href: secondaryLink }, this.secondaryLinkText)) : (h("a", { class: "tet-link", href: secondaryLink }, this.secondaryLinkText))))))), this.cardScript ? h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : ''));
|
|
279
|
+
} }, this.secondaryLinkOpenBlank ? (h("a", { class: "tet-link", target: "_blank", href: secondaryLink }, this.secondaryLinkText)) : (h("a", { class: "tet-link", href: secondaryLink }, this.secondaryLinkText))))))), this.cardScript ? h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : ''));
|
|
289
280
|
}
|
|
290
281
|
render() {
|
|
291
282
|
if (this.showLoader) {
|