@ptcwebops/ptcw-design 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/icon-asset_16.cjs.entry.js +812 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{ptc-announcement_2.cjs.entry.js → ptc-announcement.cjs.entry.js} +0 -25
- package/dist/cjs/ptc-list.cjs.entry.js +2 -3
- package/dist/cjs/ptc-svg-btn.cjs.entry.js +31 -0
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +5 -0
- package/dist/collection/components/icon-asset/media/designer.svg +33 -0
- package/dist/collection/components/list-item/list-item.css +39 -1
- package/dist/collection/components/list-item/list-item.js +26 -5
- package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.css +19 -0
- package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.js +21 -0
- package/dist/collection/components/ptc-button/ptc-button.css +12 -1
- package/dist/collection/components/ptc-button/ptc-button.js +29 -7
- package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.css +12 -0
- package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.js +41 -0
- package/dist/collection/components/ptc-card-content/ptc-card-content.css +61 -0
- package/dist/collection/components/ptc-card-content/ptc-card-content.js +81 -0
- package/dist/collection/components/ptc-card-plm/ptc-card-plm.css +19 -0
- package/dist/collection/components/ptc-card-plm/ptc-card-plm.js +97 -0
- package/dist/collection/components/ptc-hero/ptc-hero.css +13 -0
- package/dist/collection/components/ptc-hero/ptc-hero.js +43 -0
- package/dist/collection/components/ptc-img/ptc-img.js +6 -1
- package/dist/collection/components/ptc-link/ptc-link.css +25 -3
- package/dist/collection/components/ptc-link/ptc-link.js +3 -2
- package/dist/collection/components/ptc-list/ptc-list.css +8 -4
- package/dist/collection/components/ptc-list/ptc-list.js +5 -8
- package/dist/collection/components/ptc-overlay/ptc-overlay.css +81 -0
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +88 -3
- package/dist/collection/components/ptc-para/ptc-para.css +59 -0
- package/dist/collection/components/ptc-para/ptc-para.js +53 -7
- package/dist/collection/components/ptc-picture/ptc-picture.css +28 -1
- package/dist/collection/components/ptc-picture/ptc-picture.js +27 -9
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +11 -0
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +2 -2
- package/dist/collection/components/ptc-span/ptc-span.css +26 -1
- package/dist/collection/components/ptc-span/ptc-span.js +6 -3
- package/dist/collection/components/ptc-title/ptc-title.css +108 -11
- package/dist/collection/components/ptc-title/ptc-title.js +62 -4
- package/dist/custom-elements/index.d.ts +30 -0
- package/dist/custom-elements/index.js +199 -35
- package/dist/esm/icon-asset_16.entry.js +793 -0
- package/dist/esm/{index-eb8ce23d.js → index-6ce5b664.js} +1 -1
- 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-announcement_2.entry.js → ptc-announcement.entry.js} +2 -26
- package/dist/esm/ptc-avatar.entry.js +1 -1
- package/dist/esm/ptc-card.entry.js +1 -1
- package/dist/esm/ptc-countdown.entry.js +1 -1
- package/dist/esm/ptc-date.entry.js +1 -1
- package/dist/esm/ptc-footer.entry.js +1 -1
- package/dist/esm/ptc-form.entry.js +1 -1
- package/dist/esm/ptc-input.entry.js +1 -1
- package/dist/esm/ptc-list.entry.js +3 -4
- package/dist/esm/ptc-lottie.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-select.entry.js +1 -1
- package/dist/esm/ptc-svg-btn.entry.js +27 -0
- package/dist/esm/ptcw-design.js +2 -2
- package/dist/ptcw-design/media/designer.svg +33 -0
- package/dist/ptcw-design/{p-63b55aba.entry.js → p-281824f5.entry.js} +1 -1
- package/dist/ptcw-design/p-31b2af1d.entry.js +1 -0
- package/dist/ptcw-design/{p-f94c4594.entry.js → p-3437fbce.entry.js} +1 -1
- package/dist/ptcw-design/{p-e8650244.entry.js → p-542939d4.entry.js} +1 -1
- package/dist/ptcw-design/{p-ef6acb81.entry.js → p-5c78913c.entry.js} +1 -1
- package/dist/ptcw-design/{p-3f42afb6.entry.js → p-5eb74dc3.entry.js} +1 -1
- package/dist/ptcw-design/p-609dec21.entry.js +1 -0
- package/dist/ptcw-design/{p-1b3b0193.entry.js → p-6ff80c95.entry.js} +1 -1
- package/dist/ptcw-design/p-8bbb4277.entry.js +1 -0
- package/dist/ptcw-design/p-9a35c9e2.entry.js +1 -0
- package/dist/ptcw-design/{p-22fd400f.entry.js → p-aafe51df.entry.js} +1 -1
- package/dist/ptcw-design/{p-75dc7328.entry.js → p-ac57feca.entry.js} +1 -1
- package/dist/ptcw-design/{p-2ca3c085.js → p-b1afaef3.js} +1 -1
- package/dist/ptcw-design/p-b85eda19.entry.js +1 -0
- package/dist/ptcw-design/p-bac826ad.entry.js +1 -0
- package/dist/ptcw-design/{p-e4b96b46.entry.js → p-da7ee0ba.entry.js} +1 -1
- package/dist/ptcw-design/{p-32ef3a79.entry.js → p-e2492128.entry.js} +1 -1
- package/dist/ptcw-design/p-e266fc0b.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +2 -2
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/list-item/list-item.d.ts +2 -1
- package/dist/types/components/ptc-breadcrumb/ptc-breadcrumb.d.ts +4 -0
- package/dist/types/components/ptc-button/ptc-button.d.ts +7 -3
- package/dist/types/components/ptc-card-bottom/ptc-card-bottom.d.ts +5 -0
- package/dist/types/components/ptc-card-content/ptc-card-content.d.ts +11 -0
- package/dist/types/components/ptc-card-plm/ptc-card-plm.d.ts +8 -0
- package/dist/types/components/ptc-hero/ptc-hero.d.ts +5 -0
- package/dist/types/components/ptc-img/ptc-img.d.ts +3 -0
- package/dist/types/components/ptc-link/ptc-link.d.ts +1 -1
- package/dist/types/components/ptc-list/ptc-list.d.ts +1 -1
- package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +17 -0
- package/dist/types/components/ptc-para/ptc-para.d.ts +11 -3
- package/dist/types/components/ptc-picture/ptc-picture.d.ts +5 -1
- package/dist/types/components/ptc-spacer/ptc-spacer.d.ts +1 -1
- package/dist/types/components/ptc-span/ptc-span.d.ts +4 -1
- package/dist/types/components/ptc-title/ptc-title.d.ts +14 -2
- package/dist/types/components.d.ts +229 -28
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/icon-asset.cjs.entry.js +0 -64
- package/dist/cjs/interfaces-0ecd8027.js +0 -15
- package/dist/cjs/list-item.cjs.entry.js +0 -27
- package/dist/cjs/ptc-button.cjs.entry.js +0 -72
- package/dist/cjs/ptc-img.cjs.entry.js +0 -155
- package/dist/cjs/ptc-link.cjs.entry.js +0 -53
- 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 -159
- 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/esm/icon-asset.entry.js +0 -60
- package/dist/esm/interfaces-3cb94654.js +0 -12
- package/dist/esm/list-item.entry.js +0 -23
- package/dist/esm/ptc-button.entry.js +0 -68
- package/dist/esm/ptc-img.entry.js +0 -151
- package/dist/esm/ptc-link.entry.js +0 -49
- package/dist/esm/ptc-overlay.entry.js +0 -15
- package/dist/esm/ptc-para.entry.js +0 -36
- package/dist/esm/ptc-picture.entry.js +0 -155
- package/dist/esm/ptc-spacer.entry.js +0 -42
- package/dist/esm/ptc-span.entry.js +0 -27
- package/dist/esm/ptc-title.entry.js +0 -45
- package/dist/ptcw-design/p-01f4bf71.entry.js +0 -1
- package/dist/ptcw-design/p-08827128.entry.js +0 -1
- package/dist/ptcw-design/p-1bf9750d.entry.js +0 -1
- package/dist/ptcw-design/p-23d07898.entry.js +0 -1
- package/dist/ptcw-design/p-240733ce.js +0 -1
- package/dist/ptcw-design/p-29c54eb0.entry.js +0 -1
- package/dist/ptcw-design/p-2b59ce7a.entry.js +0 -1
- package/dist/ptcw-design/p-389a5670.entry.js +0 -1
- package/dist/ptcw-design/p-51443fbb.entry.js +0 -1
- package/dist/ptcw-design/p-54794e45.entry.js +0 -1
- package/dist/ptcw-design/p-5ae43421.entry.js +0 -1
- package/dist/ptcw-design/p-6b5c0d9d.entry.js +0 -1
- package/dist/ptcw-design/p-7076b32f.entry.js +0 -1
- package/dist/ptcw-design/p-a86452af.entry.js +0 -1
- package/dist/ptcw-design/p-d3f9852f.entry.js +0 -1
- package/dist/ptcw-design/p-d80b24c9.entry.js +0 -1
- package/dist/ptcw-design/p-fd29d9dd.entry.js +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
|
|
7
|
-
const listItemCss = ":host{display:block}";
|
|
8
|
-
|
|
9
|
-
let ListItem = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.listType = 'para-list';
|
|
13
|
-
this.linkHref = undefined;
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
const classMap = this.getCssClassMap();
|
|
17
|
-
return (index.h(index.Host, { class: classMap }, index.h("li", null, this.linkHref ? (index.h("a", Object.assign({}, (this.linkHref ? { href: this.linkHref } : {})), index.h("slot", null))) : (index.h("slot", null)))));
|
|
18
|
-
}
|
|
19
|
-
getCssClassMap() {
|
|
20
|
-
return {
|
|
21
|
-
[this.listType]: true,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
ListItem.style = listItemCss;
|
|
26
|
-
|
|
27
|
-
exports.list_item = ListItem;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.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 ::slotted([slot=slot-after-text]),button.animation-right ::slotted([slot=slot-before-text]),button.animation-down ::slotted([slot=slot-after-text]),button.animation-down ::slotted([slot=slot-before-text]){transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);position:relative;display:inline-block}button:hover.animation-right ::slotted([slot=slot-after-text]),button:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}button:hover.animation-down ::slotted([slot=slot-after-text]),button:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}button span{font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-small);font-weight:bold;line-height:0.86}.icon-left ::slotted([slot=slot-before-text]){margin-right:var(--ptc-element-spacing-01)}.icon-right ::slotted([slot=slot-after-text]){margin-left:var(--ptc-element-spacing-01)}.blackgrey{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-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)}.legacy-green{margin-left:10px;padding:10px 20px;margin-bottom:4px;margin-top:4px;box-shadow:0 0 25.8px 3.2px rgba(0, 0, 0, 0.5);border:solid 2.5px var(--color-secondary-tutlegreen-dark);background-image:linear-gradient(to right, var(--color-secondary-turtlegreen), var(--color-secondary-tutlegreen-dark))}.legacy-green:after{position:absolute;content:\"\";top:-1px;left:0;bottom:0;right:0;width:100%;height:103%;background-image:linear-gradient(to right, var(--color-secondary-tutlegreen-dark), var(--color-secondary-turtlegreen));opacity:0;transition:opacity 0.6s cubic-bezier(0, 0, 0.23, 1);border-radius:2px}.legacy-green:hover{box-shadow:0 0 49px 6.1px rgba(0, 0, 0, 0.55)}.legacy-green:hover span{color:var(--color-white)}.legacy-green:hover:after{opacity:1}.legacy-green span{font-family:var(--ptc-font-secondary-latin);color:var(--color-white);z-index:100;position:relative;text-transform:uppercase;font-weight:var(--ptc-font-weight-bold);letter-spacing:var(--ptc-letter-spacing-normal);font-size:var(--ptc-font-size-medium)}@media screen and (min-width: 768px){.legacy-green span{font-size:19px;letter-spacing:var(--ptc-letter-spacing-loose)}}.legacy-green icon-asset{display:inline}a{border-style:solid;border-width:1px;position:relative;text-decoration:none;padding:9.4px 17.5px;border-radius:3px;text-decoration:none;display:inline-block;position:relative}a.animation-right ::slotted([slot=slot-after-text]),a.animation-right ::slotted([slot=slot-before-text]),a.animation-down ::slotted([slot=slot-after-text]),a.animation-down ::slotted([slot=slot-before-text]){transition:all ease-out 0.25s;position:relative;display:inline-block;margin-left:5px}a:hover.animation-right ::slotted([slot=slot-after-text]),a:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}a:hover.animation-down ::slotted([slot=slot-after-text]),a:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}.nav{font-family:var(--ptc-font-latin);background-color:#323b42;border-radius:var(--ptc-border-radius-medium);border:1px solid var(--color-white);border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:13px;font-stretch:100%;font-weight:var(--ptc-font-weight-bold);line-height:26px;list-style:none;padding:3px var(--ptc-element-spacing-04);position:relative;text-align:center;text-decoration:none;transition:background-color var(--ptc-transition-medium) var(--ptc-decelerated-ease)}.nav:focus{outline:3px solid #0092d1;outline-offset:2px}.nav:hover{background-color:#20262a}.ptc-primary,.ptc-quaternary,.ptc-secondary,.ptc-tertiary{padding:var(--ptc-font-size-small) var(--ptc-font-size-large);transition:background-color var(--ptc-standard-ease) var(--ptc-transition-medium);line-height:20px}.ptc-primary.disabled,.ptc-quaternary.disabled,.ptc-secondary.disabled,.ptc-tertiary.disabled{pointer-events:none;border-color:#a8aaaf;background:#e1e2e4}.ptc-primary.disabled span,.ptc-quaternary.disabled span,.ptc-secondary.disabled span,.ptc-tertiary.disabled span{color:#a8aaaf}.ptc-primary.disabled ::slotted([slot=slot-after-text]),.ptc-quaternary.disabled ::slotted([slot=slot-after-text]),.ptc-secondary.disabled ::slotted([slot=slot-after-text]),.ptc-tertiary.disabled ::slotted([slot=slot-after-text]){fill:#a8aaaf !important}.ptc-primary:focus,.ptc-quaternary:focus,.ptc-secondary:focus,.ptc-tertiary:focus{outline:3px solid #0092d1;outline-offset:2px}.ptc-primary span,.ptc-quaternary span,.ptc-secondary span,.ptc-tertiary span{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-bold);font-size:17px;line-height:20px;letter-spacing:normal}.ptc-primary{background:#1f2024;border:2px solid #5bb73a;border-radius:var(--ptc-border-radius-medium)}.ptc-primary:hover{background-color:#33353a}.ptc-primary:active{background-color:var(--color-black)}.ptc-primary span{color:var(--color-white)}.ptc-primary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-secondary{background:#1f2024;border:2px solid #6d707b;border-radius:var(--ptc-border-radius-medium)}.ptc-secondary:hover{background-color:#33353a}.ptc-secondary:active{background-color:var(--color-black)}.ptc-secondary span{color:var(--color-white)}.ptc-secondary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-tertiary{background:var(--color-white);border:2px solid var(--color-primary-grey);border-radius:var(--ptc-border-radius-medium)}.ptc-tertiary:hover{background-color:#e1e2e4}.ptc-tertiary:active{background-color:#c5c5ca}.ptc-tertiary span{color:var(--color-primary-grey)}.ptc-tertiary ::slotted([slot=slot-after-text]){fill:var(--color-primary-grey) !important}.ptc-quaternary{background:#158542;border:2px solid #459e67;border-radius:var(--ptc-border-radius-medium)}.ptc-quaternary:hover{background-color:#17713a}.ptc-quaternary:active{background-color:#186135}.ptc-quaternary span{color:var(--color-white)}.ptc-quaternary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}";
|
|
8
|
-
|
|
9
|
-
let PtcButton = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.clickEvent = index.createEvent(this, "clickEvent", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Disabled button
|
|
15
|
-
*/
|
|
16
|
-
this.disabled = false;
|
|
17
|
-
/**
|
|
18
|
-
* Button type
|
|
19
|
-
*/
|
|
20
|
-
this.type = 'button';
|
|
21
|
-
/**
|
|
22
|
-
* Button theme color
|
|
23
|
-
*/
|
|
24
|
-
this.color = 'ptc-primary';
|
|
25
|
-
/**
|
|
26
|
-
* Icon Animation
|
|
27
|
-
*/
|
|
28
|
-
this.iconAnimation = '';
|
|
29
|
-
/**
|
|
30
|
-
* Icon Position
|
|
31
|
-
*/
|
|
32
|
-
this.iconPosition = 'icon-right';
|
|
33
|
-
/**
|
|
34
|
-
* Link URL (Optional)
|
|
35
|
-
*/
|
|
36
|
-
this.linkHref = undefined;
|
|
37
|
-
/**
|
|
38
|
-
* (optional) Link target
|
|
39
|
-
* */
|
|
40
|
-
this.target = '_self';
|
|
41
|
-
/**
|
|
42
|
-
* (optional) Link rel
|
|
43
|
-
* */
|
|
44
|
-
this.rel = undefined;
|
|
45
|
-
/**
|
|
46
|
-
* (optional) tab-nav.
|
|
47
|
-
* indicates that its element can be focused, and where it participates in sequential keyboard navigation.
|
|
48
|
-
* A negative value (usually tabindex="-1") means that the element is not reachable via sequential keyboard navigation
|
|
49
|
-
*/
|
|
50
|
-
this.tabNav = 0;
|
|
51
|
-
}
|
|
52
|
-
clickEventHandler() {
|
|
53
|
-
this.clickEvent.emit();
|
|
54
|
-
//console.log('click!');
|
|
55
|
-
}
|
|
56
|
-
render() {
|
|
57
|
-
const classMap = this.getCssClassMap();
|
|
58
|
-
const Tag = !!this.linkHref ? 'a' : 'button';
|
|
59
|
-
return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h(Tag, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref ? { target: this.target } : {}), (!!this.rel && !!this.linkHref ? { rel: this.rel } : {}), (!!this.tabNav ? { tabindex: -1 } : { tabindex: 0 })), index.h("span", null, index.h("slot", { name: "slot-before-text" }), index.h("slot", null), index.h("slot", { name: "slot-after-text" })))));
|
|
60
|
-
}
|
|
61
|
-
getCssClassMap() {
|
|
62
|
-
return {
|
|
63
|
-
[this.color]: true,
|
|
64
|
-
[this.iconAnimation]: true,
|
|
65
|
-
[this.iconPosition]: true,
|
|
66
|
-
['disabled']: this.disabled ? true : false,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
PtcButton.style = ptcButtonCss;
|
|
71
|
-
|
|
72
|
-
exports.ptc_button = PtcButton;
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
const interfaces = require('./interfaces-0ecd8027.js');
|
|
7
|
-
|
|
8
|
-
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}}";
|
|
9
|
-
|
|
10
|
-
let PtcImg = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
/**
|
|
14
|
-
* Image size for smallest screen
|
|
15
|
-
* <=767px
|
|
16
|
-
*/
|
|
17
|
-
this.sizeXs = '510x340';
|
|
18
|
-
/**
|
|
19
|
-
* Image size for small screen
|
|
20
|
-
* >=768px and <=991px
|
|
21
|
-
*/
|
|
22
|
-
this.sizeSm = '1240x496';
|
|
23
|
-
/**
|
|
24
|
-
* Image size for medium screen
|
|
25
|
-
* >=992px and <=1199px
|
|
26
|
-
*/
|
|
27
|
-
this.sizeMd = '1366x500';
|
|
28
|
-
/**
|
|
29
|
-
* Image solution for large screen
|
|
30
|
-
* >=1200px
|
|
31
|
-
*/
|
|
32
|
-
this.sizeLg = '1920x1080';
|
|
33
|
-
/**
|
|
34
|
-
* Image type
|
|
35
|
-
*/
|
|
36
|
-
this.imageType = 'smart-bg';
|
|
37
|
-
/**
|
|
38
|
-
* Image border shape
|
|
39
|
-
*/
|
|
40
|
-
this.borderRadius = '';
|
|
41
|
-
/**
|
|
42
|
-
* Lazy loading option
|
|
43
|
-
*/
|
|
44
|
-
this.loadMode = 'lazy-bg';
|
|
45
|
-
}
|
|
46
|
-
WindowResize() {
|
|
47
|
-
this.setResponsiveBg();
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
const classMap = this.getCssClassMap();
|
|
51
|
-
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}` })));
|
|
52
|
-
}
|
|
53
|
-
componentDidLoad() {
|
|
54
|
-
this.addIntersectionObserver();
|
|
55
|
-
this.setResponsiveBg();
|
|
56
|
-
}
|
|
57
|
-
componentWillUpdate() {
|
|
58
|
-
// console.log('componentWillUpdate!');
|
|
59
|
-
this.addIntersectionObserver();
|
|
60
|
-
this.setResponsiveBg();
|
|
61
|
-
}
|
|
62
|
-
//responsive image
|
|
63
|
-
setResponsiveBg() {
|
|
64
|
-
// Define local variables
|
|
65
|
-
let backgrounds = (this.el || document).querySelectorAll(interfaces.ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
66
|
-
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
67
|
-
// Loop through all target elements
|
|
68
|
-
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
69
|
-
// Set current variables
|
|
70
|
-
el = backgrounds[i];
|
|
71
|
-
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
72
|
-
// If the data attribute exists, set the background
|
|
73
|
-
if (elData !== null) {
|
|
74
|
-
el.style.backgroundImage = "url('" + elData + "')";
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
if (typeof console == 'object') {
|
|
78
|
-
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
//lazy loading
|
|
84
|
-
addIntersectionObserver() {
|
|
85
|
-
if (!this.imgUrl) {
|
|
86
|
-
console.log('no image!');
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if ('IntersectionObserver' in window) {
|
|
90
|
-
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
91
|
-
let bgObserver = new IntersectionObserver(entries => {
|
|
92
|
-
entries.forEach(entry => {
|
|
93
|
-
if (entry.isIntersecting) {
|
|
94
|
-
const image = entry.target;
|
|
95
|
-
image.classList.remove('lazy-bg');
|
|
96
|
-
// console.log('loaded');
|
|
97
|
-
bgObserver.unobserve(image);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
lazyLoadBgs.forEach(image => {
|
|
102
|
-
bgObserver.observe(image);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
getCssClassMap() {
|
|
107
|
-
return {
|
|
108
|
-
[this.imageType]: true,
|
|
109
|
-
'ptc-img': true,
|
|
110
|
-
[this.borderRadius]: true,
|
|
111
|
-
[this.loadMode]: true,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
getCurrentBreakPoints() {
|
|
115
|
-
// Define local variables
|
|
116
|
-
let doc = window.document, temp = doc.createElement('div'), env;
|
|
117
|
-
// Append test node
|
|
118
|
-
doc.body.appendChild(temp);
|
|
119
|
-
// Loop through breakpoints
|
|
120
|
-
for (let i = interfaces.ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
121
|
-
env = interfaces.ResponsiveBgVariables.envs[i];
|
|
122
|
-
// Add classes
|
|
123
|
-
temp.className = 'hidden-' + env;
|
|
124
|
-
// Found breakpoint
|
|
125
|
-
if (temp.offsetParent === null) {
|
|
126
|
-
// Remove our test node
|
|
127
|
-
doc.body.removeChild(temp);
|
|
128
|
-
console.log('remove test node');
|
|
129
|
-
// Return current breakpoint
|
|
130
|
-
return env;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Breakpoint not found, try fallback
|
|
134
|
-
doc.body.removeChild(temp);
|
|
135
|
-
return this.getFallbackBreakpoint();
|
|
136
|
-
}
|
|
137
|
-
getFallbackBreakpoint() {
|
|
138
|
-
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
139
|
-
return 'lg';
|
|
140
|
-
}
|
|
141
|
-
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
142
|
-
return 'md';
|
|
143
|
-
}
|
|
144
|
-
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
145
|
-
return 'sm';
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
return 'xs';
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
get el() { return index.getElement(this); }
|
|
152
|
-
};
|
|
153
|
-
PtcImg.style = ptcImgCss;
|
|
154
|
-
|
|
155
|
-
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-0b899fc6.js');
|
|
6
|
-
|
|
7
|
-
const ptcLinkCss = ":host{display:block}.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:focus,.nav-title-link:focus,.primary-nav-link:focus,.secondary-nav-link:focus,.footer-nav-link:focus,.copyright-link:focus{outline:3px solid #0092d1;outline-offset:2px}.nav-title{box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:15px;font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0.15px;line-height:25.05px;list-style:none;margin-bottom:10px;text-align:left}.primary-nav-link{background-color:transparent;box-sizing:border-box;color:#f3f3f4;display:inline-block;font-size:15px;font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0.3px;line-height:25.95px;list-style:none;margin:var(--ptc-element-spacing-01) var(--ptc-element-spacing-03);padding:var(--ptc-element-spacing-02) var(--ptc-element-spacing-05);padding-bottom:7px;position:relative;text-decoration:none;transition:background-color var(--ptc-transition-medium) var(--ptc-decelerated-ease)}.primary-nav-link:hover{border-radius:4px;background-color:#20262a;text-decoration:none;outline:none}.nav-title-link{background-color:transparent;box-sizing:border-box;color:var(--color-white);font-size:var(--ptc-font-size-x-small);font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);line-height:15px;list-style:none;text-align:left;text-decoration-color:var(--color-white);text-decoration:none;transition:border-color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent;display:inline-block}.nav-title-link:hover{color:var(--color-white);border-bottom:1.5px solid var(--color-secondary-turtlegreen)}.secondary-nav-link{display:inline-block;background-color:transparent;box-sizing:border-box;color:var(--color-white);font-size:var(--ptc-font-size-x-small);font-stretch:100%;font-style:normal;font-weight:var(--ptc-font-weight-semibold);letter-spacing:0.12px;line-height:14.4px;list-style:none;margin-bottom:12px;text-align:left;text-decoration:none;transition:border-color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent;white-space:nowrap}.secondary-nav-link:hover{color:var(--color-white);border-bottom:1.5px solid #74c34d;border-radius:0;text-decoration:none}.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
|
-
let 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,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
|
|
7
|
-
const ptcOverlayCss = ":host{display:block}";
|
|
8
|
-
|
|
9
|
-
let PtcOverlay = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
return (index.h(index.Host, null, index.h("slot", null)));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
PtcOverlay.style = ptcOverlayCss;
|
|
18
|
-
|
|
19
|
-
exports.ptc_overlay = PtcOverlay;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
|
|
7
|
-
const ptcParaCss = "p.default{text-shadow:0 3px 6px var(--color-white);line-height:var(--ptc-line-height-dense);color:var(--color-primary-grey)}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-3{margin-top:var(--ptc-element-spacing-03)}p.margin-top-4{margin-top:var(--ptc-element-spacing-04)}p.margin-top-5{margin-top:var(--ptc-element-spacing-05)}p.margin-top-6{margin-top:var(--ptc-element-spacing-06)}p.margin-bottom-3{margin-bottom:var(--ptc-element-spacing-03)}p.margin-bottom-4{margin-bottom:var(--ptc-element-spacing-04)}p.margin-bottom-5{margin-bottom:var(--ptc-element-spacing-05)}p.margin-bottom-6{margin-bottom:var(--ptc-element-spacing-06)}p.announcement{text-transform:uppercase;font-size:var(--ptc-font-size-small);color:var(--color-secondary-grey);line-height:var(--ptc-line-height-looser);letter-spacing:1px}";
|
|
8
|
-
|
|
9
|
-
let PtcPara = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Paragraph font size
|
|
14
|
-
**/
|
|
15
|
-
this.fontSize = "medium";
|
|
16
|
-
/**
|
|
17
|
-
* Paragraph font weight
|
|
18
|
-
**/
|
|
19
|
-
this.fontWeight = 'w-4';
|
|
20
|
-
/**
|
|
21
|
-
* Paragraph Style
|
|
22
|
-
**/
|
|
23
|
-
this.paraStyle = 'default';
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
const classMap = this.getCssClassMap();
|
|
27
|
-
return (index.h("p", { class: classMap, part: "part-para" }, index.h("slot", null)));
|
|
28
|
-
}
|
|
29
|
-
getCssClassMap() {
|
|
30
|
-
return {
|
|
31
|
-
[this.fontSize]: true,
|
|
32
|
-
[this.fontWeight]: true,
|
|
33
|
-
[this.paraStyle]: true,
|
|
34
|
-
[this.paraMargin]: true,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
PtcPara.style = ptcParaCss;
|
|
39
|
-
|
|
40
|
-
exports.ptc_para = PtcPara;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
const interfaces = require('./interfaces-0ecd8027.js');
|
|
7
|
-
|
|
8
|
-
const ptcPictureCss = ":host{display:block;overflow:hidden}img{max-width:100%;height:auto}.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}";
|
|
9
|
-
|
|
10
|
-
let PtcPicture = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
/**
|
|
14
|
-
* Image alt
|
|
15
|
-
*/
|
|
16
|
-
this.alt = "image";
|
|
17
|
-
/**
|
|
18
|
-
* Image size for smallest screen
|
|
19
|
-
* <=767px
|
|
20
|
-
*/
|
|
21
|
-
this.sizeXs = '510x340';
|
|
22
|
-
/**
|
|
23
|
-
* Image size for small screen
|
|
24
|
-
* >=768px and <=991px
|
|
25
|
-
*/
|
|
26
|
-
this.sizeSm = '1240x496';
|
|
27
|
-
/**
|
|
28
|
-
* Image size for medium screen
|
|
29
|
-
* >=992px and <=1199px
|
|
30
|
-
*/
|
|
31
|
-
this.sizeMd = '1366x500';
|
|
32
|
-
/**
|
|
33
|
-
* Image solution for large screen
|
|
34
|
-
* >=1200px
|
|
35
|
-
*/
|
|
36
|
-
this.sizeLg = '1920x1080';
|
|
37
|
-
/**
|
|
38
|
-
* Image border shape
|
|
39
|
-
*/
|
|
40
|
-
this.borderRadius = '';
|
|
41
|
-
/**
|
|
42
|
-
* Object Fit
|
|
43
|
-
* Default: cover
|
|
44
|
-
*/
|
|
45
|
-
this.objectFit = 'cover';
|
|
46
|
-
}
|
|
47
|
-
WindowResize() {
|
|
48
|
-
this.addIntersectionObserver();
|
|
49
|
-
}
|
|
50
|
-
componentDidLoad() {
|
|
51
|
-
this.addIntersectionObserver();
|
|
52
|
-
}
|
|
53
|
-
componentWillUpdate() {
|
|
54
|
-
if (this.src !== this.oldSrc) {
|
|
55
|
-
this.addIntersectionObserver();
|
|
56
|
-
}
|
|
57
|
-
this.oldSrc = this.src;
|
|
58
|
-
}
|
|
59
|
-
//lazy-loading
|
|
60
|
-
addIntersectionObserver() {
|
|
61
|
-
if (!this.src) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if ('IntersectionObserver' in window) {
|
|
65
|
-
let lazyLoadImages = new IntersectionObserver(entries => {
|
|
66
|
-
entries.forEach(entry => {
|
|
67
|
-
if (entry.isIntersecting) {
|
|
68
|
-
const image = this.el.shadowRoot.querySelector('img');
|
|
69
|
-
image.src = this.setResponsiveBg();
|
|
70
|
-
console.log('loaded');
|
|
71
|
-
lazyLoadImages.unobserve(image);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
lazyLoadImages.observe(this.el.shadowRoot.querySelector('img'));
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// fall back to setTimeout for Safari and IE
|
|
79
|
-
setTimeout(() => {
|
|
80
|
-
const image = this.el.shadowRoot.querySelector('img');
|
|
81
|
-
image.src = this.setResponsiveBg();
|
|
82
|
-
image.onload = () => {
|
|
83
|
-
image.removeAttribute('data-src');
|
|
84
|
-
console.log('loaded fallback');
|
|
85
|
-
};
|
|
86
|
-
}, 5000);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//responsive image
|
|
90
|
-
setResponsiveBg() {
|
|
91
|
-
// Define local variables
|
|
92
|
-
let backgrounds = (this.el.shadowRoot || document).querySelectorAll('img'), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
93
|
-
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
94
|
-
// Set current variables
|
|
95
|
-
el = backgrounds[i];
|
|
96
|
-
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
97
|
-
if (elData !== null) {
|
|
98
|
-
// console.log('img src= ' + elData);
|
|
99
|
-
return elData;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
if (typeof console == 'object') {
|
|
103
|
-
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
render() {
|
|
109
|
-
const classMap = this.getCssClassMap();
|
|
110
|
-
return (index.h(index.Host, null, 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 }))));
|
|
111
|
-
}
|
|
112
|
-
getCurrentBreakPoints() {
|
|
113
|
-
// Define local variables
|
|
114
|
-
let doc = window.document, temp = doc.createElement('div'), env;
|
|
115
|
-
// Append test node
|
|
116
|
-
doc.body.appendChild(temp);
|
|
117
|
-
// Loop through breakpoints
|
|
118
|
-
for (let i = interfaces.ResponsivePictureVariables.envs.length - 1; i >= 0; i--) {
|
|
119
|
-
env = interfaces.ResponsivePictureVariables.envs[i];
|
|
120
|
-
// Add classes
|
|
121
|
-
temp.className = 'hidden-' + env;
|
|
122
|
-
// Found breakpoint
|
|
123
|
-
if (temp.offsetParent === null) {
|
|
124
|
-
// Remove our test node
|
|
125
|
-
doc.body.removeChild(temp);
|
|
126
|
-
console.log('remove test node');
|
|
127
|
-
// Return current breakpoint
|
|
128
|
-
return env;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// Breakpoint not found, try fallback
|
|
132
|
-
doc.body.removeChild(temp);
|
|
133
|
-
return this.getFallbackBreakpoint();
|
|
134
|
-
}
|
|
135
|
-
getFallbackBreakpoint() {
|
|
136
|
-
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
137
|
-
return 'lg';
|
|
138
|
-
}
|
|
139
|
-
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
140
|
-
return 'md';
|
|
141
|
-
}
|
|
142
|
-
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
143
|
-
return 'sm';
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
return 'xs';
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
getCssClassMap() {
|
|
150
|
-
return {
|
|
151
|
-
[this.borderRadius]: true,
|
|
152
|
-
[this.objectFit]: true,
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
get el() { return index.getElement(this); }
|
|
156
|
-
};
|
|
157
|
-
PtcPicture.style = ptcPictureCss;
|
|
158
|
-
|
|
159
|
-
exports.ptc_picture = PtcPicture;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
|
|
7
|
-
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-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}}";
|
|
8
|
-
|
|
9
|
-
let PtcSpacer = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Breakpoint
|
|
14
|
-
*/
|
|
15
|
-
this.breakpoint = '';
|
|
16
|
-
/**
|
|
17
|
-
* Spacing Size
|
|
18
|
-
*/
|
|
19
|
-
this.size = 'medium';
|
|
20
|
-
/**
|
|
21
|
-
* Direction
|
|
22
|
-
*/
|
|
23
|
-
this.direction = 'vertical';
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
const classMap = this.getCssClassMap();
|
|
27
|
-
return (index.h(index.Host, { class: classMap }));
|
|
28
|
-
}
|
|
29
|
-
getCssClassMap() {
|
|
30
|
-
return {
|
|
31
|
-
[this.size]: true,
|
|
32
|
-
['ptc-spacer-horizontal']: this.direction === 'horizontal',
|
|
33
|
-
['ptc-spacer-vertical']: this.direction === 'vertical',
|
|
34
|
-
['ptc-spacer-xx-small']: this.breakpoint === 'xx-small',
|
|
35
|
-
['ptc-spacer-x-small']: this.breakpoint === 'x-small',
|
|
36
|
-
['ptc-spacer-small']: this.breakpoint === 'small',
|
|
37
|
-
['ptc-spacer-medium']: this.breakpoint === 'medium',
|
|
38
|
-
['ptc-spacer-large']: this.breakpoint === 'large',
|
|
39
|
-
['ptc-spacer-x-large']: this.breakpoint === 'x-large',
|
|
40
|
-
['ptc-spacer-xx-large']: this.breakpoint === 'xx-large',
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
PtcSpacer.style = ptcSpacerCss;
|
|
45
|
-
|
|
46
|
-
exports.ptc_spacer = PtcSpacer;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-0b899fc6.js');
|
|
6
|
-
|
|
7
|
-
const ptcSpanCss = ":host(.link-style) span{color:var(--color-primary-uigrey);font-weight:var(--ptc-font-weight-black);position:relative;line-height:var(--ptc-line-height-normal)}:host(.nav-style) span{display:block;color:#cac8c8;font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);text-transform:capitalize;padding-left:var(--ptc-element-spacing-05);font-size:17px;padding-bottom:var(--ptc-element-spacing-03)}:host(.tag-style) span{font-size:var(--ptc-font-size-medium);line-height:var(--ptc-line-height-dense);font-weight:var(--ptc-font-weight-regular);color:#40434a}:host(.inline) span{display:inline}:host(.block) span{display:block}:host(.inline-block) span{display:inline-block}";
|
|
8
|
-
|
|
9
|
-
let PtcSpan = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* Span Style
|
|
14
|
-
*/
|
|
15
|
-
this.spanStyle = 'tag-style';
|
|
16
|
-
this.display = 'inline';
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
const classMap = this.getCssClassMap();
|
|
20
|
-
return (index.h(index.Host, { class: classMap }, this.styles && index.h("style", null, this.styles), index.h("span", { part: "part-ptc-span" }, index.h("slot", null))));
|
|
21
|
-
}
|
|
22
|
-
getCssClassMap() {
|
|
23
|
-
return {
|
|
24
|
-
[this.spanStyle]: true,
|
|
25
|
-
[this.display]: true,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
PtcSpan.style = ptcSpanCss;
|
|
30
|
-
|
|
31
|
-
exports.ptc_span = PtcSpan;
|