@ptcwebops/ptcw-design 2.0.5 → 2.0.6
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.
- package/dist/cjs/{icon-asset_5.cjs.entry.js → fl-tab-content_11.cjs.entry.js} +485 -41
- package/dist/cjs/list-item.cjs.entry.js +33 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/max-width-container.cjs.entry.js +48 -0
- package/dist/cjs/{ptc-jumbotron.cjs.entry.js → ptc-breadcrumb_2.cjs.entry.js} +24 -0
- package/dist/cjs/ptc-spacer.cjs.entry.js +38 -0
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/ptc-featured-list/fl-tab-content/fl-tab-content.css +11 -0
- package/dist/collection/components/ptc-featured-list/fl-tab-content/fl-tab-content.js +61 -0
- package/dist/collection/components/ptc-featured-list/fl-tab-header/fl-tab-header.css +16 -0
- package/dist/collection/components/ptc-featured-list/fl-tab-header/fl-tab-header.js +105 -0
- package/dist/collection/components/ptc-featured-list/fl-tab-image/fl-tab-image.css +27 -0
- package/dist/collection/components/ptc-featured-list/fl-tab-image/fl-tab-image.js +61 -0
- package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +188 -0
- package/dist/collection/components/ptc-featured-list/ptc-featured-list.js +123 -0
- package/dist/custom-elements/index.d.ts +24 -0
- package/dist/custom-elements/index.js +164 -2
- package/dist/esm/bundle-example.entry.js +1 -1
- package/dist/esm/bundle-jumbotron-example.entry.js +1 -1
- package/dist/esm/dropdown-item.entry.js +1 -1
- package/dist/esm/dynamic-box-bundle.entry.js +1 -1
- package/dist/esm/{icon-asset_5.entry.js → fl-tab-content_11.entry.js} +479 -41
- package/dist/esm/{index-8e63c32d.js → index-4afc9d28.js} +1 -1
- package/dist/esm/innovator-toggle-container.entry.js +1 -1
- package/dist/esm/list-item.entry.js +29 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottie-player.entry.js +1 -1
- package/dist/esm/max-width-container.entry.js +44 -0
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/ptc-accordion-item.entry.js +1 -1
- package/dist/esm/ptc-accordion.entry.js +1 -1
- package/dist/esm/ptc-announcement.entry.js +1 -1
- package/dist/esm/ptc-back-to-top.entry.js +1 -1
- package/dist/esm/ptc-bio-card.entry.js +1 -1
- package/dist/esm/{ptc-jumbotron.entry.js → ptc-breadcrumb_2.entry.js} +25 -2
- package/dist/esm/ptc-card-bottom_3.entry.js +1 -1
- package/dist/esm/ptc-card-content.entry.js +1 -1
- package/dist/esm/ptc-card.entry.js +1 -1
- package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
- package/dist/esm/ptc-checkbox.entry.js +1 -1
- package/dist/esm/ptc-collapse-list.entry.js +1 -1
- package/dist/esm/ptc-container.entry.js +1 -1
- package/dist/esm/ptc-date.entry.js +1 -1
- package/dist/esm/ptc-dropdown.entry.js +1 -1
- package/dist/esm/ptc-dynamic-card.entry.js +1 -1
- package/dist/esm/ptc-ellipsis-dropdown.entry.js +1 -1
- package/dist/esm/ptc-filter-tag.entry.js +1 -1
- package/dist/esm/ptc-hero-footer-cta.entry.js +1 -1
- package/dist/esm/ptc-hero.entry.js +1 -1
- package/dist/esm/ptc-icon-component.entry.js +1 -1
- package/dist/esm/ptc-icon-list.entry.js +1 -1
- package/dist/esm/ptc-icon-minimize.entry.js +1 -1
- package/dist/esm/ptc-image-download-strip.entry.js +1 -1
- package/dist/esm/ptc-link.entry.js +1 -1
- package/dist/esm/ptc-list.entry.js +1 -1
- package/dist/esm/ptc-lottie.entry.js +1 -1
- package/dist/esm/ptc-media-card.entry.js +1 -1
- package/dist/esm/ptc-minimized-nav.entry.js +1 -1
- package/dist/esm/ptc-mobile-select.entry.js +1 -1
- package/dist/esm/ptc-modal.entry.js +1 -1
- package/dist/esm/ptc-nav-card.entry.js +1 -1
- package/dist/esm/ptc-nav-link.entry.js +1 -1
- package/dist/esm/ptc-nav-pills.entry.js +1 -1
- package/dist/esm/ptc-nav-slider.entry.js +1 -1
- package/dist/esm/ptc-nav-submenu.entry.js +1 -1
- package/dist/esm/ptc-news.entry.js +1 -1
- package/dist/esm/ptc-overlay.entry.js +1 -1
- package/dist/esm/ptc-pagenation.entry.js +1 -1
- package/dist/esm/ptc-picture.entry.js +1 -1
- package/dist/esm/ptc-previous-url.entry.js +1 -1
- package/dist/esm/ptc-pricing-block.entry.js +1 -1
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptc-product-card.entry.js +1 -1
- package/dist/esm/ptc-product-category.entry.js +1 -1
- package/dist/esm/ptc-product-dropdown.entry.js +1 -1
- package/dist/esm/ptc-product-highlight-card.entry.js +1 -1
- package/dist/esm/ptc-product-list.entry.js +1 -1
- package/dist/esm/ptc-product-sidebar.entry.js +1 -1
- package/dist/esm/ptc-progress-bar.entry.js +1 -1
- package/dist/esm/ptc-quote.entry.js +1 -1
- package/dist/esm/ptc-readmore-char.entry.js +1 -1
- package/dist/esm/ptc-readmore.entry.js +1 -1
- package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
- package/dist/esm/ptc-search-field.entry.js +1 -1
- package/dist/esm/ptc-shopping-cart.entry.js +1 -1
- package/dist/esm/ptc-slit-card.entry.js +1 -1
- package/dist/esm/ptc-social-share.entry.js +1 -1
- package/dist/esm/ptc-spacer.entry.js +34 -0
- package/dist/esm/ptc-span.entry.js +1 -1
- package/dist/esm/ptc-sticky-icons.entry.js +1 -1
- package/dist/esm/ptc-sticky-section.entry.js +1 -1
- package/dist/esm/ptc-sticky-title.entry.js +1 -1
- package/dist/esm/ptc-subnav-card.entry.js +1 -1
- package/dist/esm/ptc-subnav.entry.js +1 -1
- package/dist/esm/ptc-svg-btn.entry.js +1 -1
- package/dist/esm/ptc-tab-list.entry.js +1 -1
- package/dist/esm/ptc-tab.entry.js +1 -1
- package/dist/esm/ptc-tabs.entry.js +1 -1
- package/dist/esm/ptc-text-copy-with-background.entry.js +1 -1
- package/dist/esm/ptc-two-column-media.entry.js +1 -1
- package/dist/esm/ptcw-design.js +3 -3
- package/dist/esm/sequential-bundle-example.entry.js +1 -1
- package/dist/esm/sequential-bundle.entry.js +1 -1
- package/dist/esm/tab-content.entry.js +1 -1
- package/dist/esm/tab-header.entry.js +1 -1
- package/dist/ptcw-design/{p-49b5abe9.entry.js → p-009f76ac.entry.js} +1 -1
- package/dist/ptcw-design/{p-4983e571.entry.js → p-00b2c937.entry.js} +1 -1
- package/dist/ptcw-design/{p-847d85ba.entry.js → p-033330d3.entry.js} +1 -1
- package/dist/ptcw-design/{p-73ea7065.entry.js → p-04549d19.entry.js} +1 -1
- package/dist/ptcw-design/{p-54ca3d2a.entry.js → p-046d0d0c.entry.js} +1 -1
- package/dist/ptcw-design/{p-8030db10.entry.js → p-07059441.entry.js} +1 -1
- package/dist/ptcw-design/p-07b6676a.entry.js +1 -0
- package/dist/ptcw-design/{p-d49d8875.entry.js → p-08f17ab6.entry.js} +1 -1
- package/dist/ptcw-design/{p-462567d1.entry.js → p-08f40716.entry.js} +1 -1
- package/dist/ptcw-design/{p-8c6b069b.entry.js → p-09a6b0a7.entry.js} +1 -1
- package/dist/ptcw-design/{p-366528df.entry.js → p-10555016.entry.js} +1 -1
- package/dist/ptcw-design/{p-3cf1f951.entry.js → p-1905e99d.entry.js} +1 -1
- package/dist/ptcw-design/{p-4702f4e4.entry.js → p-1a346da4.entry.js} +1 -1
- package/dist/ptcw-design/{p-cd55eba0.entry.js → p-1aaaefc2.entry.js} +1 -1
- package/dist/ptcw-design/{p-1cf0240f.entry.js → p-20500bc0.entry.js} +1 -1
- package/dist/ptcw-design/{p-4f465dd3.entry.js → p-2a959ce3.entry.js} +1 -1
- package/dist/ptcw-design/{p-b922e3a5.entry.js → p-2ac4eb02.entry.js} +1 -1
- package/dist/ptcw-design/p-2d666a05.entry.js +1 -0
- package/dist/ptcw-design/{p-ba3372d4.entry.js → p-35b3d9a8.entry.js} +1 -1
- package/dist/ptcw-design/{p-cdff68d4.entry.js → p-372a6bb1.entry.js} +1 -1
- package/dist/ptcw-design/{p-3bb54c51.entry.js → p-42424ba0.entry.js} +1 -1
- package/dist/ptcw-design/{p-2d69f408.entry.js → p-47ee06af.entry.js} +1 -1
- package/dist/ptcw-design/{p-250b3ea1.entry.js → p-4947eb0a.entry.js} +1 -1
- package/dist/ptcw-design/{p-5e0dd0fe.entry.js → p-4be56588.entry.js} +1 -1
- package/dist/ptcw-design/{p-46afd828.entry.js → p-4f93dac7.entry.js} +1 -1
- package/dist/ptcw-design/{p-561d7a5c.entry.js → p-5854b9b4.entry.js} +1 -1
- package/dist/ptcw-design/{p-a7961cf6.entry.js → p-5c9d254c.entry.js} +1 -1
- package/dist/ptcw-design/{p-469482ba.entry.js → p-64691ccb.entry.js} +1 -1
- package/dist/ptcw-design/{p-2b079e72.entry.js → p-66a25008.entry.js} +1 -1
- package/dist/ptcw-design/{p-77d49d3d.entry.js → p-68543211.entry.js} +1 -1
- package/dist/ptcw-design/{p-d7d6eff1.entry.js → p-6a0b0d0e.entry.js} +1 -1
- package/dist/ptcw-design/{p-8a1c2577.entry.js → p-6acd380a.entry.js} +1 -1
- package/dist/ptcw-design/{p-938eb938.entry.js → p-7097ec55.entry.js} +1 -1
- package/dist/ptcw-design/{p-3f6b95bb.entry.js → p-743dae02.entry.js} +1 -1
- package/dist/ptcw-design/p-7650e042.entry.js +1 -0
- package/dist/ptcw-design/{p-e66e3791.entry.js → p-7698cc75.entry.js} +1 -1
- package/dist/ptcw-design/{p-fa58bf5f.entry.js → p-77d3b816.entry.js} +1 -1
- package/dist/ptcw-design/p-799bbd3a.entry.js +1 -0
- package/dist/ptcw-design/{p-399345bb.entry.js → p-7e978dd7.entry.js} +1 -1
- package/dist/ptcw-design/{p-bb3ce5f2.entry.js → p-8116452c.entry.js} +1 -1
- package/dist/ptcw-design/{p-af3a4142.entry.js → p-87ccd549.entry.js} +1 -1
- package/dist/ptcw-design/{p-a6a343a7.entry.js → p-8c212875.entry.js} +1 -1
- package/dist/ptcw-design/{p-9a5ee2d5.entry.js → p-90143d7c.entry.js} +1 -1
- package/dist/ptcw-design/{p-dedaf951.entry.js → p-908b08d5.entry.js} +1 -1
- package/dist/ptcw-design/{p-2181c8c7.entry.js → p-9805a542.entry.js} +1 -1
- package/dist/ptcw-design/{p-c3b7c168.entry.js → p-9bbfeec6.entry.js} +1 -1
- package/dist/ptcw-design/{p-63c06667.js → p-9dd25c18.js} +1 -1
- package/dist/ptcw-design/{p-4e80cc93.entry.js → p-a1f30323.entry.js} +1 -1
- package/dist/ptcw-design/{p-fe0928c0.entry.js → p-a49ba579.entry.js} +1 -1
- package/dist/ptcw-design/{p-e865c958.entry.js → p-a4c49997.entry.js} +1 -1
- package/dist/ptcw-design/{p-57fa9836.entry.js → p-a532ea92.entry.js} +1 -1
- package/dist/ptcw-design/{p-b9bbe5d9.entry.js → p-a6014d9a.entry.js} +1 -1
- package/dist/ptcw-design/p-a6ebedfd.entry.js +1 -0
- package/dist/ptcw-design/{p-34f2f815.entry.js → p-a7eb1503.entry.js} +1 -1
- package/dist/ptcw-design/{p-d7232d12.entry.js → p-a924d029.entry.js} +1 -1
- package/dist/ptcw-design/p-ab2a2d1a.entry.js +1 -0
- package/dist/ptcw-design/{p-40adeccf.entry.js → p-ad924207.entry.js} +1 -1
- package/dist/ptcw-design/{p-51bfb258.entry.js → p-b2afe3a3.entry.js} +1 -1
- package/dist/ptcw-design/{p-26880c78.entry.js → p-b64cd689.entry.js} +1 -1
- package/dist/ptcw-design/{p-55d298f5.entry.js → p-b73ea53a.entry.js} +1 -1
- package/dist/ptcw-design/{p-b99f5093.entry.js → p-bdfd42d2.entry.js} +1 -1
- package/dist/ptcw-design/{p-4783fc15.entry.js → p-c05218ed.entry.js} +1 -1
- package/dist/ptcw-design/{p-cd6b8c27.entry.js → p-c1d75020.entry.js} +1 -1
- package/dist/ptcw-design/{p-12780f09.entry.js → p-c326164f.entry.js} +1 -1
- package/dist/ptcw-design/{p-4977dc6d.entry.js → p-c43f4e1a.entry.js} +1 -1
- package/dist/ptcw-design/{p-574680c3.entry.js → p-c83efab5.entry.js} +1 -1
- package/dist/ptcw-design/{p-11e086c2.entry.js → p-c852499f.entry.js} +1 -1
- package/dist/ptcw-design/{p-a24ecd75.entry.js → p-c9342bd2.entry.js} +1 -1
- package/dist/ptcw-design/{p-69dd7c50.entry.js → p-c9ded71b.entry.js} +1 -1
- package/dist/ptcw-design/{p-dd6501a8.entry.js → p-cff0b2b0.entry.js} +1 -1
- package/dist/ptcw-design/{p-5e08dc82.entry.js → p-d7e11aad.entry.js} +1 -1
- package/dist/ptcw-design/{p-97587e57.entry.js → p-d94d1fa5.entry.js} +1 -1
- package/dist/ptcw-design/p-da15fae5.entry.js +1 -0
- package/dist/ptcw-design/{p-0f9b2495.entry.js → p-dc64e2d4.entry.js} +1 -1
- package/dist/ptcw-design/{p-fb4779ce.entry.js → p-ddf7819e.entry.js} +1 -1
- package/dist/ptcw-design/{p-08658fa3.entry.js → p-dea73da3.entry.js} +1 -1
- package/dist/ptcw-design/{p-59058faa.entry.js → p-deed8ef6.entry.js} +1 -1
- package/dist/ptcw-design/{p-c7bd4d99.entry.js → p-e282af3d.entry.js} +1 -1
- package/dist/ptcw-design/{p-c5fadad0.entry.js → p-e2be8313.entry.js} +1 -1
- package/dist/ptcw-design/{p-af3d5be7.entry.js → p-e329399d.entry.js} +1 -1
- package/dist/ptcw-design/{p-e6fa27fb.entry.js → p-e8127819.entry.js} +1 -1
- package/dist/ptcw-design/p-edc34ad7.entry.js +1 -0
- package/dist/ptcw-design/{p-eed3687b.entry.js → p-effa1f41.entry.js} +1 -1
- package/dist/ptcw-design/{p-a944a3be.entry.js → p-f4479b50.entry.js} +1 -1
- package/dist/ptcw-design/{p-49dc9b68.entry.js → p-f927e1f9.entry.js} +1 -1
- package/dist/ptcw-design/{p-2318d652.entry.js → p-fbf6f66c.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-featured-list/fl-tab-content/fl-tab-content.d.ts +5 -0
- package/dist/types/components/ptc-featured-list/fl-tab-header/fl-tab-header.d.ts +10 -0
- package/dist/types/components/ptc-featured-list/fl-tab-image/fl-tab-image.d.ts +5 -0
- package/dist/types/components/ptc-featured-list/ptc-featured-list.d.ts +11 -0
- package/dist/types/components.d.ts +71 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/max-width-container_3.cjs.entry.js +0 -237
- package/dist/cjs/ptc-para_2.cjs.entry.js +0 -94
- package/dist/cjs/ptc-tooltip.cjs.entry.js +0 -106
- package/dist/esm/max-width-container_3.entry.js +0 -231
- package/dist/esm/ptc-para_2.entry.js +0 -89
- package/dist/esm/ptc-tooltip.entry.js +0 -102
- package/dist/ptcw-design/p-1b7841bd.entry.js +0 -1
- package/dist/ptcw-design/p-718d6ae8.entry.js +0 -1
- package/dist/ptcw-design/p-ba213813.entry.js +0 -1
- package/dist/ptcw-design/p-baabdb8a.entry.js +0 -1
- package/dist/ptcw-design/p-e2b29e4b.entry.js +0 -1
- package/dist/ptcw-design/p-e93dcf82.entry.js +0 -1
- package/dist/ptcw-design/p-f74283c6.entry.js +0 -1
- package/dist/ptcw-design/p-f8fa5a02.entry.js +0 -1
|
@@ -3,6 +3,59 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88135a6b.js');
|
|
6
|
+
const interfaces = require('./interfaces-574e6df7.js');
|
|
7
|
+
|
|
8
|
+
const flTabContentCss = ":host{display:none}:host(.init-active){display:block}:host(.selected){display:block}";
|
|
9
|
+
|
|
10
|
+
const FlTabContent = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.name = undefined;
|
|
14
|
+
this.selected = false;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (index.h(index.Host, { class: `featured-content ${this.selected ? 'selected' : ''}` }, index.h("div", { class: "fl-content-wrap" }, index.h("slot", null))));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
FlTabContent.style = flTabContentCss;
|
|
21
|
+
|
|
22
|
+
const flTabHeaderCss = ":host{display:block}:host p{color:var(--color-gray-10);font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);margin:0;padding:0}@media only screen and (min-width: 992px){:host p{font-size:var(--ptc-font-size-small)}}";
|
|
23
|
+
|
|
24
|
+
const FlTabHeader = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
this.flTabClicked = index.createEvent(this, "flTabClicked", 7);
|
|
28
|
+
this.tabTitle = undefined;
|
|
29
|
+
this.name = undefined;
|
|
30
|
+
this.selected = false;
|
|
31
|
+
}
|
|
32
|
+
handleClick(event) {
|
|
33
|
+
this.flTabClicked.emit({
|
|
34
|
+
'sender': this,
|
|
35
|
+
'event': event,
|
|
36
|
+
'name': this.name
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return (index.h(index.Host, { class: `fl-header ${this.selected ? 'selected' : ''}`, onClick: this.handleClick.bind(this) }, index.h("slot", null), index.h("p", null, this.tabTitle)));
|
|
41
|
+
}
|
|
42
|
+
get el() { return index.getElement(this); }
|
|
43
|
+
};
|
|
44
|
+
FlTabHeader.style = flTabHeaderCss;
|
|
45
|
+
|
|
46
|
+
const flTabImageCss = ":host{display:none;height:240px}@media only screen and (min-width: 480px){:host{height:320px}}@media only screen and (min-width: 768px){:host{height:450px}}@media only screen and (min-width: 992px){:host{height:500px}}:host(.init-active){display:block}:host(.selected){display:block}";
|
|
47
|
+
|
|
48
|
+
const FlTabImage = class {
|
|
49
|
+
constructor(hostRef) {
|
|
50
|
+
index.registerInstance(this, hostRef);
|
|
51
|
+
this.name = undefined;
|
|
52
|
+
this.selected = false;
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
return (index.h(index.Host, { class: `featured-img ${this.selected ? 'selected' : ''}` }, index.h("slot", null)));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
FlTabImage.style = flTabImageCss;
|
|
6
59
|
|
|
7
60
|
const iconAssetCss = ".svg-inline--fa.sc-icon-asset,svg.sc-icon-asset:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa.sc-icon-asset{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg.sc-icon-asset{vertical-align:-.225em}.svg-inline--fa.fa-w-1.sc-icon-asset{width:.0625em}.svg-inline--fa.fa-w-2.sc-icon-asset{width:.125em}.svg-inline--fa.fa-w-3.sc-icon-asset{width:.1875em}.svg-inline--fa.fa-w-4.sc-icon-asset{width:.25em}.svg-inline--fa.fa-w-5.sc-icon-asset{width:.3125em}.svg-inline--fa.fa-w-6.sc-icon-asset{width:.375em}.svg-inline--fa.fa-w-7.sc-icon-asset{width:.4375em}.svg-inline--fa.fa-w-8.sc-icon-asset{width:.5em}.svg-inline--fa.fa-w-9.sc-icon-asset{width:.5625em}.svg-inline--fa.fa-w-10.sc-icon-asset{width:.625em}.svg-inline--fa.fa-w-11.sc-icon-asset{width:.6875em}.svg-inline--fa.fa-w-12.sc-icon-asset{width:.75em}.svg-inline--fa.fa-w-13.sc-icon-asset{width:.8125em}.svg-inline--fa.fa-w-14.sc-icon-asset{width:.875em}.svg-inline--fa.fa-w-15.sc-icon-asset{width:.9375em}.svg-inline--fa.fa-w-16.sc-icon-asset{width:1em}.svg-inline--fa.fa-w-17.sc-icon-asset{width:1.0625em}.svg-inline--fa.fa-w-18.sc-icon-asset{width:1.125em}.svg-inline--fa.fa-w-19.sc-icon-asset{width:1.1875em}.svg-inline--fa.fa-w-20.sc-icon-asset{width:1.25em}.svg-inline--fa.fa-pull-left.sc-icon-asset{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right.sc-icon-asset{margin-left:.3em;width:auto}.svg-inline--fa.fa-border.sc-icon-asset{height:1.5em}.svg-inline--fa.fa-li.sc-icon-asset{width:2em}.svg-inline--fa.fa-fw.sc-icon-asset{width:1.25em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers.sc-icon-asset{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset,.fa-layers-text.sc-icon-asset{display:inline-block;position:absolute;text-align:center}.fa-layers-text.sc-icon-asset{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right.sc-icon-asset{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left.sc-icon-asset{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right.sc-icon-asset{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left.sc-icon-asset{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg.sc-icon-asset{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs.sc-icon-asset{font-size:.75em}.fa-sm.sc-icon-asset{font-size:.875em}.fa-1x.sc-icon-asset{font-size:1em}.fa-2x.sc-icon-asset{font-size:2em}.fa-3x.sc-icon-asset{font-size:3em}.fa-4x.sc-icon-asset{font-size:4em}.fa-5x.sc-icon-asset{font-size:5em}.fa-6x.sc-icon-asset{font-size:6em}.fa-7x.sc-icon-asset{font-size:7em}.fa-8x.sc-icon-asset{font-size:8em}.fa-9x.sc-icon-asset{font-size:9em}.fa-10x.sc-icon-asset{font-size:10em}.fa-fw.sc-icon-asset{text-align:center;width:1.25em}.fa-ul.sc-icon-asset{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul.sc-icon-asset>li.sc-icon-asset{position:relative}.fa-li.sc-icon-asset{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border.sc-icon-asset{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left.sc-icon-asset{float:left}.fa-pull-right.sc-icon-asset{float:right}.fa.fa-pull-left.sc-icon-asset,.fab.fa-pull-left.sc-icon-asset,.fal.fa-pull-left.sc-icon-asset,.far.fa-pull-left.sc-icon-asset,.fas.fa-pull-left.sc-icon-asset{margin-right:.3em}.fa.fa-pull-right.sc-icon-asset,.fab.fa-pull-right.sc-icon-asset,.fal.fa-pull-right.sc-icon-asset,.far.fa-pull-right.sc-icon-asset,.fas.fa-pull-right.sc-icon-asset{margin-left:.3em}.fa-spin.sc-icon-asset{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse.sc-icon-asset{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical.sc-icon-asset{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset,.fa-flip-vertical.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\"}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset{-webkit-transform:scale(-1);transform:scale(-1)}.sc-icon-asset:root .fa-flip-both.sc-icon-asset,.sc-icon-asset:root .fa-flip-horizontal.sc-icon-asset,.sc-icon-asset:root .fa-flip-vertical.sc-icon-asset,.sc-icon-asset:root .fa-rotate-90.sc-icon-asset,.sc-icon-asset:root .fa-rotate-180.sc-icon-asset,.sc-icon-asset:root .fa-rotate-270.sc-icon-asset{-webkit-filter:none;filter:none}.fa-stack.sc-icon-asset{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x.sc-icon-asset,.fa-stack-2x.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x.sc-icon-asset{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x.sc-icon-asset{height:2em;width:2.5em}.fa-inverse.sc-icon-asset{color:#fff}.sr-only.sc-icon-asset{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable.sc-icon-asset:active,.sr-only-focusable.sc-icon-asset:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa.sc-icon-asset .fa-primary.sc-icon-asset{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset{fill:var(--fa-secondary-color,currentColor)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset,.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-primary.sc-icon-asset{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-secondary.sc-icon-asset{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-primary.sc-icon-asset,.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-secondary.sc-icon-asset{fill:#000}.fad.fa-inverse.sc-icon-asset{color:#fff}icon-asset.sc-icon-asset{vertical-align:middle}svg.sc-icon-asset{transition:all var(--ptc-transition-medium) var(--ptc-ease-inout)}svg.micro.sc-icon-asset{width:calc(var(--ptc-font-size-x-small) / 2);height:calc(var(--ptc-font-size-x-small) / 2)}svg.xxx-small.sc-icon-asset{width:var(--ptc-font-size-xxx-small);height:var(--ptc-font-size-xxx-small)}svg.xx-small.sc-icon-asset{width:var(--ptc-font-size-xx-small);height:var(--ptc-font-size-xx-small)}svg.x-small.sc-icon-asset{width:var(--ptc-font-size-x-small);height:var(--ptc-font-size-x-small)}svg.small.sc-icon-asset{width:var(--ptc-font-size-small);height:var(--ptc-font-size-small)}svg.medium.sc-icon-asset{width:var(--ptc-font-size-medium);height:var(--ptc-font-size-medium)}svg.large.sc-icon-asset{width:var(--ptc-font-size-large);height:var(--ptc-font-size-large)}svg.x-large.sc-icon-asset{width:var(--ptc-font-size-x-large);height:var(--ptc-font-size-x-large)}svg.xx-large.sc-icon-asset{width:var(--ptc-font-size-xx-large);height:var(--ptc-font-size-xx-large)}svg.xxx-large.sc-icon-asset{width:var(--ptc-font-size-xxx-large);height:var(--ptc-font-size-xxx-large)}svg.xxxx-large.sc-icon-asset{width:var(--ptc-font-size-xxxx-large);height:var(--ptc-font-size-xxxx-large)}svg.white.sc-icon-asset{fill:var(--color-white)}svg.white.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-white)}svg.black.sc-icon-asset{fill:var(--color-black)}svg.black.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-black)}svg.ptc-green.sc-icon-asset{fill:var(--color-green-07)}svg.ptc-green.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-green-07)}svg.gray.sc-icon-asset{fill:var(--color-gray-06)}svg.gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-06)}svg.light-gray.sc-icon-asset{fill:var(--color-gray-05)}svg.light-gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-05)}svg.primary-gray.sc-icon-asset{fill:var(--color-gray-10)}svg.inherit.sc-icon-asset{fill:inherit}svg.inherit.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:inherit}";
|
|
8
61
|
|
|
@@ -50,54 +103,66 @@ const IconAsset = class {
|
|
|
50
103
|
};
|
|
51
104
|
IconAsset.style = iconAssetCss;
|
|
52
105
|
|
|
53
|
-
const
|
|
106
|
+
const ptcBackgroundVideoCss = ":host{display:block;position:relative}:host video{position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100;object-fit:cover}:host .video-overlay{z-index:1;display:block;position:absolute;width:100%;height:100%;top:0;left:0;opacity:0.8;background-image:linear-gradient(270deg, rgba(30, 38, 38, 0) 26%, #1e2626)}:host(.legacy){display:block;position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100}:host(.legacy) video{object-fit:cover;position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden}:host .iframe-wrapper{position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100}:host .iframe-wrapper .background-video-embed{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:100%;height:100%}:host .iframe-wrapper .player .vp-video-wrapper .vp-telecine-cover video{object-fit:cover}:host .play-button{position:absolute;top:1.5rem;right:1.5rem;width:34px;height:34px;z-index:99}@media (min-width: 768px){:host .play-button{top:unset;bottom:3.75rem;right:2rem}}";
|
|
54
107
|
|
|
55
|
-
const
|
|
108
|
+
const PtcBackgroundVideo = class {
|
|
56
109
|
constructor(hostRef) {
|
|
57
110
|
index.registerInstance(this, hostRef);
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
111
|
+
this.videoSrc = undefined;
|
|
112
|
+
this.posterSrc = undefined;
|
|
113
|
+
this.overlay = true;
|
|
114
|
+
this.playButtonTitle = undefined;
|
|
115
|
+
this.pauseButtonTitle = undefined;
|
|
116
|
+
this.paused = undefined;
|
|
117
|
+
this.type = 'default';
|
|
118
|
+
this.isIframe = false;
|
|
64
119
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
120
|
+
// componentDidLoad() {
|
|
121
|
+
// if(this.isIframe){
|
|
122
|
+
// const iframe:HTMLIFrameElement = this.el.shadowRoot.querySelector('iframe');
|
|
123
|
+
// const iframeDoc = iframe.contentDocument
|
|
124
|
+
// const iframeVideo = iframeDoc.querySelector('video');
|
|
125
|
+
// console.log("iframe ele: " + iframeDoc.querySelectorAll('video'));
|
|
126
|
+
// iframeVideo.style.objectFit = 'cover';
|
|
127
|
+
// }
|
|
128
|
+
// }
|
|
129
|
+
// @Method()
|
|
130
|
+
// async toggleVideo() {
|
|
131
|
+
// // show a prompt
|
|
132
|
+
// this.paused = !this.paused;
|
|
133
|
+
// let video = this.el.shadowRoot.querySelector('video') as HTMLVideoElement;
|
|
134
|
+
// if (video) {
|
|
135
|
+
// if (this.paused) {
|
|
136
|
+
// video.pause();
|
|
137
|
+
// } else {
|
|
138
|
+
// video.play().catch(z => console.error(z));
|
|
139
|
+
// }
|
|
140
|
+
// }
|
|
141
|
+
// console.log('Hello, I am a publish method from ptc-background-video!');
|
|
142
|
+
// }
|
|
143
|
+
componentWillLoad() {
|
|
144
|
+
this.paused = false;
|
|
88
145
|
}
|
|
89
146
|
render() {
|
|
90
|
-
const
|
|
91
|
-
return (index.h(index.Host, { class:
|
|
147
|
+
const videoContent = this.isIframe ? (index.h("div", { class: "iframe-wrapper" }, index.h("iframe", { id: "jumbotron-iframe", src: this.videoSrc, frameborder: 0, allow: "autoplay", allowFullScreen: true, class: "background-video-embed" }))) : (index.h("video", { src: this.videoSrc, poster: this.posterSrc, autoplay: true, loop: true, muted: true, playsinline: true }));
|
|
148
|
+
return (index.h(index.Host, { class: this.type }, videoContent, !!this.videoSrc && this.playButtonTitle && (index.h("div", { class: "play-button" }, this.paused && (index.h("ptc-tooltip", { class: "play-btn", mode: "wrapper", description: this.playButtonTitle, position: "bottom-right", styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important;}" }, index.h("ptc-button", { type: "button", color: "icon-toggle", onClick: e => this.toggleVideoPlay(e), styles: "button.icon-toggle { padding :0px 8px; }" }, index.h("icon-asset", { name: "play", size: "small", type: "ptc", color: "black" })))), !this.paused && !!this.pauseButtonTitle && (index.h("ptc-tooltip", { class: "pause-btn", mode: "wrapper", description: this.pauseButtonTitle, position: "bottom-right", styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important;}" }, index.h("ptc-button", { type: "button", color: "icon-toggle", onClick: e => this.toggleVideoPlay(e) }, index.h("icon-asset", { name: "pause", size: "small", type: "ptc", color: "black" })))))), this.overlay ? index.h("div", { class: "video-overlay" }) : '', this.type == 'default' ? index.h("slot", null) : ''));
|
|
92
149
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
150
|
+
toggleVideoPlay(e) {
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
this.paused = !this.paused;
|
|
153
|
+
let video = this.el.shadowRoot.querySelector('video');
|
|
154
|
+
if (video) {
|
|
155
|
+
if (this.paused) {
|
|
156
|
+
video.pause();
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
video.play().catch(z => console.error(z));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
98
162
|
}
|
|
163
|
+
get el() { return index.getElement(this); }
|
|
99
164
|
};
|
|
100
|
-
|
|
165
|
+
PtcBackgroundVideo.style = ptcBackgroundVideoCss;
|
|
101
166
|
|
|
102
167
|
const ptcButtonCss = "button.disabled{pointer-events:none;opacity:0.6}button{background-color:var(--color-gray-10);display:inline-block;border-style:solid;border-width:1px;white-space:normal;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard)}button.animation-right ::slotted([slot=slot-after-text]),button.animation-right ::slotted([slot=slot-before-text]),button.animation-down ::slotted([slot=slot-after-text]),button.animation-down ::slotted([slot=slot-before-text]){transition:transform var(--ptc-transition-medium) var(--ptc-ease-inout);position:relative;display:inline-block}button:hover.animation-right ::slotted([slot=slot-after-text]),button:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}button:hover.animation-down ::slotted([slot=slot-after-text]),button:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}button span{font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-small);font-weight:bold;line-height:var(--ptc-line-height-densest)}button.left{text-align:left}button.right{text-align:right}button.center{text-align:center}.icon-left ::slotted([slot=slot-before-text]){margin-right:var(--ptc-element-spacing-01)}.icon-right ::slotted([slot=slot-after-text]){margin-left:var(--ptc-element-spacing-01)}.blackgrey{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(285deg, var(--color-gray-10) 155%, var(--color-gray-07) 62%)}.blackgrey:hover{box-shadow:var(--ptc-shadow-x-large)}.blackgrey span{color:var(--color-white)}.turtlegreen{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-green-07);background-image:linear-gradient(285deg, var(--color-green-07) 155%, var(--color-green-07) 62%)}.turtlegreen:hover{box-shadow:var(--ptc-shadow-x-large)}.turtlegreen span{color:var(--color-white)}.offwhite{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(to right, var(--color-white), var(--color-gray-02), var(--color-gray-01))}.offwhite:hover{box-shadow:var(--ptc-shadow-x-large)}.offwhite span{color:var(--color-gray-10)}.legacy-green{margin-left:10px;padding:10px 20px;margin-bottom:var(--ptc-element-spacing-01);margin-top:var(--ptc-element-spacing-01);box-shadow:var(--ptc-shadow-large);border:solid 2.5px var(--color-green-08);background-image:linear-gradient(to right, var(--color-green-06), var(--color-green-08))}.legacy-green:after{position:absolute;content:\"\";top:-1px;left:0;bottom:0;right:0;width:100%;height:103%;background-image:linear-gradient(to right, var(--color-green-08), var(--color-green-06));opacity:0;transition:opacity var(--ptc-transition-x-slow) var(--ptc-ease-inout);border-radius:2px}.legacy-green:hover{box-shadow:var(--ptc-shadow-x-large)}.legacy-green:hover span{color:var(--color-white)}.legacy-green:hover:after{opacity:1}.legacy-green span{font-family:var(--ptc-font-secondary-latin);color:var(--color-white);z-index:100;position:relative;text-transform:uppercase;font-weight:var(--ptc-font-weight-bold);letter-spacing:var(--ptc-letter-spacing-normal);font-size:var(--ptc-font-size-x-small)}@media only screen and (min-width: 768px){.legacy-green span{font-size:var(--ptc-font-size-small);letter-spacing:var(--ptc-letter-spacing-loose)}}.legacy-green icon-asset{display:inline}a{border-style:solid;border-width:1px;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard);display:inline-block;position:relative}a.animation-right ::slotted([slot=slot-after-text]),a.animation-right ::slotted([slot=slot-before-text]),a.animation-down ::slotted([slot=slot-after-text]),a.animation-down ::slotted([slot=slot-before-text]){transition:all var(--ptc-ease-inout) var(--ptc-transition-medium);position:relative;display:inline-block;margin-left:5px}a:hover.animation-right ::slotted([slot=slot-after-text]),a:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}a:hover.animation-down ::slotted([slot=slot-after-text]),a:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}a.left{text-align:left}a.right{text-align:right}a.center{text-align:center}.nav{font-family:var(--ptc-font-latin);background-color:var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);border:1px solid var(--color-white);border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:var(--ptc-font-size-xx-small);font-stretch:100%;font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-loose);list-style:none;padding:3px var(--ptc-element-spacing-04);position:relative;text-align:center;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;transition:background-color var(--ptc-transition-medium) var(--ptc-ease-inout)}.nav:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.nav:hover{background-color:var(--color-gray-12)}.ptc-primary,.ptc-quaternary,.ptc-secondary,.ptc-tertiary,.icon-toggle{padding:var(--ptc-font-size-xx-small) var(--ptc-font-size-medium);transition:background-color var(--ptc-ease-inout) var(--ptc-transition-medium);line-height:20px}.ptc-primary.disabled,.ptc-quaternary.disabled,.ptc-secondary.disabled,.ptc-tertiary.disabled,.icon-toggle.disabled{pointer-events:none;border-color:var(--color-gray-03);background:var(--color-gray-02)}.ptc-primary.disabled span,.ptc-quaternary.disabled span,.ptc-secondary.disabled span,.ptc-tertiary.disabled span,.icon-toggle.disabled span{color:var(--color-gray-03)}.ptc-primary.disabled ::slotted([slot=slot-after-text]),.ptc-quaternary.disabled ::slotted([slot=slot-after-text]),.ptc-secondary.disabled ::slotted([slot=slot-after-text]),.ptc-tertiary.disabled ::slotted([slot=slot-after-text]),.icon-toggle.disabled ::slotted([slot=slot-after-text]){fill:var(--color-gray-03) !important}.ptc-primary:focus,.ptc-quaternary:focus,.ptc-secondary:focus,.ptc-tertiary:focus,.icon-toggle:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.ptc-primary span,.ptc-quaternary span,.ptc-secondary span,.ptc-tertiary span,.icon-toggle span{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-small);line-height:var(--ptc-line-height-densest);letter-spacing:normal}.ptc-primary{background:var(--color-gray-12);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-primary:hover{background-color:var(--color-gray-10)}.ptc-primary:active{background-color:var(--color-black)}.ptc-primary span{color:var(--color-white)}.ptc-primary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-secondary{background:var(--color-gray-12);border:2px solid var(--color-gray-08);border-radius:var(--ptc-border-radius-standard)}.ptc-secondary:hover{background-color:var(--color-gray-10)}.ptc-secondary:active{background-color:var(--color-black)}.ptc-secondary span{color:var(--color-white)}.ptc-secondary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-tertiary{background:var(--color-white);border:2px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard)}.ptc-tertiary:hover{background-color:var(--color-gray-02)}.ptc-tertiary:active{background-color:var(--color-gray-03)}.ptc-tertiary span{color:var(--color-gray-10)}.ptc-tertiary ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.ptc-quaternary{background:var(--color-green-07);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-quaternary:hover{background-color:var(--color-green-08)}.ptc-quaternary:active{background-color:var(--color-green-09)}.ptc-quaternary span{color:var(--color-white)}.ptc-quaternary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.icon-toggle{background:var(--color-white);border:1px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);padding:0;height:2.125rem;width:2.125rem;box-shadow:var(--ptc-shadow-medium)}.icon-toggle:hover{background-color:var(--color-gray-02)}.icon-toggle:active{background-color:var(--color-gray-03)}.icon-toggle.active{background-color:var(--color-gray-04)}.icon-toggle.active:hover{background-color:var(--color-gray-05)}.icon-toggle.active:active{background-color:var(--color-gray-03)}.icon-toggle:focus{outline:2px solid var(--color-blue-07);outline-offset:1px}.icon-toggle span{color:var(--color-gray-10);padding:0}.icon-toggle ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.icon-toggle ::slotted(icon-asset){display:block;margin:auto;height:18px;width:18px}.clear-search{border:none;padding:0px;line-height:var(----ptc-line-height-densest);background-color:transparent}.clear-search:hover{text-decoration:underline;text-decoration-color:var(--color-white)}.clear-search span{color:var(--color-white);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}";
|
|
103
168
|
|
|
@@ -140,6 +205,280 @@ const PtcButton = class {
|
|
|
140
205
|
};
|
|
141
206
|
PtcButton.style = ptcButtonCss;
|
|
142
207
|
|
|
208
|
+
const ptcFeaturedListCss = "a{font-family:var(--ptc-font-latin);font-style:var(--ptc-font-style-normal);text-decoration-line:underline;color:var(--color-blue-07);transition:color var(--ptc-transition-medium) var(--ptc-ease-out);font-weight:var(--ptc-font-weight-bold)}a:visited{color:var(--color-blue-10)}a:active,a:visited:active{color:var(--color-blue-09)}a:hover,a:visited:hover{color:var(--color-blue-08)}a.disabled{color:var(--color-gray-04) !important;cursor:not-allowed}.light-links a,.light-links a.light-link,.background-grey-10 a,.background-grey-10 a.light-link,.background-plm-grey a,.background-plm-grey a.light-link{color:var(--color-blue-04)}.light-links a:visited,.light-links a.light-link:visited,.background-grey-10 a:visited,.background-grey-10 a.light-link:visited,.background-plm-grey a:visited,.background-plm-grey a.light-link:visited{color:var(--color-blue-06)}.light-links a:active,.light-links a:visited:active,.light-links a.light-link:active,.light-links a.light-link:visited:active,.background-grey-10 a:active,.background-grey-10 a:visited:active,.background-grey-10 a.light-link:active,.background-grey-10 a.light-link:visited:active,.background-plm-grey a:active,.background-plm-grey a:visited:active,.background-plm-grey a.light-link:active,.background-plm-grey a.light-link:visited:active{color:var(--color-blue-07)}.light-links a:hover,.light-links a:visited:hover,.light-links a.light-link:hover,.light-links a.light-link:visited:hover,.background-grey-10 a:hover,.background-grey-10 a:visited:hover,.background-grey-10 a.light-link:hover,.background-grey-10 a.light-link:visited:hover,.background-plm-grey a:hover,.background-plm-grey a:visited:hover,.background-plm-grey a.light-link:hover,.background-plm-grey a.light-link:visited:hover{color:var(--color-blue-05)}.light-links a.disabled,.light-links a.light-link.disabled,.background-grey-10 a.disabled,.background-grey-10 a.light-link.disabled,.background-plm-grey a.disabled,.background-plm-grey a.light-link.disabled{color:var(--color-gray-04) !important;cursor:not-allowed}.ptc-link{color:var(--color-gray-10);text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:var(--color-green-06);text-underline-offset:5px;transition:text-decoration-color var(--ptc-transition-medium) var(--ptc-ease-inout)}.ptc-link:hover{color:var(--color-green-06)}.ptc-link:visited{color:var(--color-gray-10)}.ptc-link:active,.ptc-link:visited:active{color:var(--color-green-06)}.ptc-link:hover,.ptc-link:visited:hover{color:var(--color-green-06)}.ptc-link-dark{color:var(--color-white);text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:var(--color-green-06);text-underline-offset:5px;transition:text-decoration-color var(--ptc-transition-medium) var(--ptc-ease-inout)}.ptc-link-dark:hover{color:var(--color-green-06)}.ptc-link-dark:visited{color:var(--color-white)}.ptc-link-dark:active,.ptc-link-dark:visited:active{color:var(--color-green-06)}.ptc-link-dark:hover,.ptc-link-dark:visited:hover{color:var(--color-green-06)}:host{display:block;box-sizing:border-box}:host ptc-background-video{height:240px}@media only screen and (min-width: 480px){:host ptc-background-video{height:320px}}@media only screen and (min-width: 768px){:host ptc-background-video{height:450px}}@media only screen and (min-width: 992px){:host ptc-background-video{height:500px}}:host .fl-header{cursor:pointer}:host .non-mobile-wrapper{box-sizing:border-box}@media only screen and (min-width: 992px){:host .non-mobile-wrapper{max-width:1078px;margin:-75px auto 0 auto;display:flex;align-items:center;width:100%;background:var(--color-white);box-shadow:var(--ptc-shadow-small);padding:24px 32px;z-index:1;position:relative;min-height:350px}}@media only screen and (min-width: 992px){:host .non-mobile-wrapper .header-list-wrap{padding-right:16px;margin-right:64px;min-width:270px;max-width:270px;box-sizing:border-box;display:flex;flex-direction:column;align-items:baseline}:host .non-mobile-wrapper .header-list-wrap::after{content:\"\";width:1px;height:calc(100% - 48px);background-color:var(--color-gray-05);position:absolute;left:297px;top:24px;bottom:24px}}@media only screen and (min-width: 992px){:host .non-mobile-wrapper .content-wrap{padding-right:72px}}:host .non-mobile-wrapper .fl-header{border-radius:4px;margin:12px 0;padding:4px 8px}:host .non-mobile-wrapper .fl-header:hover{background-color:var(--color-gray-02)}:host .non-mobile-wrapper .fl-header.selected,:host .non-mobile-wrapper .fl-header.init-active{background-color:var(--color-gray-03)}:host .mobile-wrapper .acc-item{border-bottom:1px solid var(--color-gray-03);padding:14px 30px}:host .mobile-wrapper .acc-item fl-tab-header{padding-left:34px;position:relative}:host .mobile-wrapper .acc-item fl-tab-header::before{content:\"\";display:inline-block;width:16px;height:16px;background-image:url('data:image/svg+xml,<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(%23clip0_91_790)\"><path d=\"M15.9001 6.29998H9.7001V0.0999756H6.3001V6.29998H0.100098V9.69998H6.3001V15.9H9.7001V9.69998H15.9001V6.29998Z\" fill=\"%23006E09\"/></g><defs><clipPath id=\"clip0_91_790\"><rect width=\"16\" height=\"16\" fill=\"white\"/></clipPath></defs></svg>');vertical-align:middle;position:absolute;left:0;top:4.5px}:host .mobile-wrapper .acc-item fl-tab-header.selected::before,:host .mobile-wrapper .acc-item fl-tab-header.init-active::before{background-image:url('data:image/svg+xml,<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(%23clip0_113_741)\"><path d=\"M0 7.05566V10.8637H13.913V7.05566H0Z\" fill=\"%23323B42\"/></g><defs><clipPath id=\"clip0_113_741\"><rect width=\"13.913\" height=\"17.92\" fill=\"white\"/></clipPath></defs></svg>')}:host .mobile-wrapper .acc-item fl-tab-content{padding-left:34px;padding-bottom:18px}";
|
|
209
|
+
|
|
210
|
+
const PtcFeaturedList = class {
|
|
211
|
+
constructor(hostRef) {
|
|
212
|
+
index.registerInstance(this, hostRef);
|
|
213
|
+
this.isMobile = undefined;
|
|
214
|
+
this.selectedTabGloble = 'tab-01';
|
|
215
|
+
}
|
|
216
|
+
handleResize() {
|
|
217
|
+
this.isMobile = window.innerWidth < 992;
|
|
218
|
+
this.holdTabOnResize(this.selectedTabGloble);
|
|
219
|
+
}
|
|
220
|
+
componentWillLoad() {
|
|
221
|
+
this.isMobile = window.innerWidth < 992;
|
|
222
|
+
}
|
|
223
|
+
handleflTabClicked(event) {
|
|
224
|
+
this.selectedTabGloble = event.detail.name;
|
|
225
|
+
this.selectTab(this.selectedTabGloble);
|
|
226
|
+
}
|
|
227
|
+
holdTabOnResize(name) {
|
|
228
|
+
const contentBlocks = this.hostElement.shadowRoot.querySelectorAll(`fl-tab-content`);
|
|
229
|
+
contentBlocks.forEach(content => {
|
|
230
|
+
if (content.classList.contains("init-active")) {
|
|
231
|
+
content.classList.remove("init-active");
|
|
232
|
+
}
|
|
233
|
+
content.selected = content.name === name;
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
selectTab(name) {
|
|
237
|
+
const featuredImages = this.hostElement.shadowRoot.querySelectorAll(`fl-tab-image`);
|
|
238
|
+
const contentBlocks = this.hostElement.shadowRoot.querySelectorAll(`fl-tab-content`);
|
|
239
|
+
const headerBlocks = this.hostElement.shadowRoot.querySelectorAll(`fl-tab-header`);
|
|
240
|
+
featuredImages.forEach(image => {
|
|
241
|
+
if (image.classList.contains("init-active")) {
|
|
242
|
+
image.classList.remove("init-active");
|
|
243
|
+
}
|
|
244
|
+
image.selected = image.name === name;
|
|
245
|
+
});
|
|
246
|
+
contentBlocks.forEach(content => {
|
|
247
|
+
if (this.isMobile) {
|
|
248
|
+
if (content.name === name) {
|
|
249
|
+
if (content.classList.contains("init-active")) {
|
|
250
|
+
content.selected = false;
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
content.selected = !content.selected;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
content.selected = false;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
content.selected = content.name === name;
|
|
262
|
+
}
|
|
263
|
+
if (content.classList.contains("init-active")) {
|
|
264
|
+
content.classList.remove("init-active");
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
headerBlocks.forEach(header => {
|
|
268
|
+
if (this.isMobile) {
|
|
269
|
+
if (header.name === name) {
|
|
270
|
+
if (header.classList.contains("init-active")) {
|
|
271
|
+
header.selected = false;
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
header.selected = !header.selected;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
header.selected = false;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
header.selected = header.name === name;
|
|
283
|
+
}
|
|
284
|
+
if (header.classList.contains("init-active")) {
|
|
285
|
+
header.classList.remove("init-active");
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
render() {
|
|
290
|
+
return (index.h(index.Host, null, index.h("div", { class: "featured-image-wrap" }, index.h("fl-tab-image", { name: "tab-01", class: "init-active" }, index.h("ptc-img", { "image-type": "smart-bg", "image-alignment": "center", "img-url": "http://s7d1.scene7.com/is/image/ptcinc/cs-boeing-planes-runway" })), index.h("fl-tab-image", { name: "tab-02" }, index.h("ptc-background-video", { overlay: false, "play-button-title": "Play", "pause-button-title": "Pause", "video-src": "https://www.ptc.com/en/www.ptc.com//-/media/Videos/BRAND-FILM-CAR-SECTION-short-1mb.mp4", "poster-src": "https://www.ptc.com/-/media/Images/new-org/misc/W232501-LWX23-Hero-Banner-Video-FINAL-jebyrne-110922-screenshot.jpg" })), index.h("fl-tab-image", { name: "tab-03" }, index.h("ptc-img", { "image-type": "smart-bg", "image-alignment": "center", "img-url": "https://www.ptc.com/-/media/Images/new-org/1366x542/CIMC-1366x542.jpg?h=542&w=1366&la=en&hash=56AE14F73CFB62C24276D08E556B0949" })), index.h("fl-tab-image", { name: "tab-04" }, index.h("ptc-img", { "image-type": "smart-bg", "image-alignment": "center", "img-url": "https://www.ptc.com/-/media/Images/new-org/1366x542/ThingWorx_IIOT_CaterpillarCS_Img_1366x542.jpg?h=542&w=1366&la=en&hash=627ED00C1F58E3677A06F50C0F3009D6" }))), this.isMobile ? (
|
|
291
|
+
// Code for mobile only
|
|
292
|
+
index.h("div", { class: "mobile-wrapper" }, index.h("div", { class: 'acc-item' }, index.h("fl-tab-header", { name: "tab-01", "tab-title": "Aerospace & Defense", class: "init-active" }, " "), index.h("fl-tab-content", { name: "tab-01", class: "init-active" }, index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Adapt to ever-changing customer demands and increasing cost and competitive pressure. Explore digital solutions for driving engineering excellence, manufacturing efficiency, product innovation, and service optimization."), index.h("a", { href: '#' }, "See More about Aerospace & Defense"))), index.h("div", { class: 'acc-item' }, index.h("fl-tab-header", { name: "tab-02", "tab-title": "Automotive" }), index.h("fl-tab-content", { name: "tab-02" }, index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Adapt to ever-changing customer demands and increasing cost and competitive pressure. Explore digital solutions for driving engineering excellence, manufacturing efficiency, product innovation, and service optimization."), index.h("a", { href: '#' }, "See More about Aerospace & Defense"))), index.h("div", { class: 'acc-item' }, index.h("fl-tab-header", { name: "tab-03", "tab-title": "Electronics & High-Tech" }), index.h("fl-tab-content", { name: "tab-03" }, index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Adapt to ever-changing customer demands and increasing cost and competitive pressure. Explore digital solutions for driving engineering excellence, manufacturing efficiency, product innovation, and service optimization."), index.h("a", { href: '#' }, "See More about Aerospace & Defense"))), index.h("div", { class: 'acc-item' }, index.h("fl-tab-header", { name: "tab-04", "tab-title": "Retail & Consumer Products" }), index.h("fl-tab-content", { name: "tab-04" }, index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Adapt to ever-changing customer demands and increasing cost and competitive pressure. Explore digital solutions for driving engineering excellence, manufacturing efficiency, product innovation, and service optimization."), index.h("a", { href: '#' }, "See More about Aerospace & Defense")))))
|
|
293
|
+
:
|
|
294
|
+
(
|
|
295
|
+
// Code for Desktop only
|
|
296
|
+
index.h("div", { class: "non-mobile-wrapper" }, index.h("div", { class: "header-list-wrap" }, index.h("fl-tab-header", { name: "tab-01", "tab-title": "Aerospace & Defense", class: "init-active" }, " "), index.h("fl-tab-header", { name: "tab-02", "tab-title": "Automotive" }), index.h("fl-tab-header", { name: "tab-03", "tab-title": "Electronics & High-Tech" }), index.h("fl-tab-header", { name: "tab-04", "tab-title": "Retail & Consumer Products" })), index.h("div", { class: "content-wrap" }, index.h("fl-tab-content", { name: "tab-01", class: "init-active" }, index.h("ptc-title", { type: 'h3', "title-size": 'large', upperline: "no-upperline", "title-margin": 'margin-flush' }, "Aerospace & Defense"), index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Adapt to ever-changing customer demands and increasing cost and competitive pressure. Explore digital solutions for driving engineering excellence, manufacturing efficiency, product innovation, and service optimization."), index.h("a", { href: '#' }, "See More about Aerospace & Defense")), index.h("fl-tab-content", { name: "tab-02" }, index.h("ptc-title", { type: 'h3', "title-size": 'large', upperline: "no-upperline", "title-margin": 'margin-flush' }, "Automotive"), index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Adapt to ever-changing customer demands and increasing cost and competitive pressure. Explore digital solutions for driving engineering excellence, manufacturing efficiency, product innovation, and service optimization."), index.h("a", { href: '#' }, "See More about Aerospace & Defense")), index.h("fl-tab-content", { name: "tab-03" }, index.h("ptc-title", { type: 'h3', "title-size": 'large', upperline: "no-upperline", "title-margin": 'margin-flush' }, "Electronics & High-Tech"), index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Deliver the future of transportation and mobility and gain competitive advantage. Explore automotive solutions for OEMs and suppliers so your team can help drive the future of transportation."), index.h("a", { href: '#' }, "See More about Aerospace & Defense")), index.h("fl-tab-content", { name: "tab-04" }, index.h("ptc-title", { type: 'h3', "title-size": 'large', upperline: "no-upperline", "title-margin": 'margin-flush' }, "Retail & Consumer Products"), index.h("ptc-para", { "para-line-h": 'line-height-p', "font-size": "small", "para-margin": "margin-3" }, "Navigate supply chain disruption while maximizing revenue growth and sustainability. Explore how PTC\u2019s digital solutions can accelerate product innovation, supply chain collaboration, and more."), index.h("a", { href: '#' }, "See More about Aerospace & Defense")))))));
|
|
297
|
+
}
|
|
298
|
+
get hostElement() { return index.getElement(this); }
|
|
299
|
+
};
|
|
300
|
+
PtcFeaturedList.style = ptcFeaturedListCss;
|
|
301
|
+
|
|
302
|
+
const ptcImgCss = ".smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-standard-top{border-top-left-radius:var(--ptc-border-radius-standard);border-top-right-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.radius-large-top{border-top-left-radius:var(--ptc-border-radius-large);border-top-right-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-gray-03)}@media only screen and (min-width: 768px){.hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.hidden-md{display:none !important}}@media only screen and (min-width: 768px){.hidden-lg{display:none !important}}";
|
|
303
|
+
|
|
304
|
+
const PtcImg = class {
|
|
305
|
+
constructor(hostRef) {
|
|
306
|
+
index.registerInstance(this, hostRef);
|
|
307
|
+
this.sizeXs = '510x340';
|
|
308
|
+
this.sizeSm = '1240x496';
|
|
309
|
+
this.sizeMd = '1366x500';
|
|
310
|
+
this.sizeLg = '1920x1080';
|
|
311
|
+
this.imgUrl = undefined;
|
|
312
|
+
this.imageType = 'smart-bg';
|
|
313
|
+
this.borderRadius = '';
|
|
314
|
+
this.loadMode = 'lazy-bg';
|
|
315
|
+
this.styles = undefined;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Image Z Index
|
|
319
|
+
*/
|
|
320
|
+
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
321
|
+
WindowResize() {
|
|
322
|
+
this.setResponsiveBg();
|
|
323
|
+
}
|
|
324
|
+
render() {
|
|
325
|
+
const classMap = this.getCssClassMap();
|
|
326
|
+
return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` }, this.imageType == 'smart-bg' ? index.h("slot", null) : null)));
|
|
327
|
+
}
|
|
328
|
+
componentDidLoad() {
|
|
329
|
+
this.addIntersectionObserver();
|
|
330
|
+
this.setResponsiveBg();
|
|
331
|
+
}
|
|
332
|
+
componentWillUpdate() {
|
|
333
|
+
this.addIntersectionObserver();
|
|
334
|
+
this.setResponsiveBg();
|
|
335
|
+
}
|
|
336
|
+
//responsive image
|
|
337
|
+
setResponsiveBg() {
|
|
338
|
+
// Define local variables
|
|
339
|
+
let backgrounds = (this.el || document).querySelectorAll(interfaces.ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
340
|
+
// Loop through all target elements
|
|
341
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
342
|
+
// Set current variables
|
|
343
|
+
el = backgrounds[i];
|
|
344
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
345
|
+
// If the data attribute exists, set the background
|
|
346
|
+
if (elData !== null) {
|
|
347
|
+
el.style.backgroundImage = "url('" + elData + "')";
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
if (typeof console == 'object') {
|
|
351
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
//lazy loading
|
|
357
|
+
addIntersectionObserver() {
|
|
358
|
+
if (!this.imgUrl) {
|
|
359
|
+
console.log('no image!');
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
if ('IntersectionObserver' in window) {
|
|
363
|
+
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
364
|
+
let bgObserver = new IntersectionObserver(entries => {
|
|
365
|
+
entries.forEach(entry => {
|
|
366
|
+
if (entry.isIntersecting) {
|
|
367
|
+
const image = entry.target;
|
|
368
|
+
image.classList.remove('lazy-bg');
|
|
369
|
+
bgObserver.unobserve(image);
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
lazyLoadBgs.forEach(image => {
|
|
374
|
+
bgObserver.observe(image);
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
getCssClassMap() {
|
|
379
|
+
return {
|
|
380
|
+
[this.imageType]: true,
|
|
381
|
+
'ptc-img': true,
|
|
382
|
+
[this.borderRadius]: true,
|
|
383
|
+
[this.loadMode]: true,
|
|
384
|
+
// [this.imageZIndex] : true
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
getCurrentBreakPoints() {
|
|
388
|
+
// Define local variables
|
|
389
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
390
|
+
// Append test node
|
|
391
|
+
doc.body.appendChild(temp);
|
|
392
|
+
// Loop through breakpoints
|
|
393
|
+
for (let i = interfaces.ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
394
|
+
env = interfaces.ResponsiveBgVariables.envs[i];
|
|
395
|
+
// Add classes
|
|
396
|
+
temp.className = 'hidden-' + env;
|
|
397
|
+
// Found breakpoint
|
|
398
|
+
if (temp.offsetParent === null) {
|
|
399
|
+
// Remove our test node
|
|
400
|
+
doc.body.removeChild(temp);
|
|
401
|
+
// Return current breakpoint
|
|
402
|
+
return env;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
// Breakpoint not found, try fallback
|
|
406
|
+
doc.body.removeChild(temp);
|
|
407
|
+
return this.getFallbackBreakpoint();
|
|
408
|
+
}
|
|
409
|
+
getFallbackBreakpoint() {
|
|
410
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
411
|
+
return 'lg';
|
|
412
|
+
}
|
|
413
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
414
|
+
return 'md';
|
|
415
|
+
}
|
|
416
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
417
|
+
return 'sm';
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
return 'xs';
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
get el() { return index.getElement(this); }
|
|
424
|
+
};
|
|
425
|
+
PtcImg.style = ptcImgCss;
|
|
426
|
+
|
|
427
|
+
const ptcParaCss = ":host{position:relative;z-index:1}:host(.white){color:var(--color-white)}:host(.z-1){z-index:1}:host(.z-2){z-index:2}:host(.z-3){z-index:3}:host(.z-99){z-index:99}:host(.z-999){z-index:999}:host(.z-auto){z-index:auto}p.default{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;}p.main{text-shadow:0 3px 6px var(--color-white);line-height:var(--ptc-line-height-dense);color:var(--color-gray-10)}p.primary-grey{color:var(--color-gray-10)}p.gray-darker{color:var(--color-gray-11)}p.white{color:var(--color-white)}p.xxx-small{font-size:var(--ptc-font-size-xxx-small)}p.xx-small{font-size:var(--ptc-font-size-xx-small)}p.x-small{font-size:var(--ptc-font-size-x-small)}p.small{font-size:var(--ptc-font-size-small)}p.medium{font-size:var(--ptc-font-size-medium)}p.large{font-size:var(--ptc-font-size-large)}p.x-large{font-size:var(--ptc-font-size-x-large)}p.xx-large{font-size:var(--ptc-font-size-xx-large)}p.xxx-large{font-size:var(--ptc-font-size-xxx-large)}p.xxxx-large{font-size:var(--ptc-font-size-xxxx-large)}p.htmlquote-para{font-size:var(--ptc-font-size-small)}@media only screen and (min-width: 992px){p.htmlquote-para{font-size:var(--ptc-font-size-large)}}p.w-3{font-weight:var(--ptc-font-weight-thin)}p.w-4{font-weight:var(--ptc-font-weight-regular)}p.w-5{font-weight:var(--ptc-font-weight-medium)}p.w-6{font-weight:var(--ptc-font-weight-semibold)}p.w-7{font-weight:var(--ptc-font-weight-bold)}p.w-8{font-weight:var(--ptc-font-weight-extrabold)}p.w-9{font-weight:var(--ptc-font-weight-black)}p.margin-flush{margin-top:0;margin-bottom:0}p.margin-top-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:0}p.margin-top-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:0}p.margin-top-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:0}p.margin-top-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:0}p.margin-top-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:0}p.margin-top-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:0}p.margin-bottom-1{margin-bottom:var(--ptc-element-spacing-01);margin-top:0}p.margin-bottom-2{margin-bottom:var(--ptc-element-spacing-02);margin-top:0}p.margin-bottom-3{margin-bottom:var(--ptc-element-spacing-03);margin-top:0}p.margin-bottom-4{margin-bottom:var(--ptc-element-spacing-04);margin-top:0}p.margin-bottom-5{margin-bottom:var(--ptc-element-spacing-05);margin-top:0}p.margin-bottom-6{margin-bottom:var(--ptc-element-spacing-06);margin-top:0}p.margin-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:var(--ptc-element-spacing-01)}p.margin-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:var(--ptc-element-spacing-02)}p.margin-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:var(--ptc-element-spacing-03)}p.margin-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:var(--ptc-element-spacing-04)}p.margin-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05)}p.margin-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:var(--ptc-element-spacing-06)}p.line-height-densest{line-height:var(--ptc-line-height-densest)}p.line-height-denser{line-height:var(--ptc-line-height-denser)}p.line-height-p{line-height:var(--ptc-line-height-p)}p.line-height-dense{line-height:var(--ptc-line-height-dense)}p.line-height-normal{line-height:var(--ptc-line-height-normal)}p.line-height-loose{line-height:var(--ptc-line-height-loose)}p.line-height-looser{line-height:var(--ptc-line-height-looser)}p.left{text-align:left}p.right{text-align:right}p.center{text-align:center}p.justify{text-align:justify}p.announcement{text-transform:uppercase;font-size:var(--ptc-font-size-small);color:var(--color-gray-07);line-height:var(--ptc-line-height-looser);letter-spacing:var(--ptc-letter-spacing-loose)}p.ellipsis-boxing{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word}";
|
|
428
|
+
|
|
429
|
+
const PtcPara = class {
|
|
430
|
+
constructor(hostRef) {
|
|
431
|
+
index.registerInstance(this, hostRef);
|
|
432
|
+
this.fontSize = 'x-small';
|
|
433
|
+
this.fontWeight = 'w-4';
|
|
434
|
+
this.paraStyle = 'default';
|
|
435
|
+
this.paraColor = 'primary-grey';
|
|
436
|
+
this.paraLineH = 'line-height-normal';
|
|
437
|
+
this.paraMargin = undefined;
|
|
438
|
+
this.paraAlign = undefined;
|
|
439
|
+
this.ellipsisLineCutoff = undefined;
|
|
440
|
+
this.paraZIndex = undefined;
|
|
441
|
+
this.styles = undefined;
|
|
442
|
+
}
|
|
443
|
+
render() {
|
|
444
|
+
const classMap = this.getCssClassMap();
|
|
445
|
+
const colorClass = this.addWhiteClass();
|
|
446
|
+
const cutOff = this.getLineCuttoff();
|
|
447
|
+
return (index.h(index.Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && index.h("style", null, this.styles), index.h("p", { class: classMap, part: "part-para", style: cutOff }, index.h("slot", null))));
|
|
448
|
+
}
|
|
449
|
+
getCssClassMap() {
|
|
450
|
+
return {
|
|
451
|
+
[this.fontSize]: true,
|
|
452
|
+
[this.fontWeight]: true,
|
|
453
|
+
[this.paraStyle]: true,
|
|
454
|
+
[this.paraMargin]: !!this.paraMargin ? true : false,
|
|
455
|
+
[this.paraColor]: true,
|
|
456
|
+
[this.paraLineH]: true,
|
|
457
|
+
[this.paraAlign]: !!this.paraAlign ? true : false,
|
|
458
|
+
['ellipsis-boxing']: this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0,
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
//WEB-2392
|
|
462
|
+
addWhiteClass() {
|
|
463
|
+
if (this.paraColor == 'white') {
|
|
464
|
+
return {
|
|
465
|
+
[this.paraColor]: true,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
getLineCuttoff() {
|
|
470
|
+
let result;
|
|
471
|
+
if (this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0) {
|
|
472
|
+
result = {
|
|
473
|
+
['-webkit-line-clamp']: `${this.ellipsisLineCutoff}`,
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
return result;
|
|
477
|
+
}
|
|
478
|
+
get el() { return index.getElement(this); }
|
|
479
|
+
};
|
|
480
|
+
PtcPara.style = ptcParaCss;
|
|
481
|
+
|
|
143
482
|
const ptcTitleCss = "div.center.sc-ptc-title{text-align:center}div.center.dotted.sc-ptc-title h1.sc-ptc-title::before,div.center.dotted.sc-ptc-title h2.sc-ptc-title::before,div.center.dotted.sc-ptc-title h3.sc-ptc-title::before,div.center.dotted.sc-ptc-title h4.sc-ptc-title::before,div.center.dotted.sc-ptc-title h5.sc-ptc-title::before,div.center.dotted.sc-ptc-title h6.sc-ptc-title::before{left:50%;transform:translateX(-50%)}div.left.sc-ptc-title{text-align:left}div.left.dotted.sc-ptc-title h1.sc-ptc-title::before,div.left.dotted.sc-ptc-title h2.sc-ptc-title::before,div.left.dotted.sc-ptc-title h3.sc-ptc-title::before,div.left.dotted.sc-ptc-title h4.sc-ptc-title::before,div.left.dotted.sc-ptc-title h5.sc-ptc-title::before,div.left.dotted.sc-ptc-title h6.sc-ptc-title::before{left:0%}div.right.sc-ptc-title{text-align:right}div.right.dotted.sc-ptc-title h1.sc-ptc-title::before,div.right.dotted.sc-ptc-title h2.sc-ptc-title::before,div.right.dotted.sc-ptc-title h3.sc-ptc-title::before,div.right.dotted.sc-ptc-title h4.sc-ptc-title::before,div.right.dotted.sc-ptc-title h5.sc-ptc-title::before,div.right.dotted.sc-ptc-title h6.sc-ptc-title::before{right:0%}div.inherit.sc-ptc-title{text-align:inherit}div.dotted.sc-ptc-title h1.sc-ptc-title::before,div.dotted.sc-ptc-title h2.sc-ptc-title::before,div.dotted.sc-ptc-title h3.sc-ptc-title::before,div.dotted.sc-ptc-title h4.sc-ptc-title::before,div.dotted.sc-ptc-title h5.sc-ptc-title::before,div.dotted.sc-ptc-title h6.sc-ptc-title::before{content:\"\";position:absolute;top:-6px;width:30%;display:block;border-top:3px dashed var(--color-green-07)}div.solid.sc-ptc-title h1.sc-ptc-title,div.solid.sc-ptc-title h2.sc-ptc-title,div.solid.sc-ptc-title h3.sc-ptc-title,div.solid.sc-ptc-title h4.sc-ptc-title,div.solid.sc-ptc-title h5.sc-ptc-title,div.solid.sc-ptc-title h6.sc-ptc-title{padding-top:12px}div.solid.sc-ptc-title h1.sc-ptc-title::before,div.solid.sc-ptc-title h2.sc-ptc-title::before,div.solid.sc-ptc-title h3.sc-ptc-title::before,div.solid.sc-ptc-title h4.sc-ptc-title::before,div.solid.sc-ptc-title h5.sc-ptc-title::before,div.solid.sc-ptc-title h6.sc-ptc-title::before{content:\"\";position:absolute;width:100%;height:0.7px;background-color:var(--color-gray-03);opacity:0.9;left:0px;top:0}div.solid.sc-ptc-title h1.sc-ptc-title::after,div.solid.sc-ptc-title h2.sc-ptc-title::after,div.solid.sc-ptc-title h3.sc-ptc-title::after,div.solid.sc-ptc-title h4.sc-ptc-title::after,div.solid.sc-ptc-title h5.sc-ptc-title::after,div.solid.sc-ptc-title h6.sc-ptc-title::after{content:\"\";position:absolute;width:56px;height:2px;background-color:var(--color-green-07);top:-2px;left:0px}div.is-standard.sc-ptc-title h1.sc-ptc-title,div.is-standard.sc-ptc-title h2.sc-ptc-title,div.is-standard.sc-ptc-title h3.sc-ptc-title,div.is-standard.sc-ptc-title h4.sc-ptc-title,div.is-standard.sc-ptc-title h5.sc-ptc-title,div.is-standard.sc-ptc-title h6.sc-ptc-title{display:inline-block;position:relative}div.is-standard.sc-ptc-title h1.sc-ptc-title{font-size:var(--ptc-font-size-xxx-large);line-height:var(--ptc-line-height-densest);font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0px;color:var(--color-gray-10)}@media only screen and (min-width: 768px){div.is-standard.sc-ptc-title h1.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large)}}div.is-standard.sc-ptc-title h2.sc-ptc-title{font-size:var(--ptc-font-size-x-large);line-height:var(--ptc-line-height-densest);font-weight:var(--ptc-font-weight-extrabold);color:var(--color-gray-10)}@media only screen and (min-width: 768px){div.is-standard.sc-ptc-title h2.sc-ptc-title{font-size:var(--ptc-font-size-xx-large)}}div.is-plm-hub.sc-ptc-title h1.sc-ptc-title,div.is-plm-hub.sc-ptc-title h2.sc-ptc-title,div.is-plm-hub.sc-ptc-title h3.sc-ptc-title,div.is-plm-hub.sc-ptc-title h4.sc-ptc-title,div.is-plm-hub.sc-ptc-title h5.sc-ptc-title,div.is-plm-hub.sc-ptc-title h6.sc-ptc-title{display:inline-block;position:relative;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px;color:var(--color-white) !important}div.margin-flush.sc-ptc-title{margin-top:0;margin-bottom:0}div.margin-flush.sc-ptc-title h1.sc-ptc-title,div.margin-flush.sc-ptc-title h2.sc-ptc-title,div.margin-flush.sc-ptc-title h3.sc-ptc-title,div.margin-flush.sc-ptc-title h4.sc-ptc-title,div.margin-flush.sc-ptc-title h5.sc-ptc-title{margin-top:0;margin-bottom:0}div.margin-top-2.sc-ptc-title{margin-top:var(--ptc-element-spacing-02);margin-bottom:0}div.margin-top-3.sc-ptc-title{margin-top:var(--ptc-element-spacing-03);margin-bottom:0}div.margin-top-4.sc-ptc-title{margin-top:var(--ptc-element-spacing-04);margin-bottom:0}div.margin-top-5.sc-ptc-title{margin-top:var(--ptc-element-spacing-05);margin-bottom:0}div.margin-top-6.sc-ptc-title{margin-top:var(--ptc-element-spacing-06);margin-bottom:0}div.margin-bottom-2.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-02);margin-top:0}div.margin-bottom-3.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-03);margin-top:0}div.margin-bottom-4.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-04);margin-top:0}div.margin-bottom-5.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-05);margin-top:0}div.margin-bottom-6.sc-ptc-title{margin-bottom:var(--ptc-element-spacing-06);margin-top:0}div.margin-2.sc-ptc-title{margin-top:var(--ptc-element-spacing-02);margin-bottom:var(--ptc-element-spacing-02)}div.margin-3.sc-ptc-title{margin-top:var(--ptc-element-spacing-03);margin-bottom:var(--ptc-element-spacing-03)}div.margin-4.sc-ptc-title{margin-top:var(--ptc-element-spacing-04);margin-bottom:var(--ptc-element-spacing-04)}div.margin-5.sc-ptc-title{margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05)}div.margin-5.sc-ptc-title h4.sc-ptc-title{margin-top:0;margin-bottom:0}div.margin-6.sc-ptc-title{margin-top:var(--ptc-element-spacing-06);margin-bottom:var(--ptc-element-spacing-06)}div.green.sc-ptc-title h1.sc-ptc-title,div.green.sc-ptc-title h2.sc-ptc-title,div.green.sc-ptc-title h3.sc-ptc-title,div.green.sc-ptc-title h4.sc-ptc-title,div.green.sc-ptc-title h5.sc-ptc-title,div.green.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-green-07)}div.blue.sc-ptc-title h1.sc-ptc-title,div.blue.sc-ptc-title h2.sc-ptc-title,div.blue.sc-ptc-title h3.sc-ptc-title,div.blue.sc-ptc-title h4.sc-ptc-title,div.blue.sc-ptc-title h5.sc-ptc-title,div.blue.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-blue-07)}div.red.sc-ptc-title h1.sc-ptc-title,div.red.sc-ptc-title h2.sc-ptc-title,div.red.sc-ptc-title h3.sc-ptc-title,div.red.sc-ptc-title h4.sc-ptc-title,div.red.sc-ptc-title h5.sc-ptc-title,div.red.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-red-07)}div.orange.sc-ptc-title h1.sc-ptc-title,div.orange.sc-ptc-title h2.sc-ptc-title,div.orange.sc-ptc-title h3.sc-ptc-title,div.orange.sc-ptc-title h4.sc-ptc-title,div.orange.sc-ptc-title h5.sc-ptc-title,div.orange.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-orange-07)}div.slate-grey.sc-ptc-title h1.sc-ptc-title,div.slate-grey.sc-ptc-title h2.sc-ptc-title,div.slate-grey.sc-ptc-title h3.sc-ptc-title,div.slate-grey.sc-ptc-title h4.sc-ptc-title,div.slate-grey.sc-ptc-title h5.sc-ptc-title,div.slate-grey.sc-ptc-title h6.sc-ptc-title{text-shadow:0px 0px var(--ptc-element-spacing-03) var(--color-gray-07)}div.w-3.sc-ptc-title h1.sc-ptc-title,div.w-3.sc-ptc-title h2.sc-ptc-title,div.w-3.sc-ptc-title h3.sc-ptc-title,div.w-3.sc-ptc-title h4.sc-ptc-title,div.w-3.sc-ptc-title h5.sc-ptc-title,div.w-3.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-thin)}div.w-4.sc-ptc-title h1.sc-ptc-title,div.w-4.sc-ptc-title h2.sc-ptc-title,div.w-4.sc-ptc-title h3.sc-ptc-title,div.w-4.sc-ptc-title h4.sc-ptc-title,div.w-4.sc-ptc-title h5.sc-ptc-title,div.w-4.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-regular)}div.w-5.sc-ptc-title h1.sc-ptc-title,div.w-5.sc-ptc-title h2.sc-ptc-title,div.w-5.sc-ptc-title h3.sc-ptc-title,div.w-5.sc-ptc-title h4.sc-ptc-title,div.w-5.sc-ptc-title h5.sc-ptc-title,div.w-5.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-medium)}div.w-6.sc-ptc-title h1.sc-ptc-title,div.w-6.sc-ptc-title h2.sc-ptc-title,div.w-6.sc-ptc-title h3.sc-ptc-title,div.w-6.sc-ptc-title h4.sc-ptc-title,div.w-6.sc-ptc-title h5.sc-ptc-title,div.w-6.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-semibold)}div.w-7.sc-ptc-title h1.sc-ptc-title,div.w-7.sc-ptc-title h2.sc-ptc-title,div.w-7.sc-ptc-title h3.sc-ptc-title,div.w-7.sc-ptc-title h4.sc-ptc-title,div.w-7.sc-ptc-title h5.sc-ptc-title,div.w-7.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-bold)}div.w-8.sc-ptc-title h1.sc-ptc-title,div.w-8.sc-ptc-title h2.sc-ptc-title,div.w-8.sc-ptc-title h3.sc-ptc-title,div.w-8.sc-ptc-title h4.sc-ptc-title,div.w-8.sc-ptc-title h5.sc-ptc-title,div.w-8.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-extrabold)}div.w-9.sc-ptc-title h1.sc-ptc-title,div.w-9.sc-ptc-title h2.sc-ptc-title,div.w-9.sc-ptc-title h3.sc-ptc-title,div.w-9.sc-ptc-title h4.sc-ptc-title,div.w-9.sc-ptc-title h5.sc-ptc-title,div.w-9.sc-ptc-title h6.sc-ptc-title{font-weight:var(--ptc-font-weight-black)}div.xx-small.sc-ptc-title h1.sc-ptc-title,div.xx-small.sc-ptc-title h2.sc-ptc-title,div.xx-small.sc-ptc-title h3.sc-ptc-title,div.xx-small.sc-ptc-title h4.sc-ptc-title,div.xx-small.sc-ptc-title h5.sc-ptc-title,div.xx-small.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xx-small)}div.x-small.sc-ptc-title h1.sc-ptc-title,div.x-small.sc-ptc-title h2.sc-ptc-title,div.x-small.sc-ptc-title h3.sc-ptc-title,div.x-small.sc-ptc-title h4.sc-ptc-title,div.x-small.sc-ptc-title h5.sc-ptc-title,div.x-small.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-x-small)}div.small.sc-ptc-title h1.sc-ptc-title,div.small.sc-ptc-title h2.sc-ptc-title,div.small.sc-ptc-title h3.sc-ptc-title,div.small.sc-ptc-title h4.sc-ptc-title,div.small.sc-ptc-title h5.sc-ptc-title,div.small.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-small)}div.medium.sc-ptc-title h1.sc-ptc-title,div.medium.sc-ptc-title h2.sc-ptc-title,div.medium.sc-ptc-title h3.sc-ptc-title,div.medium.sc-ptc-title h4.sc-ptc-title,div.medium.sc-ptc-title h5.sc-ptc-title,div.medium.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-medium)}div.large.sc-ptc-title h1.sc-ptc-title,div.large.sc-ptc-title h2.sc-ptc-title,div.large.sc-ptc-title h3.sc-ptc-title,div.large.sc-ptc-title h4.sc-ptc-title,div.large.sc-ptc-title h5.sc-ptc-title,div.large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-large)}div.large.sc-ptc-title h3.sc-ptc-title{font-size:var(--ptc-font-size-medium)}@media only screen and (min-width: 768px){div.large.sc-ptc-title h3.sc-ptc-title{font-size:var(--ptc-font-size-large)}}div.x-large.sc-ptc-title h1.sc-ptc-title,div.x-large.sc-ptc-title h2.sc-ptc-title,div.x-large.sc-ptc-title h3.sc-ptc-title,div.x-large.sc-ptc-title h4.sc-ptc-title,div.x-large.sc-ptc-title h5.sc-ptc-title,div.x-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-x-large)}div.xx-large.sc-ptc-title h1.sc-ptc-title,div.xx-large.sc-ptc-title h2.sc-ptc-title,div.xx-large.sc-ptc-title h3.sc-ptc-title,div.xx-large.sc-ptc-title h4.sc-ptc-title{font-size:var(--ptc-font-size-x-large)}@media only screen and (min-width: 768px){div.xx-large.sc-ptc-title h1.sc-ptc-title,div.xx-large.sc-ptc-title h2.sc-ptc-title,div.xx-large.sc-ptc-title h3.sc-ptc-title,div.xx-large.sc-ptc-title h4.sc-ptc-title{font-size:var(--ptc-font-size-xx-large)}}div.xxx-large.sc-ptc-title h1.sc-ptc-title,div.xxx-large.sc-ptc-title h2.sc-ptc-title,div.xxx-large.sc-ptc-title h3.sc-ptc-title,div.xxx-large.sc-ptc-title h4.sc-ptc-title,div.xxx-large.sc-ptc-title h5.sc-ptc-title,div.xxx-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xx-large)}@media only screen and (min-width: 768px){div.xxx-large.sc-ptc-title h1.sc-ptc-title,div.xxx-large.sc-ptc-title h2.sc-ptc-title,div.xxx-large.sc-ptc-title h3.sc-ptc-title,div.xxx-large.sc-ptc-title h4.sc-ptc-title,div.xxx-large.sc-ptc-title h5.sc-ptc-title,div.xxx-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxx-large)}}div.xxxx-large.sc-ptc-title h1.sc-ptc-title,div.xxxx-large.sc-ptc-title h2.sc-ptc-title,div.xxxx-large.sc-ptc-title h3.sc-ptc-title,div.xxxx-large.sc-ptc-title h4.sc-ptc-title,div.xxxx-large.sc-ptc-title h5.sc-ptc-title,div.xxxx-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxx-large)}@media screen and (min-width: 769px){div.xxxx-large.sc-ptc-title h1.sc-ptc-title,div.xxxx-large.sc-ptc-title h2.sc-ptc-title,div.xxxx-large.sc-ptc-title h3.sc-ptc-title,div.xxxx-large.sc-ptc-title h4.sc-ptc-title,div.xxxx-large.sc-ptc-title h5.sc-ptc-title,div.xxxx-large.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large)}}div.xx-large-allbp.sc-ptc-title h1.sc-ptc-title,div.xx-large-allbp.sc-ptc-title h2.sc-ptc-title,div.xx-large-allbp.sc-ptc-title h3.sc-ptc-title,div.xx-large-allbp.sc-ptc-title h4.sc-ptc-title,div.xx-large-allbp.sc-ptc-title h5.sc-ptc-title,div.xx-large-allbp.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xx-large)}div.xxxx-large-allbp.sc-ptc-title h1.sc-ptc-title,div.xxxx-large-allbp.sc-ptc-title h2.sc-ptc-title,div.xxxx-large-allbp.sc-ptc-title h3.sc-ptc-title,div.xxxx-large-allbp.sc-ptc-title h4.sc-ptc-title,div.xxxx-large-allbp.sc-ptc-title h5.sc-ptc-title,div.xxxx-large-allbp.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large)}div.xxxx-large-desktop.sc-ptc-title h1.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h2.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h3.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h4.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h5.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxx-large)}@media only screen and (min-width: 992px){div.xxxx-large-desktop.sc-ptc-title h1.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h2.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h3.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h4.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h5.sc-ptc-title,div.xxxx-large-desktop.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large)}}div.xxxx-large-store.sc-ptc-title h1.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h2.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h3.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h4.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h5.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxx-large)}@media only screen and (min-width: 992px){div.xxxx-large-store.sc-ptc-title h1.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h2.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h3.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h4.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h5.sc-ptc-title,div.xxxx-large-store.sc-ptc-title h6.sc-ptc-title{font-size:var(--ptc-font-size-xxxx-large)}}div.densest.sc-ptc-title h1.sc-ptc-title,div.densest.sc-ptc-title h2.sc-ptc-title,div.densest.sc-ptc-title h3.sc-ptc-title,div.densest.sc-ptc-title h4.sc-ptc-title,div.densest.sc-ptc-title h5.sc-ptc-title,div.densest.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-densest)}div.denser.sc-ptc-title h1.sc-ptc-title,div.denser.sc-ptc-title h2.sc-ptc-title,div.denser.sc-ptc-title h3.sc-ptc-title,div.denser.sc-ptc-title h4.sc-ptc-title,div.denser.sc-ptc-title h5.sc-ptc-title,div.denser.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-denser)}div.dense.sc-ptc-title h1.sc-ptc-title,div.dense.sc-ptc-title h2.sc-ptc-title,div.dense.sc-ptc-title h3.sc-ptc-title,div.dense.sc-ptc-title h4.sc-ptc-title,div.dense.sc-ptc-title h5.sc-ptc-title,div.dense.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-dense)}div.normal.sc-ptc-title h1.sc-ptc-title,div.normal.sc-ptc-title h2.sc-ptc-title,div.normal.sc-ptc-title h3.sc-ptc-title,div.normal.sc-ptc-title h4.sc-ptc-title,div.normal.sc-ptc-title h5.sc-ptc-title,div.normal.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-normal)}div.loose.sc-ptc-title h1.sc-ptc-title,div.loose.sc-ptc-title h2.sc-ptc-title,div.loose.sc-ptc-title h3.sc-ptc-title,div.loose.sc-ptc-title h4.sc-ptc-title,div.loose.sc-ptc-title h5.sc-ptc-title,div.loose.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-loose)}div.looser.sc-ptc-title h1.sc-ptc-title,div.looser.sc-ptc-title h2.sc-ptc-title,div.looser.sc-ptc-title h3.sc-ptc-title,div.looser.sc-ptc-title h4.sc-ptc-title,div.looser.sc-ptc-title h5.sc-ptc-title,div.looser.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-looser)}div.paragraph.sc-ptc-title h1.sc-ptc-title,div.paragraph.sc-ptc-title h2.sc-ptc-title,div.paragraph.sc-ptc-title h3.sc-ptc-title,div.paragraph.sc-ptc-title h4.sc-ptc-title,div.paragraph.sc-ptc-title h5.sc-ptc-title,div.paragraph.sc-ptc-title h6.sc-ptc-title{line-height:var(--ptc-line-height-paragraph)}div.black.sc-ptc-title h1.sc-ptc-title,div.black.sc-ptc-title h2.sc-ptc-title,div.black.sc-ptc-title h3.sc-ptc-title,div.black.sc-ptc-title h4.sc-ptc-title,div.black.sc-ptc-title h5.sc-ptc-title,div.black.sc-ptc-title h6.sc-ptc-title{color:var(--color-black)}div.white.sc-ptc-title h1.sc-ptc-title,div.white.sc-ptc-title h2.sc-ptc-title,div.white.sc-ptc-title h3.sc-ptc-title,div.white.sc-ptc-title h4.sc-ptc-title,div.white.sc-ptc-title h5.sc-ptc-title,div.white.sc-ptc-title h6.sc-ptc-title{color:var(--color-white)}div.gray-1.sc-ptc-title h1.sc-ptc-title,div.gray-1.sc-ptc-title h2.sc-ptc-title,div.gray-1.sc-ptc-title h3.sc-ptc-title,div.gray-1.sc-ptc-title h4.sc-ptc-title,div.gray-1.sc-ptc-title h5.sc-ptc-title,div.gray-1.sc-ptc-title h6.sc-ptc-title{color:var(--color-gray-01)}div.gray.sc-ptc-title h1.sc-ptc-title,div.gray.sc-ptc-title h2.sc-ptc-title,div.gray.sc-ptc-title h3.sc-ptc-title,div.gray.sc-ptc-title h4.sc-ptc-title,div.gray.sc-ptc-title h5.sc-ptc-title,div.gray.sc-ptc-title h6.sc-ptc-title{color:var(--color-gray-10)}div.gray-darker.sc-ptc-title h1.sc-ptc-title,div.gray-darker.sc-ptc-title h2.sc-ptc-title,div.gray-darker.sc-ptc-title h3.sc-ptc-title,div.gray-darker.sc-ptc-title h4.sc-ptc-title,div.gray-darker.sc-ptc-title h5.sc-ptc-title,div.gray-darker.sc-ptc-title h6.sc-ptc-title{color:var(--color-gray-11)}div.ellipsis-boxing.sc-ptc-title h1.sc-ptc-title,div.ellipsis-boxing.sc-ptc-title h2.sc-ptc-title,div.ellipsis-boxing.sc-ptc-title h3.sc-ptc-title,div.ellipsis-boxing.sc-ptc-title h4.sc-ptc-title,div.ellipsis-boxing.sc-ptc-title h5.sc-ptc-title,div.ellipsis-boxing.sc-ptc-title h6.sc-ptc-title{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;padding-bottom:0}div.block.sc-ptc-title h1.sc-ptc-title,div.block.sc-ptc-title h2.sc-ptc-title,div.block.sc-ptc-title h3.sc-ptc-title,div.block.sc-ptc-title h4.sc-ptc-title,div.block.sc-ptc-title h5.sc-ptc-title,div.block.sc-ptc-title h6.sc-ptc-title{display:block}";
|
|
144
483
|
|
|
145
484
|
const PtcTitle = class {
|
|
@@ -211,8 +550,113 @@ const PtcTitle = class {
|
|
|
211
550
|
};
|
|
212
551
|
PtcTitle.style = ptcTitleCss;
|
|
213
552
|
|
|
553
|
+
const ptcTooltipCss = ".sc-ptc-tooltip-h{position:relative}.inline.sc-ptc-tooltip-h{display:inline}.inline.sc-ptc-tooltip-h .text-content.sc-ptc-tooltip{display:inline}.block.sc-ptc-tooltip-h{display:block}.text-ellipsis.sc-ptc-tooltip{position:relative;display:inline}.text-ellipsis.sc-ptc-tooltip:not(.truncated){z-index:auto !important}.z-auto.sc-ptc-tooltip{z-index:auto}.z-1.sc-ptc-tooltip{z-index:1}.z-2.sc-ptc-tooltip{z-index:2}.z-3.sc-ptc-tooltip{z-index:3}.z-999.sc-ptc-tooltip{z-index:999}.tooltip.sc-ptc-tooltip{position:absolute;padding:8px;color:var(--color-white);font-size:var(--ptc-font-size-xxx-small);font-weight:var(--ptc-font-weight-semibold);background:var(--color-gray-09);box-shadow:0px 2px 4px rgba(0, 0, 0, 0.3);border:none;border-radius:2px;width:auto;height:auto;visibility:hidden;text-align:left;text-shadow:none;white-space:normal}@media only screen and (min-width: 480px){.tooltip.sc-ptc-tooltip{width:273px}}.tooltip.danger.sc-ptc-tooltip{color:var(--color-red-07);font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-p);border:2px solid var(--color-red-07);border-radius:var(--ptc-border-radius-standard);background-color:var(--color-white);padding:var(--ptc-element-spacing-06)}.tooltip.danger.sc-ptc-tooltip a.sc-ptc-tooltip{color:var(--color-blue-07)}.tooltip.bottom.sc-ptc-tooltip{bottom:-12px;transform:translateY(100%)}.tooltip.bottom.sc-ptc-tooltip::after{top:1px;left:50%;transform:translate(-50%, -100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.left.sc-ptc-tooltip{bottom:-12px;transform:translate(-80%, 100%)}.tooltip.left.sc-ptc-tooltip::after{top:1px;right:8px;transform:translateY(-100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.right.sc-ptc-tooltip{bottom:-12px;transform:translateY(100%);right:0px}@-moz-document url-prefix(){.tooltip.right{right:unset !important;bottom:unset !important;transform:translate(60%, 8px) !important}@media screen and (min-width: 992px){.tooltip.right{transform:translate(100%, 8px) !important}}}.tooltip.right.sc-ptc-tooltip::after{top:1px;left:8px;transform:translateY(-100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.top.sc-ptc-tooltip{top:-8px;transform:translateY(-100%)}.tooltip.top.sc-ptc-tooltip::after{left:50%;bottom:1px;transform:translate(-50%, 100%);border:8px solid transparent;border-top:8px solid var(--color-gray-09)}.tooltip.bottom-right.sc-ptc-tooltip{bottom:-12px;transform:translate(-60%, 100%)}.tooltip.bottom-right.sc-ptc-tooltip::after{top:1px;left:75%;transform:translate(-50%, -100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.danger.sc-ptc-tooltip::after{top:0;border-bottom:8px solid var(--color-red-07)}.truncated.sc-ptc-tooltip{cursor:help}.truncated.sc-ptc-tooltip:hover+.tooltip.sc-ptc-tooltip{visibility:visible;z-index:9999}.wrapper-content.sc-ptc-tooltip{display:inline-block;position:relative}.wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{width:auto;min-width:72px;max-width:273px}.wrapper-content.sc-ptc-tooltip .slot-content.sc-ptc-tooltip:hover+.tooltip.sc-ptc-tooltip{visibility:visible;z-index:9999}.tooltip.sc-ptc-tooltip::after{content:\"\";position:absolute}.ellipsis-by-line-boxing.sc-ptc-tooltip{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;padding-bottom:0}.full-width.sc-ptc-tooltip-h .tooltip.sc-ptc-tooltip{width:100%}@media only screen and (min-width: 480px){.full-width.sc-ptc-tooltip-h .tooltip.sc-ptc-tooltip{width:100%}}";
|
|
554
|
+
|
|
555
|
+
const PtcTooltip = class {
|
|
556
|
+
constructor(hostRef) {
|
|
557
|
+
index.registerInstance(this, hostRef);
|
|
558
|
+
this.textDisplay = 'inline';
|
|
559
|
+
this.maxLength = 45;
|
|
560
|
+
this.textLines = undefined;
|
|
561
|
+
this.description = 'This is a tooltip text placeholder';
|
|
562
|
+
this.zIndex = 'z-auto';
|
|
563
|
+
this.position = 'bottom';
|
|
564
|
+
this.styles = undefined;
|
|
565
|
+
this.mode = 'text-only';
|
|
566
|
+
this.theme = 'standard';
|
|
567
|
+
this.width = 'default';
|
|
568
|
+
this.hideOnMobile = false;
|
|
569
|
+
this.isSmallScreen = undefined;
|
|
570
|
+
}
|
|
571
|
+
addTruncatedClass() {
|
|
572
|
+
const appRoot = this.el;
|
|
573
|
+
const text = appRoot.querySelectorAll('.ellipsis-by-line-boxing');
|
|
574
|
+
text.forEach(t => {
|
|
575
|
+
t.classList[t.scrollHeight > t.clientHeight ? 'add' : 'remove']('truncated');
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
windowResize() {
|
|
579
|
+
this.verifiyScreenSize();
|
|
580
|
+
}
|
|
581
|
+
verifiyScreenSize() {
|
|
582
|
+
this.isSmallScreen = window.innerWidth < 768;
|
|
583
|
+
}
|
|
584
|
+
// Created this function to initialize the truncate function on specific elements like tabs
|
|
585
|
+
enableAddTruncatedClass(element) {
|
|
586
|
+
const allTabHeaders = document.querySelectorAll(element);
|
|
587
|
+
for (const element of Array.from(allTabHeaders)) {
|
|
588
|
+
let tabHeader = element;
|
|
589
|
+
if (tabHeader) {
|
|
590
|
+
tabHeader.addEventListener('click', () => {
|
|
591
|
+
setTimeout(() => {
|
|
592
|
+
this.addTruncatedClass();
|
|
593
|
+
}, 100);
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
componentWillLoad() {
|
|
599
|
+
this.verifiyScreenSize();
|
|
600
|
+
}
|
|
601
|
+
componentDidLoad() {
|
|
602
|
+
//this.addTruncatedClass();
|
|
603
|
+
setTimeout(() => {
|
|
604
|
+
this.addTruncatedClass();
|
|
605
|
+
}, 1000);
|
|
606
|
+
this.enableAddTruncatedClass('tab-header');
|
|
607
|
+
this.enableAddTruncatedClass('ptc-ellipsis-dropdown');
|
|
608
|
+
this.enableAddTruncatedClass('ptc-product-card');
|
|
609
|
+
document.addEventListener('readystatechange', () => {
|
|
610
|
+
if (document.readyState === 'complete') {
|
|
611
|
+
this.addTruncatedClass();
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
render() {
|
|
616
|
+
if (this.mode == 'wrapper') {
|
|
617
|
+
return (index.h(index.Host, { class: this.textDisplay }, this.styles && index.h("style", null, this.styles), index.h("div", { class: "wrapper-content" }, index.h("div", { class: "slot-content" }, index.h("slot", null)), index.h("div", { class: `tooltip ${this.position} ${this.theme}` }, index.h("slot", { name: "description" }), this.description))));
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
const classMap = this.getCssClassMap();
|
|
621
|
+
const cutOff = this.getLineCuttoff();
|
|
622
|
+
let truncatedText = this.description.substring(0, this.maxLength);
|
|
623
|
+
if (this.description.length > this.maxLength) {
|
|
624
|
+
const lastSpace = truncatedText.lastIndexOf(' ');
|
|
625
|
+
truncatedText = truncatedText.substring(0, lastSpace);
|
|
626
|
+
truncatedText += '... ';
|
|
627
|
+
}
|
|
628
|
+
return (index.h(index.Host, { class: this.textDisplay + " " + this.width }, this.styles && index.h("style", null, this.styles), (this.hideOnMobile && this.isSmallScreen) ? (index.h("div", null, this.description)) : (index.h("div", { class: "text-content" }, this.textLines > 0 && !!this.textLines ? (index.h("div", { class: "ellipsis-by-line-boxing", style: cutOff }, this.description)) : (index.h("div", { class: classMap }, truncatedText)), index.h("div", { class: `tooltip ${this.position} ${this.theme}` }, this.description)))));
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
getCssClassMap() {
|
|
632
|
+
return {
|
|
633
|
+
// ['ellipsis-by-line-boxing']: this.textLines && this.textLines > 0,
|
|
634
|
+
['text-ellipsis']: true,
|
|
635
|
+
[this.zIndex]: this.description.length > this.maxLength ? true : false,
|
|
636
|
+
['truncated']: this.description.length > this.maxLength && !this.textLines ? true : false,
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
getLineCuttoff() {
|
|
640
|
+
let result;
|
|
641
|
+
if (this.textLines && this.textLines > 0) {
|
|
642
|
+
result = {
|
|
643
|
+
['-webkit-line-clamp']: `${this.textLines}`,
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
return result;
|
|
647
|
+
}
|
|
648
|
+
get el() { return index.getElement(this); }
|
|
649
|
+
};
|
|
650
|
+
PtcTooltip.style = ptcTooltipCss;
|
|
651
|
+
|
|
652
|
+
exports.fl_tab_content = FlTabContent;
|
|
653
|
+
exports.fl_tab_header = FlTabHeader;
|
|
654
|
+
exports.fl_tab_image = FlTabImage;
|
|
214
655
|
exports.icon_asset = IconAsset;
|
|
215
|
-
exports.
|
|
216
|
-
exports.ptc_breadcrumb = PtcBreadcrumb;
|
|
656
|
+
exports.ptc_background_video = PtcBackgroundVideo;
|
|
217
657
|
exports.ptc_button = PtcButton;
|
|
658
|
+
exports.ptc_featured_list = PtcFeaturedList;
|
|
659
|
+
exports.ptc_img = PtcImg;
|
|
660
|
+
exports.ptc_para = PtcPara;
|
|
218
661
|
exports.ptc_title = PtcTitle;
|
|
662
|
+
exports.ptc_tooltip = PtcTooltip;
|