@tet/tet-components 1.4.16-testing → 1.4.17-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.
@@ -58,14 +58,15 @@ export class TetDynamicCard {
58
58
  rootElementRef = null;
59
59
  BREAKPOINTS = {
60
60
  MOBILE: 768,
61
+ TABLET_SMALL: 1024,
61
62
  TABLET: 1440,
62
63
  DESKTOP: 1920
63
64
  };
64
65
  CARD_SIZES = {
65
66
  standard: {
66
- 'S': 'fit-content',
67
- 'M': 'calc(50% - 0.75rem)',
68
- 'XL': '100%',
67
+ S: 'fit-content',
68
+ M: 'calc(50% - 0.75rem)',
69
+ XL: '100%'
69
70
  },
70
71
  responsive: {
71
72
  mobile: '100%',
@@ -74,27 +75,13 @@ export class TetDynamicCard {
74
75
  }
75
76
  };
76
77
  getCardSize(width) {
77
- if (this.originalSize === 'L') {
78
- if (width < this.BREAKPOINTS.MOBILE) {
79
- return (this.sizeChangeBreakpoint === 'Mob' || this.sizeChangeBreakpoint === 'Tab') ? 'S' : 'XL';
80
- }
81
- else if (width < this.BREAKPOINTS.TABLET) {
82
- return this.sizeChangeBreakpoint === 'Tab' ? 'S' : 'XL';
83
- }
84
- else {
85
- return this.originalSize;
86
- }
87
- }
88
- else if (this.originalSize === 'M') {
89
- if (width < this.BREAKPOINTS.MOBILE) {
90
- return (this.sizeChangeBreakpoint === 'Mob' || this.sizeChangeBreakpoint === 'Tab') ? 'S' : 'XL';
91
- }
92
- else if (width < this.BREAKPOINTS.TABLET) {
93
- return this.sizeChangeBreakpoint === 'Tab' ? 'S' : this.originalSize;
94
- }
95
- else {
96
- return this.originalSize;
97
- }
78
+ if (width < this.BREAKPOINTS.MOBILE)
79
+ return 'XL';
80
+ if (width < this.BREAKPOINTS.TABLET_SMALL)
81
+ return 'M';
82
+ const isAdaptiveSize = this.originalSize === 'L' || this.originalSize === 'M';
83
+ if (isAdaptiveSize && width < this.BREAKPOINTS.TABLET) {
84
+ return this.sizeChangeBreakpoint === 'Tab' ? 'S' : this.originalSize;
98
85
  }
99
86
  return this.originalSize;
100
87
  }
@@ -113,36 +100,21 @@ export class TetDynamicCard {
113
100
  }
114
101
  }
115
102
  getCardWidth(size, width) {
116
- if (this.isInCarousel) {
103
+ if (this.isInCarousel)
117
104
  return 'fit-content';
118
- }
119
- const adaptiveSize = this.originalSize === 'L' || this.originalSize === 'M';
120
- if (width < this.BREAKPOINTS.MOBILE) {
121
- if (adaptiveSize && (this.sizeChangeBreakpoint === 'Mob' || this.sizeChangeBreakpoint === 'Tab')) {
122
- return 'fit-content';
123
- }
124
- // Special handling
125
- if (size === 'L' || size === 'M') {
126
- return this.CARD_SIZES.responsive.mobile;
127
- }
128
- }
129
- else if (width < this.BREAKPOINTS.TABLET) {
130
- if (adaptiveSize && this.sizeChangeBreakpoint === 'Tab') {
105
+ if (width < this.BREAKPOINTS.MOBILE)
106
+ return this.CARD_SIZES.responsive.mobile;
107
+ const isAdaptiveSize = this.originalSize === 'L' || this.originalSize === 'M';
108
+ if (width < this.BREAKPOINTS.TABLET) {
109
+ if (isAdaptiveSize && this.sizeChangeBreakpoint === 'Tab')
131
110
  return 'fit-content';
132
- }
133
- if (size === 'L') {
111
+ if (size === 'M')
112
+ return this.CARD_SIZES.standard.M;
113
+ if (size === 'L')
134
114
  return this.CARD_SIZES.responsive.tablet;
135
- }
136
115
  }
137
- else if (width < this.BREAKPOINTS.DESKTOP) {
138
- if (size === 'L') {
139
- return this.CARD_SIZES.responsive.tablet;
140
- }
141
- }
142
- else {
143
- if (size === 'L') {
144
- return this.CARD_SIZES.responsive.desktop;
145
- }
116
+ else if (size === 'L') {
117
+ return width < this.BREAKPOINTS.DESKTOP ? this.CARD_SIZES.responsive.tablet : this.CARD_SIZES.responsive.desktop;
146
118
  }
147
119
  return this.CARD_SIZES.standard[size] || 'fit-content';
148
120
  }
@@ -177,7 +149,7 @@ export class TetDynamicCard {
177
149
  }
178
150
  handleClick = (event) => {
179
151
  const path = event.composedPath();
180
- const isButtonClick = path.some(el => el instanceof HTMLElement && el.classList?.contains('button'));
152
+ const isButtonClick = path.some((el) => el instanceof HTMLElement && el.classList?.contains('button'));
181
153
  if (!isButtonClick) {
182
154
  if (this.buttonRef && this.linkHref) {
183
155
  const button = this.buttonRef.shadowRoot?.querySelector('button');
@@ -192,31 +164,39 @@ export class TetDynamicCard {
192
164
  };
193
165
  renderTags() {
194
166
  const dateTagColor = this.theme === 'dark' ? this.dateTagColorDark : this.dateTagColorLight;
195
- return (h("div", { class: "tags-container", part: "tags" }, this.tags?.length > 0 && (h("div", { class: "tags" }, this.tags.map(tag => (h("span", { class: "tag" }, tag))))), this.dateTag && (h("div", { class: "tags" }, h("div", { class: `tag colored colored--${dateTagColor}`, ref: (elm) => { this.dateTagColorRef = elm; } }, h("span", { class: "date-tag-text" }, this.dateTag))))));
167
+ return (h("div", { class: "tags-container", part: "tags" }, this.tags?.length > 0 && (h("div", { class: "tags" }, this.tags.map((tag) => (h("span", { class: "tag" }, tag))))), this.dateTag && (h("div", { class: "tags" }, h("div", { class: `tag colored colored--${dateTagColor}`, ref: (elm) => {
168
+ this.dateTagColorRef = elm;
169
+ } }, h("span", { class: "date-tag-text" }, this.dateTag))))));
196
170
  }
197
171
  renderPrice() {
198
172
  if (!this.priceTagOptions?.show)
199
173
  return null;
200
- return (h("div", { class: "price", part: "price" }, h("tet-price-view", { ref: elm => { this.priceViewRef = elm; }, font: this.priceTagOptions.font || "Gilroy, Arial, sans-serif", background: this.priceTagOptions.background, staticColors: this.priceTagOptions.isStatic, theme: this.theme, size: "S", "heading-text": this.priceTagOptions.headingText, "price-type": this.priceTagOptions.priceType, "euro-price": this.priceTagOptions.euroPrice?.toString(), "cents-price": this.priceTagOptions.centsPrice?.toString(), "footer-text": this.priceTagOptions.footerText, "footer-text-type": this.priceTagOptions.footerTextType })));
174
+ return (h("div", { class: "price", part: "price" }, h("tet-price-view", { ref: (elm) => {
175
+ this.priceViewRef = elm;
176
+ }, font: this.priceTagOptions.font || 'Gilroy, Arial, sans-serif', background: this.priceTagOptions.background, staticColors: this.priceTagOptions.isStatic, theme: this.theme, size: "S", "heading-text": this.priceTagOptions.headingText, "price-type": this.priceTagOptions.priceType, "euro-price": this.priceTagOptions.euroPrice?.toString(), "cents-price": this.priceTagOptions.centsPrice?.toString(), "footer-text": this.priceTagOptions.footerText, "footer-text-type": this.priceTagOptions.footerTextType })));
201
177
  }
202
178
  renderButton() {
203
179
  if (!this.linkText)
204
180
  return null;
205
181
  const buttonProps = {
206
- type: 'primary',
207
- size: 'small',
208
- theme: this.theme,
209
- url: this.linkHref,
182
+ 'type': 'primary',
183
+ 'size': 'small',
184
+ 'theme': this.theme,
185
+ 'url': this.linkHref,
210
186
  'url-target': this.linkNewTab ? '_blank' : '_self',
211
187
  'accessibility-label': this.linkText
212
188
  };
213
- return (h("div", { class: "button", part: "button" }, h("tet-button", { ...buttonProps, ref: elm => { this.buttonRef = elm; } }, this.linkText)));
189
+ return (h("div", { class: "button", part: "button" }, h("tet-button", { ...buttonProps, ref: (elm) => {
190
+ this.buttonRef = elm;
191
+ } }, this.linkText)));
214
192
  }
215
193
  render() {
216
- return (h(Host, { key: '205f5179423b98cb0e6a402a978de60373f91949', class: {
194
+ return (h(Host, { key: 'e835560322a1509753b6391ff1148137f2669395', class: {
217
195
  'dynamic-card': true,
218
196
  'is-focused': this.isFocused
219
- }, "data-index": this.index, ref: (elm) => { this.rootElementRef = elm; } }, h("div", { key: '03c41e05dd26dd306389c5d67d38162e01b94eb3', class: `card
197
+ }, "data-index": this.index, ref: (elm) => {
198
+ this.rootElementRef = elm;
199
+ } }, h("div", { key: '9155b5ea0293ef39c54f8d66c0df6c2931cf3d52', class: `card
220
200
  theme-${this.theme}
221
201
  size-${this.currentSize}
222
202
  position-${this.pictureLayoutShiftPosition}
@@ -224,7 +204,7 @@ export class TetDynamicCard {
224
204
  `, onClick: this.handleClick, onKeyUp: (event) => {
225
205
  if (event.key === 'Enter')
226
206
  this.handleClick(event);
227
- }, tabindex: 0, part: "card", "aria-labelledby": this.cardTitle }, h("div", { key: 'cf9e6bd3a4cb4ca86296d5d7194d86e3d8640c8f', class: "image", part: "image" }, h("slot", { key: '588a5110fa086136b3c6451ce09fac05cdc915af', name: "image" }), this.renderPrice(), this.renderTags()), h("div", { key: 'fd40a3a0a20284a9007baf58262b4edfe2da0a08', class: "content-container" }, h("div", { key: '4e1f956e4337ce6c070c6b96a0d23e71164b216a', class: "content", part: "content" }, this.cardTitle && (h("h3", { key: '4b3da4a9a7d6891b18f853206e7e2edcbb470e6b', class: "title", part: "title" }, this.cardTitle)), this.subtitle && (h("p", { key: '06bf2fcc83e4b39138a97793ac416e8eed119493', class: "subtitle", part: "subtitle" }, this.subtitle))), this.renderButton()))));
207
+ }, tabindex: 0, part: "card", "aria-labelledby": this.cardTitle }, h("div", { key: '6923cd94ffceae462b08d99e82a9c3f0dae21f84', class: "image", part: "image" }, h("slot", { key: '4fe4f5e2c4edffb8229073f6cf59a0c4cac6fc43', name: "image" }), this.renderPrice(), this.renderTags()), h("div", { key: '2fda1db6c8b3828caf41e20aab7e09033581e007', class: "content-container" }, h("div", { key: '5b5c81bd36839cd84ea23f2872007026e24b957e', class: "content", part: "content" }, this.cardTitle && (h("h3", { key: '6b52cd192997cd9bbbab8ff4d9c19e31ead757c9', class: "title", part: "title" }, this.cardTitle)), this.subtitle && (h("p", { key: '2dd27ca9c13653ef5542950307fdd4583dd67fb9', class: "subtitle", part: "subtitle" }, this.subtitle))), this.renderButton()))));
228
208
  }
229
209
  static get is() { return "tet-dynamic-card"; }
230
210
  static get encapsulation() { return "shadow"; }
@@ -11,7 +11,7 @@ export class TetBusinessNavigation {
11
11
  this.mainMenuItemId = undefined;
12
12
  this.positions = { scrollLeft: 0, mouseX: 0 };
13
13
  this.expanded = true;
14
- this.sublevelsOpened = false;
14
+ this.openedMenuIds = new Set();
15
15
  }
16
16
  navigationContainer;
17
17
  isPointerDown;
@@ -21,8 +21,7 @@ export class TetBusinessNavigation {
21
21
  if (!this.menuItems || this.menuItems.length === 0) {
22
22
  return;
23
23
  }
24
- this.selectedItemId = this.menuItems.find((item) => item.selected === true)?.id || this.menuItems[0].id;
25
- this.mainMenuItemId = this.selectedItemId;
24
+ this.handleNavInitialState();
26
25
  processTranslations('tet-components', this.language || 'lv').then(() => forceUpdate(this));
27
26
  }
28
27
  /** Method to run on menu item selection */
@@ -35,6 +34,27 @@ export class TetBusinessNavigation {
35
34
  localStorage.setItem('selectedSublevelId', JSON.stringify(mainMenuId ? id : ''));
36
35
  this.menuClickEvent.emit({ id });
37
36
  }
37
+ /** Sets the initial selected and open state for the navigation menu based on selected main or sublevel items. */
38
+ handleNavInitialState() {
39
+ this.mainMenuItemId = this.menuItems[0].id;
40
+ this.selectedItemId = this.menuItems[0].id;
41
+ const selectedMainItem = this.menuItems.find((item) => item.selected)?.id;
42
+ if (selectedMainItem) {
43
+ this.mainMenuItemId = selectedMainItem;
44
+ this.selectedItemId = selectedMainItem;
45
+ return;
46
+ }
47
+ for (const item of this.menuItems) {
48
+ const selectedSub = (item.sublevels || []).find((sub) => sub.selected);
49
+ if (selectedSub) {
50
+ this.selectedItemId = selectedSub.id;
51
+ this.mainMenuItemId = item.id;
52
+ this.openedMenuIds = new Set([item.id]);
53
+ localStorage.setItem('selectedSublevelId', JSON.stringify(selectedSub.id));
54
+ return;
55
+ }
56
+ }
57
+ }
38
58
  /**
39
59
  * Initialises the mouse drag.
40
60
  * @param {MouseEvent} event Current mouse event.
@@ -77,12 +97,11 @@ export class TetBusinessNavigation {
77
97
  toggleMenu = (e) => {
78
98
  e.preventDefault();
79
99
  if (this.expanded) {
80
- this.selectedItemId = this.mainMenuItemId === this.selectedItemId ? this.selectedItemId : this.mainMenuItemId;
100
+ this.selectedItemId = this.mainMenuItemId;
81
101
  }
82
102
  else {
83
103
  const sublevelId = Number(localStorage.getItem('selectedSublevelId'));
84
- this.selectedItemId = sublevelId > 0 ? sublevelId : this.mainMenuItemId;
85
- this.sublevelsOpened = sublevelId > 0;
104
+ this.selectedItemId = sublevelId || this.mainMenuItemId;
86
105
  }
87
106
  this.expanded = !this.expanded;
88
107
  };
@@ -91,12 +110,14 @@ export class TetBusinessNavigation {
91
110
  if (this.selectedItemId !== id) {
92
111
  this.selectedItemId = id;
93
112
  }
94
- this.sublevelsOpened = !this.sublevelsOpened;
113
+ const newSet = new Set(this.openedMenuIds);
114
+ newSet.has(id) ? newSet.delete(id) : newSet.add(id);
115
+ this.openedMenuIds = newSet;
95
116
  localStorage.setItem('selectedSublevelId', JSON.stringify(''));
96
117
  };
97
118
  /** Render second menu level */
98
119
  renderSublevelItems = (sublevels, id) => {
99
- if (!this.sublevelsOpened) {
120
+ if (!this.openedMenuIds.has(id)) {
100
121
  return null;
101
122
  }
102
123
  const renderSublevelItem = sublevels.map((item) => (h("button", { class: { 'business-navigation-item': true, 'sublevel': true, 'selected': this.selectedItemId === item.id }, key: item.id, onClick: () => this.selectMenuItem(item.id, id) }, h("span", { class: { 'business-navigation-item__title': true, 'sublevel': true } }, item.name))));
@@ -105,9 +126,9 @@ export class TetBusinessNavigation {
105
126
  /** Render menu item */
106
127
  renderMenuItem = (menuItem) => {
107
128
  const { id, icon, name, sublevels } = menuItem;
108
- const { expanded, sublevelsOpened } = this;
129
+ const { expanded, openedMenuIds } = this;
109
130
  const withSublevels = expanded && sublevels && sublevels.length > 0;
110
- return (h("div", { class: "business-navigation-item__wrapper" }, h("button", { key: id, class: { 'business-navigation-item': true, 'selected': this.selectedItemId === id }, onClick: () => (withSublevels ? this.toggleSublevels(id) : this.selectMenuItem(id)), "aria-label": name }, icon && h("tet-icon", { class: "business-navigation-item__icon", name: icon }), !this.expandable || expanded ? (h("span", { class: "business-navigation-item__title" }, name)) : (h("tet-tooltip", { class: "business-navigation-item__tooltip", position: TooltipPosition.RIGHT, theme: this.theme }, name)), withSublevels && (h("tet-icon", { class: { 'business-navigation-item__chevron': true, 'sublevelOpened': sublevelsOpened }, name: sublevelsOpened ? 'chevron-up' : 'chevron-down' }))), withSublevels && this.renderSublevelItems(sublevels, id)));
131
+ return (h("div", { class: "business-navigation-item__wrapper" }, h("button", { key: id, class: { 'business-navigation-item': true, 'selected': this.selectedItemId === id }, onClick: () => (withSublevels ? this.toggleSublevels(id) : this.selectMenuItem(id)), "aria-label": name }, icon && h("tet-icon", { class: "business-navigation-item__icon", name: icon }), !this.expandable || expanded ? (h("span", { class: "business-navigation-item__title" }, name)) : (h("tet-tooltip", { class: "business-navigation-item__tooltip", position: TooltipPosition.RIGHT, theme: this.theme }, name)), withSublevels && (h("tet-icon", { class: { 'business-navigation-item__chevron': true, 'sublevelOpened': openedMenuIds.has(id) }, name: openedMenuIds.has(id) ? 'chevron-up' : 'chevron-down' }))), withSublevels && this.renderSublevelItems(sublevels, id)));
111
132
  };
112
133
  /** Render button to expand and minimize the menu container. */
113
134
  renderExpandButton = () => {
@@ -119,7 +140,7 @@ export class TetBusinessNavigation {
119
140
  /** Render Functional Component*/
120
141
  render() {
121
142
  const { menuItems, theme, expandable } = this;
122
- return (h("div", { key: '752d6551dbd03ab8b4f99aede53a5a16dbf56bd1', class: { 'business-navigation': true, [`${theme}`]: true, 'expandable': expandable, 'closed': !this.expanded }, role: "group", onMouseDown: this.onContainerMouseDown, ref: (ref) => (this.navigationContainer = ref) }, this.renderExpandButton(), expandable && h("hr", { key: 'f98adeb81486957f810f73fe689749c4b3583547', class: "business-navigation-divider" }), menuItems && menuItems.map(this.renderMenuItem)));
143
+ return (h("div", { key: '7d9c836c1d13e3b7d010946a9ba7e772a1f41987', class: { 'business-navigation': true, [`${theme}`]: true, 'expandable': expandable, 'closed': !this.expanded }, role: "group", onMouseDown: this.onContainerMouseDown, ref: (ref) => (this.navigationContainer = ref) }, this.renderExpandButton(), expandable && h("hr", { key: 'e1dfb7594222452bd8cd2cad8bbfe5e80cefff0e', class: "business-navigation-divider" }), menuItems && menuItems.map(this.renderMenuItem)));
123
144
  }
124
145
  static get is() { return "tet-business-navigation"; }
125
146
  static get encapsulation() { return "shadow"; }
@@ -228,7 +249,7 @@ export class TetBusinessNavigation {
228
249
  "mainMenuItemId": {},
229
250
  "positions": {},
230
251
  "expanded": {},
231
- "sublevelsOpened": {}
252
+ "openedMenuIds": {}
232
253
  };
233
254
  }
234
255
  static get events() {
@@ -20,7 +20,7 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
20
20
  this.mainMenuItemId = undefined;
21
21
  this.positions = { scrollLeft: 0, mouseX: 0 };
22
22
  this.expanded = true;
23
- this.sublevelsOpened = false;
23
+ this.openedMenuIds = new Set();
24
24
  }
25
25
  navigationContainer;
26
26
  isPointerDown;
@@ -30,8 +30,7 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
30
30
  if (!this.menuItems || this.menuItems.length === 0) {
31
31
  return;
32
32
  }
33
- this.selectedItemId = this.menuItems.find((item) => item.selected === true)?.id || this.menuItems[0].id;
34
- this.mainMenuItemId = this.selectedItemId;
33
+ this.handleNavInitialState();
35
34
  processTranslations('tet-components', this.language || 'lv').then(() => forceUpdate(this));
36
35
  }
37
36
  /** Method to run on menu item selection */
@@ -44,6 +43,27 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
44
43
  localStorage.setItem('selectedSublevelId', JSON.stringify(mainMenuId ? id : ''));
45
44
  this.menuClickEvent.emit({ id });
46
45
  }
46
+ /** Sets the initial selected and open state for the navigation menu based on selected main or sublevel items. */
47
+ handleNavInitialState() {
48
+ this.mainMenuItemId = this.menuItems[0].id;
49
+ this.selectedItemId = this.menuItems[0].id;
50
+ const selectedMainItem = this.menuItems.find((item) => item.selected)?.id;
51
+ if (selectedMainItem) {
52
+ this.mainMenuItemId = selectedMainItem;
53
+ this.selectedItemId = selectedMainItem;
54
+ return;
55
+ }
56
+ for (const item of this.menuItems) {
57
+ const selectedSub = (item.sublevels || []).find((sub) => sub.selected);
58
+ if (selectedSub) {
59
+ this.selectedItemId = selectedSub.id;
60
+ this.mainMenuItemId = item.id;
61
+ this.openedMenuIds = new Set([item.id]);
62
+ localStorage.setItem('selectedSublevelId', JSON.stringify(selectedSub.id));
63
+ return;
64
+ }
65
+ }
66
+ }
47
67
  /**
48
68
  * Initialises the mouse drag.
49
69
  * @param {MouseEvent} event Current mouse event.
@@ -86,12 +106,11 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
86
106
  toggleMenu = (e) => {
87
107
  e.preventDefault();
88
108
  if (this.expanded) {
89
- this.selectedItemId = this.mainMenuItemId === this.selectedItemId ? this.selectedItemId : this.mainMenuItemId;
109
+ this.selectedItemId = this.mainMenuItemId;
90
110
  }
91
111
  else {
92
112
  const sublevelId = Number(localStorage.getItem('selectedSublevelId'));
93
- this.selectedItemId = sublevelId > 0 ? sublevelId : this.mainMenuItemId;
94
- this.sublevelsOpened = sublevelId > 0;
113
+ this.selectedItemId = sublevelId || this.mainMenuItemId;
95
114
  }
96
115
  this.expanded = !this.expanded;
97
116
  };
@@ -100,12 +119,14 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
100
119
  if (this.selectedItemId !== id) {
101
120
  this.selectedItemId = id;
102
121
  }
103
- this.sublevelsOpened = !this.sublevelsOpened;
122
+ const newSet = new Set(this.openedMenuIds);
123
+ newSet.has(id) ? newSet.delete(id) : newSet.add(id);
124
+ this.openedMenuIds = newSet;
104
125
  localStorage.setItem('selectedSublevelId', JSON.stringify(''));
105
126
  };
106
127
  /** Render second menu level */
107
128
  renderSublevelItems = (sublevels, id) => {
108
- if (!this.sublevelsOpened) {
129
+ if (!this.openedMenuIds.has(id)) {
109
130
  return null;
110
131
  }
111
132
  const renderSublevelItem = sublevels.map((item) => (h("button", { class: { 'business-navigation-item': true, 'sublevel': true, 'selected': this.selectedItemId === item.id }, key: item.id, onClick: () => this.selectMenuItem(item.id, id) }, h("span", { class: { 'business-navigation-item__title': true, 'sublevel': true } }, item.name))));
@@ -114,9 +135,9 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
114
135
  /** Render menu item */
115
136
  renderMenuItem = (menuItem) => {
116
137
  const { id, icon, name, sublevels } = menuItem;
117
- const { expanded, sublevelsOpened } = this;
138
+ const { expanded, openedMenuIds } = this;
118
139
  const withSublevels = expanded && sublevels && sublevels.length > 0;
119
- return (h("div", { class: "business-navigation-item__wrapper" }, h("button", { key: id, class: { 'business-navigation-item': true, 'selected': this.selectedItemId === id }, onClick: () => (withSublevels ? this.toggleSublevels(id) : this.selectMenuItem(id)), "aria-label": name }, icon && h("tet-icon", { class: "business-navigation-item__icon", name: icon }), !this.expandable || expanded ? (h("span", { class: "business-navigation-item__title" }, name)) : (h("tet-tooltip", { class: "business-navigation-item__tooltip", position: TooltipPosition.RIGHT, theme: this.theme }, name)), withSublevels && (h("tet-icon", { class: { 'business-navigation-item__chevron': true, 'sublevelOpened': sublevelsOpened }, name: sublevelsOpened ? 'chevron-up' : 'chevron-down' }))), withSublevels && this.renderSublevelItems(sublevels, id)));
140
+ return (h("div", { class: "business-navigation-item__wrapper" }, h("button", { key: id, class: { 'business-navigation-item': true, 'selected': this.selectedItemId === id }, onClick: () => (withSublevels ? this.toggleSublevels(id) : this.selectMenuItem(id)), "aria-label": name }, icon && h("tet-icon", { class: "business-navigation-item__icon", name: icon }), !this.expandable || expanded ? (h("span", { class: "business-navigation-item__title" }, name)) : (h("tet-tooltip", { class: "business-navigation-item__tooltip", position: TooltipPosition.RIGHT, theme: this.theme }, name)), withSublevels && (h("tet-icon", { class: { 'business-navigation-item__chevron': true, 'sublevelOpened': openedMenuIds.has(id) }, name: openedMenuIds.has(id) ? 'chevron-up' : 'chevron-down' }))), withSublevels && this.renderSublevelItems(sublevels, id)));
120
141
  };
121
142
  /** Render button to expand and minimize the menu container. */
122
143
  renderExpandButton = () => {
@@ -128,7 +149,7 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
128
149
  /** Render Functional Component*/
129
150
  render() {
130
151
  const { menuItems, theme, expandable } = this;
131
- return (h("div", { key: '752d6551dbd03ab8b4f99aede53a5a16dbf56bd1', class: { 'business-navigation': true, [`${theme}`]: true, 'expandable': expandable, 'closed': !this.expanded }, role: "group", onMouseDown: this.onContainerMouseDown, ref: (ref) => (this.navigationContainer = ref) }, this.renderExpandButton(), expandable && h("hr", { key: 'f98adeb81486957f810f73fe689749c4b3583547', class: "business-navigation-divider" }), menuItems && menuItems.map(this.renderMenuItem)));
152
+ return (h("div", { key: '7d9c836c1d13e3b7d010946a9ba7e772a1f41987', class: { 'business-navigation': true, [`${theme}`]: true, 'expandable': expandable, 'closed': !this.expanded }, role: "group", onMouseDown: this.onContainerMouseDown, ref: (ref) => (this.navigationContainer = ref) }, this.renderExpandButton(), expandable && h("hr", { key: 'e1dfb7594222452bd8cd2cad8bbfe5e80cefff0e', class: "business-navigation-divider" }), menuItems && menuItems.map(this.renderMenuItem)));
132
153
  }
133
154
  static get style() { return TetBusinessNavigationStyle0; }
134
155
  }, [1, "tet-business-navigation", {
@@ -140,7 +161,7 @@ const TetBusinessNavigation = /*@__PURE__*/ proxyCustomElement(class TetBusiness
140
161
  "mainMenuItemId": [32],
141
162
  "positions": [32],
142
163
  "expanded": [32],
143
- "sublevelsOpened": [32],
164
+ "openedMenuIds": [32],
144
165
  "selectMenuItem": [64]
145
166
  }]);
146
167
  function defineCustomElement() {
@@ -7,7 +7,7 @@ import { d as defineCustomElement$i } from './p-9c5b6894.js';
7
7
  import { d as defineCustomElement$h } from './p-48f61462.js';
8
8
  import { d as defineCustomElement$g } from './p-a41cd76b.js';
9
9
  import { d as defineCustomElement$f } from './p-29ac3413.js';
10
- import { d as defineCustomElement$e } from './p-57c05c8d.js';
10
+ import { d as defineCustomElement$e } from './p-92c98bea.js';
11
11
  import { d as defineCustomElement$d } from './p-0aa896e1.js';
12
12
  import { d as defineCustomElement$c } from './p-48cff30b.js';
13
13
  import { d as defineCustomElement$b } from './p-58e92936.js';
@@ -1,4 +1,4 @@
1
- import { T as TetBusinessNavigation$1, d as defineCustomElement$1 } from './p-57c05c8d.js';
1
+ import { T as TetBusinessNavigation$1, d as defineCustomElement$1 } from './p-92c98bea.js';
2
2
 
3
3
  const TetBusinessNavigation = TetBusinessNavigation$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -3,7 +3,7 @@ import { d as defineCustomElement$4 } from './p-48cff30b.js';
3
3
  import { d as defineCustomElement$3 } from './p-f035c2cb.js';
4
4
  import { d as defineCustomElement$2 } from './p-41a7c21a.js';
5
5
 
6
- const tetDynamicCardCss = ":host{--image-type:cover;--image-background-color:var(--tc-background-white-black);--card-width-mobile:17.5rem;--card-height-mobile:27.75rem;--card-width-tablet:21.375rem;--card-height-tablet:33.875rem;--card-width-desktop:25.625rem;--card-height-desktop:39.5rem;--option-card-bg:var(--tc-background-white-black);--option-card-text:var(--tc-text-primary);--option-card-border:var(--tc-border-quaternary);display:block;font-family:var(--tet-font-family-primary)}.card{-webkit-user-drag:none;user-select:none;cursor:pointer;background:var(--tc-background-white-black);border-radius:1rem;border:0.0625rem solid var(--tc-border-quaternary);overflow:hidden;position:relative;display:flex;flex-direction:column;align-items:center;gap:1rem;margin:0 auto;min-width:var(--card-width-mobile);width:var(--card-width-mobile);height:var(--card-height-mobile);transition:box-shadow 0.15s ease}.card.size-S{width:var(--card-width-mobile);height:var(--card-height-mobile)}.card.size-XL,.card.size-L,.card.size-M{width:100%}.card:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline-offset:0.125rem}.card:hover{box-shadow:0 4px 24px 0 rgba(0, 0, 0, 0.1), 0 1.5px 6px 0 rgba(0, 0, 0, 0.08)}.card:hover ::slotted(img){transform:scale(1.06)}.card:active{box-shadow:0 0 1px 0 rgba(12, 12, 14, 0.08), 0 1px 3px 0 rgba(12, 12, 14, 0.12)}.card:active ::slotted(img){transform:scale(1.01)}.content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}.image{-webkit-user-drag:none;user-select:none;flex-shrink:0;width:100%;height:16.125rem;overflow:hidden;position:relative;background-color:var(--image-background-color)}.image ::slotted(img){transition:transform 0.3s ease;width:100%;height:100%;object-fit:var(--image-type);display:block}.price{position:absolute;bottom:0.75rem;right:0.75rem;z-index:1}.tags-container{position:absolute;top:0.75rem;left:0.75rem;display:flex;flex-direction:column;gap:0.25rem;z-index:1}.content{height:auto;padding:0 1rem;text-align:center}.title{margin:0;font-family:var(--font-family-fallback);font-size:1.25rem;font-weight:600;margin-bottom:0.5rem;color:var(--tc-text-primary);line-height:1.5rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;word-break:break-word;max-height:3rem}.subtitle{color:var(--tc-text-primary);text-align:center;font-family:var(--font-family-content);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem;letter-spacing:-0.003125rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;word-break:break-word;max-height:2.5rem}.button{margin-top:auto;margin-bottom:1.5rem;width:fit-content;text-wrap:nowrap}.tags-container{position:absolute;top:0.75rem;left:0.75rem;display:flex;flex-direction:column;gap:0.25rem}.tags{display:flex;flex-wrap:wrap;gap:0.25rem}.tag{border:0.0625px solid var(--tc-border-tertiary);padding:0.1875rem 0.3125rem;border-radius:0.375rem;background:var(--tc-layer-primary);color:var(--tc-text-primary);font-family:var(--font-family-content);font-size:0.75rem;font-style:normal;font-weight:500;line-height:1rem}.tag.colored--white{background:var(--tc-layer-primary);color:var(--tc-text-primary);border:0.0625px solid var(--tc-border-tertiary)}.tag.colored--black{color:var(--tc-text-primary-dark);background:var(--tc-layer-primary-dark);border:0.0625px solid var(--tc-border-primary)}.tag.colored--yellow{background:var(--tc-yellow-20);color:var(--tc-text-primary);border:0.0625px solid var(--tc-border-tertiary)}.theme-dark{background:var(--tc-layer-primary-dark);border:0.0625rem solid var(--tc-border-quaternary-dark)}.theme-dark .title{color:var(--tc-text-primary-dark)}.theme-dark .subtitle{color:var(--tc-text-primary-dark)}.theme-dark .tag:not(.colored){color:var(--tc-text-primary-dark);background:var(--tc-layer-primary-dark);border:0.0625px solid var(--tc-border-primary)}@media all and (min-width: 48rem){.card{width:var(--card-width-tablet);height:var(--card-height-tablet)}.card.size-S{width:var(--card-width-tablet);height:var(--card-height-tablet)}.card.size-M{width:100%}.card.size-M .image{width:100%;height:24.25rem}.card.size-M.carousel-true{width:44rem}.card.size-XL,.card.size-L{width:100%;flex-direction:row;gap:0}.card.size-XL .image,.card.size-L .image{width:60%;height:100%}.card.size-XL .button,.card.size-L .button{margin-top:0}.card.size-XL.position-right,.card.size-L.position-right{flex-direction:row-reverse}.card.size-XL.carousel-true,.card.size-L.carousel-true{width:44rem}.image{width:var(--card-width-tablet);height:var(--card-width-tablet)}.title{font-size:1.5rem;line-height:1.75rem;max-height:3.5rem}.tag{font-size:0.875rem;line-height:1.25rem;letter-spacing:-0.003125rem}}@media all and (min-width: 90rem){.card.size-M{width:100%}.card.size-M.carousel-true{width:39.375rem}.card.size-L{width:100%;flex-direction:row;gap:0}.card.size-L .image{width:62%;height:100%}.card.size-L .button{margin-top:0}.card.size-L.position-right{flex-direction:row-reverse}.card.size-L.carousel-true{width:57.25rem}.card.size-XL .image{width:64%}.card.size-XL.carousel-true{width:80.25rem}}@media all and (min-width: 120rem){.card{width:var(--card-width-desktop);height:var(--card-height-desktop)}.card.size-S{width:var(--card-width-desktop);height:var(--card-height-desktop)}.card.size-L.carousel-true{width:83.125rem}.card.size-XL .image{width:72%}.card.size-XL.carousel-true{width:110.25rem}.image{width:var(--card-width-desktop);height:var(--card-width-desktop)}.title{font-size:1.75rem;line-height:2rem;max-height:4rem}.subtitle{font-size:1rem;line-height:1.5rem;letter-spacing:-0.00625rem;max-height:3rem}}";
6
+ const tetDynamicCardCss = ":host{--image-type:cover;--image-background-color:var(--tc-background-white-black);--card-width-mobile:17.5rem;--card-height-mobile:27.75rem;--card-width-tablet:21.375rem;--card-height-tablet:33.875rem;--card-width-desktop:25.625rem;--card-height-desktop:39.5rem;--option-card-bg:var(--tc-background-white-black);--option-card-text:var(--tc-text-primary);--option-card-border:var(--tc-border-quaternary);display:block;font-family:var(--tet-font-family-primary)}.card{-webkit-user-drag:none;user-select:none;cursor:pointer;background:var(--tc-background-white-black);border-radius:1rem;border:0.0625rem solid var(--tc-border-quaternary);overflow:hidden;position:relative;display:flex;flex-direction:column;align-items:center;gap:1rem;margin:0 auto;min-width:var(--card-width-mobile);width:var(--card-width-mobile);height:var(--card-height-mobile);transition:box-shadow 0.15s ease}.card.size-S{width:var(--card-width-mobile);height:var(--card-height-mobile)}.card.size-XL,.card.size-L,.card.size-M{width:100%}.card:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline-offset:0.125rem}.card:hover{box-shadow:0 4px 24px 0 rgba(0, 0, 0, 0.1), 0 1.5px 6px 0 rgba(0, 0, 0, 0.08)}.card:hover ::slotted(img){transform:scale(1.06)}.card:active{box-shadow:0 0 1px 0 rgba(12, 12, 14, 0.08), 0 1px 3px 0 rgba(12, 12, 14, 0.12)}.card:active ::slotted(img){transform:scale(1.01)}.content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}.image{-webkit-user-drag:none;user-select:none;flex-shrink:0;width:100%;height:16.125rem;overflow:hidden;position:relative;background-color:var(--image-background-color)}.image ::slotted(img){transition:transform 0.3s ease;width:100%;height:100%;object-fit:var(--image-type);display:block}.price{position:absolute;bottom:0.75rem;right:0.75rem;z-index:1}.tags-container{position:absolute;top:0.75rem;left:0.75rem;display:flex;flex-direction:column;gap:0.25rem;z-index:1}.content{height:auto;padding:0 1rem;text-align:center}.title{margin:0;font-family:var(--font-family-fallback);font-size:1.25rem;font-weight:600;margin-bottom:0.5rem;color:var(--tc-text-primary);line-height:1.5rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;word-break:break-word;max-height:3rem}.subtitle{color:var(--tc-text-primary);text-align:center;font-family:var(--font-family-content);font-size:0.875rem;font-style:normal;font-weight:400;line-height:1.25rem;letter-spacing:-0.003125rem;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;word-break:break-word;max-height:2.5rem}.button{margin-top:auto;margin-bottom:1.5rem;width:fit-content;text-wrap:nowrap}.tags-container{position:absolute;top:0.75rem;left:0.75rem;display:flex;flex-direction:column;gap:0.25rem}.tags{display:flex;flex-wrap:wrap;gap:0.25rem}.tag{border:0.0625px solid var(--tc-border-tertiary);padding:0.1875rem 0.3125rem;border-radius:0.375rem;background:var(--tc-layer-primary);color:var(--tc-text-primary);font-family:var(--font-family-content);font-size:0.75rem;font-style:normal;font-weight:500;line-height:1rem}.tag.colored--white{background:var(--tc-layer-primary);color:var(--tc-text-primary);border:0.0625px solid var(--tc-border-tertiary)}.tag.colored--black{color:var(--tc-text-primary-dark);background:var(--tc-layer-primary-dark);border:0.0625px solid var(--tc-border-primary)}.tag.colored--yellow{background:var(--tc-yellow-20);color:var(--tc-text-primary);border:0.0625px solid var(--tc-border-tertiary)}.theme-dark{background:var(--tc-layer-primary-dark);border:0.0625rem solid var(--tc-border-quaternary-dark)}.theme-dark .title{color:var(--tc-text-primary-dark)}.theme-dark .subtitle{color:var(--tc-text-primary-dark)}.theme-dark .tag:not(.colored){color:var(--tc-text-primary-dark);background:var(--tc-layer-primary-dark);border:0.0625px solid var(--tc-border-primary)}@media all and (min-width: 48rem){.card{width:var(--card-width-tablet);height:var(--card-height-tablet)}.card.size-S{width:var(--card-width-tablet);height:var(--card-height-tablet)}.card.size-M{width:100%}.card.size-M .image{width:100%}.card.size-M.carousel-true{width:44rem}.card.size-XL,.card.size-L{width:100%;flex-direction:row;gap:0}.card.size-XL .image,.card.size-L .image{width:60%;height:100%}.card.size-XL .button,.card.size-L .button{margin-top:0}.card.size-XL.position-right,.card.size-L.position-right{flex-direction:row-reverse}.card.size-XL.carousel-true,.card.size-L.carousel-true{width:44rem}.image{width:var(--card-width-tablet);height:var(--card-width-tablet)}.title{font-size:1.5rem;line-height:1.75rem;max-height:3.5rem}.tag{font-size:0.875rem;line-height:1.25rem;letter-spacing:-0.003125rem}}@media all and (min-width: 90rem){.card.size-M{width:100%}.card.size-M.carousel-true{width:39.375rem}.card.size-L{width:100%;flex-direction:row;gap:0}.card.size-L .image{width:62%;height:100%}.card.size-L .button{margin-top:0}.card.size-L.position-right{flex-direction:row-reverse}.card.size-L.carousel-true{width:57.25rem}.card.size-XL .image{width:64%}.card.size-XL.carousel-true{width:80.25rem}}@media all and (min-width: 120rem){.card{width:var(--card-width-desktop);height:var(--card-height-desktop)}.card.size-S{width:var(--card-width-desktop);height:var(--card-height-desktop)}.card.size-L.carousel-true{width:83.125rem}.card.size-XL .image{width:72%}.card.size-XL.carousel-true{width:110.25rem}.image{width:var(--card-width-desktop);height:var(--card-width-desktop)}.title{font-size:1.75rem;line-height:2rem;max-height:4rem}.subtitle{font-size:1rem;line-height:1.5rem;letter-spacing:-0.00625rem;max-height:3rem}}";
7
7
  const TetDynamicCardStyle0 = tetDynamicCardCss;
8
8
 
9
9
  const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard extends H {
@@ -57,14 +57,15 @@ const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard e
57
57
  rootElementRef = null;
58
58
  BREAKPOINTS = {
59
59
  MOBILE: 768,
60
+ TABLET_SMALL: 1024,
60
61
  TABLET: 1440,
61
62
  DESKTOP: 1920
62
63
  };
63
64
  CARD_SIZES = {
64
65
  standard: {
65
- 'S': 'fit-content',
66
- 'M': 'calc(50% - 0.75rem)',
67
- 'XL': '100%',
66
+ S: 'fit-content',
67
+ M: 'calc(50% - 0.75rem)',
68
+ XL: '100%'
68
69
  },
69
70
  responsive: {
70
71
  mobile: '100%',
@@ -73,27 +74,13 @@ const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard e
73
74
  }
74
75
  };
75
76
  getCardSize(width) {
76
- if (this.originalSize === 'L') {
77
- if (width < this.BREAKPOINTS.MOBILE) {
78
- return (this.sizeChangeBreakpoint === 'Mob' || this.sizeChangeBreakpoint === 'Tab') ? 'S' : 'XL';
79
- }
80
- else if (width < this.BREAKPOINTS.TABLET) {
81
- return this.sizeChangeBreakpoint === 'Tab' ? 'S' : 'XL';
82
- }
83
- else {
84
- return this.originalSize;
85
- }
86
- }
87
- else if (this.originalSize === 'M') {
88
- if (width < this.BREAKPOINTS.MOBILE) {
89
- return (this.sizeChangeBreakpoint === 'Mob' || this.sizeChangeBreakpoint === 'Tab') ? 'S' : 'XL';
90
- }
91
- else if (width < this.BREAKPOINTS.TABLET) {
92
- return this.sizeChangeBreakpoint === 'Tab' ? 'S' : this.originalSize;
93
- }
94
- else {
95
- return this.originalSize;
96
- }
77
+ if (width < this.BREAKPOINTS.MOBILE)
78
+ return 'XL';
79
+ if (width < this.BREAKPOINTS.TABLET_SMALL)
80
+ return 'M';
81
+ const isAdaptiveSize = this.originalSize === 'L' || this.originalSize === 'M';
82
+ if (isAdaptiveSize && width < this.BREAKPOINTS.TABLET) {
83
+ return this.sizeChangeBreakpoint === 'Tab' ? 'S' : this.originalSize;
97
84
  }
98
85
  return this.originalSize;
99
86
  }
@@ -112,36 +99,21 @@ const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard e
112
99
  }
113
100
  }
114
101
  getCardWidth(size, width) {
115
- if (this.isInCarousel) {
102
+ if (this.isInCarousel)
116
103
  return 'fit-content';
117
- }
118
- const adaptiveSize = this.originalSize === 'L' || this.originalSize === 'M';
119
- if (width < this.BREAKPOINTS.MOBILE) {
120
- if (adaptiveSize && (this.sizeChangeBreakpoint === 'Mob' || this.sizeChangeBreakpoint === 'Tab')) {
121
- return 'fit-content';
122
- }
123
- // Special handling
124
- if (size === 'L' || size === 'M') {
125
- return this.CARD_SIZES.responsive.mobile;
126
- }
127
- }
128
- else if (width < this.BREAKPOINTS.TABLET) {
129
- if (adaptiveSize && this.sizeChangeBreakpoint === 'Tab') {
104
+ if (width < this.BREAKPOINTS.MOBILE)
105
+ return this.CARD_SIZES.responsive.mobile;
106
+ const isAdaptiveSize = this.originalSize === 'L' || this.originalSize === 'M';
107
+ if (width < this.BREAKPOINTS.TABLET) {
108
+ if (isAdaptiveSize && this.sizeChangeBreakpoint === 'Tab')
130
109
  return 'fit-content';
131
- }
132
- if (size === 'L') {
110
+ if (size === 'M')
111
+ return this.CARD_SIZES.standard.M;
112
+ if (size === 'L')
133
113
  return this.CARD_SIZES.responsive.tablet;
134
- }
135
114
  }
136
- else if (width < this.BREAKPOINTS.DESKTOP) {
137
- if (size === 'L') {
138
- return this.CARD_SIZES.responsive.tablet;
139
- }
140
- }
141
- else {
142
- if (size === 'L') {
143
- return this.CARD_SIZES.responsive.desktop;
144
- }
115
+ else if (size === 'L') {
116
+ return width < this.BREAKPOINTS.DESKTOP ? this.CARD_SIZES.responsive.tablet : this.CARD_SIZES.responsive.desktop;
145
117
  }
146
118
  return this.CARD_SIZES.standard[size] || 'fit-content';
147
119
  }
@@ -176,7 +148,7 @@ const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard e
176
148
  }
177
149
  handleClick = (event) => {
178
150
  const path = event.composedPath();
179
- const isButtonClick = path.some(el => el instanceof H && el.classList?.contains('button'));
151
+ const isButtonClick = path.some((el) => el instanceof H && el.classList?.contains('button'));
180
152
  if (!isButtonClick) {
181
153
  if (this.buttonRef && this.linkHref) {
182
154
  const button = this.buttonRef.shadowRoot?.querySelector('button');
@@ -191,31 +163,39 @@ const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard e
191
163
  };
192
164
  renderTags() {
193
165
  const dateTagColor = this.theme === 'dark' ? this.dateTagColorDark : this.dateTagColorLight;
194
- return (h("div", { class: "tags-container", part: "tags" }, this.tags?.length > 0 && (h("div", { class: "tags" }, this.tags.map(tag => (h("span", { class: "tag" }, tag))))), this.dateTag && (h("div", { class: "tags" }, h("div", { class: `tag colored colored--${dateTagColor}`, ref: (elm) => { this.dateTagColorRef = elm; } }, h("span", { class: "date-tag-text" }, this.dateTag))))));
166
+ return (h("div", { class: "tags-container", part: "tags" }, this.tags?.length > 0 && (h("div", { class: "tags" }, this.tags.map((tag) => (h("span", { class: "tag" }, tag))))), this.dateTag && (h("div", { class: "tags" }, h("div", { class: `tag colored colored--${dateTagColor}`, ref: (elm) => {
167
+ this.dateTagColorRef = elm;
168
+ } }, h("span", { class: "date-tag-text" }, this.dateTag))))));
195
169
  }
196
170
  renderPrice() {
197
171
  if (!this.priceTagOptions?.show)
198
172
  return null;
199
- return (h("div", { class: "price", part: "price" }, h("tet-price-view", { ref: elm => { this.priceViewRef = elm; }, font: this.priceTagOptions.font || "Gilroy, Arial, sans-serif", background: this.priceTagOptions.background, staticColors: this.priceTagOptions.isStatic, theme: this.theme, size: "S", "heading-text": this.priceTagOptions.headingText, "price-type": this.priceTagOptions.priceType, "euro-price": this.priceTagOptions.euroPrice?.toString(), "cents-price": this.priceTagOptions.centsPrice?.toString(), "footer-text": this.priceTagOptions.footerText, "footer-text-type": this.priceTagOptions.footerTextType })));
173
+ return (h("div", { class: "price", part: "price" }, h("tet-price-view", { ref: (elm) => {
174
+ this.priceViewRef = elm;
175
+ }, font: this.priceTagOptions.font || 'Gilroy, Arial, sans-serif', background: this.priceTagOptions.background, staticColors: this.priceTagOptions.isStatic, theme: this.theme, size: "S", "heading-text": this.priceTagOptions.headingText, "price-type": this.priceTagOptions.priceType, "euro-price": this.priceTagOptions.euroPrice?.toString(), "cents-price": this.priceTagOptions.centsPrice?.toString(), "footer-text": this.priceTagOptions.footerText, "footer-text-type": this.priceTagOptions.footerTextType })));
200
176
  }
201
177
  renderButton() {
202
178
  if (!this.linkText)
203
179
  return null;
204
180
  const buttonProps = {
205
- type: 'primary',
206
- size: 'small',
207
- theme: this.theme,
208
- url: this.linkHref,
181
+ 'type': 'primary',
182
+ 'size': 'small',
183
+ 'theme': this.theme,
184
+ 'url': this.linkHref,
209
185
  'url-target': this.linkNewTab ? '_blank' : '_self',
210
186
  'accessibility-label': this.linkText
211
187
  };
212
- return (h("div", { class: "button", part: "button" }, h("tet-button", { ...buttonProps, ref: elm => { this.buttonRef = elm; } }, this.linkText)));
188
+ return (h("div", { class: "button", part: "button" }, h("tet-button", { ...buttonProps, ref: (elm) => {
189
+ this.buttonRef = elm;
190
+ } }, this.linkText)));
213
191
  }
214
192
  render() {
215
- return (h(Host, { key: '205f5179423b98cb0e6a402a978de60373f91949', class: {
193
+ return (h(Host, { key: 'e835560322a1509753b6391ff1148137f2669395', class: {
216
194
  'dynamic-card': true,
217
195
  'is-focused': this.isFocused
218
- }, "data-index": this.index, ref: (elm) => { this.rootElementRef = elm; } }, h("div", { key: '03c41e05dd26dd306389c5d67d38162e01b94eb3', class: `card
196
+ }, "data-index": this.index, ref: (elm) => {
197
+ this.rootElementRef = elm;
198
+ } }, h("div", { key: '9155b5ea0293ef39c54f8d66c0df6c2931cf3d52', class: `card
219
199
  theme-${this.theme}
220
200
  size-${this.currentSize}
221
201
  position-${this.pictureLayoutShiftPosition}
@@ -223,7 +203,7 @@ const TetDynamicCard$1 = /*@__PURE__*/ proxyCustomElement(class TetDynamicCard e
223
203
  `, onClick: this.handleClick, onKeyUp: (event) => {
224
204
  if (event.key === 'Enter')
225
205
  this.handleClick(event);
226
- }, tabindex: 0, part: "card", "aria-labelledby": this.cardTitle }, h("div", { key: 'cf9e6bd3a4cb4ca86296d5d7194d86e3d8640c8f', class: "image", part: "image" }, h("slot", { key: '588a5110fa086136b3c6451ce09fac05cdc915af', name: "image" }), this.renderPrice(), this.renderTags()), h("div", { key: 'fd40a3a0a20284a9007baf58262b4edfe2da0a08', class: "content-container" }, h("div", { key: '4e1f956e4337ce6c070c6b96a0d23e71164b216a', class: "content", part: "content" }, this.cardTitle && (h("h3", { key: '4b3da4a9a7d6891b18f853206e7e2edcbb470e6b', class: "title", part: "title" }, this.cardTitle)), this.subtitle && (h("p", { key: '06bf2fcc83e4b39138a97793ac416e8eed119493', class: "subtitle", part: "subtitle" }, this.subtitle))), this.renderButton()))));
206
+ }, tabindex: 0, part: "card", "aria-labelledby": this.cardTitle }, h("div", { key: '6923cd94ffceae462b08d99e82a9c3f0dae21f84', class: "image", part: "image" }, h("slot", { key: '4fe4f5e2c4edffb8229073f6cf59a0c4cac6fc43', name: "image" }), this.renderPrice(), this.renderTags()), h("div", { key: '2fda1db6c8b3828caf41e20aab7e09033581e007', class: "content-container" }, h("div", { key: '5b5c81bd36839cd84ea23f2872007026e24b957e', class: "content", part: "content" }, this.cardTitle && (h("h3", { key: '6b52cd192997cd9bbbab8ff4d9c19e31ead757c9', class: "title", part: "title" }, this.cardTitle)), this.subtitle && (h("p", { key: '2dd27ca9c13653ef5542950307fdd4583dd67fb9', class: "subtitle", part: "subtitle" }, this.subtitle))), this.renderButton()))));
227
207
  }
228
208
  static get watchers() { return {
229
209
  "theme": ["onThemeChanged"],