@ptcwebops/ptcw-design 0.6.5 → 0.6.7
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/LICENSE +21 -21
- package/dist/cjs/dropdown-item.cjs.entry.js +10 -10
- package/dist/cjs/icon-asset_13.cjs.entry.js +725 -697
- package/dist/cjs/{interfaces-574e6df7.js → interfaces-0ecd8027.js} +9 -9
- package/dist/cjs/list-item.cjs.entry.js +20 -20
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottie-player.cjs.entry.js +354 -354
- package/dist/cjs/my-component.cjs.entry.js +12 -12
- package/dist/cjs/ptc-accordion-item.cjs.entry.js +97 -97
- package/dist/cjs/ptc-accordion.cjs.entry.js +38 -38
- package/dist/cjs/ptc-announcement.cjs.entry.js +37 -37
- package/dist/cjs/ptc-breadcrumb.cjs.entry.js +12 -12
- package/dist/cjs/ptc-card-bottom.cjs.entry.js +31 -31
- package/dist/cjs/ptc-card-content_2.cjs.entry.js +204 -204
- package/dist/cjs/ptc-card-plm.cjs.entry.js +16 -16
- package/dist/cjs/ptc-card.cjs.entry.js +68 -68
- package/dist/cjs/ptc-collapse-list.cjs.entry.js +336 -192
- package/dist/cjs/ptc-date.cjs.entry.js +48 -48
- package/dist/cjs/ptc-dynamic-card.cjs.entry.js +40 -40
- package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +37 -37
- package/dist/cjs/ptc-hero-footer-cta.cjs.entry.js +8 -8
- package/dist/cjs/ptc-hero.cjs.entry.js +18 -18
- package/dist/cjs/ptc-icon-list.cjs.entry.js +32 -32
- package/dist/cjs/ptc-img.cjs.entry.js +149 -149
- package/dist/cjs/ptc-list.cjs.entry.js +50 -50
- package/dist/cjs/ptc-lottie.cjs.entry.js +12 -12
- package/dist/cjs/ptc-minimized-footer.cjs.entry.js +8 -8
- package/dist/cjs/ptc-minimized-header.cjs.entry.js +11 -11
- package/dist/cjs/ptc-mobile-select.cjs.entry.js +69 -69
- package/dist/cjs/ptc-nav-item.cjs.entry.js +83 -83
- package/dist/cjs/ptc-nav.cjs.entry.js +8 -8
- package/dist/cjs/ptc-overlay.cjs.entry.js +20 -20
- package/dist/cjs/ptc-pagenation.cjs.entry.js +105 -105
- package/dist/cjs/ptc-previous-url.cjs.entry.js +8 -8
- package/dist/cjs/ptc-pricing-block.cjs.entry.js +16 -15
- package/dist/cjs/ptc-quote.cjs.entry.js +25 -25
- package/dist/cjs/ptc-responsive-wrapper.cjs.entry.js +54 -54
- package/dist/cjs/ptc-social-share.cjs.entry.js +64 -64
- package/dist/cjs/ptc-span.cjs.entry.js +23 -23
- package/dist/cjs/ptc-svg-btn.cjs.entry.js +75 -75
- package/dist/cjs/ptc-tab-list.cjs.entry.js +119 -119
- package/dist/cjs/ptc-two-column-media.cjs.entry.js +14 -14
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/tab-content.cjs.entry.js +27 -27
- package/dist/cjs/tab-header.cjs.entry.js +44 -44
- package/dist/cjs/{utils-1c17977e.js → utils-2ac2a528.js} +80 -64
- package/dist/collection/components/dropdown-item/dropdown-item.js +56 -56
- package/dist/collection/components/icon-asset/icon-asset.css +29 -4
- package/dist/collection/components/icon-asset/icon-asset.js +217 -217
- package/dist/collection/components/icon-asset/media/brands.svg +1381 -1381
- package/dist/collection/components/icon-asset/media/designer.svg +368 -365
- package/dist/collection/components/icon-asset/media/regular.svg +463 -463
- package/dist/collection/components/icon-asset/media/solid.svg +3013 -3013
- package/dist/collection/components/icon-asset/media/svg-with-js.min.css +4 -4
- package/dist/collection/components/list-item/list-item.js +104 -104
- package/dist/collection/components/my-component/my-component.css +3 -3
- package/dist/collection/components/my-component/my-component.js +73 -73
- package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.js +296 -296
- package/dist/collection/components/ptc-accordion/ptc-accordion.js +74 -74
- package/dist/collection/components/ptc-announcement/ptc-announcement.js +210 -210
- package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.js +21 -21
- package/dist/collection/components/ptc-button/ptc-button.js +293 -293
- package/dist/collection/components/ptc-card/ptc-card.js +301 -301
- package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.js +105 -105
- package/dist/collection/components/ptc-card-content/ptc-card-content.js +109 -109
- package/dist/collection/components/ptc-card-plm/ptc-card-plm.js +97 -97
- package/dist/collection/components/ptc-checkbox/ptc-checkbox.js +114 -114
- package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.css +130 -57
- package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.js +556 -288
- package/dist/collection/components/ptc-container/ptc-container.js +119 -119
- package/dist/collection/components/ptc-date/ptc-date.js +201 -201
- package/dist/collection/components/ptc-dropdown/ptc-dropdown.js +156 -156
- package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.js +156 -156
- package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.js +115 -115
- package/dist/collection/components/ptc-filter-tag/ptc-filter-tag.css +15 -0
- package/dist/collection/components/ptc-filter-tag/ptc-filter-tag.js +105 -70
- package/dist/collection/components/ptc-hero/ptc-hero.js +67 -67
- package/dist/collection/components/ptc-hero-footer-cta/ptc-hero-footer-cta.js +77 -77
- package/dist/collection/components/ptc-icon-list/ptc-icon-list.js +145 -145
- package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +86 -86
- package/dist/collection/components/ptc-img/ptc-img.js +314 -314
- package/dist/collection/components/ptc-link/ptc-link.js +198 -198
- package/dist/collection/components/ptc-list/ptc-list.js +95 -95
- package/dist/collection/components/ptc-lottie/ptc-lottie.css +5 -5
- package/dist/collection/components/ptc-lottie/ptc-lottie.js +58 -58
- package/dist/collection/components/ptc-minimized-footer/ptc-minimized-footer.js +17 -17
- package/dist/collection/components/ptc-minimized-header/ptc-minimized-header.js +80 -80
- package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.js +221 -221
- package/dist/collection/components/ptc-modal/ptc-modal.js +337 -337
- package/dist/collection/components/ptc-nav/ptc-nav.js +21 -21
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +252 -252
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +99 -99
- package/dist/collection/components/ptc-pagenation/ptc-pagenation.css +2 -2
- package/dist/collection/components/ptc-pagenation/ptc-pagenation.js +317 -317
- package/dist/collection/components/ptc-para/ptc-para.js +167 -167
- package/dist/collection/components/ptc-picture/ptc-picture.js +474 -474
- package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +54 -54
- package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.css +6 -1
- package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.js +45 -25
- package/dist/collection/components/ptc-quote/ptc-quote.js +154 -154
- package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.css +3 -3
- package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.js +62 -62
- package/dist/collection/components/ptc-shopping-cart/ptc-shopping-cart.js +91 -91
- package/dist/collection/components/ptc-social-share/ptc-social-share.js +206 -206
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +322 -322
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +99 -99
- package/dist/collection/components/ptc-span/ptc-span.js +89 -89
- package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.js +71 -71
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.css +1 -1
- package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +145 -145
- package/dist/collection/components/ptc-title/ptc-title.js +245 -245
- package/dist/collection/components/ptc-two-column-media/ptc-two-column-media.js +40 -40
- package/dist/collection/components/tab-content/tab-content.css +10 -0
- package/dist/collection/components/tab-content/tab-content.js +74 -74
- package/dist/collection/components/tab-header/tab-header.css +1 -1
- package/dist/collection/components/tab-header/tab-header.js +106 -107
- package/dist/collection/index.js +1 -1
- package/dist/collection/media/svg-imgs/Back-arrow.svg +11 -11
- package/dist/collection/media/svg-imgs/close.svg +10 -10
- package/dist/collection/media/svg-imgs/ptc-shopping-cart-black.svg +3 -3
- package/dist/collection/media/svg-imgs/ptc-shopping-cart-white.svg +3 -3
- package/dist/collection/media/svg-imgs/slider-arrow-left.svg +18 -18
- package/dist/collection/media/svg-imgs/slider-arrow-right.svg +18 -18
- package/dist/collection/media/svg-imgs/union.svg +3 -3
- package/dist/collection/utils/component.js +3 -3
- package/dist/collection/utils/interfaces.js +11 -11
- package/dist/collection/utils/utils.js +81 -65
- package/dist/custom-elements/index.js +3324 -3137
- package/dist/esm/dropdown-item.entry.js +10 -10
- package/dist/esm/icon-asset_13.entry.js +723 -695
- package/dist/esm/{interfaces-7c0243be.js → interfaces-c1c73092.js} +9 -9
- package/dist/esm/list-item.entry.js +20 -20
- package/dist/esm/loader.js +1 -1
- package/dist/esm/lottie-player.entry.js +354 -354
- package/dist/esm/my-component.entry.js +12 -12
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/ptc-accordion-item.entry.js +97 -97
- package/dist/esm/ptc-accordion.entry.js +38 -38
- package/dist/esm/ptc-announcement.entry.js +37 -37
- package/dist/esm/ptc-breadcrumb.entry.js +12 -12
- package/dist/esm/ptc-card-bottom.entry.js +31 -31
- package/dist/esm/ptc-card-content_2.entry.js +204 -204
- package/dist/esm/ptc-card-plm.entry.js +16 -16
- package/dist/esm/ptc-card.entry.js +68 -68
- package/dist/esm/ptc-collapse-list.entry.js +336 -192
- package/dist/esm/ptc-date.entry.js +48 -48
- package/dist/esm/ptc-dynamic-card.entry.js +40 -40
- package/dist/esm/ptc-ellipsis-dropdown.entry.js +37 -37
- package/dist/esm/ptc-hero-footer-cta.entry.js +8 -8
- package/dist/esm/ptc-hero.entry.js +18 -18
- package/dist/esm/ptc-icon-list.entry.js +32 -32
- package/dist/esm/ptc-img.entry.js +149 -149
- package/dist/esm/ptc-list.entry.js +50 -50
- package/dist/esm/ptc-lottie.entry.js +12 -12
- package/dist/esm/ptc-minimized-footer.entry.js +8 -8
- package/dist/esm/ptc-minimized-header.entry.js +11 -11
- package/dist/esm/ptc-mobile-select.entry.js +69 -69
- package/dist/esm/ptc-nav-item.entry.js +83 -83
- package/dist/esm/ptc-nav.entry.js +8 -8
- package/dist/esm/ptc-overlay.entry.js +20 -20
- package/dist/esm/ptc-pagenation.entry.js +105 -105
- package/dist/esm/ptc-previous-url.entry.js +8 -8
- package/dist/esm/ptc-pricing-block.entry.js +16 -15
- package/dist/esm/ptc-quote.entry.js +25 -25
- package/dist/esm/ptc-responsive-wrapper.entry.js +54 -54
- package/dist/esm/ptc-social-share.entry.js +64 -64
- package/dist/esm/ptc-span.entry.js +23 -23
- package/dist/esm/ptc-svg-btn.entry.js +75 -75
- package/dist/esm/ptc-tab-list.entry.js +119 -119
- package/dist/esm/ptc-two-column-media.entry.js +14 -14
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/tab-content.entry.js +27 -27
- package/dist/esm/tab-header.entry.js +44 -44
- package/dist/esm/{utils-4b79ffaf.js → utils-2dbb41dc.js} +80 -65
- package/dist/ptcw-design/media/brands.svg +1381 -1381
- package/dist/ptcw-design/media/designer.svg +368 -365
- package/dist/ptcw-design/media/regular.svg +463 -463
- package/dist/ptcw-design/media/solid.svg +3013 -3013
- package/dist/ptcw-design/media/svg-with-js.min.css +4 -4
- package/dist/ptcw-design/p-14f55c38.entry.js +1 -0
- package/dist/ptcw-design/{p-a53873e9.entry.js → p-2469a843.entry.js} +1 -1
- package/dist/ptcw-design/{p-57f553f0.entry.js → p-3f2c3e47.entry.js} +1 -1
- package/dist/ptcw-design/p-53deea18.entry.js +1 -0
- package/dist/ptcw-design/p-5e98555a.js +1 -0
- package/dist/ptcw-design/{p-b8dff289.entry.js → p-6956e9cf.entry.js} +1 -1
- package/dist/ptcw-design/p-ab716377.entry.js +1 -0
- package/dist/ptcw-design/{p-c4372a9e.entry.js → p-b2527cde.entry.js} +1 -1
- package/dist/ptcw-design/{p-7c112bdc.entry.js → p-b30ba340.entry.js} +1 -1
- package/dist/ptcw-design/p-da709b70.entry.js +1 -0
- package/dist/ptcw-design/{p-1783481c.entry.js → p-e7e07b91.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/dropdown-item/dropdown-item.d.ts +5 -5
- package/dist/types/components/icon-asset/icon-asset.d.ts +40 -40
- package/dist/types/components/list-item/list-item.d.ts +8 -8
- package/dist/types/components/my-component/my-component.d.ts +16 -16
- package/dist/types/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.d.ts +59 -59
- package/dist/types/components/ptc-accordion/ptc-accordion.d.ts +13 -13
- package/dist/types/components/ptc-announcement/ptc-announcement.d.ts +43 -43
- package/dist/types/components/ptc-breadcrumb/ptc-breadcrumb.d.ts +4 -4
- package/dist/types/components/ptc-button/ptc-button.d.ts +56 -56
- package/dist/types/components/ptc-card/ptc-card.d.ts +54 -54
- package/dist/types/components/ptc-card-bottom/ptc-card-bottom.d.ts +15 -15
- package/dist/types/components/ptc-card-content/ptc-card-content.d.ts +15 -15
- package/dist/types/components/ptc-card-plm/ptc-card-plm.d.ts +8 -8
- package/dist/types/components/ptc-checkbox/ptc-checkbox.d.ts +11 -11
- package/dist/types/components/ptc-collapse-list/ptc-collapse-list.d.ts +55 -39
- package/dist/types/components/ptc-container/ptc-container.d.ts +12 -12
- package/dist/types/components/ptc-date/ptc-date.d.ts +41 -41
- package/dist/types/components/ptc-dropdown/ptc-dropdown.d.ts +19 -19
- package/dist/types/components/ptc-dynamic-card/ptc-dynamic-card.d.ts +16 -16
- package/dist/types/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.d.ts +12 -12
- package/dist/types/components/ptc-filter-tag/ptc-filter-tag.d.ts +17 -11
- package/dist/types/components/ptc-hero/ptc-hero.d.ts +12 -12
- package/dist/types/components/ptc-hero-footer-cta/ptc-hero-footer-cta.d.ts +6 -6
- package/dist/types/components/ptc-icon-list/ptc-icon-list.d.ts +21 -21
- package/dist/types/components/ptc-icon-minimize/ptc-icon-minimize.d.ts +9 -9
- package/dist/types/components/ptc-img/ptc-img.d.ts +51 -51
- package/dist/types/components/ptc-link/ptc-link.d.ts +36 -36
- package/dist/types/components/ptc-list/ptc-list.d.ts +8 -8
- package/dist/types/components/ptc-lottie/ptc-lottie.d.ts +12 -12
- package/dist/types/components/ptc-minimized-footer/ptc-minimized-footer.d.ts +3 -3
- package/dist/types/components/ptc-minimized-header/ptc-minimized-header.d.ts +6 -6
- package/dist/types/components/ptc-mobile-select/ptc-mobile-select.d.ts +40 -40
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +55 -55
- package/dist/types/components/ptc-nav/ptc-nav.d.ts +3 -3
- package/dist/types/components/ptc-nav-item/ptc-nav-item.d.ts +53 -53
- package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +20 -20
- package/dist/types/components/ptc-pagenation/ptc-pagenation.d.ts +27 -27
- package/dist/types/components/ptc-para/ptc-para.d.ts +29 -29
- package/dist/types/components/ptc-picture/ptc-picture.d.ts +93 -93
- package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +5 -5
- package/dist/types/components/ptc-pricing-block/ptc-pricing-block.d.ts +5 -4
- package/dist/types/components/ptc-quote/ptc-quote.d.ts +29 -29
- package/dist/types/components/ptc-responsive-wrapper/ptc-responsive-wrapper.d.ts +8 -8
- package/dist/types/components/ptc-shopping-cart/ptc-shopping-cart.d.ts +6 -6
- package/dist/types/components/ptc-social-share/ptc-social-share.d.ts +25 -25
- package/dist/types/components/ptc-spacer/ptc-spacer.d.ts +16 -16
- package/dist/types/components/ptc-span/ptc-span.d.ts +16 -16
- package/dist/types/components/ptc-svg-btn/ptc-svg-btn.d.ts +12 -12
- package/dist/types/components/ptc-tab-list/ptc-tab-list.d.ts +15 -15
- package/dist/types/components/ptc-title/ptc-title.d.ts +41 -41
- package/dist/types/components/ptc-two-column-media/ptc-two-column-media.d.ts +9 -9
- package/dist/types/components/tab-content/tab-content.d.ts +12 -12
- package/dist/types/components/tab-header/tab-header.d.ts +13 -13
- package/dist/types/components.d.ts +42 -37
- package/dist/types/global.d.ts +1072 -1072
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/component.d.ts +1 -1
- package/dist/types/utils/interfaces.d.ts +28 -28
- package/dist/types/utils/utils.d.ts +4 -3
- package/package.json +59 -59
- package/readme.md +11 -11
- package/dist/ptcw-design/p-2173493c.entry.js +0 -1
- package/dist/ptcw-design/p-62f4a655.js +0 -1
- package/dist/ptcw-design/p-8466b65b.entry.js +0 -1
- package/dist/ptcw-design/p-df43f569.entry.js +0 -1
- package/dist/ptcw-design/p-e6558b61.entry.js +0 -1
- /package/dist/ptcw-design/{p-ee1183b2.js → p-50e52c88.js} +0 -0
|
@@ -2,46 +2,46 @@ import { r as registerInstance, h, H as Host } from './index-a91c2367.js';
|
|
|
2
2
|
|
|
3
3
|
const ptcDynamicCardCss = ":host{display:block}:host(.sequential) .card-wrapper{position:relative}:host(.sequential) .card{background-color:var(--color-gray-12);overflow:hidden}:host(.sequential) .card-mobile,:host(.sequential) .card-dt-open{display:block;border-top:5px solid var(--color-green-05);width:350px}:host(.sequential) .card-mobile ptc-card-content,:host(.sequential) .card-dt-open ptc-card-content{display:flex;justify-content:center;align-items:center;padding:var(--ptc-element-spacing-06) var(--ptc-element-spacing-06) var(--ptc-element-spacing-07) var(--ptc-element-spacing-06)}@media only screen and (min-width: 1440px){:host(.sequential) .card-mobile ptc-card-content,:host(.sequential) .card-dt-open ptc-card-content{padding-left:var(--ptc-element-spacing-08);padding-right:var(--ptc-element-spacing-08)}}:host(.sequential) .card-mobile .card-title h3,:host(.sequential) .card-dt-open .card-title h3{color:var(--color-white);font-size:var(--ptc-font-size-large);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);margin-bottom:0rem;margin-block-start:0rem;letter-spacing:var(--ptc-letter-spacing-normal)}:host(.sequential) .card-mobile .card-content,:host(.sequential) .card-dt-open .card-content{margin-top:var(--ptc-element-spacing-03)}:host(.sequential) .card-dt-closed{width:135px;height:424px}:host(.sequential) .card-dt-closed ptc-card-content{position:absolute;width:100%;height:100%;top:0;display:flex;align-items:center;justify-content:center}:host(.sequential) .card-dt-closed .card-title{text-align:center}:host(.sequential) .card-dt-closed .card-title h2{color:var(--color-white);font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);margin-bottom:0rem;margin-block-start:0rem;letter-spacing:var(--ptc-letter-spacing-normal);padding-left:var(--ptc-element-spacing-03);padding-right:var(--ptc-element-spacing-03)}@media only screen and (min-width: 1440px){:host(.sequential) .card-dt-closed .card-title h2{font-size:var(--ptc-font-size-small)}}:host(.sequential) .card-dt-open{display:flex;width:45vw;height:480px}";
|
|
4
4
|
|
|
5
|
-
let PtcDynamicCard = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/** Dynamic Card Type */
|
|
9
|
-
this.cardType = 'sequential';
|
|
10
|
-
/** Card Title */
|
|
11
|
-
this.cardTitle = 'Card Title Goes Here';
|
|
12
|
-
/** Card Status */
|
|
13
|
-
this.cardStatus = 'desktop-closed';
|
|
14
|
-
}
|
|
15
|
-
handleClick() {
|
|
16
|
-
if (this.cardStatus === 'desktop-closed') {
|
|
17
|
-
this.cardStatus = 'desktop-expanded';
|
|
18
|
-
}
|
|
19
|
-
else if (this.cardStatus === 'desktop-expanded') {
|
|
20
|
-
this.cardStatus = 'desktop-closed';
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
console.log('mobile state!');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
handleResize() {
|
|
27
|
-
//console.log('window width:', window.innerWidth);
|
|
28
|
-
if (window.innerWidth < 1200) {
|
|
29
|
-
this.cardStatus = 'mobile';
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
this.cardStatus = 'desktop-closed';
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
const classMap = this.getCssClassMap();
|
|
37
|
-
return (h(Host, { class: classMap }, h("div", { class: "card-wrapper" }, this.cardStatus == 'mobile' ? (h("div", { class: "card card-mobile" }, h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc }), h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h3", null, this.cardTitle)), h("div", { class: "card-content" }, h("slot", null))))) : this.cardStatus == 'desktop-closed' ? (h("div", null, h("div", { class: "card card-dt-closed" }, h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "image-position": "relative", width: "135", height: "424" }, h("ptc-overlay", { "filter-color": "black-3" })), h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h2", null, this.cardTitle)))))) : (h("div", null, h("div", { class: "card card-dt-open" }, h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h3", null, this.cardTitle)), h("div", { class: "card-content" }, h("slot", null))), h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "is-full-height": "true", "image-alignment": "center" })))))));
|
|
38
|
-
}
|
|
39
|
-
getCssClassMap() {
|
|
40
|
-
return {
|
|
41
|
-
[this.cardType]: true,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
};
|
|
5
|
+
let PtcDynamicCard = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/** Dynamic Card Type */
|
|
9
|
+
this.cardType = 'sequential';
|
|
10
|
+
/** Card Title */
|
|
11
|
+
this.cardTitle = 'Card Title Goes Here';
|
|
12
|
+
/** Card Status */
|
|
13
|
+
this.cardStatus = 'desktop-closed';
|
|
14
|
+
}
|
|
15
|
+
handleClick() {
|
|
16
|
+
if (this.cardStatus === 'desktop-closed') {
|
|
17
|
+
this.cardStatus = 'desktop-expanded';
|
|
18
|
+
}
|
|
19
|
+
else if (this.cardStatus === 'desktop-expanded') {
|
|
20
|
+
this.cardStatus = 'desktop-closed';
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
console.log('mobile state!');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
handleResize() {
|
|
27
|
+
//console.log('window width:', window.innerWidth);
|
|
28
|
+
if (window.innerWidth < 1200) {
|
|
29
|
+
this.cardStatus = 'mobile';
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.cardStatus = 'desktop-closed';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
const classMap = this.getCssClassMap();
|
|
37
|
+
return (h(Host, { class: classMap }, h("div", { class: "card-wrapper" }, this.cardStatus == 'mobile' ? (h("div", { class: "card card-mobile" }, h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc }), h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h3", null, this.cardTitle)), h("div", { class: "card-content" }, h("slot", null))))) : this.cardStatus == 'desktop-closed' ? (h("div", null, h("div", { class: "card card-dt-closed" }, h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "image-position": "relative", width: "135", height: "424" }, h("ptc-overlay", { "filter-color": "black-3" })), h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h2", null, this.cardTitle)))))) : (h("div", null, h("div", { class: "card card-dt-open" }, h("ptc-card-content", { "card-type": "card-dynamic" }, h("div", { class: "card-title" }, h("h3", null, this.cardTitle)), h("div", { class: "card-content" }, h("slot", null))), h("ptc-picture", { alt: this.cardImgAlt, src: this.cardImgSrc, "is-full-height": "true", "image-alignment": "center" })))))));
|
|
38
|
+
}
|
|
39
|
+
getCssClassMap() {
|
|
40
|
+
return {
|
|
41
|
+
[this.cardType]: true,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
45
|
PtcDynamicCard.style = ptcDynamicCardCss;
|
|
46
46
|
|
|
47
47
|
export { PtcDynamicCard as ptc_dynamic_card };
|
|
@@ -2,43 +2,43 @@ import { r as registerInstance, c as createEvent, h, a as getElement } from './i
|
|
|
2
2
|
|
|
3
3
|
const ptcEllipsisDropdownCss = ".ellipsis-icon{border:1px solid #6E717C;border-radius:2px;vertical-align:middle;height:18px;width:18px;text-align:center;transition:background-color var(--ptc-ease-out) var(--ptc-transition-medium), border-color var(--ptc-ease-out) var(--ptc-transition-medium)}.ellipsis-icon icon-asset{display:inline-block;margin-bottom:2px}.ellipsis-icon icon-asset svg{margin:0 auto;display:block}.ellipsis-icon.active{background-color:var(--color-green-07);border-color:var(--color-green-07)}.ptc-ellipsis-dropdown{position:relative;display:inline-block}.dropdown-container{display:none;margin-top:16px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.24);border-radius:4px;position:absolute;z-index:100;background:#FFF;padding:0.8rem 0;right:0;left:auto;min-width:max-content;width:100%}.dropdown-container dropdown-item{}.dropdown-container dropdown-item a{display:inline-block;border-bottom:2px solid transparent;transition:border var(--ptc-ease-out) var(--ptc-transition-medium)}.show .dropdown-container{display:inline-block}";
|
|
4
4
|
|
|
5
|
-
let PtcEllipsisDropdown = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.itemSelected = createEvent(this, "itemSelected", 7);
|
|
9
|
-
this.dataItems = [];
|
|
10
|
-
this.isDropdownOpen = false;
|
|
11
|
-
}
|
|
12
|
-
dropdownToggle(e) {
|
|
13
|
-
e.currentTarget.classList.toggle("show");
|
|
14
|
-
this.isDropdownOpen = e.currentTarget.classList.contains("show");
|
|
15
|
-
}
|
|
16
|
-
onItemSelected(e) {
|
|
17
|
-
this.itemSelected.emit(e);
|
|
18
|
-
}
|
|
19
|
-
offClick(e) {
|
|
20
|
-
let container = this.host.shadowRoot.querySelector('.ptc-ellipsis-dropdown');
|
|
21
|
-
if (e && !this.host.contains(e.target) && this.isDropdownOpen) {
|
|
22
|
-
container.classList.remove("show");
|
|
23
|
-
this.isDropdownOpen = false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
let activeTab = this.dataItems.find(z => z.value == this.selectedTab);
|
|
28
|
-
let isActive = false;
|
|
29
|
-
if (activeTab) {
|
|
30
|
-
isActive = true;
|
|
31
|
-
}
|
|
32
|
-
return (h("div", { class: "ptc-ellipsis-dropdown", onClick: (e) => this.dropdownToggle(e) }, h("div", { class: isActive || this.isDropdownOpen ? "ellipsis-icon active" : "ellipsis-icon" }, h("icon-asset", { type: "ptc", size: "xxx-small", name: "ellipsis", color: isActive || this.isDropdownOpen ? 'white' : 'black' })), h("div", { class: "dropdown-container" }, h("slot", { name: "dropdown" }), this.dataItems.map(dataItem => {
|
|
33
|
-
let activeClass = dataItem.value == this.selectedTab ? 'active' : '';
|
|
34
|
-
return (h("dropdown-item", { class: activeClass }, h("a", { href: "#", onClick: (e) => {
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
this.onItemSelected(dataItem);
|
|
37
|
-
} }, dataItem.text)));
|
|
38
|
-
}))));
|
|
39
|
-
}
|
|
40
|
-
get host() { return getElement(this); }
|
|
41
|
-
};
|
|
5
|
+
let PtcEllipsisDropdown = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.itemSelected = createEvent(this, "itemSelected", 7);
|
|
9
|
+
this.dataItems = [];
|
|
10
|
+
this.isDropdownOpen = false;
|
|
11
|
+
}
|
|
12
|
+
dropdownToggle(e) {
|
|
13
|
+
e.currentTarget.classList.toggle("show");
|
|
14
|
+
this.isDropdownOpen = e.currentTarget.classList.contains("show");
|
|
15
|
+
}
|
|
16
|
+
onItemSelected(e) {
|
|
17
|
+
this.itemSelected.emit(e);
|
|
18
|
+
}
|
|
19
|
+
offClick(e) {
|
|
20
|
+
let container = this.host.shadowRoot.querySelector('.ptc-ellipsis-dropdown');
|
|
21
|
+
if (e && !this.host.contains(e.target) && this.isDropdownOpen) {
|
|
22
|
+
container.classList.remove("show");
|
|
23
|
+
this.isDropdownOpen = false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
let activeTab = this.dataItems.find(z => z.value == this.selectedTab);
|
|
28
|
+
let isActive = false;
|
|
29
|
+
if (activeTab) {
|
|
30
|
+
isActive = true;
|
|
31
|
+
}
|
|
32
|
+
return (h("div", { class: "ptc-ellipsis-dropdown", onClick: (e) => this.dropdownToggle(e) }, h("div", { class: isActive || this.isDropdownOpen ? "ellipsis-icon active" : "ellipsis-icon" }, h("icon-asset", { type: "ptc", size: "xxx-small", name: "ellipsis", color: isActive || this.isDropdownOpen ? 'white' : 'black' })), h("div", { class: "dropdown-container" }, h("slot", { name: "dropdown" }), this.dataItems.map(dataItem => {
|
|
33
|
+
let activeClass = dataItem.value == this.selectedTab ? 'active' : '';
|
|
34
|
+
return (h("dropdown-item", { class: activeClass }, h("a", { href: "#", onClick: (e) => {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
this.onItemSelected(dataItem);
|
|
37
|
+
} }, dataItem.text)));
|
|
38
|
+
}))));
|
|
39
|
+
}
|
|
40
|
+
get host() { return getElement(this); }
|
|
41
|
+
};
|
|
42
42
|
PtcEllipsisDropdown.style = ptcEllipsisDropdownCss;
|
|
43
43
|
|
|
44
44
|
export { PtcEllipsisDropdown as ptc_ellipsis_dropdown };
|
|
@@ -2,14 +2,14 @@ import { r as registerInstance, h, H as Host } from './index-a91c2367.js';
|
|
|
2
2
|
|
|
3
3
|
const ptcHeroFooterCtaCss = ".sc-ptc-hero-footer-cta-h{display:block}.hero-footer-cta.sc-ptc-hero-footer-cta{position:relative;padding:var(--ptc-layout-spacing-05) 0;background-position:50%;background-size:cover;background-repeat:no-repeat;position:relative}.hero-footer-cta.sc-ptc-hero-footer-cta .is-grid.sc-ptc-hero-footer-cta{align-items:center;position:relative;z-index:10;margin:auto}.hero-footer-cta.sc-ptc-hero-footer-cta h2.sc-ptc-hero-footer-cta,.hero-footer-cta.sc-ptc-hero-footer-cta p.sc-ptc-hero-footer-cta{color:var(--color-white);text-shadow:1px 1px 20px rgba(0, 0, 0, 0.5);font-stretch:normal;font-style:normal;text-align:left;color:var(--color-white)}.hero-footer-cta.sc-ptc-hero-footer-cta h2.sc-ptc-hero-footer-cta{font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-black);letter-spacing:var(--ptc-letter-spacing-loose);margin:var(--ptc-element-spacing-04) 0}@media only screen and (min-width: 992px){.hero-footer-cta.sc-ptc-hero-footer-cta h2.sc-ptc-hero-footer-cta{font-size:var(--ptc-font-size-xxxx-large);font-weight:var(--ptc-font-weight-extrabold)}}.hero-footer-cta.sc-ptc-hero-footer-cta p.sc-ptc-hero-footer-cta{font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-p);letter-spacing:var(--ptc-letter-spacing-normal)}@media only screen and (min-width: 768px){.hero-footer-cta.sc-ptc-hero-footer-cta p.sc-ptc-hero-footer-cta{max-width:70%}}@media only screen and (min-width: 992px){.hero-footer-cta.sc-ptc-hero-footer-cta p.sc-ptc-hero-footer-cta{font-size:var(--ptc-font-size-medium);font-weight:var(--ptc-font-weight-semibold);line-height:var(--ptc-line-height-denser)}}.hero-footer-cta.sc-ptc-hero-footer-cta .cta-overlay.sc-ptc-hero-footer-cta{position:absolute;top:0;bottom:0;right:0;left:0;background:rgba(0, 0, 0, 0.35)}.hero-footer-cta.sc-ptc-hero-footer-cta .btm-cta-cut.sc-ptc-hero-footer-cta{position:absolute;top:-1px;right:0;fill:var(--color-white);z-index:100;transform:scaleY(-1)}@media only screen and (min-width: 992px){.hero-footer-cta.sc-ptc-hero-footer-cta .cta-left-padding.sc-ptc-hero-footer-cta{padding-left:var(--ptc-element-spacing-08)}}";
|
|
4
4
|
|
|
5
|
-
let PtcHeroFooterCta = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
}
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("div", { class: "hero-footer-cta ", style: { backgroundImage: `url(${this.backgroundImage})` } }, h("svg", { class: "btm-cta-cut", xmlns: "http://www.w3.org/2000/svg", width: "320.963", height: "28.179", viewBox: "0 0 320.963 28.179" }, h("path", { fill: "#F3F3F3", id: "Path_8770", d: "M737.02 463.856v27.8H416.057v.378h102.38l47.607-28.179z", class: "path-1", "data-name": "Path 8770", transform: "translate(-416.057 -463.856)" })), h("div", { class: "cta-overlay" }), h("div", { class: "ptc-container is-grid has-p-lg" }, h("div", { class: "is-col-8-lg cta-left-padding" }, h("h2", null, this.ctaTitle), h("p", null, this.description)), h("div", { class: "is-col-4-lg cta-section" }, h("slot", { name: "cta" }))))));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
5
|
+
let PtcHeroFooterCta = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, null, h("div", { class: "hero-footer-cta ", style: { backgroundImage: `url(${this.backgroundImage})` } }, h("svg", { class: "btm-cta-cut", xmlns: "http://www.w3.org/2000/svg", width: "320.963", height: "28.179", viewBox: "0 0 320.963 28.179" }, h("path", { fill: "#F3F3F3", id: "Path_8770", d: "M737.02 463.856v27.8H416.057v.378h102.38l47.607-28.179z", class: "path-1", "data-name": "Path 8770", transform: "translate(-416.057 -463.856)" })), h("div", { class: "cta-overlay" }), h("div", { class: "ptc-container is-grid has-p-lg" }, h("div", { class: "is-col-8-lg cta-left-padding" }, h("h2", null, this.ctaTitle), h("p", null, this.description)), h("div", { class: "is-col-4-lg cta-section" }, h("slot", { name: "cta" }))))));
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
13
|
PtcHeroFooterCta.style = ptcHeroFooterCtaCss;
|
|
14
14
|
|
|
15
15
|
export { PtcHeroFooterCta as ptc_hero_footer_cta };
|
|
@@ -2,24 +2,24 @@ import { r as registerInstance, h, H as Host } from './index-a91c2367.js';
|
|
|
2
2
|
|
|
3
3
|
const ptcHeroCss = ":host{display:block;position:relative}:host(.jumbotron) .ptc-hero-wrapper,:host(.footer-cta) .ptc-hero-wrapper{position:relative}:host(.footer-cta) .ptc-hero-wrapper div>*{text-align:center}";
|
|
4
4
|
|
|
5
|
-
let PtcHero = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/**
|
|
9
|
-
* Hero Background Image URL
|
|
10
|
-
*/
|
|
11
|
-
this.bgUrl = undefined;
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
const classMap = this.getCssClassMap();
|
|
15
|
-
return (h(Host, { class: classMap }, h("div", { class: "ptc-hero-wrapper" }, h("ptc-img", Object.assign({ "image-type": "smart-bg" }, (!!this.bgUrl ? { imgUrl: this.bgUrl } : {}), { "size-xs": "600x450", "size-sm": "1108x658", "size-md": "1920x1080", "size-lg": "2700x1500" }), this.heroType == 'jumbotron' ? ([h("ptc-overlay", { "filter-color": "black-1" }), h("ptc-overlay", { "filter-color": "black-2" })]) : this.heroType == 'footer-cta' ? (h("ptc-overlay", { "filter-color": "black-3" })) : null, h("slot", null)))));
|
|
16
|
-
}
|
|
17
|
-
getCssClassMap() {
|
|
18
|
-
return {
|
|
19
|
-
[this.heroType]: this.heroType ? true : false,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
};
|
|
5
|
+
let PtcHero = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/**
|
|
9
|
+
* Hero Background Image URL
|
|
10
|
+
*/
|
|
11
|
+
this.bgUrl = undefined;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
const classMap = this.getCssClassMap();
|
|
15
|
+
return (h(Host, { class: classMap }, h("div", { class: "ptc-hero-wrapper" }, h("ptc-img", Object.assign({ "image-type": "smart-bg" }, (!!this.bgUrl ? { imgUrl: this.bgUrl } : {}), { "size-xs": "600x450", "size-sm": "1108x658", "size-md": "1920x1080", "size-lg": "2700x1500" }), this.heroType == 'jumbotron' ? ([h("ptc-overlay", { "filter-color": "black-1" }), h("ptc-overlay", { "filter-color": "black-2" })]) : this.heroType == 'footer-cta' ? (h("ptc-overlay", { "filter-color": "black-3" })) : null, h("slot", null)))));
|
|
16
|
+
}
|
|
17
|
+
getCssClassMap() {
|
|
18
|
+
return {
|
|
19
|
+
[this.heroType]: this.heroType ? true : false,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
23
|
PtcHero.style = ptcHeroCss;
|
|
24
24
|
|
|
25
25
|
export { PtcHero as ptc_hero };
|
|
@@ -2,38 +2,38 @@ import { r as registerInstance, h, H as Host } from './index-a91c2367.js';
|
|
|
2
2
|
|
|
3
3
|
const ptcIconListCss = ":host{display:block;padding-bottom:var(--ptc-element-spacing-03)}:host .ptc-icon-list{display:flex;align-items:center}:host .ptc-icon-list .value-text{font-size:var(--ptc-font-size-small);white-space:nowrap}:host .ptc-icon-list .ptc-numbered-values{margin-left:var(--ptc-element-spacing-03);font-family:var(--ptc-font-secondary-latin);white-space:nowrap}:host .ptc-icon-list .ptc-numbered-subtitle{margin:0;font-size:var(--ptc-font-size-medium);font-family:var(--ptc-font-secondary-latin)}@media only screen and (min-width: 992px){:host .ptc-icon-list .ptc-numbered-subtitle{font-size:var(--ptc-font-size-large)}}:host .ptc-icon-list .ptc-content{font-family:var(--ptc-font-secondary-latin);font-size:var(--ptc-font-size-small);font-weight:var(--ptc-font-weight-bold);font-stretch:normal;font-style:normal;line-height:var(--ptc-line-height-dense);letter-spacing:normal;text-align:left;color:var(--color-gray-10);margin:0 0 0 var(--ptc-element-spacing-03);line-height:var(--ptc-line-height-densest)}:host .ptc-icon-list .ptc-content-simple{margin:0 0 0 var(--ptc-element-spacing-03);font-size:var(--ptc-font-size-small);font-stretch:normal;font-style:normal;line-height:var(--ptc-line-height-dense);letter-spacing:normal;text-align:left;color:var(--color-gray-10);line-height:var(--ptc-line-height-densest)}:host ::slotted(icon-asset){display:flex;align-self:center}:host(.icon-top-align-list) ::slotted(icon-asset){display:flex;align-self:flex-start;transform:translateY(40%)}:host(.last-item){margin-bottom:var(--ptc-layout-spacing-03)}";
|
|
4
4
|
|
|
5
|
-
let PtcIconList = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
/**
|
|
9
|
-
* List item type
|
|
10
|
-
*/
|
|
11
|
-
this.listType = 'simple-icon-list';
|
|
12
|
-
/**
|
|
13
|
-
* List value with unit Example: 60%
|
|
14
|
-
*/
|
|
15
|
-
this.valueWithUnit = '';
|
|
16
|
-
/**
|
|
17
|
-
* List value text Example: up to
|
|
18
|
-
*/
|
|
19
|
-
this.valueText = '';
|
|
20
|
-
/**
|
|
21
|
-
* List value with unit Example: Increase in Operator Productivity
|
|
22
|
-
*/
|
|
23
|
-
this.listContent = '';
|
|
24
|
-
this.isLastItem = false;
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
const classMap = this.getCssClassMap();
|
|
28
|
-
return (h(Host, { class: classMap }, this.listType == "stat-icon-list" ? (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("div", { class: "ptc-numbered-values" }, h("span", { class: "value-text" }, this.valueText, "\u00A0"), h("span", { class: "ptc-numbered-subtitle" }, this.valueWithUnit)), h("p", { class: "ptc-content" }, "- \u00A0", this.listContent))) : (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("p", { class: "ptc-content-simple" }, this.listContent, " ")))));
|
|
29
|
-
}
|
|
30
|
-
getCssClassMap() {
|
|
31
|
-
return {
|
|
32
|
-
[this.listType]: this.listType ? true : false,
|
|
33
|
-
['last-item']: this.isLastItem ? true : false
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
};
|
|
5
|
+
let PtcIconList = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
/**
|
|
9
|
+
* List item type
|
|
10
|
+
*/
|
|
11
|
+
this.listType = 'simple-icon-list';
|
|
12
|
+
/**
|
|
13
|
+
* List value with unit Example: 60%
|
|
14
|
+
*/
|
|
15
|
+
this.valueWithUnit = '';
|
|
16
|
+
/**
|
|
17
|
+
* List value text Example: up to
|
|
18
|
+
*/
|
|
19
|
+
this.valueText = '';
|
|
20
|
+
/**
|
|
21
|
+
* List value with unit Example: Increase in Operator Productivity
|
|
22
|
+
*/
|
|
23
|
+
this.listContent = '';
|
|
24
|
+
this.isLastItem = false;
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const classMap = this.getCssClassMap();
|
|
28
|
+
return (h(Host, { class: classMap }, this.listType == "stat-icon-list" ? (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("div", { class: "ptc-numbered-values" }, h("span", { class: "value-text" }, this.valueText, "\u00A0"), h("span", { class: "ptc-numbered-subtitle" }, this.valueWithUnit)), h("p", { class: "ptc-content" }, "- \u00A0", this.listContent))) : (h("div", { class: "ptc-icon-list" }, h("slot", { name: "icon" }), h("p", { class: "ptc-content-simple" }, this.listContent, " ")))));
|
|
29
|
+
}
|
|
30
|
+
getCssClassMap() {
|
|
31
|
+
return {
|
|
32
|
+
[this.listType]: this.listType ? true : false,
|
|
33
|
+
['last-item']: this.isLastItem ? true : false
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
37
|
PtcIconList.style = ptcIconListCss;
|
|
38
38
|
|
|
39
39
|
export { PtcIconList as ptc_icon_list };
|
|
@@ -1,156 +1,156 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-a91c2367.js';
|
|
2
|
-
import { a as ResponsiveBgVariables } from './interfaces-
|
|
2
|
+
import { a as ResponsiveBgVariables } from './interfaces-c1c73092.js';
|
|
3
3
|
|
|
4
4
|
const ptcImgCss = ".smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-gray-03)}@media only screen and (min-width: 768px){.hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.hidden-md{display:none !important}}@media only screen and (min-width: 768px){.hidden-lg{display:none !important}}";
|
|
5
5
|
|
|
6
|
-
let PtcImg = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
/**
|
|
10
|
-
* Image size for smallest screen
|
|
11
|
-
* <=767px
|
|
12
|
-
*/
|
|
13
|
-
this.sizeXs = '510x340';
|
|
14
|
-
/**
|
|
15
|
-
* Image size for small screen
|
|
16
|
-
* >=768px and <=991px
|
|
17
|
-
*/
|
|
18
|
-
this.sizeSm = '1240x496';
|
|
19
|
-
/**
|
|
20
|
-
* Image size for medium screen
|
|
21
|
-
* >=992px and <=1199px
|
|
22
|
-
*/
|
|
23
|
-
this.sizeMd = '1366x500';
|
|
24
|
-
/**
|
|
25
|
-
* Image solution for large screen
|
|
26
|
-
* >=1200px
|
|
27
|
-
*/
|
|
28
|
-
this.sizeLg = '1920x1080';
|
|
29
|
-
/**
|
|
30
|
-
* Image type
|
|
31
|
-
*/
|
|
32
|
-
this.imageType = 'smart-bg';
|
|
33
|
-
/**
|
|
34
|
-
* Image border shape
|
|
35
|
-
*/
|
|
36
|
-
this.borderRadius = '';
|
|
37
|
-
/**
|
|
38
|
-
* Lazy loading option
|
|
39
|
-
*/
|
|
40
|
-
this.loadMode = 'lazy-bg';
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Image Z Index
|
|
44
|
-
*/
|
|
45
|
-
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
46
|
-
WindowResize() {
|
|
47
|
-
this.setResponsiveBg();
|
|
48
|
-
}
|
|
49
|
-
render() {
|
|
50
|
-
const classMap = this.getCssClassMap();
|
|
51
|
-
return (h(Host, null, h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` }, this.imageType == 'smart-bg' ? h("slot", null) : null)));
|
|
52
|
-
}
|
|
53
|
-
componentDidLoad() {
|
|
54
|
-
this.addIntersectionObserver();
|
|
55
|
-
this.setResponsiveBg();
|
|
56
|
-
}
|
|
57
|
-
componentWillUpdate() {
|
|
58
|
-
// console.log('componentWillUpdate!');
|
|
59
|
-
this.addIntersectionObserver();
|
|
60
|
-
this.setResponsiveBg();
|
|
61
|
-
}
|
|
62
|
-
//responsive image
|
|
63
|
-
setResponsiveBg() {
|
|
64
|
-
// Define local variables
|
|
65
|
-
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
66
|
-
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
67
|
-
// Loop through all target elements
|
|
68
|
-
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
69
|
-
// Set current variables
|
|
70
|
-
el = backgrounds[i];
|
|
71
|
-
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
72
|
-
// If the data attribute exists, set the background
|
|
73
|
-
if (elData !== null) {
|
|
74
|
-
el.style.backgroundImage = "url('" + elData + "')";
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
if (typeof console == 'object') {
|
|
78
|
-
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
//lazy loading
|
|
84
|
-
addIntersectionObserver() {
|
|
85
|
-
if (!this.imgUrl) {
|
|
86
|
-
console.log('no image!');
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if ('IntersectionObserver' in window) {
|
|
90
|
-
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
91
|
-
let bgObserver = new IntersectionObserver(entries => {
|
|
92
|
-
entries.forEach(entry => {
|
|
93
|
-
if (entry.isIntersecting) {
|
|
94
|
-
const image = entry.target;
|
|
95
|
-
image.classList.remove('lazy-bg');
|
|
96
|
-
// console.log('loaded');
|
|
97
|
-
bgObserver.unobserve(image);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
lazyLoadBgs.forEach(image => {
|
|
102
|
-
bgObserver.observe(image);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
getCssClassMap() {
|
|
107
|
-
return {
|
|
108
|
-
[this.imageType]: true,
|
|
109
|
-
'ptc-img': true,
|
|
110
|
-
[this.borderRadius]: true,
|
|
111
|
-
[this.loadMode]: true,
|
|
112
|
-
// [this.imageZIndex] : true
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
getCurrentBreakPoints() {
|
|
116
|
-
// Define local variables
|
|
117
|
-
let doc = window.document, temp = doc.createElement('div'), env;
|
|
118
|
-
// Append test node
|
|
119
|
-
doc.body.appendChild(temp);
|
|
120
|
-
// Loop through breakpoints
|
|
121
|
-
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
122
|
-
env = ResponsiveBgVariables.envs[i];
|
|
123
|
-
// Add classes
|
|
124
|
-
temp.className = 'hidden-' + env;
|
|
125
|
-
// Found breakpoint
|
|
126
|
-
if (temp.offsetParent === null) {
|
|
127
|
-
// Remove our test node
|
|
128
|
-
doc.body.removeChild(temp);
|
|
129
|
-
console.log('remove test node');
|
|
130
|
-
// Return current breakpoint
|
|
131
|
-
return env;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
// Breakpoint not found, try fallback
|
|
135
|
-
doc.body.removeChild(temp);
|
|
136
|
-
return this.getFallbackBreakpoint();
|
|
137
|
-
}
|
|
138
|
-
getFallbackBreakpoint() {
|
|
139
|
-
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
140
|
-
return 'lg';
|
|
141
|
-
}
|
|
142
|
-
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
143
|
-
return 'md';
|
|
144
|
-
}
|
|
145
|
-
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
146
|
-
return 'sm';
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
return 'xs';
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
get el() { return getElement(this); }
|
|
153
|
-
};
|
|
6
|
+
let PtcImg = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
/**
|
|
10
|
+
* Image size for smallest screen
|
|
11
|
+
* <=767px
|
|
12
|
+
*/
|
|
13
|
+
this.sizeXs = '510x340';
|
|
14
|
+
/**
|
|
15
|
+
* Image size for small screen
|
|
16
|
+
* >=768px and <=991px
|
|
17
|
+
*/
|
|
18
|
+
this.sizeSm = '1240x496';
|
|
19
|
+
/**
|
|
20
|
+
* Image size for medium screen
|
|
21
|
+
* >=992px and <=1199px
|
|
22
|
+
*/
|
|
23
|
+
this.sizeMd = '1366x500';
|
|
24
|
+
/**
|
|
25
|
+
* Image solution for large screen
|
|
26
|
+
* >=1200px
|
|
27
|
+
*/
|
|
28
|
+
this.sizeLg = '1920x1080';
|
|
29
|
+
/**
|
|
30
|
+
* Image type
|
|
31
|
+
*/
|
|
32
|
+
this.imageType = 'smart-bg';
|
|
33
|
+
/**
|
|
34
|
+
* Image border shape
|
|
35
|
+
*/
|
|
36
|
+
this.borderRadius = '';
|
|
37
|
+
/**
|
|
38
|
+
* Lazy loading option
|
|
39
|
+
*/
|
|
40
|
+
this.loadMode = 'lazy-bg';
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Image Z Index
|
|
44
|
+
*/
|
|
45
|
+
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
46
|
+
WindowResize() {
|
|
47
|
+
this.setResponsiveBg();
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const classMap = this.getCssClassMap();
|
|
51
|
+
return (h(Host, null, h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` }, this.imageType == 'smart-bg' ? h("slot", null) : null)));
|
|
52
|
+
}
|
|
53
|
+
componentDidLoad() {
|
|
54
|
+
this.addIntersectionObserver();
|
|
55
|
+
this.setResponsiveBg();
|
|
56
|
+
}
|
|
57
|
+
componentWillUpdate() {
|
|
58
|
+
// console.log('componentWillUpdate!');
|
|
59
|
+
this.addIntersectionObserver();
|
|
60
|
+
this.setResponsiveBg();
|
|
61
|
+
}
|
|
62
|
+
//responsive image
|
|
63
|
+
setResponsiveBg() {
|
|
64
|
+
// Define local variables
|
|
65
|
+
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
66
|
+
// console.log('current breakpoint: ' + currentBreakpoint);
|
|
67
|
+
// Loop through all target elements
|
|
68
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
69
|
+
// Set current variables
|
|
70
|
+
el = backgrounds[i];
|
|
71
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
72
|
+
// If the data attribute exists, set the background
|
|
73
|
+
if (elData !== null) {
|
|
74
|
+
el.style.backgroundImage = "url('" + elData + "')";
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
if (typeof console == 'object') {
|
|
78
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//lazy loading
|
|
84
|
+
addIntersectionObserver() {
|
|
85
|
+
if (!this.imgUrl) {
|
|
86
|
+
console.log('no image!');
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if ('IntersectionObserver' in window) {
|
|
90
|
+
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
91
|
+
let bgObserver = new IntersectionObserver(entries => {
|
|
92
|
+
entries.forEach(entry => {
|
|
93
|
+
if (entry.isIntersecting) {
|
|
94
|
+
const image = entry.target;
|
|
95
|
+
image.classList.remove('lazy-bg');
|
|
96
|
+
// console.log('loaded');
|
|
97
|
+
bgObserver.unobserve(image);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
lazyLoadBgs.forEach(image => {
|
|
102
|
+
bgObserver.observe(image);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
getCssClassMap() {
|
|
107
|
+
return {
|
|
108
|
+
[this.imageType]: true,
|
|
109
|
+
'ptc-img': true,
|
|
110
|
+
[this.borderRadius]: true,
|
|
111
|
+
[this.loadMode]: true,
|
|
112
|
+
// [this.imageZIndex] : true
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
getCurrentBreakPoints() {
|
|
116
|
+
// Define local variables
|
|
117
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
118
|
+
// Append test node
|
|
119
|
+
doc.body.appendChild(temp);
|
|
120
|
+
// Loop through breakpoints
|
|
121
|
+
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
122
|
+
env = ResponsiveBgVariables.envs[i];
|
|
123
|
+
// Add classes
|
|
124
|
+
temp.className = 'hidden-' + env;
|
|
125
|
+
// Found breakpoint
|
|
126
|
+
if (temp.offsetParent === null) {
|
|
127
|
+
// Remove our test node
|
|
128
|
+
doc.body.removeChild(temp);
|
|
129
|
+
console.log('remove test node');
|
|
130
|
+
// Return current breakpoint
|
|
131
|
+
return env;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Breakpoint not found, try fallback
|
|
135
|
+
doc.body.removeChild(temp);
|
|
136
|
+
return this.getFallbackBreakpoint();
|
|
137
|
+
}
|
|
138
|
+
getFallbackBreakpoint() {
|
|
139
|
+
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
140
|
+
return 'lg';
|
|
141
|
+
}
|
|
142
|
+
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
143
|
+
return 'md';
|
|
144
|
+
}
|
|
145
|
+
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
146
|
+
return 'sm';
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
return 'xs';
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
get el() { return getElement(this); }
|
|
153
|
+
};
|
|
154
154
|
PtcImg.style = ptcImgCss;
|
|
155
155
|
|
|
156
156
|
export { PtcImg as ptc_img };
|