@ptcwebops/ptcw-design 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/icon-asset_5.cjs.entry.js +1 -1
- package/dist/cjs/interfaces-0ecd8027.js +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-avatar.cjs.entry.js +19 -0
- package/dist/cjs/ptc-card.cjs.entry.js +2 -2
- package/dist/cjs/ptc-img.cjs.entry.js +7 -12
- package/dist/cjs/ptc-picture.cjs.entry.js +145 -4
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ptc-avatar/ptc-avatar.css +3 -0
- package/dist/collection/components/ptc-avatar/ptc-avatar.js +15 -0
- package/dist/collection/components/ptc-card/ptc-card.css +27 -3
- package/dist/collection/components/ptc-card/ptc-card.js +1 -1
- package/dist/collection/components/ptc-img/ptc-img.js +4 -10
- package/dist/collection/components/ptc-para/ptc-para.css +24 -0
- package/dist/collection/components/ptc-para/ptc-para.js +2 -2
- package/dist/collection/components/ptc-picture/ptc-picture.css +29 -0
- package/dist/collection/components/ptc-picture/ptc-picture.js +325 -13
- package/dist/collection/utils/interfaces.js +6 -1
- package/dist/custom-elements/index.d.ts +6 -6
- package/dist/custom-elements/index.js +174 -67
- package/dist/esm/icon-asset_5.entry.js +1 -1
- package/dist/esm/interfaces-3cb94654.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-avatar.entry.js +15 -0
- package/dist/esm/ptc-card.entry.js +2 -2
- package/dist/esm/ptc-img.entry.js +4 -9
- package/dist/esm/ptc-picture.entry.js +146 -5
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/{p-dddd4d6e.entry.js → p-18092cf1.entry.js} +1 -1
- package/dist/ptcw-design/p-240733ce.js +1 -0
- package/dist/ptcw-design/p-73e2418e.entry.js +1 -0
- package/dist/ptcw-design/p-78a47bf1.entry.js +1 -0
- package/dist/ptcw-design/p-b7471812.entry.js +1 -0
- package/dist/ptcw-design/p-f694e46a.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-avatar/ptc-avatar.d.ts +3 -0
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-picture/ptc-picture.d.ts +60 -1
- package/dist/types/components.d.ts +95 -33
- package/dist/types/utils/interfaces.d.ts +6 -1
- package/package.json +1 -1
- package/dist/cjs/ptc-image.cjs.entry.js +0 -58
- package/dist/collection/components/ptc-image/ptc-image.css +0 -4
- package/dist/collection/components/ptc-image/ptc-image.js +0 -92
- package/dist/esm/ptc-image.entry.js +0 -54
- package/dist/ptcw-design/p-1df1006b.entry.js +0 -1
- package/dist/ptcw-design/p-4586b0f5.entry.js +0 -1
- package/dist/ptcw-design/p-56f6f900.entry.js +0 -1
- package/dist/ptcw-design/p-97a61538.entry.js +0 -1
- package/dist/types/components/ptc-image/ptc-image.d.ts +0 -18
|
@@ -143,7 +143,7 @@ const PtcButton = class {
|
|
|
143
143
|
};
|
|
144
144
|
PtcButton.style = ptcButtonCss;
|
|
145
145
|
|
|
146
|
-
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.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}";
|
|
146
|
+
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}";
|
|
147
147
|
|
|
148
148
|
const PtcPara = class {
|
|
149
149
|
constructor(hostRef) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
let ResponsiveBgVariables = {
|
|
4
|
+
envs: ['xs', 'sm', 'md', 'lg'],
|
|
5
|
+
selector: '.ptc-img',
|
|
6
|
+
interval: 250
|
|
7
|
+
};
|
|
8
|
+
let ResponsivePictureVariables = {
|
|
9
|
+
envs: ['xs', 'sm', 'md', 'lg'],
|
|
10
|
+
selector: '.ptc-picture',
|
|
11
|
+
interval: 250
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.ResponsiveBgVariables = ResponsiveBgVariables;
|
|
15
|
+
exports.ResponsivePictureVariables = ResponsivePictureVariables;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ptc-card.cjs",[[1,"ptc-card",{"cardType":[1,"card-type"],"cardHref":[1,"card-href"],"target":[1],"rel":[1],"hasImage":[4,"has-image"],"hasVideo":[4,"has-video"],"hasLottie":[4,"has-lottie"],"heading":[1],"cardDate":[1,"card-date"],"styles":[1]}]]],["ptc-link.cjs",[[1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]]],["ptc-lottie.cjs",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item.cjs",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-
|
|
17
|
+
return index.bootstrapLazy([["ptc-card.cjs",[[1,"ptc-card",{"cardType":[1,"card-type"],"cardHref":[1,"card-href"],"target":[1],"rel":[1],"hasImage":[4,"has-image"],"hasVideo":[4,"has-video"],"hasLottie":[4,"has-lottie"],"heading":[1],"cardDate":[1,"card-date"],"styles":[1]}]]],["ptc-link.cjs",[[1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]]],["ptc-lottie.cjs",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item.cjs",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-avatar.cjs",[[1,"ptc-avatar"]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-img.cjs",[[0,"ptc-img",{"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imgUrl":[1,"img-url"],"imageType":[1,"image-type"],"borderRadius":[1,"border-radius"],"loadMode":[1,"load-mode"]},[[9,"resize","WindowResize"]]]]],["ptc-list.cjs",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav.cjs",[[1,"ptc-nav"]]],["ptc-nav-item.cjs",[[1,"ptc-nav-item",{"url":[1025],"label":[1025],"ariaExpanded":[1028,"aria-expanded"],"depth":[1538],"hasChildren":[1028,"has-children"],"parentExpanded":[1540,"parent-expanded"],"navType":[1,"nav-type"]},[[0,"handleClick","handleClick"],[9,"resize","handleResize"]]]]],["ptc-overlay.cjs",[[4,"ptc-overlay"]]],["ptc-picture.cjs",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-spacer.cjs",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span.cjs",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title.cjs",[[1,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["lottie-player.cjs",[[1,"lottie-player",{"mode":[1],"autoplay":[4],"background":[513],"controls":[4],"count":[2],"direction":[2],"hover":[4],"loop":[516],"renderer":[1],"speed":[2],"src":[1],"currentState":[1,"current-state"],"seeker":[8],"intermission":[2],"play":[64],"pause":[64],"stop":[64],"seek":[64],"getLottie":[64],"setSpeed":[64],"setDirection":[64],"setLooping":[64],"togglePlay":[64],"toggleLooping":[64]}]]],["ptc-date.cjs",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]],["icon-asset_5.cjs",[[1,"ptc-announcement",{"btnText":[513,"btn-text"],"visible":[1540],"btnLink":[513,"btn-link"],"tempContainer":[4,"temp-container"]}],[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}],[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"target":[1],"rel":[1]}],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"]}],[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ac192914.js');
|
|
6
|
+
|
|
7
|
+
const ptcAvatarCss = ":host{display:block}";
|
|
8
|
+
|
|
9
|
+
const PtcAvatar = 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
|
+
PtcAvatar.style = ptcAvatarCss;
|
|
18
|
+
|
|
19
|
+
exports.ptc_avatar = PtcAvatar;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ac192914.js');
|
|
6
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-
|
|
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;display:flex}: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-04));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-04)}: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:var(--ptc-element-spacing-03) 0}: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) ::slotted([slot=slot-after-heading]){position:absolute;top:var(--ptc-element-spacing-03);left:var(--ptc-element-spacing-04);opacity:1;transform:scale(1);height:44px;transform-origin:left center;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease), height var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-before-heading]){opacity:0;transition:opacity var(--ptc-transition-medium) var(--ptc-standard-ease), height var(--ptc-transition-medium) var(--ptc-standard-ease)}: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(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){opacity:0;transform:scale(0);height:0}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-before-heading]){opacity:1;transition:opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}: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
8
|
|
|
9
9
|
const PtcCard = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -47,7 +47,7 @@ const PtcCard = class {
|
|
|
47
47
|
index.h("h3", { class: "ptc-h3", part: "card-heading" }, this.heading),
|
|
48
48
|
index.h("slot", { name: "slot-after-heading" }),
|
|
49
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-
|
|
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-05);display:inline-block;}" }) : null)))));
|
|
51
51
|
}
|
|
52
52
|
getCssClassMap() {
|
|
53
53
|
return {
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
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
|
-
};
|
|
6
|
+
const interfaces = require('./interfaces-0ecd8027.js');
|
|
12
7
|
|
|
13
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}}";
|
|
14
9
|
|
|
@@ -60,15 +55,15 @@ const PtcImg = class {
|
|
|
60
55
|
this.setResponsiveBg();
|
|
61
56
|
}
|
|
62
57
|
componentWillUpdate() {
|
|
63
|
-
console.log('componentWillUpdate!');
|
|
58
|
+
// console.log('componentWillUpdate!');
|
|
64
59
|
this.addIntersectionObserver();
|
|
65
60
|
this.setResponsiveBg();
|
|
66
61
|
}
|
|
67
62
|
//responsive image
|
|
68
63
|
setResponsiveBg() {
|
|
69
64
|
// Define local variables
|
|
70
|
-
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
71
|
-
console.log('current breakpoint: ' + currentBreakpoint);
|
|
65
|
+
let backgrounds = (this.el || document).querySelectorAll(interfaces.ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
66
|
+
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
72
67
|
// Loop through all target elements
|
|
73
68
|
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
74
69
|
// Set current variables
|
|
@@ -98,7 +93,7 @@ const PtcImg = class {
|
|
|
98
93
|
if (entry.isIntersecting) {
|
|
99
94
|
const image = entry.target;
|
|
100
95
|
image.classList.remove('lazy-bg');
|
|
101
|
-
console.log('loaded');
|
|
96
|
+
// console.log('loaded');
|
|
102
97
|
bgObserver.unobserve(image);
|
|
103
98
|
}
|
|
104
99
|
});
|
|
@@ -122,8 +117,8 @@ const PtcImg = class {
|
|
|
122
117
|
// Append test node
|
|
123
118
|
doc.body.appendChild(temp);
|
|
124
119
|
// Loop through breakpoints
|
|
125
|
-
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
126
|
-
env = ResponsiveBgVariables.envs[i];
|
|
120
|
+
for (let i = interfaces.ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
121
|
+
env = interfaces.ResponsiveBgVariables.envs[i];
|
|
127
122
|
// Add classes
|
|
128
123
|
temp.className = 'hidden-' + env;
|
|
129
124
|
// Found breakpoint
|
|
@@ -3,23 +3,164 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ac192914.js');
|
|
6
|
+
const interfaces = require('./interfaces-0ecd8027.js');
|
|
6
7
|
|
|
7
|
-
const ptcPictureCss = ":host{display:block}";
|
|
8
|
+
const ptcPictureCss = ":host{display:block;overflow:hidden}.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}";
|
|
8
9
|
|
|
9
10
|
const PtcPicture = class {
|
|
10
11
|
constructor(hostRef) {
|
|
11
12
|
index.registerInstance(this, hostRef);
|
|
12
|
-
|
|
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 border shape
|
|
35
|
+
*/
|
|
36
|
+
this.borderRadius = '';
|
|
37
|
+
/**
|
|
38
|
+
* Set height
|
|
39
|
+
* Width will be auto by default
|
|
40
|
+
*/
|
|
41
|
+
this.height = 'auto';
|
|
42
|
+
/**
|
|
43
|
+
* Set Width
|
|
44
|
+
* height will be 100% by default
|
|
45
|
+
*/
|
|
46
|
+
this.width = '100%';
|
|
47
|
+
/**
|
|
48
|
+
* Object Fit
|
|
49
|
+
* Default: cover
|
|
50
|
+
*/
|
|
51
|
+
this.objectFit = 'cover';
|
|
52
|
+
}
|
|
53
|
+
WindowResize() {
|
|
54
|
+
this.addIntersectionObserver();
|
|
55
|
+
}
|
|
56
|
+
componentDidLoad() {
|
|
57
|
+
this.addIntersectionObserver();
|
|
58
|
+
}
|
|
59
|
+
componentWillUpdate() {
|
|
60
|
+
if (this.src !== this.oldSrc) {
|
|
61
|
+
this.addIntersectionObserver();
|
|
62
|
+
}
|
|
63
|
+
this.oldSrc = this.src;
|
|
64
|
+
}
|
|
65
|
+
//lazy-loading
|
|
66
|
+
addIntersectionObserver() {
|
|
67
|
+
if (!this.src) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if ('IntersectionObserver' in window) {
|
|
71
|
+
let lazyLoadImages = new IntersectionObserver(entries => {
|
|
72
|
+
entries.forEach(entry => {
|
|
73
|
+
if (entry.isIntersecting) {
|
|
74
|
+
const image = this.el.shadowRoot.querySelector('img');
|
|
75
|
+
image.src = this.setResponsiveBg();
|
|
76
|
+
console.log('loaded');
|
|
77
|
+
lazyLoadImages.unobserve(image);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
lazyLoadImages.observe(this.el.shadowRoot.querySelector('img'));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
// fall back to setTimeout for Safari and IE
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
const image = this.el.shadowRoot.querySelector('img');
|
|
87
|
+
image.src = this.setResponsiveBg();
|
|
88
|
+
image.onload = () => {
|
|
89
|
+
image.removeAttribute('data-src');
|
|
90
|
+
console.log('loaded fallback');
|
|
91
|
+
};
|
|
92
|
+
}, 5000);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//responsive image
|
|
96
|
+
setResponsiveBg() {
|
|
97
|
+
// Define local variables
|
|
98
|
+
let backgrounds = (this.el.shadowRoot || document).querySelectorAll('img'), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
99
|
+
//console.log('current breakpoint: ' + currentBreakpoint);
|
|
100
|
+
// Loop through all target elements
|
|
101
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
102
|
+
// Set current variables
|
|
103
|
+
el = backgrounds[i];
|
|
104
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
105
|
+
if (elData !== null) {
|
|
106
|
+
// console.log('img src= ' + elData);
|
|
107
|
+
return elData;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
if (typeof console == 'object') {
|
|
111
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
13
115
|
}
|
|
14
116
|
render() {
|
|
15
117
|
const classMap = this.getCssClassMap();
|
|
16
|
-
return (index.h(index.Host,
|
|
118
|
+
return (index.h(index.Host, null, index.h("style", null, `img{width:${this.width};height:${this.height};}`), index.h("img", { class: classMap, "data-xs": `${this.src}:${this.sizeXs}`, "data-sm": `${this.src}:${this.sizeSm}`, "data-md": `${this.src}:${this.sizeMd}`, "data-lg": `${this.src}:${this.sizeLg}`, alt: this.alt })));
|
|
119
|
+
}
|
|
120
|
+
getCurrentBreakPoints() {
|
|
121
|
+
// Define local variables
|
|
122
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
123
|
+
// Append test node
|
|
124
|
+
doc.body.appendChild(temp);
|
|
125
|
+
// Loop through breakpoints
|
|
126
|
+
for (let i = interfaces.ResponsivePictureVariables.envs.length - 1; i >= 0; i--) {
|
|
127
|
+
env = interfaces.ResponsivePictureVariables.envs[i];
|
|
128
|
+
// Add classes
|
|
129
|
+
temp.className = 'hidden-' + env;
|
|
130
|
+
// Found breakpoint
|
|
131
|
+
if (temp.offsetParent === null) {
|
|
132
|
+
// Remove our test node
|
|
133
|
+
doc.body.removeChild(temp);
|
|
134
|
+
console.log('remove test node');
|
|
135
|
+
// Return current breakpoint
|
|
136
|
+
return env;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Breakpoint not found, try fallback
|
|
140
|
+
doc.body.removeChild(temp);
|
|
141
|
+
return this.getFallbackBreakpoint();
|
|
142
|
+
}
|
|
143
|
+
getFallbackBreakpoint() {
|
|
144
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
145
|
+
return 'lg';
|
|
146
|
+
}
|
|
147
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
148
|
+
return 'md';
|
|
149
|
+
}
|
|
150
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
151
|
+
return 'sm';
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
return 'xs';
|
|
155
|
+
}
|
|
17
156
|
}
|
|
18
157
|
getCssClassMap() {
|
|
19
158
|
return {
|
|
20
|
-
[this.
|
|
159
|
+
[this.borderRadius]: true,
|
|
160
|
+
[this.objectFit]: true,
|
|
21
161
|
};
|
|
22
162
|
}
|
|
163
|
+
get el() { return index.getElement(this); }
|
|
23
164
|
};
|
|
24
165
|
PtcPicture.style = ptcPictureCss;
|
|
25
166
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ptc-card.cjs",[[1,"ptc-card",{"cardType":[1,"card-type"],"cardHref":[1,"card-href"],"target":[1],"rel":[1],"hasImage":[4,"has-image"],"hasVideo":[4,"has-video"],"hasLottie":[4,"has-lottie"],"heading":[1],"cardDate":[1,"card-date"],"styles":[1]}]]],["ptc-link.cjs",[[1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]]],["ptc-lottie.cjs",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item.cjs",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-
|
|
18
|
+
return index.bootstrapLazy([["ptc-card.cjs",[[1,"ptc-card",{"cardType":[1,"card-type"],"cardHref":[1,"card-href"],"target":[1],"rel":[1],"hasImage":[4,"has-image"],"hasVideo":[4,"has-video"],"hasLottie":[4,"has-lottie"],"heading":[1],"cardDate":[1,"card-date"],"styles":[1]}]]],["ptc-link.cjs",[[1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]]],["ptc-lottie.cjs",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item.cjs",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-avatar.cjs",[[1,"ptc-avatar"]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-img.cjs",[[0,"ptc-img",{"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imgUrl":[1,"img-url"],"imageType":[1,"image-type"],"borderRadius":[1,"border-radius"],"loadMode":[1,"load-mode"]},[[9,"resize","WindowResize"]]]]],["ptc-list.cjs",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav.cjs",[[1,"ptc-nav"]]],["ptc-nav-item.cjs",[[1,"ptc-nav-item",{"url":[1025],"label":[1025],"ariaExpanded":[1028,"aria-expanded"],"depth":[1538],"hasChildren":[1028,"has-children"],"parentExpanded":[1540,"parent-expanded"],"navType":[1,"nav-type"]},[[0,"handleClick","handleClick"],[9,"resize","handleResize"]]]]],["ptc-overlay.cjs",[[4,"ptc-overlay"]]],["ptc-picture.cjs",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-spacer.cjs",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span.cjs",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title.cjs",[[1,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["lottie-player.cjs",[[1,"lottie-player",{"mode":[1],"autoplay":[4],"background":[513],"controls":[4],"count":[2],"direction":[2],"hover":[4],"loop":[516],"renderer":[1],"speed":[2],"src":[1],"currentState":[1,"current-state"],"seeker":[8],"intermission":[2],"play":[64],"pause":[64],"stop":[64],"seek":[64],"getLottie":[64],"setSpeed":[64],"setDirection":[64],"setLooping":[64],"togglePlay":[64],"toggleLooping":[64]}]]],["ptc-date.cjs",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]],["icon-asset_5.cjs",[[1,"ptc-announcement",{"btnText":[513,"btn-text"],"visible":[1540],"btnLink":[513,"btn-link"],"tempContainer":[4,"temp-container"]}],[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}],[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"target":[1],"rel":[1]}],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"]}],[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]]], options);
|
|
19
19
|
});
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"./components/list-item/list-item.js",
|
|
5
5
|
"./components/my-component/my-component.js",
|
|
6
6
|
"./components/ptc-announcement/ptc-announcement.js",
|
|
7
|
+
"./components/ptc-avatar/ptc-avatar.js",
|
|
7
8
|
"./components/ptc-button/ptc-button.js",
|
|
8
9
|
"./components/ptc-card/ptc-card.js",
|
|
9
10
|
"./components/ptc-date/ptc-date.js",
|
|
10
11
|
"./components/ptc-footer/ptc-footer.js",
|
|
11
|
-
"./components/ptc-image/ptc-image.js",
|
|
12
12
|
"./components/ptc-img/ptc-img.js",
|
|
13
13
|
"./components/ptc-link/ptc-link.js",
|
|
14
14
|
"./components/ptc-list/ptc-list.js",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component, Host, h } from '@stencil/core';
|
|
2
|
+
export class PtcAvatar {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, null,
|
|
5
|
+
h("slot", null)));
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "ptc-avatar"; }
|
|
8
|
+
static get encapsulation() { return "shadow"; }
|
|
9
|
+
static get originalStyleUrls() { return {
|
|
10
|
+
"$": ["ptc-avatar.scss"]
|
|
11
|
+
}; }
|
|
12
|
+
static get styleUrls() { return {
|
|
13
|
+
"$": ["ptc-avatar.css"]
|
|
14
|
+
}; }
|
|
15
|
+
}
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
:host(.lottie-card) .card-media {
|
|
48
48
|
flex-basis: 40%;
|
|
49
49
|
border-right: 1px solid #c9c9c9;
|
|
50
|
+
display: flex;
|
|
50
51
|
}
|
|
51
52
|
:host(.lottie-card) .card-body {
|
|
52
53
|
flex-basis: 60%;
|
|
@@ -134,7 +135,7 @@
|
|
|
134
135
|
:host(.clip-edge-card) .card-body {
|
|
135
136
|
transform: translateY(calc((-1) * var(--ptc-element-spacing-04)));
|
|
136
137
|
overflow: hidden;
|
|
137
|
-
width: calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-
|
|
138
|
+
width: calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-04));
|
|
138
139
|
font-size: var(--ptc-font-size-small);
|
|
139
140
|
font-weight: var(--ptc-font-weight-medium);
|
|
140
141
|
line-height: var(--ptc-line-height-dense);
|
|
@@ -142,7 +143,7 @@
|
|
|
142
143
|
clip-path: var(--ptc-clip-path-bottom-right);
|
|
143
144
|
background-color: var(--color-white);
|
|
144
145
|
border-radius: var(--ptc-border-radius-medium);
|
|
145
|
-
padding: var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-
|
|
146
|
+
padding: var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-04);
|
|
146
147
|
}
|
|
147
148
|
:host(.clip-edge-card) .card-body h3 {
|
|
148
149
|
display: inline-block;
|
|
@@ -154,7 +155,7 @@
|
|
|
154
155
|
text-decoration: none;
|
|
155
156
|
border-bottom: 2px solid transparent;
|
|
156
157
|
transition: border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);
|
|
157
|
-
margin
|
|
158
|
+
margin: var(--ptc-element-spacing-03) 0;
|
|
158
159
|
}
|
|
159
160
|
:host(.clip-edge-card) ::slotted([slot=slot-description]) {
|
|
160
161
|
height: 0;
|
|
@@ -169,6 +170,20 @@
|
|
|
169
170
|
transition: transform var(--ptc-transition-medium) var(--ptc-standard-ease);
|
|
170
171
|
transform-origin: top center;
|
|
171
172
|
}
|
|
173
|
+
:host(.clip-edge-card) ::slotted([slot=slot-after-heading]) {
|
|
174
|
+
position: absolute;
|
|
175
|
+
top: var(--ptc-element-spacing-03);
|
|
176
|
+
left: var(--ptc-element-spacing-04);
|
|
177
|
+
opacity: 1;
|
|
178
|
+
transform: scale(1);
|
|
179
|
+
height: 44px;
|
|
180
|
+
transform-origin: left center;
|
|
181
|
+
transition: transform var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease), height var(--ptc-transition-medium) var(--ptc-standard-ease);
|
|
182
|
+
}
|
|
183
|
+
:host(.clip-edge-card) ::slotted([slot=slot-before-heading]) {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
transition: opacity var(--ptc-transition-medium) var(--ptc-standard-ease), height var(--ptc-transition-medium) var(--ptc-standard-ease);
|
|
186
|
+
}
|
|
172
187
|
:host(.clip-edge-card) .link-wrapper:hover .card-body h3 {
|
|
173
188
|
border-bottom: 2px solid var(--color-secondary-turtlegreen);
|
|
174
189
|
}
|
|
@@ -179,6 +194,15 @@
|
|
|
179
194
|
:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]) {
|
|
180
195
|
transform: scale(1.1);
|
|
181
196
|
}
|
|
197
|
+
:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]) {
|
|
198
|
+
opacity: 0;
|
|
199
|
+
transform: scale(0);
|
|
200
|
+
height: 0;
|
|
201
|
+
}
|
|
202
|
+
:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-before-heading]) {
|
|
203
|
+
opacity: 1;
|
|
204
|
+
transition: opacity var(--ptc-transition-medium) var(--ptc-standard-ease);
|
|
205
|
+
}
|
|
182
206
|
|
|
183
207
|
:host(.hightlight-card) .card-border {
|
|
184
208
|
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
|
|
@@ -48,7 +48,7 @@ export class PtcCard {
|
|
|
48
48
|
]
|
|
49
49
|
: null,
|
|
50
50
|
h("slot", { name: "slot-description" }),
|
|
51
|
-
!!this.cardDate ? 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-
|
|
51
|
+
!!this.cardDate ? 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-05);display:inline-block;}" }) : null)))));
|
|
52
52
|
}
|
|
53
53
|
getCssClassMap() {
|
|
54
54
|
return {
|
|
@@ -48,7 +48,7 @@ export class PtcImg {
|
|
|
48
48
|
this.setResponsiveBg();
|
|
49
49
|
}
|
|
50
50
|
componentWillUpdate() {
|
|
51
|
-
console.log('componentWillUpdate!');
|
|
51
|
+
// console.log('componentWillUpdate!');
|
|
52
52
|
this.addIntersectionObserver();
|
|
53
53
|
this.setResponsiveBg();
|
|
54
54
|
}
|
|
@@ -56,7 +56,7 @@ export class PtcImg {
|
|
|
56
56
|
setResponsiveBg() {
|
|
57
57
|
// Define local variables
|
|
58
58
|
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
59
|
-
console.log('current breakpoint: ' + currentBreakpoint);
|
|
59
|
+
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
60
60
|
// Loop through all target elements
|
|
61
61
|
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
62
62
|
// Set current variables
|
|
@@ -86,7 +86,7 @@ export class PtcImg {
|
|
|
86
86
|
if (entry.isIntersecting) {
|
|
87
87
|
const image = entry.target;
|
|
88
88
|
image.classList.remove('lazy-bg');
|
|
89
|
-
console.log('loaded');
|
|
89
|
+
// console.log('loaded');
|
|
90
90
|
bgObserver.unobserve(image);
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -97,13 +97,7 @@ export class PtcImg {
|
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
99
|
// fall back to setTimeout for Safari and IE
|
|
100
|
-
// setTimeout(() => {
|
|
101
|
-
// const image: HTMLImageElement = this.el.shadowRoot.querySelector('img');
|
|
102
|
-
// image.src = image.dataset.src;
|
|
103
|
-
// image.onload = () => {
|
|
104
|
-
// image.removeAttribute('data-src');
|
|
105
|
-
// console.log('loaded fallback');
|
|
106
|
-
// };
|
|
100
|
+
// setTimeout(() => {};
|
|
107
101
|
// }, 5000);
|
|
108
102
|
}
|
|
109
103
|
}
|
|
@@ -55,6 +55,30 @@ p.margin-flush {
|
|
|
55
55
|
margin-top: 0;
|
|
56
56
|
margin-bottom: 0;
|
|
57
57
|
}
|
|
58
|
+
p.margin-top-3 {
|
|
59
|
+
margin-top: var(--ptc-element-spacing-03);
|
|
60
|
+
}
|
|
61
|
+
p.margin-top-4 {
|
|
62
|
+
margin-top: var(--ptc-element-spacing-04);
|
|
63
|
+
}
|
|
64
|
+
p.margin-top-5 {
|
|
65
|
+
margin-top: var(--ptc-element-spacing-05);
|
|
66
|
+
}
|
|
67
|
+
p.margin-top-6 {
|
|
68
|
+
margin-top: var(--ptc-element-spacing-06);
|
|
69
|
+
}
|
|
70
|
+
p.margin-bottom-3 {
|
|
71
|
+
margin-bottom: var(--ptc-element-spacing-03);
|
|
72
|
+
}
|
|
73
|
+
p.margin-bottom-4 {
|
|
74
|
+
margin-bottom: var(--ptc-element-spacing-04);
|
|
75
|
+
}
|
|
76
|
+
p.margin-bottom-5 {
|
|
77
|
+
margin-bottom: var(--ptc-element-spacing-05);
|
|
78
|
+
}
|
|
79
|
+
p.margin-bottom-6 {
|
|
80
|
+
margin-bottom: var(--ptc-element-spacing-06);
|
|
81
|
+
}
|
|
58
82
|
p.announcement {
|
|
59
83
|
text-transform: uppercase;
|
|
60
84
|
font-size: var(--ptc-font-size-small);
|
|
@@ -94,8 +94,8 @@ export class PtcPara {
|
|
|
94
94
|
"type": "string",
|
|
95
95
|
"mutable": false,
|
|
96
96
|
"complexType": {
|
|
97
|
-
"original": "'margin-flush'",
|
|
98
|
-
"resolved": "\"margin-flush\"",
|
|
97
|
+
"original": "'margin-flush' | 'margin-top-3' | 'margin-top-4' | 'margin-top-5' | 'margin-top-6' | 'margin-bottom-3' | 'margin-bottom-4' | 'margin-bottom-5' | 'margin-bottom-6'",
|
|
98
|
+
"resolved": "\"margin-bottom-3\" | \"margin-bottom-4\" | \"margin-bottom-5\" | \"margin-bottom-6\" | \"margin-flush\" | \"margin-top-3\" | \"margin-top-4\" | \"margin-top-5\" | \"margin-top-6\"",
|
|
99
99
|
"references": {}
|
|
100
100
|
},
|
|
101
101
|
"required": false,
|
|
@@ -1,3 +1,32 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
+
overflow: hidden;
|
|
3
4
|
}
|
|
5
|
+
|
|
6
|
+
.cover {
|
|
7
|
+
object-fit: cover;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.fill {
|
|
11
|
+
object-fit: fill;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.contain {
|
|
15
|
+
object-fit: contain;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.scale-down {
|
|
19
|
+
object-fit: scale-down;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.none {
|
|
23
|
+
object-fit: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.initial {
|
|
27
|
+
object-fit: initial;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.inherit {
|
|
31
|
+
object-fit: inherit;
|
|
32
|
+
}
|