@ptcwebops/ptcw-design 6.4.19-beta → 6.4.20-beta

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 (155) hide show
  1. package/dist/cjs/event-podcast-slider-example.cjs.entry.js +1 -1
  2. package/dist/cjs/featured-events-slider-example.cjs.entry.js +1 -1
  3. package/dist/cjs/homepage-jumbotron.cjs.entry.js +1 -1
  4. package/dist/cjs/innovator-toggle-container.cjs.entry.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/ptc-button.cjs.entry.js +117 -0
  7. package/dist/cjs/ptc-card-content.cjs.entry.js +1 -1
  8. package/dist/cjs/ptc-card_2.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
  10. package/dist/cjs/ptc-filter-dropdown_4.cjs.entry.js +1 -1
  11. package/dist/cjs/ptc-form-checkbox_4.cjs.entry.js +1 -1
  12. package/dist/cjs/ptc-homepage-video-background.cjs.entry.js +1 -1
  13. package/dist/cjs/ptc-icon-card-slider-example.cjs.entry.js +1 -1
  14. package/dist/cjs/ptc-icon-component.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-image-download-strip.cjs.entry.js +1 -1
  16. package/dist/cjs/ptc-nav-card.cjs.entry.js +1 -1
  17. package/dist/cjs/ptc-para.cjs.entry.js +139 -0
  18. package/dist/cjs/ptc-picture.cjs.entry.js +185 -0
  19. package/dist/cjs/ptc-spacer.cjs.entry.js +38 -0
  20. package/dist/cjs/ptc-subnav-v2.cjs.entry.js +99 -80
  21. package/dist/cjs/ptc-title.cjs.entry.js +161 -0
  22. package/dist/cjs/ptc-value-prop-card.cjs.entry.js +1 -1
  23. package/dist/cjs/ptc-white-paper.cjs.entry.js +1 -1
  24. package/dist/cjs/ptcw-design.cjs.js +1 -1
  25. package/dist/cjs/storefront-enhanced-product-list-alt-example.cjs.entry.js +1 -1
  26. package/dist/cjs/storefront-enhanced-product-list-example.cjs.entry.js +1 -1
  27. package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.css +2 -4
  28. package/dist/collection/components/organism-bundles/event-podcast-slider-example/event-podcast-slider-example.css +16 -11
  29. package/dist/collection/components/organism-bundles/featured-events-slider-example/featured-events-slider-example.css +16 -11
  30. package/dist/collection/components/organism-bundles/homepage-jumbotron/homepage-jumbotron.css +16 -11
  31. package/dist/collection/components/organism-bundles/ptc-icon-card-slider-example/ptc-icon-card-slider-example.css +16 -11
  32. package/dist/collection/components/organism-bundles/storefront-enhanced-product-list-example/storefront-enhanced-product-list-example.css +16 -11
  33. package/dist/collection/components/ptc-card/ptc-card.css +1 -15
  34. package/dist/collection/components/ptc-card-content/ptc-card-content.css +6 -1
  35. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +16 -11
  36. package/dist/collection/components/ptc-filter-dropdown/ptc-filter-dropdown.css +0 -1
  37. package/dist/collection/components/ptc-homepage-video-background/ptc-homepage-video-background.css +1 -2
  38. package/dist/collection/components/ptc-icon-component/ptc-icon-component.css +16 -11
  39. package/dist/collection/components/ptc-image-download-strip/ptc-image-download-strip.css +1 -2
  40. package/dist/collection/components/ptc-nav-card/ptc-nav-card.css +2 -5
  41. package/dist/collection/components/ptc-seo-title/ptc-seo-title.js +3 -3
  42. package/dist/collection/components/ptc-subnav-v2/ptc-subnav-v2.css +13 -2
  43. package/dist/collection/components/ptc-subnav-v2/ptc-subnav-v2.js +100 -82
  44. package/dist/collection/components/ptc-textfield/ptc-textfield.css +1 -1
  45. package/dist/collection/components/ptc-value-prop-card/ptc-value-prop-card.css +1 -2
  46. package/dist/collection/components/ptc-white-paper/ptc-white-paper.css +1 -2
  47. package/dist/custom-elements/index.js +116 -97
  48. package/dist/esm/blog-detail-content_2.entry.js +1 -1
  49. package/dist/esm/blog-detail-layout.entry.js +1 -1
  50. package/dist/esm/blogs-search-section.entry.js +1 -1
  51. package/dist/esm/event-podcast-slider-example.entry.js +1 -1
  52. package/dist/esm/featured-events-slider-example.entry.js +1 -1
  53. package/dist/esm/homepage-jumbotron.entry.js +2 -2
  54. package/dist/esm/homepage-toggled-content.entry.js +1 -1
  55. package/dist/esm/innovator-toggle-container.entry.js +2 -2
  56. package/dist/esm/{interfaces-7c0243be.js → interfaces-4caedd26.js} +1 -1
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/most-popular-news.entry.js +1 -1
  59. package/dist/esm/my-component.entry.js +1 -1
  60. package/dist/esm/ptc-accordion-item.entry.js +1 -1
  61. package/dist/esm/ptc-background-video.entry.js +1 -1
  62. package/dist/esm/ptc-button.entry.js +113 -0
  63. package/dist/esm/ptc-card-content.entry.js +1 -1
  64. package/dist/esm/ptc-card_2.entry.js +1 -1
  65. package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
  66. package/dist/esm/ptc-collapse-list.entry.js +1 -1
  67. package/dist/esm/ptc-filter-dropdown_4.entry.js +1 -1
  68. package/dist/esm/ptc-form-checkbox_4.entry.js +2 -2
  69. package/dist/esm/ptc-homepage-image-feature.entry.js +1 -1
  70. package/dist/esm/ptc-homepage-video-background.entry.js +2 -2
  71. package/dist/esm/ptc-icon-card-slider-example.entry.js +1 -1
  72. package/dist/esm/ptc-icon-card.entry.js +1 -1
  73. package/dist/esm/ptc-icon-component.entry.js +1 -1
  74. package/dist/esm/ptc-image-download-strip.entry.js +1 -1
  75. package/dist/esm/ptc-img.entry.js +1 -1
  76. package/dist/esm/ptc-link.entry.js +1 -1
  77. package/dist/esm/ptc-media-card.entry.js +1 -1
  78. package/dist/esm/ptc-nav-card.entry.js +1 -1
  79. package/dist/esm/ptc-para.entry.js +135 -0
  80. package/dist/esm/ptc-picture.entry.js +181 -0
  81. package/dist/esm/ptc-pricing-packaging-table.entry.js +1 -1
  82. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  83. package/dist/esm/ptc-social-icons-footer.entry.js +1 -1
  84. package/dist/esm/ptc-spacer.entry.js +34 -0
  85. package/dist/esm/ptc-subnav-v2.entry.js +99 -80
  86. package/dist/esm/ptc-title.entry.js +157 -0
  87. package/dist/esm/ptc-value-prop-card.entry.js +1 -1
  88. package/dist/esm/ptc-white-paper.entry.js +1 -1
  89. package/dist/esm/ptcw-design.js +1 -1
  90. package/dist/esm/storefront-enhanced-product-list-alt-example.entry.js +1 -1
  91. package/dist/esm/storefront-enhanced-product-list-example.entry.js +1 -1
  92. package/dist/esm/{utils-a64ba942.js → utils-bdd0cc16.js} +1 -1
  93. package/dist/ptcw-design/p-0c69ea52.entry.js +1 -0
  94. package/dist/ptcw-design/{p-ff66587b.entry.js → p-0fbdcd78.entry.js} +1 -1
  95. package/dist/ptcw-design/{p-9ca635fa.entry.js → p-13963d40.entry.js} +1 -1
  96. package/dist/ptcw-design/{p-df66407c.entry.js → p-187ef77b.entry.js} +1 -1
  97. package/dist/ptcw-design/p-1a853854.entry.js +1 -0
  98. package/dist/ptcw-design/{p-1c26f390.entry.js → p-1c63c812.entry.js} +1 -1
  99. package/dist/ptcw-design/{p-90f1a7af.entry.js → p-26b70120.entry.js} +1 -1
  100. package/dist/ptcw-design/{p-62e3cd51.entry.js → p-26e8ad2e.entry.js} +1 -1
  101. package/dist/ptcw-design/p-312c41b8.entry.js +1 -0
  102. package/dist/ptcw-design/{p-36a3eb03.entry.js → p-3b40bfbf.entry.js} +2 -2
  103. package/dist/ptcw-design/{p-92ad78c5.entry.js → p-3cb011c9.entry.js} +1 -1
  104. package/dist/ptcw-design/{p-c160bda4.entry.js → p-3cfe0126.entry.js} +1 -1
  105. package/dist/ptcw-design/p-3e4861a2.entry.js +1 -0
  106. package/dist/ptcw-design/p-4703e417.entry.js +1 -0
  107. package/dist/ptcw-design/p-4ab3249d.entry.js +1 -0
  108. package/dist/ptcw-design/{p-0df868d2.entry.js → p-4c89d63d.entry.js} +1 -1
  109. package/dist/ptcw-design/{p-2d00fefd.entry.js → p-502f534b.entry.js} +1 -1
  110. package/dist/ptcw-design/{p-1e32a493.entry.js → p-53dee19b.entry.js} +1 -1
  111. package/dist/ptcw-design/{p-f2675bb0.entry.js → p-5a2ed8fb.entry.js} +1 -1
  112. package/dist/ptcw-design/p-6a561487.entry.js +1 -0
  113. package/dist/ptcw-design/p-6b9e4a18.entry.js +1 -0
  114. package/dist/ptcw-design/{p-1519b36f.entry.js → p-6f9f55b3.entry.js} +1 -1
  115. package/dist/ptcw-design/{p-ee1183b2.js → p-711bcdad.js} +1 -1
  116. package/dist/ptcw-design/p-7218fe2c.entry.js +1 -0
  117. package/dist/ptcw-design/p-761a31f8.entry.js +1 -0
  118. package/dist/ptcw-design/{p-456c5cbb.entry.js → p-9c6cad16.entry.js} +1 -1
  119. package/dist/ptcw-design/p-9da57f76.entry.js +1 -0
  120. package/dist/ptcw-design/{p-5ec17b43.entry.js → p-9efa8199.entry.js} +1 -1
  121. package/dist/ptcw-design/{p-9063956c.entry.js → p-9fca5392.entry.js} +1 -1
  122. package/dist/ptcw-design/{p-46b47ed7.entry.js → p-a4dd4e83.entry.js} +1 -1
  123. package/dist/ptcw-design/p-ac766cb3.entry.js +1 -0
  124. package/dist/ptcw-design/p-ad0e7843.entry.js +1 -0
  125. package/dist/ptcw-design/{p-9027d2d9.entry.js → p-bd448674.entry.js} +1 -1
  126. package/dist/ptcw-design/{p-9fb21bdf.entry.js → p-bfadd78e.entry.js} +1 -1
  127. package/dist/ptcw-design/p-c12065b7.entry.js +1 -0
  128. package/dist/ptcw-design/{p-5cf5b9f8.entry.js → p-c3b27836.entry.js} +1 -1
  129. package/dist/ptcw-design/{p-22cf00e7.js → p-c7e948b2.js} +1 -1
  130. package/dist/ptcw-design/p-cbbe2bba.entry.js +1 -0
  131. package/dist/ptcw-design/p-d6ee094b.entry.js +1 -0
  132. package/dist/ptcw-design/p-d9df1a16.entry.js +1 -0
  133. package/dist/ptcw-design/{p-82f766d2.entry.js → p-e5e1e8fb.entry.js} +1 -1
  134. package/dist/ptcw-design/{p-3572eccc.entry.js → p-ef870202.entry.js} +1 -1
  135. package/dist/ptcw-design/{p-9ef2b1e7.entry.js → p-fb8584e4.entry.js} +1 -1
  136. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  137. package/dist/types/components/ptc-subnav-v2/ptc-subnav-v2.d.ts +8 -5
  138. package/dist/types/components.d.ts +62 -62
  139. package/package.json +101 -101
  140. package/readme.md +23 -23
  141. package/dist/cjs/ptc-button_5.cjs.entry.js +0 -614
  142. package/dist/esm/ptc-button_5.entry.js +0 -606
  143. package/dist/ptcw-design/p-02622aa7.entry.js +0 -1
  144. package/dist/ptcw-design/p-0f6b641c.entry.js +0 -1
  145. package/dist/ptcw-design/p-1f0daed2.entry.js +0 -1
  146. package/dist/ptcw-design/p-46c518c8.entry.js +0 -1
  147. package/dist/ptcw-design/p-50569afd.entry.js +0 -1
  148. package/dist/ptcw-design/p-60d001c8.entry.js +0 -1
  149. package/dist/ptcw-design/p-6ac4cfab.entry.js +0 -1
  150. package/dist/ptcw-design/p-8b5549b2.entry.js +0 -1
  151. package/dist/ptcw-design/p-b79b1e09.entry.js +0 -1
  152. package/dist/ptcw-design/p-bd3d71f1.entry.js +0 -1
  153. package/dist/ptcw-design/p-cc7d5eb7.entry.js +0 -1
  154. package/dist/ptcw-design/p-d391c01b.entry.js +0 -1
  155. package/dist/ptcw-design/p-e7c00e48.entry.js +0 -1
@@ -5,6 +5,7 @@ export class PtcSubnavV2 {
5
5
  this.isSticky = false;
6
6
  this.originalTop = 0;
7
7
  this.placeholderElement = null;
8
+ this.measurementElement = null;
8
9
  this.handleClickOutside = (event) => {
9
10
  if (!this.el.contains(event.target)) {
10
11
  this.showOverflowMenu = false;
@@ -44,13 +45,6 @@ export class PtcSubnavV2 {
44
45
  // Only update if different from current active
45
46
  if (activeSection !== this.currentActive) {
46
47
  this.currentActive = activeSection;
47
- // Update mobile selected item if in mobile mode
48
- if (this.isMobile) {
49
- const activeItem = navItems.find((item) => item.id === activeSection);
50
- if (activeItem) {
51
- this.selectedMobileItem = activeItem;
52
- }
53
- }
54
48
  }
55
49
  this.scrollThrottleTimeout = null;
56
50
  }, 16); // ~60fps throttling
@@ -123,6 +117,9 @@ export class PtcSubnavV2 {
123
117
  // Update placeholder height if sticky and resized
124
118
  const currentHeight = this.el.offsetHeight;
125
119
  this.placeholderElement.style.height = `${currentHeight}px`;
120
+ // Update originalTop based on placeholder position (layout may have changed)
121
+ const placeholderRect = this.placeholderElement.getBoundingClientRect();
122
+ this.originalTop = placeholderRect.top + window.scrollY;
126
123
  }
127
124
  };
128
125
  this.setupIntersectionObserver = () => {
@@ -159,13 +156,6 @@ export class PtcSubnavV2 {
159
156
  const sectionId = mostVisibleSection.target.id;
160
157
  if (sectionId && sectionId !== this.currentActive) {
161
158
  this.currentActive = sectionId;
162
- // Update mobile selected item if in mobile mode
163
- if (this.isMobile) {
164
- const activeItem = navItems.find((item) => item.id === sectionId);
165
- if (activeItem) {
166
- this.selectedMobileItem = activeItem;
167
- }
168
- }
169
159
  }
170
160
  }
171
161
  }, 100); // Increased debounce time for better performance
@@ -182,6 +172,24 @@ export class PtcSubnavV2 {
182
172
  }
183
173
  });
184
174
  };
175
+ this.setupResizeObserver = () => {
176
+ // Observe the parent element for layout changes
177
+ this.resizeObserver = new ResizeObserver(() => {
178
+ // Recalculate sticky position when parent layout changes
179
+ if (!this.isSticky) {
180
+ this.initializeStickyPosition();
181
+ }
182
+ else if (this.placeholderElement) {
183
+ // If sticky, update originalTop based on placeholder position
184
+ const placeholderRect = this.placeholderElement.getBoundingClientRect();
185
+ this.originalTop = placeholderRect.top + window.scrollY;
186
+ }
187
+ });
188
+ // Observe the element's parent or the element itself
189
+ if (this.el.parentElement) {
190
+ this.resizeObserver.observe(this.el.parentElement);
191
+ }
192
+ };
185
193
  this.extractNavItemsFromSlots = () => {
186
194
  const slotElement = this.el.querySelector('[slot="nav-items"]');
187
195
  if (!slotElement)
@@ -221,9 +229,6 @@ export class PtcSubnavV2 {
221
229
  console.warn("No navigation items found in slots or props for ptc-subnav-v2");
222
230
  return [];
223
231
  };
224
- this.calculateMobileDropdownItems = () => {
225
- this.mobileDropdownItems = this.getNavItems();
226
- };
227
232
  this.hasActiveOverflowItem = () => {
228
233
  return this.overflowItems.some((item) => item.id === this.currentActive);
229
234
  };
@@ -237,7 +242,6 @@ export class PtcSubnavV2 {
237
242
  if (navItems.length === 0) {
238
243
  this.visibleItems = [];
239
244
  this.overflowItems = [];
240
- this.selectedMobileItem = null;
241
245
  return;
242
246
  }
243
247
  // Check if we're in mobile mode (below 767px)
@@ -251,7 +255,6 @@ export class PtcSubnavV2 {
251
255
  // On mobile, show only the current active item
252
256
  const activeItem = navItems.find((item) => item.id === this.currentActive) ||
253
257
  navItems[0];
254
- this.selectedMobileItem = activeItem;
255
258
  this.visibleItems = [activeItem];
256
259
  this.overflowItems = navItems.filter((item) => item.id !== activeItem.id);
257
260
  }
@@ -272,19 +275,21 @@ export class PtcSubnavV2 {
272
275
  }
273
276
  let visibleCount = 0;
274
277
  let totalWidth = 0;
275
- // Create temporary elements to measure width
276
- const tempContainer = document.createElement("div");
277
- tempContainer.style.position = "absolute";
278
- tempContainer.style.visibility = "hidden";
279
- tempContainer.style.whiteSpace = "nowrap";
280
- tempContainer.style.fontSize = "14px";
281
- tempContainer.style.fontWeight = "700";
282
- tempContainer.style.padding = "20px 0 20px 0";
283
- document.body.appendChild(tempContainer);
278
+ // Create or reuse measurement element
279
+ if (!this.measurementElement) {
280
+ this.measurementElement = document.createElement("div");
281
+ this.measurementElement.style.position = "absolute";
282
+ this.measurementElement.style.visibility = "hidden";
283
+ this.measurementElement.style.whiteSpace = "nowrap";
284
+ this.measurementElement.style.fontSize = "14px";
285
+ this.measurementElement.style.fontWeight = "700";
286
+ this.measurementElement.style.padding = "20px 0 20px 0";
287
+ document.body.appendChild(this.measurementElement);
288
+ }
284
289
  for (let i = 0; i < navItems.length; i++) {
285
290
  const item = navItems[i];
286
- tempContainer.textContent = item.label;
287
- const itemWidth = tempContainer.offsetWidth + 32; // 32px for gap
291
+ this.measurementElement.textContent = item.label;
292
+ const itemWidth = this.measurementElement.offsetWidth + 32; // 32px for gap
288
293
  if (totalWidth + itemWidth <= availableWidth) {
289
294
  totalWidth += itemWidth;
290
295
  visibleCount++;
@@ -293,7 +298,6 @@ export class PtcSubnavV2 {
293
298
  break;
294
299
  }
295
300
  }
296
- document.body.removeChild(tempContainer);
297
301
  this.visibleItems = navItems.slice(0, visibleCount);
298
302
  this.overflowItems = navItems.slice(visibleCount);
299
303
  }
@@ -302,19 +306,27 @@ export class PtcSubnavV2 {
302
306
  };
303
307
  this.toggleOverflowMenu = () => {
304
308
  this.showOverflowMenu = !this.showOverflowMenu;
309
+ // After opening, measure and decide alignment to avoid viewport overflow
310
+ if (!this.showOverflowMenu) {
311
+ return;
312
+ }
313
+ requestAnimationFrame(() => {
314
+ const container = this.overflowMenuContainer;
315
+ const dropdown = this.overflowDropdownEl;
316
+ if (!container || !dropdown)
317
+ return;
318
+ const containerRect = container.getBoundingClientRect();
319
+ // Default positioning is right: -2px inside container
320
+ const dropdownWidth = dropdown.offsetWidth || 0;
321
+ const rightEdge = containerRect.right + 2;
322
+ const leftEdge = rightEdge - dropdownWidth;
323
+ // If left edge would be off the viewport, flip to left aligned
324
+ this.overflowDropdownAlignLeft = leftEdge < 8; // keep a small gutter
325
+ });
305
326
  };
306
327
  this.handleNavClick = (event, section) => {
307
328
  event.preventDefault();
308
329
  this.currentActive = section;
309
- // Update mobile selected item if in mobile mode
310
- if (this.isMobile) {
311
- const navItems = this.getNavItems();
312
- const activeItem = navItems.find((item) => item.id === section);
313
- if (activeItem) {
314
- this.selectedMobileItem = activeItem;
315
- this.calculateMobileDropdownItems();
316
- }
317
- }
318
330
  // Set manual navigation flag to prevent intersection observer from overriding
319
331
  this.isManualNavigation = true;
320
332
  // Clear any existing manual navigation timeout
@@ -332,12 +344,19 @@ export class PtcSubnavV2 {
332
344
  composed: true,
333
345
  });
334
346
  this.el.dispatchEvent(customEvent);
335
- // Smooth scroll to section if it exists
347
+ // Smooth scroll to section if it exists, accounting for sticky nav height
336
348
  const targetElement = document.querySelector(`#${section}`);
337
349
  if (targetElement) {
338
- targetElement.scrollIntoView({
350
+ // Get the sticky nav height
351
+ const navHeight = this.el.offsetHeight;
352
+ // Calculate the target position with offset
353
+ const targetPosition = targetElement.getBoundingClientRect().top +
354
+ window.scrollY -
355
+ navHeight;
356
+ // Smooth scroll to the adjusted position
357
+ window.scrollTo({
358
+ top: targetPosition,
339
359
  behavior: "smooth",
340
- block: "start",
341
360
  });
342
361
  }
343
362
  };
@@ -347,30 +366,19 @@ export class PtcSubnavV2 {
347
366
  this.visibleItems = [];
348
367
  this.overflowItems = [];
349
368
  this.showOverflowMenu = false;
369
+ this.overflowDropdownAlignLeft = false;
350
370
  this.isMobile = false;
351
- this.selectedMobileItem = null;
352
371
  this.isManualNavigation = false;
353
- this.mobileDropdownItems = [];
354
372
  }
355
373
  componentWillLoad() {
356
374
  this.currentActive = this.activeSection;
357
- this.initializeMobileItem();
358
- this.calculateMobileDropdownItems();
359
- }
360
- initializeMobileItem() {
361
- const navItems = this.getNavItems();
362
- this.selectedMobileItem =
363
- navItems.length > 0
364
- ? navItems.find((item) => item.id === this.activeSection) ||
365
- navItems[0]
366
- : null;
367
375
  }
368
376
  componentDidLoad() {
369
377
  this.bindEventHandlers();
370
- this.calculateMobileDropdownItems();
371
378
  this.handleResize();
372
379
  this.addEventListeners();
373
380
  this.setupIntersectionObserver();
381
+ this.setupResizeObserver();
374
382
  this.initializeStickyPosition();
375
383
  }
376
384
  bindEventHandlers() {
@@ -395,7 +403,8 @@ export class PtcSubnavV2 {
395
403
  this.removeEventListeners();
396
404
  this.cleanupTimeouts();
397
405
  this.cleanupIntersectionObserver();
398
- this.cleanupPlaceholder();
406
+ this.cleanupResizeObserver();
407
+ this.cleanupElements();
399
408
  }
400
409
  removeEventListeners() {
401
410
  window.removeEventListener("resize", this.boundHandleResize);
@@ -405,25 +414,34 @@ export class PtcSubnavV2 {
405
414
  window.removeEventListener("scroll", this.boundHandleStickyScroll);
406
415
  }
407
416
  cleanupTimeouts() {
408
- [
409
- this.scrollTimeout,
410
- this.scrollThrottleTimeout,
411
- this.manualNavigationTimeout,
412
- this.stickyScrollTimeout,
413
- ]
414
- .filter(Boolean)
415
- .forEach((timeout) => clearTimeout(timeout));
417
+ if (this.scrollTimeout)
418
+ clearTimeout(this.scrollTimeout);
419
+ if (this.scrollThrottleTimeout)
420
+ clearTimeout(this.scrollThrottleTimeout);
421
+ if (this.manualNavigationTimeout)
422
+ clearTimeout(this.manualNavigationTimeout);
423
+ if (this.stickyScrollTimeout)
424
+ clearTimeout(this.stickyScrollTimeout);
416
425
  }
417
426
  cleanupIntersectionObserver() {
418
427
  if (this.intersectionObserver) {
419
428
  this.intersectionObserver.disconnect();
420
429
  }
421
430
  }
422
- cleanupPlaceholder() {
431
+ cleanupResizeObserver() {
432
+ if (this.resizeObserver) {
433
+ this.resizeObserver.disconnect();
434
+ }
435
+ }
436
+ cleanupElements() {
423
437
  if (this.placeholderElement) {
424
438
  this.placeholderElement.remove();
425
439
  this.placeholderElement = null;
426
440
  }
441
+ if (this.measurementElement) {
442
+ this.measurementElement.remove();
443
+ this.measurementElement = null;
444
+ }
427
445
  }
428
446
  parsePropNavItems() {
429
447
  var _a;
@@ -444,14 +462,16 @@ export class PtcSubnavV2 {
444
462
  return null;
445
463
  }
446
464
  render() {
447
- var _a, _b;
448
465
  const navItems = this.getNavItems();
466
+ const hasRightContent = this.hasSubnavMenuRightContent();
467
+ const selectedMobileItem = this.isMobile
468
+ ? navItems.find((item) => item.id === this.currentActive) ||
469
+ navItems[0]
470
+ : null;
449
471
  // If no navigation items, don't render the navigation
450
472
  if (navItems.length === 0) {
451
- const hasRightContent = this.hasSubnavMenuRightContent();
452
473
  return (h(Host, null, h("div", { class: `subnav-container ${!hasRightContent ? "full-width" : ""}` }, hasRightContent && (h("div", { class: "subnav-menu-right" }, h("slot", { name: "subnav-menu-right" }))))));
453
474
  }
454
- const hasRightContent = this.hasSubnavMenuRightContent();
455
475
  return (h(Host, null, h("div", { class: `subnav-container ${!hasRightContent ? "full-width" : ""}` }, h("nav", { class: `subnav-menu-left ${!hasRightContent ? "full-width" : ""}`, role: "navigation", "aria-label": "Sub navigation", ref: (el) => (this.navContainer = el) }, this.isMobile ? (
456
476
  // Mobile layout - dropdown with arrows
457
477
  h("div", { class: "mobile-dropdown-container" }, h("button", { class: "mobile-dropdown-button", onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
@@ -460,32 +480,31 @@ export class PtcSubnavV2 {
460
480
  e.preventDefault();
461
481
  this.toggleOverflowMenu();
462
482
  }
463
- }, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": `${((_a = this.selectedMobileItem) === null || _a === void 0 ? void 0 : _a.label) || "Select Section"} - Choose navigation section`, "tracker-id": "mobile-dropdown-button", ref: (el) => (this.overflowButton = el) }, h("span", { class: "mobile-selected-item" }, ((_b = this.selectedMobileItem) === null || _b === void 0 ? void 0 : _b.label) ||
464
- "Select Section"), h("span", { class: `mobile-arrow ${this.showOverflowMenu ? "rotated" : ""}`, "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 1.5L5.94975 6.44975L10.8995 1.5", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))), this.showOverflowMenu && (h("ul", { class: "mobile-dropdown", role: "menu", "aria-label": "Navigation sections" }, this.mobileDropdownItems.map((item) => (h("li", { key: item.id }, h("a", { href: `#${item.id}`, class: `mobile-dropdown-item mf-listen ${this
465
- .currentActive ===
483
+ }, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": `${(selectedMobileItem === null || selectedMobileItem === void 0 ? void 0 : selectedMobileItem.label) || "Select Section"} - Choose navigation section`, "tracker-id": "mobile-dropdown-button", ref: (el) => (this.overflowButton = el) }, h("span", { class: "mobile-selected-item" }, (selectedMobileItem === null || selectedMobileItem === void 0 ? void 0 : selectedMobileItem.label) ||
484
+ "Select Section"), h("span", { class: `mobile-arrow ${this.showOverflowMenu ? "rotated" : ""}`, "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 1.5L5.94975 6.44975L10.8995 1.5", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))), this.showOverflowMenu && (h("ul", { class: "mobile-dropdown", role: "menu", "aria-label": "Navigation sections" }, navItems.map((item) => (h("li", { key: item.id, class: "mf-listen", id: item.trackerId ||
485
+ `mobile-nav-${item.id}` }, h("a", { href: `#${item.id}`, class: `mobile-dropdown-item ${this.currentActive ===
466
486
  item.id
467
487
  ? "active"
468
- : ""}`, role: "menuitem", "aria-current": this
469
- .currentActive ===
488
+ : ""}`, role: "menuitem", "aria-current": this.currentActive ===
470
489
  item.id
471
490
  ? "page"
472
- : undefined, "tracker-id": item.trackerId ||
473
- `mobile-nav-${item.id}`, title: item.title || "", onClick: (e) => {
491
+ : undefined, title: item.title || "", onClick: (e) => {
474
492
  this.handleNavClick(e, item.id);
475
493
  this.showOverflowMenu = false;
476
494
  } }, item.label)))))))) : (
477
495
  // Desktop layout - original behavior
478
- h("ul", { class: "desktop-menu" }, this.visibleItems.map((item) => (h("li", { key: item.id, class: "mf-listen", "tracker-id": item.trackerId || `nav-${item.id}` }, h("a", { href: `#${item.id}`, class: this.currentActive === item.id
496
+ h("ul", { class: "desktop-menu" }, this.visibleItems.map((item) => (h("li", { key: item.id, class: "mf-listen", id: item.trackerId || `nav-${item.id}` }, h("a", { href: `#${item.id}`, class: this.currentActive === item.id
479
497
  ? "active"
480
498
  : "", title: item.title || "", onClick: (e) => this.handleNavClick(e, item.id), "aria-current": this.currentActive === item.id
481
499
  ? "page"
482
- : undefined }, item.label)))), this.overflowItems.length > 0 && (h("li", { class: "overflow-menu-container mf-listen", "tracker-id": "overflow-menu" }, h("button", { class: `overflow-button ${this.hasActiveOverflowItem() ? "selected-active" : ""}`, onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
500
+ : undefined }, item.label)))), this.overflowItems.length > 0 && (h("li", { class: "overflow-menu-container mf-listen", id: "overflow-menu", ref: (el) => (this.overflowMenuContainer = el) }, h("button", { class: `overflow-button ${this.hasActiveOverflowItem() ? "selected-active" : ""}`, onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
483
501
  if (e.key === "Enter" ||
484
502
  e.key === " ") {
485
503
  e.preventDefault();
486
504
  this.toggleOverflowMenu();
487
505
  }
488
- }, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": "Show more navigation items", "tracker-id": "overflow-button", ref: (el) => (this.overflowButton = el) }, h("span", { class: "overflow-dots", "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "1.25", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "5", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "8.75", cy: "5", r: "1.25", fill: "#617480" })))), this.showOverflowMenu && (h("div", { class: "overflow-dropdown", role: "menu", "aria-label": "Additional navigation sections" }, this.overflowItems.map((item) => (h("a", { key: item.id, href: `#${item.id}`, class: `mf-listen ${this
506
+ }, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": "Show more navigation items", "tracker-id": "overflow-button", ref: (el) => (this.overflowButton = el) }, h("span", { class: "overflow-dots", "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "1.25", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "5", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "8.75", cy: "5", r: "1.25", fill: "#617480" })))), this.showOverflowMenu && (h("div", { class: `overflow-dropdown ${this.overflowDropdownAlignLeft ? "align-left" : "align-right"}`, role: "menu", "aria-label": "Additional navigation sections", ref: (el) => (this.overflowDropdownEl =
507
+ el) }, this.overflowItems.map((item) => (h("a", { key: item.id, href: `#${item.id}`, class: `mf-listen ${this
489
508
  .currentActive ===
490
509
  item.id
491
510
  ? "active"
@@ -557,10 +576,9 @@ export class PtcSubnavV2 {
557
576
  "visibleItems": {},
558
577
  "overflowItems": {},
559
578
  "showOverflowMenu": {},
579
+ "overflowDropdownAlignLeft": {},
560
580
  "isMobile": {},
561
- "selectedMobileItem": {},
562
- "isManualNavigation": {},
563
- "mobileDropdownItems": {}
581
+ "isManualNavigation": {}
564
582
  };
565
583
  }
566
584
  static get elementRef() { return "el"; }
@@ -3743,7 +3743,7 @@ ptc-footer {
3743
3743
  .ptc-text-field .iti__flag {
3744
3744
  background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/18.2.1/img/flags.png");
3745
3745
  }
3746
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
3746
+ @media (min-resolution: 192dpi) {
3747
3747
  .ptc-text-field .iti__flag {
3748
3748
  background-image: url("https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/18.2.1/img/flags@2x.png");
3749
3749
  }
@@ -107,8 +107,7 @@ ptc-footer {
107
107
  border-radius: var(--ptc-border-radius-large);
108
108
  border: 1px solid var(--color-white);
109
109
  background-color: rgba(0, 0, 0, 0.6);
110
- -webkit-backdrop-filter: blur(2px);
111
- backdrop-filter: blur(2px);
110
+ backdrop-filter: blur(2px);
112
111
  color: var(--color-white);
113
112
  z-index: 10;
114
113
  display: flex;
@@ -6113,8 +6113,7 @@ blockquote p {
6113
6113
  z-index: 900;
6114
6114
  transition: all 0.1s ease 0s;
6115
6115
  background-color: var(--color-standard-white);
6116
- -webkit-backdrop-filter: blur(22px);
6117
- backdrop-filter: blur(22px);
6116
+ backdrop-filter: blur(22px);
6118
6117
  background-image: linear-gradient(93deg, #f4f4f4, #fff 100%);
6119
6118
  box-shadow: 1px 1px 15px 0 rgba(0, 0, 0, 0.16);
6120
6119
  }