@ptcwebops/ptcw-design 0.4.4 → 0.4.6

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.
@@ -62,7 +62,7 @@ let IconAsset = class {
62
62
  };
63
63
  IconAsset.style = iconAssetCss;
64
64
 
65
- const ptcAnnouncementCss = ":host{display:block}.announcement{width:100%;position:relative;background-color:#e4e7e9;z-index:860;background-size:cover;background-repeat:repeat-x;border:1px solid var(--color-secondary-turtlegreen);-webkit-box-shadow:1px 1px 9px 0 rgba(0, 0, 0, 0.56);box-shadow:1px 1px 9px 0 rgba(0, 0, 0, 0.56);z-index:999;display:none}.visible{display:block}.content-wrapper{display:flex;padding:5px 15px;margin:0 auto;align-items:center;justify-content:space-between}@media screen and (min-width: 768px){.content-wrapper{padding:10px 15px}}@media screen and (min-width: 768px){.temp-container{width:750px}}@media screen and (min-width: 992px){.temp-container{width:970px}}@media screen and (min-width: 1200px){.temp-container{width:1170px}}@media screen and (min-width: 1440px){.temp-container{width:1400px}}@media screen and (min-width: 1600px){.temp-container{width:1560px}}.left-content{display:flex;flex-basis:82%;flex-direction:column}@media screen and (min-width: 768px){.left-content{align-items:flex-start;justify-content:flex-start}}.title{flex-basis:18%;font-family:Raleway;font-size:13px;font-weight:800;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:1px;text-align:left;color:#40434a;text-transform:uppercase}.ptc-svg-btn{flex-basis:18%}.bar-close{padding-right:15px}.description{flex-basis:82%;font-family:Raleway;font-size:13px;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.4;letter-spacing:normal;text-align:left;color:#40434a;}a{color:#3b4550;-webkit-transition:color 0.3s ease;-o-transition:color 0.3s ease;transition:color 0.3s ease;font-weight:700;border-bottom:0.15rem solid #74c34d;text-decoration:none;margin-left:16px}a:hover{color:#74c34d;text-decoration:none}@media (min-width: 768px){.bar-close{padding-right:0px}}@media (min-width: 992px){.left-content{flex-direction:row;align-items:center}.title{font-size:14px;font-weight:800;line-height:1.86;letter-spacing:1.4px}.description{font-size:16px;font-weight:500;line-height:1.6}}";
65
+ const ptcAnnouncementCss = ":host{display:block}.announcement{width:100%;position:relative;background-color:#e4e7e9;z-index:860;background-size:cover;background-repeat:repeat-x;border:1px solid var(--color-secondary-turtlegreen);-webkit-box-shadow:1px 1px 9px 0 rgba(0, 0, 0, 0.56);box-shadow:1px 1px 9px 0 rgba(0, 0, 0, 0.56);z-index:999;display:none}.visible{display:block}.content-wrapper{display:flex;padding:5px 15px;margin:0 auto;align-items:center;justify-content:space-between}@media screen and (min-width: 768px){.content-wrapper{padding:10px 15px}}@media screen and (min-width: 768px){.temp-container{width:750px}}@media screen and (min-width: 992px){.temp-container{width:970px}}@media screen and (min-width: 1200px){.temp-container{width:1170px}}@media screen and (min-width: 1440px){.temp-container{width:1400px}}@media screen and (min-width: 1600px){.temp-container{width:1560px}}.left-content{display:flex;flex-basis:82%;flex-direction:column}@media screen and (min-width: 768px){.left-content{align-items:flex-start;justify-content:flex-start}}.title{flex-basis:18%;font-family:Raleway;font-size:13px;font-weight:800;font-stretch:normal;font-style:normal;line-height:2.6;letter-spacing:1px;text-align:left;color:#40434a;text-transform:uppercase}.ptc-svg-btn{flex-basis:18%}.bar-close{padding-right:15px}.description{flex-basis:82%;font-family:Raleway;font-size:13px;font-weight:500;font-stretch:normal;font-style:normal;line-height:1.4;letter-spacing:normal;text-align:left;color:#40434a;}a{color:var(--color-blue-07);-webkit-transition:color 0.3s ease;-o-transition:color 0.3s ease;transition:color 0.3s ease;font-weight:700;text-decoration:underline;margin-left:16px}a:hover{color:var(--color-blue-08)}a:focus{outline:3px solid var(--color-blue-07);outline-offset:0.25rem;border-radius:4px}a:visited{color:var(--color-blue-09)}@media (min-width: 768px){.bar-close{padding-right:0px}}@media (min-width: 992px){.left-content{flex-direction:row;align-items:center}.title{font-size:14px;font-weight:800;line-height:1.86;letter-spacing:1.4px}.description{font-size:16px;font-weight:500;line-height:1.6}}";
66
66
 
67
67
  let PtcAnnouncement = class {
68
68
  constructor(hostRef) {
@@ -817,96 +817,74 @@ const ptcMobileSelectCss = ".mobileSelect{position:relative;z-index:0;opacity:0;
817
817
  let PtcMobileSelect = class {
818
818
  constructor(hostRef) {
819
819
  index.registerInstance(this, hostRef);
820
+ /**
821
+ * Selected Id
822
+ * - initialize the id(string) of default wheel
823
+ */
824
+ this.selectedId = '';
820
825
  /**
821
826
  * Confirm Text
827
+ * - translation goes here
822
828
  */
823
829
  this.ensureBtnText = 'Confirm';
824
830
  /**
825
831
  * Cancel Text
832
+ * - translation goes here
826
833
  */
827
834
  this.cancelBtnText = 'Cancel';
828
835
  /**
829
836
  * Mobile select list title (Optional)
830
837
  */
831
838
  this.listTitle = undefined;
839
+ /**
840
+ * link url
841
+ */
842
+ this.linkUrl = undefined;
832
843
  }
833
844
  render() {
834
- return (index.h("ptc-responsive-wrapper", null, index.h("div", { class: "mobile-select-wrapper" }, index.h("div", { id: this.triggerName }, this.linkText), index.h("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white" }))));
845
+ return (index.h("div", { class: "mobile-select-wrapper" }, index.h("div", { id: this.triggerName }, this.selectedText), index.h("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white" })));
835
846
  }
836
847
  componentDidRender() {
848
+ let currentId = this.selectedId; //input current lang
849
+ let storeIndex = 0;
837
850
  new mobileSelect({
838
851
  trigger: `#${this.triggerName}`,
839
852
  title: `${this.listTitle ? this.listTitle : ''}`,
840
- wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ["test1", 'test2'] }],
853
+ wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ['test1', 'test2'] }],
841
854
  position: [0],
842
855
  ensureBtnText: this.ensureBtnText,
843
856
  cancelBtnText: this.cancelBtnText,
844
857
  ensureBtnColor: 'var(--color-gray-12)',
845
858
  cancelBtnColor: 'var(--color-gray-12)',
846
859
  titleColor: 'var(--color-gray-12)',
860
+ onShow: function (e) {
861
+ if (currentId) {
862
+ let liEle = document.querySelectorAll('.selectContainer li');
863
+ liEle.forEach((currentValue, currentIndex) => {
864
+ if (currentValue.getAttribute('data-id') == currentId) {
865
+ storeIndex = currentIndex;
866
+ return;
867
+ }
868
+ });
869
+ e.locatePosition(0, storeIndex);
870
+ }
871
+ else {
872
+ return;
873
+ }
874
+ },
875
+ callback: function (indexArr, data) {
876
+ if (this.linkUrl !== undefined) {
877
+ window.location.href = this.linkUrl + '/' + data[0].id;
878
+ }
879
+ else {
880
+ console.log('index: ' + indexArr + ', id: ' + data[0].id + '; No link url founded!');
881
+ }
882
+ }.bind(this),
847
883
  });
848
884
  }
849
885
  };
850
886
  PtcMobileSelect.style = ptcMobileSelectCss;
851
887
 
852
- const ptcResponsiveWrapperCss = ":host{display:block}";
853
-
854
- let PtcResponsiveWrapper = class {
855
- constructor(hostRef) {
856
- index.registerInstance(this, hostRef);
857
- }
858
- componentDidLoad() {
859
- this.ro = new ResizeObserver(entries => {
860
- for (const entry of entries) {
861
- this.applySizeClasses(entry.contentRect.width);
862
- }
863
- });
864
- this.ro.observe(this.element);
865
- }
866
- disconnectedCallback() {
867
- this.ro.disconnect();
868
- }
869
- applySizeClasses(size) {
870
- let xsmall = false;
871
- let small = false;
872
- let medium = false;
873
- let large = false;
874
- let xlarge = false;
875
- let xxlarge = false;
876
- let large2k = false;
877
- let large4k = false;
878
- if (size >= 2600)
879
- large4k = true;
880
- else if (size >= 1980)
881
- large2k = true;
882
- else if (size >= 1600)
883
- xxlarge = true;
884
- else if (size >= 1440)
885
- xlarge = true;
886
- else if (size >= 1200)
887
- large = true;
888
- else if (size >= 992)
889
- medium = true;
890
- else if (size >= 768)
891
- small = true;
892
- else
893
- xsmall = true;
894
- this.element.classList.toggle("xsmall", xsmall);
895
- this.element.classList.toggle("small", small);
896
- this.element.classList.toggle("medium", medium);
897
- this.element.classList.toggle("large", large);
898
- this.element.classList.toggle("xlarge", xlarge);
899
- this.element.classList.toggle("xxlarge", xxlarge);
900
- this.element.classList.toggle("large2k", large2k);
901
- this.element.classList.toggle("large4k", large4k);
902
- }
903
- render() {
904
- return (index.h("div", null, index.h("slot", null)));
905
- }
906
- get element() { return index.getElement(this); }
907
- };
908
- PtcResponsiveWrapper.style = ptcResponsiveWrapperCss;
909
-
910
888
  const closeSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 42 41.485">
911
889
  <g id="Group_1042" data-name="Group 1042" transform="rotate(180 108.25 87.993)">
912
890
  <path id="Line_446" d="M0 0v39.486" class="cls-1" data-name="Line 446"></path>
@@ -984,5 +962,4 @@ PtcSvgBtn.style = ptcSvgBtnCss;
984
962
  exports.icon_asset = IconAsset;
985
963
  exports.ptc_announcement = PtcAnnouncement;
986
964
  exports.ptc_mobile_select = PtcMobileSelect;
987
- exports.ptc_responsive_wrapper = PtcResponsiveWrapper;
988
965
  exports.ptc_svg_btn = PtcSvgBtn;
@@ -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-breadcrumb.cjs",[[1,"ptc-breadcrumb"]]],["ptc-hero.cjs",[[1,"ptc-hero",{"heroType":[1,"hero-type"],"bgUrl":[1,"bg-url"]}]]],["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],"headingTransform":[1,"heading-transform"],"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]}]]],["ptc-social-share.cjs",[[1,"ptc-social-share",{"display":[1],"shareType":[1,"share-type"],"shareTitle":[1,"share-title"],"text":[1],"url":[1],"source":[1],"recipient":[1],"isHover":[32]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button.cjs",[[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"linkTitle":[1,"link-title"],"target":[1],"rel":[1],"tabNav":[2,"tab-nav"],"styles":[1]}]]],["ptc-card-bottom.cjs",[[1,"ptc-card-bottom",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-content.cjs",[[1,"ptc-card-content",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-plm.cjs",[[1,"ptc-card-plm",{"cardType":[1,"card-type"],"cardLink":[1,"card-link"],"linkTitle":[1,"link-title"],"linkTarget":[1,"link-target"]}]]],["ptc-countdown.cjs",[[1,"ptc-countdown"]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-form.cjs",[[6,"ptc-form",{"value":[32],"inputValue":[32],"selectValue":[32]}]]],["ptc-input.cjs",[[6,"ptc-input",{"type":[1],"dataEloquaName":[1,"data-eloqua-name"],"inputId":[1,"input-id"],"inputName":[1,"input-name"],"focused":[32]}]]],["ptc-list.cjs",[[2,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-modal.cjs",[[1,"ptc-modal",{"iframeUrl":[1025,"iframe-url"],"size":[1025],"show":[1028],"overlay":[1028],"closeOnBlur":[1028,"close-on-blur"],"overlayHeight":[32],"bodyOverflowSetting":[32]}]]],["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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraColor":[1,"para-color"],"paraLineH":[1,"para-line-h"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imagePosition":[1,"image-position"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"isFullHeight":[4,"is-full-height"],"isFullWidth":[4,"is-full-width"],"styles":[1],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-select.cjs",[[6,"ptc-select",{"dataEloquaName":[1,"data-eloqua-name"],"selectId":[1,"select-id"],"name":[1],"valueOptions":[1040]}]]],["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",[[6,"ptc-title",{"isPlmHub":[4,"is-plm-hub"],"type":[1],"textAlign":[1,"text-align"],"upperline":[1],"titleShadow":[1,"title-shadow"],"titleMargin":[1,"title-margin"],"titleWeight":[1,"title-weight"],"titleSize":[1,"title-size"],"titleLHeight":[1,"title-l-height"],"styles":[1]}]]],["list-item.cjs",[[1,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"],"flushBefore":[4,"flush-before"]}]]],["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"],"dateColor":[1,"date-color"],"dateStyles":[1,"date-styles"],"dataSize":[1,"data-size"]}]]],["ptc-img_2.cjs",[[4,"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"]]],[1,"ptc-overlay",{"filterColor":[1,"filter-color"],"borderRadius":[1,"border-radius"],"overlayZIndex":[1,"overlay-z-index"],"styles":[1]}]]],["icon-asset_5.cjs",[[0,"ptc-mobile-select",{"triggerName":[1,"trigger-name"],"linkText":[1,"link-text"],"ensureBtnText":[1,"ensure-btn-text"],"cancelBtnText":[1,"cancel-btn-text"],"listTitle":[1,"list-title"],"wheelData":[1040]}],[1,"ptc-announcement",{"barTitle":[1,"bar-title"],"Description":[1,"description"],"linkText":[513,"link-text"],"visible":[1540],"linkUrl":[513,"link-url"],"tempContainer":[4,"temp-container"]}],[1,"ptc-responsive-wrapper"],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"],"display":[1]}],[2,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]]], options);
17
+ return index.bootstrapLazy([["ptc-breadcrumb.cjs",[[1,"ptc-breadcrumb"]]],["ptc-hero.cjs",[[1,"ptc-hero",{"heroType":[1,"hero-type"],"bgUrl":[1,"bg-url"]}]]],["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],"headingTransform":[1,"heading-transform"],"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]}]]],["ptc-social-share.cjs",[[1,"ptc-social-share",{"display":[1],"shareType":[1,"share-type"],"shareTitle":[1,"share-title"],"text":[1],"url":[1],"source":[1],"recipient":[1],"isHover":[32]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button.cjs",[[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"linkTitle":[1,"link-title"],"target":[1],"rel":[1],"tabNav":[2,"tab-nav"],"styles":[1]}]]],["ptc-card-bottom.cjs",[[1,"ptc-card-bottom",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-content.cjs",[[1,"ptc-card-content",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-plm.cjs",[[1,"ptc-card-plm",{"cardType":[1,"card-type"],"cardLink":[1,"card-link"],"linkTitle":[1,"link-title"],"linkTarget":[1,"link-target"]}]]],["ptc-countdown.cjs",[[1,"ptc-countdown"]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-form.cjs",[[6,"ptc-form",{"value":[32],"inputValue":[32],"selectValue":[32]}]]],["ptc-input.cjs",[[6,"ptc-input",{"type":[1],"dataEloquaName":[1,"data-eloqua-name"],"inputId":[1,"input-id"],"inputName":[1,"input-name"],"focused":[32]}]]],["ptc-list.cjs",[[2,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-modal.cjs",[[1,"ptc-modal",{"iframeUrl":[1025,"iframe-url"],"size":[1025],"show":[1028],"overlay":[1028],"closeOnBlur":[1028,"close-on-blur"],"overlayHeight":[32],"bodyOverflowSetting":[32]}]]],["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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraColor":[1,"para-color"],"paraLineH":[1,"para-line-h"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imagePosition":[1,"image-position"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"isFullHeight":[4,"is-full-height"],"isFullWidth":[4,"is-full-width"],"styles":[1],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-responsive-wrapper.cjs",[[1,"ptc-responsive-wrapper"]]],["ptc-select.cjs",[[6,"ptc-select",{"dataEloquaName":[1,"data-eloqua-name"],"selectId":[1,"select-id"],"name":[1],"valueOptions":[1040]}]]],["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",[[6,"ptc-title",{"isPlmHub":[4,"is-plm-hub"],"type":[1],"textAlign":[1,"text-align"],"upperline":[1],"titleShadow":[1,"title-shadow"],"titleMargin":[1,"title-margin"],"titleWeight":[1,"title-weight"],"titleSize":[1,"title-size"],"titleLHeight":[1,"title-l-height"],"styles":[1]}]]],["list-item.cjs",[[1,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"],"flushBefore":[4,"flush-before"]}]]],["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"],"dateColor":[1,"date-color"],"dateStyles":[1,"date-styles"],"dataSize":[1,"data-size"]}]]],["ptc-img_2.cjs",[[4,"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"]]],[1,"ptc-overlay",{"filterColor":[1,"filter-color"],"borderRadius":[1,"border-radius"],"overlayZIndex":[1,"overlay-z-index"],"styles":[1]}]]],["icon-asset_4.cjs",[[1,"ptc-announcement",{"barTitle":[1,"bar-title"],"Description":[1,"description"],"linkText":[513,"link-text"],"visible":[1540],"linkUrl":[513,"link-url"],"tempContainer":[4,"temp-container"]}],[0,"ptc-mobile-select",{"triggerName":[1,"trigger-name"],"selectedText":[1,"selected-text"],"wheelData":[1040],"selectedId":[1,"selected-id"],"ensureBtnText":[1,"ensure-btn-text"],"cancelBtnText":[1,"cancel-btn-text"],"listTitle":[1,"list-title"],"linkUrl":[1025,"link-url"]}],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"],"display":[1]}],[2,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]]], 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-3adcf9f4.js');
6
6
 
7
- const ptcLinkCss = ":host{display:block}.disabled{pointer-events:none;cursor:default;text-decoration:none}.ptc-link{display:inline-block;color:var(--color-primary-uigrey);font-weight:var(--ptc-font-weight-black);position:relative;line-height:var(--ptc-line-height-normal);outline:none;text-decoration:none}.simple::after{content:\"\";position:absolute;width:100%;left:0px;bottom:2px;transition:opacity var(--ptc-transition-fast) var(--ptc-standard-ease);border-bottom:2px solid var(--color-primary-green);opacity:0}.simple:hover.simple::after{opacity:1}.arrow{margin-right:var(--ptc-element-spacing-01)}.arrow::after{position:absolute;display:block;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-primary-green);bottom:1px;transition:width var(--ptc-transition-fast) var(--ptc-standard-ease)}.arrow:hover.arrow::after{width:100%}.uppercase{text-transform:uppercase}.small{font-size:var(--ptc-font-size-small)}.medium{font-size:var(--ptc-font-size-medium)}.large{font-size:var(--ptc-font-size-large)}.ptc-link.arrow icon-asset{position:absolute;right:-25px;transition:transform var(--ptc-transition-fast) var(--ptc-standard-ease)}.ptc-link.arrow icon-asset svg{fill:var(--color-primary-green) !important}.ptc-link.arrow-plm icon-asset{position:absolute;right:-6.75px;transform:translate(100%, 8%)}.ptc-link.arrow-plm svg{fill:#3DAB49 !important}.ptc-link:hover.arrow icon-asset{transform:translateX(var(--ptc-element-spacing-04))}.nav-title:focus,.nav-title-link:focus,.primary-nav-link:focus,.secondary-nav-link:focus,.footer-nav-link:focus,.copyright-link:focus{outline:3px solid #0092d1;outline-offset:2px}.nav-title{box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:15px;font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0.15px;line-height:25.05px;list-style:none;margin-bottom:10px;text-align:left}.primary-nav-link{background-color:transparent;box-sizing:border-box;color:#f3f3f4;display:inline-block;font-size:15px;font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0.3px;line-height:25.95px;list-style:none;margin:var(--ptc-element-spacing-01) var(--ptc-element-spacing-03);padding:var(--ptc-element-spacing-02) var(--ptc-element-spacing-05);padding-bottom:7px;position:relative;text-decoration:none;transition:background-color var(--ptc-transition-medium) var(--ptc-decelerated-ease)}.primary-nav-link:hover{border-radius:4px;background-color:#20262a;text-decoration:none;outline:none}.nav-title-link{background-color:transparent;box-sizing:border-box;color:var(--color-white);font-size:var(--ptc-font-size-x-small);font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);line-height:15px;list-style:none;text-align:left;text-decoration-color:var(--color-white);text-decoration:none;transition:border-color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent;display:inline-block}.nav-title-link:hover{color:var(--color-white);border-bottom:1.5px solid var(--color-secondary-turtlegreen)}.secondary-nav-link{display:inline-block;background-color:transparent;box-sizing:border-box;color:var(--color-white);font-size:var(--ptc-font-size-x-small);font-stretch:100%;font-style:normal;font-weight:var(--ptc-font-weight-semibold);letter-spacing:0.12px;line-height:14.4px;list-style:none;margin-bottom:12px;text-align:left;text-decoration:none;transition:border-color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent;white-space:nowrap}.secondary-nav-link:hover{color:var(--color-white);border-bottom:1.5px solid #74c34d;border-radius:0;text-decoration:none}.footer-nav-link{color:var(--color-white);transition:border var(--ptc-transition-medium) var(--ptc-standard-ease), color var(--ptc-transition-medium) var(--ptc-standard-ease);border-bottom:1px solid transparent;outline:none;text-decoration:none;font-weight:var(--ptc-font-weight-semibold);line-height:1.73;letter-spacing:1.13px;text-align:left;font-size:15px}.footer-nav-link:hover{outline:none;text-decoration:none;border-bottom:0.1rem solid var(--color-secondary-turtlegreen);color:var(--color-secondary-turtlegreen)}.copyright-link{color:var(--color-white);font-size:13px;font-weight:var(--ptc-font-weight-normal);line-height:2;display:inline-block}.arrow-plm{color:var(--color-white);font-weight:var(--ptc-font-weight-extrabold);line-height:var(--ptc-line-height-19);text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:transparent;text-underline-offset:2px;transition:text-decoration-color var(--ptc-transition-medium) var(--ptc-acceletated-ease)}.arrow-plm:hover{text-decoration-color:#3DAB49}";
7
+ const ptcLinkCss = ":host{display:block}.disabled{pointer-events:none;cursor:default;text-decoration:none}.ptc-link{display:inline-block;color:var(--color-primary-uigrey);font-weight:var(--ptc-font-weight-black);position:relative;line-height:var(--ptc-line-height-normal);outline:none;text-decoration:none}.simple::after{content:\"\";position:absolute;width:100%;left:0px;bottom:2px;transition:opacity var(--ptc-transition-fast) var(--ptc-standard-ease);border-bottom:2px solid var(--color-primary-green);opacity:0}.simple:hover.simple::after{opacity:1}.arrow{margin-right:var(--ptc-element-spacing-01)}.arrow::after{position:absolute;display:block;content:\"\";width:var(--ptc-element-spacing-06);border-bottom:2px solid var(--color-primary-green);bottom:1px;transition:width var(--ptc-transition-fast) var(--ptc-standard-ease)}.arrow:hover.arrow::after{width:100%}.uppercase{text-transform:uppercase}.small{font-size:var(--ptc-font-size-small)}.medium{font-size:var(--ptc-font-size-medium)}.large{font-size:var(--ptc-font-size-large)}.ptc-link.arrow icon-asset{position:absolute;right:-25px;transition:transform var(--ptc-transition-fast) var(--ptc-standard-ease)}.ptc-link.arrow icon-asset svg{fill:var(--color-primary-green) !important}.ptc-link.arrow-plm icon-asset{position:absolute;right:-6.75px;transform:translate(100%, 8%)}.ptc-link.arrow-plm svg{fill:#3DAB49 !important}.ptc-link:hover.arrow icon-asset{transform:translateX(var(--ptc-element-spacing-04))}.nav-title:focus,.nav-title-link:focus,.primary-nav-link:focus,.secondary-nav-link:focus,.footer-nav-link:focus,.copyright-link:focus{outline:3px solid var(--color-blue-07);outline-offset:2px}.nav-title{box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:15px;font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0.15px;line-height:25.05px;list-style:none;margin-bottom:10px;text-align:left}.primary-nav-link{background-color:transparent;box-sizing:border-box;color:#f3f3f4;display:inline-block;font-size:15px;font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);letter-spacing:0.3px;line-height:25.95px;list-style:none;margin:var(--ptc-element-spacing-01) var(--ptc-element-spacing-03);padding:var(--ptc-element-spacing-02) var(--ptc-element-spacing-05);padding-bottom:7px;position:relative;text-decoration:none;transition:background-color var(--ptc-transition-medium) var(--ptc-decelerated-ease)}.primary-nav-link:hover{border-radius:4px;background-color:#20262a;text-decoration:none;outline:none}.nav-title-link{background-color:transparent;box-sizing:border-box;color:var(--color-white);font-size:var(--ptc-font-size-x-small);font-stretch:100%;font-weight:var(--ptc-font-weight-extrabold);line-height:15px;list-style:none;text-align:left;text-decoration-color:var(--color-white);text-decoration:none;transition:border-color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent;display:inline-block}.nav-title-link:hover{color:var(--color-white);border-bottom:1.5px solid var(--color-secondary-turtlegreen)}.secondary-nav-link{display:inline-block;background-color:transparent;box-sizing:border-box;color:var(--color-white);font-size:var(--ptc-font-size-x-small);font-stretch:100%;font-style:normal;font-weight:var(--ptc-font-weight-semibold);letter-spacing:0.12px;line-height:14.4px;list-style:none;margin-bottom:12px;text-align:left;text-decoration:none;transition:border-color var(--ptc-transition-medium) var(--ptc-decelerated-ease);border-bottom:1.5px solid transparent;white-space:nowrap}.secondary-nav-link:hover{color:var(--color-white);border-bottom:1.5px solid #74c34d;border-radius:0;text-decoration:none}.footer-nav-link{color:var(--color-white);transition:border var(--ptc-transition-medium) var(--ptc-standard-ease), color var(--ptc-transition-medium) var(--ptc-standard-ease);border-bottom:1px solid transparent;outline:none;text-decoration:none;font-weight:var(--ptc-font-weight-semibold);line-height:1.73;letter-spacing:1.13px;text-align:left;font-size:15px}.footer-nav-link:hover{outline:none;text-decoration:none;border-bottom:0.1rem solid var(--color-secondary-turtlegreen);color:var(--color-secondary-turtlegreen)}.copyright-link{color:var(--color-white);font-size:13px;font-weight:var(--ptc-font-weight-normal);line-height:2;display:inline-block}.arrow-plm{color:var(--color-white);font-weight:var(--ptc-font-weight-extrabold);line-height:var(--ptc-line-height-19);text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:transparent;text-underline-offset:2px;transition:text-decoration-color var(--ptc-transition-medium) var(--ptc-acceletated-ease)}.arrow-plm:hover{text-decoration-color:#3DAB49}";
8
8
 
9
9
  let PtcLink = class {
10
10
  constructor(hostRef) {
@@ -0,0 +1,65 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3adcf9f4.js');
6
+
7
+ const ptcResponsiveWrapperCss = ":host{display:block}";
8
+
9
+ let PtcResponsiveWrapper = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ componentDidLoad() {
14
+ this.ro = new ResizeObserver(entries => {
15
+ for (const entry of entries) {
16
+ this.applySizeClasses(entry.contentRect.width);
17
+ }
18
+ });
19
+ this.ro.observe(this.element);
20
+ }
21
+ disconnectedCallback() {
22
+ this.ro.disconnect();
23
+ }
24
+ applySizeClasses(size) {
25
+ let xsmall = false;
26
+ let small = false;
27
+ let medium = false;
28
+ let large = false;
29
+ let xlarge = false;
30
+ let xxlarge = false;
31
+ let large2k = false;
32
+ let large4k = false;
33
+ if (size >= 2600)
34
+ large4k = true;
35
+ else if (size >= 1980)
36
+ large2k = true;
37
+ else if (size >= 1600)
38
+ xxlarge = true;
39
+ else if (size >= 1440)
40
+ xlarge = true;
41
+ else if (size >= 1200)
42
+ large = true;
43
+ else if (size >= 992)
44
+ medium = true;
45
+ else if (size >= 768)
46
+ small = true;
47
+ else
48
+ xsmall = true;
49
+ this.element.classList.toggle("xsmall", xsmall);
50
+ this.element.classList.toggle("small", small);
51
+ this.element.classList.toggle("medium", medium);
52
+ this.element.classList.toggle("large", large);
53
+ this.element.classList.toggle("xlarge", xlarge);
54
+ this.element.classList.toggle("xxlarge", xxlarge);
55
+ this.element.classList.toggle("large2k", large2k);
56
+ this.element.classList.toggle("large4k", large4k);
57
+ }
58
+ render() {
59
+ return (index.h("div", null, index.h("slot", null)));
60
+ }
61
+ get element() { return index.getElement(this); }
62
+ };
63
+ PtcResponsiveWrapper.style = ptcResponsiveWrapperCss;
64
+
65
+ exports.ptc_responsive_wrapper = PtcResponsiveWrapper;
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["ptc-breadcrumb.cjs",[[1,"ptc-breadcrumb"]]],["ptc-hero.cjs",[[1,"ptc-hero",{"heroType":[1,"hero-type"],"bgUrl":[1,"bg-url"]}]]],["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],"headingTransform":[1,"heading-transform"],"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]}]]],["ptc-social-share.cjs",[[1,"ptc-social-share",{"display":[1],"shareType":[1,"share-type"],"shareTitle":[1,"share-title"],"text":[1],"url":[1],"source":[1],"recipient":[1],"isHover":[32]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button.cjs",[[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"linkTitle":[1,"link-title"],"target":[1],"rel":[1],"tabNav":[2,"tab-nav"],"styles":[1]}]]],["ptc-card-bottom.cjs",[[1,"ptc-card-bottom",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-content.cjs",[[1,"ptc-card-content",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-plm.cjs",[[1,"ptc-card-plm",{"cardType":[1,"card-type"],"cardLink":[1,"card-link"],"linkTitle":[1,"link-title"],"linkTarget":[1,"link-target"]}]]],["ptc-countdown.cjs",[[1,"ptc-countdown"]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-form.cjs",[[6,"ptc-form",{"value":[32],"inputValue":[32],"selectValue":[32]}]]],["ptc-input.cjs",[[6,"ptc-input",{"type":[1],"dataEloquaName":[1,"data-eloqua-name"],"inputId":[1,"input-id"],"inputName":[1,"input-name"],"focused":[32]}]]],["ptc-list.cjs",[[2,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-modal.cjs",[[1,"ptc-modal",{"iframeUrl":[1025,"iframe-url"],"size":[1025],"show":[1028],"overlay":[1028],"closeOnBlur":[1028,"close-on-blur"],"overlayHeight":[32],"bodyOverflowSetting":[32]}]]],["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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraColor":[1,"para-color"],"paraLineH":[1,"para-line-h"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imagePosition":[1,"image-position"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"isFullHeight":[4,"is-full-height"],"isFullWidth":[4,"is-full-width"],"styles":[1],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-select.cjs",[[6,"ptc-select",{"dataEloquaName":[1,"data-eloqua-name"],"selectId":[1,"select-id"],"name":[1],"valueOptions":[1040]}]]],["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",[[6,"ptc-title",{"isPlmHub":[4,"is-plm-hub"],"type":[1],"textAlign":[1,"text-align"],"upperline":[1],"titleShadow":[1,"title-shadow"],"titleMargin":[1,"title-margin"],"titleWeight":[1,"title-weight"],"titleSize":[1,"title-size"],"titleLHeight":[1,"title-l-height"],"styles":[1]}]]],["list-item.cjs",[[1,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"],"flushBefore":[4,"flush-before"]}]]],["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"],"dateColor":[1,"date-color"],"dateStyles":[1,"date-styles"],"dataSize":[1,"data-size"]}]]],["ptc-img_2.cjs",[[4,"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"]]],[1,"ptc-overlay",{"filterColor":[1,"filter-color"],"borderRadius":[1,"border-radius"],"overlayZIndex":[1,"overlay-z-index"],"styles":[1]}]]],["icon-asset_5.cjs",[[0,"ptc-mobile-select",{"triggerName":[1,"trigger-name"],"linkText":[1,"link-text"],"ensureBtnText":[1,"ensure-btn-text"],"cancelBtnText":[1,"cancel-btn-text"],"listTitle":[1,"list-title"],"wheelData":[1040]}],[1,"ptc-announcement",{"barTitle":[1,"bar-title"],"Description":[1,"description"],"linkText":[513,"link-text"],"visible":[1540],"linkUrl":[513,"link-url"],"tempContainer":[4,"temp-container"]}],[1,"ptc-responsive-wrapper"],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"],"display":[1]}],[2,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]]], options);
18
+ return index.bootstrapLazy([["ptc-breadcrumb.cjs",[[1,"ptc-breadcrumb"]]],["ptc-hero.cjs",[[1,"ptc-hero",{"heroType":[1,"hero-type"],"bgUrl":[1,"bg-url"]}]]],["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],"headingTransform":[1,"heading-transform"],"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]}]]],["ptc-social-share.cjs",[[1,"ptc-social-share",{"display":[1],"shareType":[1,"share-type"],"shareTitle":[1,"share-title"],"text":[1],"url":[1],"source":[1],"recipient":[1],"isHover":[32]}]]],["my-component.cjs",[[1,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["ptc-button.cjs",[[1,"ptc-button",{"disabled":[516],"type":[1],"color":[1],"iconAnimation":[1,"icon-animation"],"iconPosition":[1,"icon-position"],"linkHref":[1,"link-href"],"linkTitle":[1,"link-title"],"target":[1],"rel":[1],"tabNav":[2,"tab-nav"],"styles":[1]}]]],["ptc-card-bottom.cjs",[[1,"ptc-card-bottom",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-content.cjs",[[1,"ptc-card-content",{"cardType":[1,"card-type"],"styles":[1]}]]],["ptc-card-plm.cjs",[[1,"ptc-card-plm",{"cardType":[1,"card-type"],"cardLink":[1,"card-link"],"linkTitle":[1,"link-title"],"linkTarget":[1,"link-target"]}]]],["ptc-countdown.cjs",[[1,"ptc-countdown"]]],["ptc-footer.cjs",[[1,"ptc-footer"]]],["ptc-form.cjs",[[6,"ptc-form",{"value":[32],"inputValue":[32],"selectValue":[32]}]]],["ptc-input.cjs",[[6,"ptc-input",{"type":[1],"dataEloquaName":[1,"data-eloqua-name"],"inputId":[1,"input-id"],"inputName":[1,"input-name"],"focused":[32]}]]],["ptc-list.cjs",[[2,"ptc-list",{"listType":[1,"list-type"],"listItems":[16]}]]],["ptc-modal.cjs",[[1,"ptc-modal",{"iframeUrl":[1025,"iframe-url"],"size":[1025],"show":[1028],"overlay":[1028],"closeOnBlur":[1028,"close-on-blur"],"overlayHeight":[32],"bodyOverflowSetting":[32]}]]],["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-para.cjs",[[1,"ptc-para",{"fontSize":[1,"font-size"],"fontWeight":[1,"font-weight"],"paraStyle":[1,"para-style"],"paraColor":[1,"para-color"],"paraLineH":[1,"para-line-h"],"paraMargin":[1,"para-margin"]}]]],["ptc-picture.cjs",[[1,"ptc-picture",{"src":[1],"alt":[1],"sizeXs":[1025,"size-xs"],"sizeSm":[1025,"size-sm"],"sizeMd":[1025,"size-md"],"sizeLg":[1025,"size-lg"],"imagePosition":[1,"image-position"],"borderRadius":[1,"border-radius"],"height":[1],"width":[1],"objectFit":[1,"object-fit"],"isFullHeight":[4,"is-full-height"],"isFullWidth":[4,"is-full-width"],"styles":[1],"oldSrc":[32]},[[9,"resize","WindowResize"]]]]],["ptc-responsive-wrapper.cjs",[[1,"ptc-responsive-wrapper"]]],["ptc-select.cjs",[[6,"ptc-select",{"dataEloquaName":[1,"data-eloqua-name"],"selectId":[1,"select-id"],"name":[1],"valueOptions":[1040]}]]],["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",[[6,"ptc-title",{"isPlmHub":[4,"is-plm-hub"],"type":[1],"textAlign":[1,"text-align"],"upperline":[1],"titleShadow":[1,"title-shadow"],"titleMargin":[1,"title-margin"],"titleWeight":[1,"title-weight"],"titleSize":[1,"title-size"],"titleLHeight":[1,"title-l-height"],"styles":[1]}]]],["list-item.cjs",[[1,"list-item",{"listType":[1,"list-type"],"linkHref":[1,"link-href"],"flushBefore":[4,"flush-before"]}]]],["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"],"dateColor":[1,"date-color"],"dateStyles":[1,"date-styles"],"dataSize":[1,"data-size"]}]]],["ptc-img_2.cjs",[[4,"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"]]],[1,"ptc-overlay",{"filterColor":[1,"filter-color"],"borderRadius":[1,"border-radius"],"overlayZIndex":[1,"overlay-z-index"],"styles":[1]}]]],["icon-asset_4.cjs",[[1,"ptc-announcement",{"barTitle":[1,"bar-title"],"Description":[1,"description"],"linkText":[513,"link-text"],"visible":[1540],"linkUrl":[513,"link-url"],"tempContainer":[4,"temp-container"]}],[0,"ptc-mobile-select",{"triggerName":[1,"trigger-name"],"selectedText":[1,"selected-text"],"wheelData":[1040],"selectedId":[1,"selected-id"],"ensureBtnText":[1,"ensure-btn-text"],"cancelBtnText":[1,"cancel-btn-text"],"listTitle":[1,"list-title"],"linkUrl":[1025,"link-url"]}],[1,"ptc-svg-btn",{"svgName":[1,"svg-name"],"display":[1]}],[2,"icon-asset",{"name":[1],"size":[1],"type":[1],"spin":[1],"pulse":[1],"color":[1]}]]]], options);
19
19
  });
@@ -109,18 +109,24 @@
109
109
  }
110
110
 
111
111
  a {
112
- color: #3b4550;
112
+ color: var(--color-blue-07);
113
113
  -webkit-transition: color 0.3s ease;
114
114
  -o-transition: color 0.3s ease;
115
115
  transition: color 0.3s ease;
116
116
  font-weight: 700;
117
- border-bottom: 0.15rem solid #74c34d;
118
- text-decoration: none;
117
+ text-decoration: underline;
119
118
  margin-left: 16px;
120
119
  }
121
120
  a:hover {
122
- color: #74c34d;
123
- text-decoration: none;
121
+ color: var(--color-blue-08);
122
+ }
123
+ a:focus {
124
+ outline: 3px solid var(--color-blue-07);
125
+ outline-offset: 0.25rem;
126
+ border-radius: 4px;
127
+ }
128
+ a:visited {
129
+ color: var(--color-blue-09);
124
130
  }
125
131
 
126
132
  @media (min-width: 768px) {
@@ -86,7 +86,7 @@
86
86
  }
87
87
 
88
88
  .nav-title:focus, .nav-title-link:focus, .primary-nav-link:focus, .secondary-nav-link:focus, .footer-nav-link:focus, .copyright-link:focus {
89
- outline: 3px solid #0092d1;
89
+ outline: 3px solid var(--color-blue-07);
90
90
  outline-offset: 2px;
91
91
  }
92
92
 
@@ -2,36 +2,71 @@ import { Component, h, Prop } from '@stencil/core';
2
2
  import MobileSelect from 'mobile-select';
3
3
  export class PtcMobileSelect {
4
4
  constructor() {
5
+ /**
6
+ * Selected Id
7
+ * - initialize the id(string) of default wheel
8
+ */
9
+ this.selectedId = '';
5
10
  /**
6
11
  * Confirm Text
12
+ * - translation goes here
7
13
  */
8
14
  this.ensureBtnText = 'Confirm';
9
15
  /**
10
16
  * Cancel Text
17
+ * - translation goes here
11
18
  */
12
19
  this.cancelBtnText = 'Cancel';
13
20
  /**
14
21
  * Mobile select list title (Optional)
15
22
  */
16
23
  this.listTitle = undefined;
24
+ /**
25
+ * link url
26
+ */
27
+ this.linkUrl = undefined;
17
28
  }
18
29
  render() {
19
- return (h("ptc-responsive-wrapper", null,
20
- h("div", { class: "mobile-select-wrapper" },
21
- h("div", { id: this.triggerName }, this.linkText),
22
- h("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white" }))));
30
+ return (h("div", { class: "mobile-select-wrapper" },
31
+ h("div", { id: this.triggerName }, this.selectedText),
32
+ h("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white" })));
23
33
  }
24
34
  componentDidRender() {
35
+ let currentId = this.selectedId; //input current lang
36
+ let storeIndex = 0;
25
37
  new MobileSelect({
26
38
  trigger: `#${this.triggerName}`,
27
39
  title: `${this.listTitle ? this.listTitle : ''}`,
28
- wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ["test1", 'test2'] }],
40
+ wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ['test1', 'test2'] }],
29
41
  position: [0],
30
42
  ensureBtnText: this.ensureBtnText,
31
43
  cancelBtnText: this.cancelBtnText,
32
44
  ensureBtnColor: 'var(--color-gray-12)',
33
45
  cancelBtnColor: 'var(--color-gray-12)',
34
46
  titleColor: 'var(--color-gray-12)',
47
+ onShow: function (e) {
48
+ if (currentId) {
49
+ let liEle = document.querySelectorAll('.selectContainer li');
50
+ liEle.forEach((currentValue, currentIndex) => {
51
+ if (currentValue.getAttribute('data-id') == currentId) {
52
+ storeIndex = currentIndex;
53
+ return;
54
+ }
55
+ });
56
+ e.locatePosition(0, storeIndex);
57
+ }
58
+ else {
59
+ return;
60
+ }
61
+ },
62
+ callback: function (indexArr, data) {
63
+ if (this.linkUrl !== undefined) {
64
+ window.location.href = this.linkUrl + '/' + data[0].id;
65
+ }
66
+ else {
67
+ console.log('index: ' + indexArr + ', id: ' + data[0].id + '; No link url founded!');
68
+ }
69
+ }.bind(this),
35
70
  });
36
71
  }
37
72
  static get is() { return "ptc-mobile-select"; }
@@ -59,7 +94,7 @@ export class PtcMobileSelect {
59
94
  "attribute": "trigger-name",
60
95
  "reflect": false
61
96
  },
62
- "linkText": {
97
+ "selectedText": {
63
98
  "type": "string",
64
99
  "mutable": false,
65
100
  "complexType": {
@@ -71,11 +106,44 @@ export class PtcMobileSelect {
71
106
  "optional": false,
72
107
  "docs": {
73
108
  "tags": [],
74
- "text": "Button/link Text (Mandatory)"
109
+ "text": "Selected Text (Mandatory)"
75
110
  },
76
- "attribute": "link-text",
111
+ "attribute": "selected-text",
77
112
  "reflect": false
78
113
  },
114
+ "wheelData": {
115
+ "type": "unknown",
116
+ "mutable": true,
117
+ "complexType": {
118
+ "original": "string[]",
119
+ "resolved": "string[]",
120
+ "references": {}
121
+ },
122
+ "required": false,
123
+ "optional": false,
124
+ "docs": {
125
+ "tags": [],
126
+ "text": "Wheel Data (Mandatory)\neg: data: [{ id: \"1\", value: \"\u9644\u8FD1\" }],"
127
+ }
128
+ },
129
+ "selectedId": {
130
+ "type": "string",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "string",
134
+ "resolved": "string",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": "Selected Id\n- initialize the id(string) of default wheel"
142
+ },
143
+ "attribute": "selected-id",
144
+ "reflect": false,
145
+ "defaultValue": "''"
146
+ },
79
147
  "ensureBtnText": {
80
148
  "type": "string",
81
149
  "mutable": false,
@@ -88,7 +156,7 @@ export class PtcMobileSelect {
88
156
  "optional": false,
89
157
  "docs": {
90
158
  "tags": [],
91
- "text": "Confirm Text"
159
+ "text": "Confirm Text\n- translation goes here"
92
160
  },
93
161
  "attribute": "ensure-btn-text",
94
162
  "reflect": false,
@@ -106,7 +174,7 @@ export class PtcMobileSelect {
106
174
  "optional": false,
107
175
  "docs": {
108
176
  "tags": [],
109
- "text": "Cancel Text"
177
+ "text": "Cancel Text\n- translation goes here"
110
178
  },
111
179
  "attribute": "cancel-btn-text",
112
180
  "reflect": false,
@@ -130,20 +198,23 @@ export class PtcMobileSelect {
130
198
  "reflect": false,
131
199
  "defaultValue": "undefined"
132
200
  },
133
- "wheelData": {
134
- "type": "unknown",
201
+ "linkUrl": {
202
+ "type": "string",
135
203
  "mutable": true,
136
204
  "complexType": {
137
- "original": "string[]",
138
- "resolved": "string[]",
205
+ "original": "string",
206
+ "resolved": "string",
139
207
  "references": {}
140
208
  },
141
209
  "required": false,
142
210
  "optional": false,
143
211
  "docs": {
144
212
  "tags": [],
145
- "text": "Wheel Data (Mandatory)"
146
- }
213
+ "text": "link url"
214
+ },
215
+ "attribute": "link-url",
216
+ "reflect": false,
217
+ "defaultValue": "undefined"
147
218
  }
148
219
  }; }
149
220
  }