@ptcwebops/ptcw-design 0.0.10 → 0.0.12

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.
@@ -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-button.cjs",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-image.cjs",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["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"]},[[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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[4,"ptc-picture",{"lazy":[1]}]]],["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]}]]],["icon-asset.cjs",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[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"]}]]]], options);
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-button.cjs",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-image.cjs",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[4,"ptc-picture",{"lazy":[1]}]]],["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]}]]],["icon-asset.cjs",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[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"]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -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}: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:flex;flex-flow:nowrap row;justify-content:center}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
7
+ const ptcCardCss = ":host{display:block}:host(.lottie-card) .card-border{box-shadow:1px 1px 14px 0 rgba(101, 101, 101, 0.35);border:1px solid #c9c9c9;border-radius:10px;position:relative;overflow:hidden}:host(.lottie-card) .card-border::after{content:\"\";height:40%;width:4px;position:absolute;top:30%;right:-2px;background-color:#74c34d;z-index:2;display:block}:host(.lottie-card) .card-border:hover{box-shadow:1px 1px 35px 0 rgba(101, 101, 101, 0.65)}:host(.lottie-card) .card-border:hover .card-body h3{border-bottom:2px solid var(--color-primary-green)}:host(.lottie-card) .card-layout{display:block}@media only screen and (min-width: 992px){:host(.lottie-card) .card-layout{display:flex;flex-flow:nowrap row;justify-content:center}}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
8
8
 
9
9
  const PtcCard = class {
10
10
  constructor(hostRef) {
@@ -10,7 +10,7 @@ let ResponsiveBgVariables = {
10
10
  interval: 250
11
11
  };
12
12
 
13
- const ptcImgCss = ".smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-sm{border-radius:var(--ptc-border-radius-small)}.radius-md{border-radius:var(--ptc-border-radius-medium)}.radius-lg{border-radius:var(--ptc-border-radius-large)}@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}}";
13
+ const ptcImgCss = ".smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-sm{border-radius:var(--ptc-border-radius-small)}.radius-md{border-radius:var(--ptc-border-radius-medium)}.radius-lg{border-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-primary-lightgrey)}@media (max-width: 767px){.hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.hidden-md{display:none !important}}@media (min-width: 1200px){.hidden-lg{display:none !important}}";
14
14
 
15
15
  const PtcImg = class {
16
16
  constructor(hostRef) {
@@ -39,6 +39,14 @@ const PtcImg = class {
39
39
  * Image type
40
40
  */
41
41
  this.imageType = 'smart-bg';
42
+ /**
43
+ * Image border shape
44
+ */
45
+ this.borderRadius = '';
46
+ /**
47
+ * Lazy loading option
48
+ */
49
+ this.loadMode = 'lazy-bg';
42
50
  }
43
51
  WindowResize() {
44
52
  this.setResponsiveBg();
@@ -48,8 +56,15 @@ const PtcImg = class {
48
56
  return (index.h(index.Host, null, index.h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` })));
49
57
  }
50
58
  componentDidLoad() {
59
+ this.addIntersectionObserver();
51
60
  this.setResponsiveBg();
52
61
  }
62
+ componentWillUpdate() {
63
+ console.log('componentWillUpdate!');
64
+ this.addIntersectionObserver();
65
+ this.setResponsiveBg();
66
+ }
67
+ //responsive image
53
68
  setResponsiveBg() {
54
69
  // Define local variables
55
70
  let backgrounds = document.querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
@@ -70,11 +85,35 @@ const PtcImg = class {
70
85
  }
71
86
  }
72
87
  }
88
+ //lazy loading
89
+ addIntersectionObserver() {
90
+ if (!this.imgUrl) {
91
+ console.log("no image!");
92
+ return;
93
+ }
94
+ if ('IntersectionObserver' in window) {
95
+ let lazyLoadBgs = document.querySelectorAll(".lazy-bg");
96
+ let bgObserver = new IntersectionObserver((entries) => {
97
+ entries.forEach(entry => {
98
+ if (entry.isIntersecting) {
99
+ const image = entry.target;
100
+ image.classList.remove("lazy-bg");
101
+ console.log('loaded');
102
+ bgObserver.unobserve(image);
103
+ }
104
+ });
105
+ });
106
+ lazyLoadBgs.forEach(image => {
107
+ bgObserver.observe(image);
108
+ });
109
+ }
110
+ }
73
111
  getCssClassMap() {
74
112
  return {
75
113
  [this.imageType]: true,
76
114
  'ptc-img': true,
77
115
  [this.borderRadius]: true,
116
+ [this.loadMode]: true,
78
117
  };
79
118
  }
80
119
  getCurrentBreakPoints() {
@@ -88,9 +127,10 @@ const PtcImg = class {
88
127
  // Add classes
89
128
  temp.className = 'hidden-' + env;
90
129
  // Found breakpoint
91
- if (temp.offsetParent !== document.body) {
130
+ if (temp.offsetParent === null) {
92
131
  // Remove our test node
93
132
  doc.body.removeChild(temp);
133
+ console.log('remove test node');
94
134
  // Return current breakpoint
95
135
  return env;
96
136
  }
@@ -98,6 +138,7 @@ const PtcImg = class {
98
138
  // Breakpoint not found
99
139
  return 'Unknown breakpoint';
100
140
  }
141
+ get el() { return index.getElement(this); }
101
142
  };
102
143
  PtcImg.style = ptcImgCss;
103
144
 
@@ -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-button.cjs",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-image.cjs",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["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"]},[[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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[4,"ptc-picture",{"lazy":[1]}]]],["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]}]]],["icon-asset.cjs",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[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"]}]]]], 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-button.cjs",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-image.cjs",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[4,"ptc-picture",{"lazy":[1]}]]],["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]}]]],["icon-asset.cjs",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[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"]}]]]], options);
19
19
  });
@@ -7,6 +7,7 @@
7
7
  border: 1px solid #c9c9c9;
8
8
  border-radius: 10px;
9
9
  position: relative;
10
+ overflow: hidden;
10
11
  }
11
12
  :host(.lottie-card) .card-border::after {
12
13
  content: "";
@@ -26,9 +27,14 @@
26
27
  border-bottom: 2px solid var(--color-primary-green);
27
28
  }
28
29
  :host(.lottie-card) .card-layout {
29
- display: flex;
30
- flex-flow: nowrap row;
31
- justify-content: center;
30
+ display: block;
31
+ }
32
+ @media only screen and (min-width: 992px) {
33
+ :host(.lottie-card) .card-layout {
34
+ display: flex;
35
+ flex-flow: nowrap row;
36
+ justify-content: center;
37
+ }
32
38
  }
33
39
  :host(.lottie-card) .link-wrapper {
34
40
  outline: none;
@@ -30,6 +30,11 @@
30
30
  border-radius: var(--ptc-border-radius-large);
31
31
  }
32
32
 
33
+ .lazy-bg {
34
+ background-image: none !important;
35
+ background-color: var(--color-primary-lightgrey);
36
+ }
37
+
33
38
  /* XS */
34
39
  /* max-width: $screen-xs-max */
35
40
  @media (max-width: 767px) {
@@ -1,4 +1,4 @@
1
- import { Component, Host, h, Prop, Listen } from '@stencil/core';
1
+ import { Component, Host, h, Prop, Listen, Element } from '@stencil/core';
2
2
  import { ResponsiveBgVariables } from '../../utils/interfaces';
3
3
  export class PtcImg {
4
4
  constructor() {
@@ -26,6 +26,14 @@ export class PtcImg {
26
26
  * Image type
27
27
  */
28
28
  this.imageType = 'smart-bg';
29
+ /**
30
+ * Image border shape
31
+ */
32
+ this.borderRadius = '';
33
+ /**
34
+ * Lazy loading option
35
+ */
36
+ this.loadMode = 'lazy-bg';
29
37
  }
30
38
  WindowResize() {
31
39
  this.setResponsiveBg();
@@ -36,8 +44,15 @@ export class PtcImg {
36
44
  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}` })));
37
45
  }
38
46
  componentDidLoad() {
47
+ this.addIntersectionObserver();
39
48
  this.setResponsiveBg();
40
49
  }
50
+ componentWillUpdate() {
51
+ console.log('componentWillUpdate!');
52
+ this.addIntersectionObserver();
53
+ this.setResponsiveBg();
54
+ }
55
+ //responsive image
41
56
  setResponsiveBg() {
42
57
  // Define local variables
43
58
  let backgrounds = document.querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
@@ -58,11 +73,46 @@ export class PtcImg {
58
73
  }
59
74
  }
60
75
  }
76
+ //lazy loading
77
+ addIntersectionObserver() {
78
+ if (!this.imgUrl) {
79
+ console.log("no image!");
80
+ return;
81
+ }
82
+ if ('IntersectionObserver' in window) {
83
+ let lazyLoadBgs = document.querySelectorAll(".lazy-bg");
84
+ let bgObserver = new IntersectionObserver((entries) => {
85
+ entries.forEach(entry => {
86
+ if (entry.isIntersecting) {
87
+ const image = entry.target;
88
+ image.classList.remove("lazy-bg");
89
+ console.log('loaded');
90
+ bgObserver.unobserve(image);
91
+ }
92
+ });
93
+ });
94
+ lazyLoadBgs.forEach(image => {
95
+ bgObserver.observe(image);
96
+ });
97
+ }
98
+ else {
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
+ // };
107
+ // }, 5000);
108
+ }
109
+ }
61
110
  getCssClassMap() {
62
111
  return {
63
112
  [this.imageType]: true,
64
113
  'ptc-img': true,
65
114
  [this.borderRadius]: true,
115
+ [this.loadMode]: true,
66
116
  };
67
117
  }
68
118
  getCurrentBreakPoints() {
@@ -76,9 +126,10 @@ export class PtcImg {
76
126
  // Add classes
77
127
  temp.className = 'hidden-' + env;
78
128
  // Found breakpoint
79
- if (temp.offsetParent !== document.body) {
129
+ if (temp.offsetParent === null) {
80
130
  // Remove our test node
81
131
  doc.body.removeChild(temp);
132
+ console.log('remove test node');
82
133
  // Return current breakpoint
83
134
  return env;
84
135
  }
@@ -205,20 +256,40 @@ export class PtcImg {
205
256
  "type": "string",
206
257
  "mutable": false,
207
258
  "complexType": {
208
- "original": "'radius-sm' | 'radius-md' | 'radius-lg'",
209
- "resolved": "\"radius-lg\" | \"radius-md\" | \"radius-sm\"",
259
+ "original": "'radius-sm' | 'radius-md' | 'radius-lg'| ''",
260
+ "resolved": "\"\" | \"radius-lg\" | \"radius-md\" | \"radius-sm\"",
210
261
  "references": {}
211
262
  },
212
263
  "required": false,
213
- "optional": true,
264
+ "optional": false,
214
265
  "docs": {
215
266
  "tags": [],
216
267
  "text": "Image border shape"
217
268
  },
218
269
  "attribute": "border-radius",
219
- "reflect": false
270
+ "reflect": false,
271
+ "defaultValue": "''"
272
+ },
273
+ "loadMode": {
274
+ "type": "string",
275
+ "mutable": false,
276
+ "complexType": {
277
+ "original": "'lazy-bg' | 'eager-bg'",
278
+ "resolved": "\"eager-bg\" | \"lazy-bg\"",
279
+ "references": {}
280
+ },
281
+ "required": false,
282
+ "optional": false,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": "Lazy loading option"
286
+ },
287
+ "attribute": "load-mode",
288
+ "reflect": false,
289
+ "defaultValue": "'lazy-bg'"
220
290
  }
221
291
  }; }
292
+ static get elementRef() { return "el"; }
222
293
  static get listeners() { return [{
223
294
  "name": "resize",
224
295
  "method": "WindowResize",
@@ -13614,7 +13614,7 @@ const PtcButton$1 = class extends HTMLElement {
13614
13614
  static get style() { return ptcButtonCss; }
13615
13615
  };
13616
13616
 
13617
- 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}: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:flex;flex-flow:nowrap row;justify-content:center}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
13617
+ const ptcCardCss = ":host{display:block}:host(.lottie-card) .card-border{box-shadow:1px 1px 14px 0 rgba(101, 101, 101, 0.35);border:1px solid #c9c9c9;border-radius:10px;position:relative;overflow:hidden}:host(.lottie-card) .card-border::after{content:\"\";height:40%;width:4px;position:absolute;top:30%;right:-2px;background-color:#74c34d;z-index:2;display:block}:host(.lottie-card) .card-border:hover{box-shadow:1px 1px 35px 0 rgba(101, 101, 101, 0.65)}:host(.lottie-card) .card-border:hover .card-body h3{border-bottom:2px solid var(--color-primary-green)}:host(.lottie-card) .card-layout{display:block}@media only screen and (min-width: 992px){:host(.lottie-card) .card-layout{display:flex;flex-flow:nowrap row;justify-content:center}}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
13618
13618
 
13619
13619
  const PtcCard$1 = class extends HTMLElement {
13620
13620
  constructor() {
@@ -13800,7 +13800,7 @@ let ResponsiveBgVariables = {
13800
13800
  interval: 250
13801
13801
  };
13802
13802
 
13803
- 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)}@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}}";
13803
+ 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}}";
13804
13804
 
13805
13805
  const PtcImg$1 = class extends HTMLElement {
13806
13806
  constructor() {
@@ -13830,6 +13830,14 @@ const PtcImg$1 = class extends HTMLElement {
13830
13830
  * Image type
13831
13831
  */
13832
13832
  this.imageType = 'smart-bg';
13833
+ /**
13834
+ * Image border shape
13835
+ */
13836
+ this.borderRadius = '';
13837
+ /**
13838
+ * Lazy loading option
13839
+ */
13840
+ this.loadMode = 'lazy-bg';
13833
13841
  }
13834
13842
  WindowResize() {
13835
13843
  this.setResponsiveBg();
@@ -13839,8 +13847,15 @@ const PtcImg$1 = class extends HTMLElement {
13839
13847
  return (h(Host, null, 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}` })));
13840
13848
  }
13841
13849
  componentDidLoad() {
13850
+ this.addIntersectionObserver();
13851
+ this.setResponsiveBg();
13852
+ }
13853
+ componentWillUpdate() {
13854
+ console.log('componentWillUpdate!');
13855
+ this.addIntersectionObserver();
13842
13856
  this.setResponsiveBg();
13843
13857
  }
13858
+ //responsive image
13844
13859
  setResponsiveBg() {
13845
13860
  // Define local variables
13846
13861
  let backgrounds = document.querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
@@ -13861,11 +13876,35 @@ const PtcImg$1 = class extends HTMLElement {
13861
13876
  }
13862
13877
  }
13863
13878
  }
13879
+ //lazy loading
13880
+ addIntersectionObserver() {
13881
+ if (!this.imgUrl) {
13882
+ console.log("no image!");
13883
+ return;
13884
+ }
13885
+ if ('IntersectionObserver' in window) {
13886
+ let lazyLoadBgs = document.querySelectorAll(".lazy-bg");
13887
+ let bgObserver = new IntersectionObserver((entries) => {
13888
+ entries.forEach(entry => {
13889
+ if (entry.isIntersecting) {
13890
+ const image = entry.target;
13891
+ image.classList.remove("lazy-bg");
13892
+ console.log('loaded');
13893
+ bgObserver.unobserve(image);
13894
+ }
13895
+ });
13896
+ });
13897
+ lazyLoadBgs.forEach(image => {
13898
+ bgObserver.observe(image);
13899
+ });
13900
+ }
13901
+ }
13864
13902
  getCssClassMap() {
13865
13903
  return {
13866
13904
  [this.imageType]: true,
13867
13905
  'ptc-img': true,
13868
13906
  [this.borderRadius]: true,
13907
+ [this.loadMode]: true,
13869
13908
  };
13870
13909
  }
13871
13910
  getCurrentBreakPoints() {
@@ -13879,9 +13918,10 @@ const PtcImg$1 = class extends HTMLElement {
13879
13918
  // Add classes
13880
13919
  temp.className = 'hidden-' + env;
13881
13920
  // Found breakpoint
13882
- if (temp.offsetParent !== document.body) {
13921
+ if (temp.offsetParent === null) {
13883
13922
  // Remove our test node
13884
13923
  doc.body.removeChild(temp);
13924
+ console.log('remove test node');
13885
13925
  // Return current breakpoint
13886
13926
  return env;
13887
13927
  }
@@ -13889,6 +13929,7 @@ const PtcImg$1 = class extends HTMLElement {
13889
13929
  // Breakpoint not found
13890
13930
  return 'Unknown breakpoint';
13891
13931
  }
13932
+ get el() { return this; }
13892
13933
  static get style() { return ptcImgCss; }
13893
13934
  };
13894
13935
 
@@ -14275,7 +14316,7 @@ const PtcCard = /*@__PURE__*/proxyCustomElement(PtcCard$1, [1,"ptc-card",{"cardT
14275
14316
  const PtcDate = /*@__PURE__*/proxyCustomElement(PtcDate$1, [1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]);
14276
14317
  const PtcFooter = /*@__PURE__*/proxyCustomElement(PtcFooter$1, [1,"ptc-footer"]);
14277
14318
  const PtcImage = /*@__PURE__*/proxyCustomElement(PtcImage$1, [1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]);
14278
- const PtcImg = /*@__PURE__*/proxyCustomElement(PtcImg$1, [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"]},[[9,"resize","WindowResize"]]]);
14319
+ const PtcImg = /*@__PURE__*/proxyCustomElement(PtcImg$1, [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"]]]);
14279
14320
  const PtcLink = /*@__PURE__*/proxyCustomElement(PtcLink$1, [1,"ptc-link",{"disabled":[516],"external":[516],"href":[1],"target":[1],"linkTitle":[1,"link-title"],"theme":[1],"uppercase":[4],"fontSize":[1,"font-size"]}]);
14280
14321
  const PtcList = /*@__PURE__*/proxyCustomElement(PtcList$1, [0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]);
14281
14322
  const PtcLottie = /*@__PURE__*/proxyCustomElement(PtcLottie$1, [1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]);
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["ptc-card",[[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",[[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",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer",[[1,"ptc-footer"]]],["ptc-image",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["ptc-img",[[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"]},[[9,"resize","WindowResize"]]]]],["ptc-list",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav",[[1,"ptc-nav"]]],["ptc-nav-item",[[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",[[4,"ptc-overlay"]]],["ptc-para",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture",[[4,"ptc-picture",{"lazy":[1]}]]],["ptc-spacer",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title",[[1,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["icon-asset",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]],["lottie-player",[[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",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]]], options);
13
+ return bootstrapLazy([["ptc-card",[[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",[[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",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer",[[1,"ptc-footer"]]],["ptc-image",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["ptc-img",[[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",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav",[[1,"ptc-nav"]]],["ptc-nav-item",[[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",[[4,"ptc-overlay"]]],["ptc-para",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture",[[4,"ptc-picture",{"lazy":[1]}]]],["ptc-spacer",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title",[[1,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["icon-asset",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]],["lottie-player",[[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",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-5b1c792c.js';
2
2
 
3
- 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}: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:flex;flex-flow:nowrap row;justify-content:center}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
3
+ const ptcCardCss = ":host{display:block}:host(.lottie-card) .card-border{box-shadow:1px 1px 14px 0 rgba(101, 101, 101, 0.35);border:1px solid #c9c9c9;border-radius:10px;position:relative;overflow:hidden}:host(.lottie-card) .card-border::after{content:\"\";height:40%;width:4px;position:absolute;top:30%;right:-2px;background-color:#74c34d;z-index:2;display:block}:host(.lottie-card) .card-border:hover{box-shadow:1px 1px 35px 0 rgba(101, 101, 101, 0.65)}:host(.lottie-card) .card-border:hover .card-body h3{border-bottom:2px solid var(--color-primary-green)}:host(.lottie-card) .card-layout{display:block}@media only screen and (min-width: 992px){:host(.lottie-card) .card-layout{display:flex;flex-flow:nowrap row;justify-content:center}}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}";
4
4
 
5
5
  const PtcCard = class {
6
6
  constructor(hostRef) {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-5b1c792c.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-5b1c792c.js';
2
2
 
3
3
  let ResponsiveBgVariables = {
4
4
  envs: ['xs', 'sm', 'md', 'lg'],
@@ -6,7 +6,7 @@ let ResponsiveBgVariables = {
6
6
  interval: 250
7
7
  };
8
8
 
9
- 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)}@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
+ 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}}";
10
10
 
11
11
  const PtcImg = class {
12
12
  constructor(hostRef) {
@@ -35,6 +35,14 @@ const PtcImg = class {
35
35
  * Image type
36
36
  */
37
37
  this.imageType = 'smart-bg';
38
+ /**
39
+ * Image border shape
40
+ */
41
+ this.borderRadius = '';
42
+ /**
43
+ * Lazy loading option
44
+ */
45
+ this.loadMode = 'lazy-bg';
38
46
  }
39
47
  WindowResize() {
40
48
  this.setResponsiveBg();
@@ -44,8 +52,15 @@ const PtcImg = class {
44
52
  return (h(Host, null, 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}` })));
45
53
  }
46
54
  componentDidLoad() {
55
+ this.addIntersectionObserver();
47
56
  this.setResponsiveBg();
48
57
  }
58
+ componentWillUpdate() {
59
+ console.log('componentWillUpdate!');
60
+ this.addIntersectionObserver();
61
+ this.setResponsiveBg();
62
+ }
63
+ //responsive image
49
64
  setResponsiveBg() {
50
65
  // Define local variables
51
66
  let backgrounds = document.querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
@@ -66,11 +81,35 @@ const PtcImg = class {
66
81
  }
67
82
  }
68
83
  }
84
+ //lazy loading
85
+ addIntersectionObserver() {
86
+ if (!this.imgUrl) {
87
+ console.log("no image!");
88
+ return;
89
+ }
90
+ if ('IntersectionObserver' in window) {
91
+ let lazyLoadBgs = document.querySelectorAll(".lazy-bg");
92
+ let bgObserver = new IntersectionObserver((entries) => {
93
+ entries.forEach(entry => {
94
+ if (entry.isIntersecting) {
95
+ const image = entry.target;
96
+ image.classList.remove("lazy-bg");
97
+ console.log('loaded');
98
+ bgObserver.unobserve(image);
99
+ }
100
+ });
101
+ });
102
+ lazyLoadBgs.forEach(image => {
103
+ bgObserver.observe(image);
104
+ });
105
+ }
106
+ }
69
107
  getCssClassMap() {
70
108
  return {
71
109
  [this.imageType]: true,
72
110
  'ptc-img': true,
73
111
  [this.borderRadius]: true,
112
+ [this.loadMode]: true,
74
113
  };
75
114
  }
76
115
  getCurrentBreakPoints() {
@@ -84,9 +123,10 @@ const PtcImg = class {
84
123
  // Add classes
85
124
  temp.className = 'hidden-' + env;
86
125
  // Found breakpoint
87
- if (temp.offsetParent !== document.body) {
126
+ if (temp.offsetParent === null) {
88
127
  // Remove our test node
89
128
  doc.body.removeChild(temp);
129
+ console.log('remove test node');
90
130
  // Return current breakpoint
91
131
  return env;
92
132
  }
@@ -94,6 +134,7 @@ const PtcImg = class {
94
134
  // Breakpoint not found
95
135
  return 'Unknown breakpoint';
96
136
  }
137
+ get el() { return getElement(this); }
97
138
  };
98
139
  PtcImg.style = ptcImgCss;
99
140
 
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["ptc-card",[[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",[[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",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer",[[1,"ptc-footer"]]],["ptc-image",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["ptc-img",[[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"]},[[9,"resize","WindowResize"]]]]],["ptc-list",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav",[[1,"ptc-nav"]]],["ptc-nav-item",[[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",[[4,"ptc-overlay"]]],["ptc-para",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture",[[4,"ptc-picture",{"lazy":[1]}]]],["ptc-spacer",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title",[[1,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["icon-asset",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]],["lottie-player",[[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",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]]], options);
16
+ return bootstrapLazy([["ptc-card",[[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",[[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",[[1,"ptc-lottie",{"jsonSrc":[1025,"json-src"],"speed":[1026]}]]],["list-item",[[4,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"]}]]],["my-component",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button",[[4,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"]}]]],["ptc-footer",[[1,"ptc-footer"]]],["ptc-image",[[1,"ptc-image",{"src":[1],"alt":[1],"oldSrc":[32]}]]],["ptc-img",[[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",[[0,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-nav",[[1,"ptc-nav"]]],["ptc-nav-item",[[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",[[4,"ptc-overlay"]]],["ptc-para",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture",[[4,"ptc-picture",{"lazy":[1]}]]],["ptc-spacer",[[1,"ptc-spacer",{"breakpoint":[1],"size":[1],"direction":[1]}]]],["ptc-span",[[1,"ptc-span",{"spanStyle":[1,"span-style"],"display":[1],"styles":[1]}]]],["ptc-title",[[1,"ptc-title",{"type":[1],"textAlign":[1,"text-align"],"upperline":[1]}]]],["icon-asset",[[0,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]],["lottie-player",[[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",[[1,"ptc-date",{"year":[2],"month":[2],"day":[2],"country":[1],"dateString":[1,"date-string"],"dateStyles":[1,"date-styles"]}]]]], options);
17
17
  });
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as i,g as n}from"./p-4f366fc3.js";let s={envs:["xs","sm","md","lg"],selector:".ptc-img",interval:250};const o=class{constructor(e){t(this,e),this.sizeXs="510x340",this.sizeSm="1240x496",this.sizeMd="1366x500",this.sizeLg="1920x1080",this.imageType="smart-bg",this.borderRadius="",this.loadMode="lazy-bg"}WindowResize(){this.setResponsiveBg()}render(){const t=this.getCssClassMap();return e(i,null,e("div",{class:t,"data-xs":`${this.imgUrl}:${this.sizeXs}`,"data-sm":`${this.imgUrl}:${this.sizeSm}`,"data-md":`${this.imgUrl}:${this.sizeMd}`,"data-lg":`${this.imgUrl}:${this.sizeLg}`}))}componentDidLoad(){this.addIntersectionObserver(),this.setResponsiveBg()}componentWillUpdate(){console.log("componentWillUpdate!"),this.addIntersectionObserver(),this.setResponsiveBg()}setResponsiveBg(){let t,e,i=document.querySelectorAll(s.selector),n=this.getCurrentBreakPoints();console.log("current breakpoint: "+n);for(var o=0,r=i.length;o<r;o++)t=i[o],e=t.getAttribute("data-"+n),null!==e?t.style.backgroundImage="url('"+e+"')":"object"==typeof console&&console.warn("Data attribute: data-"+n+" not found on element:\n\n"+t.outerHTML+"\n\n\n")}addIntersectionObserver(){if(this.imgUrl){if("IntersectionObserver"in window){let t=document.querySelectorAll(".lazy-bg"),e=new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){const i=t.target;i.classList.remove("lazy-bg"),console.log("loaded"),e.unobserve(i)}}))}));t.forEach((t=>{e.observe(t)}))}}else console.log("no image!")}getCssClassMap(){return{[this.imageType]:!0,"ptc-img":!0,[this.borderRadius]:!0,[this.loadMode]:!0}}getCurrentBreakPoints(){let t,e=window.document,i=e.createElement("div");e.body.appendChild(i);for(let n=s.envs.length-1;n>=0;n--)if(t=s.envs[n],i.className="hidden-"+t,null===i.offsetParent)return e.body.removeChild(i),console.log("remove test node"),t;return"Unknown breakpoint"}get el(){return n(this)}};o.style=".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}}";export{o as ptc_img}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as r}from"./p-4f366fc3.js";const o=class{constructor(e){t(this,e),this.cardType="custom-card",this.cardHref=void 0,this.target="_self",this.rel=void 0,this.hasImage=!1,this.hasVideo=!1,this.hasLottie=!1}render(){const t=this.cardHref?"a":"div",o=this.getCssClassMap();return e(r,Object.assign({},this.cardType?{class:this.cardType}:{}),this.styles&&e("style",null,this.styles),e("div",{class:"card-border",part:"border-wrapper"},e(t,Object.assign({class:o,part:"card-layout"},this.cardHref?{href:this.cardHref}:{},this.target&&this.cardHref?{target:this.target}:{},this.rel&&this.cardHref?{rel:this.rel}:{}),this.hasImage||this.hasLottie||this.hasVideo?e("div",{class:"card-media",part:"media-wrapper"},this.getMediaSlot?e("slot",{name:this.getMediaSlot()}):null):null,e("div",{class:"card-body",part:"body-wrapper"},e("slot",{name:"slot-before-heading"}),this.heading?[e("h3",{class:"ptc-h3",part:"card-heading"},this.heading),e("slot",{name:"slot-after-heading"})]:null,e("slot",{name:"slot-description"}),this.cardDate?e("ptc-date",{"date-string":`${this.cardDate}`,"date-styles":"::part(part-ptc-date){color:#40434a;font-size:var(--ptc-font-size-medium);margin-top:var(--ptc-element-spacing-04);display:inline-block;}"}):null))))}getCssClassMap(){return{"card-layout":!0,"link-wrapper":!!this.cardType}}getMediaSlot(){return this.hasLottie?"slot-lottie":this.hasVideo?"slot-video":this.hasImage?"slot-image":null}};o.style=':host{display:block}:host(.lottie-card) .card-border{box-shadow:1px 1px 14px 0 rgba(101, 101, 101, 0.35);border:1px solid #c9c9c9;border-radius:10px;position:relative;overflow:hidden}:host(.lottie-card) .card-border::after{content:"";height:40%;width:4px;position:absolute;top:30%;right:-2px;background-color:#74c34d;z-index:2;display:block}:host(.lottie-card) .card-border:hover{box-shadow:1px 1px 35px 0 rgba(101, 101, 101, 0.65)}:host(.lottie-card) .card-border:hover .card-body h3{border-bottom:2px solid var(--color-primary-green)}:host(.lottie-card) .card-layout{display:block}@media only screen and (min-width: 992px){:host(.lottie-card) .card-layout{display:flex;flex-flow:nowrap row;justify-content:center}}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:"";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}';export{o as ptc_card}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-4f366fc3.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-aef5dc05",[[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]}]]],["p-76dfa56f",[[1,"ptc-link",{disabled:[516],external:[516],href:[1],target:[1],linkTitle:[1,"link-title"],theme:[1],uppercase:[4],fontSize:[1,"font-size"]}]]],["p-07624831",[[1,"ptc-lottie",{jsonSrc:[1025,"json-src"],speed:[1026]}]]],["p-31f4bd0c",[[4,"list-item",{listType:[1,"list-type"],linkHref:[1,"link-href"]}]]],["p-ac0ad25e",[[1,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-85131a2a",[[4,"ptc-button",{disabled:[516],type:[1],color:[1],iconAnimation:[1,"icon-animation"],iconPosition:[1,"icon-position"]}]]],["p-0a44a2f7",[[1,"ptc-footer"]]],["p-c169281f",[[1,"ptc-image",{src:[1],alt:[1],oldSrc:[32]}]]],["p-66dd07cb",[[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"]},[[9,"resize","WindowResize"]]]]],["p-7a63ca63",[[0,"ptc-list",{listType:[1,"list-type"],listItems:[16]}]]],["p-3af43980",[[1,"ptc-nav"]]],["p-fe6a3ba5",[[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"]]]]],["p-662ae9b6",[[4,"ptc-overlay"]]],["p-83d98048",[[1,"ptc-para",{fontSize:[1,"font-size"],fontWeight:[1,"font-weight"],paraStyle:[1,"para-style"],paraMargin:[1,"para-margin"]}]]],["p-01dc360c",[[4,"ptc-picture",{lazy:[1]}]]],["p-2d357f92",[[1,"ptc-spacer",{breakpoint:[1],size:[1],direction:[1]}]]],["p-70adca2e",[[1,"ptc-span",{spanStyle:[1,"span-style"],display:[1],styles:[1]}]]],["p-77f87fa3",[[1,"ptc-title",{type:[1],textAlign:[1,"text-align"],upperline:[1]}]]],["p-1a26bade",[[0,"icon-asset",{name:[1],size:[1],type:[1],spin:[1],pulse:[1],color:[1]}]]],["p-ce8b8a72",[[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]}]]],["p-00b6c442",[[1,"ptc-date",{year:[2],month:[2],day:[2],country:[1],dateString:[1,"date-string"],dateStyles:[1,"date-styles"]}]]]],e)));
1
+ import{p as e,b as t}from"./p-4f366fc3.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-d4f117d2",[[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]}]]],["p-76dfa56f",[[1,"ptc-link",{disabled:[516],external:[516],href:[1],target:[1],linkTitle:[1,"link-title"],theme:[1],uppercase:[4],fontSize:[1,"font-size"]}]]],["p-07624831",[[1,"ptc-lottie",{jsonSrc:[1025,"json-src"],speed:[1026]}]]],["p-31f4bd0c",[[4,"list-item",{listType:[1,"list-type"],linkHref:[1,"link-href"]}]]],["p-ac0ad25e",[[1,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-85131a2a",[[4,"ptc-button",{disabled:[516],type:[1],color:[1],iconAnimation:[1,"icon-animation"],iconPosition:[1,"icon-position"]}]]],["p-0a44a2f7",[[1,"ptc-footer"]]],["p-c169281f",[[1,"ptc-image",{src:[1],alt:[1],oldSrc:[32]}]]],["p-2b2895f0",[[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"]]]]],["p-7a63ca63",[[0,"ptc-list",{listType:[1,"list-type"],listItems:[16]}]]],["p-3af43980",[[1,"ptc-nav"]]],["p-fe6a3ba5",[[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"]]]]],["p-662ae9b6",[[4,"ptc-overlay"]]],["p-83d98048",[[1,"ptc-para",{fontSize:[1,"font-size"],fontWeight:[1,"font-weight"],paraStyle:[1,"para-style"],paraMargin:[1,"para-margin"]}]]],["p-01dc360c",[[4,"ptc-picture",{lazy:[1]}]]],["p-2d357f92",[[1,"ptc-spacer",{breakpoint:[1],size:[1],direction:[1]}]]],["p-70adca2e",[[1,"ptc-span",{spanStyle:[1,"span-style"],display:[1],styles:[1]}]]],["p-77f87fa3",[[1,"ptc-title",{type:[1],textAlign:[1,"text-align"],upperline:[1]}]]],["p-1a26bade",[[0,"icon-asset",{name:[1],size:[1],type:[1],spin:[1],pulse:[1],color:[1]}]]],["p-ce8b8a72",[[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]}]]],["p-00b6c442",[[1,"ptc-date",{year:[2],month:[2],day:[2],country:[1],dateString:[1,"date-string"],dateStyles:[1,"date-styles"]}]]]],e)));
@@ -1,4 +1,5 @@
1
1
  export declare class PtcImg {
2
+ el: HTMLElement;
2
3
  /**
3
4
  * Image size for smallest screen
4
5
  * <=767px
@@ -30,11 +31,17 @@ export declare class PtcImg {
30
31
  /**
31
32
  * Image border shape
32
33
  */
33
- borderRadius?: 'radius-sm' | 'radius-md' | 'radius-lg';
34
+ borderRadius: 'radius-sm' | 'radius-md' | 'radius-lg' | '';
35
+ /**
36
+ * Lazy loading option
37
+ */
38
+ loadMode: 'lazy-bg' | 'eager-bg';
34
39
  WindowResize(): void;
35
40
  render(): any;
36
41
  componentDidLoad(): void;
42
+ componentWillUpdate(): void;
37
43
  setResponsiveBg(): void;
44
+ addIntersectionObserver(): void;
38
45
  private getCssClassMap;
39
46
  private getCurrentBreakPoints;
40
47
  }
@@ -156,7 +156,7 @@ export namespace Components {
156
156
  /**
157
157
  * Image border shape
158
158
  */
159
- "borderRadius"?: 'radius-sm' | 'radius-md' | 'radius-lg';
159
+ "borderRadius": 'radius-sm' | 'radius-md' | 'radius-lg'| '';
160
160
  /**
161
161
  * Image type
162
162
  */
@@ -165,6 +165,10 @@ export namespace Components {
165
165
  * Image Src
166
166
  */
167
167
  "imgUrl": string;
168
+ /**
169
+ * Lazy loading option
170
+ */
171
+ "loadMode": 'lazy-bg' | 'eager-bg';
168
172
  /**
169
173
  * Image solution for large screen >=1200px
170
174
  */
@@ -624,7 +628,7 @@ declare namespace LocalJSX {
624
628
  /**
625
629
  * Image border shape
626
630
  */
627
- "borderRadius"?: 'radius-sm' | 'radius-md' | 'radius-lg';
631
+ "borderRadius"?: 'radius-sm' | 'radius-md' | 'radius-lg'| '';
628
632
  /**
629
633
  * Image type
630
634
  */
@@ -633,6 +637,10 @@ declare namespace LocalJSX {
633
637
  * Image Src
634
638
  */
635
639
  "imgUrl"?: string;
640
+ /**
641
+ * Lazy loading option
642
+ */
643
+ "loadMode"?: 'lazy-bg' | 'eager-bg';
636
644
  /**
637
645
  * Image solution for large screen >=1200px
638
646
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptcwebops/ptcw-design",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as e}from"./p-4f366fc3.js";let s={envs:["xs","sm","md","lg"],selector:".ptc-img",interval:250};const a=class{constructor(i){t(this,i),this.sizeXs="510x340",this.sizeSm="1240x496",this.sizeMd="1366x500",this.sizeLg="1920x1080",this.imageType="smart-bg"}WindowResize(){this.setResponsiveBg()}render(){const t=this.getCssClassMap();return i(e,null,i("div",{class:t,"data-xs":`${this.imgUrl}:${this.sizeXs}`,"data-sm":`${this.imgUrl}:${this.sizeSm}`,"data-md":`${this.imgUrl}:${this.sizeMd}`,"data-lg":`${this.imgUrl}:${this.sizeLg}`}))}componentDidLoad(){this.setResponsiveBg()}setResponsiveBg(){let t,i,e=document.querySelectorAll(s.selector),a=this.getCurrentBreakPoints();console.log("current breakpoint: "+a);for(var r=0,n=e.length;r<n;r++)t=e[r],i=t.getAttribute("data-"+a),null!==i?t.style.backgroundImage="url('"+i+"')":"object"==typeof console&&console.warn("Data attribute: data-"+a+" not found on element:\n\n"+t.outerHTML+"\n\n\n")}getCssClassMap(){return{[this.imageType]:!0,"ptc-img":!0,[this.borderRadius]:!0}}getCurrentBreakPoints(){let t,i=window.document,e=i.createElement("div");i.body.appendChild(e);for(let a=s.envs.length-1;a>=0;a--)if(t=s.envs[a],e.className="hidden-"+t,e.offsetParent!==document.body)return i.body.removeChild(e),t;return"Unknown breakpoint"}};a.style=".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)}@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}}";export{a as ptc_img}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as r}from"./p-4f366fc3.js";const o=class{constructor(e){t(this,e),this.cardType="custom-card",this.cardHref=void 0,this.target="_self",this.rel=void 0,this.hasImage=!1,this.hasVideo=!1,this.hasLottie=!1}render(){const t=this.cardHref?"a":"div",o=this.getCssClassMap();return e(r,Object.assign({},this.cardType?{class:this.cardType}:{}),this.styles&&e("style",null,this.styles),e("div",{class:"card-border",part:"border-wrapper"},e(t,Object.assign({class:o,part:"card-layout"},this.cardHref?{href:this.cardHref}:{},this.target&&this.cardHref?{target:this.target}:{},this.rel&&this.cardHref?{rel:this.rel}:{}),this.hasImage||this.hasLottie||this.hasVideo?e("div",{class:"card-media",part:"media-wrapper"},this.getMediaSlot?e("slot",{name:this.getMediaSlot()}):null):null,e("div",{class:"card-body",part:"body-wrapper"},e("slot",{name:"slot-before-heading"}),this.heading?[e("h3",{class:"ptc-h3",part:"card-heading"},this.heading),e("slot",{name:"slot-after-heading"})]:null,e("slot",{name:"slot-description"}),this.cardDate?e("ptc-date",{"date-string":`${this.cardDate}`,"date-styles":"::part(part-ptc-date){color:#40434a;font-size:var(--ptc-font-size-medium);margin-top:var(--ptc-element-spacing-04);display:inline-block;}"}):null))))}getCssClassMap(){return{"card-layout":!0,"link-wrapper":!!this.cardType}}getMediaSlot(){return this.hasLottie?"slot-lottie":this.hasVideo?"slot-video":this.hasImage?"slot-image":null}};o.style=':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}: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:flex;flex-flow:nowrap row;justify-content:center}:host(.lottie-card) .link-wrapper{outline:none;text-decoration:none}:host(.lottie-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.lottie-card) .card-media{flex-basis:40%;border-right:1px solid #c9c9c9}:host(.lottie-card) .card-body{flex-basis:60%;align-self:center;padding:0 30px 10px}:host(.lottie-card) .card-body h3{display:inline-block;line-height:1;color:#40434a;font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-medium);text-transform:uppercase;border-bottom:2px solid transparent;margin-bottom:var(--ptc-element-spacing-02)}:host(.simple-card) .card-layout{display:block}:host(.simple-card) .link-wrapper{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.simple-card) .link-wrapper:hover .card-body h3::before{width:100%}:host(.simple-card) .link-wrapper:hover ::slotted([slot=slot-after-heading]){margin-left:15px}:host(.simple-card) .card-body h3{color:#40434a;font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-black);line-height:1.86;text-transform:uppercase;position:relative;margin-bottom:var(--ptc-element-spacing-02);display:inline-block}:host(.simple-card) .card-body h3::before{display:block;position:absolute;content:"";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-secondary-turtlegreen);bottom:1px;transition:width var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.simple-card) ::slotted([slot=slot-after-heading]){margin-left:5px;transition:margin-left var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) .card-border{overflow:hidden;filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 3px 6px);width:100%}:host(.clip-edge-card) .card-border:hover{filter:drop-shadow(rgba(0, 0, 0, 0.32) 0px 6px 12px)}:host(.clip-edge-card) .card-layout{display:block}:host(.clip-edge-card) .link-wrapper{outline:none;text-decoration:none}:host(.clip-edge-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.clip-edge-card) .card-media{position:relative;width:100%;height:124px;overflow:hidden;border-radius:var(--ptc-border-radius-medium)}:host(.clip-edge-card) .card-body{transform:translateY(calc((-1) * var(--ptc-element-spacing-04)));overflow:hidden;width:calc(95% - var(--ptc-element-spacing-04) - var(--ptc-element-spacing-06));font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-dense);color:#40434a;clip-path:var(--ptc-clip-path-bottom-right);background-color:var(--color-white);border-radius:var(--ptc-border-radius-medium);padding:var(--ptc-element-spacing-05) var(--ptc-element-spacing-04) var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}:host(.clip-edge-card) .card-body h3{display:inline-block;margin:0px;font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-dense);color:var(--color-primary-uigrey);text-decoration:none;border-bottom:2px solid transparent;transition:border-bottom var(--ptc-transition-medium) var(--ptc-standard-ease);margin-bottom:var(--ptc-element-spacing-03)}:host(.clip-edge-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-medium) var(--ptc-standard-ease)}:host(.clip-edge-card) ::slotted([slot=slot-image]){display:block;width:100%;height:100%;transform:scale(1);transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transform-origin:top center}:host(.clip-edge-card) .link-wrapper:hover .card-body h3{border-bottom:2px solid var(--color-secondary-turtlegreen)}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:54px;opacity:1}:host(.clip-edge-card) .link-wrapper:hover ::slotted([slot=slot-image]){transform:scale(1.1)}:host(.hightlight-card) .card-border{box-shadow:0px 3px 6px rgba(0, 0, 0, 0.16);width:100%;border-radius:var(--ptc-border-radius-medium);overflow:hidden}:host(.hightlight-card) .card-border:hover .card-media{transform:scale(1.1)}:host(.hightlight-card) .card-layout{display:block;position:relative}:host(.hightlight-card) .link-wrapper{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover{outline:none;text-decoration:none}:host(.hightlight-card) .link-wrapper:hover ::slotted([slot=slot-description]){height:var(--ptc-layout-spacing-05);opacity:1}:host(.hightlight-card) .card-media{width:100%;height:auto;min-height:450px;position:relative;transform:scale(1);transform-origin:center bottom;transition:transform var(--ptc-transition-medium) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}:host(.hightlight-card) .card-body{position:absolute;bottom:0;top:auto;left:0;right:auto;padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06);background-color:var(--color-white)}:host(.hightlight-card) .card-body h3{font-size:30px;line-height:1.27;font-weight:var(--ptc-font-weight-bold);color:var(--color-primary-uigrey);margin:var(--ptc-element-spacing-04) 0}:host(.hightlight-card) ::slotted([slot=slot-description]){height:0;opacity:0;transition:height var(--ptc-transition-medium) var(--ptc-standard-ease), opacity var(--ptc-transition-fast) var(--ptc-standard-ease);transition-delay:var(--ptc-delay-medium)}';export{o as ptc_card}