@ptcwebops/ptcw-design 5.4.2 → 5.4.5

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 (73) hide show
  1. package/dist/cjs/blog-detail-content_2.cjs.entry.js +1 -1
  2. package/dist/cjs/blog-detail-layout.cjs.entry.js +1 -1
  3. package/dist/cjs/icon-asset.cjs.entry.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/ptc-card_2.cjs.entry.js +5 -2
  6. package/dist/cjs/ptc-filter-tag_2.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-form-checkbox_2.cjs.entry.js +76 -185
  8. package/dist/cjs/ptc-jumbotron.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-mobile-select.cjs.entry.js +4 -3
  10. package/dist/cjs/ptc-para.cjs.entry.js +15 -6
  11. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
  12. package/dist/cjs/ptc-product-category.cjs.entry.js +1 -1
  13. package/dist/cjs/ptc-title.cjs.entry.js +11 -2
  14. package/dist/cjs/ptc-tooltip-v3.cjs.entry.js +22 -9
  15. package/dist/cjs/ptcw-design.cjs.js +1 -1
  16. package/dist/collection/components/icon-asset/icon-asset.css +2 -2
  17. package/dist/collection/components/organism-bundles/blog-detail-content/blog-detail-content.css +1 -1
  18. package/dist/collection/components/organism-bundles/blog-detail-layout/blog-detail-layout.css +1 -1
  19. package/dist/collection/components/ptc-card/ptc-card.css +1 -1
  20. package/dist/collection/components/ptc-form-checkbox/ptc-form-checkbox.css +7 -7
  21. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +2 -2
  22. package/dist/collection/components/ptc-pagenation/ptc-pagenation.css +1 -1
  23. package/dist/collection/components/ptc-para/ptc-para.js +16 -6
  24. package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.css +101 -0
  25. package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.js +3 -0
  26. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +2 -2
  27. package/dist/collection/components/ptc-product-category/ptc-product-category.js +1 -1
  28. package/dist/collection/components/ptc-textfield/ptc-textfield.css +34 -51
  29. package/dist/collection/components/ptc-title/ptc-title.js +11 -2
  30. package/dist/collection/components/ptc-tooltip-v3/ptc-tooltip-v3.css +5 -0
  31. package/dist/collection/components/ptc-tooltip-v3/ptc-tooltip-v3.js +31 -11
  32. package/dist/custom-elements/index.js +141 -215
  33. package/dist/esm/blog-detail-content_2.entry.js +1 -1
  34. package/dist/esm/blog-detail-layout.entry.js +1 -1
  35. package/dist/esm/icon-asset.entry.js +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/ptc-card_2.entry.js +5 -2
  38. package/dist/esm/ptc-filter-tag_2.entry.js +1 -1
  39. package/dist/esm/ptc-form-checkbox_2.entry.js +76 -185
  40. package/dist/esm/ptc-jumbotron.entry.js +1 -1
  41. package/dist/esm/ptc-mobile-select.entry.js +4 -3
  42. package/dist/esm/ptc-para.entry.js +15 -6
  43. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  44. package/dist/esm/ptc-product-category.entry.js +1 -1
  45. package/dist/esm/ptc-title.entry.js +11 -2
  46. package/dist/esm/ptc-tooltip-v3.entry.js +22 -9
  47. package/dist/esm/ptcw-design.js +1 -1
  48. package/dist/ptcw-design/{p-9de5252c.entry.js → p-3f283f6f.entry.js} +1 -1
  49. package/dist/ptcw-design/{p-c02ab93c.entry.js → p-45ade12a.entry.js} +1 -1
  50. package/dist/ptcw-design/{p-fc51fc29.entry.js → p-657ecf13.entry.js} +1 -1
  51. package/dist/ptcw-design/p-7a40b006.entry.js +1 -0
  52. package/dist/ptcw-design/{p-353184f7.entry.js → p-7ea1170a.entry.js} +1 -1
  53. package/dist/ptcw-design/p-870b76ea.entry.js +1 -0
  54. package/dist/ptcw-design/p-90b30ec9.entry.js +68 -0
  55. package/dist/ptcw-design/{p-a3ae424f.entry.js → p-9a077de7.entry.js} +1 -1
  56. package/dist/ptcw-design/p-aa3cdd51.entry.js +1 -0
  57. package/dist/ptcw-design/p-cea1077c.entry.js +1 -0
  58. package/dist/ptcw-design/{p-3d806530.entry.js → p-d1016f96.entry.js} +1 -1
  59. package/dist/ptcw-design/p-eaedd433.entry.js +1 -0
  60. package/dist/ptcw-design/p-f680a788.entry.js +1 -0
  61. package/dist/ptcw-design/ptcw-design.css +1 -1
  62. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  63. package/dist/types/components/ptc-tooltip-v3/ptc-tooltip-v3.d.ts +4 -1
  64. package/dist/types/components.d.ts +2 -2
  65. package/package.json +1 -1
  66. package/readme.md +1 -1
  67. package/dist/ptcw-design/p-51a275df.entry.js +0 -1
  68. package/dist/ptcw-design/p-61643bb4.entry.js +0 -1
  69. package/dist/ptcw-design/p-6b6d712a.entry.js +0 -1
  70. package/dist/ptcw-design/p-79a53af2.entry.js +0 -1
  71. package/dist/ptcw-design/p-a2c257bb.entry.js +0 -1
  72. package/dist/ptcw-design/p-dc678ab4.entry.js +0 -1
  73. package/dist/ptcw-design/p-fe9faaad.entry.js +0 -68
@@ -1046,7 +1046,7 @@ ptc-link, ptc-square-card,
1046
1046
  }
1047
1047
  @media only screen and (min-width: 992px) {
1048
1048
  .u-3-col-grid .u-3-col {
1049
- width: calc(33.3333333333% - 10.66666666px);
1049
+ width: calc(33.333333333333% - 10.66666666px);
1050
1050
  }
1051
1051
  }
1052
1052
  .u-3-col-grid.u-col-space-lg {
@@ -1063,7 +1063,7 @@ ptc-link, ptc-square-card,
1063
1063
  }
1064
1064
  @media only screen and (min-width: 992px) {
1065
1065
  .u-3-col-grid.u-col-space-lg .u-3-col {
1066
- width: calc(33.3333333333% - 21.3333333px);
1066
+ width: calc(33.333333333333% - 21.3333333px);
1067
1067
  }
1068
1068
  }
1069
1069
 
@@ -5,7 +5,7 @@ export class PtcProductCategory {
5
5
  this.categoryDescription = undefined;
6
6
  }
7
7
  render() {
8
- return (h(Host, null, h("div", { class: "category-header" }, h("ptc-title", { type: "h2", upperline: "no-upperline", "title-margin": "margin-flush", "title-size": "xx-large", "title-height": "densest" }, h("ptc-tooltip", { "text-display": "inline", "text-lines": "4", "z-index": "z-999", description: this.categoryTitle, position: "bottom", width: 'full-width' })), h("ptc-spacer", { size: "x-small" }), h("ptc-spacer", { size: "x-small", breakpoint: "x-small" }), h("ptc-para", { "para-margin": "margin-flush", "font-size": "small", "para-line-h": "line-height-p", "font-weight": "w-5", "para-z-index": "z-auto" }, h("ptc-tooltip", { "text-display": "block", "text-lines": "9", "z-index": "z-999", description: this.categoryDescription, position: "bottom", width: 'full-width' }))), h("slot", null)));
8
+ return (h(Host, null, h("div", { class: "category-header" }, h("ptc-title", { type: "h2", upperline: "no-upperline", "title-margin": "margin-flush", "title-size": "xx-large", "title-height": "densest" }, this.categoryTitle), h("ptc-spacer", { size: "x-small" }), h("ptc-spacer", { size: "x-small", breakpoint: "x-small" }), h("ptc-para", { "para-margin": "margin-flush", "font-size": "small", "para-line-h": "line-height-p", "font-weight": "w-5", "para-z-index": "z-auto" }, h("ptc-tooltip", { "text-display": "block", "text-lines": "9", "z-index": "z-999", description: this.categoryDescription, position: "bottom", width: 'full-width' }))), h("slot", null)));
9
9
  }
10
10
  static get is() { return "ptc-product-category"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -2215,9 +2215,9 @@
2215
2215
  .iti__v-hide {
2216
2216
  visibility: hidden;
2217
2217
  }
2218
- .iti input.iti__tel-input,
2219
- .iti input.iti__tel-input[type=text],
2220
- .iti input.iti__tel-input[type=tel] {
2218
+ .iti input,
2219
+ .iti input[type=text],
2220
+ .iti input[type=tel] {
2221
2221
  position: relative;
2222
2222
  z-index: 0;
2223
2223
  margin-top: 0 !important;
@@ -2256,35 +2256,26 @@
2256
2256
  border-top: none;
2257
2257
  border-bottom: 4px solid #555;
2258
2258
  }
2259
- .iti__dropdown-content {
2259
+ .iti__country-list {
2260
2260
  position: absolute;
2261
2261
  z-index: 2;
2262
- margin-left: -1px;
2262
+ list-style: none;
2263
+ padding: 0;
2264
+ margin: 0 0 0 -1px;
2263
2265
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
2264
2266
  background-color: white;
2265
2267
  border: 1px solid #ccc;
2268
+ white-space: nowrap;
2266
2269
  max-height: 200px;
2267
2270
  overflow-y: scroll;
2268
2271
  -webkit-overflow-scrolling: touch;
2269
2272
  }
2270
- .iti__dropdown-content--dropup {
2273
+ .iti__country-list--dropup {
2271
2274
  bottom: 100%;
2272
2275
  margin-bottom: -1px;
2273
2276
  }
2274
- .iti__search-input {
2275
- width: 100%;
2276
- border-width: 0;
2277
- }
2278
- .iti__country-list {
2279
- list-style: none;
2280
- padding: 0;
2281
- margin: 0;
2282
- }
2283
- .iti--flexible-dropdown-width .iti__country-list {
2284
- white-space: nowrap;
2285
- }
2286
2277
  @media (max-width: 500px) {
2287
- .iti--flexible-dropdown-width .iti__country-list {
2278
+ .iti__country-list {
2288
2279
  white-space: normal;
2289
2280
  }
2290
2281
  }
@@ -2316,20 +2307,20 @@
2316
2307
  margin-right: 0;
2317
2308
  margin-left: 6px;
2318
2309
  }
2319
- .iti--allow-dropdown input.iti__tel-input,
2320
- .iti--allow-dropdown input.iti__tel-input[type=text],
2321
- .iti--allow-dropdown input.iti__tel-input[type=tel], .iti--separate-dial-code input.iti__tel-input,
2322
- .iti--separate-dial-code input.iti__tel-input[type=text],
2323
- .iti--separate-dial-code input.iti__tel-input[type=tel] {
2310
+ .iti--allow-dropdown input,
2311
+ .iti--allow-dropdown input[type=text],
2312
+ .iti--allow-dropdown input[type=tel], .iti--separate-dial-code input,
2313
+ .iti--separate-dial-code input[type=text],
2314
+ .iti--separate-dial-code input[type=tel] {
2324
2315
  padding-right: 6px;
2325
2316
  padding-left: 52px;
2326
2317
  margin-left: 0;
2327
2318
  }
2328
- [dir=rtl] .iti--allow-dropdown input.iti__tel-input,
2329
- [dir=rtl] .iti--allow-dropdown input.iti__tel-input[type=text],
2330
- [dir=rtl] .iti--allow-dropdown input.iti__tel-input[type=tel], [dir=rtl] .iti--separate-dial-code input.iti__tel-input,
2331
- [dir=rtl] .iti--separate-dial-code input.iti__tel-input[type=text],
2332
- [dir=rtl] .iti--separate-dial-code input.iti__tel-input[type=tel] {
2319
+ [dir=rtl] .iti--allow-dropdown input,
2320
+ [dir=rtl] .iti--allow-dropdown input[type=text],
2321
+ [dir=rtl] .iti--allow-dropdown input[type=tel], [dir=rtl] .iti--separate-dial-code input,
2322
+ [dir=rtl] .iti--separate-dial-code input[type=text],
2323
+ [dir=rtl] .iti--separate-dial-code input[type=tel] {
2333
2324
  padding-right: 52px;
2334
2325
  padding-left: 6px;
2335
2326
  margin-right: 0;
@@ -2348,12 +2339,12 @@
2348
2339
  .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
2349
2340
  background-color: rgba(0, 0, 0, 0.05);
2350
2341
  }
2351
- .iti--allow-dropdown .iti__flag-container:has(+ input[disabled]):hover,
2352
- .iti--allow-dropdown .iti__flag-container:has(+ input[readonly]):hover {
2342
+ .iti--allow-dropdown input[disabled] + .iti__flag-container:hover,
2343
+ .iti--allow-dropdown input[readonly] + .iti__flag-container:hover {
2353
2344
  cursor: default;
2354
2345
  }
2355
- .iti--allow-dropdown .iti__flag-container:has(+ input[disabled]):hover .iti__selected-flag,
2356
- .iti--allow-dropdown .iti__flag-container:has(+ input[readonly]):hover .iti__selected-flag {
2346
+ .iti--allow-dropdown input[disabled] + .iti__flag-container:hover .iti__selected-flag,
2347
+ .iti--allow-dropdown input[readonly] + .iti__flag-container:hover .iti__selected-flag {
2357
2348
  background-color: transparent;
2358
2349
  }
2359
2350
  .iti--separate-dial-code .iti__selected-flag {
@@ -2377,26 +2368,18 @@
2377
2368
  cursor: pointer;
2378
2369
  }
2379
2370
 
2380
- .iti--fullscreen-popup.iti--container {
2381
- background-color: rgba(0, 0, 0, 0.5);
2382
- top: 0;
2383
- bottom: 0;
2384
- left: 0;
2385
- right: 0;
2371
+ .iti-mobile .iti--container {
2372
+ top: 30px;
2373
+ bottom: 30px;
2374
+ left: 30px;
2375
+ right: 30px;
2386
2376
  position: fixed;
2387
- padding: 30px;
2388
- display: flex;
2389
- flex-direction: column;
2390
- justify-content: center;
2391
- }
2392
- .iti--fullscreen-popup.iti--container.iti--country-search {
2393
- justify-content: flex-start;
2394
2377
  }
2395
- .iti--fullscreen-popup .iti__dropdown-content {
2378
+ .iti-mobile .iti__country-list {
2396
2379
  max-height: 100%;
2397
- position: relative;
2380
+ width: 100%;
2398
2381
  }
2399
- .iti--fullscreen-popup .iti__country {
2382
+ .iti-mobile .iti__country {
2400
2383
  padding: 10px 10px;
2401
2384
  line-height: 1.5em;
2402
2385
  }
@@ -2422,7 +2405,7 @@
2422
2405
  .iti__flag.iti__va {
2423
2406
  width: 15px;
2424
2407
  }
2425
- @media (min-resolution: 2x) {
2408
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
2426
2409
  .iti__flag {
2427
2410
  background-size: 5762px 15px;
2428
2411
  }
@@ -3488,7 +3471,7 @@
3488
3471
  background-color: #dbdbdb;
3489
3472
  background-position: 20px 0;
3490
3473
  }
3491
- @media (min-resolution: 2x) {
3474
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
3492
3475
  .iti__flag {
3493
3476
  background-image: url("../img/flags@2x.png?1");
3494
3477
  }
@@ -51,8 +51,17 @@ export class PtcTitle {
51
51
  var _a;
52
52
  const tooltipClass = 'tooltip-box';
53
53
  const existingTooltip = this.el.querySelector(`.${tooltipClass}`);
54
+ const text = this.el.querySelectorAll('.line-clamp-title');
55
+ let maxLinesShowCheck = false;
56
+ if (text) {
57
+ text.forEach(t => {
58
+ maxLinesShowCheck = t.scrollHeight > t.clientHeight;
59
+ });
60
+ }
61
+ const ifCharExceeds = (this.tooltipText.length > this.maxChars) && !this.maxLines;
62
+ const ifLinesExceeds = this.maxLines && maxLinesShowCheck;
54
63
  if (show && this.enableTooltip) {
55
- if (!existingTooltip) {
64
+ if ((!existingTooltip && ifCharExceeds) || (!existingTooltip && ifLinesExceeds)) {
56
65
  const tooltipMarkup = document.createElement('div');
57
66
  tooltipMarkup.className = tooltipClass;
58
67
  tooltipMarkup.innerText = this.tooltipText;
@@ -76,7 +85,7 @@ export class PtcTitle {
76
85
  // added for tooltip
77
86
  this.tooltipText = html;
78
87
  let eleText = firstChild && firstChild.innerText;
79
- html = this.enableTooltip ? this.getSortedText(eleText) : html;
88
+ html = (this.enableTooltip) ? this.getSortedText(eleText) : html;
80
89
  if (this.el == firstChild) {
81
90
  this.el.innerHTML = '';
82
91
  }
@@ -64,6 +64,11 @@ ptc-link, ptc-square-card,
64
64
  -webkit-box-orient: vertical;
65
65
  overflow: hidden;
66
66
  }
67
+ @media (max-width: 768px) {
68
+ .line-clamp.hide-on-mobile {
69
+ -webkit-line-clamp: initial !important;
70
+ }
71
+ }
67
72
 
68
73
  .slot-wrap {
69
74
  display: none;
@@ -6,7 +6,7 @@ export class PtcTooltipV3 {
6
6
  this.maxLines = undefined;
7
7
  this.showTooltip = false;
8
8
  this.truncatedContent = '';
9
- this.tagType = undefined;
9
+ this.htmlTagType = undefined;
10
10
  this.maxCharEnable = false;
11
11
  this.maxLinesEnable = false;
12
12
  this.zIndex = 'auto';
@@ -17,6 +17,7 @@ export class PtcTooltipV3 {
17
17
  this.hideOnMobile = false;
18
18
  this.isSmallScreen = undefined;
19
19
  this.hideIfMobile = undefined;
20
+ this.maxLinesShowCheck = false;
20
21
  }
21
22
  windowResize() {
22
23
  this.isSmallScreen = window.innerWidth < 768;
@@ -41,6 +42,13 @@ export class PtcTooltipV3 {
41
42
  getSortedText(content) {
42
43
  this.truncatedContent = (this.maxCharEnable && !this.maxLinesEnable && !this.hideIfMobile) ? content.slice(0, this.maxChars) + '...' : content;
43
44
  }
45
+ checkMaxLines() {
46
+ const appRoot = this.el;
47
+ const text = appRoot.querySelectorAll('.trunc-text');
48
+ text.forEach(t => {
49
+ this.maxLinesShowCheck = t.scrollHeight > t.clientHeight;
50
+ });
51
+ }
44
52
  componentDidLoad() {
45
53
  this.updateContentMarkup();
46
54
  // Hide the slot and element from the DOM
@@ -48,21 +56,25 @@ export class PtcTooltipV3 {
48
56
  if (slotElement) {
49
57
  slotElement.remove();
50
58
  }
59
+ this.checkMaxLines();
51
60
  }
52
61
  updateContentMarkup() {
53
62
  const truncDiv = this.el.querySelector('.trunc-text');
54
- if (this.tagType) {
55
- truncDiv.innerHTML = `<${this.tagType}>${this.truncatedContent}</${this.tagType}>`;
56
- }
57
- else {
58
- truncDiv.innerHTML = this.truncatedContent;
63
+ if (truncDiv) {
64
+ if (this.htmlTagType) {
65
+ let tagHtml = `<${this.htmlTagType}>${this.truncatedContent}</${this.htmlTagType}>`;
66
+ truncDiv.innerHTML = tagHtml;
67
+ }
68
+ else {
69
+ truncDiv.innerHTML = this.truncatedContent;
70
+ }
59
71
  }
60
72
  }
61
73
  toggleTooltip(show) {
62
74
  this.showTooltip = show;
63
75
  }
64
76
  renderTooltip() {
65
- return (((this.maxCharEnable && this.showTooltip) || (this.maxLinesEnable && this.showTooltip)) ? (h("div", { class: `tooltip-box ${this.position}`, style: { 'z-index': this.zIndex } }, this.fullContentstring)) : '');
77
+ return (((this.maxCharEnable && this.showTooltip) || (this.maxLinesEnable && this.showTooltip && this.maxLinesShowCheck)) ? (h("div", { class: `tooltip-box ${this.position}`, style: { 'z-index': this.zIndex }, ref: el => (this.tooltipBox = el) }, this.fullContentstring)) : '');
66
78
  }
67
79
  render() {
68
80
  const classMap = this.getCssClassMap();
@@ -73,7 +85,8 @@ export class PtcTooltipV3 {
73
85
  getCssClassMap() {
74
86
  return {
75
87
  'trunc-text': true,
76
- 'line-clamp': this.maxLinesEnable
88
+ 'line-clamp': this.maxLinesEnable,
89
+ 'hide-on-mobile': this.hideOnMobile
77
90
  };
78
91
  }
79
92
  getLineCuttoff() {
@@ -132,7 +145,7 @@ export class PtcTooltipV3 {
132
145
  "attribute": "max-lines",
133
146
  "reflect": false
134
147
  },
135
- "tagType": {
148
+ "htmlTagType": {
136
149
  "type": "string",
137
150
  "mutable": false,
138
151
  "complexType": {
@@ -146,7 +159,7 @@ export class PtcTooltipV3 {
146
159
  "tags": [],
147
160
  "text": ""
148
161
  },
149
- "attribute": "tag-type",
162
+ "attribute": "html-tag-type",
150
163
  "reflect": false
151
164
  },
152
165
  "zIndex": {
@@ -265,7 +278,8 @@ export class PtcTooltipV3 {
265
278
  "maxCharEnable": {},
266
279
  "maxLinesEnable": {},
267
280
  "isSmallScreen": {},
268
- "hideIfMobile": {}
281
+ "hideIfMobile": {},
282
+ "maxLinesShowCheck": {}
269
283
  };
270
284
  }
271
285
  static get elementRef() { return "el"; }
@@ -276,6 +290,12 @@ export class PtcTooltipV3 {
276
290
  "target": "window",
277
291
  "capture": false,
278
292
  "passive": true
293
+ }, {
294
+ "name": "resize",
295
+ "method": "checkMaxLines",
296
+ "target": "window",
297
+ "capture": false,
298
+ "passive": true
279
299
  }];
280
300
  }
281
301
  }