@ptcwebops/ptcw-design 0.7.0 → 0.7.1
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/dropdown-item.cjs.entry.js +21 -0
- package/dist/cjs/icon-asset.cjs.entry.js +65 -0
- package/dist/cjs/list-item.cjs.entry.js +30 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-button.cjs.entry.js +76 -0
- package/dist/cjs/{ptc-card.cjs.entry.js → ptc-card_6.cjs.entry.js} +492 -0
- package/dist/cjs/ptc-container.cjs.entry.js +46 -0
- package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +48 -0
- package/dist/cjs/ptc-hero.cjs.entry.js +29 -0
- package/dist/cjs/ptc-overlay.cjs.entry.js +31 -0
- package/dist/cjs/ptc-previous-url.cjs.entry.js +19 -0
- package/dist/cjs/ptc-pricing-block.cjs.entry.js +26 -0
- package/dist/cjs/ptc-shopping-cart.cjs.entry.js +64 -0
- package/dist/cjs/ptc-svg-btn.cjs.entry.js +94 -0
- package/dist/cjs/ptc-tab-list.cjs.entry.js +133 -0
- package/dist/cjs/ptc-text-copy-with-background.cjs.entry.js +35 -0
- package/dist/cjs/ptc-title.cjs.entry.js +84 -0
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/tab-content.cjs.entry.js +37 -0
- package/dist/cjs/tab-header.cjs.entry.js +54 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/dropdown-item/dropdown-item.css +2 -7
- package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.css +10 -15
- package/dist/collection/components/ptc-para/ptc-para.css +7 -0
- package/dist/collection/components/ptc-para/ptc-para.js +30 -2
- package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.css +14 -14
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.css +3 -3
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +14 -10
- package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.css +96 -0
- package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.js +129 -0
- package/dist/collection/components/ptc-title/ptc-title.css +34 -3
- package/dist/collection/components/ptc-title/ptc-title.js +54 -2
- package/dist/collection/components/tab-header/tab-header.css +19 -4
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +85 -22
- package/dist/esm/dropdown-item.entry.js +17 -0
- package/dist/esm/icon-asset.entry.js +61 -0
- package/dist/esm/{index-a91c2367.js → index-5ff11327.js} +1 -1
- package/dist/esm/list-item.entry.js +26 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottie-player.entry.js +1 -1
- 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-breadcrumb.entry.js +1 -1
- package/dist/esm/ptc-button.entry.js +72 -0
- package/dist/esm/ptc-card-bottom.entry.js +1 -1
- package/dist/esm/ptc-card-content.entry.js +1 -1
- package/dist/esm/ptc-card-plm.entry.js +1 -1
- package/dist/esm/{ptc-card.entry.js → ptc-card_6.entry.js} +489 -2
- 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 +42 -0
- 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 +44 -0
- 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 +25 -0
- package/dist/esm/ptc-icon-list.entry.js +1 -1
- package/dist/esm/ptc-icon-minimize.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-minimized-footer.entry.js +1 -1
- package/dist/esm/ptc-minimized-header.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-item.entry.js +1 -1
- package/dist/esm/ptc-nav.entry.js +1 -1
- package/dist/esm/ptc-overlay.entry.js +27 -0
- package/dist/esm/ptc-pagenation.entry.js +1 -1
- package/dist/esm/ptc-previous-url.entry.js +15 -0
- package/dist/esm/ptc-pricing-block.entry.js +22 -0
- package/dist/esm/ptc-quote.entry.js +1 -1
- package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
- package/dist/esm/ptc-shopping-cart.entry.js +60 -0
- package/dist/esm/ptc-social-share.entry.js +1 -1
- package/dist/esm/ptc-span.entry.js +1 -1
- package/dist/esm/ptc-svg-btn.entry.js +90 -0
- package/dist/esm/ptc-tab-list.entry.js +129 -0
- package/dist/esm/ptc-text-copy-with-background.entry.js +31 -0
- package/dist/esm/ptc-title.entry.js +80 -0
- package/dist/esm/ptc-two-column-media.entry.js +1 -1
- package/dist/esm/ptcw-design.js +2 -2
- package/dist/esm/tab-content.entry.js +33 -0
- package/dist/esm/tab-header.entry.js +50 -0
- package/dist/ptcw-design/p-09351f78.entry.js +1 -0
- package/dist/ptcw-design/{p-401e8ad1.entry.js → p-10385027.entry.js} +1 -1
- package/dist/ptcw-design/{p-7274d38e.entry.js → p-10f6d8ae.entry.js} +1 -1
- package/dist/ptcw-design/{p-b614e18a.entry.js → p-1a77a824.entry.js} +1 -1
- package/dist/ptcw-design/p-1eb22408.entry.js +1 -0
- package/dist/ptcw-design/p-1ec512ea.entry.js +1 -0
- package/dist/ptcw-design/{p-0507d8de.entry.js → p-39b8d25b.entry.js} +1 -1
- package/dist/ptcw-design/p-3a4bb2b1.entry.js +1 -0
- package/dist/ptcw-design/{p-3ef2b02f.entry.js → p-3c779cf2.entry.js} +1 -1
- package/dist/ptcw-design/{p-22a11703.js → p-4355ed7c.js} +1 -1
- package/dist/ptcw-design/{p-a6a938d2.entry.js → p-446423fc.entry.js} +1 -1
- package/dist/ptcw-design/{p-a3e99867.entry.js → p-4ab335ac.entry.js} +1 -1
- package/dist/ptcw-design/p-4da25d67.entry.js +1 -0
- package/dist/ptcw-design/p-53790fb4.entry.js +1 -0
- package/dist/ptcw-design/p-5a92fdf0.entry.js +1 -0
- package/dist/ptcw-design/{p-870406ab.entry.js → p-5bf5932c.entry.js} +1 -1
- package/dist/ptcw-design/p-5c02f876.entry.js +1 -0
- package/dist/ptcw-design/{p-e3b5792a.entry.js → p-5c5c8f25.entry.js} +1 -1
- package/dist/ptcw-design/{p-82d428ea.entry.js → p-5e845a15.entry.js} +1 -1
- package/dist/ptcw-design/{p-92d95119.entry.js → p-64f85e40.entry.js} +1 -1
- package/dist/ptcw-design/{p-704bf1cd.entry.js → p-696646db.entry.js} +1 -1
- package/dist/ptcw-design/{p-80be8fe1.entry.js → p-6ab5aee9.entry.js} +1 -1
- package/dist/ptcw-design/{p-b6a9d66f.entry.js → p-70d2c46d.entry.js} +1 -1
- package/dist/ptcw-design/{p-735fb369.entry.js → p-74a31734.entry.js} +1 -1
- package/dist/ptcw-design/{p-03648d85.entry.js → p-7599491c.entry.js} +1 -1
- package/dist/ptcw-design/p-7a37d762.entry.js +1 -0
- package/dist/ptcw-design/{p-f4148769.entry.js → p-83a9720c.entry.js} +1 -1
- package/dist/ptcw-design/{p-77327ab7.entry.js → p-85e7bbc3.entry.js} +1 -1
- package/dist/ptcw-design/{p-0004abbb.entry.js → p-8c0ba2d5.entry.js} +1 -1
- package/dist/ptcw-design/p-8c594b35.entry.js +1 -0
- package/dist/ptcw-design/p-8d46a06e.entry.js +1 -0
- package/dist/ptcw-design/{p-c7e63622.entry.js → p-93ab498c.entry.js} +1 -1
- package/dist/ptcw-design/p-96bfb95b.entry.js +1 -0
- package/dist/ptcw-design/p-a06bc9a8.entry.js +1 -0
- package/dist/ptcw-design/p-a6d80697.entry.js +1 -0
- package/dist/ptcw-design/{p-3f2c3e47.entry.js → p-b1bfc20f.entry.js} +1 -1
- package/dist/ptcw-design/{p-13d45895.entry.js → p-baa7d351.entry.js} +1 -1
- package/dist/ptcw-design/{p-e7e07b91.entry.js → p-bb4485e3.entry.js} +1 -1
- package/dist/ptcw-design/{p-30f33198.entry.js → p-bcfd05dc.entry.js} +1 -1
- package/dist/ptcw-design/{p-3f0d3485.entry.js → p-c05f0c98.entry.js} +1 -1
- package/dist/ptcw-design/{p-273ff521.entry.js → p-c267b720.entry.js} +1 -1
- package/dist/ptcw-design/{p-ca54a4bc.entry.js → p-c26e343e.entry.js} +1 -1
- package/dist/ptcw-design/{p-c9ba3915.entry.js → p-c460a62d.entry.js} +1 -1
- package/dist/ptcw-design/{p-75a36c38.entry.js → p-c992aa57.entry.js} +1 -1
- package/dist/ptcw-design/p-d39668ca.entry.js +1 -0
- package/dist/ptcw-design/p-dad7e9f8.entry.js +1 -0
- package/dist/ptcw-design/p-e0090602.entry.js +1 -0
- package/dist/ptcw-design/{p-07e08a42.entry.js → p-e955c833.entry.js} +1 -1
- package/dist/ptcw-design/p-f5ba2d0e.entry.js +1 -0
- package/dist/ptcw-design/p-f7d18b93.entry.js +1 -0
- package/dist/ptcw-design/p-fce72f70.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-para/ptc-para.d.ts +5 -0
- package/dist/types/components/ptc-text-copy-with-background/ptc-text-copy-with-background.d.ts +25 -0
- package/dist/types/components/ptc-title/ptc-title.d.ts +9 -0
- package/dist/types/components.d.ts +77 -0
- package/dist/types/utils/interfaces.d.ts +4 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/dropdown-item_19.cjs.entry.js +0 -993
- package/dist/cjs/interfaces-0ecd8027.js +0 -15
- package/dist/cjs/ptc-date.cjs.entry.js +0 -59
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -179
- package/dist/esm/dropdown-item_19.entry.js +0 -971
- package/dist/esm/interfaces-3cb94654.js +0 -12
- package/dist/esm/ptc-date.entry.js +0 -55
- package/dist/esm/ptc-picture.entry.js +0 -175
- package/dist/ptcw-design/p-08b4804a.entry.js +0 -1
- package/dist/ptcw-design/p-240733ce.js +0 -1
- package/dist/ptcw-design/p-43e3f76e.entry.js +0 -1
- package/dist/ptcw-design/p-62e7565c.entry.js +0 -1
- package/dist/ptcw-design/p-6c034edd.entry.js +0 -1
- package/dist/ptcw-design/p-a2ca6ff1.entry.js +0 -1
- package/dist/ptcw-design/p-b985e510.entry.js +0 -1
|
@@ -77,4 +77,496 @@ let PtcCard = class {
|
|
|
77
77
|
};
|
|
78
78
|
PtcCard.style = ptcCardCss;
|
|
79
79
|
|
|
80
|
+
const ptcDateCss = ":host{display:block}:host(.small) span{font-size:var(--ptc-font-size-xx-small)}:host(.medium) span{font-size:var(--ptc-font-size-x-small)}:host(.primary-grey){color:var(--color-primary-gray-new)}:host(.white) span{color:var(--color-white)}:host(.date-m-top){margin-top:var(--ptc-element-spacing-01)}";
|
|
81
|
+
|
|
82
|
+
let PtcDate = class {
|
|
83
|
+
constructor(hostRef) {
|
|
84
|
+
index.registerInstance(this, hostRef);
|
|
85
|
+
/**
|
|
86
|
+
* Year
|
|
87
|
+
*/
|
|
88
|
+
this.year = 1900;
|
|
89
|
+
/**
|
|
90
|
+
* Month
|
|
91
|
+
* An integer between 1 (January) and 12 (December) representing the month.If omitted, defaults to 0.
|
|
92
|
+
*/
|
|
93
|
+
this.month = 0;
|
|
94
|
+
/**
|
|
95
|
+
* Day
|
|
96
|
+
* An integer between 1 and 31 representing the day of the month. If omitted, defaults to 1.
|
|
97
|
+
*/
|
|
98
|
+
this.day = 1;
|
|
99
|
+
/**
|
|
100
|
+
* Country
|
|
101
|
+
* examples: en-US, zh-CN, zh-TW, fr-FR, ja-JP, ru-RU, de-DE, ko-KR, it-IT, es-ES
|
|
102
|
+
*/
|
|
103
|
+
this.country = 'en-US';
|
|
104
|
+
/**
|
|
105
|
+
* Date Font Size
|
|
106
|
+
*/
|
|
107
|
+
this.dataSize = 'small';
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
// const newDate = new Date(this.year, this.month, this.day);
|
|
111
|
+
const classMap = this.getCssClassMap();
|
|
112
|
+
return (index.h(index.Host, { class: classMap }, this.dateStyles && index.h("style", null, this.dateStyles), index.h("span", { part: "part-ptc-date" }, this.getDate().toLocaleDateString(this.country, { year: 'numeric', month: 'short', day: 'numeric' }))));
|
|
113
|
+
}
|
|
114
|
+
getCssClassMap() {
|
|
115
|
+
return {
|
|
116
|
+
[this.dateColor]: !!this.dateColor ? true : false,
|
|
117
|
+
[this.dataSize]: !!this.dataSize ? true : false,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
getDate() {
|
|
121
|
+
if (this.dateString) {
|
|
122
|
+
let newDate = new Date(this.dateString.replace(/-/g, '/'));
|
|
123
|
+
return newDate;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return new Date(this.year, this.month - 1, this.day);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
PtcDate.style = ptcDateCss;
|
|
131
|
+
|
|
132
|
+
let ResponsiveBgVariables = {
|
|
133
|
+
envs: ['xs', 'sm', 'md', 'lg'],
|
|
134
|
+
selector: '.ptc-img',
|
|
135
|
+
interval: 250
|
|
136
|
+
};
|
|
137
|
+
let ResponsivePictureVariables = {
|
|
138
|
+
envs: ['xs', 'sm', 'md', 'lg'],
|
|
139
|
+
selector: '.ptc-picture',
|
|
140
|
+
interval: 250
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
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-large{border-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}}";
|
|
144
|
+
|
|
145
|
+
let PtcImg = class {
|
|
146
|
+
constructor(hostRef) {
|
|
147
|
+
index.registerInstance(this, hostRef);
|
|
148
|
+
/**
|
|
149
|
+
* Image size for smallest screen
|
|
150
|
+
* <=767px
|
|
151
|
+
*/
|
|
152
|
+
this.sizeXs = '510x340';
|
|
153
|
+
/**
|
|
154
|
+
* Image size for small screen
|
|
155
|
+
* >=768px and <=991px
|
|
156
|
+
*/
|
|
157
|
+
this.sizeSm = '1240x496';
|
|
158
|
+
/**
|
|
159
|
+
* Image size for medium screen
|
|
160
|
+
* >=992px and <=1199px
|
|
161
|
+
*/
|
|
162
|
+
this.sizeMd = '1366x500';
|
|
163
|
+
/**
|
|
164
|
+
* Image solution for large screen
|
|
165
|
+
* >=1200px
|
|
166
|
+
*/
|
|
167
|
+
this.sizeLg = '1920x1080';
|
|
168
|
+
/**
|
|
169
|
+
* Image type
|
|
170
|
+
*/
|
|
171
|
+
this.imageType = 'smart-bg';
|
|
172
|
+
/**
|
|
173
|
+
* Image border shape
|
|
174
|
+
*/
|
|
175
|
+
this.borderRadius = '';
|
|
176
|
+
/**
|
|
177
|
+
* Lazy loading option
|
|
178
|
+
*/
|
|
179
|
+
this.loadMode = 'lazy-bg';
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Image Z Index
|
|
183
|
+
*/
|
|
184
|
+
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
185
|
+
WindowResize() {
|
|
186
|
+
this.setResponsiveBg();
|
|
187
|
+
}
|
|
188
|
+
render() {
|
|
189
|
+
const classMap = this.getCssClassMap();
|
|
190
|
+
return (index.h(index.Host, null, 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)));
|
|
191
|
+
}
|
|
192
|
+
componentDidLoad() {
|
|
193
|
+
this.addIntersectionObserver();
|
|
194
|
+
this.setResponsiveBg();
|
|
195
|
+
}
|
|
196
|
+
componentWillUpdate() {
|
|
197
|
+
// console.log('componentWillUpdate!');
|
|
198
|
+
this.addIntersectionObserver();
|
|
199
|
+
this.setResponsiveBg();
|
|
200
|
+
}
|
|
201
|
+
//responsive image
|
|
202
|
+
setResponsiveBg() {
|
|
203
|
+
// Define local variables
|
|
204
|
+
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
205
|
+
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
206
|
+
// Loop through all target elements
|
|
207
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
208
|
+
// Set current variables
|
|
209
|
+
el = backgrounds[i];
|
|
210
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
211
|
+
// If the data attribute exists, set the background
|
|
212
|
+
if (elData !== null) {
|
|
213
|
+
el.style.backgroundImage = "url('" + elData + "')";
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
if (typeof console == 'object') {
|
|
217
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//lazy loading
|
|
223
|
+
addIntersectionObserver() {
|
|
224
|
+
if (!this.imgUrl) {
|
|
225
|
+
console.log('no image!');
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if ('IntersectionObserver' in window) {
|
|
229
|
+
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
230
|
+
let bgObserver = new IntersectionObserver(entries => {
|
|
231
|
+
entries.forEach(entry => {
|
|
232
|
+
if (entry.isIntersecting) {
|
|
233
|
+
const image = entry.target;
|
|
234
|
+
image.classList.remove('lazy-bg');
|
|
235
|
+
// console.log('loaded');
|
|
236
|
+
bgObserver.unobserve(image);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
lazyLoadBgs.forEach(image => {
|
|
241
|
+
bgObserver.observe(image);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
getCssClassMap() {
|
|
246
|
+
return {
|
|
247
|
+
[this.imageType]: true,
|
|
248
|
+
'ptc-img': true,
|
|
249
|
+
[this.borderRadius]: true,
|
|
250
|
+
[this.loadMode]: true,
|
|
251
|
+
// [this.imageZIndex] : true
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
getCurrentBreakPoints() {
|
|
255
|
+
// Define local variables
|
|
256
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
257
|
+
// Append test node
|
|
258
|
+
doc.body.appendChild(temp);
|
|
259
|
+
// Loop through breakpoints
|
|
260
|
+
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
261
|
+
env = ResponsiveBgVariables.envs[i];
|
|
262
|
+
// Add classes
|
|
263
|
+
temp.className = 'hidden-' + env;
|
|
264
|
+
// Found breakpoint
|
|
265
|
+
if (temp.offsetParent === null) {
|
|
266
|
+
// Remove our test node
|
|
267
|
+
doc.body.removeChild(temp);
|
|
268
|
+
// Return current breakpoint
|
|
269
|
+
return env;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// Breakpoint not found, try fallback
|
|
273
|
+
doc.body.removeChild(temp);
|
|
274
|
+
return this.getFallbackBreakpoint();
|
|
275
|
+
}
|
|
276
|
+
getFallbackBreakpoint() {
|
|
277
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
278
|
+
return 'lg';
|
|
279
|
+
}
|
|
280
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
281
|
+
return 'md';
|
|
282
|
+
}
|
|
283
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
284
|
+
return 'sm';
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
return 'xs';
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
get el() { return index.getElement(this); }
|
|
291
|
+
};
|
|
292
|
+
PtcImg.style = ptcImgCss;
|
|
293
|
+
|
|
294
|
+
const ptcParaCss = ":host{z-index:1}:host(.white){color:var(--color-white)}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.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.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.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}";
|
|
295
|
+
|
|
296
|
+
let PtcPara = class {
|
|
297
|
+
constructor(hostRef) {
|
|
298
|
+
index.registerInstance(this, hostRef);
|
|
299
|
+
/**
|
|
300
|
+
* Paragraph font size
|
|
301
|
+
**/
|
|
302
|
+
this.fontSize = "x-small";
|
|
303
|
+
/**
|
|
304
|
+
* Paragraph font weight
|
|
305
|
+
**/
|
|
306
|
+
this.fontWeight = 'w-4';
|
|
307
|
+
/**
|
|
308
|
+
* Paragraph Style
|
|
309
|
+
**/
|
|
310
|
+
this.paraStyle = 'default';
|
|
311
|
+
/**
|
|
312
|
+
* Paragraph Color
|
|
313
|
+
*/
|
|
314
|
+
this.paraColor = 'primary-grey';
|
|
315
|
+
/**
|
|
316
|
+
* line height
|
|
317
|
+
*/
|
|
318
|
+
this.paraLineH = 'line-height-normal';
|
|
319
|
+
}
|
|
320
|
+
render() {
|
|
321
|
+
const classMap = this.getCssClassMap();
|
|
322
|
+
const colorClass = this.addWhiteClass();
|
|
323
|
+
const cutOff = this.getLineCuttoff();
|
|
324
|
+
return (index.h(index.Host, { class: colorClass }, index.h("p", { class: classMap, part: "part-para", style: cutOff }, index.h("slot", null))));
|
|
325
|
+
}
|
|
326
|
+
getCssClassMap() {
|
|
327
|
+
return {
|
|
328
|
+
[this.fontSize]: true,
|
|
329
|
+
[this.fontWeight]: true,
|
|
330
|
+
[this.paraStyle]: true,
|
|
331
|
+
[this.paraMargin]: !!this.paraMargin ? true : false,
|
|
332
|
+
[this.paraColor]: true,
|
|
333
|
+
[this.paraLineH]: true,
|
|
334
|
+
['ellipsis-boxing']: this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
//WEB-2392
|
|
338
|
+
addWhiteClass() {
|
|
339
|
+
if (this.paraColor == "white") {
|
|
340
|
+
return {
|
|
341
|
+
[this.paraColor]: true,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
getLineCuttoff() {
|
|
346
|
+
let result;
|
|
347
|
+
if (this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0) {
|
|
348
|
+
result = {
|
|
349
|
+
['-webkit-line-clamp']: `${this.ellipsisLineCutoff}`
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
return result;
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
PtcPara.style = ptcParaCss;
|
|
356
|
+
|
|
357
|
+
const ptcPictureCss = ":host{display:block;overflow:hidden}:host img{display:block}:host(.relative){position:relative}:host(.static){position:static}:host(.absoltue){position:absolute}img{max-width:100%}.cover{object-fit:cover}.fill{object-fit:fill}.contain{object-fit:contain}.scale-down{object-fit:scale-down}.none{object-fit:none}.initial{object-fit:initial}.inherit{object-fit:inherit}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.is-full-height{height:100%}.is-full-width{width:100%}:host(.left){text-align:left}:host(.right){text-align:right}:host(.center){text-align:center}";
|
|
358
|
+
|
|
359
|
+
let PtcPicture = class {
|
|
360
|
+
constructor(hostRef) {
|
|
361
|
+
index.registerInstance(this, hostRef);
|
|
362
|
+
/**
|
|
363
|
+
* Image alt
|
|
364
|
+
*/
|
|
365
|
+
this.alt = "image";
|
|
366
|
+
/**
|
|
367
|
+
* Image size for smallest screen
|
|
368
|
+
* <=767px
|
|
369
|
+
*/
|
|
370
|
+
this.sizeXs = '510x340';
|
|
371
|
+
/**
|
|
372
|
+
* Image size for small screen
|
|
373
|
+
* >=768px and <=991px
|
|
374
|
+
*/
|
|
375
|
+
this.sizeSm = '1240x496';
|
|
376
|
+
/**
|
|
377
|
+
* Image size for medium screen
|
|
378
|
+
* >=992px and <=1199px
|
|
379
|
+
*/
|
|
380
|
+
this.sizeMd = '1366x500';
|
|
381
|
+
/**
|
|
382
|
+
* Image solution for large screen
|
|
383
|
+
* >=1200px
|
|
384
|
+
*/
|
|
385
|
+
this.sizeLg = '1920x1080';
|
|
386
|
+
/**
|
|
387
|
+
* Image Position
|
|
388
|
+
*/
|
|
389
|
+
this.imagePosition = 'static';
|
|
390
|
+
/**
|
|
391
|
+
* Object Fit
|
|
392
|
+
* Default: cover
|
|
393
|
+
*/
|
|
394
|
+
this.objectFit = 'cover';
|
|
395
|
+
/**
|
|
396
|
+
* Stretch height to 100%?
|
|
397
|
+
*/
|
|
398
|
+
this.isFullHeight = false;
|
|
399
|
+
/**
|
|
400
|
+
* Stretch width to 100%?
|
|
401
|
+
*/
|
|
402
|
+
this.isFullWidth = false;
|
|
403
|
+
/**
|
|
404
|
+
* (optional) Image alignment
|
|
405
|
+
**/
|
|
406
|
+
this.imageAlignment = 'left';
|
|
407
|
+
}
|
|
408
|
+
WindowResize() {
|
|
409
|
+
this.addIntersectionObserver();
|
|
410
|
+
}
|
|
411
|
+
componentDidLoad() {
|
|
412
|
+
this.addIntersectionObserver();
|
|
413
|
+
}
|
|
414
|
+
componentWillUpdate() {
|
|
415
|
+
if (this.src !== this.oldSrc) {
|
|
416
|
+
this.addIntersectionObserver();
|
|
417
|
+
}
|
|
418
|
+
this.oldSrc = this.src;
|
|
419
|
+
}
|
|
420
|
+
//lazy-loading
|
|
421
|
+
addIntersectionObserver() {
|
|
422
|
+
if (!this.src) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
if ('IntersectionObserver' in window) {
|
|
426
|
+
let lazyLoadImages = new IntersectionObserver(entries => {
|
|
427
|
+
entries.forEach(entry => {
|
|
428
|
+
if (entry.isIntersecting) {
|
|
429
|
+
const image = this.el.shadowRoot.querySelector('img');
|
|
430
|
+
image.src = this.setResponsiveBg();
|
|
431
|
+
console.log('loaded');
|
|
432
|
+
lazyLoadImages.unobserve(image);
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
lazyLoadImages.observe(this.el.shadowRoot.querySelector('img'));
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
// fall back to setTimeout for Safari and IE
|
|
440
|
+
setTimeout(() => {
|
|
441
|
+
const image = this.el.shadowRoot.querySelector('img');
|
|
442
|
+
image.src = this.setResponsiveBg();
|
|
443
|
+
image.onload = () => {
|
|
444
|
+
image.removeAttribute('data-src');
|
|
445
|
+
console.log('loaded fallback');
|
|
446
|
+
};
|
|
447
|
+
}, 5000);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
//responsive image
|
|
451
|
+
setResponsiveBg() {
|
|
452
|
+
// Define local variables
|
|
453
|
+
let backgrounds = (this.el.shadowRoot || document).querySelectorAll('img'), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
454
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
455
|
+
// Set current variables
|
|
456
|
+
el = backgrounds[i];
|
|
457
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
458
|
+
if (elData !== null) {
|
|
459
|
+
// console.log('img src= ' + elData);
|
|
460
|
+
return elData;
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
if (typeof console == 'object') {
|
|
464
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
render() {
|
|
470
|
+
const classMap = this.getCssClassMap();
|
|
471
|
+
const classMapHost = this.getCssClassMapHost();
|
|
472
|
+
return (index.h(index.Host, { class: classMapHost }, this.styles && index.h("style", null, this.styles), index.h("img", Object.assign({ class: classMap, "data-xs": !!this.sizeXs ? `${this.src}:${this.sizeXs}` : `${this.src}`, "data-sm": !!this.sizeSm ? `${this.src}:${this.sizeSm}` : `${this.src}`, "data-md": !!this.sizeMd ? `${this.src}:${this.sizeMd}` : `${this.src}`, "data-lg": !!this.sizeLg ? `${this.src}:${this.sizeLg}` : `${this.src}` }, (!!this.width ? { width: this.width } : {}), (!!this.height ? { height: this.height } : {}), { alt: this.alt, style: Object.assign({}, (!!this.maxWidth ? { maxWidth: this.maxWidth + 'px' } : {})) })), index.h("slot", null)));
|
|
473
|
+
}
|
|
474
|
+
getCurrentBreakPoints() {
|
|
475
|
+
// Define local variables
|
|
476
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
477
|
+
// Append test node
|
|
478
|
+
doc.body.appendChild(temp);
|
|
479
|
+
// Loop through breakpoints
|
|
480
|
+
for (let i = ResponsivePictureVariables.envs.length - 1; i >= 0; i--) {
|
|
481
|
+
env = ResponsivePictureVariables.envs[i];
|
|
482
|
+
// Add classes
|
|
483
|
+
temp.className = 'hidden-' + env;
|
|
484
|
+
// Found breakpoint
|
|
485
|
+
if (temp.offsetParent === null) {
|
|
486
|
+
// Remove our test node
|
|
487
|
+
doc.body.removeChild(temp);
|
|
488
|
+
// Return current breakpoint
|
|
489
|
+
return env;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
// Breakpoint not found, try fallback
|
|
493
|
+
doc.body.removeChild(temp);
|
|
494
|
+
return this.getFallbackBreakpoint();
|
|
495
|
+
}
|
|
496
|
+
getFallbackBreakpoint() {
|
|
497
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
498
|
+
return 'lg';
|
|
499
|
+
}
|
|
500
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
501
|
+
return 'md';
|
|
502
|
+
}
|
|
503
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
504
|
+
return 'sm';
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
return 'xs';
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
getCssClassMap() {
|
|
511
|
+
return {
|
|
512
|
+
[this.borderRadius]: this.borderRadius ? true : false,
|
|
513
|
+
[this.objectFit]: true,
|
|
514
|
+
[this.isFullHeight ? 'is-full-height' : 'is-normal-height']: true,
|
|
515
|
+
[this.isFullWidth ? 'is-full-width' : 'is-normal-width']: true
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
getCssClassMapHost() {
|
|
519
|
+
return {
|
|
520
|
+
[this.imagePosition]: true,
|
|
521
|
+
[this.imageAlignment]: true
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
get el() { return index.getElement(this); }
|
|
525
|
+
};
|
|
526
|
+
PtcPicture.style = ptcPictureCss;
|
|
527
|
+
|
|
528
|
+
const ptcSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.ptc-spacer-horizontal){display:inline-block;height:100% !important}:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.ptc-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.ptc-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.small){width:12px;min-width:12px}}:host(.ptc-spacer-horizontal.medium){height:100%}:host(.ptc-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.large){width:20px;min-width:20px}}:host(.ptc-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.ptc-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.ptc-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.ptc-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.ptc-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.ptc-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.ptc-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.ptc-spacer-vertical.small){height:12px;min-height:12px}}:host(.ptc-spacer-vertical.medium){width:100%}:host(.ptc-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.ptc-spacer-vertical.large){height:20px;min-height:20px}}:host(.ptc-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.ptc-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.ptc-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.ptc-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.ptc-spacer-vertical.space-144){width:100%;height:144px;min-height:144px}:host(.ptc-spacer-vertical.space-120){width:100%;height:120px;min-height:120px}:host(.ptc-spacer-vertical.space-128){width:100%;height:128px;min-height:128px}:host(.ptc-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.ptc-spacer-xx-small){display:block}}:host(.ptc-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.ptc-spacer-x-small){display:block}}:host(.ptc-spacer-small){display:none}@media (min-width: 36em){:host(.ptc-spacer-small){display:block}}:host(.ptc-spacer-medium){display:none}@media (min-width: 48em){:host(.ptc-spacer-medium){display:block}}:host(.ptc-spacer-large){display:none}@media (min-width: 62em){:host(.ptc-spacer-large){display:block}}:host(.ptc-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.ptc-spacer-x-large){display:block}}:host(.ptc-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.ptc-spacer-xx-large){display:block}}";
|
|
529
|
+
|
|
530
|
+
let PtcSpacer = class {
|
|
531
|
+
constructor(hostRef) {
|
|
532
|
+
index.registerInstance(this, hostRef);
|
|
533
|
+
/**
|
|
534
|
+
* Breakpoint
|
|
535
|
+
*/
|
|
536
|
+
this.breakpoint = '';
|
|
537
|
+
/**
|
|
538
|
+
* Spacing Size
|
|
539
|
+
*/
|
|
540
|
+
this.size = 'medium';
|
|
541
|
+
/**
|
|
542
|
+
* Direction
|
|
543
|
+
*/
|
|
544
|
+
this.direction = 'vertical';
|
|
545
|
+
}
|
|
546
|
+
render() {
|
|
547
|
+
const classMap = this.getCssClassMap();
|
|
548
|
+
return (index.h(index.Host, { class: classMap }));
|
|
549
|
+
}
|
|
550
|
+
getCssClassMap() {
|
|
551
|
+
return {
|
|
552
|
+
[this.size]: true,
|
|
553
|
+
['ptc-spacer-horizontal']: this.direction === 'horizontal',
|
|
554
|
+
['ptc-spacer-vertical']: this.direction === 'vertical',
|
|
555
|
+
['ptc-spacer-xx-small']: this.breakpoint === 'xx-small',
|
|
556
|
+
['ptc-spacer-x-small']: this.breakpoint === 'x-small',
|
|
557
|
+
['ptc-spacer-small']: this.breakpoint === 'small',
|
|
558
|
+
['ptc-spacer-medium']: this.breakpoint === 'medium',
|
|
559
|
+
['ptc-spacer-large']: this.breakpoint === 'large',
|
|
560
|
+
['ptc-spacer-x-large']: this.breakpoint === 'x-large',
|
|
561
|
+
['ptc-spacer-xx-large']: this.breakpoint === 'xx-large',
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
PtcSpacer.style = ptcSpacerCss;
|
|
566
|
+
|
|
80
567
|
exports.ptc_card = PtcCard;
|
|
568
|
+
exports.ptc_date = PtcDate;
|
|
569
|
+
exports.ptc_img = PtcImg;
|
|
570
|
+
exports.ptc_para = PtcPara;
|
|
571
|
+
exports.ptc_picture = PtcPicture;
|
|
572
|
+
exports.ptc_spacer = PtcSpacer;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b3fabe79.js');
|
|
6
|
+
|
|
7
|
+
const ptcContainerCss = ":host{display:block;position:relative}.white{border-radius:4px;background-color:var(--color-white)}.gray{border-radius:4px;background-color:var(--color-white-gray)}.content-wrapper{font-family:Raleway;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;text-align:left}.content-wrapper.x-small{box-shadow:var(--ptc-shadow-x-small)}.content-wrapper.small{box-shadow:var(--ptc-shadow-small)}.content-wrapper.medium{box-shadow:var(--ptc-shadow-medium)}.content-wrapper.large{box-shadow:var(--ptc-shadow-large)}.content-wrapper.x-large{box-shadow:var(--ptc-shadow-x-large)}.content-wrapper.spacing-xx-small{padding:var(--ptc-element-spacing-01)}.content-wrapper.spacing-x-small{padding:var(--ptc-element-spacing-02)}.content-wrapper.spacing-small{padding:var(--ptc-element-spacing-03)}.content-wrapper.spacing-medium{padding:var(--ptc-element-spacing-04)}.content-wrapper.spacing-large{padding:var(--ptc-element-spacing-05)}.content-wrapper.spacing-x-large{padding:var(--ptc-element-spacing-06)}.content-wrapper.spacing-xx-large{padding:var(--ptc-element-spacing-07)}.content-wrapper.spacing-xxx-large{padding:var(--ptc-element-spacing-08)}";
|
|
8
|
+
|
|
9
|
+
let PtcContainer = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Theme
|
|
14
|
+
*/
|
|
15
|
+
this.backgroundColor = 'white';
|
|
16
|
+
this.elevation = 'small';
|
|
17
|
+
this.containerType = 'normal';
|
|
18
|
+
this.spacing = 'xxx-large';
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
const classMap = this.getCssClassMap();
|
|
22
|
+
return (index.h(index.Host, { class: this.getContainerClass() }, index.h("div", { class: classMap }, index.h("slot", null))));
|
|
23
|
+
}
|
|
24
|
+
getContainerClass() {
|
|
25
|
+
switch (this.containerType) {
|
|
26
|
+
case 'large':
|
|
27
|
+
return 'ptc-container-lg';
|
|
28
|
+
case 'none':
|
|
29
|
+
return undefined;
|
|
30
|
+
default:
|
|
31
|
+
return 'ptc-container';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
getCssClassMap() {
|
|
35
|
+
const spacing = `spacing-${this.spacing}`;
|
|
36
|
+
return {
|
|
37
|
+
['content-wrapper']: true,
|
|
38
|
+
[this.backgroundColor]: true,
|
|
39
|
+
[this.elevation]: true,
|
|
40
|
+
[spacing]: true
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
PtcContainer.style = ptcContainerCss;
|
|
45
|
+
|
|
46
|
+
exports.ptc_container = PtcContainer;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b3fabe79.js');
|
|
6
|
+
|
|
7
|
+
const ptcEllipsisDropdownCss = ".ellipsis-icon{border:1px solid #6E717C;border-radius:2px;vertical-align:middle;height:18px;width:18px;text-align:center;display:flex;align-items:center;justify-content:center;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.ellipsis-icon:hover{background-color:var(--color-gray-04);border-color:var(--color-gray-04)}.ellipsis-icon icon-asset{display:inline-block}.ellipsis-icon icon-asset svg{margin:0 auto;display:block}.ellipsis-icon.active{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ptc-ellipsis-dropdown{position:relative;display:inline-block;padding:7px;cursor:pointer}.dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:100;background:var(--color-white);padding:0.8rem 0;right:0;left:auto;min-width:max-content;width:100%}.show .dropdown-container{display:inline-block}";
|
|
8
|
+
|
|
9
|
+
let PtcEllipsisDropdown = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.itemSelected = index.createEvent(this, "itemSelected", 7);
|
|
13
|
+
this.dataItems = [];
|
|
14
|
+
this.isDropdownOpen = false;
|
|
15
|
+
}
|
|
16
|
+
dropdownToggle(e) {
|
|
17
|
+
e.currentTarget.classList.toggle("show");
|
|
18
|
+
this.isDropdownOpen = e.currentTarget.classList.contains("show");
|
|
19
|
+
}
|
|
20
|
+
onItemSelected(e) {
|
|
21
|
+
this.itemSelected.emit(e);
|
|
22
|
+
}
|
|
23
|
+
offClick(e) {
|
|
24
|
+
let container = this.host.shadowRoot.querySelector('.ptc-ellipsis-dropdown');
|
|
25
|
+
if (e && !this.host.contains(e.target) && this.isDropdownOpen) {
|
|
26
|
+
container.classList.remove("show");
|
|
27
|
+
this.isDropdownOpen = false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
let activeTab = this.dataItems.find(z => z.value == this.selectedTab);
|
|
32
|
+
let isActive = false;
|
|
33
|
+
if (activeTab) {
|
|
34
|
+
isActive = true;
|
|
35
|
+
}
|
|
36
|
+
return (index.h("div", { class: "ptc-ellipsis-dropdown", onClick: (e) => this.dropdownToggle(e) }, index.h("div", { class: isActive || this.isDropdownOpen ? "ellipsis-icon active" : "ellipsis-icon" }, index.h("icon-asset", { type: "ptc", size: "xxx-small", name: "ellipsis", color: isActive || this.isDropdownOpen ? 'white' : 'black' })), index.h("div", { class: "dropdown-container" }, index.h("slot", { name: "dropdown" }), this.dataItems.map(dataItem => {
|
|
37
|
+
let activeClass = dataItem.value == this.selectedTab ? 'active' : '';
|
|
38
|
+
return (index.h("dropdown-item", { class: activeClass }, index.h("a", { href: "#", onClick: (e) => {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
this.onItemSelected(dataItem);
|
|
41
|
+
} }, dataItem.text)));
|
|
42
|
+
}))));
|
|
43
|
+
}
|
|
44
|
+
get host() { return index.getElement(this); }
|
|
45
|
+
};
|
|
46
|
+
PtcEllipsisDropdown.style = ptcEllipsisDropdownCss;
|
|
47
|
+
|
|
48
|
+
exports.ptc_ellipsis_dropdown = PtcEllipsisDropdown;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b3fabe79.js');
|
|
6
|
+
|
|
7
|
+
const ptcHeroCss = ":host{display:block;position:relative}:host(.jumbotron) .ptc-hero-wrapper,:host(.footer-cta) .ptc-hero-wrapper{position:relative}:host(.footer-cta) .ptc-hero-wrapper div>*{text-align:center}";
|
|
8
|
+
|
|
9
|
+
let PtcHero = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Hero Background Image URL
|
|
14
|
+
*/
|
|
15
|
+
this.bgUrl = undefined;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const classMap = this.getCssClassMap();
|
|
19
|
+
return (index.h(index.Host, { class: classMap }, index.h("div", { class: "ptc-hero-wrapper" }, index.h("ptc-img", Object.assign({ "image-type": "smart-bg" }, (!!this.bgUrl ? { imgUrl: this.bgUrl } : {}), { "size-xs": "600x450", "size-sm": "1108x658", "size-md": "1920x1080", "size-lg": "2700x1500" }), this.heroType == 'jumbotron' ? ([index.h("ptc-overlay", { "filter-color": "black-1" }), index.h("ptc-overlay", { "filter-color": "black-2" })]) : this.heroType == 'footer-cta' ? (index.h("ptc-overlay", { "filter-color": "black-3" })) : null, index.h("slot", null)))));
|
|
20
|
+
}
|
|
21
|
+
getCssClassMap() {
|
|
22
|
+
return {
|
|
23
|
+
[this.heroType]: this.heroType ? true : false,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
PtcHero.style = ptcHeroCss;
|
|
28
|
+
|
|
29
|
+
exports.ptc_hero = PtcHero;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b3fabe79.js');
|
|
6
|
+
|
|
7
|
+
const ptcOverlayCss = ":host{display:block;position:absolute;top:0;left:0;width:100%;height:100%}:host(.blue){background:linear-gradient(180deg, rgba(25, 123, 192, 0.2) 0%, var(--color-blue-07) 100%)}:host(.red){background:linear-gradient(180deg, rgba(209, 44, 58, 0.2) 0%, var(--color-red-07) 100%)}:host(.orange){background:linear-gradient(180deg, rgba(195, 119, 41, 0.2) 0%, var(--color-orange-07) 100%)}:host(.green){background:linear-gradient(180deg, rgba(0, 137, 11, 0.2) 0%, var(--color-green-07) 100%)}:host(.black-1){background:linear-gradient(270deg, rgba(32, 38, 42, 0.32) 33.33%, var(--color-gray-12) 100%)}:host(.black-2){background:linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, var(--color-gray-12) 100%)}@media only screen and (min-width: 768px){:host(.black-1){background:linear-gradient(270deg, rgba(32, 38, 42, 0) 33.33%, var(--color-gray-12) 100%)}:host(.black-2){background:linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, var(--color-gray-12) 100%)}}:host(.black-3){background:linear-gradient(180deg, var(--color-gray-12) 0%, rgba(32, 38, 42, 0.55) 100%)}:host(.slate-grey){background:linear-gradient(180deg, rgba(97, 116, 128, 0.2) 0%, var(--color-gray-07) 100%)}:host(.radius-standard){border-radius:var(--ptc-border-radius-standard)}:host(.radius-large){border-radius:var(--ptc-border-radius-large)}:host(.z-index-auto){z-index:auto}:host(.z-index-n-1){z-index:-1}:host(.z-index-n-2){z-index:-2}:host(.z-index-p-1){z-index:1}:host(.z-index-p-2){z-index:2}";
|
|
8
|
+
|
|
9
|
+
let PtcOverlay = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Overlay z-index
|
|
14
|
+
*/
|
|
15
|
+
this.overlayZIndex = 'z-index-auto';
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const classMap = this.getCssClassMap();
|
|
19
|
+
return index.h(index.Host, { class: classMap });
|
|
20
|
+
}
|
|
21
|
+
getCssClassMap() {
|
|
22
|
+
return {
|
|
23
|
+
[this.filterColor]: !!this.filterColor ? true : false,
|
|
24
|
+
[this.borderRadius]: !!this.borderRadius ? true : false,
|
|
25
|
+
[this.overlayZIndex]: true
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
PtcOverlay.style = ptcOverlayCss;
|
|
30
|
+
|
|
31
|
+
exports.ptc_overlay = PtcOverlay;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b3fabe79.js');
|
|
6
|
+
|
|
7
|
+
const ptcPreviousUrlCss = ":host{display:block;margin-top:var(--ptc-element-spacing-03)}.back-to-videos{display:inline-block;font-family:var(--ptc-font-latin);font-style:normal;font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-dense)}.back-to-videos:hover{text-decoration:underline;text-decoration-color:var(--color-green-07);outline:none}::slotted(*){transform:translate(-2px, -2px)}.backarrow:hover+.back-to-videos{text-decoration:underline;text-decoration-color:var(--color-green-07);outline:none}";
|
|
8
|
+
|
|
9
|
+
let PtcPreviousUrl = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (index.h(index.Host, null, index.h("list-item", { listType: 'breadcrumb', flushBefore: true, "link-href": this.href }, index.h("ptc-svg-btn", { class: "backarrow", "svg-name": "back-arrow", display: "inline-block" }), index.h("a", { class: "back-to-videos" }, this.text)), index.h("slot", null)));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
PtcPreviousUrl.style = ptcPreviousUrlCss;
|
|
18
|
+
|
|
19
|
+
exports.ptc_previous_url = PtcPreviousUrl;
|