@ptcwebops/ptcw-design 6.4.9-beta → 6.4.10-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/buying-option-card.cjs.entry.js +1 -1
- package/dist/cjs/buying-option-cards-slider.cjs.entry.js +17 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-button.cjs.entry.js +117 -0
- package/dist/cjs/ptc-para.cjs.entry.js +139 -0
- package/dist/cjs/ptc-picture.cjs.entry.js +168 -0
- package/dist/cjs/ptc-spacer.cjs.entry.js +38 -0
- package/dist/cjs/ptc-title.cjs.entry.js +161 -0
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/buying-option-card/buying-option-card.css +11 -10
- package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.css +3 -1
- package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.js +16 -0
- package/dist/collection/components/ptc-seo-title/ptc-seo-title.js +3 -3
- package/dist/custom-elements/index.js +18 -2
- package/dist/esm/blog-detail-content_2.entry.js +1 -1
- package/dist/esm/blog-detail-layout.entry.js +1 -1
- package/dist/esm/blogs-search-section.entry.js +1 -1
- package/dist/esm/buying-option-card.entry.js +1 -1
- package/dist/esm/buying-option-cards-slider.entry.js +17 -1
- package/dist/esm/homepage-jumbotron.entry.js +1 -1
- package/dist/esm/homepage-toggled-content.entry.js +1 -1
- package/dist/esm/innovator-toggle-container.entry.js +1 -1
- package/dist/esm/{interfaces-7c0243be.js → interfaces-4caedd26.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/most-popular-news.entry.js +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/ptc-accordion-item.entry.js +1 -1
- package/dist/esm/ptc-background-video.entry.js +1 -1
- package/dist/esm/ptc-button.entry.js +113 -0
- package/dist/esm/ptc-collapse-list.entry.js +1 -1
- package/dist/esm/ptc-form-checkbox_4.entry.js +1 -1
- package/dist/esm/ptc-homepage-image-feature.entry.js +1 -1
- package/dist/esm/ptc-homepage-video-background.entry.js +1 -1
- package/dist/esm/ptc-icon-card.entry.js +1 -1
- package/dist/esm/ptc-img.entry.js +1 -1
- package/dist/esm/ptc-link.entry.js +1 -1
- package/dist/esm/ptc-media-card.entry.js +1 -1
- package/dist/esm/ptc-para.entry.js +135 -0
- package/dist/esm/ptc-picture.entry.js +164 -0
- package/dist/esm/ptc-pricing-packaging-table.entry.js +1 -1
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptc-social-icons-footer.entry.js +1 -1
- package/dist/esm/ptc-spacer.entry.js +34 -0
- package/dist/esm/ptc-title.entry.js +157 -0
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/{utils-a64ba942.js → utils-bdd0cc16.js} +1 -1
- package/dist/ptcw-design/p-0c69ea52.entry.js +1 -0
- package/dist/ptcw-design/{p-1c569057.entry.js → p-0e63560d.entry.js} +1 -1
- package/dist/ptcw-design/{p-043be054.entry.js → p-258963da.entry.js} +1 -1
- package/dist/ptcw-design/{p-2f21b69b.entry.js → p-26b70120.entry.js} +1 -1
- package/dist/ptcw-design/p-2afea59e.entry.js +1 -0
- package/dist/ptcw-design/p-391d9852.entry.js +1 -0
- package/dist/ptcw-design/{p-54b589a6.entry.js → p-3ca1b46e.entry.js} +1 -1
- package/dist/ptcw-design/{p-92ad78c5.entry.js → p-3cb011c9.entry.js} +1 -1
- package/dist/ptcw-design/{p-c160bda4.entry.js → p-3cfe0126.entry.js} +1 -1
- package/dist/ptcw-design/{p-e23bc4a1.entry.js → p-43a8ccc3.entry.js} +1 -1
- package/dist/ptcw-design/p-4703e417.entry.js +1 -0
- package/dist/ptcw-design/{p-0df868d2.entry.js → p-4c89d63d.entry.js} +1 -1
- package/dist/ptcw-design/{p-bd9d995b.entry.js → p-5793ca02.entry.js} +1 -1
- package/dist/ptcw-design/{p-f2675bb0.entry.js → p-5a2ed8fb.entry.js} +1 -1
- package/dist/ptcw-design/{p-01497d7a.entry.js → p-674acf91.entry.js} +1 -1
- package/dist/ptcw-design/{p-1519b36f.entry.js → p-6f9f55b3.entry.js} +1 -1
- package/dist/ptcw-design/{p-ee1183b2.js → p-711bcdad.js} +1 -1
- package/dist/ptcw-design/p-7218fe2c.entry.js +1 -0
- package/dist/ptcw-design/{p-d2998707.entry.js → p-769b5691.entry.js} +1 -1
- package/dist/ptcw-design/{p-938db2fd.entry.js → p-94a76216.entry.js} +3 -3
- package/dist/ptcw-design/{p-456c5cbb.entry.js → p-9c6cad16.entry.js} +1 -1
- package/dist/ptcw-design/p-9da57f76.entry.js +1 -0
- package/dist/ptcw-design/{p-e196f008.entry.js → p-b533cd17.entry.js} +1 -1
- package/dist/ptcw-design/{p-5cf5b9f8.entry.js → p-c3b27836.entry.js} +1 -1
- package/dist/ptcw-design/{p-fb790fa9.entry.js → p-c477f9b5.entry.js} +1 -1
- package/dist/ptcw-design/{p-22cf00e7.js → p-c7e948b2.js} +1 -1
- package/dist/ptcw-design/{p-8aca7181.entry.js → p-d9df1a16.entry.js} +1 -1
- package/dist/ptcw-design/{p-4c852c9c.entry.js → p-dbf8da08.entry.js} +1 -1
- package/dist/ptcw-design/p-e4eb925f.entry.js +1 -0
- package/dist/ptcw-design/{p-82f766d2.entry.js → p-e5e1e8fb.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components.d.ts +62 -62
- package/package.json +98 -98
- package/readme.md +23 -23
- package/dist/cjs/ptc-button_5.cjs.entry.js +0 -597
- package/dist/esm/ptc-button_5.entry.js +0 -589
- package/dist/ptcw-design/p-214d9da6.entry.js +0 -1
- package/dist/ptcw-design/p-c555a45c.entry.js +0 -1
- package/dist/ptcw-design/p-dec9c2a0.entry.js +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-63ddc79c.js');
|
|
6
|
+
const utils = require('./utils-0ff09a53.js');
|
|
7
|
+
|
|
8
|
+
const ptcButtonCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}button.disabled{pointer-events:none;opacity:0.6}button{background-color:var(--color-gray-10);display:inline-block;border-style:solid;border-width:1px;white-space:normal;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard)}button.reveal-down .content{transition:opacity var(--ptc-transition-medium) var(--ptc-ease-out);opacity:0;font-size:var(--ptc-font-size-xx-small)}button.reveal-down .icon-wrapper{position:relative;display:flex;align-items:center;justify-content:center;align-content:center;height:16px}button.reveal-down .icon-wrapper .icon{transition:top var(--ptc-transition-fast) var(--ptc-ease-out);position:absolute;display:inline-block;top:-12px}button:hover.reveal-down .content{opacity:1}button:hover.reveal-down .icon-wrapper .icon{top:4px}button.animation-right ::slotted([slot=slot-after-text]),button.animation-right ::slotted([slot=slot-before-text]),button.animation-down ::slotted([slot=slot-after-text]),button.animation-down ::slotted([slot=slot-before-text]){transition:transform var(--ptc-transition-medium) var(--ptc-ease-inout);position:relative;display:inline-block}button:hover.animation-right ::slotted([slot=slot-after-text]),button:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}button:hover.animation-down ::slotted([slot=slot-after-text]),button:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}button span{font-family:var(--ptc-font-latin);font-size:var(--ptc-font-size-small);font-weight:bold;line-height:var(--ptc-line-height-densest)}button.left{text-align:left}button.right{text-align:right}button.center{text-align:center}.icon-left ::slotted([slot=slot-before-text]){margin-right:var(--ptc-element-spacing-01)}.icon-right ::slotted([slot=slot-after-text]){margin-left:var(--ptc-element-spacing-01)}.blackgrey{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(285deg, var(--color-gray-10) 155%, var(--color-gray-07) 62%)}.blackgrey:hover{box-shadow:var(--ptc-shadow-x-large)}.blackgrey span{color:var(--color-white)}.turtlegreen{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-green-07);background-image:linear-gradient(285deg, var(--color-green-07) 155%, var(--color-green-07) 62%)}.turtlegreen:hover{box-shadow:var(--ptc-shadow-x-large)}.turtlegreen span{color:var(--color-white)}.offwhite{box-shadow:var(--ptc-shadow-x-small);border:solid 1px var(--color-gray-10);background-image:linear-gradient(to right, var(--color-white), var(--color-gray-02), var(--color-gray-01))}.offwhite:hover{box-shadow:var(--ptc-shadow-x-large)}.offwhite span{color:var(--color-gray-10)}.legacy-green{margin-left:10px;padding:10px 20px;margin-bottom:var(--ptc-element-spacing-01);margin-top:var(--ptc-element-spacing-01);box-shadow:var(--ptc-shadow-large);border:solid 2.5px var(--color-green-08);background-image:linear-gradient(to right, var(--color-green-06), var(--color-green-08))}.legacy-green:after{position:absolute;content:\"\";top:-1px;left:0;bottom:0;right:0;width:100%;height:103%;background-image:linear-gradient(to right, var(--color-green-08), var(--color-green-06));opacity:0;transition:opacity var(--ptc-transition-x-slow) var(--ptc-ease-inout);border-radius:2px}.legacy-green:hover{box-shadow:var(--ptc-shadow-x-large)}.legacy-green:hover span{color:var(--color-white)}.legacy-green:hover:after{opacity:1}.legacy-green span{font-family:var(--ptc-font-secondary-latin);color:var(--color-white);z-index:100;position:relative;text-transform:uppercase;font-weight:var(--ptc-font-weight-bold);letter-spacing:var(--ptc-letter-spacing-normal);font-size:var(--ptc-font-size-x-small)}@media only screen and (min-width: 768px){.legacy-green span{font-size:var(--ptc-font-size-small);letter-spacing:var(--ptc-letter-spacing-loose)}}.legacy-green icon-asset{display:inline}a{border-style:solid;border-width:1px;position:relative;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding:9.4px 17.5px;border-radius:var(--ptc-border-radius-standard);display:inline-block;position:relative}a.animation-right ::slotted([slot=slot-after-text]),a.animation-right ::slotted([slot=slot-before-text]),a.animation-down ::slotted([slot=slot-after-text]),a.animation-down ::slotted([slot=slot-before-text]){transition:all var(--ptc-ease-inout) var(--ptc-transition-medium);position:relative;display:inline-block;margin-left:5px}a:hover.animation-right ::slotted([slot=slot-after-text]),a:hover.animation-right ::slotted([slot=slot-before-text]){transform:translateX(var(--ptc-element-spacing-02))}a:hover.animation-down ::slotted([slot=slot-after-text]),a:hover.animation-down ::slotted([slot=slot-before-text]){transform:translateY(var(--ptc-element-spacing-02))}a.left{text-align:left}a.right{text-align:right}a.center{text-align:center}.nav{font-family:var(--ptc-font-latin);background-color:var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);border:1px solid var(--color-white);border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box;color:var(--color-white);display:inline-block;font-size:var(--ptc-font-size-xx-small);font-stretch:100%;font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-loose);list-style:none;padding:3px var(--ptc-element-spacing-04);position:relative;text-align:center;text-decoration:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;transition:background-color var(--ptc-transition-medium) var(--ptc-ease-inout)}.nav:focus-visible{border-radius:4px !important;border:2px solid #fff !important;outline:5px solid #003dd6 !important;background-color:transparent !important;outline-offset:0px !important}.nav:focus{text-decoration:none;border:solid 2px transparent;outline:none}.nav:hover{background-color:var(--color-gray-12)}.ptc-primary,.ptc-quaternary,.ptc-secondary,.ptc-tertiary,.icon-toggle{padding:var(--ptc-font-size-xx-small) var(--ptc-font-size-medium);transition:background-color var(--ptc-ease-inout) var(--ptc-transition-medium);line-height:20px}.ptc-primary.disabled,.ptc-quaternary.disabled,.ptc-secondary.disabled,.ptc-tertiary.disabled,.icon-toggle.disabled{pointer-events:none;border-color:var(--color-gray-03);background:var(--color-gray-02)}.ptc-primary.disabled span,.ptc-quaternary.disabled span,.ptc-secondary.disabled span,.ptc-tertiary.disabled span,.icon-toggle.disabled span{color:var(--color-gray-03)}.ptc-primary.disabled ::slotted([slot=slot-after-text]),.ptc-quaternary.disabled ::slotted([slot=slot-after-text]),.ptc-secondary.disabled ::slotted([slot=slot-after-text]),.ptc-tertiary.disabled ::slotted([slot=slot-after-text]),.icon-toggle.disabled ::slotted([slot=slot-after-text]){fill:var(--color-gray-03) !important}.ptc-primary:focus-visible,.ptc-quaternary:focus-visible,.ptc-secondary:focus-visible,.ptc-tertiary:focus-visible,.icon-toggle:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}.ptc-primary span,.ptc-quaternary span,.ptc-secondary span,.ptc-tertiary span,.icon-toggle span{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-small);line-height:var(--ptc-line-height-densest);letter-spacing:normal}.ptc-primary.small,.ptc-quaternary.small,.ptc-secondary.small,.ptc-tertiary.small,.icon-toggle.small{padding:var(--ptc-element-spacing-03) var(--ptc-element-spacing-04)}.ptc-primary.small span,.ptc-quaternary.small span,.ptc-secondary.small span,.ptc-tertiary.small span,.icon-toggle.small span{font-size:var(--ptc-font-size-xx-small)}.ptc-primary.medium,.ptc-quaternary.medium,.ptc-secondary.medium,.ptc-tertiary.medium,.icon-toggle.medium{padding:14px 20px}.ptc-primary.medium span,.ptc-quaternary.medium span,.ptc-secondary.medium span,.ptc-tertiary.medium span,.icon-toggle.medium span{font-size:var(--ptc-font-size-small)}.ptc-primary.large,.ptc-quaternary.large,.ptc-secondary.large,.ptc-tertiary.large,.icon-toggle.large{padding:var(--ptc-element-spacing-04) var(--ptc-element-spacing-06)}.ptc-primary.large span,.ptc-quaternary.large span,.ptc-secondary.large span,.ptc-tertiary.large span,.icon-toggle.large span{font-size:var(--ptc-font-size-large)}.ptc-primary.acc-alt-style:focus-visible,.ptc-quaternary.acc-alt-style:focus-visible,.ptc-secondary.acc-alt-style:focus-visible,.ptc-tertiary.acc-alt-style:focus-visible,.icon-toggle.acc-alt-style:focus-visible{border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid var(--keyboard-nav-outline)}.ptc-primary{background:var(--color-gray-12);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard)}.ptc-primary:hover{background-color:var(--color-gray-10)}.ptc-primary:active{background-color:var(--color-black);transition:none}.ptc-primary span{color:var(--color-white)}.ptc-primary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-secondary{background:var(--color-gray-12);border:2px solid var(--color-gray-08);border-radius:var(--ptc-border-radius-standard)}.ptc-secondary:hover{background-color:var(--color-gray-10)}.ptc-secondary:active{background-color:var(--color-black);transition:none}.ptc-secondary span{color:var(--color-white)}.ptc-secondary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.ptc-tertiary{background:var(--color-white);border:2px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard)}.ptc-tertiary:hover{background-color:var(--color-gray-02)}.ptc-tertiary:active{background-color:var(--color-gray-03);transition:none}.ptc-tertiary span{color:var(--color-gray-10)}.ptc-tertiary ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.ptc-tertiary ::slotted(a){color:var(--color-gray-10) !important;text-decoration-line:none !important}.ptc-quaternary{background:var(--color-green-07);border:2px solid var(--color-green-07);border-radius:var(--ptc-border-radius-standard);cursor:pointer}.ptc-quaternary:hover{background-color:var(--color-green-08)}.ptc-quaternary:active{background-color:var(--color-green-09);transition:none}.ptc-quaternary span{color:var(--color-white)}.ptc-quaternary ::slotted([slot=slot-after-text]){fill:var(--color-white) !important}.icon-toggle{background:var(--color-white);border:1px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);padding:0;height:2.125rem;width:2.125rem;box-shadow:var(--ptc-shadow-medium)}.icon-toggle:hover{background-color:var(--color-gray-02)}.icon-toggle:active{transition:none;background-color:var(--color-gray-03)}.icon-toggle.active{background-color:var(--color-gray-04)}.icon-toggle.active:hover{background-color:var(--color-gray-05)}.icon-toggle.active:active{transition:none;background-color:var(--color-gray-03)}.icon-toggle:focus{outline:2px solid var(--color-blue-07);outline-offset:1px}.icon-toggle span{color:var(--color-gray-10);padding:0}.icon-toggle ::slotted([slot=slot-after-text]){fill:var(--color-gray-10) !important}.icon-toggle ::slotted(icon-asset){display:block;margin:auto;height:18px;width:18px}.clear-search{border:none;padding:0px;line-height:var(----ptc-line-height-densest);background-color:transparent}.clear-search:hover{text-decoration:underline;text-decoration-color:var(--color-white)}.clear-search span{color:var(--color-white);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.tracker-div{display:inline;display:inline-block}.focus-state-dark-background:focus-visible{border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid var(--keyboard-nav-outline)}.secondary-cta-light,.secondary-cta-dark,.primary-cta{padding:0.875rem 1.25rem;font-size:var(--ptc-font-size-small);font-style:normal;font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);color:var(--color-white);border:2px solid transparent;text-decoration:none}.medium.secondary-cta-light,.medium.secondary-cta-dark,.medium.primary-cta{padding:0.75rem 1rem}.medium.secondary-cta-light span,.medium.secondary-cta-dark span,.medium.primary-cta span{font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-extrabold)}.small.secondary-cta-light,.small.secondary-cta-dark,.small.primary-cta{padding:0.5rem 0.75rem}.small.secondary-cta-light span,.small.secondary-cta-dark span,.small.primary-cta span{font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-extrabold)}.disabled.secondary-cta-light,.disabled.secondary-cta-dark,.disabled.primary-cta{pointer-events:none;color:var(--color-gray-03);border-color:var(--color-gray-03);background-color:var(--color-gray-02)}.disabled.secondary-cta-light icon-asset svg,.disabled.secondary-cta-dark icon-asset svg,.disabled.primary-cta icon-asset svg{fill:var(--color-gray-03)}.disabled.secondary-cta-light:focus-visible,.disabled.secondary-cta-dark:focus-visible,.disabled.primary-cta:focus-visible{background-color:var(--color-gray-02)}.secondary-cta-light:focus-visible,.secondary-cta-dark:focus-visible,.primary-cta:focus-visible{border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid var(--keyboard-nav-outline)}.full-width.secondary-cta-light,.full-width.secondary-cta-dark,.full-width.primary-cta{width:100%}.secondary-cta-light .cta-content-wrap,.secondary-cta-dark .cta-content-wrap,.primary-cta .cta-content-wrap{display:flex;justify-content:center;align-items:center}.secondary-cta-light .cta-content-wrap icon-asset,.secondary-cta-dark .cta-content-wrap icon-asset,.primary-cta .cta-content-wrap icon-asset{margin-right:8px;line-height:0}.secondary-cta-light .cta-content-wrap icon-asset+span,.secondary-cta-dark .cta-content-wrap icon-asset+span,.primary-cta .cta-content-wrap icon-asset+span{text-align:left}.primary-cta{background-color:var(--color-green-07);border-color:var(--color-green-07)}.primary-cta:hover{background-color:var(--color-green-08)}.primary-cta:active{background-color:var(--color-green-09)}.primary-cta:focus-visible{background-color:var(--color-green-07)}.secondary-cta-dark{background-color:var(--color-gray-12);border-color:var(--color-gray-08)}.secondary-cta-dark:hover{background-color:var(--color-gray-10)}.secondary-cta-dark:active{background-color:var(--color-black)}.secondary-cta-dark:focus-visible{background-color:var(--color-gray-12)}.secondary-cta-light{background-color:var(--color-white);border-color:var(--color-gray-10);color:var(--color-gray-10)}.secondary-cta-light:hover{background-color:var(--color-gray-02)}.secondary-cta-light:active{background-color:var(--color-gray-03)}.secondary-cta-light:focus-visible{background-color:var(--color-white)}";
|
|
9
|
+
|
|
10
|
+
const PtcButton = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.clickEvent = index.createEvent(this, "clickEvent", 7);
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
this.active = false;
|
|
16
|
+
this.type = "button";
|
|
17
|
+
this.color = "ptc-primary";
|
|
18
|
+
this.iconAnimation = "";
|
|
19
|
+
this.iconPosition = "icon-right";
|
|
20
|
+
this.linkHref = undefined;
|
|
21
|
+
this.linkTitle = undefined;
|
|
22
|
+
this.target = "_self";
|
|
23
|
+
this.rel = undefined;
|
|
24
|
+
this.tabNav = 0;
|
|
25
|
+
this.styles = undefined;
|
|
26
|
+
this.textAlign = undefined;
|
|
27
|
+
this.enableAccessibilityAltStyle = false;
|
|
28
|
+
this.size = undefined;
|
|
29
|
+
this.buttonTitle = undefined;
|
|
30
|
+
this.ariaLabel = "";
|
|
31
|
+
this.seoCompatibilityMode = false;
|
|
32
|
+
this.maintainContent = false;
|
|
33
|
+
this.trackerId = undefined;
|
|
34
|
+
this.darkFocusState = false;
|
|
35
|
+
this.ctaWidth = "default";
|
|
36
|
+
}
|
|
37
|
+
clickEventHandler() {
|
|
38
|
+
this.clickEvent.emit();
|
|
39
|
+
}
|
|
40
|
+
componentWillLoad() {
|
|
41
|
+
utils.CheckDarkFocusState(this, this.el);
|
|
42
|
+
}
|
|
43
|
+
seoCompRender() {
|
|
44
|
+
const classMap = this.getCssClassMap();
|
|
45
|
+
const Tag = !!this.linkHref ? "a" : "button";
|
|
46
|
+
const [TagType, firstChild] = utils.getSeoTagType(this.el, Tag);
|
|
47
|
+
const html = firstChild && firstChild.innerHTML;
|
|
48
|
+
if (this.el == firstChild) {
|
|
49
|
+
this.el.innerHTML = "";
|
|
50
|
+
}
|
|
51
|
+
if (this.maintainContent) {
|
|
52
|
+
this.el.innerHTML = html;
|
|
53
|
+
}
|
|
54
|
+
return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h("div", Object.assign({ id: this.trackerId, class: "tracker-div mf-listen" }, (this.ctaWidth === "full-width"
|
|
55
|
+
? { style: { display: "block" } }
|
|
56
|
+
: {})), index.h(TagType, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref
|
|
57
|
+
? { target: this.target }
|
|
58
|
+
: {}), (!!this.rel && !!this.linkHref
|
|
59
|
+
? { rel: this.rel }
|
|
60
|
+
: {}), (!!this.linkHref
|
|
61
|
+
? {
|
|
62
|
+
title: this.linkTitle
|
|
63
|
+
? this.linkTitle
|
|
64
|
+
: this.linkHref,
|
|
65
|
+
}
|
|
66
|
+
: {}), (!!this.tabNav
|
|
67
|
+
? { tabindex: -1 }
|
|
68
|
+
: { tabindex: 0 }), { title: this.buttonTitle }, (this.ariaLabel !== ""
|
|
69
|
+
? { ariaLabel: this.ariaLabel }
|
|
70
|
+
: {})), index.h("span", { innerHTML: html, class: "cta-content-wrap" }, index.h("slot", { name: "slot-before-text" }), index.h("slot", { name: "slot-after-text" }))))));
|
|
71
|
+
}
|
|
72
|
+
standardRender() {
|
|
73
|
+
const classMap = this.getCssClassMap();
|
|
74
|
+
const Tag = !!this.linkHref ? "a" : "button";
|
|
75
|
+
return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h("div", { id: this.trackerId, class: "tracker-div mf-listen" }, index.h(Tag, Object.assign({ class: classMap, onClick: this.clickEventHandler.bind(this) }, (!!this.linkHref ? { href: this.linkHref } : {}), (!this.linkHref ? { type: this.type } : {}), (!!this.target && !!this.linkHref
|
|
76
|
+
? { target: this.target }
|
|
77
|
+
: {}), (!!this.rel && !!this.linkHref
|
|
78
|
+
? { rel: this.rel }
|
|
79
|
+
: {}), (!!this.linkHref
|
|
80
|
+
? {
|
|
81
|
+
title: this.linkTitle
|
|
82
|
+
? this.linkTitle
|
|
83
|
+
: this.linkHref,
|
|
84
|
+
}
|
|
85
|
+
: {}), (!!this.tabNav
|
|
86
|
+
? { tabindex: -1 }
|
|
87
|
+
: { tabindex: 0 }), { title: this.buttonTitle }, (this.ariaLabel !== ""
|
|
88
|
+
? { ariaLabel: this.ariaLabel }
|
|
89
|
+
: {})), this.iconAnimation == "reveal-down" ? (index.h("span", null, index.h("div", { class: "content" }, index.h("slot", null)), index.h("div", { class: "icon-wrapper" }, index.h("div", { class: "icon" }, index.h("slot", { name: "slot-after-text" }))))) : (index.h("span", null, index.h("slot", { name: "slot-before-text" }), index.h("slot", null), index.h("slot", { name: "slot-after-text" })))))));
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
if (this.seoCompatibilityMode) {
|
|
93
|
+
return this.seoCompRender();
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return this.standardRender();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
getCssClassMap() {
|
|
100
|
+
return {
|
|
101
|
+
[this.color]: true,
|
|
102
|
+
[this.iconAnimation]: true,
|
|
103
|
+
[this.iconPosition]: true,
|
|
104
|
+
["disabled"]: this.disabled ? true : false,
|
|
105
|
+
["active"]: this.active ? true : false,
|
|
106
|
+
[this.textAlign]: true,
|
|
107
|
+
[this.size]: true,
|
|
108
|
+
["acc-alt-style"]: this.enableAccessibilityAltStyle,
|
|
109
|
+
["focus-state-dark-background"]: this.darkFocusState,
|
|
110
|
+
[this.ctaWidth]: true,
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
get el() { return index.getElement(this); }
|
|
114
|
+
};
|
|
115
|
+
PtcButton.style = ptcButtonCss;
|
|
116
|
+
|
|
117
|
+
exports.ptc_button = PtcButton;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-63ddc79c.js');
|
|
6
|
+
const utils = require('./utils-0ff09a53.js');
|
|
7
|
+
|
|
8
|
+
const ptcParaCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{position:relative;z-index:1}:host .tooltip-enabled{position:relative}:host(.white){color:var(--color-white)}:host(.z-1){z-index:1}:host(.z-2){z-index:2}:host(.z-3){z-index:3}:host(.z-99){z-index:99}:host(.z-999){z-index:999}:host(.z-auto){z-index:auto}p.default{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;}p.main{text-shadow:0 3px 6px var(--color-white);line-height:var(--ptc-line-height-dense);color:var(--color-gray-10)}p.primary-grey{color:var(--color-gray-10)}p.primary-green{color:var(--color-green-06)}p.gray-darker{color:var(--color-gray-11)}p.white{color:var(--color-white)}p.xxx-small{font-size:var(--ptc-font-size-xxx-small)}p.xx-small{font-size:var(--ptc-font-size-xx-small)}p.x-small{font-size:var(--ptc-font-size-x-small)}p.small{font-size:var(--ptc-font-size-small)}p.medium{font-size:var(--ptc-font-size-medium)}p.large{font-size:var(--ptc-font-size-large)}p.x-large{font-size:var(--ptc-font-size-x-large)}p.xx-large{font-size:var(--ptc-font-size-xx-large)}p.xxx-large{font-size:var(--ptc-font-size-xxx-large)}p.xxxx-large{font-size:var(--ptc-font-size-xxxx-large)}p.htmlquote-para{font-size:var(--ptc-font-size-small)}@media only screen and (min-width: 992px){p.htmlquote-para{font-size:var(--ptc-font-size-large)}}p.w-3{font-weight:var(--ptc-font-weight-thin)}p.w-4{font-weight:var(--ptc-font-weight-regular)}p.w-5{font-weight:var(--ptc-font-weight-medium)}p.w-6{font-weight:var(--ptc-font-weight-semibold)}p.w-7{font-weight:var(--ptc-font-weight-bold)}p.w-8{font-weight:var(--ptc-font-weight-extrabold)}p.w-8 ::slotted(a){font-weight:var(--ptc-font-weight-extrabold) !important}p.w-9{font-weight:var(--ptc-font-weight-black)}p.w-9 ::slotted(a){font-weight:var(--ptc-font-weight-black) !important}p.margin-flush{margin-top:0;margin-bottom:0}p.margin-top-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:0}p.margin-top-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:0}p.margin-top-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:0}p.margin-top-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:0}p.margin-top-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:0}p.margin-top-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:0}p.margin-bottom-1{margin-bottom:var(--ptc-element-spacing-01);margin-top:0}p.margin-bottom-2{margin-bottom:var(--ptc-element-spacing-02);margin-top:0}p.margin-bottom-3{margin-bottom:var(--ptc-element-spacing-03);margin-top:0}p.margin-bottom-4{margin-bottom:var(--ptc-element-spacing-04);margin-top:0}p.margin-bottom-5{margin-bottom:var(--ptc-element-spacing-05);margin-top:0}p.margin-bottom-6{margin-bottom:var(--ptc-element-spacing-06);margin-top:0}p.margin-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:var(--ptc-element-spacing-01)}p.margin-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:var(--ptc-element-spacing-02)}p.margin-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:var(--ptc-element-spacing-03)}p.margin-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:var(--ptc-element-spacing-04)}p.margin-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05)}p.margin-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:var(--ptc-element-spacing-06)}p.line-height-densest{line-height:var(--ptc-line-height-densest)}p.line-height-denser{line-height:var(--ptc-line-height-denser)}p.line-height-p{line-height:var(--ptc-line-height-p)}p.line-height-dense{line-height:var(--ptc-line-height-dense)}p.line-height-normal{line-height:var(--ptc-line-height-normal)}p.line-height-loose{line-height:var(--ptc-line-height-loose)}p.line-height-looser{line-height:var(--ptc-line-height-looser)}p.left{text-align:left}p.right{text-align:right}p.center{text-align:center}p.justify{text-align:justify}p.right-768above{text-align:left}@media (min-width: 768px){p.right-768above{text-align:right}}p.announcement{text-transform:uppercase;font-size:var(--ptc-font-size-small);color:var(--color-gray-07);line-height:var(--ptc-line-height-looser);letter-spacing:var(--ptc-letter-spacing-loose)}p.ellipsis-boxing{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word}p.line-clamp-title{display:-webkit-box !important;-webkit-box-orient:vertical;overflow:hidden}@media (max-width: 768px){:host(.hide-tooltip-on-mobile) .line-clamp-title{-webkit-line-clamp:initial !important}}";
|
|
9
|
+
|
|
10
|
+
const PtcPara = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.fontSize = "x-small";
|
|
14
|
+
this.fontWeight = "w-4";
|
|
15
|
+
this.paraStyle = "default";
|
|
16
|
+
this.paraColor = "primary-grey";
|
|
17
|
+
this.paraLineH = "line-height-normal";
|
|
18
|
+
this.paraMargin = undefined;
|
|
19
|
+
this.paraAlign = undefined;
|
|
20
|
+
this.ellipsisLineCutoff = undefined;
|
|
21
|
+
this.paraZIndex = undefined;
|
|
22
|
+
this.styles = undefined;
|
|
23
|
+
this.seoCompatibilityMode = false;
|
|
24
|
+
this.tooltipZIndex = "auto";
|
|
25
|
+
this.tooltipPosition = "bottom";
|
|
26
|
+
this.tooltipTheme = "standard";
|
|
27
|
+
this.enableTooltip = false;
|
|
28
|
+
this.maxChars = undefined;
|
|
29
|
+
this.maxLines = undefined;
|
|
30
|
+
this.hideTooltipOnMobile = false;
|
|
31
|
+
this.ismob = undefined;
|
|
32
|
+
this.noOverflow = false;
|
|
33
|
+
this.tooltipWidth = "default";
|
|
34
|
+
}
|
|
35
|
+
// Tooltip Properties ends
|
|
36
|
+
render() {
|
|
37
|
+
if (this.seoCompatibilityMode) {
|
|
38
|
+
utils.seoSlotReset(this.el);
|
|
39
|
+
}
|
|
40
|
+
return this.standardRender();
|
|
41
|
+
}
|
|
42
|
+
//tooltip code
|
|
43
|
+
getSortedText(content) {
|
|
44
|
+
if (!this.enableTooltip)
|
|
45
|
+
return;
|
|
46
|
+
const trimmedContent = content.trim();
|
|
47
|
+
const shouldTruncate = trimmedContent.length > this.maxChars && !this.maxLines;
|
|
48
|
+
return shouldTruncate
|
|
49
|
+
? `${trimmedContent.slice(0, this.maxChars).trimEnd()}\u00A0\u2026`
|
|
50
|
+
: trimmedContent;
|
|
51
|
+
}
|
|
52
|
+
componentDidLoad() {
|
|
53
|
+
if (this.hideTooltipOnMobile) {
|
|
54
|
+
this.el.classList.add("hide-tooltip-on-mobile");
|
|
55
|
+
}
|
|
56
|
+
this.el.addEventListener("mouseenter", () => {
|
|
57
|
+
this.toggleTitleTooltip(true);
|
|
58
|
+
});
|
|
59
|
+
this.el.addEventListener("mouseleave", () => {
|
|
60
|
+
this.toggleTitleTooltip(false);
|
|
61
|
+
});
|
|
62
|
+
if (this.enableTooltip) {
|
|
63
|
+
let paraContent = this.el.innerText || this.el.textContent;
|
|
64
|
+
this.tooltipText = paraContent.trim();
|
|
65
|
+
this.el.innerText = this.getSortedText(paraContent);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
toggleTitleTooltip(show) {
|
|
69
|
+
const tooltipClass = "tooltip-box";
|
|
70
|
+
const existingTooltip = this.el.querySelector(`.${tooltipClass}`);
|
|
71
|
+
const text = this.el.shadowRoot.querySelectorAll(".line-clamp-title");
|
|
72
|
+
let maxLinesShowCheck = false;
|
|
73
|
+
if (text) {
|
|
74
|
+
text.forEach((t) => {
|
|
75
|
+
maxLinesShowCheck = t.scrollHeight > t.clientHeight;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const ifCharExceeds = this.maxChars
|
|
79
|
+
? this.tooltipText.length > this.maxChars && !this.maxLines
|
|
80
|
+
: false;
|
|
81
|
+
const ifLinesExceeds = this.maxLines && maxLinesShowCheck;
|
|
82
|
+
if (show && this.enableTooltip) {
|
|
83
|
+
if (((!existingTooltip && ifCharExceeds) ||
|
|
84
|
+
(!existingTooltip && ifLinesExceeds)) &&
|
|
85
|
+
!this.noOverflow) {
|
|
86
|
+
const tooltipMarkup = document.createElement("div");
|
|
87
|
+
tooltipMarkup.className = tooltipClass;
|
|
88
|
+
tooltipMarkup.innerText = this.tooltipText;
|
|
89
|
+
tooltipMarkup.style.zIndex = String(this.tooltipZIndex); // Ensures zIndex is a string
|
|
90
|
+
tooltipMarkup.classList.add(this.tooltipPosition, this.tooltipTheme, this.tooltipWidth);
|
|
91
|
+
if (this.hideTooltipOnMobile) {
|
|
92
|
+
tooltipMarkup.classList.add("hide-tooltip-mobile");
|
|
93
|
+
}
|
|
94
|
+
this.el.appendChild(tooltipMarkup);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
existingTooltip === null || existingTooltip === void 0 ? void 0 : existingTooltip.remove();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//tooltip code ends
|
|
102
|
+
standardRender() {
|
|
103
|
+
const classMap = this.getCssClassMap();
|
|
104
|
+
const colorClass = this.addWhiteClass();
|
|
105
|
+
const cutOff = this.getLineCuttoff();
|
|
106
|
+
return (index.h(index.Host, { class: `${colorClass} ${this.paraZIndex} trunc-text` }, this.styles && index.h("style", null, this.styles), index.h("p", { class: classMap, part: "part-para", style: cutOff }, index.h("slot", null))));
|
|
107
|
+
}
|
|
108
|
+
getCssClassMap() {
|
|
109
|
+
return {
|
|
110
|
+
[this.fontSize]: true,
|
|
111
|
+
[this.fontWeight]: true,
|
|
112
|
+
[this.paraStyle]: true,
|
|
113
|
+
[this.paraMargin]: !!this.paraMargin ? true : false,
|
|
114
|
+
[this.paraColor]: true,
|
|
115
|
+
[this.paraLineH]: true,
|
|
116
|
+
[this.paraAlign]: !!this.paraAlign ? true : false,
|
|
117
|
+
["ellipsis-boxing"]: this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0,
|
|
118
|
+
["line-clamp-title"]: this.maxLines && this.maxLines > 0, //tooltip code,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//WEB-2392
|
|
122
|
+
addWhiteClass() {
|
|
123
|
+
if (this.paraColor == "white") {
|
|
124
|
+
return {
|
|
125
|
+
[this.paraColor]: true,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
getLineCuttoff() {
|
|
130
|
+
const lineClamp = this.ellipsisLineCutoff > 0
|
|
131
|
+
? this.ellipsisLineCutoff
|
|
132
|
+
: this.maxLines;
|
|
133
|
+
return lineClamp > 0 ? { "-webkit-line-clamp": `${lineClamp}` } : {};
|
|
134
|
+
}
|
|
135
|
+
get el() { return index.getElement(this); }
|
|
136
|
+
};
|
|
137
|
+
PtcPara.style = ptcParaCss;
|
|
138
|
+
|
|
139
|
+
exports.ptc_para = PtcPara;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-63ddc79c.js');
|
|
6
|
+
const interfaces = require('./interfaces-574e6df7.js');
|
|
7
|
+
|
|
8
|
+
const ptcPictureCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;overflow:hidden}:host .inline{display:inline}:host .inline-block{display:inline-block}:host .block{display:block}:host(.relative){position:relative}:host(.static){position:static}:host(.absoltue){position:absolute}img{max-width:100%}.cover{object-fit:cover}.fill{object-fit:fill}.contain{object-fit:contain}.scale-down{object-fit:scale-down}.none{object-fit:none}.initial{object-fit:initial}.inherit{object-fit:inherit}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.radius-pill{border-radius:var(--ptc-border-radius-pill)}.radius-circle{border-radius:var(--ptc-border-radius-circle)}.is-full-height{height:100%}.is-full-width{width:100%}:host(.left){text-align:left}:host(.right){text-align:right}:host(.center){text-align:center}";
|
|
9
|
+
|
|
10
|
+
const PtcPicture = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.src = undefined;
|
|
14
|
+
this.alt = "image";
|
|
15
|
+
this.sizeXs = "510x340";
|
|
16
|
+
this.sizeSm = "1240x496";
|
|
17
|
+
this.sizeMd = "1366x500";
|
|
18
|
+
this.sizeLg = "1920x1080";
|
|
19
|
+
this.disableResize = false;
|
|
20
|
+
this.oldSrc = undefined;
|
|
21
|
+
this.imagePosition = "static";
|
|
22
|
+
this.borderRadius = undefined;
|
|
23
|
+
this.height = undefined;
|
|
24
|
+
this.width = undefined;
|
|
25
|
+
this.objectFit = "cover";
|
|
26
|
+
this.isFullHeight = false;
|
|
27
|
+
this.isFullWidth = false;
|
|
28
|
+
this.styles = undefined;
|
|
29
|
+
this.imageAlignment = "left";
|
|
30
|
+
this.maxWidth = undefined;
|
|
31
|
+
this.displayImage = "block";
|
|
32
|
+
}
|
|
33
|
+
WindowResize() {
|
|
34
|
+
this.addIntersectionObserver();
|
|
35
|
+
}
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
if (this.disableResize) {
|
|
38
|
+
this.sizeXs = undefined;
|
|
39
|
+
this.sizeSm = undefined;
|
|
40
|
+
this.sizeMd = undefined;
|
|
41
|
+
this.sizeLg = undefined;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
componentDidLoad() {
|
|
45
|
+
this.addIntersectionObserver();
|
|
46
|
+
}
|
|
47
|
+
componentWillUpdate() {
|
|
48
|
+
if (this.src !== this.oldSrc) {
|
|
49
|
+
this.addIntersectionObserver();
|
|
50
|
+
}
|
|
51
|
+
this.oldSrc = this.src;
|
|
52
|
+
}
|
|
53
|
+
//lazy-loading
|
|
54
|
+
addIntersectionObserver() {
|
|
55
|
+
if (!this.src) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if ("IntersectionObserver" in window) {
|
|
59
|
+
let lazyLoadImages = new IntersectionObserver((entries) => {
|
|
60
|
+
entries.forEach((entry) => {
|
|
61
|
+
if (entry.isIntersecting) {
|
|
62
|
+
const image = this.el.shadowRoot.querySelector("img");
|
|
63
|
+
image.src = this.setResponsiveBg();
|
|
64
|
+
lazyLoadImages.unobserve(image);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
let tempImg = this.el.shadowRoot.querySelector("img");
|
|
69
|
+
if (tempImg) {
|
|
70
|
+
lazyLoadImages.observe(tempImg);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// fall back to setTimeout for Safari and IE
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
const image = this.el.shadowRoot.querySelector("img");
|
|
77
|
+
image.src = this.setResponsiveBg();
|
|
78
|
+
image.onload = () => {
|
|
79
|
+
image.removeAttribute("data-src");
|
|
80
|
+
};
|
|
81
|
+
}, 5000);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//responsive image
|
|
85
|
+
setResponsiveBg() {
|
|
86
|
+
// Define local variables
|
|
87
|
+
let backgrounds = (this.el.shadowRoot || document).querySelectorAll("img"), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
88
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
89
|
+
// Set current variables
|
|
90
|
+
el = backgrounds[i];
|
|
91
|
+
elData = el.getAttribute("data-" + currentBreakpoint);
|
|
92
|
+
if (elData !== null) {
|
|
93
|
+
return elData;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
if (typeof console == "object") {
|
|
97
|
+
console.warn("Data attribute: data-" +
|
|
98
|
+
currentBreakpoint +
|
|
99
|
+
" not found on element:\n\n" +
|
|
100
|
+
el.outerHTML +
|
|
101
|
+
"\n\n\n");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
const classMap = this.getCssClassMap();
|
|
108
|
+
const classMapHost = this.getCssClassMapHost();
|
|
109
|
+
return (index.h(index.Host, { class: classMapHost }, this.styles && index.h("style", null, this.styles), index.h("img", Object.assign({ class: classMap, "data-xs": !!this.sizeXs ? `${this.src}` : `${this.src}`, "data-sm": !!this.sizeSm ? `${this.src}` : `${this.src}`, "data-md": !!this.sizeMd ? `${this.src}` : `${this.src}`, "data-lg": !!this.sizeLg ? `${this.src}` : `${this.src}` }, (!!this.width ? { width: this.width } : {}), (!!this.height ? { height: this.height } : {}), { alt: this.alt, style: Object.assign({}, (!!this.maxWidth
|
|
110
|
+
? { maxWidth: this.maxWidth + "px" }
|
|
111
|
+
: {})) })), index.h("slot", null)));
|
|
112
|
+
}
|
|
113
|
+
getCurrentBreakPoints() {
|
|
114
|
+
// Define local variables
|
|
115
|
+
let doc = window.document, temp = doc.createElement("div"), env;
|
|
116
|
+
// Append test node
|
|
117
|
+
doc.body.appendChild(temp);
|
|
118
|
+
// Loop through breakpoints
|
|
119
|
+
for (let i = interfaces.ResponsivePictureVariables.envs.length - 1; i >= 0; i--) {
|
|
120
|
+
env = interfaces.ResponsivePictureVariables.envs[i];
|
|
121
|
+
// Add classes
|
|
122
|
+
temp.className = "hidden-" + env;
|
|
123
|
+
// Found breakpoint
|
|
124
|
+
if (temp.offsetParent === null) {
|
|
125
|
+
// Remove our test node
|
|
126
|
+
doc.body.removeChild(temp);
|
|
127
|
+
// Return current breakpoint
|
|
128
|
+
return env;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Breakpoint not found, try fallback
|
|
132
|
+
doc.body.removeChild(temp);
|
|
133
|
+
return this.getFallbackBreakpoint();
|
|
134
|
+
}
|
|
135
|
+
getFallbackBreakpoint() {
|
|
136
|
+
if (window.matchMedia("(min-width: 992px)").matches) {
|
|
137
|
+
return "lg";
|
|
138
|
+
}
|
|
139
|
+
else if (window.matchMedia("(min-width: 768px)").matches) {
|
|
140
|
+
return "md";
|
|
141
|
+
}
|
|
142
|
+
else if (window.matchMedia("(min-width: 576px)").matches) {
|
|
143
|
+
return "sm";
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return "xs";
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
getCssClassMap() {
|
|
150
|
+
return {
|
|
151
|
+
[this.borderRadius]: this.borderRadius ? true : false,
|
|
152
|
+
[this.objectFit]: true,
|
|
153
|
+
[this.isFullHeight ? "is-full-height" : "is-normal-height"]: true,
|
|
154
|
+
[this.isFullWidth ? "is-full-width" : "is-normal-width"]: true,
|
|
155
|
+
[this.displayImage]: true,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
getCssClassMapHost() {
|
|
159
|
+
return {
|
|
160
|
+
[this.imagePosition]: true,
|
|
161
|
+
[this.imageAlignment]: true,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
get el() { return index.getElement(this); }
|
|
165
|
+
};
|
|
166
|
+
PtcPicture.style = ptcPictureCss;
|
|
167
|
+
|
|
168
|
+
exports.ptc_picture = PtcPicture;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-63ddc79c.js');
|
|
6
|
+
|
|
7
|
+
const ptcSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.ptc-spacer-horizontal){display:inline-block;height:100% !important}:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.ptc-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.ptc-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.small){width:12px;min-width:12px}}:host(.ptc-spacer-horizontal.medium){height:100%}:host(.ptc-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.large){width:20px;min-width:20px}}:host(.ptc-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.ptc-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.ptc-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.ptc-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.ptc-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.ptc-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.ptc-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.ptc-spacer-vertical.small){height:12px;min-height:12px}}:host(.ptc-spacer-vertical.medium){width:100%}:host(.ptc-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.ptc-spacer-vertical.large){height:20px;min-height:20px}}:host(.ptc-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.ptc-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.ptc-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.ptc-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.ptc-spacer-vertical.space-144){width:100%;height:144px;min-height:144px}:host(.ptc-spacer-vertical.space-120){width:100%;height:120px;min-height:120px}:host(.ptc-spacer-vertical.space-128){width:100%;height:128px;min-height:128px}:host(.ptc-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.ptc-spacer-xx-small){display:block}}:host(.ptc-spacer-x-small){display:none}@media (max-width: 35.99em){:host(.ptc-spacer-x-small){display:block}}:host(.ptc-spacer-small){display:none}@media (min-width: 36em){:host(.ptc-spacer-small){display:block}}:host(.ptc-spacer-medium){display:none}@media (min-width: 48em){:host(.ptc-spacer-medium){display:block}}:host(.ptc-spacer-large){display:none}@media (min-width: 62em){:host(.ptc-spacer-large){display:block}}:host(.ptc-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.ptc-spacer-x-large){display:block}}:host(.ptc-spacer-xx-large){display:none}@media (min-width: 75em){:host(.ptc-spacer-xx-large){display:block}}:host(.ptc-spacer-xxx-large){display:none}@media (min-width: 90em){:host(.ptc-spacer-xxx-large){display:block}}";
|
|
8
|
+
|
|
9
|
+
const PtcSpacer = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.breakpoint = "";
|
|
13
|
+
this.size = "medium";
|
|
14
|
+
this.direction = "vertical";
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
const classMap = this.getCssClassMap();
|
|
18
|
+
return index.h(index.Host, { class: classMap });
|
|
19
|
+
}
|
|
20
|
+
getCssClassMap() {
|
|
21
|
+
return {
|
|
22
|
+
[this.size]: true,
|
|
23
|
+
["ptc-spacer-horizontal"]: this.direction === "horizontal",
|
|
24
|
+
["ptc-spacer-vertical"]: this.direction === "vertical",
|
|
25
|
+
["ptc-spacer-xx-small"]: this.breakpoint === "xx-small",
|
|
26
|
+
["ptc-spacer-x-small"]: this.breakpoint === "x-small",
|
|
27
|
+
["ptc-spacer-small"]: this.breakpoint === "small",
|
|
28
|
+
["ptc-spacer-medium"]: this.breakpoint === "medium",
|
|
29
|
+
["ptc-spacer-large"]: this.breakpoint === "large",
|
|
30
|
+
["ptc-spacer-x-large"]: this.breakpoint === "x-large",
|
|
31
|
+
["ptc-spacer-xx-large"]: this.breakpoint === "xx-large",
|
|
32
|
+
["ptc-spacer-xxx-large"]: this.breakpoint === "xxx-large",
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
PtcSpacer.style = ptcSpacerCss;
|
|
37
|
+
|
|
38
|
+
exports.ptc_spacer = PtcSpacer;
|