platformscode-new-react 0.0.60 → 0.0.61
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/index.cjs.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -218574,7 +218574,7 @@ a:focus {
|
|
|
218574
218574
|
}
|
|
218575
218575
|
.KCarousel-dots .KCarousel-dot.is-active {
|
|
218576
218576
|
background-color: var(--stepper-button-completed);
|
|
218577
|
-
}`,Fi=Hi,Le=d(class extends l{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.DIRECTION={LEFT:Symbol("LEFT"),RIGHT:Symbol("RIGHT")},this.variant="arrows",this.showDots=!0,this.steps=1,this.transitionDuration=600,this.size="md",this.cardsToShow=null,this.childWidth=0,this.childrenLength=0,this.cardsToShowState=0,this.currentSlideIndex=0}changeSlide(n){console.log(),n===this.DIRECTION.RIGHT&&this.currentSlideIndex<this.childrenLength-1?this.currentSlideIndex++:n===this.DIRECTION.LEFT&&this.currentSlideIndex>0&&this.currentSlideIndex--,this.updateSlidePosition()}updateSlidePosition(){if(this.slidesContainer){const n=-(this.currentSlideIndex*this.childWidth);this.slidesContainer.style.transform=`translateX(${n}px)`}}showLeftArrow(){return this.currentSlideIndex>0}showRightArrow(){return this.currentSlideIndex<this.childrenLength-1}isHighlighted(n){return n===this.currentSlideIndex}componentDidLoad(){var n;const t=(n=this.el.shadowRoot)===null||n===void 0?void 0:n.querySelector("slot");t==null||t.addEventListener("slotchange",this.calculateChildWidth.bind(this)),this.calculateChildWidth(),this.updateChildrenLength()}calculateChildWidth(){const n=this.slidesContainer.querySelector(".KCarousel-slides > *");n&&(this.childWidth=n.clientWidth)}updateChildrenLength(){this.slidesContainer&&(this.childrenLength=this.slidesContainer.childElementCount)}render(){return console.log(this.childrenLength,"this.childrenLength"),console.log(this.currentSlideIndex,this.el.children.length,this.slidesContainer,"''''''''''''''''''''''''''''''"),e(D,{key:"451dc902573cac768709f0e74e42e26417235502",class:`KCarousel KCarousel--${this.variant} KCarousel--${this.size}`},this.variant!=="dots-only"&&e("div",{key:"a8f0d45efd9a55190d3f0122d19e827d220c9a00",class:"KCarousel-body"},this.variant==="arrows"&&e("a",{key:"4b24760c50e32e4578005a4a3a26337c93645a40",class:`KCarousel-arrow ${this.showLeftArrow()?"KCarousel-arrow--active":""} left`,onClick:()=>this.changeSlide(this.DIRECTION.LEFT)},e("dga-icon",{key:"888cf4928a87094b31ced2d5b56620aea5d07188",icon:"arrow-left-01",variant:"stroke",type:"rounded",size:24})),e("div",{key:"f4d831ac03909e2cc3af92ea93d923617fa30e28",class:"KCarousel-container",style:{overflow:"hidden",maxWidth:`${this.childWidth}px`}},e("div",{key:"3f96a1f269529e6a36f6269caf18d08622254a16",style:{display:"flex",transition:`transform ${this.transitionDuration}ms ease-in-out`},class:"KCarousel-slides",ref:n=>this.slidesContainer=n},e("slot",{key:"8675af6a0631f14f3443d9a6dff8807b09c282e5"}))),this.variant==="arrows"&&e("a",{key:"19699fde7c5b145b5dab06ac275038901e5d42f2",class:`KCarousel-arrow ${this.showRightArrow()?"KCarousel-arrow--active":""} right`,onClick:()=>this.changeSlide(this.DIRECTION.RIGHT)},e("dga-icon",{key:"6b4fc2f5cf8d0b47cdc809163152f56b1c0ad169",icon:"arrow-right-01",variant:"stroke",type:"rounded",size:24}))),["dots","dots-only"].includes(this.variant)&&e("div",{key:"518eb0d01439b2e844d5e51d577a8e48d8a6b843",class:"KCarousel-dots"},Array.from({length:this.childrenLength}).map((n,t)=>e("span",{class:{"KCarousel-dot":!0,"is-active":this.isHighlighted(t)},onClick:()=>{this.currentSlideIndex=t,this.updateSlidePosition()}}))))}get el(){return this}static get style(){return Fi}},[1,"dga-carousel-v2",{variant:[1],showDots:[4,"show-dots"],steps:[2],transitionDuration:[2,"transition-duration"],size:[1],cardsToShow:[2,"cards-to-show"],childWidth:[32],childrenLength:[32],cardsToShowState:[32],currentSlideIndex:[32]}]);function Re(){if(typeof customElements>"u")return;["dga-carousel-v2","dga-icon"].forEach(n=>{switch(n){case"dga-carousel-v2":customElements.get(n)||customElements.define(n,Le);break;case"dga-icon":customElements.get(n)||w();break}})}const Oe=d(class extends l{constructor(){super(),this.__registerHost(),this.variant="neutral"}render(){return e("div",{key:"280a8d9861480d415aafea438cbe4ca975c0c27d"},e("h1",{key:"cab4b1735afdf59a76ef5450c2d8c1894c958b67"},"Carousel Example"),e("div",{key:"7aa9ae547544ea84114ef6f0851efa339b43a58f",style:{padding:"50px",display:"flex",gap:"20px"}},e("div",{key:"3b99504de6891d3cd70afbe1d9d226047f799945",style:{display:"flex",flexDirection:"column",gap:"20px"}},e("dga-carousel-v2",{key:"24e4b41792b69a9b5e564e3ab286b44904993c20"},e("dga-carousel-v2-item",{key:"a549566b4017075a4cde96d1abd38533deb21c17"},e("img",{key:"8bd1ea36a5fcb5955a5e52af3e9a390a448b6251",src:"https://cdn.pixabay.com/photo/2019/11/03/01/56/landscape-4597742_1280.jpg",style:{height:"300px",width:"450px"}})),e("dga-carousel-v2-item",{key:"278c9e9f02bafefbec328f23f164873b5236d162"},e("img",{key:"f5183f85b1da913de966b6d05e2b5fe75bfff4b2",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"a9ecb8ee21dc24ebf5c23154ea292d1174fd2478"},e("img",{key:"771c4cbda917de9c4907f4c948f4d7e64ac49f45",src:"https://cdn.pixabay.com/photo/2019/11/03/01/56/landscape-4597742_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"3bdf94403659be09b4feb28ed473115567d21249"},e("img",{key:"389cb2326fbd3630fdc9011faaa1393e0000655f",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"41035907642e636872f39a96c63899e729bfa6b5"},e("img",{key:"092989fbd6e11b13c378efd56508495bd9837e31",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"ab341a083897d2a2f3462dd978e38182b470ce21"},e("img",{key:"3bc38096c6b20243fa3e224a911c796b6addc3e7",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"800717776ba4285ad3aafe511f7aaf455f2d71e8"},e("img",{key:"36c4b91b96e951c91085e6fb31d7ff258448dfff",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})))),e("div",{key:"8f1c1311bac855854fbb989006f1807e62360030",style:{display:"flex",flexDirection:"column",gap:"20px"}})))}},[0,"dga-carousel-v2-usage",{variant:[32]}]);function Ui(){if(typeof customElements>"u")return;["dga-carousel-v2-usage","dga-carousel-v2","dga-icon"].forEach(n=>{switch(n){case"dga-carousel-v2-usage":customElements.get(n)||customElements.define(n,Oe);break;case"dga-carousel-v2":customElements.get(n)||Re();break;case"dga-icon":customElements.get(n)||w();break}})}const Wi=Oe,Vi=Ui,Ki=Le,Yi=Re,He=d(class extends l{constructor(){super(),this.__registerHost(),this.type="realistic",this.trend="positive",this.size="lg",this.showMarker=!1,this.data=[],this.lineColor=this.trend==="positive"?"#067647":"#B42318",this.fillColor=this.trend==="positive"?"#079455":"#D92D20",this.width=this.size==="lg"?328:128,this.height=64}handleSizeChange(){this.width=this.size==="lg"?328:128}getLinePath(){const n=this.getPoints();switch(this.type){case"realistic":return this.getSmoothPath(n);case"wavy":return this.getWavyPath(n);case"straight":return this.getStraightPath(n);case"layers":return this.getSmoothPath(n);default:return""}}getPoints(){return this.data.map((n,t)=>({x:t/(this.data.length-1)*this.width,y:this.height-n/Math.max(...this.data)*this.height}))}getSmoothPath(n){return n.reduce((t,i,r,a)=>{if(r===0)return`M ${i.x},${i.y}`;const g=a[r-1],h=(g.x+i.x)/2;return`${t} C ${h},${g.y} ${h},${i.y} ${i.x},${i.y}`},"")}getWavyPath(n){return n.reduce((t,i,r)=>r===0?`M ${i.x},${i.y}`:`${t} Q ${i.x-10},${i.y+10} ${i.x},${i.y}`,"")}getStraightPath(n){return n.reduce((t,i,r)=>r===0?`M ${i.x},${i.y}`:`${t} L ${i.x},${i.y}`,"")}getAreaPath(){return`${this.getLinePath()} L ${this.width},${this.height} L 0,${this.height} Z`}render(){const n=this.getLinePath(),t=this.getAreaPath();return e("svg",{key:"26be09f1197bbf429ed77c80d945edb6683c4d67",width:this.width,height:this.height,viewBox:`0 0 ${this.width} ${this.height}`},e("defs",{key:"f079dff4148d2c79a2d599b93d79bf78e8e9976d"},e("linearGradient",{key:"0ce9a96b117526e1d0150ef1fa07c22017c3082f",id:"areaGradient",x1:"0",x2:"0",y1:"0",y2:"1"},e("stop",{key:"c453ad493455d933709e67be2bcfcadc563c808e",offset:"0%","stop-color":this.fillColor,"stop-opacity":"0.25"}),e("stop",{key:"76c8ad18eab4257db7775a18c7deff2b9d09cb0e",offset:"100%","stop-color":this.fillColor,"stop-opacity":"0"}))),e("path",{key:"d557491fe47ec0fef4cacbeb3e473ace0d2ce8f2",d:t,fill:"url(#areaGradient)"}),e("path",{key:"03e27645c0a228de17f0565bb8b07446e433ea71",d:n,fill:"none",stroke:this.lineColor,"stroke-width":"2"}),this.showMarker&&this.getPoints().map(i=>e("circle",{cx:i.x,cy:i.y,r:"4",fill:"white",stroke:this.lineColor,"stroke-width":"2"})))}static get watchers(){return{size:["handleSizeChange"]}}},[0,"dga-chart",{type:[1],trend:[1],size:[1],showMarker:[4,"show-marker"],data:[16],lineColor:[32],fillColor:[32],width:[32],height:[32]},void 0,{size:["handleSizeChange"]}]);function Fe(){if(typeof customElements>"u")return;["dga-chart"].forEach(n=>{switch(n){case"dga-chart":customElements.get(n)||customElements.define(n,He);break}})}const Gi=He,Ni=Fe,Xi=Be,Zi=K,Ue=d(class extends l{constructor(){super(),this.__registerHost(),this.label=void 0,this.variant="success",this.size="md",this.leadIcon=void 0,this.leadIconProps=void 0,this.trailIcon=void 0,this.trailIconProps=void 0,this.rounded=void 0,this.disabled=void 0,this.pressed=!1}renderIcon(n,t){return e("dga-icon",Object.assign({icon:n},t))}render(){return e("span",{key:"f93a0e4a4ca40062e5e362f338898322e9626ecf",tabindex:"0",class:`chip chip--${this.variant} chip--${this.size} ${this.rounded?"chip--rounded":""} ${this.disabled?"disabled":""} ${this.pressed?"pressed":""}`,onMouseDown:()=>this.pressed=!0,onMouseUp:()=>this.pressed=!1,"aria-disabled":this.disabled},this.leadIcon?e("span",{class:"chip-icon"},this.renderIcon(this.leadIcon,this.leadIconProps)):"",this.label,this.trailIcon?e("span",{class:"chip-icon"},this.renderIcon(this.trailIcon,this.trailIconProps)):"",e("slot",{key:"8dd87d3537675fbec803d6898ac53e3b1afd2c1a"}))}},[4,"dga-chip",{label:[1],variant:[1],size:[1],leadIcon:[8,"lead-icon"],leadIconProps:[16],trailIcon:[8,"trail-icon"],trailIconProps:[16],rounded:[4],disabled:[4],pressed:[32]}]);function Ji(){if(typeof customElements>"u")return;["dga-chip","dga-icon"].forEach(n=>{switch(n){case"dga-chip":customElements.get(n)||customElements.define(n,Ue);break;case"dga-icon":customElements.get(n)||w();break}})}const Qi=Ue,nr=Ji,We=d(class extends l{constructor(){super(),this.__registerHost(),this.icons={success:"hgi-solid hgi-sharp hgi-checkmark-circle-02",info:"hgi-solid hgi-sharp hgi-information-circle",neutral:"hgi-solid hgi-sharp hgi-information-circle",warning:"hgi-solid hgi-alert-02",critical:"hgi-solid hgi-alert-circle"},this.sizes={"200px":200,"160px":160,"120px":120,"80px":80,"64px":64},this.size="200px",this.text=void 0,this.variant="primary",this.icon=void 0,this.percentage=0}render(){const n=this.sizes[this.size]/10,t=(this.sizes[this.size]-n)/2,i=2*Math.PI*t,r=i*(1-this.percentage/100);return e("div",{key:"d3375e96b1625bb7282b37322ee2235dfeb6b75a",class:"circular-progress-bar","aria-size":this.size},e("div",{key:"88e362f8dd59ad398100d6eacaca8090040fe63a",class:"circular-progress-bar__label"},this.variant==="success"&&this.icon&&e("i",{key:"2da5c2699f0f443e758886e2af4537a49fb318b9",class:`circular-progress-bar__label--icon ${this.icons[this.icon]}`}),this.variant!=="success"&&e("h4",{key:"754f19c31dbb46b672e51cd185585780771a8899",class:"circular-progress-bar__label--percentage"},this.percentage,"%"),this.text&&e("h5",{key:"c0eb8475bc5c4e1be18ad93aabda442730029e05",class:`circular-progress-bar__label--text ${this.variant}`},this.text)),e("svg",{key:"3c9c4c2eb383c64a77201e0cf5b793df86e6d82f",width:this.sizes[this.size],height:this.sizes[this.size],viewBox:`0 0 ${this.sizes[this.size]} ${this.sizes[this.size]}`},e("circle",{key:"9cef67a302daf063faf443e56b6855b4934d46ce",class:"track",fill:"none",stroke:"#e6e6e6",r:t,cx:this.sizes[this.size]/2,cy:this.sizes[this.size]/2,"stroke-width":n}),e("circle",{key:"0b26f3dc5479359e3c9873fe0c6b6644277d72d8",class:`tail tail--${this.variant}`,fill:"none",stroke:"currentColor",r:t,cx:this.sizes[this.size]/2,cy:this.sizes[this.size]/2,"stroke-width":n,"stroke-linecap":"round","stroke-dasharray":i,"stroke-dashoffset":r,transform:`rotate(-180 ${this.sizes[this.size]/2} ${this.sizes[this.size]/2})`,style:{transition:"stroke-dashoffset 0.5s ease"}})))}},[0,"dga-circular-progress-bar",{size:[1],text:[1],variant:[1],icon:[1],percentage:[2]}]);function er(){if(typeof customElements>"u")return;["dga-circular-progress-bar"].forEach(n=>{switch(n){case"dga-circular-progress-bar":customElements.get(n)||customElements.define(n,We);break}})}const or=We,tr=er,Ve=d(class extends l{constructor(){super(),this.__registerHost(),this.size="md",this.orientation="horizontal",this.external=!1,this.flush=!1,this.divider=!1,this.tabsList=[],this.extraClass=void 0,this.disabled=!1,this.activeTab=null}setActiveTab(n){this.activeTab=n}renderIcon(n,t){return e("dga-icon",Object.assign({icon:n},t))}render(){var n;return e("ul",{key:"5001e615bbc907d80f1763159f99337ba6c27808",class:`tabs-list tabs-list--${this.orientation} ${this.divider?"tabs-list--divider":""} ${this.flush?"flush":""} ${this.extraClass}`},(n=this.tabsList)===null||n===void 0?void 0:n.map((t,i)=>e("li",{key:i},this.external?e("a",{href:t.link,class:`tabs-list__item tabs-list__item--${this.size} ${this.activeTab===i?"tabs-list__item--active":""} ${this.disabled?"disabled":""}`,onClick:r=>{r.preventDefault(),!this.disabled&&this.setActiveTab(i)}},(t==null?void 0:t.tabIcon)&&e("div",{class:"tabs-list__icon"},this.renderIcon(t==null?void 0:t.tabIcon,t==null?void 0:t.iconProps)),e("div",{class:"tabs-list__label"},t==null?void 0:t.label)):e("a",{href:"#",class:`tabs-list__item tabs-list__item--${this.size} ${this.activeTab===i?"tabs-list__item--active":""} ${this.disabled?"disabled":""}`,onClick:r=>{r.preventDefault(),!this.disabled&&this.setActiveTab(i),t!=null&&t.onClick&&(t==null||t.onClick(r))}},(t==null?void 0:t.tabIcon)&&e("div",{class:"tabs-list__icon"},this.renderIcon(t==null?void 0:t.tabIcon,t==null?void 0:t.iconProps)),e("div",{class:"tabs-list__label"},t==null?void 0:t.label)))),this.orientation==="horizontal"&&e("dga-button",{key:"399e5fe617df8cd0baba91888602f75bde32e386",iconOnly:!0,iconProps:{size:17,variant:"solid"},iconType:"MoreHorizontalCircle01Icon",label:"Button",onClick:()=>{},size:"md",variant:"subtle",disabled:this.disabled}))}},[0,"dga-tabs",{size:[1],orientation:[1],external:[4],flush:[4],divider:[4],tabsList:[16],extraClass:[1,"extra-class"],disabled:[4],activeTab:[32]}]);function Ke(){if(typeof customElements>"u")return;["dga-tabs","dga-button","dga-icon"].forEach(n=>{switch(n){case"dga-tabs":customElements.get(n)||customElements.define(n,Ve);break;case"dga-button":customElements.get(n)||R();break;case"dga-icon":customElements.get(n)||w();break}})}const ir=`@charset "UTF-8";
|
|
218577
|
+
}`,Fi=Hi,Le=d(class extends l{constructor(){super(),this.__registerHost(),this.DIRECTION={LEFT:Symbol("LEFT"),RIGHT:Symbol("RIGHT")},this.variant="arrows",this.showDots=!0,this.steps=1,this.transitionDuration=600,this.size="md",this.cardsToShow=null,this.childWidth=0,this.childrenLength=0,this.cardsToShowState=0,this.currentSlideIndex=0}changeSlide(n){console.log(),n===this.DIRECTION.RIGHT&&this.currentSlideIndex<this.childrenLength-1?this.currentSlideIndex++:n===this.DIRECTION.LEFT&&this.currentSlideIndex>0&&this.currentSlideIndex--,this.updateSlidePosition()}updateSlidePosition(){if(this.slidesContainer){const n=-(this.currentSlideIndex*this.childWidth);this.slidesContainer.style.transform=`translateX(${n}px)`}}showLeftArrow(){return this.currentSlideIndex>0}showRightArrow(){return this.currentSlideIndex<this.childrenLength-1}isHighlighted(n){return n===this.currentSlideIndex}componentDidLoad(){var n;const t=(n=this.el.shadowRoot)===null||n===void 0?void 0:n.querySelector("slot");t==null||t.addEventListener("slotchange",this.calculateChildWidth.bind(this)),this.calculateChildWidth(),this.updateChildrenLength()}calculateChildWidth(){const n=this.slidesContainer.querySelector(".KCarousel-slides > *");n&&(this.childWidth=n.clientWidth)}updateChildrenLength(){this.slidesContainer&&(this.childrenLength=this.slidesContainer.childElementCount)}render(){return console.log(this.childrenLength,"this.childrenLength"),console.log(this.currentSlideIndex,this.el.children.length,this.slidesContainer,"''''''''''''''''''''''''''''''"),e(D,{key:"123ec93b9da51a39d8726010514fd3bda1e3f5aa",class:`KCarousel KCarousel--${this.variant} KCarousel--${this.size}`},this.variant!=="dots-only"&&e("div",{key:"0db634b6ba57cf75db8872fe83eb503699404aad",class:"KCarousel-body"},this.variant==="arrows"&&e("a",{key:"7643b368c46066e902c6039e2b09675b161fd1f1",class:`KCarousel-arrow ${this.showLeftArrow()?"KCarousel-arrow--active":""} left`,onClick:()=>this.changeSlide(this.DIRECTION.LEFT)},e("dga-icon",{key:"4fb1be832c8f2cfa52583890eab5d7b8890f5fc8",icon:"arrow-left-01",variant:"stroke",type:"rounded",size:24})),e("div",{key:"cf52b82d14c0ec92a86eb4b79918e0afc708b5a9",class:"KCarousel-container",style:{overflow:"hidden",maxWidth:`${this.childWidth}px`}},e("div",{key:"03955a23498b8b1ff4376cc7860b9900feb57751",style:{display:"flex",transition:`transform ${this.transitionDuration}ms ease-in-out`},class:"KCarousel-slides",ref:n=>this.slidesContainer=n},e("slot",{key:"d8ae29b84bc01f2e0bf29aa0ea722ecfe5e9a36e"}))),this.variant==="arrows"&&e("a",{key:"b30df9cb4875abde0edd39cf02a44562087036de",class:`KCarousel-arrow ${this.showRightArrow()?"KCarousel-arrow--active":""} right`,onClick:()=>this.changeSlide(this.DIRECTION.RIGHT)},e("dga-icon",{key:"8fe1473fb7f0fd71d0906f19ac8d3a3d51bf6e47",icon:"arrow-right-01",variant:"stroke",type:"rounded",size:24}))),["dots","dots-only"].includes(this.variant)&&e("div",{key:"ecf9c29d058de540ea748c19c9fc01e0d70ce8d4",class:"KCarousel-dots"},Array.from({length:this.childrenLength}).map((n,t)=>e("span",{class:{"KCarousel-dot":!0,"is-active":this.isHighlighted(t)},onClick:()=>{this.currentSlideIndex=t,this.updateSlidePosition()}}))))}get el(){return this}static get style(){return Fi}},[4,"dga-carousel-v2",{variant:[1],showDots:[4,"show-dots"],steps:[2],transitionDuration:[2,"transition-duration"],size:[1],cardsToShow:[2,"cards-to-show"],childWidth:[32],childrenLength:[32],cardsToShowState:[32],currentSlideIndex:[32]}]);function Re(){if(typeof customElements>"u")return;["dga-carousel-v2","dga-icon"].forEach(n=>{switch(n){case"dga-carousel-v2":customElements.get(n)||customElements.define(n,Le);break;case"dga-icon":customElements.get(n)||w();break}})}const Oe=d(class extends l{constructor(){super(),this.__registerHost(),this.variant="neutral"}render(){return e("div",{key:"280a8d9861480d415aafea438cbe4ca975c0c27d"},e("h1",{key:"cab4b1735afdf59a76ef5450c2d8c1894c958b67"},"Carousel Example"),e("div",{key:"7aa9ae547544ea84114ef6f0851efa339b43a58f",style:{padding:"50px",display:"flex",gap:"20px"}},e("div",{key:"3b99504de6891d3cd70afbe1d9d226047f799945",style:{display:"flex",flexDirection:"column",gap:"20px"}},e("dga-carousel-v2",{key:"24e4b41792b69a9b5e564e3ab286b44904993c20"},e("dga-carousel-v2-item",{key:"a549566b4017075a4cde96d1abd38533deb21c17"},e("img",{key:"8bd1ea36a5fcb5955a5e52af3e9a390a448b6251",src:"https://cdn.pixabay.com/photo/2019/11/03/01/56/landscape-4597742_1280.jpg",style:{height:"300px",width:"450px"}})),e("dga-carousel-v2-item",{key:"278c9e9f02bafefbec328f23f164873b5236d162"},e("img",{key:"f5183f85b1da913de966b6d05e2b5fe75bfff4b2",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"a9ecb8ee21dc24ebf5c23154ea292d1174fd2478"},e("img",{key:"771c4cbda917de9c4907f4c948f4d7e64ac49f45",src:"https://cdn.pixabay.com/photo/2019/11/03/01/56/landscape-4597742_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"3bdf94403659be09b4feb28ed473115567d21249"},e("img",{key:"389cb2326fbd3630fdc9011faaa1393e0000655f",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"41035907642e636872f39a96c63899e729bfa6b5"},e("img",{key:"092989fbd6e11b13c378efd56508495bd9837e31",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"ab341a083897d2a2f3462dd978e38182b470ce21"},e("img",{key:"3bc38096c6b20243fa3e224a911c796b6addc3e7",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})),e("dga-carousel-v2-item",{key:"800717776ba4285ad3aafe511f7aaf455f2d71e8"},e("img",{key:"36c4b91b96e951c91085e6fb31d7ff258448dfff",src:"https://cdn.pixabay.com/photo/2020/07/09/10/31/sea-5386810_1280.jpg",style:{height:"300px",width:"450px",objectFit:"cover"}})))),e("div",{key:"8f1c1311bac855854fbb989006f1807e62360030",style:{display:"flex",flexDirection:"column",gap:"20px"}})))}},[0,"dga-carousel-v2-usage",{variant:[32]}]);function Ui(){if(typeof customElements>"u")return;["dga-carousel-v2-usage","dga-carousel-v2","dga-icon"].forEach(n=>{switch(n){case"dga-carousel-v2-usage":customElements.get(n)||customElements.define(n,Oe);break;case"dga-carousel-v2":customElements.get(n)||Re();break;case"dga-icon":customElements.get(n)||w();break}})}const Wi=Oe,Vi=Ui,Ki=Le,Yi=Re,He=d(class extends l{constructor(){super(),this.__registerHost(),this.type="realistic",this.trend="positive",this.size="lg",this.showMarker=!1,this.data=[],this.lineColor=this.trend==="positive"?"#067647":"#B42318",this.fillColor=this.trend==="positive"?"#079455":"#D92D20",this.width=this.size==="lg"?328:128,this.height=64}handleSizeChange(){this.width=this.size==="lg"?328:128}getLinePath(){const n=this.getPoints();switch(this.type){case"realistic":return this.getSmoothPath(n);case"wavy":return this.getWavyPath(n);case"straight":return this.getStraightPath(n);case"layers":return this.getSmoothPath(n);default:return""}}getPoints(){return this.data.map((n,t)=>({x:t/(this.data.length-1)*this.width,y:this.height-n/Math.max(...this.data)*this.height}))}getSmoothPath(n){return n.reduce((t,i,r,a)=>{if(r===0)return`M ${i.x},${i.y}`;const g=a[r-1],h=(g.x+i.x)/2;return`${t} C ${h},${g.y} ${h},${i.y} ${i.x},${i.y}`},"")}getWavyPath(n){return n.reduce((t,i,r)=>r===0?`M ${i.x},${i.y}`:`${t} Q ${i.x-10},${i.y+10} ${i.x},${i.y}`,"")}getStraightPath(n){return n.reduce((t,i,r)=>r===0?`M ${i.x},${i.y}`:`${t} L ${i.x},${i.y}`,"")}getAreaPath(){return`${this.getLinePath()} L ${this.width},${this.height} L 0,${this.height} Z`}render(){const n=this.getLinePath(),t=this.getAreaPath();return e("svg",{key:"26be09f1197bbf429ed77c80d945edb6683c4d67",width:this.width,height:this.height,viewBox:`0 0 ${this.width} ${this.height}`},e("defs",{key:"f079dff4148d2c79a2d599b93d79bf78e8e9976d"},e("linearGradient",{key:"0ce9a96b117526e1d0150ef1fa07c22017c3082f",id:"areaGradient",x1:"0",x2:"0",y1:"0",y2:"1"},e("stop",{key:"c453ad493455d933709e67be2bcfcadc563c808e",offset:"0%","stop-color":this.fillColor,"stop-opacity":"0.25"}),e("stop",{key:"76c8ad18eab4257db7775a18c7deff2b9d09cb0e",offset:"100%","stop-color":this.fillColor,"stop-opacity":"0"}))),e("path",{key:"d557491fe47ec0fef4cacbeb3e473ace0d2ce8f2",d:t,fill:"url(#areaGradient)"}),e("path",{key:"03e27645c0a228de17f0565bb8b07446e433ea71",d:n,fill:"none",stroke:this.lineColor,"stroke-width":"2"}),this.showMarker&&this.getPoints().map(i=>e("circle",{cx:i.x,cy:i.y,r:"4",fill:"white",stroke:this.lineColor,"stroke-width":"2"})))}static get watchers(){return{size:["handleSizeChange"]}}},[0,"dga-chart",{type:[1],trend:[1],size:[1],showMarker:[4,"show-marker"],data:[16],lineColor:[32],fillColor:[32],width:[32],height:[32]},void 0,{size:["handleSizeChange"]}]);function Fe(){if(typeof customElements>"u")return;["dga-chart"].forEach(n=>{switch(n){case"dga-chart":customElements.get(n)||customElements.define(n,He);break}})}const Gi=He,Ni=Fe,Xi=Be,Zi=K,Ue=d(class extends l{constructor(){super(),this.__registerHost(),this.label=void 0,this.variant="success",this.size="md",this.leadIcon=void 0,this.leadIconProps=void 0,this.trailIcon=void 0,this.trailIconProps=void 0,this.rounded=void 0,this.disabled=void 0,this.pressed=!1}renderIcon(n,t){return e("dga-icon",Object.assign({icon:n},t))}render(){return e("span",{key:"f93a0e4a4ca40062e5e362f338898322e9626ecf",tabindex:"0",class:`chip chip--${this.variant} chip--${this.size} ${this.rounded?"chip--rounded":""} ${this.disabled?"disabled":""} ${this.pressed?"pressed":""}`,onMouseDown:()=>this.pressed=!0,onMouseUp:()=>this.pressed=!1,"aria-disabled":this.disabled},this.leadIcon?e("span",{class:"chip-icon"},this.renderIcon(this.leadIcon,this.leadIconProps)):"",this.label,this.trailIcon?e("span",{class:"chip-icon"},this.renderIcon(this.trailIcon,this.trailIconProps)):"",e("slot",{key:"8dd87d3537675fbec803d6898ac53e3b1afd2c1a"}))}},[4,"dga-chip",{label:[1],variant:[1],size:[1],leadIcon:[8,"lead-icon"],leadIconProps:[16],trailIcon:[8,"trail-icon"],trailIconProps:[16],rounded:[4],disabled:[4],pressed:[32]}]);function Ji(){if(typeof customElements>"u")return;["dga-chip","dga-icon"].forEach(n=>{switch(n){case"dga-chip":customElements.get(n)||customElements.define(n,Ue);break;case"dga-icon":customElements.get(n)||w();break}})}const Qi=Ue,nr=Ji,We=d(class extends l{constructor(){super(),this.__registerHost(),this.icons={success:"hgi-solid hgi-sharp hgi-checkmark-circle-02",info:"hgi-solid hgi-sharp hgi-information-circle",neutral:"hgi-solid hgi-sharp hgi-information-circle",warning:"hgi-solid hgi-alert-02",critical:"hgi-solid hgi-alert-circle"},this.sizes={"200px":200,"160px":160,"120px":120,"80px":80,"64px":64},this.size="200px",this.text=void 0,this.variant="primary",this.icon=void 0,this.percentage=0}render(){const n=this.sizes[this.size]/10,t=(this.sizes[this.size]-n)/2,i=2*Math.PI*t,r=i*(1-this.percentage/100);return e("div",{key:"d3375e96b1625bb7282b37322ee2235dfeb6b75a",class:"circular-progress-bar","aria-size":this.size},e("div",{key:"88e362f8dd59ad398100d6eacaca8090040fe63a",class:"circular-progress-bar__label"},this.variant==="success"&&this.icon&&e("i",{key:"2da5c2699f0f443e758886e2af4537a49fb318b9",class:`circular-progress-bar__label--icon ${this.icons[this.icon]}`}),this.variant!=="success"&&e("h4",{key:"754f19c31dbb46b672e51cd185585780771a8899",class:"circular-progress-bar__label--percentage"},this.percentage,"%"),this.text&&e("h5",{key:"c0eb8475bc5c4e1be18ad93aabda442730029e05",class:`circular-progress-bar__label--text ${this.variant}`},this.text)),e("svg",{key:"3c9c4c2eb383c64a77201e0cf5b793df86e6d82f",width:this.sizes[this.size],height:this.sizes[this.size],viewBox:`0 0 ${this.sizes[this.size]} ${this.sizes[this.size]}`},e("circle",{key:"9cef67a302daf063faf443e56b6855b4934d46ce",class:"track",fill:"none",stroke:"#e6e6e6",r:t,cx:this.sizes[this.size]/2,cy:this.sizes[this.size]/2,"stroke-width":n}),e("circle",{key:"0b26f3dc5479359e3c9873fe0c6b6644277d72d8",class:`tail tail--${this.variant}`,fill:"none",stroke:"currentColor",r:t,cx:this.sizes[this.size]/2,cy:this.sizes[this.size]/2,"stroke-width":n,"stroke-linecap":"round","stroke-dasharray":i,"stroke-dashoffset":r,transform:`rotate(-180 ${this.sizes[this.size]/2} ${this.sizes[this.size]/2})`,style:{transition:"stroke-dashoffset 0.5s ease"}})))}},[0,"dga-circular-progress-bar",{size:[1],text:[1],variant:[1],icon:[1],percentage:[2]}]);function er(){if(typeof customElements>"u")return;["dga-circular-progress-bar"].forEach(n=>{switch(n){case"dga-circular-progress-bar":customElements.get(n)||customElements.define(n,We);break}})}const or=We,tr=er,Ve=d(class extends l{constructor(){super(),this.__registerHost(),this.size="md",this.orientation="horizontal",this.external=!1,this.flush=!1,this.divider=!1,this.tabsList=[],this.extraClass=void 0,this.disabled=!1,this.activeTab=null}setActiveTab(n){this.activeTab=n}renderIcon(n,t){return e("dga-icon",Object.assign({icon:n},t))}render(){var n;return e("ul",{key:"5001e615bbc907d80f1763159f99337ba6c27808",class:`tabs-list tabs-list--${this.orientation} ${this.divider?"tabs-list--divider":""} ${this.flush?"flush":""} ${this.extraClass}`},(n=this.tabsList)===null||n===void 0?void 0:n.map((t,i)=>e("li",{key:i},this.external?e("a",{href:t.link,class:`tabs-list__item tabs-list__item--${this.size} ${this.activeTab===i?"tabs-list__item--active":""} ${this.disabled?"disabled":""}`,onClick:r=>{r.preventDefault(),!this.disabled&&this.setActiveTab(i)}},(t==null?void 0:t.tabIcon)&&e("div",{class:"tabs-list__icon"},this.renderIcon(t==null?void 0:t.tabIcon,t==null?void 0:t.iconProps)),e("div",{class:"tabs-list__label"},t==null?void 0:t.label)):e("a",{href:"#",class:`tabs-list__item tabs-list__item--${this.size} ${this.activeTab===i?"tabs-list__item--active":""} ${this.disabled?"disabled":""}`,onClick:r=>{r.preventDefault(),!this.disabled&&this.setActiveTab(i),t!=null&&t.onClick&&(t==null||t.onClick(r))}},(t==null?void 0:t.tabIcon)&&e("div",{class:"tabs-list__icon"},this.renderIcon(t==null?void 0:t.tabIcon,t==null?void 0:t.iconProps)),e("div",{class:"tabs-list__label"},t==null?void 0:t.label)))),this.orientation==="horizontal"&&e("dga-button",{key:"399e5fe617df8cd0baba91888602f75bde32e386",iconOnly:!0,iconProps:{size:17,variant:"solid"},iconType:"MoreHorizontalCircle01Icon",label:"Button",onClick:()=>{},size:"md",variant:"subtle",disabled:this.disabled}))}},[0,"dga-tabs",{size:[1],orientation:[1],external:[4],flush:[4],divider:[4],tabsList:[16],extraClass:[1,"extra-class"],disabled:[4],activeTab:[32]}]);function Ke(){if(typeof customElements>"u")return;["dga-tabs","dga-button","dga-icon"].forEach(n=>{switch(n){case"dga-tabs":customElements.get(n)||customElements.define(n,Ve);break;case"dga-button":customElements.get(n)||R();break;case"dga-icon":customElements.get(n)||w();break}})}const ir=`@charset "UTF-8";
|
|
218578
218578
|
/*
|
|
218579
218579
|
0 - 600px: Phone
|
|
218580
218580
|
600 - 900px: Tablet portrait
|
package/dist/index.js
CHANGED
|
@@ -219781,7 +219781,7 @@ a:focus {
|
|
|
219781
219781
|
background-color: var(--stepper-button-completed);
|
|
219782
219782
|
}`, Fi = Hi, Le = /* @__PURE__ */ d(class extends l {
|
|
219783
219783
|
constructor() {
|
|
219784
|
-
super(), this.__registerHost(), this.
|
|
219784
|
+
super(), this.__registerHost(), this.DIRECTION = {
|
|
219785
219785
|
LEFT: Symbol("LEFT"),
|
|
219786
219786
|
RIGHT: Symbol("RIGHT")
|
|
219787
219787
|
}, this.variant = "arrows", this.showDots = !0, this.steps = 1, this.transitionDuration = 600, this.size = "md", this.cardsToShow = null, this.childWidth = 0, this.childrenLength = 0, this.cardsToShowState = 0, this.currentSlideIndex = 0;
|
|
@@ -219817,14 +219817,14 @@ a:focus {
|
|
|
219817
219817
|
this.slidesContainer && (this.childrenLength = this.slidesContainer.childElementCount);
|
|
219818
219818
|
}
|
|
219819
219819
|
render() {
|
|
219820
|
-
return console.log(this.childrenLength, "this.childrenLength"), console.log(this.currentSlideIndex, this.el.children.length, this.slidesContainer, "''''''''''''''''''''''''''''''"), e(E, { key: "
|
|
219820
|
+
return console.log(this.childrenLength, "this.childrenLength"), console.log(this.currentSlideIndex, this.el.children.length, this.slidesContainer, "''''''''''''''''''''''''''''''"), e(E, { key: "123ec93b9da51a39d8726010514fd3bda1e3f5aa", class: `KCarousel KCarousel--${this.variant} KCarousel--${this.size}` }, this.variant !== "dots-only" && e("div", { key: "0db634b6ba57cf75db8872fe83eb503699404aad", class: "KCarousel-body" }, this.variant === "arrows" && e("a", { key: "7643b368c46066e902c6039e2b09675b161fd1f1", class: `KCarousel-arrow ${this.showLeftArrow() ? "KCarousel-arrow--active" : ""} left`, onClick: () => this.changeSlide(this.DIRECTION.LEFT) }, e("dga-icon", { key: "4fb1be832c8f2cfa52583890eab5d7b8890f5fc8", icon: "arrow-left-01", variant: "stroke", type: "rounded", size: 24 })), e("div", { key: "cf52b82d14c0ec92a86eb4b79918e0afc708b5a9", class: "KCarousel-container", style: { overflow: "hidden", maxWidth: `${this.childWidth}px` } }, e("div", { key: "03955a23498b8b1ff4376cc7860b9900feb57751", style: {
|
|
219821
219821
|
display: "flex",
|
|
219822
219822
|
transition: `transform ${this.transitionDuration}ms ease-in-out`
|
|
219823
219823
|
// transform: `translateX(${this.initialCard * this.childWidth}%)`,
|
|
219824
219824
|
// transform: `translateX(${this.currentSlideIndex * this.childWidth}px)`,
|
|
219825
219825
|
// maxWidth: `${this.childWidth}px`
|
|
219826
219826
|
// maxWidth: `${450}px`
|
|
219827
|
-
}, class: "KCarousel-slides", ref: (n) => this.slidesContainer = n }, e("slot", { key: "
|
|
219827
|
+
}, class: "KCarousel-slides", ref: (n) => this.slidesContainer = n }, e("slot", { key: "d8ae29b84bc01f2e0bf29aa0ea722ecfe5e9a36e" }))), this.variant === "arrows" && e("a", { key: "b30df9cb4875abde0edd39cf02a44562087036de", class: `KCarousel-arrow ${this.showRightArrow() ? "KCarousel-arrow--active" : ""} right`, onClick: () => this.changeSlide(this.DIRECTION.RIGHT) }, e("dga-icon", { key: "8fe1473fb7f0fd71d0906f19ac8d3a3d51bf6e47", icon: "arrow-right-01", variant: "stroke", type: "rounded", size: 24 }))), ["dots", "dots-only"].includes(this.variant) && e("div", { key: "ecf9c29d058de540ea748c19c9fc01e0d70ce8d4", class: "KCarousel-dots" }, Array.from({ length: this.childrenLength }).map((n, t) => e("span", { class: {
|
|
219828
219828
|
"KCarousel-dot": !0,
|
|
219829
219829
|
"is-active": this.isHighlighted(t)
|
|
219830
219830
|
}, onClick: () => {
|
|
@@ -219837,7 +219837,7 @@ a:focus {
|
|
|
219837
219837
|
static get style() {
|
|
219838
219838
|
return Fi;
|
|
219839
219839
|
}
|
|
219840
|
-
}, [
|
|
219840
|
+
}, [4, "dga-carousel-v2", {
|
|
219841
219841
|
variant: [1],
|
|
219842
219842
|
showDots: [4, "show-dots"],
|
|
219843
219843
|
steps: [2],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "platformscode-new-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.61",
|
|
4
4
|
"description": "React Components for Platformscode with new components -divider-chip-slider-",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/yourusername/platformscode-react.git"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "
|
|
23
|
+
"build": "vite build",
|
|
24
24
|
"dev": "vite"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|