@tet/tet-components 1.4.38-testing → 1.4.39-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.
Files changed (35) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tet-checkbox_3.cjs.entry.js +9 -8
  3. package/dist/cjs/tet-components.cjs.js +1 -1
  4. package/dist/cjs/tet-snicker-card.cjs.entry.js +39 -21
  5. package/dist/collection/components/advanced/cards/tet-snicker-card/tet-snicker-card.css +17 -18
  6. package/dist/collection/components/advanced/cards/tet-snicker-card/tet-snicker-card.js +42 -22
  7. package/dist/collection/components/simple/inputs/tet-dropdown/tet-dropdown.js +9 -8
  8. package/dist/components/{p-f1c0bbf0.js → p-7e8da393.js} +9 -8
  9. package/dist/components/{p-249cff3a.js → p-9c6e9283.js} +1 -1
  10. package/dist/components/{p-a9850168.js → p-a36b87da.js} +2 -2
  11. package/dist/components/{p-a4251929.js → p-d9e2f226.js} +2 -2
  12. package/dist/components/tet-address-offers-view.js +3 -3
  13. package/dist/components/tet-address-offers.js +1 -1
  14. package/dist/components/tet-compare-card-v2.js +1 -1
  15. package/dist/components/tet-compare-card.js +1 -1
  16. package/dist/components/tet-compare-cards-tab.js +3 -3
  17. package/dist/components/tet-compare-cards.js +1 -1
  18. package/dist/components/tet-display.js +1 -1
  19. package/dist/components/tet-divider.js +1 -1
  20. package/dist/components/tet-dropdown.js +1 -1
  21. package/dist/components/tet-position.js +1 -1
  22. package/dist/components/tet-snicker-card.js +43 -23
  23. package/dist/components/tet-text.js +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/tet-checkbox_3.entry.js +9 -8
  26. package/dist/esm/tet-components.js +1 -1
  27. package/dist/esm/tet-snicker-card.entry.js +39 -21
  28. package/dist/tet-components/p-325d48ee.entry.js +1 -0
  29. package/dist/tet-components/p-4fb9f367.entry.js +1 -0
  30. package/dist/tet-components/tet-components.esm.js +1 -1
  31. package/dist/types/components/advanced/cards/tet-snicker-card/tet-snicker-card.d.ts +5 -2
  32. package/dist/types/components.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/dist/tet-components/p-2292f587.entry.js +0 -1
  35. package/dist/tet-components/p-9f8602cd.entry.js +0 -1
@@ -9,10 +9,11 @@ const DESKTOP_BREAKPOINT = 500;
9
9
  */
10
10
  export class TetSnickerCard {
11
11
  constructor() {
12
+ this.isDesktopResolution = false;
12
13
  this.isAccordionOpen = true;
13
14
  this.theme = 'light';
14
15
  this.state = 'default';
15
- this.selectionType = 'radio';
16
+ this.selectionType = undefined;
16
17
  this.isTabStop = true;
17
18
  this.subscriptionLabel = undefined;
18
19
  this.topBadge = undefined;
@@ -44,7 +45,6 @@ export class TetSnickerCard {
44
45
  ]);
45
46
  /** @private Reference to accordion element used for custom toggle. */
46
47
  accordionEl;
47
- isDesktopResolution = false;
48
48
  /** Emitted when bottom link is clicked. Emits link text. */
49
49
  bottomLinkClick;
50
50
  /** Emitted when benefit link is clicked. Emits link text. */
@@ -89,6 +89,23 @@ export class TetSnickerCard {
89
89
  onAccordionConfigChanged() {
90
90
  this.ensureDesktopOpenWithoutToggle();
91
91
  }
92
+ onSelectionConfigChanged(newConfig, oldConfig) {
93
+ const primaryOptionsChanged = this.haveDropdownOptionsChanged(newConfig?.primaryDropdown, oldConfig?.primaryDropdown);
94
+ const secondaryOptionsChanged = this.haveDropdownOptionsChanged(newConfig?.secondaryDropdown, oldConfig?.secondaryDropdown);
95
+ const patch = {};
96
+ let hasChanges = false;
97
+ if (primaryOptionsChanged && this.primaryValue !== undefined) {
98
+ patch.primaryValue = undefined;
99
+ hasChanges = true;
100
+ }
101
+ if (secondaryOptionsChanged && this.secondaryValue !== undefined) {
102
+ patch.secondaryValue = undefined;
103
+ hasChanges = true;
104
+ }
105
+ if (hasChanges) {
106
+ this.emitSelectionStateChanged(patch);
107
+ }
108
+ }
92
109
  onResize() {
93
110
  const wasDesktop = this.isDesktopResolution;
94
111
  this.checkDesktopResolution();
@@ -116,6 +133,8 @@ export class TetSnickerCard {
116
133
  };
117
134
  this.selectionStateChange.emit(nextState);
118
135
  };
136
+ getDropdownValueSignature = (dropdown) => JSON.stringify((dropdown?.options ?? []).map((option) => option.value));
137
+ haveDropdownOptionsChanged = (newDropdown, oldDropdown) => this.getDropdownValueSignature(newDropdown) !== this.getDropdownValueSignature(oldDropdown);
119
138
  onSelectionCounterValueChange = ({ detail }) => {
120
139
  this.emitSelectionStateChanged({ count: detail });
121
140
  };
@@ -221,7 +240,7 @@ export class TetSnickerCard {
221
240
  const actionLabel = isSelectionAdded
222
241
  ? (removeButtonLabel ?? t('components-snicker-card-remove-from-cart'))
223
242
  : (addButtonLabel ?? t('components-snicker-card-add-to-cart'));
224
- return (h("div", { class: "selection with-divider" }, primaryDropdown && (h("tet-dropdown", { class: "selection__dropdown", theme: this.theme, label: primaryDropdown.label, buttonLabel: primaryDropdown.buttonLabel, options: primaryDropdown.options, disabled: isStateDisabled || (primaryDropdown.disabled ?? false), closeOnSelection: primaryDropdown.closeOnSelection ?? true, onOptionSelected: this.onDropdownOptionSelected('primary') })), secondaryDropdown && (h("tet-dropdown", { class: "selection__dropdown", theme: this.theme, label: secondaryDropdown.label, buttonLabel: secondaryDropdown.buttonLabel, options: secondaryDropdown.options, disabled: isStateDisabled || (secondaryDropdown.disabled ?? false), closeOnSelection: secondaryDropdown.closeOnSelection ?? true, onOptionSelected: this.onDropdownOptionSelected('secondary') })), stepper && (h("tet-stepper-input", { class: "selection__stepper", theme: this.theme, disabled: isStateDisabled, value: initialStepperValue, min: stepper.min, max: stepper.max, step: stepper.step ?? 1, accessibilityLabel: stepper.label, onInputValueChanged: this.onSelectionCounterValueChange })), !isSelectionAdded && (h("tet-button", { class: "selection__button", onClick: this.onSelectionAdd, size: "medium", type: "primary", theme: this.theme, disabled: isStateDisabled, iconName: "tc-cart-outline", iconPosition: "left", accessibilityLabel: actionLabel }, actionLabel)), isSelectionAdded && (h("tet-button", { class: "selection__button selection__button--in-cart selection__button--mobile", onClick: this.onSelectionRemove, size: "medium", type: "secondary", theme: this.theme, disabled: isStateDisabled, iconName: "tc-trash", iconPosition: "left", accessibilityLabel: actionLabel }, actionLabel)), isSelectionAdded && (h("tet-button", { class: "selection__button selection__button--in-cart selection__button--desktop", onClick: this.onSelectionRemove, size: "medium", type: "primary", theme: this.theme, disabled: isStateDisabled, iconName: "tc-trash", iconMode: true, iconPosition: "left", accessibilityLabel: actionLabel, customColorCode: this.theme === 'light' ? '#F7F7F7' : '#18191B', customColorContentTone: this.theme === 'light' ? 'dark' : 'light' }))));
243
+ return (h("div", { class: "selection" }, primaryDropdown && (h("tet-dropdown", { class: "selection__dropdown", theme: this.theme, label: primaryDropdown.label, buttonLabel: primaryDropdown.buttonLabel, options: primaryDropdown.options, disabled: isStateDisabled || (primaryDropdown.disabled ?? false), closeOnSelection: primaryDropdown.closeOnSelection ?? true, onOptionSelected: this.onDropdownOptionSelected('primary') })), secondaryDropdown && (h("tet-dropdown", { class: "selection__dropdown", theme: this.theme, label: secondaryDropdown.label, buttonLabel: secondaryDropdown.buttonLabel, options: secondaryDropdown.options, disabled: isStateDisabled || (secondaryDropdown.disabled ?? false), closeOnSelection: secondaryDropdown.closeOnSelection ?? true, onOptionSelected: this.onDropdownOptionSelected('secondary') })), stepper && (h("tet-stepper-input", { class: "selection__stepper", theme: this.theme, disabled: isStateDisabled, value: initialStepperValue, displayMode: this.isDesktopResolution ? 'input' : 'text', min: stepper.min, max: stepper.max, step: stepper.step ?? 1, accessibilityLabel: stepper.label, onInputValueChanged: this.onSelectionCounterValueChange })), !isSelectionAdded && (h("tet-button", { class: "selection__button", onClick: this.onSelectionAdd, size: "medium", type: "primary", theme: this.theme, disabled: isStateDisabled, iconName: "tc-cart-outline", iconPosition: "left", accessibilityLabel: actionLabel }, actionLabel)), isSelectionAdded && (h("tet-button", { class: "selection__button selection__button--in-cart selection__button--mobile", onClick: this.onSelectionRemove, size: "medium", type: "secondary", theme: this.theme, disabled: isStateDisabled, iconName: "tc-trash", iconPosition: "left", accessibilityLabel: actionLabel }, actionLabel)), isSelectionAdded && (h("tet-button", { class: "selection__button selection__button--in-cart selection__button--desktop", onClick: this.onSelectionRemove, size: "medium", type: "primary", theme: this.theme, disabled: isStateDisabled, iconName: "tc-trash", iconMode: true, iconPosition: "left", accessibilityLabel: actionLabel, customColorCode: this.theme === 'light' ? '#F7F7F7' : '#18191B', customColorContentTone: this.theme === 'light' ? 'dark' : 'light' }))));
225
244
  };
226
245
  renderBenefits = () => {
227
246
  const benefits = this.benefits ?? [];
@@ -235,7 +254,7 @@ export class TetSnickerCard {
235
254
  if (benefits.length === 0 && !this.benefitLink) {
236
255
  return null;
237
256
  }
238
- return (h("ul", { class: "benefits" }, benefits.map((benefit) => (h("li", { class: "benefits__item" }, h("tet-icon", { theme: this.theme, class: "benefits__icon", type: benefitsIconType, name: "tc-check" }), h("span", { class: "benefits__text" }, benefit)))), this.benefitLink && (h("li", { class: "benefits__item" }, h("tet-icon", { theme: this.theme, class: "benefits__icon", type: benefitsIconType, name: "tc-check" }), h("button", { type: "button", class: {
257
+ return (h("ul", { class: "benefits with-divider" }, benefits.map((benefit) => (h("li", { class: "benefits__item" }, h("tet-icon", { theme: this.theme, class: "benefits__icon", type: benefitsIconType, name: "tc-check" }), h("span", { class: "benefits__text" }, benefit)))), this.benefitLink && (h("li", { class: "benefits__item" }, h("tet-icon", { theme: this.theme, class: "benefits__icon", type: benefitsIconType, name: "tc-check" }), h("button", { type: "button", class: {
239
258
  'button-naked': true,
240
259
  'benefits__link': true,
241
260
  'benefits__link--unavailable': this.isUnavailableState,
@@ -249,47 +268,46 @@ export class TetSnickerCard {
249
268
  if (packageItems.length === 0) {
250
269
  return null;
251
270
  }
252
- return (h("div", { class: "packages with-divider" }, packageItems.map((item) => (h("div", { class: "packages__item" }, h("img", { class: "packages__image", src: item, alt: "", loading: "lazy", decoding: "async" }))))));
271
+ return (h("div", { class: "packages" }, packageItems.map((item) => (h("div", { class: "packages__item" }, h("img", { class: "packages__image", src: item, alt: "", loading: "lazy", decoding: "async" }))))));
253
272
  };
254
273
  renderSubscriptionItems = () => {
255
274
  const subscriptionItems = this.subscriptionItems ?? [];
256
275
  if (subscriptionItems.length === 0) {
257
276
  return null;
258
277
  }
259
- return (h("div", { class: "subscriptions" }, subscriptionItems.map((item) => (h("div", { class: "subscriptions__item" }, h("img", { class: "subscriptions__image", src: item, alt: "", loading: "lazy", decoding: "async" }))))));
278
+ return (h("div", { class: "subscriptions with-divider" }, subscriptionItems.map((item) => (h("div", { class: "subscriptions__item" }, h("img", { class: "subscriptions__image", src: item, alt: "", loading: "lazy", decoding: "async" }))))));
260
279
  };
261
280
  renderInlineMessage = () => {
262
281
  const inlineMessage = this.inlineMessage;
263
282
  if (!inlineMessage) {
264
283
  return null;
265
284
  }
266
- return (h("div", { class: { message: true, 'with-divider': !this.selectionConfig } }, h("tet-inline-message", { class: "message__inline", variant: inlineMessage.variant ?? 'info', theme: this.theme }, h("span", { slot: "title" }, inlineMessage.title), h("span", { slot: "description" }, inlineMessage.message))));
285
+ return (h("div", { class: { message: true, 'with-divider': true } }, h("tet-inline-message", { class: "message__inline", variant: inlineMessage.variant ?? 'info', theme: this.theme }, h("span", { slot: "title" }, inlineMessage.title), h("span", { slot: "description" }, inlineMessage.message))));
267
286
  };
268
287
  renderBottomLink = () => {
269
288
  if (!this.bottomLinkText) {
270
289
  return null;
271
290
  }
272
- return (h("div", { class: "footer__contract" }, h("button", { type: "button", class: {
291
+ return (h("button", { type: "button", class: {
273
292
  'button-naked': true,
274
293
  'tet-link': true,
275
294
  disabled: this.isDisabledState,
276
295
  [this.theme]: true,
277
- }, disabled: this.isDisabledState, onClick: this.onBottomLinkClick }, this.bottomLinkText)));
296
+ 'footer__link': true,
297
+ }, disabled: this.isDisabledState, onClick: this.onBottomLinkClick }, this.bottomLinkText));
278
298
  };
279
- renderBottomInfo = () => {
299
+ renderBottomToggle = () => {
280
300
  const hasDesktopAccordion = this.hasDesktopAccordionToggle;
281
301
  const toggleLabel = this.isAccordionOpen
282
302
  ? this.accordionConfig?.openLabelDesktop
283
303
  : this.accordionConfig?.closedLabelDesktop;
284
- const hasRemark = !!this.bottomRemark;
285
- const hasFooterInfo = hasRemark || hasDesktopAccordion;
286
- if (!hasFooterInfo) {
304
+ if (!hasDesktopAccordion) {
287
305
  return null;
288
306
  }
289
- return (h("div", { class: "footer__info" }, hasRemark && h("p", { class: "footer__remark" }, this.bottomRemark), hasDesktopAccordion && (h("button", { class: "footer__toggle", onClick: this.onBottomAccordionToggle }, h("span", { class: "footer__toggle-label" }, toggleLabel), h("tet-icon", { theme: this.theme, class: {
307
+ return (h("button", { class: "footer__toggle", onClick: this.onBottomAccordionToggle }, h("span", { class: "footer__toggle-label" }, toggleLabel), h("tet-icon", { theme: this.theme, class: {
290
308
  'footer__toggle-icon': true,
291
309
  open: this.isAccordionOpen,
292
- }, type: "primary", name: "chevron-down" })))));
310
+ }, type: "primary", name: "chevron-down" })));
293
311
  };
294
312
  renderBottomSection = () => {
295
313
  const hasLink = !!this.bottomLinkText;
@@ -299,7 +317,7 @@ export class TetSnickerCard {
299
317
  if (!hasLink && !hasRemark && !hasDesktopAccordion) {
300
318
  return null;
301
319
  }
302
- return (h("div", { class: { footer: true, 'footer--desktop-only': isBottomContentEmpty } }, this.renderBottomLink(), this.renderBottomInfo()));
320
+ return (h("div", { class: { footer: true, 'footer--desktop-only': isBottomContentEmpty } }, h("div", { class: "footer__contract" }, this.renderBottomLink(), hasRemark && h("p", { class: "footer__remark" }, this.bottomRemark)), this.renderBottomToggle()));
303
321
  };
304
322
  renderIndicator = () => {
305
323
  const indicator = this.indicator;
@@ -337,14 +355,13 @@ export class TetSnickerCard {
337
355
  'header--hoverable': this.isHoverable,
338
356
  'header--closed': !this.isAccordionOpen,
339
357
  'header--no-price': !hasPrice,
340
- 'with-divider': true
341
358
  } }, h("div", { class: "header__top" }, h("div", { class: "header__top-left", ref: (el) => (this.focusTargetEl = el ?? undefined), tabindex: selectionTabIndex, onKeyDown: this.isSelectable ? a11yBtnClick : undefined, role: this.isSelectable ? this.selectionType : undefined, "aria-checked": this.isSelectable ? String(this.isSelectedState) : undefined }, this.renderIndicator(), h("h3", { class: "header__title" }, this.cardTitle)), h("button", { type: "button", class: "header__accordion-toggle", onClick: this.onHeaderAccordionToggle }, h("tet-icon", { theme: this.theme, class: {
342
359
  'header__accordion-toggle-icon': true,
343
360
  open: this.isAccordionOpen,
344
361
  }, type: "primary", name: "chevron-down" }))), h("div", { class: "header__content" }, this.subtitle && h("p", { class: "header__subtitle" }, this.subtitle), hasPrice && (h("div", { class: "header__price-line" }, h("div", { class: "header__price-main" }, pricePrefix && h("span", { class: "header__price-prefix" }, pricePrefix), h("span", { class: "header__price-value" }, displayedPrice), priceSuffix && h("span", { class: "header__price-suffix" }, priceSuffix)), displayedOldPrice && (h("div", { class: "header__old-price" }, displayedOldPrice, priceSuffix ? ` ${priceSuffix}` : '')))), this.description && h("p", { class: "header__description" }, this.description))));
345
362
  };
346
363
  render() {
347
- return (h(Host, { key: '334574c4d905e454078fc368e00b5d44133bbce4' }, h("div", { key: '5d7a1aee8f173d3e49c883f6ac8d8a48967b054b', class: {
364
+ return (h(Host, { key: 'd0f0ea76ed9e8999c18a952d184e87e5da254145' }, h("div", { key: 'b25ad0501e0ce9f88ee26d32e281786a28db92b2', class: {
348
365
  'snicker-card': true,
349
366
  [this.theme]: true,
350
367
  'snicker-card--hoverable': this.isHoverable,
@@ -353,7 +370,7 @@ export class TetSnickerCard {
353
370
  'snicker-card--unavailable': this.isUnavailableState,
354
371
  'snicker-card--subscribed': this.isSubscribedState,
355
372
  'snicker-card--with-badge': !!this.topBadge
356
- }, onClick: this.onCardClick }, this.renderTopBadge(), this.renderSubscriptionStrip(), h("tet-accordion", { key: '25dd17b759693bd3c8bc4455fa1df759e53f01a9', ref: (el) => (this.accordionEl = el), class: "accordion", theme: this.theme, isOpen: this.isAccordionOpen, onOpenChanged: this.onAccordionChanged, transparentBackground: true, isHeaderInteractive: false }, h("div", { key: 'b7ea6cd5da0e5a7297c8a279dbf9cc6341461cc1', slot: "header", class: "accordion__header" }, this.renderHeader()), h("div", { key: 'f3c0d643fc84414c5fe948fb55e4ed22e941a5a6', class: "accordion__content" }, this.renderInlineMessage(), this.renderSelection(), this.renderBenefits(), this.renderPackageItems(), this.renderSubscriptionItems())), this.renderBottomSection())));
373
+ }, onClick: this.onCardClick }, this.renderTopBadge(), this.renderSubscriptionStrip(), h("tet-accordion", { key: '4dc027724c506e98c1d4a5d68f0c47f9ce41c5e5', ref: (el) => (this.accordionEl = el), class: "accordion", theme: this.theme, isOpen: this.isAccordionOpen, onOpenChanged: this.onAccordionChanged, transparentBackground: true, isHeaderInteractive: false }, h("div", { key: '2a03e68de5dfc0754d72c34dcabde4e1c8e904e2', slot: "header", class: "accordion__header" }, this.renderHeader()), h("div", { key: '0b2c0128d3bf8645db58591a1611b3175c6762ab', class: "accordion__content" }, this.renderInlineMessage(), this.renderSelection(), this.renderBenefits(), this.renderPackageItems(), this.renderSubscriptionItems())), this.renderBottomSection())));
357
374
  }
358
375
  static get is() { return "tet-snicker-card"; }
359
376
  static get encapsulation() { return "shadow"; }
@@ -426,14 +443,13 @@ export class TetSnickerCard {
426
443
  }
427
444
  },
428
445
  "required": false,
429
- "optional": false,
446
+ "optional": true,
430
447
  "docs": {
431
448
  "tags": [],
432
449
  "text": "Functional selection behavior (`radio` | `checkbox`) used for card interaction and accessibility roles."
433
450
  },
434
451
  "attribute": "selection-type",
435
- "reflect": false,
436
- "defaultValue": "'radio'"
452
+ "reflect": false
437
453
  },
438
454
  "isTabStop": {
439
455
  "type": "boolean",
@@ -824,6 +840,7 @@ export class TetSnickerCard {
824
840
  }
825
841
  static get states() {
826
842
  return {
843
+ "isDesktopResolution": {},
827
844
  "isAccordionOpen": {}
828
845
  };
829
846
  }
@@ -958,6 +975,9 @@ export class TetSnickerCard {
958
975
  return [{
959
976
  "propName": "accordionConfig",
960
977
  "methodName": "onAccordionConfigChanged"
978
+ }, {
979
+ "propName": "selectionConfig",
980
+ "methodName": "onSelectionConfigChanged"
961
981
  }];
962
982
  }
963
983
  static get listeners() {
@@ -73,6 +73,7 @@ export class TetDropdown {
73
73
  const newKeysAndValues = newOptions.map(({ label, labelRight, value }) => label + labelRight + value).join();
74
74
  const oldKeysAndValues = oldOptions.map(({ label, labelRight, value }) => label + labelRight + value).join();
75
75
  if (newKeysAndValues !== oldKeysAndValues) {
76
+ this.selectedOptionIndexes = [];
76
77
  this.preselectOption();
77
78
  }
78
79
  }
@@ -340,27 +341,27 @@ export class TetDropdown {
340
341
  if (allowMultiple || selectedOptionIndexes.length === 0) {
341
342
  return buttonLabel;
342
343
  }
343
- return options[selectedOptionIndexes[0]].label;
344
+ return options[selectedOptionIndexes[0]]?.label ?? buttonLabel;
344
345
  }
345
346
  /**
346
347
  * The dropdown toggle button label right.
347
348
  */
348
349
  get currentButtonLabelRight() {
349
- const { buttonLabel, allowMultiple, options, selectedOptionIndexes } = this;
350
+ const { allowMultiple, labelRight, options, selectedOptionIndexes } = this;
350
351
  if (allowMultiple || selectedOptionIndexes.length === 0) {
351
- return buttonLabel;
352
+ return labelRight;
352
353
  }
353
- return options[selectedOptionIndexes[0]].labelRight;
354
+ return options[selectedOptionIndexes[0]]?.labelRight ?? labelRight;
354
355
  }
355
356
  /**
356
357
  * The dropdown toggle button label right color.
357
358
  */
358
359
  get currentButtonLabelRightColor() {
359
- const { buttonLabel, allowMultiple, options, selectedOptionIndexes } = this;
360
+ const { allowMultiple, labelRightColor, options, selectedOptionIndexes } = this;
360
361
  if (allowMultiple || selectedOptionIndexes.length === 0) {
361
- return buttonLabel;
362
+ return labelRightColor;
362
363
  }
363
- return options[selectedOptionIndexes[0]].labelRightColor;
364
+ return options[selectedOptionIndexes[0]]?.labelRightColor ?? labelRightColor;
364
365
  }
365
366
  /**
366
367
  * Returns all the currently selected options.
@@ -375,7 +376,7 @@ export class TetDropdown {
375
376
  }
376
377
  render() {
377
378
  const { theme, isOpen, isKeyboardFocus } = this;
378
- return (h(Host, { key: 'f618d4e39eaeca3ccdb48ca5d4a9e4072dbbf070' }, h("div", { key: 'a5fc6419269f8db3ddb4fad6d820bf04ff97c06a', class: { 'dropdown': true, 'dropdown--open': isOpen, 'focus-visible': isKeyboardFocus && isOpen, [`${theme}`]: true } }, this.renderButton(), this.renderOptions())));
379
+ return (h(Host, { key: 'd1f9131eca01ce9552551821c38e6b80e66101e0' }, h("div", { key: '0cc2d8642d2391386b83ea7c0c086bfc2dc38a3e', class: { 'dropdown': true, 'dropdown--open': isOpen, 'focus-visible': isKeyboardFocus && isOpen, [`${theme}`]: true } }, this.renderButton(), this.renderOptions())));
379
380
  }
380
381
  static get is() { return "tet-dropdown"; }
381
382
  static get encapsulation() { return "shadow"; }
@@ -82,6 +82,7 @@ const TetDropdown = /*@__PURE__*/ proxyCustomElement(class TetDropdown extends H
82
82
  const newKeysAndValues = newOptions.map(({ label, labelRight, value }) => label + labelRight + value).join();
83
83
  const oldKeysAndValues = oldOptions.map(({ label, labelRight, value }) => label + labelRight + value).join();
84
84
  if (newKeysAndValues !== oldKeysAndValues) {
85
+ this.selectedOptionIndexes = [];
85
86
  this.preselectOption();
86
87
  }
87
88
  }
@@ -345,27 +346,27 @@ const TetDropdown = /*@__PURE__*/ proxyCustomElement(class TetDropdown extends H
345
346
  if (allowMultiple || selectedOptionIndexes.length === 0) {
346
347
  return buttonLabel;
347
348
  }
348
- return options[selectedOptionIndexes[0]].label;
349
+ return options[selectedOptionIndexes[0]]?.label ?? buttonLabel;
349
350
  }
350
351
  /**
351
352
  * The dropdown toggle button label right.
352
353
  */
353
354
  get currentButtonLabelRight() {
354
- const { buttonLabel, allowMultiple, options, selectedOptionIndexes } = this;
355
+ const { allowMultiple, labelRight, options, selectedOptionIndexes } = this;
355
356
  if (allowMultiple || selectedOptionIndexes.length === 0) {
356
- return buttonLabel;
357
+ return labelRight;
357
358
  }
358
- return options[selectedOptionIndexes[0]].labelRight;
359
+ return options[selectedOptionIndexes[0]]?.labelRight ?? labelRight;
359
360
  }
360
361
  /**
361
362
  * The dropdown toggle button label right color.
362
363
  */
363
364
  get currentButtonLabelRightColor() {
364
- const { buttonLabel, allowMultiple, options, selectedOptionIndexes } = this;
365
+ const { allowMultiple, labelRightColor, options, selectedOptionIndexes } = this;
365
366
  if (allowMultiple || selectedOptionIndexes.length === 0) {
366
- return buttonLabel;
367
+ return labelRightColor;
367
368
  }
368
- return options[selectedOptionIndexes[0]].labelRightColor;
369
+ return options[selectedOptionIndexes[0]]?.labelRightColor ?? labelRightColor;
369
370
  }
370
371
  /**
371
372
  * Returns all the currently selected options.
@@ -380,7 +381,7 @@ const TetDropdown = /*@__PURE__*/ proxyCustomElement(class TetDropdown extends H
380
381
  }
381
382
  render() {
382
383
  const { theme, isOpen, isKeyboardFocus } = this;
383
- return (h(Host, { key: 'f618d4e39eaeca3ccdb48ca5d4a9e4072dbbf070' }, h("div", { key: 'a5fc6419269f8db3ddb4fad6d820bf04ff97c06a', class: { 'dropdown': true, 'dropdown--open': isOpen, 'focus-visible': isKeyboardFocus && isOpen, [`${theme}`]: true } }, this.renderButton(), this.renderOptions())));
384
+ return (h(Host, { key: 'd1f9131eca01ce9552551821c38e6b80e66101e0' }, h("div", { key: '0cc2d8642d2391386b83ea7c0c086bfc2dc38a3e', class: { 'dropdown': true, 'dropdown--open': isOpen, 'focus-visible': isKeyboardFocus && isOpen, [`${theme}`]: true } }, this.renderButton(), this.renderOptions())));
384
385
  }
385
386
  static get watchers() { return {
386
387
  "options": ["onOptionsChange"]
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, d as createEvent, h } from './p-25b93e8f.js
2
2
  import { g as getConvertedPixels } from './p-165a8492.js';
3
3
  import { d as defineCustomElement$5 } from './p-304bb88b.js';
4
4
  import { d as defineCustomElement$4 } from './p-5c579a12.js';
5
- import { d as defineCustomElement$3 } from './p-f1c0bbf0.js';
5
+ import { d as defineCustomElement$3 } from './p-7e8da393.js';
6
6
  import { d as defineCustomElement$2 } from './p-a8a9e7a2.js';
7
7
  import { d as defineCustomElement$1 } from './p-52fcf7aa.js';
8
8
 
@@ -7,8 +7,8 @@ import { f as formatPrice } from './p-e1e74d01.js';
7
7
  import { d as defineCustomElement$a } from './p-4cff04db.js';
8
8
  import { d as defineCustomElement$9 } from './p-304bb88b.js';
9
9
  import { d as defineCustomElement$8 } from './p-5c579a12.js';
10
- import { d as defineCustomElement$7 } from './p-249cff3a.js';
11
- import { d as defineCustomElement$6 } from './p-f1c0bbf0.js';
10
+ import { d as defineCustomElement$7 } from './p-9c6e9283.js';
11
+ import { d as defineCustomElement$6 } from './p-7e8da393.js';
12
12
  import { d as defineCustomElement$5 } from './p-a8a9e7a2.js';
13
13
  import { d as defineCustomElement$4 } from './p-19a63760.js';
14
14
  import { d as defineCustomElement$3 } from './p-0b6cb3f6.js';
@@ -4,8 +4,8 @@ import { p as productComparison } from './p-aa2f5368.js';
4
4
  import { g as generateFormUrl } from './p-6e631dc7.js';
5
5
  import { d as defineCustomElement$7 } from './p-304bb88b.js';
6
6
  import { d as defineCustomElement$6 } from './p-5c579a12.js';
7
- import { d as defineCustomElement$5 } from './p-249cff3a.js';
8
- import { d as defineCustomElement$4 } from './p-f1c0bbf0.js';
7
+ import { d as defineCustomElement$5 } from './p-9c6e9283.js';
8
+ import { d as defineCustomElement$4 } from './p-7e8da393.js';
9
9
  import { d as defineCustomElement$3 } from './p-a8a9e7a2.js';
10
10
  import { d as defineCustomElement$2 } from './p-19a63760.js';
11
11
  import { d as defineCustomElement$1 } from './p-52fcf7aa.js';
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, f as forceUpdate, h as h$1, c as Host, F as Fragment } from './p-25b93e8f.js';
2
2
  import { h, d as defineCustomElement$a } from './p-a8a9e7a2.js';
3
3
  import { p as processTranslations, t as translate } from './p-6f0c4583.js';
4
- import { d as defineCustomElement$n } from './p-a9850168.js';
4
+ import { d as defineCustomElement$n } from './p-a36b87da.js';
5
5
  import { d as defineCustomElement$m } from './p-a8046c1e.js';
6
6
  import { d as defineCustomElement$l } from './p-4cff04db.js';
7
7
  import { d as defineCustomElement$k } from './p-c9a25c76.js';
@@ -10,10 +10,10 @@ import { d as defineCustomElement$i } from './p-847f5e8e.js';
10
10
  import { d as defineCustomElement$h } from './p-09858189.js';
11
11
  import { d as defineCustomElement$g } from './p-304bb88b.js';
12
12
  import { d as defineCustomElement$f } from './p-5c579a12.js';
13
- import { d as defineCustomElement$e } from './p-249cff3a.js';
13
+ import { d as defineCustomElement$e } from './p-9c6e9283.js';
14
14
  import { d as defineCustomElement$d } from './p-f76fad86.js';
15
15
  import { d as defineCustomElement$c } from './p-0023e4a7.js';
16
- import { d as defineCustomElement$b } from './p-f1c0bbf0.js';
16
+ import { d as defineCustomElement$b } from './p-7e8da393.js';
17
17
  import { d as defineCustomElement$9 } from './p-22a20d5a.js';
18
18
  import { d as defineCustomElement$8 } from './p-58991856.js';
19
19
  import { d as defineCustomElement$7 } from './p-19a63760.js';
@@ -1,4 +1,4 @@
1
- import { T as TetAddressOffers$1, d as defineCustomElement$1 } from './p-a9850168.js';
1
+ import { T as TetAddressOffers$1, d as defineCustomElement$1 } from './p-a36b87da.js';
2
2
 
3
3
  const TetAddressOffers = TetAddressOffers$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import './p-91b4c15e.js';
3
3
  import { p as productComparison } from './p-aa2f5368.js';
4
4
  import { d as defineCustomElement$7 } from './p-304bb88b.js';
5
5
  import { d as defineCustomElement$6 } from './p-5c579a12.js';
6
- import { d as defineCustomElement$5 } from './p-f1c0bbf0.js';
6
+ import { d as defineCustomElement$5 } from './p-7e8da393.js';
7
7
  import { d as defineCustomElement$4 } from './p-a8a9e7a2.js';
8
8
  import { d as defineCustomElement$3 } from './p-19a63760.js';
9
9
  import { d as defineCustomElement$2 } from './p-ee54db57.js';
@@ -1,4 +1,4 @@
1
- import { T as TetCompareCard$1, d as defineCustomElement$1 } from './p-249cff3a.js';
1
+ import { T as TetCompareCard$1, d as defineCustomElement$1 } from './p-9c6e9283.js';
2
2
 
3
3
  const TetCompareCard = TetCompareCard$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,12 +1,12 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-25b93e8f.js';
2
- import { f as fillProductData, d as defineCustomElement$a } from './p-a4251929.js';
2
+ import { f as fillProductData, d as defineCustomElement$a } from './p-d9e2f226.js';
3
3
  import './p-91b4c15e.js';
4
4
  import { p as productComparison } from './p-aa2f5368.js';
5
5
  import { C as CompareCardsTabProductsFilters, d as defineCustomElement$e } from './p-4cff04db.js';
6
6
  import { d as defineCustomElement$d } from './p-304bb88b.js';
7
7
  import { d as defineCustomElement$c } from './p-5c579a12.js';
8
- import { d as defineCustomElement$b } from './p-249cff3a.js';
9
- import { d as defineCustomElement$9 } from './p-f1c0bbf0.js';
8
+ import { d as defineCustomElement$b } from './p-9c6e9283.js';
9
+ import { d as defineCustomElement$9 } from './p-7e8da393.js';
10
10
  import { d as defineCustomElement$8 } from './p-a8a9e7a2.js';
11
11
  import { d as defineCustomElement$7 } from './p-19a63760.js';
12
12
  import { d as defineCustomElement$6 } from './p-dd3541f5.js';
@@ -1,4 +1,4 @@
1
- import { T as TetCompareCards$1, d as defineCustomElement$1 } from './p-a4251929.js';
1
+ import { T as TetCompareCards$1, d as defineCustomElement$1 } from './p-d9e2f226.js';
2
2
 
3
3
  const TetCompareCards = TetCompareCards$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import { c as copyTextToClipboard } from './p-21b64eb5.js';
3
3
  import { d as defineCustomElement$8 } from './p-a6f7c798.js';
4
4
  import { d as defineCustomElement$7 } from './p-304bb88b.js';
5
5
  import { d as defineCustomElement$6 } from './p-5c579a12.js';
6
- import { d as defineCustomElement$5 } from './p-f1c0bbf0.js';
6
+ import { d as defineCustomElement$5 } from './p-7e8da393.js';
7
7
  import { d as defineCustomElement$4 } from './p-a8a9e7a2.js';
8
8
  import { d as defineCustomElement$3 } from './p-0b6cb3f6.js';
9
9
  import { d as defineCustomElement$2 } from './p-52fcf7aa.js';
@@ -3,7 +3,7 @@ import { c as copyTextToClipboard } from './p-21b64eb5.js';
3
3
  import { d as defineCustomElement$7 } from './p-a6f7c798.js';
4
4
  import { d as defineCustomElement$6 } from './p-304bb88b.js';
5
5
  import { d as defineCustomElement$5 } from './p-5c579a12.js';
6
- import { d as defineCustomElement$4 } from './p-f1c0bbf0.js';
6
+ import { d as defineCustomElement$4 } from './p-7e8da393.js';
7
7
  import { d as defineCustomElement$3 } from './p-a8a9e7a2.js';
8
8
  import { d as defineCustomElement$2 } from './p-52fcf7aa.js';
9
9
 
@@ -1,4 +1,4 @@
1
- import { T as TetDropdown$1, d as defineCustomElement$1 } from './p-f1c0bbf0.js';
1
+ import { T as TetDropdown$1, d as defineCustomElement$1 } from './p-7e8da393.js';
2
2
 
3
3
  const TetDropdown = TetDropdown$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import { c as copyTextToClipboard } from './p-21b64eb5.js';
3
3
  import { d as defineCustomElement$7 } from './p-a6f7c798.js';
4
4
  import { d as defineCustomElement$6 } from './p-304bb88b.js';
5
5
  import { d as defineCustomElement$5 } from './p-5c579a12.js';
6
- import { d as defineCustomElement$4 } from './p-f1c0bbf0.js';
6
+ import { d as defineCustomElement$4 } from './p-7e8da393.js';
7
7
  import { d as defineCustomElement$3 } from './p-a8a9e7a2.js';
8
8
  import { d as defineCustomElement$2 } from './p-52fcf7aa.js';
9
9