@ptcwebops/ptcw-design 2.8.5 → 2.8.7

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 (54) hide show
  1. package/dist/cjs/embedded-form.cjs.entry.js +433 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/max-width-container.cjs.entry.js +54 -0
  4. package/dist/cjs/ptc-button.cjs.entry.js +50 -0
  5. package/dist/cjs/ptc-dynamic-card.cjs.entry.js +4 -3
  6. package/dist/cjs/ptc-embedded-quiz.cjs.entry.js +1 -1
  7. package/dist/cjs/{embedded-form_8.cjs.entry.js → ptc-form-checkbox_3.cjs.entry.js} +0 -623
  8. package/dist/cjs/ptc-nav-link.cjs.entry.js +11 -15
  9. package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +6 -19
  10. package/dist/cjs/ptc-spacer.cjs.entry.js +38 -0
  11. package/dist/cjs/ptc-title.cjs.entry.js +78 -0
  12. package/dist/cjs/ptcw-design.cjs.js +1 -1
  13. package/dist/collection/components/icon-asset/media/designer.svg +2 -2
  14. package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.css +1 -1
  15. package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.js +20 -2
  16. package/dist/collection/components/ptc-embedded-quiz/ptc-embedded-quiz.css +144 -143
  17. package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.css +1 -1
  18. package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +6 -18
  19. package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.js +12 -16
  20. package/dist/custom-elements/index.js +24 -40
  21. package/dist/esm/embedded-form.entry.js +429 -0
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/max-width-container.entry.js +50 -0
  24. package/dist/esm/ptc-button.entry.js +46 -0
  25. package/dist/esm/ptc-dynamic-card.entry.js +4 -3
  26. package/dist/esm/ptc-embedded-quiz.entry.js +1 -1
  27. package/dist/esm/{embedded-form_8.entry.js → ptc-form-checkbox_3.entry.js} +2 -620
  28. package/dist/esm/ptc-nav-link.entry.js +11 -15
  29. package/dist/esm/ptc-pricing-packaging-table.entry.js +6 -19
  30. package/dist/esm/ptc-spacer.entry.js +34 -0
  31. package/dist/esm/ptc-title.entry.js +74 -0
  32. package/dist/esm/ptcw-design.js +1 -1
  33. package/dist/ptcw-design/media/designer.svg +2 -2
  34. package/dist/ptcw-design/p-2240e6c6.entry.js +1 -0
  35. package/dist/ptcw-design/p-270e5fdf.entry.js +1 -0
  36. package/dist/ptcw-design/p-2803fa43.entry.js +1 -0
  37. package/dist/ptcw-design/p-33c054ff.entry.js +1 -0
  38. package/dist/ptcw-design/p-50f3a568.entry.js +359 -0
  39. package/dist/ptcw-design/p-61e48f01.entry.js +1 -0
  40. package/dist/ptcw-design/p-92bbd407.entry.js +1 -0
  41. package/dist/ptcw-design/{p-048f176c.entry.js → p-e54c51b3.entry.js} +1 -1
  42. package/dist/ptcw-design/p-efdf34c5.entry.js +1 -0
  43. package/dist/ptcw-design/p-f1c77113.entry.js +1 -0
  44. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  45. package/dist/types/components/ptc-dynamic-card/ptc-dynamic-card.d.ts +4 -0
  46. package/dist/types/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.d.ts +1 -1
  47. package/dist/types/components/subnav/ptc-nav-link/ptc-nav-link.d.ts +12 -12
  48. package/dist/types/components.d.ts +8 -0
  49. package/package.json +1 -1
  50. package/readme.md +1 -1
  51. package/dist/ptcw-design/p-28f642a0.entry.js +0 -1
  52. package/dist/ptcw-design/p-3be42a04.entry.js +0 -1
  53. package/dist/ptcw-design/p-6d1fc569.entry.js +0 -1
  54. package/dist/ptcw-design/p-9476bf1d.entry.js +0 -359
@@ -1,149 +1,150 @@
1
1
  :host {
2
2
  display: block;
3
3
  }
4
- @media only screen and (min-width: 360px) {
5
- :host .quiz-slide-container {
6
- position: relative;
7
- width: 100%;
8
- border: 1px solid var(--color-gray-12);
9
- background-color: white;
10
- }
11
- :host .quiz-slide-container .quiz-slide-text-container {
12
- max-width: calc(24 * var(--ptc-element-spacing-07));
13
- }
14
- :host .quiz-slide-background {
15
- position: absolute;
16
- top: 0;
17
- left: 0;
18
- width: 100%;
19
- height: 100%;
20
- background: url("https://www.ptc.com/-/media/Development/Embedded-Vuforia-Quiz/vuforia-background-guide-01.svg");
21
- background-size: cover;
22
- background-position: center;
23
- opacity: 0.25;
24
- }
25
- :host .quiz-slide-initial {
26
- padding: var(--ptc-element-spacing-08);
27
- display: flex;
28
- justify-content: center;
29
- }
30
- :host .quiz-slide-initial #initial-quiz-p {
31
- padding: 0 0 calc(var(--ptc-element-spacing-08) + var(--ptc-element-spacing-04)) 0;
32
- }
33
- :host .quiz-slide-result .cta-container {
34
- display: flex;
35
- flex-direction: column;
36
- align-items: center;
37
- }
38
- :host .quiz-slide-result .cta-container ptc-button {
39
- flex: 1 0 100%;
40
- margin: 0 0 var(--ptc-element-spacing-05) 0;
41
- }
42
- :host .right-button-container {
43
- display: flex;
44
- justify-content: right;
45
- }
46
- :host .right-button-container .restart-quiz-button {
47
- display: flex;
48
- margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-06) 0 0;
49
- transition: var(--ptc-transition-slow);
50
- }
51
- :host .right-button-container .restart-quiz-button #restart-arrow {
52
- display: flex;
53
- align-items: center;
54
- }
55
- :host .right-button-container .restart-quiz-button #restart-arrow svg {
56
- z-index: 2;
57
- margin-right: var(--ptc-element-spacing-03);
58
- }
59
- :host .right-button-container .restart-quiz-button:hover {
60
- cursor: pointer;
61
- }
62
- :host .right-button-container .restart-quiz-button:hover #restart-arrow svg {
63
- transform: rotate(270deg);
64
- }
65
- :host .right-button-container .restart-quiz-button:hover ptc-para {
66
- opacity: 0.7;
67
- }
68
- :host .center-button-container {
69
- display: flex;
70
- justify-content: center;
71
- }
72
- :host .previous-slide-button {
73
- display: flex;
74
- align-items: center;
75
- margin: 0 0 var(--ptc-element-spacing-06) 0;
76
- transition: var(--ptc-transition-slow);
77
- }
78
- :host .previous-slide-button icon-asset {
79
- z-index: 2;
80
- display: flex;
81
- align-items: center;
82
- margin-right: var(--ptc-element-spacing-03);
83
- }
84
- :host .previous-slide-button:hover {
85
- cursor: pointer;
86
- }
87
- :host .previous-slide-button:hover icon-asset svg {
88
- transform: translateX(-8px);
89
- }
90
- :host .previous-slide-button:hover ptc-para {
91
- opacity: 0.7;
92
- }
93
- :host .quiz-slide-dual-layout .image-container {
94
- padding-top: var(--ptc-element-spacing-06);
95
- display: flex;
96
- justify-content: center;
97
- height: calc(4 * var(--ptc-element-spacing-08));
98
- width: 100%;
99
- }
100
- :host .quiz-slide-dual-layout .image-container img {
101
- height: 100%;
102
- width: 100%;
103
- }
104
- :host .quiz-slide-dual-layout .content-container {
105
- margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08);
106
- }
107
- :host .quiz-slide-dual-layout .content-container .options-container {
108
- margin-top: var(--ptc-element-spacing-06);
109
- padding-left: var(--ptc-element-spacing-05);
110
- display: flex;
111
- flex-wrap: wrap;
112
- z-index: 2;
113
- }
114
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input {
115
- flex: 1 0 100%;
116
- margin-bottom: var(--ptc-element-spacing-06);
117
- display: flex;
118
- align-items: start;
119
- display: flex;
120
- align-items: flex-start;
121
- }
122
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio {
123
- width: 16px;
124
- height: 16px;
125
- border-radius: var(--ptc-border-radius-circle);
126
- border: var(--color-gray-10) solid 1px;
127
- z-index: 2;
128
- padding: 2.5px;
129
- box-sizing: border-box;
130
- flex-shrink: 0;
131
- margin-top: var(--ptc-element-spacing-01);
132
- }
133
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio.clicked {
134
- border: var(--color-blue-08) solid 1px;
135
- background: var(--color-blue-08);
136
- background-clip: content-box, padding-box;
137
- }
138
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input ptc-para {
139
- padding: 0 var(--ptc-element-spacing-02) 0 var(--ptc-element-spacing-03);
140
- }
141
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover {
142
- cursor: pointer;
143
- }
144
- :host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover .radio {
145
- box-shadow: var(--ptc-shadow-x-small);
146
- }
4
+ :host .quiz-slide-container {
5
+ position: relative;
6
+ width: 100%;
7
+ border: 1px solid var(--color-gray-12);
8
+ background-color: white;
9
+ z-index: 1;
10
+ }
11
+ :host .quiz-slide-container .quiz-slide-text-container {
12
+ max-width: calc(24 * var(--ptc-element-spacing-07));
13
+ }
14
+ :host .quiz-slide-background {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ width: 100%;
19
+ height: 100%;
20
+ background: url("https://www.ptc.com/-/media/Development/Embedded-Vuforia-Quiz/vuforia-background-guide-01.svg");
21
+ background-size: cover;
22
+ background-position: center;
23
+ opacity: 0.2;
24
+ z-index: -1;
25
+ }
26
+ :host .quiz-slide-initial {
27
+ padding: var(--ptc-element-spacing-08);
28
+ display: flex;
29
+ justify-content: center;
30
+ }
31
+ :host .quiz-slide-initial #initial-quiz-p {
32
+ padding: 0 0 calc(var(--ptc-element-spacing-08) + var(--ptc-element-spacing-04)) 0;
33
+ }
34
+ :host .quiz-slide-result .cta-container {
35
+ display: flex;
36
+ flex-direction: column;
37
+ align-items: center;
38
+ }
39
+ :host .quiz-slide-result .cta-container ptc-button {
40
+ flex: 1 0 100%;
41
+ margin: 0 0 var(--ptc-element-spacing-05) 0;
42
+ }
43
+ :host .right-button-container {
44
+ display: flex;
45
+ justify-content: right;
46
+ }
47
+ :host .right-button-container .restart-quiz-button {
48
+ display: flex;
49
+ margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-06) 0 0;
50
+ transition: var(--ptc-transition-slow);
51
+ }
52
+ :host .right-button-container .restart-quiz-button #restart-arrow {
53
+ display: flex;
54
+ align-items: center;
55
+ }
56
+ :host .right-button-container .restart-quiz-button #restart-arrow svg {
57
+ z-index: 2;
58
+ margin-right: var(--ptc-element-spacing-03);
59
+ }
60
+ :host .right-button-container .restart-quiz-button:hover {
61
+ cursor: pointer;
62
+ }
63
+ :host .right-button-container .restart-quiz-button:hover #restart-arrow svg {
64
+ transform: rotate(270deg);
65
+ }
66
+ :host .right-button-container .restart-quiz-button:hover ptc-para {
67
+ opacity: 0.7;
68
+ }
69
+ :host .center-button-container {
70
+ display: flex;
71
+ justify-content: center;
72
+ }
73
+ :host .previous-slide-button {
74
+ display: flex;
75
+ align-items: center;
76
+ margin: 0 0 var(--ptc-element-spacing-06) 0;
77
+ transition: var(--ptc-transition-slow);
78
+ }
79
+ :host .previous-slide-button icon-asset {
80
+ z-index: 2;
81
+ display: flex;
82
+ align-items: center;
83
+ margin-right: var(--ptc-element-spacing-03);
84
+ }
85
+ :host .previous-slide-button:hover {
86
+ cursor: pointer;
87
+ }
88
+ :host .previous-slide-button:hover icon-asset svg {
89
+ transform: translateX(-8px);
90
+ }
91
+ :host .previous-slide-button:hover ptc-para {
92
+ opacity: 0.7;
93
+ }
94
+ :host .quiz-slide-dual-layout .image-container {
95
+ padding-top: var(--ptc-element-spacing-06);
96
+ display: flex;
97
+ justify-content: center;
98
+ height: calc(4 * var(--ptc-element-spacing-08));
99
+ width: 100%;
100
+ }
101
+ :host .quiz-slide-dual-layout .image-container img {
102
+ height: 100%;
103
+ width: 100%;
104
+ }
105
+ :host .quiz-slide-dual-layout .content-container {
106
+ margin: var(--ptc-element-spacing-06) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08) var(--ptc-element-spacing-08);
107
+ }
108
+ :host .quiz-slide-dual-layout .content-container .options-container {
109
+ margin-top: var(--ptc-element-spacing-06);
110
+ padding-left: var(--ptc-element-spacing-05);
111
+ display: flex;
112
+ flex-wrap: wrap;
113
+ z-index: 2;
114
+ }
115
+ :host .quiz-slide-dual-layout .content-container .options-container .radio-input {
116
+ flex: 1 0 100%;
117
+ margin-bottom: var(--ptc-element-spacing-06);
118
+ display: flex;
119
+ align-items: start;
120
+ display: flex;
121
+ align-items: flex-start;
122
+ }
123
+ :host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio {
124
+ width: 16px;
125
+ height: 16px;
126
+ border-radius: var(--ptc-border-radius-circle);
127
+ border: var(--color-gray-10) solid 1px;
128
+ z-index: 2;
129
+ padding: 3px;
130
+ box-sizing: border-box;
131
+ flex-shrink: 0;
132
+ margin-top: var(--ptc-element-spacing-01);
133
+ background-color: white;
134
+ }
135
+ :host .quiz-slide-dual-layout .content-container .options-container .radio-input .radio.clicked {
136
+ border: var(--color-blue-08) solid 1px;
137
+ background: var(--color-blue-08);
138
+ background-clip: content-box, padding-box;
139
+ }
140
+ :host .quiz-slide-dual-layout .content-container .options-container .radio-input ptc-para {
141
+ padding: 0 var(--ptc-element-spacing-02) 0 var(--ptc-element-spacing-03);
142
+ }
143
+ :host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover {
144
+ cursor: pointer;
145
+ }
146
+ :host .quiz-slide-dual-layout .content-container .options-container .radio-input:hover .radio {
147
+ box-shadow: var(--ptc-shadow-x-small);
147
148
  }
148
149
  @media only screen and (min-width: 768px) {
149
150
  :host .quiz-slide-container {
@@ -103,7 +103,7 @@
103
103
  overflow-x: hidden;
104
104
  -ms-overflow-style: none;
105
105
  scrollbar-width: none;
106
- box-shadow: var(--ptc-shadow-x-large);
106
+ box-shadow: 0 16px 16px -16px grey;
107
107
  }
108
108
  :host #table-header.sticky::-webkit-scrollbar {
109
109
  display: none;
@@ -125,26 +125,12 @@ export class PtcPricingPackagingTable {
125
125
  this.el.style.setProperty('--cell-width-md', `${this.cellWidthMD}px`);
126
126
  }
127
127
  };
128
- this.expandFillerCell = () => {
129
- let pricingTable = this.el.shadowRoot.querySelector("#pricing-table");
130
- let desktopHeaderFirstCell = this.el.shadowRoot.querySelector(".desktop-header-first-cell");
131
- let occupiedSpace;
132
- if (this.isDesktopView) {
133
- occupiedSpace = desktopHeaderFirstCell.getBoundingClientRect().width + (this.dataCols * (this.cellWidthMD + this.cellLeftRightPadding));
134
- }
135
- else {
136
- occupiedSpace = this.dataCols * (this.cellWidthXXS + this.cellLeftRightPadding);
137
- }
138
- let fillerWidth = pricingTable.getBoundingClientRect().width - occupiedSpace;
139
- this.el.style.setProperty('--filler-cell-width', `${fillerWidth - this.cellLeftRightPadding}px`);
140
- this.showFillerCells = true;
141
- };
142
128
  this.handleFillEmptySpace = () => {
143
129
  let pricingTable = this.el.shadowRoot.querySelector("#pricing-table");
144
- let tableHeader = this.el.shadowRoot.querySelector("#table-header");
145
- if (tableHeader.getBoundingClientRect().right < pricingTable.getBoundingClientRect().right) {
146
- // this.expandTableCells();
147
- this.expandFillerCell();
130
+ let tableHeaderPlaceholder = this.el.shadowRoot.querySelector("#table-header-placeholder");
131
+ if (tableHeaderPlaceholder.getBoundingClientRect().right < pricingTable.getBoundingClientRect().right) {
132
+ this.hasEmptySpace = true;
133
+ this.expandTableCells();
148
134
  }
149
135
  };
150
136
  this.resetWidthVariables = () => {
@@ -210,6 +196,7 @@ export class PtcPricingPackagingTable {
210
196
  this.scrollLimit = 50;
211
197
  this.stickyTopAt = undefined;
212
198
  this.columnHeaderLinks = [];
199
+ this.hasEmptySpace = false;
213
200
  this.showFillerCells = false;
214
201
  this.showCtaButtonsRow = undefined;
215
202
  this.ctaButtons = [];
@@ -460,6 +447,7 @@ export class PtcPricingPackagingTable {
460
447
  "scrollLimit": {},
461
448
  "stickyTopAt": {},
462
449
  "columnHeaderLinks": {},
450
+ "hasEmptySpace": {},
463
451
  "showFillerCells": {},
464
452
  "showCtaButtonsRow": {},
465
453
  "ctaButtons": {},
@@ -3,7 +3,7 @@ export class PtcNavLink {
3
3
  constructor() {
4
4
  this.href = undefined;
5
5
  this.isOutsideLink = false;
6
- this.titleText = "";
6
+ this.titleText = '';
7
7
  }
8
8
  handleClick(event) {
9
9
  // Prevent the event from propagating to the underlying <a> element
@@ -13,27 +13,23 @@ export class PtcNavLink {
13
13
  // Find the corresponding section
14
14
  const section = document.querySelector(this.href);
15
15
  section.scrollIntoView({
16
- behavior: 'smooth'
16
+ behavior: 'smooth',
17
17
  });
18
18
  this.navLinkClicked.emit();
19
19
  }
20
20
  }
21
- componentWillLoad() {
22
- // Get the text content of the <slot> tag
23
- const text = this.el.textContent;
24
- // Set the maximum number of characters to display
25
- const charLimit = 32;
26
- // Check if the text content is longer than the character limit
27
- if (text.length > charLimit) {
28
- // Adding link text in title
29
- this.titleText = text;
30
- // Trim the text to the character limit and add "..."
31
- this.el.textContent = text.substring(0, charLimit) + "...";
21
+ trimString(inputString, maxLength) {
22
+ if (inputString.length > maxLength) {
23
+ return inputString.slice(0, maxLength) + '...';
24
+ }
25
+ else {
26
+ return inputString;
32
27
  }
33
28
  }
34
29
  render() {
35
- return (h(Host, null, h("a", { href: this.href, target: this.isOutsideLink ? '_blank' : '_self', title: this.titleText, onClick: (event) => { this.handleClick(event); } }, h("slot", null), !(this.href.startsWith('#')) &&
36
- h("svg", { class: "icon-arrow-right", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "10", viewBox: "0 0 14 10", fill: "none" }, h("path", { d: "M8.84921 0.77792L8.81313 3.41153L0.51545 3.55584L0.515449 6.5863L8.81313 6.44199L8.81313 9.40029L13.1424 5.07107L8.84921 0.77792Z", fill: "#AEB8BD" })))));
30
+ return (h(Host, null, h("a", { href: this.href, target: this.isOutsideLink ? '_blank' : '_self', title: this.trimString(this.titleText, 24), onClick: event => {
31
+ this.handleClick(event);
32
+ } }, h("slot", null), !this.href.startsWith('#') && (h("svg", { class: "icon-arrow-right", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "10", viewBox: "0 0 14 10", fill: "none" }, h("path", { d: "M8.84921 0.77792L8.81313 3.41153L0.51545 3.55584L0.515449 6.5863L8.81313 6.44199L8.81313 9.40029L13.1424 5.07107L8.84921 0.77792Z", fill: "#AEB8BD" }))))));
37
33
  }
38
34
  static get is() { return "ptc-nav-link"; }
39
35
  static get encapsulation() { return "shadow"; }
@@ -100,7 +96,7 @@ export class PtcNavLink {
100
96
  },
101
97
  "attribute": "title-text",
102
98
  "reflect": false,
103
- "defaultValue": "\"\""
99
+ "defaultValue": "''"
104
100
  }
105
101
  };
106
102
  }