@ptcwebops/ptcw-design 0.8.6 → 0.8.8
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/loader.cjs.js +1 -1
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/ptc-background-video.cjs.entry.js +27 -0
- package/dist/cjs/ptc-card-bottom.cjs.entry.js +1 -1
- package/dist/cjs/ptc-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/ptc-card_6.cjs.entry.js +1 -1
- package/dist/cjs/ptc-collapse-list.cjs.entry.js +1 -1
- package/dist/cjs/ptc-media-card.cjs.entry.js +5 -2
- package/dist/cjs/ptc-readmore_2.cjs.entry.js +1 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/{utils-5245e89c.js → utils-9eb22041.js} +12 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ptc-background-video/ptc-background-video.css +50 -0
- package/dist/collection/components/ptc-background-video/ptc-background-video.js +102 -0
- package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.css +5 -0
- package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +1 -1
- package/dist/collection/components/ptc-media-card/ptc-media-card.css +17 -3
- package/dist/collection/components/ptc-media-card/ptc-media-card.js +9 -6
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +1 -1
- package/dist/collection/components/ptc-tooltip/ptc-tooltip.css +2 -0
- package/dist/collection/utils/utils.js +11 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +45 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/ptc-background-video.entry.js +23 -0
- package/dist/esm/ptc-card-bottom.entry.js +1 -1
- package/dist/esm/ptc-card-wrapper.entry.js +1 -1
- package/dist/esm/ptc-card_6.entry.js +1 -1
- package/dist/esm/ptc-collapse-list.entry.js +1 -1
- package/dist/esm/ptc-media-card.entry.js +5 -2
- package/dist/esm/ptc-readmore_2.entry.js +1 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/{utils-646cc62f.js → utils-38decc43.js} +12 -1
- package/dist/ptcw-design/{p-450e9eb0.entry.js → p-1c5c61f6.entry.js} +1 -1
- package/dist/ptcw-design/p-36665caa.js +1 -0
- package/dist/ptcw-design/{p-679be000.entry.js → p-47d601fc.entry.js} +1 -1
- package/dist/ptcw-design/p-8b5e393e.entry.js +1 -0
- package/dist/ptcw-design/{p-c3621686.entry.js → p-8bcb2fab.entry.js} +1 -1
- package/dist/ptcw-design/{p-4fbef630.entry.js → p-a5f20c41.entry.js} +1 -1
- package/dist/ptcw-design/p-a7f07147.entry.js +1 -0
- package/dist/ptcw-design/p-b48a3e6f.entry.js +1 -0
- package/dist/ptcw-design/{p-048502c2.entry.js → p-fa17a02e.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-background-video/ptc-background-video.d.ts +26 -0
- package/dist/types/components.d.ts +45 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-1e92301d.entry.js +0 -1
- package/dist/ptcw-design/p-b721664f.entry.js +0 -1
- package/dist/ptcw-design/p-e121ff2a.js +0 -1
|
@@ -138,6 +138,24 @@ export namespace Components {
|
|
|
138
138
|
*/
|
|
139
139
|
"visible": boolean;
|
|
140
140
|
}
|
|
141
|
+
interface PtcBackgroundVideo {
|
|
142
|
+
/**
|
|
143
|
+
* Overlay(Optional, By default is true)
|
|
144
|
+
*/
|
|
145
|
+
"overlay"?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Poster url(Placeholder image till the video get the loaded)
|
|
148
|
+
*/
|
|
149
|
+
"posterSrc"?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Video implementation type: default: Content need to add in tag Ex: <ptc-background-video>Content </ptc-background-video> legacy: Add the blank tag in any other setcon having relative parent. Ex: <div class="section" style="position: relative;"> <ptc-background-video></ptc-background-video> Content </div>
|
|
152
|
+
*/
|
|
153
|
+
"type": 'default' | 'legacy';
|
|
154
|
+
/**
|
|
155
|
+
* Video url
|
|
156
|
+
*/
|
|
157
|
+
"videoSrc": string;
|
|
158
|
+
}
|
|
141
159
|
interface PtcBreadcrumb {
|
|
142
160
|
}
|
|
143
161
|
interface PtcButton {
|
|
@@ -1190,6 +1208,12 @@ declare global {
|
|
|
1190
1208
|
prototype: HTMLPtcAnnouncementElement;
|
|
1191
1209
|
new (): HTMLPtcAnnouncementElement;
|
|
1192
1210
|
};
|
|
1211
|
+
interface HTMLPtcBackgroundVideoElement extends Components.PtcBackgroundVideo, HTMLStencilElement {
|
|
1212
|
+
}
|
|
1213
|
+
var HTMLPtcBackgroundVideoElement: {
|
|
1214
|
+
prototype: HTMLPtcBackgroundVideoElement;
|
|
1215
|
+
new (): HTMLPtcBackgroundVideoElement;
|
|
1216
|
+
};
|
|
1193
1217
|
interface HTMLPtcBreadcrumbElement extends Components.PtcBreadcrumb, HTMLStencilElement {
|
|
1194
1218
|
}
|
|
1195
1219
|
var HTMLPtcBreadcrumbElement: {
|
|
@@ -1493,6 +1517,7 @@ declare global {
|
|
|
1493
1517
|
"ptc-accordion": HTMLPtcAccordionElement;
|
|
1494
1518
|
"ptc-accordion-item": HTMLPtcAccordionItemElement;
|
|
1495
1519
|
"ptc-announcement": HTMLPtcAnnouncementElement;
|
|
1520
|
+
"ptc-background-video": HTMLPtcBackgroundVideoElement;
|
|
1496
1521
|
"ptc-breadcrumb": HTMLPtcBreadcrumbElement;
|
|
1497
1522
|
"ptc-button": HTMLPtcButtonElement;
|
|
1498
1523
|
"ptc-card": HTMLPtcCardElement;
|
|
@@ -1685,6 +1710,24 @@ declare namespace LocalJSX {
|
|
|
1685
1710
|
*/
|
|
1686
1711
|
"visible"?: boolean;
|
|
1687
1712
|
}
|
|
1713
|
+
interface PtcBackgroundVideo {
|
|
1714
|
+
/**
|
|
1715
|
+
* Overlay(Optional, By default is true)
|
|
1716
|
+
*/
|
|
1717
|
+
"overlay"?: boolean;
|
|
1718
|
+
/**
|
|
1719
|
+
* Poster url(Placeholder image till the video get the loaded)
|
|
1720
|
+
*/
|
|
1721
|
+
"posterSrc"?: string;
|
|
1722
|
+
/**
|
|
1723
|
+
* Video implementation type: default: Content need to add in tag Ex: <ptc-background-video>Content </ptc-background-video> legacy: Add the blank tag in any other setcon having relative parent. Ex: <div class="section" style="position: relative;"> <ptc-background-video></ptc-background-video> Content </div>
|
|
1724
|
+
*/
|
|
1725
|
+
"type"?: 'default' | 'legacy';
|
|
1726
|
+
/**
|
|
1727
|
+
* Video url
|
|
1728
|
+
*/
|
|
1729
|
+
"videoSrc"?: string;
|
|
1730
|
+
}
|
|
1688
1731
|
interface PtcBreadcrumb {
|
|
1689
1732
|
}
|
|
1690
1733
|
interface PtcButton {
|
|
@@ -2663,6 +2706,7 @@ declare namespace LocalJSX {
|
|
|
2663
2706
|
"ptc-accordion": PtcAccordion;
|
|
2664
2707
|
"ptc-accordion-item": PtcAccordionItem;
|
|
2665
2708
|
"ptc-announcement": PtcAnnouncement;
|
|
2709
|
+
"ptc-background-video": PtcBackgroundVideo;
|
|
2666
2710
|
"ptc-breadcrumb": PtcBreadcrumb;
|
|
2667
2711
|
"ptc-button": PtcButton;
|
|
2668
2712
|
"ptc-card": PtcCard;
|
|
@@ -2726,6 +2770,7 @@ declare module "@stencil/core" {
|
|
|
2726
2770
|
"ptc-accordion": LocalJSX.PtcAccordion & JSXBase.HTMLAttributes<HTMLPtcAccordionElement>;
|
|
2727
2771
|
"ptc-accordion-item": LocalJSX.PtcAccordionItem & JSXBase.HTMLAttributes<HTMLPtcAccordionItemElement>;
|
|
2728
2772
|
"ptc-announcement": LocalJSX.PtcAnnouncement & JSXBase.HTMLAttributes<HTMLPtcAnnouncementElement>;
|
|
2773
|
+
"ptc-background-video": LocalJSX.PtcBackgroundVideo & JSXBase.HTMLAttributes<HTMLPtcBackgroundVideoElement>;
|
|
2729
2774
|
"ptc-breadcrumb": LocalJSX.PtcBreadcrumb & JSXBase.HTMLAttributes<HTMLPtcBreadcrumbElement>;
|
|
2730
2775
|
"ptc-button": LocalJSX.PtcButton & JSXBase.HTMLAttributes<HTMLPtcButtonElement>;
|
|
2731
2776
|
"ptc-card": LocalJSX.PtcCard & JSXBase.HTMLAttributes<HTMLPtcCardElement>;
|
|
@@ -2,3 +2,4 @@ export declare function format(first: string, middle: string, last: string): str
|
|
|
2
2
|
export declare function MapDOM(domElement: HTMLElement, selector?: string, toString?: boolean): any;
|
|
3
3
|
export declare function generateUUID(): string;
|
|
4
4
|
export declare function debounce(func: Function, wait: number, referer?: any): (e: any) => void;
|
|
5
|
+
export declare function getFileExtension(filePath: string): string;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# PTC Design 0.8.
|
|
3
|
+
# PTC Design 0.8.8
|
|
4
4
|
The site is the place for documentation on PTC Design System
|
|
5
5
|
|
|
6
6
|
## Building the Site
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e}from"./p-9fb2ab8c.js";const o=class{constructor(i){t(this,i),this.cardType="media-card",this.cardHref=void 0,this.target="_self",this.rel=void 0,this.activeBackgroundImage=void 0,this.hoverBackgroundImage=void 0,this.heading=void 0,this.headingTransform="none",this.category=void 0,this.isHovered=!1}render(){return i(e,{onmouseenter:()=>this.isHovered=!0,onmouseleave:()=>this.isHovered=!1,style:this.isHovered?{backgroundImage:`url(${this.hoverBackgroundImage})`}:{backgroundImage:`url(${this.activeBackgroundImage})`}},i(this.cardHref?"a":"div",{class:"anchor-wrap",target:this.target,href:this.cardHref,rel:this.rel},i("ptc-overlay",{"filter-color":"black-2"}),i("div",{class:"card-wrap"},i("div",{class:"car-content"},i("h4",null,this.category," "),i("h3",null,this.heading)))))}};o.style=":host{display:block;position:relative;width:100%;background-size:cover;background-position:50%;background-repeat:no-repeat}:host .anchor-wrap{height:100%;width:100%;display:block;text-decoration:none}:host .card-wrap{display:flex;height:100%;width:100%;position:relative;z-index:1;min-height:329px;align-items:end}:host .card-wrap .car-content{padding:20px 30px 30px 30px}:host .card-wrap .car-content h4,:host .card-wrap .car-content h3{color:#fff}:host .card-wrap .car-content h3{position:relative;margin-bottom:0;font-size:var(--ptc-font-size-medium);text-shadow:1px 3px 30px #000;line-height:var(--ptc-line-height-dense);display:inline}:host .card-wrap .car-content h3::before{content:\"\";width:100%;height:3px;background-image:url(\"data:image/svg+xml,%3Csvg width='60' height='1' viewBox='0 0 60 1' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='30' height='1' fill='%2333A13C'/%3E%3C/svg%3E\");background-repeat:repeat;position:absolute;background-size:initial;top:-10px}:host .card-wrap .car-content h4{text-shadow:1px 3px 30px var(--color-black);font-weight:var(--ptc-font-weight-semibold);display:block;font-size:var(--ptc-font-size-x-small);font-style:normal;font-stretch:normal;letter-spacing:var(--ptc-line-height-dense)}";export{o as ptc_media_card}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as a,h as e,H as o,g as i}from"./p-9fb2ab8c.js";const s=class{constructor(e){t(this,e),this.hoverEvent=a(this,"hoverEvent",7),this.leaveEvent=a(this,"leaveEvent",7),this.cardType=void 0,this.cardLink=void 0,this.linkTitle=void 0,this.linkTarget="_self"}handleResize(){this.checkScreenSize()}hoverEventHandler(){this.el.classList.contains("extra-tall")&&(this.hoverEvent.emit(),this.el.classList.add("extraT-overlay")),this.el.classList.contains("color-outlined")&&(this.hoverEvent.emit(),this.el.querySelector("ptc-overlay").setOverlay("black-5"))}leaveEventHandler(){this.el.classList.contains("extra-tall")&&(this.hoverEvent.emit(),this.el.classList.remove("extraT-overlay")),this.el.classList.contains("color-outlined")&&(this.hoverEvent.emit(),this.el.querySelector("ptc-overlay").setOverlay("black-4"))}componentDidLoad(){this.checkScreenSize()}render(){const t=this.getCssClassMap(),a=this.cardLink?"a":"div";return e(o,{class:t,onMouseEnter:this.hoverEventHandler.bind(this),onMouseLeave:this.leaveEventHandler.bind(this)},e(a,Object.assign({},this.cardLink?{href:this.cardLink}:{},this.linkTarget&&this.cardLink?{target:this.linkTarget}:{},this.cardLink?{title:this.linkTitle?this.linkTitle:this.cardLink}:{}),e("slot",null)))}getCssClassMap(){return{[this.cardType]:!!this.cardType}}getBtmContentHeight(){return this.el.querySelector("ptc-card-bottom").offsetHeight}checkScreenSize(){window.innerWidth<=480?"extra-tall"===this.cardType&&this.el.querySelector("ptc-card-content").setHeight(this.getBtmContentHeight()):this.el.querySelector("ptc-card-content").removeInlineHeight()}get el(){return i(this)}};s.style=':host{display:block}:host(.card-tall),:host(.card-wide),:host(.card-video),:host(.card-playlist),:host(.card-2up){position:relative}:host(.card-tall) a,:host(.card-wide) a,:host(.card-video) a,:host(.card-playlist) a,:host(.card-2up) a{text-decoration:none !important}:host(.card-tall) a:hover,:host(.card-wide) a:hover,:host(.card-video) a:hover,:host(.card-playlist) a:hover,:host(.card-2up) a:hover{text-decoration:none}:host(.card-tall) a:focus,:host(.card-wide) a:focus,:host(.card-video) a:focus,:host(.card-playlist) a:focus,:host(.card-2up) a:focus{outline:none;text-decoration:none}:host(.card-tall) a:focus-visible,:host(.card-wide) a:focus-visible,:host(.card-video) a:focus-visible,:host(.card-playlist) a:focus-visible,:host(.card-2up) a:focus-visible{outline:none;text-decoration:none}:host(.card-playlist) div,:host(.card-playlist) a{display:flex;text-decoration:none;outline:none}:host(.card-playlist) div:hover,:host(.card-playlist) a:hover{text-decoration:none;outline:none}:host(.card-video-intro){border-bottom-left-radius:var(--ptc-border-radius-large);border-bottom-right-radius:var(--ptc-border-radius-large)}:host(.card-video-intro) div{display:block}:host(.card-video-shadow){box-shadow:var(--ptc-shadow-x-small)}:host(.extra-tall){position:relative}:host(.extra-tall) a{position:relative;display:block;width:100%;height:100%;inset:0px}:host(.color-outlined){position:relative;border-radius:var(--ptc-border-radius-large)}:host(.card-video-p){padding:var(--ptc-element-spacing-05);padding-bottom:var(--ptc-element-spacing-06)}:host(.card-m-right){margin-right:var(--ptc-element-spacing-02)}:host(.card-m-left){margin-left:var(--ptc-element-spacing-02)}:host(.extraT-overlay) a::after{content:"";position:absolute;width:100%;height:100%;background:rgba(0, 0, 0, 0.6);bottom:0;left:0;border-radius:var(--ptc-border-radius-large)}@media only screen and (min-width: 768px){:host(.card-m-right){margin-right:var(--ptc-element-spacing-03)}:host(.card-m-left){margin-left:var(--ptc-element-spacing-03)}}@media only screen and (min-width: 992px){:host(.card-m-right){margin-right:var(--ptc-element-spacing-04)}:host(.card-m-left){margin-left:var(--ptc-element-spacing-04)}}@media only screen and (min-width: 1200px){:host(.card-video-intro) div{display:flex}}';export{s as ptc_card_wrapper}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,e,l){return(t||"")+(e?` ${e}`:"")+(l?` ${l}`:"")}function e(t,e,l){let n=e?t.querySelector(e):t,r={},i=t=>t.toLowerCase().replace(/(-\w)/g,(t=>t.replace(/-/,"").toUpperCase())),o=t=>{let e=!0;return/^\s*$/.test(t.textContent)&&(e=!1),e},u=(t,e)=>{let l=t.childNodes;if(l&&l.length>0){for(let t=0;t<l.length;t++){let n=l[t];if(1==n.nodeType){let t=i(n.nodeName);e[t]||(e[t]=[]),e[t].push({}),u(n,e[t][e[t].length-1])}else 3==n.nodeType&&o(n)&&(e.text=(e.text||"")+n.textContent)}for(const t in e)Array.isArray(e[t])&&1==e[t].length&&(e[t]=e[t][0])}if(t.attributes&&t.attributes.length>0)for(let l=0;l<t.attributes.length;l++)e[i(t.attributes[l].nodeName)]=t.attributes[l].nodeValue;"true"==t.getAttribute("html")&&(e.html=t.innerHTML)};return u(n,r),l?JSON.stringify(r):r}function l(){let t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}function n(t,e,n){let r=l();return globalThis.debounceTimeouts||(globalThis.debounceTimeouts={}),function(l){var i=n||this,o=l;clearTimeout(globalThis.debounceTimeouts[r]),globalThis.debounceTimeouts[r]=setTimeout((function(){t(i,o)}),e)}}export{e as M,n as d,t as f,l as g}
|