@ptcwebops/ptcw-design 0.0.15 → 0.1.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/custom-elements/index.d.ts +12 -0
- package/dist/ptcw-design/app-globals-0f993ce5.js +3 -0
- package/dist/ptcw-design/assets/ptc-sprite.svg +67 -0
- package/dist/ptcw-design/css-shim-003e9264.js +4 -0
- package/dist/ptcw-design/dom-1b195079.js +73 -0
- package/dist/{esm → ptcw-design}/icon-asset.entry.js +2 -2
- package/dist/{cjs/index-ac192914.js → ptcw-design/index-f7043a90.js} +1311 -195
- package/dist/ptcw-design/index.esm.js +1 -0
- package/dist/{esm → ptcw-design}/list-item.entry.js +1 -1
- package/dist/{esm → ptcw-design}/lottie-player.entry.js +782 -31
- package/dist/{esm → ptcw-design}/my-component.entry.js +1 -1
- package/dist/ptcw-design/ptc-announcement.entry.js +31 -0
- package/dist/ptcw-design/ptc-button.entry.js +57 -0
- package/dist/{esm → ptcw-design}/ptc-card.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-date.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-footer.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-image.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-img.entry.js +12 -1
- package/dist/{esm → ptcw-design}/ptc-link.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-list.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-lottie.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-nav-item.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-nav.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-overlay.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-para.entry.js +2 -2
- package/dist/{esm → ptcw-design}/ptc-picture.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-spacer.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-span.entry.js +1 -1
- package/dist/ptcw-design/ptc-svg-btn.entry.js +27 -0
- package/dist/{esm → ptcw-design}/ptc-title.entry.js +1 -1
- package/dist/ptcw-design/ptcw-design.css +1030 -2
- package/dist/ptcw-design/ptcw-design.esm.js +122 -1
- package/dist/ptcw-design/shadow-css-c1ad5fdc.js +383 -0
- package/dist/types/components/icon-asset/icon-asset.d.ts +1 -1
- package/dist/types/components/ptc-announcement/ptc-announcement.d.ts +27 -0
- package/dist/types/components/ptc-button/ptc-button.d.ts +13 -1
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-svg-btn/ptc-svg-btn.d.ts +4 -0
- package/dist/types/components.d.ts +94 -6
- package/package.json +1 -1
- package/dist/cjs/icon-asset.cjs.entry.js +0 -64
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/list-item.cjs.entry.js +0 -27
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/lottie-player.cjs.entry.js +0 -13476
- package/dist/cjs/my-component.cjs.entry.js +0 -26
- package/dist/cjs/ptc-button.cjs.entry.js +0 -48
- package/dist/cjs/ptc-card.cjs.entry.js +0 -75
- package/dist/cjs/ptc-date.cjs.entry.js +0 -48
- package/dist/cjs/ptc-footer.cjs.entry.js +0 -19
- package/dist/cjs/ptc-image.cjs.entry.js +0 -58
- package/dist/cjs/ptc-img.cjs.entry.js +0 -163
- package/dist/cjs/ptc-link.cjs.entry.js +0 -53
- package/dist/cjs/ptc-list.cjs.entry.js +0 -32
- package/dist/cjs/ptc-lottie.cjs.entry.js +0 -23
- package/dist/cjs/ptc-nav-item.cjs.entry.js +0 -94
- package/dist/cjs/ptc-nav.cjs.entry.js +0 -19
- package/dist/cjs/ptc-overlay.cjs.entry.js +0 -19
- package/dist/cjs/ptc-para.cjs.entry.js +0 -40
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -26
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -46
- package/dist/cjs/ptc-span.cjs.entry.js +0 -31
- package/dist/cjs/ptc-title.cjs.entry.js +0 -49
- package/dist/cjs/ptcw-design.cjs.js +0 -19
- package/dist/collection/assets/responsive-background-image.min.js +0 -1
- package/dist/collection/collection-manifest.json +0 -38
- package/dist/collection/components/icon-asset/assets/brands.svg +0 -1381
- package/dist/collection/components/icon-asset/assets/footer-social.svg +0 -0
- package/dist/collection/components/icon-asset/assets/ptc-sprite.svg +0 -77
- package/dist/collection/components/icon-asset/assets/regular.svg +0 -463
- package/dist/collection/components/icon-asset/assets/solid.svg +0 -3013
- package/dist/collection/components/icon-asset/assets/svg-with-js.min.css +0 -5
- package/dist/collection/components/icon-asset/icon-asset.css +0 -26
- package/dist/collection/components/icon-asset/icon-asset.js +0 -177
- package/dist/collection/components/list-item/list-item.css +0 -3
- package/dist/collection/components/list-item/list-item.js +0 -63
- package/dist/collection/components/my-component/my-component.css +0 -3
- package/dist/collection/components/my-component/my-component.js +0 -74
- package/dist/collection/components/ptc-button/ptc-button.css +0 -76
- package/dist/collection/components/ptc-button/ptc-button.js +0 -153
- package/dist/collection/components/ptc-card/ptc-card.css +0 -239
- package/dist/collection/components/ptc-card/ptc-card.js +0 -260
- package/dist/collection/components/ptc-date/ptc-date.css +0 -3
- package/dist/collection/components/ptc-date/ptc-date.js +0 -155
- package/dist/collection/components/ptc-footer/ptc-footer.css +0 -40
- package/dist/collection/components/ptc-footer/ptc-footer.js +0 -25
- package/dist/collection/components/ptc-image/ptc-image.css +0 -4
- package/dist/collection/components/ptc-image/ptc-image.js +0 -92
- package/dist/collection/components/ptc-img/ptc-img.css +0 -65
- package/dist/collection/components/ptc-img/ptc-img.js +0 -318
- package/dist/collection/components/ptc-link/ptc-link.css +0 -168
- package/dist/collection/components/ptc-link/ptc-link.js +0 -197
- package/dist/collection/components/ptc-list/ptc-list.css +0 -24
- package/dist/collection/components/ptc-list/ptc-list.js +0 -66
- package/dist/collection/components/ptc-lottie/ptc-lottie.css +0 -5
- package/dist/collection/components/ptc-lottie/ptc-lottie.js +0 -58
- package/dist/collection/components/ptc-nav/ptc-nav.css +0 -29
- package/dist/collection/components/ptc-nav/ptc-nav.js +0 -21
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +0 -81
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +0 -252
- package/dist/collection/components/ptc-overlay/ptc-overlay.css +0 -3
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +0 -14
- package/dist/collection/components/ptc-para/ptc-para.css +0 -57
- package/dist/collection/components/ptc-para/ptc-para.js +0 -111
- package/dist/collection/components/ptc-picture/ptc-picture.css +0 -3
- package/dist/collection/components/ptc-picture/ptc-picture.js +0 -44
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +0 -307
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +0 -99
- package/dist/collection/components/ptc-span/ptc-span.css +0 -36
- package/dist/collection/components/ptc-span/ptc-span.js +0 -86
- package/dist/collection/components/ptc-title/ptc-title.css +0 -64
- package/dist/collection/components/ptc-title/ptc-title.js +0 -105
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/interfaces.js +0 -6
- package/dist/collection/utils/utils.js +0 -3
- package/dist/custom-elements/index.js +0 -14381
- package/dist/esm/index-5b1c792c.js +0 -1687
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/ptc-button.entry.js +0 -44
- package/dist/esm/ptcw-design.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/node_modules/@teamhive/lottie-player/dist/collection/components/lottie-player/lottie-player.css +0 -187
- package/dist/ptcw-design/p-00b6c442.entry.js +0 -1
- package/dist/ptcw-design/p-01dc360c.entry.js +0 -1
- package/dist/ptcw-design/p-07624831.entry.js +0 -1
- package/dist/ptcw-design/p-0a44a2f7.entry.js +0 -1
- package/dist/ptcw-design/p-1a26bade.entry.js +0 -1
- package/dist/ptcw-design/p-2d357f92.entry.js +0 -1
- package/dist/ptcw-design/p-31f4bd0c.entry.js +0 -1
- package/dist/ptcw-design/p-3af43980.entry.js +0 -1
- package/dist/ptcw-design/p-4f366fc3.js +0 -1
- package/dist/ptcw-design/p-662ae9b6.entry.js +0 -1
- package/dist/ptcw-design/p-70adca2e.entry.js +0 -1
- package/dist/ptcw-design/p-76dfa56f.entry.js +0 -1
- package/dist/ptcw-design/p-77f87fa3.entry.js +0 -1
- package/dist/ptcw-design/p-7a63ca63.entry.js +0 -1
- package/dist/ptcw-design/p-83696cae.entry.js +0 -1
- package/dist/ptcw-design/p-83d98048.entry.js +0 -1
- package/dist/ptcw-design/p-85131a2a.entry.js +0 -1
- package/dist/ptcw-design/p-ac0ad25e.entry.js +0 -1
- package/dist/ptcw-design/p-c169281f.entry.js +0 -1
- package/dist/ptcw-design/p-ce8b8a72.entry.js +0 -1
- package/dist/ptcw-design/p-d4f117d2.entry.js +0 -1
- package/dist/ptcw-design/p-fe6a3ba5.entry.js +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
function format(first, middle, last) {
|
|
8
|
-
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const myComponentCss = ":host{display:block}";
|
|
12
|
-
|
|
13
|
-
const MyComponent = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
}
|
|
17
|
-
getText() {
|
|
18
|
-
return format(this.first, this.middle, this.last);
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return index.h("div", null, index.h("h4", null, "Hello, World! I'm ", this.getText()));
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
MyComponent.style = myComponentCss;
|
|
25
|
-
|
|
26
|
-
exports.my_component = MyComponent;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcButtonCss = "button:disabled{pointer-events:none;opacity:0.6}button{background-color:var(--color-primary-uigrey);display:inline-block;border-style:solid;border-width:1px;white-space:normal;position:relative;text-decoration:none;cursor:pointer;padding:9.4px 17.5px;border-radius:3px}button.animation-right svg,button.animation-down svg{transition:all ease-out 0.25s;position:relative}button:hover.animation-right svg{transform:translateX(var(--ptc-element-spacing-02))}button:hover.animation-down svg{transform:translateY(var(--ptc-element-spacing-02))}button span{font-size:var(--ptc-font-size-small);font-weight:bold;line-height:0.86}.icon-left svg{margin-right:var(--ptc-element-spacing-01)}.icon-right svg{margin-left:var(--ptc-element-spacing-01)}.blackgrey{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-primary-uigrey);background-image:linear-gradient(285deg, var(--color-primary-uigrey) 155%, #6e717c 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 #5bb73b;background-image:linear-gradient(285deg, #5bb73b 155%, #178642 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-primary-uigrey);background-image:linear-gradient(to right, #ffffff, #d3d3d3, #e5e5e5)}.offwhite:hover{box-shadow:var(--ptc-shadow-x-large)}.offwhite span{color:var(--color-primary-uigrey)}";
|
|
8
|
-
|
|
9
|
-
const PtcButton = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.clickEvent = index.createEvent(this, "clickEvent", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Button type
|
|
15
|
-
*/
|
|
16
|
-
this.type = 'button';
|
|
17
|
-
/**
|
|
18
|
-
* Button theme color
|
|
19
|
-
*/
|
|
20
|
-
this.color = 'blackgrey';
|
|
21
|
-
/**
|
|
22
|
-
* Icon Animation
|
|
23
|
-
*/
|
|
24
|
-
this.iconAnimation = '';
|
|
25
|
-
/**
|
|
26
|
-
* Icon Position
|
|
27
|
-
*/
|
|
28
|
-
this.iconPosition = 'icon-right';
|
|
29
|
-
}
|
|
30
|
-
clickEventHandler() {
|
|
31
|
-
this.clickEvent.emit();
|
|
32
|
-
console.log('click!');
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
const classMap = this.getCssClassMap();
|
|
36
|
-
return (index.h(index.Host, null, index.h("button", { type: this.type, class: classMap, disabled: this.disabled, onClick: this.clickEventHandler.bind(this) }, index.h("span", null, index.h("slot", null)))));
|
|
37
|
-
}
|
|
38
|
-
getCssClassMap() {
|
|
39
|
-
return {
|
|
40
|
-
[this.color]: true,
|
|
41
|
-
[this.iconAnimation]: true,
|
|
42
|
-
[this.iconPosition]: true,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
PtcButton.style = ptcButtonCss;
|
|
47
|
-
|
|
48
|
-
exports.ptc_button = PtcButton;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcCardCss = ":host{display:block}:host(.lottie-card) .card-border{box-shadow:1px 1px 14px 0 rgba(101, 101, 101, 0.35);border:1px solid #c9c9c9;border-radius:10px;position:relative;overflow:hidden}:host(.lottie-card) .card-border::after{content:\"\";height:40%;width:4px;position:absolute;top:30%;right:-2px;background-color:#74c34d;z-index:2;display:block}:host(.lottie-card) .card-border:hover{box-shadow:1px 1px 35px 0 rgba(101, 101, 101, 0.65)}:host(.lottie-card) .card-border:hover .card-body h3{border-bottom:2px solid var(--color-primary-green)}:host(.lottie-card) .card-layout{display:block}@media only screen and (min-width: 992px){:host(.lottie-card) .card-layout{display:flex;flex-flow:nowrap row;justify-content:center}}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
|
|
8
|
-
|
|
9
|
-
const PtcCard = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Card Type
|
|
14
|
-
* Specify Card Type, default to simple card
|
|
15
|
-
*/
|
|
16
|
-
this.cardType = 'custom-card';
|
|
17
|
-
/**
|
|
18
|
-
* Card Link URL (Optional)
|
|
19
|
-
*/
|
|
20
|
-
this.cardHref = undefined;
|
|
21
|
-
/**
|
|
22
|
-
* (optional) Link card target
|
|
23
|
-
* */
|
|
24
|
-
this.target = '_self';
|
|
25
|
-
/**
|
|
26
|
-
* (optional) Link card rel
|
|
27
|
-
* */
|
|
28
|
-
this.rel = undefined;
|
|
29
|
-
/**
|
|
30
|
-
* If this card has Image
|
|
31
|
-
*/
|
|
32
|
-
this.hasImage = false;
|
|
33
|
-
/**
|
|
34
|
-
* If this card has Video
|
|
35
|
-
*/
|
|
36
|
-
this.hasVideo = false;
|
|
37
|
-
/**
|
|
38
|
-
* If this card has Lottie Image
|
|
39
|
-
*/
|
|
40
|
-
this.hasLottie = false;
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
const Tag = !!this.cardHref ? 'a' : 'div';
|
|
44
|
-
const classMap = this.getCssClassMap();
|
|
45
|
-
return (index.h(index.Host, Object.assign({}, (!!this.cardType ? { class: this.cardType } : {})), this.styles && index.h("style", null, this.styles), index.h("div", { class: "card-border", part: "border-wrapper" }, index.h(Tag, Object.assign({ class: classMap, part: "card-layout" }, (!!this.cardHref ? { href: this.cardHref } : {}), (!!this.target && !!this.cardHref ? { target: this.target } : {}), (!!this.rel && !!this.cardHref ? { rel: this.rel } : {})), this.hasImage || this.hasLottie || this.hasVideo ? (index.h("div", { class: "card-media", part: "media-wrapper" }, this.getMediaSlot ? index.h("slot", { name: this.getMediaSlot() }) : null)) : null, index.h("div", { class: "card-body", part: "body-wrapper" }, index.h("slot", { name: "slot-before-heading" }), !!this.heading
|
|
46
|
-
? [
|
|
47
|
-
index.h("h3", { class: "ptc-h3", part: "card-heading" }, this.heading),
|
|
48
|
-
index.h("slot", { name: "slot-after-heading" }),
|
|
49
|
-
]
|
|
50
|
-
: null, index.h("slot", { name: "slot-description" }), !!this.cardDate ? index.h("ptc-date", { "date-string": `${this.cardDate}`, "date-styles": "::part(part-ptc-date){color:#40434a;font-size:var(--ptc-font-size-medium);margin-top:var(--ptc-element-spacing-04);display:inline-block;}" }) : null)))));
|
|
51
|
-
}
|
|
52
|
-
getCssClassMap() {
|
|
53
|
-
return {
|
|
54
|
-
['card-layout']: true,
|
|
55
|
-
['link-wrapper']: !!this.cardType ? true : false,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
getMediaSlot() {
|
|
59
|
-
if (this.hasLottie) {
|
|
60
|
-
return 'slot-lottie';
|
|
61
|
-
}
|
|
62
|
-
else if (this.hasVideo) {
|
|
63
|
-
return 'slot-video';
|
|
64
|
-
}
|
|
65
|
-
else if (this.hasImage) {
|
|
66
|
-
return 'slot-image';
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
PtcCard.style = ptcCardCss;
|
|
74
|
-
|
|
75
|
-
exports.ptc_card = PtcCard;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcDateCss = ":host{display:block}";
|
|
8
|
-
|
|
9
|
-
const PtcDate = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Year
|
|
14
|
-
*/
|
|
15
|
-
this.year = 1900;
|
|
16
|
-
/**
|
|
17
|
-
* Month
|
|
18
|
-
* An integer between 0 (January) and 11 (December) representing the month.If omitted, defaults to 0.
|
|
19
|
-
*/
|
|
20
|
-
this.month = 0;
|
|
21
|
-
/**
|
|
22
|
-
* Day
|
|
23
|
-
* An integer between 1 and 31 representing the day of the month. If omitted, defaults to 1.
|
|
24
|
-
*/
|
|
25
|
-
this.day = 1;
|
|
26
|
-
/**
|
|
27
|
-
* Country
|
|
28
|
-
* examples: en-US, zh-CN, zh-TW, fr-FR, ja-JP, ru-RU, de-DE, ko-KR, it-IT, es-ES
|
|
29
|
-
*/
|
|
30
|
-
this.country = "en-US";
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
// const newDate = new Date(this.year, this.month, this.day);
|
|
34
|
-
return (index.h(index.Host, null, 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' }))));
|
|
35
|
-
}
|
|
36
|
-
getDate() {
|
|
37
|
-
if (this.dateString) {
|
|
38
|
-
let newDate = new Date(this.dateString.replace(/-/g, '\/'));
|
|
39
|
-
return newDate;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
return new Date(this.year, this.month, this.day);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
PtcDate.style = ptcDateCss;
|
|
47
|
-
|
|
48
|
-
exports.ptc_date = PtcDate;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcFooterCss = ":host{display:block;background-color:#1c2126}.footer-style{position:relative;bottom:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto auto;grid-template-areas:\"left lImage\" \"right right\" \"share share\" \"copyright copyright\"}@media screen and (min-width: 992px){.footer-style{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr fit-content(26px);grid-template-areas:\"lImage left right share\" \"copyright copyright copyright copyright\"}}.footer-image{grid-area:lImage}.footer-link-left{grid-area:left}.footer-link-right{grid-area:right}.footer-share{grid-area:share}.footer-copyright{grid-area:copyright}";
|
|
8
|
-
|
|
9
|
-
const PtcFooter = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return (index.h(index.Host, null, index.h("footer", { class: "footer-style" }, index.h("div", { class: "footer-image" }, index.h("slot", { name: "footer-image" })), index.h("div", { class: "footer-link-left" }, index.h("slot", { name: "footer-link-left" })), index.h("div", { class: "footer-link-right" }, index.h("slot", { name: "footer-link-right" })), index.h("div", { class: "footer-share" }, index.h("slot", { name: "footer-share" })), index.h("div", { class: "footer-copyright" }, index.h("slot", { name: "footer-copyright" })))));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
PtcFooter.style = ptcFooterCss;
|
|
18
|
-
|
|
19
|
-
exports.ptc_footer = PtcFooter;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcImageCss = "img{width:100%;height:auto}";
|
|
8
|
-
|
|
9
|
-
const PtcImage = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
componentDidLoad() {
|
|
14
|
-
this.addIntersectionObserver();
|
|
15
|
-
}
|
|
16
|
-
componentWillUpdate() {
|
|
17
|
-
if (this.src !== this.oldSrc) {
|
|
18
|
-
this.addIntersectionObserver();
|
|
19
|
-
}
|
|
20
|
-
this.oldSrc = this.src;
|
|
21
|
-
}
|
|
22
|
-
addIntersectionObserver() {
|
|
23
|
-
if (!this.src) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if ('IntersectionObserver' in window) {
|
|
27
|
-
let lazyLoadImages = new IntersectionObserver((entries) => {
|
|
28
|
-
entries.forEach(entry => {
|
|
29
|
-
if (entry.isIntersecting) {
|
|
30
|
-
const image = this.el.shadowRoot.querySelector('img');
|
|
31
|
-
image.src = image.dataset.src;
|
|
32
|
-
console.log('loaded');
|
|
33
|
-
lazyLoadImages.unobserve(image);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
lazyLoadImages.observe(this.el.shadowRoot.querySelector('img'));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
// fall back to setTimeout for Safari and IE
|
|
41
|
-
setTimeout(() => {
|
|
42
|
-
const image = this.el.shadowRoot.querySelector('img');
|
|
43
|
-
image.src = image.dataset.src;
|
|
44
|
-
image.onload = () => {
|
|
45
|
-
image.removeAttribute('data-src');
|
|
46
|
-
console.log('loaded fallback');
|
|
47
|
-
};
|
|
48
|
-
}, 5000);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
return index.h("img", { "data-src": this.src, alt: this.alt });
|
|
53
|
-
}
|
|
54
|
-
get el() { return index.getElement(this); }
|
|
55
|
-
};
|
|
56
|
-
PtcImage.style = ptcImageCss;
|
|
57
|
-
|
|
58
|
-
exports.ptc_image = PtcImage;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
let ResponsiveBgVariables = {
|
|
8
|
-
envs: ['xs', 'sm', 'md', 'lg'],
|
|
9
|
-
selector: '.ptc-img',
|
|
10
|
-
interval: 250
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
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-sm{border-radius:var(--ptc-border-radius-small)}.radius-md{border-radius:var(--ptc-border-radius-medium)}.radius-lg{border-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-primary-lightgrey)}@media (max-width: 767px){.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 (min-width: 1200px){.hidden-lg{display:none !important}}";
|
|
14
|
-
|
|
15
|
-
const PtcImg = class {
|
|
16
|
-
constructor(hostRef) {
|
|
17
|
-
index.registerInstance(this, hostRef);
|
|
18
|
-
/**
|
|
19
|
-
* Image size for smallest screen
|
|
20
|
-
* <=767px
|
|
21
|
-
*/
|
|
22
|
-
this.sizeXs = '510x340';
|
|
23
|
-
/**
|
|
24
|
-
* Image size for small screen
|
|
25
|
-
* >=768px and <=991px
|
|
26
|
-
*/
|
|
27
|
-
this.sizeSm = '1240x496';
|
|
28
|
-
/**
|
|
29
|
-
* Image size for medium screen
|
|
30
|
-
* >=992px and <=1199px
|
|
31
|
-
*/
|
|
32
|
-
this.sizeMd = '1366x500';
|
|
33
|
-
/**
|
|
34
|
-
* Image solution for large screen
|
|
35
|
-
* >=1200px
|
|
36
|
-
*/
|
|
37
|
-
this.sizeLg = '1920x1080';
|
|
38
|
-
/**
|
|
39
|
-
* Image type
|
|
40
|
-
*/
|
|
41
|
-
this.imageType = 'smart-bg';
|
|
42
|
-
/**
|
|
43
|
-
* Image border shape
|
|
44
|
-
*/
|
|
45
|
-
this.borderRadius = '';
|
|
46
|
-
/**
|
|
47
|
-
* Lazy loading option
|
|
48
|
-
*/
|
|
49
|
-
this.loadMode = 'lazy-bg';
|
|
50
|
-
}
|
|
51
|
-
WindowResize() {
|
|
52
|
-
this.setResponsiveBg();
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const classMap = this.getCssClassMap();
|
|
56
|
-
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}` })));
|
|
57
|
-
}
|
|
58
|
-
componentDidLoad() {
|
|
59
|
-
this.addIntersectionObserver();
|
|
60
|
-
this.setResponsiveBg();
|
|
61
|
-
}
|
|
62
|
-
componentWillUpdate() {
|
|
63
|
-
console.log('componentWillUpdate!');
|
|
64
|
-
this.addIntersectionObserver();
|
|
65
|
-
this.setResponsiveBg();
|
|
66
|
-
}
|
|
67
|
-
//responsive image
|
|
68
|
-
setResponsiveBg() {
|
|
69
|
-
// Define local variables
|
|
70
|
-
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
71
|
-
console.log('current breakpoint: ' + currentBreakpoint);
|
|
72
|
-
// Loop through all target elements
|
|
73
|
-
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
74
|
-
// Set current variables
|
|
75
|
-
el = backgrounds[i];
|
|
76
|
-
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
77
|
-
// If the data attribute exists, set the background
|
|
78
|
-
if (elData !== null) {
|
|
79
|
-
el.style.backgroundImage = "url('" + elData + "')";
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
if (typeof console == 'object') {
|
|
83
|
-
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
//lazy loading
|
|
89
|
-
addIntersectionObserver() {
|
|
90
|
-
if (!this.imgUrl) {
|
|
91
|
-
console.log('no image!');
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
if ('IntersectionObserver' in window) {
|
|
95
|
-
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
96
|
-
let bgObserver = new IntersectionObserver(entries => {
|
|
97
|
-
entries.forEach(entry => {
|
|
98
|
-
if (entry.isIntersecting) {
|
|
99
|
-
const image = entry.target;
|
|
100
|
-
image.classList.remove('lazy-bg');
|
|
101
|
-
console.log('loaded');
|
|
102
|
-
bgObserver.unobserve(image);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
lazyLoadBgs.forEach(image => {
|
|
107
|
-
bgObserver.observe(image);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
getCssClassMap() {
|
|
112
|
-
return {
|
|
113
|
-
[this.imageType]: true,
|
|
114
|
-
'ptc-img': true,
|
|
115
|
-
[this.borderRadius]: true,
|
|
116
|
-
[this.loadMode]: true,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
getCurrentBreakPoints() {
|
|
120
|
-
// Define local variables
|
|
121
|
-
let doc = window.document, temp = doc.createElement('div'), env;
|
|
122
|
-
// Append test node
|
|
123
|
-
doc.body.appendChild(temp);
|
|
124
|
-
// Loop through breakpoints
|
|
125
|
-
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
126
|
-
env = ResponsiveBgVariables.envs[i];
|
|
127
|
-
// Add classes
|
|
128
|
-
temp.className = 'hidden-' + env;
|
|
129
|
-
// Found breakpoint
|
|
130
|
-
if (temp.offsetParent === null) {
|
|
131
|
-
// Remove our test node
|
|
132
|
-
doc.body.removeChild(temp);
|
|
133
|
-
console.log('remove test node');
|
|
134
|
-
// Return current breakpoint
|
|
135
|
-
return env;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
// Breakpoint not found, try fallback
|
|
139
|
-
doc.body.removeChild(temp);
|
|
140
|
-
return this.getFallbackBreakpoint();
|
|
141
|
-
}
|
|
142
|
-
getFallbackBreakpoint() {
|
|
143
|
-
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
144
|
-
return 'lg';
|
|
145
|
-
}
|
|
146
|
-
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
147
|
-
return 'md';
|
|
148
|
-
}
|
|
149
|
-
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
150
|
-
return 'sm';
|
|
151
|
-
}
|
|
152
|
-
else if (window.matchMedia('(min-width: 575.5px)').matches) {
|
|
153
|
-
return 'xs';
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
return 'Unknown breakpoint';
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
get el() { return index.getElement(this); }
|
|
160
|
-
};
|
|
161
|
-
PtcImg.style = ptcImgCss;
|
|
162
|
-
|
|
163
|
-
exports.ptc_img = PtcImg;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcLinkCss = ".disabled{pointer-events:none;cursor:default;text-decoration:none}.ptc-link{display:inline-block;color:var(--color-primary-uigrey);font-weight:var(--ptc-font-weight-black);position:relative;line-height:var(--ptc-line-height-normal);margin-bottom:var(--ptc-element-spacing-01);outline:none;text-decoration:none}.simple::after{content:\"\";position:absolute;width:100%;left:0px;bottom:2px;transition:opacity var(--ptc-transition-fast) var(--ptc-standard-ease);border-bottom:2px solid var(--color-primary-green);opacity:0}.simple:hover.simple::after{opacity:1}.arrow{margin-right:var(--ptc-element-spacing-01)}.arrow::after{position:absolute;display:block;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-primary-green);bottom:1px;transition:width var(--ptc-transition-fast) var(--ptc-standard-ease)}.arrow:hover.arrow::after{width:100%}.uppercase{text-transform:uppercase}.small{font-size:var(--ptc-font-size-small)}.medium{font-size:var(--ptc-font-size-medium)}.large{font-size:var(--ptc-font-size-large)}icon-asset{position:absolute;right:-25px;transition:transform var(--ptc-transition-fast) var(--ptc-standard-ease)}icon-asset svg{fill:var(--color-primary-green) !important}.ptc-link:hover.arrow icon-asset{transform:translateX(var(--ptc-element-spacing-04))}.nav-title{font-size:17px;line-height:var(--ptc-line-height-dense);letter-spacing:var(--ptc-element-spacing-01);color:#cac8c8;text-shadow:1px 1px 2px rgba(0, 0, 0, 0.8);font-weight:var(--ptc-font-weight-semibold)}.primary-nav-link{display:inline-block;position:relative;font-size:var(--ptc-font-size-small);line-height:var(--ptc-line-height-normal);font-weight:var(--ptc-font-weight-bold);color:var(--color-white);transition:color var(--ptc-transition-slow) ease;padding:var(--ptc-element-spacing-04) 50px;background-color:transparent;text-decoration:none;outline:none}.primary-nav-link:hover{color:var(--color-secondary-turtlegreen);text-decoration:none;outline:none;background-color:transparent}.nav-title-link{font-family:var(--ptc-font-secondary-latin);font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:1.56;color:var(--color-white);text-decoration:none;outline:none;background-color:transparent;transition:color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent}.nav-title-link:hover{color:var(--color-white);border-bottom:1.5px solid var(--color-secondary-turtlegreen)}.secondary-nav-link{display:inline-block;position:relative;font-size:var(--ptc-font-size-x-small);line-height:20px;font-weight:var(--ptc-font-weight-light);color:var(--color-white);transition:color var(--ptc-transition-slow) ease;padding:10px 15px;background-color:transparent;text-decoration:none;outline:none}.secondary-nav-link:hover{color:var(--color-secondary-turtlegreen);text-decoration:none;outline:none;background-color:transparent}.footer-nav-link{color:var(--color-white);transition:border var(--ptc-transition-medium) var(--ptc-standard-ease), color var(--ptc-transition-medium) var(--ptc-standard-ease);border-bottom:1px solid transparent;outline:none;text-decoration:none;font-weight:var(--ptc-font-weight-semibold);line-height:1.73;letter-spacing:1.13px;text-align:left;font-size:15px}.footer-nav-link:hover{outline:none;text-decoration:none;border-bottom:0.1rem solid var(--color-secondary-turtlegreen);color:var(--color-secondary-turtlegreen)}.copyright-link{color:var(--color-white);font-size:13px;font-weight:var(--ptc-font-weight-normal);line-height:2;display:inline-block}";
|
|
8
|
-
|
|
9
|
-
const PtcLink = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Disabled link
|
|
14
|
-
*/
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
/**
|
|
17
|
-
* Rxternal link
|
|
18
|
-
* */
|
|
19
|
-
this.external = false;
|
|
20
|
-
/**
|
|
21
|
-
* Target
|
|
22
|
-
*/
|
|
23
|
-
this.target = '_self';
|
|
24
|
-
/**
|
|
25
|
-
* Theme
|
|
26
|
-
*/
|
|
27
|
-
this.theme = 'simple';
|
|
28
|
-
/**
|
|
29
|
-
* Uppercase
|
|
30
|
-
*/
|
|
31
|
-
this.uppercase = false;
|
|
32
|
-
/**
|
|
33
|
-
* Font Size
|
|
34
|
-
*/
|
|
35
|
-
this.fontSize = 'medium';
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
const classMap = this.getCssClassMap();
|
|
39
|
-
return (index.h(index.Host, null, index.h("a", { class: classMap, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle }, this.theme == 'arrow' ? index.h("icon-asset", { type: "solid", size: "small", name: "arrow-right" }) : '', index.h("slot", null))));
|
|
40
|
-
}
|
|
41
|
-
getCssClassMap() {
|
|
42
|
-
return {
|
|
43
|
-
['ptc-link']: true,
|
|
44
|
-
[this.theme]: true,
|
|
45
|
-
['uppercase']: this.uppercase,
|
|
46
|
-
['disabled']: this.disabled,
|
|
47
|
-
[this.fontSize]: true,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
PtcLink.style = ptcLinkCss;
|
|
52
|
-
|
|
53
|
-
exports.ptc_link = PtcLink;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcListCss = "ptc-list .link-primary li{font-size:var(--ptc-font-size-medium);line-height:var(--ptc-line-height-normal);letter-spacing:var(--ptc-letter-spacing-normal);list-style:none}ptc-list .link-primary li:not(:last-child){margin-bottom:0.625rem}ptc-list .link-primary li a{color:var(--color-white);outline:none;text-decoration:none;font-family:Rajdhani;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-normal);text-transform:uppercase;letter-spacing:var(--ptc-letter-spacing-normal)}ptc-list .link-primary li a:hover{color:var(--color-white);border-bottom:1.5px solid var(--color-primary-green)}";
|
|
8
|
-
|
|
9
|
-
const PtcList = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.listType = 'para-list';
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const classMap = this.getCssClassMap();
|
|
16
|
-
const listItems = this.listItems;
|
|
17
|
-
if (!listItems || listItems.length === 0) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
return (index.h(index.Host, { class: classMap }, index.h("ul", null, listItems.map(listItem => {
|
|
21
|
-
index.h("li", null, "$", listItem);
|
|
22
|
-
}))));
|
|
23
|
-
}
|
|
24
|
-
getCssClassMap() {
|
|
25
|
-
return {
|
|
26
|
-
[this.listType]: true,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
PtcList.style = ptcListCss;
|
|
31
|
-
|
|
32
|
-
exports.ptc_list = PtcList;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcLottieCss = ":host{display:block;width:100%;height:auto}";
|
|
8
|
-
|
|
9
|
-
const PtcLottie = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Animation speed
|
|
14
|
-
*/
|
|
15
|
-
this.speed = 1;
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return (index.h("lottie-player", { autoplay: true, loop: true, src: this.jsonSrc, speed: this.speed }));
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
PtcLottie.style = ptcLottieCss;
|
|
22
|
-
|
|
23
|
-
exports.ptc_lottie = PtcLottie;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ac192914.js');
|
|
6
|
-
|
|
7
|
-
const ptcNavItemCss = ":host{display:block;width:100%}@media screen and (min-width: 992px){:host{width:auto}}:host([depth=\"2\"]) a{font-family:var(--ptc-font-secondary-latin);font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);letter-spacing:var(--ptc-letter-spacing-dense);margin-bottom:var(--ptc-element-spacing-03);padding-left:50px}@media screen and (min-width: 992px){:host([depth=\"2\"]) a{padding-left:0px}}:host([depth=\"1\"]) a{font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);letter-spacing:var(--ptc-letter-spacing-dense);padding:20px 25px}:host([nav-type=secondary-nav]) a{font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-thin)}:host([nav-type=language-nav]) a{font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-thin)}@media only screen and (min-width: 992px){.primary-nav~.ptc-nav-children{position:absolute;left:0}.primary-nav~.ptc-nav-children ::slotted(.nav-tab){background-color:#1c2126;display:flex;width:100vw}.language-nav~.ptc-nav-children{position:absolute;background-color:#1c2126}}a[aria-expanded=true]~.ptc-nav-children{padding-top:var(--ptc-element-spacing-04);max-height:2000px}@media screen and (min-width: 992px){a[aria-expanded=true]~.ptc-nav-children{padding-top:0}}.ptc-nav-children{overflow:hidden;max-height:0;transition:max-height 0.25s ease-in-out, padding-top 0.25s ease-in-out}a{color:var(--color-white);text-transform:uppercase;display:block;outline:none;text-decoration:none}";
|
|
8
|
-
|
|
9
|
-
const PtcNavItem = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.menuItemToggled = index.createEvent(this, "menuItemToggled", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Link URL
|
|
15
|
-
*/
|
|
16
|
-
this.url = undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Nav Description
|
|
19
|
-
*/
|
|
20
|
-
this.label = '';
|
|
21
|
-
/**
|
|
22
|
-
* If the current nav item is expanded
|
|
23
|
-
*/
|
|
24
|
-
this.ariaExpanded = false;
|
|
25
|
-
/**
|
|
26
|
-
* Depth of the current nav item
|
|
27
|
-
*/
|
|
28
|
-
this.depth = 0;
|
|
29
|
-
/**
|
|
30
|
-
* If the current nav item has children nav items
|
|
31
|
-
*/
|
|
32
|
-
this.hasChildren = false;
|
|
33
|
-
/**
|
|
34
|
-
* If the parent nav item of the current one is expanded
|
|
35
|
-
*/
|
|
36
|
-
this.parentExpanded = false;
|
|
37
|
-
/**
|
|
38
|
-
* Nav Item Type
|
|
39
|
-
*/
|
|
40
|
-
this.navType = undefined;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Watch
|
|
44
|
-
*/
|
|
45
|
-
expandedHandler(newValue) {
|
|
46
|
-
const children = Array.prototype.slice.call(this.el.children);
|
|
47
|
-
children.forEach(child => {
|
|
48
|
-
child.parentExpanded = newValue;
|
|
49
|
-
});
|
|
50
|
-
this.menuItemToggled.emit({ expanded: this.ariaExpanded });
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Event Listener
|
|
54
|
-
*/
|
|
55
|
-
handleClick(e) {
|
|
56
|
-
if (this.hasChildren) {
|
|
57
|
-
e.preventDefault();
|
|
58
|
-
this.ariaExpanded = !this.ariaExpanded;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
handleResize(ev) {
|
|
62
|
-
console.log('the body was scrolled', ev);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Lifecycle method
|
|
66
|
-
*/
|
|
67
|
-
componentWillRender() {
|
|
68
|
-
this.hasChildren = !!this.el.hasChildNodes();
|
|
69
|
-
let parentMenu = this.el.closest('ptc-nav-item');
|
|
70
|
-
let nextParentMenu;
|
|
71
|
-
this.depth = 0;
|
|
72
|
-
while (parentMenu) {
|
|
73
|
-
nextParentMenu = parentMenu.parentElement.closest('ptc-nav-item');
|
|
74
|
-
if (nextParentMenu === parentMenu) {
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
parentMenu = nextParentMenu;
|
|
79
|
-
this.depth = this.depth + 1;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
render() {
|
|
84
|
-
//const leftIndent = this.depth > 1 ? 25 * this.depth + 'px' : '25px';
|
|
85
|
-
return (index.h(index.Host, { role: "none" }, index.h("a", { role: "menuitem", href: this.url, tabIndex: this.parentExpanded || this.depth === 1 ? 0 : -1, "aria-depth": this.depth, "aria-haspopup": this.hasChildren.toString(), "aria-expanded": this.hasChildren ? this.ariaExpanded.toString() : this.ariaExpanded, onClick: e => this.handleClick(e), class: this.navType }, index.h("span", null, this.label)), this.hasChildren && (index.h("div", { class: "ptc-nav-children", role: "menu", part: this.navType, "aria-label": this.label }, index.h("slot", null)))));
|
|
86
|
-
}
|
|
87
|
-
get el() { return index.getElement(this); }
|
|
88
|
-
static get watchers() { return {
|
|
89
|
-
"ariaExpanded": ["expandedHandler"]
|
|
90
|
-
}; }
|
|
91
|
-
};
|
|
92
|
-
PtcNavItem.style = ptcNavItemCss;
|
|
93
|
-
|
|
94
|
-
exports.ptc_nav_item = PtcNavItem;
|