@ptcwebops/ptcw-design 6.4.28-beta → 6.4.30-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 (111) hide show
  1. package/dist/cjs/featured-list.cjs.entry.js +1 -1
  2. package/dist/cjs/icon-asset_17.cjs.entry.js +3 -3
  3. package/dist/cjs/innovator-toggle-container.cjs.entry.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/ptc-bio-card.cjs.entry.js +1 -1
  6. package/dist/cjs/ptc-blue-pill-announcement-bar.cjs.entry.js +19 -0
  7. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
  8. package/dist/cjs/ptc-close-icon_2.cjs.entry.js +11 -4
  9. package/dist/cjs/ptc-featured-list.cjs.entry.js +1 -1
  10. package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +1 -1
  11. package/dist/cjs/ptc-jumbotron.cjs.entry.js +1 -1
  12. package/dist/cjs/ptc-overlay.cjs.entry.js +1 -1
  13. package/dist/cjs/ptc-podcast-card.cjs.entry.js +1 -1
  14. package/dist/cjs/ptc-readmore-char.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-readmore-v3.cjs.entry.js +1 -1
  16. package/dist/cjs/ptc-store-card-list.cjs.entry.js +110 -0
  17. package/dist/cjs/ptc-store-card.cjs.entry.js +24 -0
  18. package/dist/cjs/ptc-subnav-v2.cjs.entry.js +65 -4
  19. package/dist/cjs/ptc-tooltip-v2.cjs.entry.js +1 -1
  20. package/dist/cjs/ptc-value-led-speed-bump.cjs.entry.js +1 -1
  21. package/dist/cjs/ptc-white-paper.cjs.entry.js +1 -1
  22. package/dist/cjs/ptcw-design.cjs.js +1 -1
  23. package/dist/collection/collection-manifest.json +3 -0
  24. package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.css +4 -0
  25. package/dist/collection/components/organism-bundles/bundle-featured-list/featured-list.css +4 -0
  26. package/dist/collection/components/ptc-bio-card/ptc-bio-card.css +4 -0
  27. package/dist/collection/components/ptc-blue-pill-announcement-bar/ptc-blue-pill-announcement-bar.css +93 -0
  28. package/dist/collection/components/ptc-blue-pill-announcement-bar/ptc-blue-pill-announcement-bar.js +18 -0
  29. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +4 -0
  30. package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +4 -0
  31. package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +4 -0
  32. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +4 -0
  33. package/dist/collection/components/ptc-modal/ptc-modal.css +10 -0
  34. package/dist/collection/components/ptc-modal/ptc-modal.js +46 -3
  35. package/dist/collection/components/ptc-overlay/ptc-overlay.css +4 -0
  36. package/dist/collection/components/ptc-overlay/ptc-overlay.js +1 -1
  37. package/dist/collection/components/ptc-podcast-card/ptc-podcast-card.css +4 -0
  38. package/dist/collection/components/ptc-product-card/ptc-product-card.css +4 -0
  39. package/dist/collection/components/ptc-product-category/ptc-product-category.css +4 -0
  40. package/dist/collection/components/ptc-product-highlight-card/ptc-product-highlight-card.css +4 -0
  41. package/dist/collection/components/ptc-readmore-char/ptc-readmore-char.css +4 -0
  42. package/dist/collection/components/ptc-readmore-v3/ptc-readmore-v3.css +4 -0
  43. package/dist/collection/components/ptc-store-card/ptc-store-card.css +100 -0
  44. package/dist/collection/components/ptc-store-card/ptc-store-card.js +25 -0
  45. package/dist/collection/components/ptc-store-card-list/ptc-store-card-list.css +1173 -0
  46. package/dist/collection/components/ptc-store-card-list/ptc-store-card-list.js +108 -0
  47. package/dist/collection/components/ptc-subnav-v2/ptc-subnav-v2.js +65 -4
  48. package/dist/collection/components/ptc-tooltip-v2/ptc-tooltip-v2.css +4 -0
  49. package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.css +4 -0
  50. package/dist/collection/components/ptc-white-paper/ptc-white-paper.css +4 -0
  51. package/dist/collection/stories/BluePillAnnouncementBar.stories.js +20 -0
  52. package/dist/collection/stories/organisms/ptc/E Store Build Product/preview.stories.js +13 -2
  53. package/dist/collection/stories/organisms/ptc/E Store Creo Extension/preview.stories.js +798 -0
  54. package/dist/custom-elements/index.d.ts +18 -0
  55. package/dist/custom-elements/index.js +235 -27
  56. package/dist/esm/featured-list.entry.js +1 -1
  57. package/dist/esm/icon-asset_17.entry.js +3 -3
  58. package/dist/esm/innovator-toggle-container.entry.js +1 -1
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/ptc-bio-card.entry.js +1 -1
  61. package/dist/esm/ptc-blue-pill-announcement-bar.entry.js +15 -0
  62. package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
  63. package/dist/esm/ptc-close-icon_2.entry.js +11 -4
  64. package/dist/esm/ptc-featured-list.entry.js +1 -1
  65. package/dist/esm/ptc-filter-level-theater.entry.js +1 -1
  66. package/dist/esm/ptc-jumbotron.entry.js +1 -1
  67. package/dist/esm/ptc-overlay.entry.js +1 -1
  68. package/dist/esm/ptc-podcast-card.entry.js +1 -1
  69. package/dist/esm/ptc-readmore-char.entry.js +1 -1
  70. package/dist/esm/ptc-readmore-v3.entry.js +1 -1
  71. package/dist/esm/ptc-store-card-list.entry.js +106 -0
  72. package/dist/esm/ptc-store-card.entry.js +20 -0
  73. package/dist/esm/ptc-subnav-v2.entry.js +65 -4
  74. package/dist/esm/ptc-tooltip-v2.entry.js +1 -1
  75. package/dist/esm/ptc-value-led-speed-bump.entry.js +1 -1
  76. package/dist/esm/ptc-white-paper.entry.js +1 -1
  77. package/dist/esm/ptcw-design.js +1 -1
  78. package/dist/ptcw-design/{p-41cec14d.entry.js → p-0dac6766.entry.js} +1 -1
  79. package/dist/ptcw-design/{p-784c16ce.entry.js → p-1149e673.entry.js} +1 -1
  80. package/dist/ptcw-design/{p-4619f5a6.entry.js → p-1e4d0bb7.entry.js} +1 -1
  81. package/dist/ptcw-design/{p-138b2434.entry.js → p-20dfd7bd.entry.js} +1 -1
  82. package/dist/ptcw-design/p-23411b93.entry.js +1 -0
  83. package/dist/ptcw-design/{p-4c4a64bb.entry.js → p-27cd474f.entry.js} +1 -1
  84. package/dist/ptcw-design/p-2e1c6701.entry.js +1 -0
  85. package/dist/ptcw-design/p-4fd2afc0.entry.js +1 -0
  86. package/dist/ptcw-design/{p-a668ad65.entry.js → p-6481e853.entry.js} +1 -1
  87. package/dist/ptcw-design/{p-20f04b2a.entry.js → p-6cfb5642.entry.js} +1 -1
  88. package/dist/ptcw-design/{p-8e24e586.entry.js → p-769954c9.entry.js} +1 -1
  89. package/dist/ptcw-design/{p-c137315d.entry.js → p-828edda6.entry.js} +1 -1
  90. package/dist/ptcw-design/p-93b75e12.entry.js +1 -0
  91. package/dist/ptcw-design/p-af46854e.entry.js +1 -0
  92. package/dist/ptcw-design/{p-e076d2ba.entry.js → p-b0fb4c93.entry.js} +1 -1
  93. package/dist/ptcw-design/{p-3ef5c51f.entry.js → p-bdbf2c61.entry.js} +1 -1
  94. package/dist/ptcw-design/{p-d0013567.entry.js → p-ce39cff2.entry.js} +1 -1
  95. package/dist/ptcw-design/p-d1ff12d2.entry.js +1 -0
  96. package/dist/ptcw-design/{p-0aa52a96.entry.js → p-d4dcba82.entry.js} +1 -1
  97. package/dist/ptcw-design/{p-ca63a0c9.entry.js → p-fe445a4a.entry.js} +1 -1
  98. package/dist/ptcw-design/ptcw-design.css +1 -1
  99. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  100. package/dist/types/components/ptc-blue-pill-announcement-bar/ptc-blue-pill-announcement-bar.d.ts +3 -0
  101. package/dist/types/components/ptc-modal/ptc-modal.d.ts +8 -0
  102. package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +1 -1
  103. package/dist/types/components/ptc-store-card/ptc-store-card.d.ts +6 -0
  104. package/dist/types/components/ptc-store-card-list/ptc-store-card-list.d.ts +18 -0
  105. package/dist/types/components/ptc-subnav-v2/ptc-subnav-v2.d.ts +4 -0
  106. package/dist/types/components.d.ts +57 -0
  107. package/package.json +1 -1
  108. package/readme.md +3 -3
  109. package/dist/ptcw-design/p-5d6f17e3.entry.js +0 -1
  110. package/dist/ptcw-design/p-63da8f22.entry.js +0 -1
  111. package/dist/ptcw-design/p-efd6ee3b.entry.js +0 -1
@@ -0,0 +1,108 @@
1
+ import { h } from "@stencil/core";
2
+ import Swiper, { Navigation, Scrollbar, Pagination } from "swiper";
3
+ export class PtcStoreCardList {
4
+ constructor() {
5
+ this.breakpoint = 768;
6
+ this.modalTriggerClickHandler = (event) => {
7
+ const trigger = event.currentTarget;
8
+ // Ensure the trigger is a child of this component instance
9
+ if (!this.el.contains(trigger)) {
10
+ return;
11
+ }
12
+ event.preventDefault();
13
+ const modalId = trigger.getAttribute("data-modal-target");
14
+ if (modalId) {
15
+ const modal = document.getElementById(modalId);
16
+ if (modal && typeof modal.showModal === "function") {
17
+ modal.showModal();
18
+ }
19
+ }
20
+ };
21
+ }
22
+ componentDidLoad() {
23
+ window.addEventListener("resize", this.handleResize.bind(this));
24
+ this.handleResize();
25
+ this.setupModalTriggers();
26
+ }
27
+ disconnectedCallback() {
28
+ window.removeEventListener("resize", this.handleResize.bind(this));
29
+ this.destroySwiper();
30
+ this.removeModalTriggers();
31
+ }
32
+ setupModalTriggers() {
33
+ const modalTriggers = this.el.querySelectorAll("[data-modal-target]");
34
+ modalTriggers.forEach((trigger) => {
35
+ trigger.addEventListener("click", this.modalTriggerClickHandler);
36
+ });
37
+ }
38
+ removeModalTriggers() {
39
+ const modalTriggers = this.el.querySelectorAll("[data-modal-target]");
40
+ modalTriggers.forEach((trigger) => {
41
+ trigger.removeEventListener("click", this.modalTriggerClickHandler);
42
+ });
43
+ }
44
+ handleResize() {
45
+ if (window.innerWidth < this.breakpoint) {
46
+ this.initSwiper();
47
+ }
48
+ else {
49
+ this.destroySwiper();
50
+ }
51
+ }
52
+ initSwiper() {
53
+ if (this.swiperInstance) {
54
+ return;
55
+ }
56
+ const swiperContainer = this.el.querySelector(".swiper-container");
57
+ if (swiperContainer) {
58
+ this.swiperInstance = new Swiper(swiperContainer, {
59
+ modules: [Navigation, Scrollbar, Pagination],
60
+ slidesPerView: 1.1,
61
+ spaceBetween: 24,
62
+ scrollbar: {
63
+ el: this.swiperScrollbarRef,
64
+ draggable: true,
65
+ },
66
+ navigation: {
67
+ nextEl: this.swiperButtonNextRef,
68
+ prevEl: this.swiperButtonPrevRef,
69
+ },
70
+ breakpoints: {
71
+ 480: {
72
+ slidesPerView: 1.3,
73
+ },
74
+ },
75
+ });
76
+ }
77
+ }
78
+ destroySwiper() {
79
+ if (this.swiperInstance) {
80
+ this.swiperInstance.destroy(true, true);
81
+ this.swiperInstance = undefined;
82
+ // Clean up swiper styles
83
+ const swiperWrapper = this.el.querySelector(".swiper-wrapper");
84
+ if (swiperWrapper) {
85
+ swiperWrapper.style.transform = "";
86
+ }
87
+ const slides = this.el.querySelectorAll(".swiper-slide");
88
+ slides.forEach((slide) => {
89
+ slide.style.marginRight = "";
90
+ });
91
+ }
92
+ }
93
+ render() {
94
+ return (h("div", { class: "ptc-store-card-list-container" }, h("div", { class: "swiper-container" }, h("div", { class: "swiper-wrapper" }, h("slot", null))), h("div", { class: "swiper-scrollbar", ref: (el) => (this.swiperScrollbarRef = el) }), h("div", { class: "swiper-button-next", ref: (el) => (this.swiperButtonNextRef = el) }, h("svg", { width: "14", height: "20", viewBox: "0 0 14 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.75 17.25L8 10L0.75 2.75L3.375 0.125L13.25 10L3.375 19.875L0.75 17.25Z", fill: "#323B42" }))), h("div", { class: "swiper-button-prev", ref: (el) => (this.swiperButtonPrevRef = el) }, h("svg", { width: "14", height: "20", viewBox: "0 0 14 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M13.25 2.75L6 10L13.25 17.25L10.625 19.875L0.749999 10L10.625 0.125L13.25 2.75Z", fill: "#323B42" })))));
95
+ }
96
+ static get is() { return "ptc-store-card-list"; }
97
+ static get originalStyleUrls() {
98
+ return {
99
+ "$": ["ptc-store-card-list.scss"]
100
+ };
101
+ }
102
+ static get styleUrls() {
103
+ return {
104
+ "$": ["ptc-store-card-list.css"]
105
+ };
106
+ }
107
+ static get elementRef() { return "el"; }
108
+ }
@@ -334,10 +334,6 @@ export class PtcSubnavV2 {
334
334
  if (this.manualNavigationTimeout) {
335
335
  clearTimeout(this.manualNavigationTimeout);
336
336
  }
337
- // Reset manual navigation flag after scroll animation completes
338
- this.manualNavigationTimeout = window.setTimeout(() => {
339
- this.isManualNavigation = false;
340
- }, 1500); // Give enough time for smooth scroll to complete
341
337
  // Emit custom event for parent components
342
338
  const customEvent = new CustomEvent("sectionChange", {
343
339
  detail: { section },
@@ -359,6 +355,63 @@ export class PtcSubnavV2 {
359
355
  top: targetPosition,
360
356
  behavior: "smooth",
361
357
  });
358
+ // Reset manual navigation flag and correct scroll position after animation
359
+ this.manualNavigationTimeout = window.setTimeout(() => {
360
+ this.isManualNavigation = false;
361
+ // Re-check position to account for lazy-loaded images
362
+ const finalNavHeight = this.el.offsetHeight;
363
+ const finalTargetPosition = targetElement.getBoundingClientRect().top +
364
+ window.scrollY -
365
+ finalNavHeight;
366
+ // If we're off by more than a small threshold, correct it instantly.
367
+ if (Math.abs(window.scrollY - finalTargetPosition) > 5) {
368
+ window.scrollTo({
369
+ top: finalTargetPosition,
370
+ behavior: "smooth",
371
+ });
372
+ }
373
+ }, 800); // Give enough time for smooth scroll to complete
374
+ }
375
+ else {
376
+ // Fallback timeout if the element doesn't exist
377
+ this.manualNavigationTimeout = window.setTimeout(() => {
378
+ this.isManualNavigation = false;
379
+ }, 1500);
380
+ }
381
+ };
382
+ this.handleInitialLoadWithHash = () => {
383
+ if (window.location.hash) {
384
+ if (document.readyState === "complete") {
385
+ // If the page is already loaded, scroll immediately
386
+ this.handleHashChange();
387
+ }
388
+ else {
389
+ // Otherwise, wait for the page to fully load before scrolling
390
+ window.addEventListener("load", this.boundHandleHashChange, {
391
+ once: true,
392
+ });
393
+ }
394
+ }
395
+ };
396
+ this.handleHashChange = () => {
397
+ const hash = window.location.hash;
398
+ if (hash) {
399
+ const sectionId = hash.substring(1);
400
+ this.scrollToSection(sectionId);
401
+ }
402
+ };
403
+ this.scrollToSection = (sectionId, smooth = true) => {
404
+ const targetElement = document.getElementById(sectionId);
405
+ if (targetElement) {
406
+ const navHeight = this.el.offsetHeight;
407
+ const targetPosition = targetElement.getBoundingClientRect().top +
408
+ window.scrollY -
409
+ navHeight;
410
+ window.scrollTo({
411
+ top: targetPosition,
412
+ behavior: smooth ? "smooth" : "auto",
413
+ });
414
+ this.currentActive = sectionId;
362
415
  }
363
416
  };
364
417
  this.activeSection = "overview";
@@ -381,6 +434,7 @@ export class PtcSubnavV2 {
381
434
  this.setupIntersectionObserver();
382
435
  this.setupResizeObserver();
383
436
  this.initializeStickyPosition();
437
+ this.handleInitialLoadWithHash();
384
438
  }
385
439
  bindEventHandlers() {
386
440
  this.boundHandleResize = this.handleResize.bind(this);
@@ -388,6 +442,7 @@ export class PtcSubnavV2 {
388
442
  this.boundHandleScroll = this.handleScroll.bind(this);
389
443
  this.boundHandleKeyDown = this.handleKeyDown.bind(this);
390
444
  this.boundHandleStickyScroll = this.handleStickyScroll.bind(this);
445
+ this.boundHandleHashChange = this.handleHashChange.bind(this);
391
446
  }
392
447
  addEventListeners() {
393
448
  window.addEventListener("resize", this.boundHandleResize);
@@ -399,6 +454,10 @@ export class PtcSubnavV2 {
399
454
  window.addEventListener("scroll", this.boundHandleStickyScroll, {
400
455
  passive: true,
401
456
  });
457
+ window.addEventListener("hashchange", this.boundHandleHashChange);
458
+ window.addEventListener("load", this.boundHandleHashChange, {
459
+ once: true,
460
+ });
402
461
  }
403
462
  disconnectedCallback() {
404
463
  this.removeEventListeners();
@@ -413,6 +472,8 @@ export class PtcSubnavV2 {
413
472
  document.removeEventListener("keydown", this.boundHandleKeyDown);
414
473
  window.removeEventListener("scroll", this.boundHandleScroll);
415
474
  window.removeEventListener("scroll", this.boundHandleStickyScroll);
475
+ window.removeEventListener("hashchange", this.boundHandleHashChange);
476
+ window.removeEventListener("load", this.boundHandleHashChange);
416
477
  }
417
478
  cleanupTimeouts() {
418
479
  if (this.scrollTimeout)
@@ -235,6 +235,10 @@ ptc-modal inline-form a,
235
235
  outline: 5px solid var(--keyboard-nav-outline);
236
236
  }
237
237
 
238
+ .white-links a {
239
+ color: var(--color-white) !important;
240
+ }
241
+
238
242
  .ptc-link {
239
243
  color: var(--color-gray-10);
240
244
  text-decoration: underline;
@@ -235,6 +235,10 @@ ptc-modal inline-form a,
235
235
  outline: 5px solid var(--keyboard-nav-outline);
236
236
  }
237
237
 
238
+ .white-links a {
239
+ color: var(--color-white) !important;
240
+ }
241
+
238
242
  .ptc-link {
239
243
  color: var(--color-gray-10);
240
244
  text-decoration: underline;
@@ -5787,6 +5787,10 @@ ptc-modal inline-form a,
5787
5787
  outline: 5px solid var(--keyboard-nav-outline);
5788
5788
  }
5789
5789
 
5790
+ .white-links a {
5791
+ color: var(--color-white) !important;
5792
+ }
5793
+
5790
5794
  .ptc-link {
5791
5795
  color: var(--color-gray-10);
5792
5796
  text-decoration: underline;
@@ -0,0 +1,20 @@
1
+ import { html } from "lit-html";
2
+
3
+ export default {
4
+ title: "Molecules/ptc-blue-pill-announcement-bar",
5
+ tags: ["autodocs"],
6
+ };
7
+
8
+ const Template = () => html`
9
+ <div class="ptc-container">
10
+ <ptc-blue-pill-announcement-bar class="white-links">
11
+ <p>
12
+ This extension can only be purchased as an add-on to
13
+ <a href="#">Creo Design Essentials </a>at checkout.
14
+ </p>
15
+ </ptc-blue-pill-announcement-bar>
16
+ </div>
17
+ `;
18
+
19
+ export const Default = Template.bind({});
20
+ Default.args = {};
@@ -6,7 +6,7 @@ export default {
6
6
 
7
7
  const AlertsPage = args => {
8
8
  return html`
9
-
9
+
10
10
 
11
11
  <section>
12
12
  <ptc-hero hero-type="jumbotron" class="ptc-jumbotron" bg-url="https://www.ptc.com/-/media/Images/new-org/1920x500/Digital-Manufacturing/Header-Increase-OEE-1920x500.jpg?h=500&w=1920&la=en&hash=EBD7026CF9A9186AFD98050BF2055750">
@@ -26,6 +26,17 @@ const AlertsPage = args => {
26
26
  </div>
27
27
  </ptc-hero>
28
28
  <div class="pricing-block">
29
+ <div class="ptc-container">
30
+ <ptc-blue-pill-announcement-bar class="white-links">
31
+ <p>
32
+ This extension can only be purchased as an add-on to
33
+ <a href="#">Creo Design Essentials </a>at checkout.
34
+ </p>
35
+ </ptc-blue-pill-announcement-bar>
36
+ </div>
37
+ <ptc-spacer size="medium"></ptc-spacer>
38
+ <ptc-spacer size="medium"></ptc-spacer>
39
+ <ptc-spacer size="small" breakpoint="x-small"></ptc-spacer>
29
40
  <ptc-container elevation="x-large">
30
41
  <ptc-pricing-tabs id="pricing-tabs" product-tag="Advanced Plug-In"
31
42
  tab-label="Pricing Options:" filter-tag="subscription"
@@ -52,7 +63,7 @@ const AlertsPage = args => {
52
63
  <ptc-para font-size="xx-small" font-weight="w-6" para-margin="margin-2" para-style="main" para-line-h="line-height-denser">
53
64
  Pay an annual fee to use the software. Support & Maintenance is included.
54
65
  </ptc-para>
55
-
66
+
56
67
  <ptc-quantity-counter add-to-cart-label="Add to Cart" added-label="Added"></ptc-quantity-counter>
57
68
  </pricing-tab>
58
69
  <pricing-tab header="1-1500 Tags" product-label="$2,968/yr" html="true" tag="subscription" >