@ptcwebops/ptcw-design 6.1.39 → 6.1.41

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 (87) hide show
  1. package/dist/cjs/{core-d64db970.js → core-58fa1795.js} +1 -0
  2. package/dist/cjs/{icon-asset_12.cjs.entry.js → event-jumbotron-example_15.cjs.entry.js} +424 -179
  3. package/dist/cjs/featured-events-slider-example.cjs.entry.js +443 -0
  4. package/dist/cjs/homepage-jumbotron.cjs.entry.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{pagination-468c8158.js → pagination-96df6fcc.js} +1 -1
  7. package/dist/cjs/ptc-card-bottom.cjs.entry.js +46 -0
  8. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +2 -2
  9. package/dist/cjs/ptc-filter-dropdown_4.cjs.entry.js +3 -2
  10. package/dist/cjs/ptc-icon-component.cjs.entry.js +4 -349
  11. package/dist/cjs/ptc-picture.cjs.entry.js +163 -0
  12. package/dist/cjs/ptc-two-column-media.cjs.entry.js +26 -0
  13. package/dist/cjs/ptcw-design.cjs.js +1 -1
  14. package/dist/cjs/scrollbar-18e63a0e.js +352 -0
  15. package/dist/cjs/sequential-bundle-example.cjs.entry.js +1 -1
  16. package/dist/cjs/sequential-bundle.cjs.entry.js +1 -1
  17. package/dist/collection/collection-manifest.json +2 -0
  18. package/dist/collection/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.css +238 -0
  19. package/dist/collection/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.js +154 -0
  20. package/dist/collection/components/organism-bundles/featured-events-slider-example/featured-events-slider-example.css +1189 -0
  21. package/dist/collection/components/organism-bundles/featured-events-slider-example/featured-events-slider-example.js +53 -0
  22. package/dist/collection/components/ptc-card-content/ptc-card-content.js +2 -2
  23. package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.css +10 -2
  24. package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +20 -1
  25. package/dist/collection/components/ptc-link/ptc-link.css +0 -1
  26. package/dist/collection/components/ptc-para/ptc-para.js +2 -2
  27. package/dist/collection/components/ptc-social-share/ptc-social-share.css +8 -0
  28. package/dist/collection/components/ptc-social-share/ptc-social-share.js +20 -1
  29. package/dist/custom-elements/index.d.ts +12 -0
  30. package/dist/custom-elements/index.js +949 -390
  31. package/dist/esm/{core-ebde74a2.js → core-9dcd68aa.js} +1 -1
  32. package/dist/esm/{icon-asset_12.entry.js → event-jumbotron-example_15.entry.js} +422 -180
  33. package/dist/esm/featured-events-slider-example.entry.js +439 -0
  34. package/dist/esm/homepage-jumbotron.entry.js +1 -1
  35. package/dist/esm/{interfaces-7c0243be.js → interfaces-4caedd26.js} +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/{pagination-726fafd1.js → pagination-191217c1.js} +1 -1
  38. package/dist/esm/ptc-card-bottom.entry.js +42 -0
  39. package/dist/esm/ptc-case-studies-slider.entry.js +2 -2
  40. package/dist/esm/ptc-filter-dropdown_4.entry.js +3 -2
  41. package/dist/esm/ptc-icon-component.entry.js +3 -348
  42. package/dist/esm/ptc-picture.entry.js +159 -0
  43. package/dist/esm/ptc-two-column-media.entry.js +22 -0
  44. package/dist/esm/ptcw-design.js +1 -1
  45. package/dist/esm/scrollbar-b41be07f.js +350 -0
  46. package/dist/esm/sequential-bundle-example.entry.js +1 -1
  47. package/dist/esm/sequential-bundle.entry.js +1 -1
  48. package/dist/ptcw-design/{p-7e4a71ff.entry.js → p-0151c2ee.entry.js} +1 -1
  49. package/dist/ptcw-design/p-0abb6e77.entry.js +1 -0
  50. package/dist/ptcw-design/{p-b6e5c0f7.entry.js → p-37899461.entry.js} +1 -1
  51. package/dist/ptcw-design/{p-6914b70c.js → p-5292a000.js} +1 -1
  52. package/dist/ptcw-design/{p-56430000.entry.js → p-5db96118.entry.js} +1 -1
  53. package/dist/ptcw-design/p-6b271c11.entry.js +1 -0
  54. package/dist/ptcw-design/{p-ee1183b2.js → p-711bcdad.js} +1 -1
  55. package/dist/ptcw-design/p-78252282.entry.js +1 -0
  56. package/dist/ptcw-design/p-794eebdb.entry.js +1 -0
  57. package/dist/ptcw-design/p-7f3ba557.entry.js +1 -0
  58. package/dist/ptcw-design/{p-4e7809ba.entry.js → p-aaf8fb04.entry.js} +1 -1
  59. package/dist/ptcw-design/p-b5d0e4a2.entry.js +1 -0
  60. package/dist/ptcw-design/p-d9c54a1d.js +1 -0
  61. package/dist/ptcw-design/p-f31ae1ba.entry.js +1 -0
  62. package/dist/ptcw-design/{p-8f6af405.js → p-f5dfa530.js} +1 -1
  63. package/dist/ptcw-design/ptcw-design.css +1 -1
  64. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  65. package/dist/types/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.d.ts +29 -0
  66. package/dist/types/components/organism-bundles/featured-events-slider-example/featured-events-slider-example.d.ts +10 -0
  67. package/dist/types/components/ptc-card-content/ptc-card-content.d.ts +1 -1
  68. package/dist/types/components/ptc-card-wrapper/ptc-card-wrapper.d.ts +4 -0
  69. package/dist/types/components/ptc-social-share/ptc-social-share.d.ts +4 -0
  70. package/dist/types/components.d.ts +48 -2
  71. package/package.json +1 -1
  72. package/readme.md +1 -1
  73. package/dist/cjs/ptc-card-bottom_2.cjs.entry.js +0 -131
  74. package/dist/cjs/ptc-card-content.cjs.entry.js +0 -68
  75. package/dist/cjs/ptc-img.cjs.entry.js +0 -133
  76. package/dist/cjs/ptc-overlay.cjs.entry.js +0 -34
  77. package/dist/esm/ptc-card-bottom_2.entry.js +0 -126
  78. package/dist/esm/ptc-card-content.entry.js +0 -64
  79. package/dist/esm/ptc-img.entry.js +0 -129
  80. package/dist/esm/ptc-overlay.entry.js +0 -30
  81. package/dist/ptcw-design/p-1e44cf5e.entry.js +0 -1
  82. package/dist/ptcw-design/p-1eb92079.entry.js +0 -1
  83. package/dist/ptcw-design/p-2a3735a5.entry.js +0 -1
  84. package/dist/ptcw-design/p-318168f1.entry.js +0 -1
  85. package/dist/ptcw-design/p-847c7f33.entry.js +0 -1
  86. package/dist/ptcw-design/p-df712bfe.entry.js +0 -1
  87. package/dist/ptcw-design/p-e2da0ca3.entry.js +0 -1
@@ -0,0 +1,154 @@
1
+ import { h } from '@stencil/core';
2
+ export class EventJumbotronExample {
3
+ constructor() {
4
+ this.startX = 0;
5
+ this.scrollLeft = 0;
6
+ this.updateContainerClass = () => {
7
+ if (this.screenStatus.isDesktop) {
8
+ this.sliderWrapper.classList.add('ptc-container', 'u-paddingRight-flush', 'u-paddingLeft-flush');
9
+ this.disableDragging();
10
+ }
11
+ else {
12
+ this.sliderWrapper.classList.remove('ptc-container', 'u-paddingRight-flush', 'u-paddingLeft-flush');
13
+ this.enableDragging();
14
+ }
15
+ };
16
+ this.startDragging = (e) => {
17
+ this.isMouseDown = true;
18
+ this.isDragging = false;
19
+ this.startX = e.pageX;
20
+ this.scrollLeft = this.slider.scrollLeft;
21
+ };
22
+ this.performDragging = (e) => {
23
+ if (!this.isMouseDown)
24
+ return;
25
+ const x = e.pageX - this.slider.offsetLeft;
26
+ const walk = x - this.startX;
27
+ this.isDragging = Math.abs(walk) > 5;
28
+ this.slider.scrollLeft = this.scrollLeft - walk;
29
+ };
30
+ this.stopDragging = () => {
31
+ this.isMouseDown = false;
32
+ };
33
+ this.cards = [];
34
+ this.activePanel = null;
35
+ this.isDragging = false;
36
+ this.isMouseDown = false;
37
+ this.screenStatus = { isDesktop: window.innerWidth >= 992 };
38
+ }
39
+ handleCardClick(cardIndex) {
40
+ const card = this.slider.children[cardIndex];
41
+ const panelID = `panel-${cardIndex}`;
42
+ const panel = document.getElementById(panelID);
43
+ if (this.screenStatus.isDesktop && panel) {
44
+ this.showPanel(card, panel);
45
+ }
46
+ else if (!this.screenStatus.isDesktop) {
47
+ if (!this.isDragging) {
48
+ const modal = document.getElementById(`modal-${cardIndex}`);
49
+ console.log('open: ' + modal.id);
50
+ modal.show = true;
51
+ }
52
+ }
53
+ }
54
+ showPanel(card, panel) {
55
+ if (this.activePanel)
56
+ return;
57
+ this.slider.style.transform = `translateX(-${card.offsetLeft}px)`;
58
+ Array.from(this.slider.children).forEach(c => {
59
+ if (c !== card)
60
+ c.classList.add('hidden');
61
+ });
62
+ panel.style.display = 'block';
63
+ setTimeout(() => {
64
+ panel.style.transform = `translateX(${card.offsetWidth}px)`;
65
+ panel.classList.add('visible');
66
+ card.classList.add('active');
67
+ this.activePanel = panel.id;
68
+ }, 100);
69
+ }
70
+ closePanel(panelId) {
71
+ const panel = document.getElementById(panelId);
72
+ if (panel) {
73
+ panel.classList.remove('visible');
74
+ panel.addEventListener('transitionend', () => {
75
+ if (!panel.classList.contains('visible')) {
76
+ panel.style.display = 'none';
77
+ }
78
+ }, { once: true });
79
+ }
80
+ this.activePanel = null;
81
+ this.slider.style.transform = 'translateX(0)';
82
+ Array.from(this.slider.children).forEach(card => {
83
+ card.classList.remove('hidden', 'active');
84
+ });
85
+ }
86
+ enableDragging() {
87
+ this.slider.addEventListener('mousedown', this.startDragging);
88
+ this.slider.addEventListener('mousemove', this.performDragging);
89
+ ['mouseup', 'mouseleave'].forEach(event => this.slider.addEventListener(event, this.stopDragging));
90
+ }
91
+ disableDragging() {
92
+ this.slider.removeEventListener('mousedown', this.startDragging);
93
+ this.slider.removeEventListener('mousemove', this.performDragging);
94
+ ['mouseup', 'mouseleave'].forEach(event => this.slider.removeEventListener(event, this.stopDragging));
95
+ }
96
+ componentDidLoad() {
97
+ this.sliderWrapper = document.querySelector('.jumbotron-cards-wrapper');
98
+ this.slider = document.querySelector('.jumbotron-cards');
99
+ this.updateContainerClass();
100
+ window.addEventListener('resize', () => {
101
+ this.screenStatus.isDesktop = window.innerWidth >= 992;
102
+ this.updateContainerClass();
103
+ });
104
+ }
105
+ render() {
106
+ return [
107
+ h("div", { class: {
108
+ 'event-jumbotron': true,
109
+ 'ptc-container': this.screenStatus.isDesktop,
110
+ } }, h("div", { class: "jumbotron-cards-wrapper" }, h("div", { class: "jumbotron-cards" }, this.cards.map((card, index) => (h("div", { class: "card", onClick: () => this.handleCardClick(index), "data-panel": `panel-${index}` }, h("ptc-img", { "border-radius": "radius-standard", "image-type": "smart-bg", "img-url": card.cardBg, "load-mode": "lazy-bg", styles: "ptc-img{position: absolute; width: 100%; height: 100%; z-index: 0}" }), h("ptc-overlay", { "border-radius": "radius-standard", "filter-color": "black-4", "overlay-z-index": "z-index-auto", styles: "" }), h("div", { class: "text-wrapper" }, h("h3", { class: "card-title" }, card.title, h("span", null, card.description)), h("div", { innerHTML: card.panelContent })))))), this.cards.map((_, index) => (h("div", { id: `panel-${index}`, class: "panel" }, h("button", { tabindex: "-1", class: "close-panel", onClick: () => this.closePanel(`panel-${index}`), "aria-label": "Close panel" }, h("ptc-close-icon", null)), h("slot", { name: `panel-content-${index}` })))), !this.screenStatus.isDesktop && this.cards.map((_, index) => h("slot", { name: `modal-content-${index}` })))),
111
+ h("div", { class: "white-placeholder" }),
112
+ ];
113
+ }
114
+ static get is() { return "event-jumbotron-example"; }
115
+ static get encapsulation() { return "scoped"; }
116
+ static get originalStyleUrls() {
117
+ return {
118
+ "$": ["event-jumbotron-example.scss"]
119
+ };
120
+ }
121
+ static get styleUrls() {
122
+ return {
123
+ "$": ["event-jumbotron-example.css"]
124
+ };
125
+ }
126
+ static get properties() {
127
+ return {
128
+ "cards": {
129
+ "type": "unknown",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "{ title: string; description: string; panelContent: string; cardBg: string }[]",
133
+ "resolved": "{ title: string; description: string; panelContent: string; cardBg: string; }[]",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": ""
141
+ },
142
+ "defaultValue": "[]"
143
+ }
144
+ };
145
+ }
146
+ static get states() {
147
+ return {
148
+ "activePanel": {},
149
+ "isDragging": {},
150
+ "isMouseDown": {},
151
+ "screenStatus": {}
152
+ };
153
+ }
154
+ }