@jumpgroup/jump-design-system 1.0.17 → 1.0.19
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/jump-card-ecommerce-showcase.cjs.entry.js +101 -0
- package/dist/cjs/jump-card-ecommerce-showcase.cjs.entry.js.map +1 -0
- package/dist/cjs/jump-design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.css +281 -0
- package/dist/collection/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.js +440 -0
- package/dist/collection/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.js.map +1 -0
- package/dist/collection/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.stories.js +144 -0
- package/dist/collection/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.stories.js.map +1 -0
- package/dist/components/jump-card-ecommerce-showcase.d.ts +11 -0
- package/dist/components/jump-card-ecommerce-showcase.js +141 -0
- package/dist/components/jump-card-ecommerce-showcase.js.map +1 -0
- package/dist/esm/jump-card-ecommerce-showcase.entry.js +97 -0
- package/dist/esm/jump-card-ecommerce-showcase.entry.js.map +1 -0
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-ef4cf4ec.entry.js +2 -0
- package/dist/jump-design-system/p-ef4cf4ec.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +110 -0
- package/dist/types/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.d.ts +49 -0
- package/dist/types/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.stories.d.ts +112 -0
- package/dist/types/components.d.ts +157 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as n,c as e,h as o,H as i,g as t}from"./p-98d5dd1f.js";const s=':host {\n --card-max-width: 450px;\n --jump-card-ecommerce-showcase-max-width-horizontal: 100%;\n --jump-card-ecommerce-showcase-color: var(--neutral-grey-primary);\n --jump-card-ecommerce-showcase-background: transparent;\n --jump-card-ecommerce-showcase-border-color: var(--neutral-grey-background);\n --jump-card-ecommerce-showcase-padding: 0.5rem;\n --jump-card-ecommerce-showcase-out-of-stock-color: var(--status-danger-standard);\n --jump-card-ecommerce-showcase-available-color: var(--status-success-standard);\n --jump-card-ecommerce-showcase-discount-color: var(--status-danger-standard);\n --image-object-fit: cover;\n --jump-card-ecommerce-showcase-hide-discover-button-visibility: block;\n --jump-card-ecommerce-showcase-discount-badge-bg-color: var(--neutral-white);\n --jump-card-ecommerce-showcase-discount-badge-text-color: var(--primary-standard);\n --jump-card-ecommerce-showcase-discount-badge-padding: 4px 12px;\n --jump-card-ecommerce-showcase-discount-badge-border-radius: 50px;\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, "Arial"), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-ecommerce-showcase-background);\n color: var(--jump-card-ecommerce-showcase-color);\n}\n:host .DiscountBadge {\n position: absolute;\n bottom: 1rem;\n right: 0.2rem;\n z-index: 2;\n border: 2px solid var(--jump-card-ecommerce-showcase-discount-badge-text-color);\n color: var(--jump-card-ecommerce-showcase-discount-badge-text-color);\n background-color: var(--jump-card-ecommerce-showcase-discount-badge-bg-color);\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n padding: var(--jump-card-ecommerce-showcase-discount-badge-padding);\n border-radius: var(--jump-card-ecommerce-showcase-discount-badge-border-radius);\n line-height: 1.2;\n}\n:host .Footer,\n:host .Body {\n display: flex;\n width: 100%;\n}\n:host .Footer {\n container-type: inline-size;\n flex-direction: row;\n}\n@container (max-width: 239px) {\n :host .Footer {\n flex-direction: column;\n }\n :host .Footer .OutOfStock {\n margin-bottom: 0.25rem;\n }\n}\n:host jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n}\n:host .Media {\n container-type: inline-size;\n}\n@container (max-width: 239px) {\n :host .Media jump-badge {\n top: auto;\n bottom: 1rem;\n left: 0.2rem;\n right: auto;\n }\n}\n:host .Media {\n overflow: hidden;\n position: relative;\n border-radius: 3px;\n aspect-ratio: 1/1;\n}\n:host .Media .Images {\n height: 100%;\n margin: 0;\n position: relative;\n}\n:host .Media .Images img {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n object-fit: var(--image-object-fit, cover);\n}\n:host .Media .Images__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n}\n:host .Media.hasBackground {\n background-color: var(--neutral-white);\n}\n:host .Media.hasBackground.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-ecommerce-showcase-padding) var(--jump-card-ecommerce-showcase-padding) 0;\n}\n:host .Media.hasBackground.iconOnly img {\n border-radius: 6px;\n}\n:host .Media.iconOnly {\n border-bottom-right-radius: 0;\n}\n:host .Media.is-mini {\n max-width: 180px;\n}\n:host .Content {\n container-type: inline-size;\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n@container (max-width: 239px) {\n :host .Content {\n flex-direction: row;\n }\n}\n:host .Content.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-ecommerce-showcase-padding) * 2);\n}\n:host .Content.iconOnly {\n padding: calc(var(--jump-card-ecommerce-showcase-padding) * 2) var(--jump-card-ecommerce-showcase-padding);\n}\n:host .Content.is-mini {\n max-width: 180px;\n}\n:host .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-ecommerce-showcase-padding) 0;\n container-type: inline-size;\n}\n:host .Body > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n}\n:host .Body > * > * {\n flex: 0 1 auto;\n}\n:host .Body .Body__Top {\n display: flex;\n flex-direction: row;\n}\n:host .Body .Body__Bottom {\n display: flex;\n flex-direction: row;\n}\n:host .Body.is-vertical .Body__Top {\n flex-direction: column;\n align-items: flex-start;\n}\n:host .Body.is-vertical .Body__Top .Subtitle {\n min-height: 3.5rem;\n}\n@container (max-width: 239px) {\n :host .Body.is-vertical .Body__Top .Subtitle {\n min-height: 3.2rem;\n }\n}\n:host .Body.is-vertical .Price {\n justify-items: start;\n margin-top: 0.5rem;\n column-gap: 0;\n display: flex;\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n@container (max-width: 239px) {\n :host .Body .Body__Top {\n flex-direction: column;\n }\n :host .Body .Body__Bottom {\n flex-direction: column;\n }\n :host .Body .SelectVariations {\n max-width: 100%;\n margin-bottom: 0.5rem;\n }\n :host .Body .SelectVariations select {\n width: 100%;\n }\n :host .Body .Price {\n display: flex;\n flex-direction: column-reverse;\n margin-top: 0.5rem;\n align-items: start;\n }\n}\n:host .Body.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n}\n:host .Body.iconOnly {\n padding: 0;\n}\n:host .Body.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n}\n:host .Body.is-mini > * {\n flex-direction: column;\n}\n:host .Product {\n font-size: var(--fs-400);\n color: var(--neutral-grey-primary);\n text-decoration: none;\n}\n:host .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n line-height: 1.2;\n}\n:host .Subtitle:hover {\n cursor: pointer;\n}\n:host .OutOfStock, :host .AvailableStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n margin-top: 0.5rem;\n}\n:host .OutOfStock {\n color: var(--jump-card-ecommerce-showcase-out-of-stock-color);\n}\n:host .AvailableStock {\n color: var(--jump-card-ecommerce-showcase-available-color);\n}\n:host .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n column-gap: 0.5rem;\n margin-top: 0;\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n}\n:host .Price > * {\n display: inline-flex;\n}\n:host .Price__Regular {\n text-align: right;\n}\n:host .Price__Regular.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n}\n:host .Price__Sale {\n grid-column: 2;\n grid-row: 2;\n}\n:host .Price__Discount {\n color: var(--jump-card-ecommerce-showcase-discount-color);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n}\n:host .Price.is-mini {\n display: flex;\n font-size: var(--fs-400);\n}';const r=s;const a=class{constructor(o){n(this,o);this.goToProductPage=e(this,"jump-card-go-to-product-page",7);this.hideDiscountIfLessThreshold=undefined;this.badge=undefined;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.availableText=undefined;this.imageObjectFit="cover";this.priceFormatted=undefined;this.salePriceFormatted=undefined}async setPrice(n,e){let o=false;if(n&&n>0){o=true;this.price=n}if(e&&e>0){this.salePrice=e}if(o){this.formatPrices()}}componentDidLoad(){this.formatPrices()}goToProduct(){this.goToProductPage.emit({productId:this.productId,link:this.link})}formatPrices(){var n;let e=(n=document.documentElement.lang)!==null&&n!==void 0?n:"it-IT";if(e.length==2){e=`${e}-${e.toUpperCase()}`}this.priceFormatted=this.price.toLocaleString(e,{minimumFractionDigits:2,maximumFractionDigits:2});this.salePriceFormatted=this.salePrice.toLocaleString(e,{minimumFractionDigits:2,maximumFractionDigits:2})}render(){const n="hasBackground";const e="";const t="";const s="";const r="is-vertical";const a="";function c(n,e){const o=(n-e)/n*100;return o.toFixed(0)}return o(i,{style:{"--image-object-fit":this.imageObjectFit}},o("div",{class:`Media ${e} ${n} ${s}`},this.badge?o("jump-badge",{class:`${n} ${e}`,variant:this.badgeColor,dimension:"small",label:this.badge}):"",this.salePrice&&this.salePrice<this.price&&(this.hideDiscountIfLessThreshold===undefined||parseFloat(c(this.price,this.salePrice))>this.hideDiscountIfLessThreshold)?o("div",{class:"DiscountBadge"},"-",c(this.price,this.salePrice),"%"):null,o("a",{href:this.link},o("figure",{class:`Images ${t} ${a}`},this.img&&o("img",{class:"Images__Front",src:this.img,alt:this.imgAlt})))),o("div",{class:`Content ${n} ${e} ${s} ${r}`},o("div",{class:`Body ${n} ${e} ${s} ${r}`},o("div",{class:"Body__Top"},o("div",{class:"Info"},o("a",{href:this.link,class:"Product"},this.productName),this.subtitle?o("div",{class:"Subtitle",onClick:()=>this.goToProduct()},this.subtitle):null),this.price?o("div",{class:`Price ${s}`},o("div",{class:`Price__Regular ${this.salePrice&&this.salePrice<this.price?"sale":""}`},this.currency,this.priceFormatted),this.salePrice&&this.salePrice<this.price?o("div",{class:"Price__Sale"},this.currency,this.salePriceFormatted):null):null,this.outOfStock?o("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):o("div",{class:"AvailableStock"},this.availableText?this.availableText:"Disponibile")))))}get JumpCardEcommerceShowcase(){return t(this)}};a.style=r;export{a as jump_card_ecommerce_showcase};
|
|
2
|
+
//# sourceMappingURL=p-ef4cf4ec.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpCardEcommerceShowcaseCss","JumpCardEcommerceShowcaseStyle0","JumpCardEcommerceShowcase","undefined","setPrice","price","salePrice","shouldFormat","this","formatPrices","componentDidLoad","goToProduct","goToProductPage","emit","productId","link","locale","_a","document","documentElement","lang","length","toUpperCase","priceFormatted","toLocaleString","minimumFractionDigits","maximumFractionDigits","salePriceFormatted","render","backgroundClass","iconOnlyClass","hasImageOnHover","miniCard","verticalCardClass","enableZoomClass","calculateDiscount","discount","toFixed","h","Host","style","imageObjectFit","class","badge","variant","badgeColor","dimension","label","hideDiscountIfLessThreshold","parseFloat","href","img","src","alt","imgAlt","productName","subtitle","onClick","currency","outOfStock","outOfStockText","availableText"],"sources":["src/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.scss?tag=jump-card-ecommerce-showcase&encapsulation=shadow","src/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-ecommerce-showcase-max-width-horizontal: 100%;\n --jump-card-ecommerce-showcase-color: var(--neutral-grey-primary);\n --jump-card-ecommerce-showcase-background: transparent;\n --jump-card-ecommerce-showcase-border-color: var(--neutral-grey-background);\n --jump-card-ecommerce-showcase-padding: 0.5rem;\n --jump-card-ecommerce-showcase-out-of-stock-color: var(--status-danger-standard);\n --jump-card-ecommerce-showcase-available-color: var(--status-success-standard);\n --jump-card-ecommerce-showcase-discount-color: var(--status-danger-standard);\n --image-object-fit: cover;\n --jump-card-ecommerce-showcase-hide-discover-button-visibility: block;\n --jump-card-ecommerce-showcase-discount-badge-bg-color: var(--neutral-white);\n --jump-card-ecommerce-showcase-discount-badge-text-color: var(--primary-standard);\n --jump-card-ecommerce-showcase-discount-badge-padding: 4px 12px;\n --jump-card-ecommerce-showcase-discount-badge-border-radius: 50px;\n\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-ecommerce-showcase-background);\n color: var(--jump-card-ecommerce-showcase-color);\n\n .DiscountBadge {\n position: absolute;\n bottom: 1rem;\n right: 0.2rem;\n z-index: 2;\n border: 2px solid var(--jump-card-ecommerce-showcase-discount-badge-text-color);\n color: var(--jump-card-ecommerce-showcase-discount-badge-text-color);\n background-color: var(--jump-card-ecommerce-showcase-discount-badge-bg-color);\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n padding: var(--jump-card-ecommerce-showcase-discount-badge-padding);\n border-radius: var(--jump-card-ecommerce-showcase-discount-badge-border-radius);\n line-height: 1.2;\n }\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n .Footer {\n container-type: inline-size;\n flex-direction: row;\n\n @container (max-width: 239px) {\n flex-direction: column;\n\n .OutOfStock {\n margin-bottom: 0.25rem;\n }\n\n }\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n }\n\n .Media {\n container-type: inline-size;\n\n @container (max-width: 239px) {\n jump-badge {\n top: auto;\n bottom: 1rem;\n left: 0.2rem;\n right: auto;\n }\n }\n }\n\n\n .Media {\n // aspect-ratio: 3/4;\n overflow: hidden;\n position: relative;\n border-radius: 3px;\n aspect-ratio: 1/1;\n\n .Images {\n height: 100%;\n margin: 0;\n position: relative;\n\n img {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n object-fit: var(--image-object-fit, cover);\n }\n\n &__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n }\n\n \n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n\n &.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-ecommerce-showcase-padding) var(--jump-card-ecommerce-showcase-padding) 0;\n\n img {\n border-radius: 6px;\n }\n }\n }\n\n &.iconOnly {\n border-bottom-right-radius: 0;\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .Content {\n container-type: inline-size;\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n\n @container (max-width: 239px) {\n flex-direction: row;\n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-ecommerce-showcase-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-ecommerce-showcase-padding) * 2) var(--jump-card-ecommerce-showcase-padding);\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-ecommerce-showcase-padding) 0;\n container-type: inline-size;\n\n & > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n & > * {\n flex: 0 1 auto;\n }\n }\n\n .Body__Top {\n display: flex;\n flex-direction: row;\n }\n\n .Body__Bottom {\n display: flex;\n flex-direction: row;\n }\n \n &.is-vertical {\n .Body__Top {\n flex-direction: column;\n align-items: flex-start;\n \n .Subtitle {\n min-height: 3.5rem;\n }\n\n @container (max-width: 239px) {\n .Subtitle {\n min-height: 3.2rem;\n }\n }\n }\n\n .Price {\n justify-items: start;\n margin-top: 0.5rem;\n column-gap: 0;\n display: flex;\n flex-direction: column-reverse;\n align-items: flex-start;\n }\n\n }\n\n @container (max-width: 239px) {\n .Body__Top {\n flex-direction: column;\n }\n\n .Body__Bottom {\n flex-direction: column;\n }\n\n .SelectVariations {\n max-width: 100%;\n margin-bottom: 0.5rem;\n\n select {\n width: 100%;\n }\n }\n\n .Price {\n display: flex;\n flex-direction: column-reverse;\n margin-top: 0.5rem;\n align-items: start;\n }\n }\n\n &.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n & > * {\n flex-direction: column;\n }\n\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n }\n\n .Product {\n font-size: var(--fs-400);\n color: var(--neutral-grey-primary);\n text-decoration: none;\n }\n\n .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n line-height: 1.2;\n }\n\n .Subtitle:hover {\n cursor: pointer;\n }\n\n .OutOfStock, .AvailableStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n margin-top: 0.5rem;\n }\n\n .OutOfStock {\n color: var(--jump-card-ecommerce-showcase-out-of-stock-color);\n }\n\n .AvailableStock {\n color: var(--jump-card-ecommerce-showcase-available-color);\n }\n\n .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n column-gap: 0.5rem;\n margin-top: 0;\n \n\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n\n & > * {\n display: inline-flex;\n }\n\n &__Regular {\n text-align: right;\n\n &.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n }\n }\n\n &__Sale {\n grid-column: 2;\n grid-row: 2;\n }\n\n &__Discount {\n color: var(--jump-card-ecommerce-showcase-discount-color);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n }\n\n &.is-mini {\n display: flex;\n font-size: var(--fs-400);\n }\n }\n}","import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Method } from '@stencil/core';\n\n@Component({\n tag: 'jump-card-ecommerce-showcase',\n styleUrl: 'jump-card-ecommerce-showcase.scss',\n shadow: true,\n})\nexport class JumpCardEcommerceShowcase {\n\n @Element() JumpCardEcommerceShowcase: HTMLElement;\n jumpQuantityEl;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicates the threshold below which the discount will be hidden */\n @Prop() hideDiscountIfLessThreshold: number = undefined;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the title of the card*/\n @Prop() productName: string;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string = '€';\n\n /** Indicates the variant of the button */\n @Prop() badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger' = 'secondary';\n\n /** Indicates if the product is outOfStock */\n @Prop({ mutable: true, reflect: true }) outOfStock: boolean = false;\n\n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n @Prop() availableText: string;\n \n /** Controlla il comportamento dell'object-fit delle immagini */\n @Prop() imageObjectFit: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none' = 'cover';\n\n \n\n\n /* ---------------------- @STATE ------------------------- */\n\n @State() priceFormatted: string;\n\n @State() salePriceFormatted: string;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-card-go-to-product-page' }) goToProductPage: EventEmitter;\n\n /**\n * Set the price of the product\n * @param price\n * @param salePrice\n */\n @Method()\n async setPrice(price: number, salePrice: number) {\n let shouldFormat = false;\n if (price && price > 0) {\n shouldFormat = true;\n this.price = price;\n }\n\n if (salePrice && salePrice > 0) {\n this.salePrice = salePrice;\n }\n\n if (shouldFormat) {\n this.formatPrices();\n }\n }\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentDidLoad() {\n this.formatPrices();\n }\n\n /* ---------------------- @METHODS ------------------------- */\n\n goToProduct(){\n this.goToProductPage.emit({\n productId: this.productId,\n link: this.link,\n });\n }\n\n formatPrices() {\n let locale = document.documentElement.lang ?? 'it-IT';\n if (locale.length == 2) {\n locale = `${locale}-${locale.toUpperCase()}`;\n }\n\n // Format price with 2 decimal digits and in locale\n this.priceFormatted = this.price.toLocaleString(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n this.salePriceFormatted = this.salePrice.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n }\n\n render() {\n const backgroundClass = 'hasBackground';\n const iconOnlyClass = '';\n\n const hasImageOnHover = '';\n const miniCard = '';\n const verticalCardClass = 'is-vertical';\n const enableZoomClass = '';\n\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host style={{'--image-object-fit': this.imageObjectFit}}>\n\n <div\n class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}\n >\n {this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n \n {this.salePrice && (this.salePrice < this.price) && (this.hideDiscountIfLessThreshold === undefined || parseFloat(calculateDiscount(this.price, this.salePrice)) > this.hideDiscountIfLessThreshold) ?\n <div class=\"DiscountBadge\">-{calculateDiscount(this.price, this.salePrice)}%</div> : null}\n\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} ${enableZoomClass}`}>\n {this.img && <img class=\"Images__Front\" src={this.img} alt={this.imgAlt}></img> }\n \n </figure>\n </a>\n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard} ${verticalCardClass}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard} ${verticalCardClass}`}>\n <div class=\"Body__Top\">\n <div class=\"Info\">\n <a href={this.link} class=\"Product\">{this.productName}</a>\n {this.subtitle ? <div class=\"Subtitle\" onClick={() => this.goToProduct()}>{this.subtitle}</div> : null}\n </div>\n\n {this.price ?\n <div class={`Price ${miniCard}`}>\n <div class={`Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}`}>\n {this.currency}{this.priceFormatted}\n </div>\n \n {this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Sale\">{this.currency}{this.salePriceFormatted}</div>\n : null}\n </div>\n : null}\n \n {this.outOfStock ?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : <div class=\"AvailableStock\">{this.availableText ? this.availableText : 'Disponibile'}</div>}\n\n </div>\n </div>\n\n \n </div>\n </Host>\n );\n }\n\n}"],"mappings":"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"}
|
|
@@ -568,6 +568,116 @@
|
|
|
568
568
|
}
|
|
569
569
|
]
|
|
570
570
|
},
|
|
571
|
+
{
|
|
572
|
+
"name": "jump-card-ecommerce-showcase",
|
|
573
|
+
"description": {
|
|
574
|
+
"kind": "markdown",
|
|
575
|
+
"value": ""
|
|
576
|
+
},
|
|
577
|
+
"attributes": [
|
|
578
|
+
{
|
|
579
|
+
"name": "available-text",
|
|
580
|
+
"description": ""
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "badge",
|
|
584
|
+
"description": "Indicates the badge of the card"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "badge-color",
|
|
588
|
+
"description": "Indicates the variant of the button",
|
|
589
|
+
"values": [
|
|
590
|
+
{
|
|
591
|
+
"name": "danger"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "neutral"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "primary"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "secondary"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "success"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"name": "warning"
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"name": "currency",
|
|
612
|
+
"description": "Indicates the currency of the card"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "hide-discount-if-less-threshold",
|
|
616
|
+
"description": "Indicates the threshold below which the discount will be hidden"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "image-object-fit",
|
|
620
|
+
"description": "Controlla il comportamento dell'object-fit delle immagini",
|
|
621
|
+
"values": [
|
|
622
|
+
{
|
|
623
|
+
"name": "contain"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "cover"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
"name": "fill"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "none"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "scale-down"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "img",
|
|
641
|
+
"description": "Indicates the image's src of the card"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "img-alt",
|
|
645
|
+
"description": "Indicates the img's alt of the card"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "link",
|
|
649
|
+
"description": "Indicates the link of the card"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "out-of-stock",
|
|
653
|
+
"description": "Indicates if the product is outOfStock"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"name": "out-of-stock-text",
|
|
657
|
+
"description": "Indicates the outOfStockText of the product"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"name": "price",
|
|
661
|
+
"description": "Indicates the price of the card"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "product-id",
|
|
665
|
+
"description": "Indicates the ID of the product, can be also a SKU"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"name": "product-name",
|
|
669
|
+
"description": "Indicates the title of the card"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"name": "sale-price",
|
|
673
|
+
"description": "Indicates the sale price of the card"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"name": "subtitle",
|
|
677
|
+
"description": "Indicates the subtitle of the card"
|
|
678
|
+
}
|
|
679
|
+
]
|
|
680
|
+
},
|
|
571
681
|
{
|
|
572
682
|
"name": "jump-filter",
|
|
573
683
|
"description": {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class JumpCardEcommerceShowcase {
|
|
3
|
+
JumpCardEcommerceShowcase: HTMLElement;
|
|
4
|
+
jumpQuantityEl: any;
|
|
5
|
+
/** Indicates the threshold below which the discount will be hidden */
|
|
6
|
+
hideDiscountIfLessThreshold: number;
|
|
7
|
+
/** Indicates the badge of the card*/
|
|
8
|
+
badge: string;
|
|
9
|
+
/** Indicates the link of the card*/
|
|
10
|
+
link: string;
|
|
11
|
+
/** Indicates the image's src of the card*/
|
|
12
|
+
img: string;
|
|
13
|
+
/** Indicates the img's alt of the card*/
|
|
14
|
+
imgAlt: string;
|
|
15
|
+
/** Indicates the title of the card*/
|
|
16
|
+
productName: string;
|
|
17
|
+
/** Indicates the subtitle of the card*/
|
|
18
|
+
subtitle: string;
|
|
19
|
+
/** Indicates the ID of the product, can be also a SKU*/
|
|
20
|
+
productId: string;
|
|
21
|
+
/** Indicates the price of the card */
|
|
22
|
+
price: number;
|
|
23
|
+
/** Indicates the sale price of the card */
|
|
24
|
+
salePrice: number;
|
|
25
|
+
/** Indicates the currency of the card */
|
|
26
|
+
currency: string;
|
|
27
|
+
/** Indicates the variant of the button */
|
|
28
|
+
badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger';
|
|
29
|
+
/** Indicates if the product is outOfStock */
|
|
30
|
+
outOfStock: boolean;
|
|
31
|
+
/** Indicates the outOfStockText of the product*/
|
|
32
|
+
outOfStockText: string;
|
|
33
|
+
availableText: string;
|
|
34
|
+
/** Controlla il comportamento dell'object-fit delle immagini */
|
|
35
|
+
imageObjectFit: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none';
|
|
36
|
+
priceFormatted: string;
|
|
37
|
+
salePriceFormatted: string;
|
|
38
|
+
goToProductPage: EventEmitter;
|
|
39
|
+
/**
|
|
40
|
+
* Set the price of the product
|
|
41
|
+
* @param price
|
|
42
|
+
* @param salePrice
|
|
43
|
+
*/
|
|
44
|
+
setPrice(price: number, salePrice: number): Promise<void>;
|
|
45
|
+
componentDidLoad(): void;
|
|
46
|
+
goToProduct(): void;
|
|
47
|
+
formatPrices(): void;
|
|
48
|
+
render(): any;
|
|
49
|
+
}
|
package/dist/types/components/jump-card-ecommerce-showcase/jump-card-ecommerce-showcase.stories.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
tags: string[];
|
|
4
|
+
argTypes: {
|
|
5
|
+
verticalCard: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
control: string;
|
|
9
|
+
defaultValue: boolean;
|
|
10
|
+
};
|
|
11
|
+
badge: {
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
control: string;
|
|
15
|
+
};
|
|
16
|
+
link: {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
control: string;
|
|
20
|
+
};
|
|
21
|
+
img: {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
control: string;
|
|
25
|
+
defaultValue: string;
|
|
26
|
+
if: {
|
|
27
|
+
arg: string;
|
|
28
|
+
exists: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
imgAlt: {
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
control: string;
|
|
35
|
+
if: {
|
|
36
|
+
arg: string;
|
|
37
|
+
exists: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
hoverImg: {
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
control: string;
|
|
44
|
+
defaultValue: string;
|
|
45
|
+
if: {
|
|
46
|
+
arg: string;
|
|
47
|
+
exists: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
productName: {
|
|
51
|
+
name: string;
|
|
52
|
+
description: string;
|
|
53
|
+
control: string;
|
|
54
|
+
};
|
|
55
|
+
subtitle: {
|
|
56
|
+
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
control: string;
|
|
59
|
+
};
|
|
60
|
+
productId: {
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
control: string;
|
|
64
|
+
};
|
|
65
|
+
price: {
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
control: string;
|
|
69
|
+
};
|
|
70
|
+
salePrice: {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
control: string;
|
|
74
|
+
};
|
|
75
|
+
hideDiscountIfLessThreshold: {
|
|
76
|
+
name: string;
|
|
77
|
+
description: string;
|
|
78
|
+
control: string;
|
|
79
|
+
};
|
|
80
|
+
badgeColor: {
|
|
81
|
+
name: string;
|
|
82
|
+
description: string;
|
|
83
|
+
control: string;
|
|
84
|
+
options: string[];
|
|
85
|
+
};
|
|
86
|
+
outOfStock: {
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
control: string;
|
|
90
|
+
defaultValue: boolean;
|
|
91
|
+
};
|
|
92
|
+
outOfStockText: {
|
|
93
|
+
name: string;
|
|
94
|
+
description: string;
|
|
95
|
+
control: string;
|
|
96
|
+
};
|
|
97
|
+
availableText: {
|
|
98
|
+
name: string;
|
|
99
|
+
description: string;
|
|
100
|
+
control: string;
|
|
101
|
+
};
|
|
102
|
+
imageObjectFit: {
|
|
103
|
+
name: string;
|
|
104
|
+
description: string;
|
|
105
|
+
control: string;
|
|
106
|
+
options: string[];
|
|
107
|
+
defaultValue: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export default _default;
|
|
112
|
+
export declare const Card: any;
|
|
@@ -342,6 +342,75 @@ export namespace Components {
|
|
|
342
342
|
"sku": string;
|
|
343
343
|
"taxonomy": string;
|
|
344
344
|
}
|
|
345
|
+
interface JumpCardEcommerceShowcase {
|
|
346
|
+
"availableText": string;
|
|
347
|
+
/**
|
|
348
|
+
* Indicates the badge of the card
|
|
349
|
+
*/
|
|
350
|
+
"badge": string;
|
|
351
|
+
/**
|
|
352
|
+
* Indicates the variant of the button
|
|
353
|
+
*/
|
|
354
|
+
"badgeColor": 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger';
|
|
355
|
+
/**
|
|
356
|
+
* Indicates the currency of the card
|
|
357
|
+
*/
|
|
358
|
+
"currency": string;
|
|
359
|
+
/**
|
|
360
|
+
* Indicates the threshold below which the discount will be hidden
|
|
361
|
+
*/
|
|
362
|
+
"hideDiscountIfLessThreshold": number;
|
|
363
|
+
/**
|
|
364
|
+
* Controlla il comportamento dell'object-fit delle immagini
|
|
365
|
+
*/
|
|
366
|
+
"imageObjectFit": 'cover' | 'scale-down' | 'contain' | 'fill' | 'none';
|
|
367
|
+
/**
|
|
368
|
+
* Indicates the image's src of the card
|
|
369
|
+
*/
|
|
370
|
+
"img": string;
|
|
371
|
+
/**
|
|
372
|
+
* Indicates the img's alt of the card
|
|
373
|
+
*/
|
|
374
|
+
"imgAlt": string;
|
|
375
|
+
/**
|
|
376
|
+
* Indicates the link of the card
|
|
377
|
+
*/
|
|
378
|
+
"link": string;
|
|
379
|
+
/**
|
|
380
|
+
* Indicates if the product is outOfStock
|
|
381
|
+
*/
|
|
382
|
+
"outOfStock": boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Indicates the outOfStockText of the product
|
|
385
|
+
*/
|
|
386
|
+
"outOfStockText": string;
|
|
387
|
+
/**
|
|
388
|
+
* Indicates the price of the card
|
|
389
|
+
*/
|
|
390
|
+
"price": number;
|
|
391
|
+
/**
|
|
392
|
+
* Indicates the ID of the product, can be also a SKU
|
|
393
|
+
*/
|
|
394
|
+
"productId": string;
|
|
395
|
+
/**
|
|
396
|
+
* Indicates the title of the card
|
|
397
|
+
*/
|
|
398
|
+
"productName": string;
|
|
399
|
+
/**
|
|
400
|
+
* Indicates the sale price of the card
|
|
401
|
+
*/
|
|
402
|
+
"salePrice": number;
|
|
403
|
+
/**
|
|
404
|
+
* Set the price of the product
|
|
405
|
+
* @param price
|
|
406
|
+
* @param salePrice
|
|
407
|
+
*/
|
|
408
|
+
"setPrice": (price: number, salePrice: number) => Promise<void>;
|
|
409
|
+
/**
|
|
410
|
+
* Indicates the subtitle of the card
|
|
411
|
+
*/
|
|
412
|
+
"subtitle": string;
|
|
413
|
+
}
|
|
345
414
|
interface JumpFilter {
|
|
346
415
|
"direction": 'horizontal' | 'vertical';
|
|
347
416
|
"filterButtonIcon": string;
|
|
@@ -784,6 +853,10 @@ export interface JumpCardEcommerceOptionCustomEvent<T> extends CustomEvent<T> {
|
|
|
784
853
|
detail: T;
|
|
785
854
|
target: HTMLJumpCardEcommerceOptionElement;
|
|
786
855
|
}
|
|
856
|
+
export interface JumpCardEcommerceShowcaseCustomEvent<T> extends CustomEvent<T> {
|
|
857
|
+
detail: T;
|
|
858
|
+
target: HTMLJumpCardEcommerceShowcaseElement;
|
|
859
|
+
}
|
|
787
860
|
export interface JumpFilterCheckboxCustomEvent<T> extends CustomEvent<T> {
|
|
788
861
|
detail: T;
|
|
789
862
|
target: HTMLJumpFilterCheckboxElement;
|
|
@@ -924,6 +997,23 @@ declare global {
|
|
|
924
997
|
prototype: HTMLJumpCardEcommerceOptionElement;
|
|
925
998
|
new (): HTMLJumpCardEcommerceOptionElement;
|
|
926
999
|
};
|
|
1000
|
+
interface HTMLJumpCardEcommerceShowcaseElementEventMap {
|
|
1001
|
+
"jump-card-go-to-product-page": any;
|
|
1002
|
+
}
|
|
1003
|
+
interface HTMLJumpCardEcommerceShowcaseElement extends Components.JumpCardEcommerceShowcase, HTMLStencilElement {
|
|
1004
|
+
addEventListener<K extends keyof HTMLJumpCardEcommerceShowcaseElementEventMap>(type: K, listener: (this: HTMLJumpCardEcommerceShowcaseElement, ev: JumpCardEcommerceShowcaseCustomEvent<HTMLJumpCardEcommerceShowcaseElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1005
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1006
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1007
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1008
|
+
removeEventListener<K extends keyof HTMLJumpCardEcommerceShowcaseElementEventMap>(type: K, listener: (this: HTMLJumpCardEcommerceShowcaseElement, ev: JumpCardEcommerceShowcaseCustomEvent<HTMLJumpCardEcommerceShowcaseElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1009
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1010
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1011
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1012
|
+
}
|
|
1013
|
+
var HTMLJumpCardEcommerceShowcaseElement: {
|
|
1014
|
+
prototype: HTMLJumpCardEcommerceShowcaseElement;
|
|
1015
|
+
new (): HTMLJumpCardEcommerceShowcaseElement;
|
|
1016
|
+
};
|
|
927
1017
|
interface HTMLJumpFilterElement extends Components.JumpFilter, HTMLStencilElement {
|
|
928
1018
|
}
|
|
929
1019
|
var HTMLJumpFilterElement: {
|
|
@@ -1238,6 +1328,7 @@ declare global {
|
|
|
1238
1328
|
"jump-card": HTMLJumpCardElement;
|
|
1239
1329
|
"jump-card-ecommerce": HTMLJumpCardEcommerceElement;
|
|
1240
1330
|
"jump-card-ecommerce-option": HTMLJumpCardEcommerceOptionElement;
|
|
1331
|
+
"jump-card-ecommerce-showcase": HTMLJumpCardEcommerceShowcaseElement;
|
|
1241
1332
|
"jump-filter": HTMLJumpFilterElement;
|
|
1242
1333
|
"jump-filter-checkbox": HTMLJumpFilterCheckboxElement;
|
|
1243
1334
|
"jump-filter-range": HTMLJumpFilterRangeElement;
|
|
@@ -1578,6 +1669,70 @@ declare namespace LocalJSX {
|
|
|
1578
1669
|
"sku"?: string;
|
|
1579
1670
|
"taxonomy"?: string;
|
|
1580
1671
|
}
|
|
1672
|
+
interface JumpCardEcommerceShowcase {
|
|
1673
|
+
"availableText"?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Indicates the badge of the card
|
|
1676
|
+
*/
|
|
1677
|
+
"badge"?: string;
|
|
1678
|
+
/**
|
|
1679
|
+
* Indicates the variant of the button
|
|
1680
|
+
*/
|
|
1681
|
+
"badgeColor"?: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger';
|
|
1682
|
+
/**
|
|
1683
|
+
* Indicates the currency of the card
|
|
1684
|
+
*/
|
|
1685
|
+
"currency"?: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* Indicates the threshold below which the discount will be hidden
|
|
1688
|
+
*/
|
|
1689
|
+
"hideDiscountIfLessThreshold"?: number;
|
|
1690
|
+
/**
|
|
1691
|
+
* Controlla il comportamento dell'object-fit delle immagini
|
|
1692
|
+
*/
|
|
1693
|
+
"imageObjectFit"?: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none';
|
|
1694
|
+
/**
|
|
1695
|
+
* Indicates the image's src of the card
|
|
1696
|
+
*/
|
|
1697
|
+
"img"?: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* Indicates the img's alt of the card
|
|
1700
|
+
*/
|
|
1701
|
+
"imgAlt"?: string;
|
|
1702
|
+
/**
|
|
1703
|
+
* Indicates the link of the card
|
|
1704
|
+
*/
|
|
1705
|
+
"link"?: string;
|
|
1706
|
+
"onJump-card-go-to-product-page"?: (event: JumpCardEcommerceShowcaseCustomEvent<any>) => void;
|
|
1707
|
+
/**
|
|
1708
|
+
* Indicates if the product is outOfStock
|
|
1709
|
+
*/
|
|
1710
|
+
"outOfStock"?: boolean;
|
|
1711
|
+
/**
|
|
1712
|
+
* Indicates the outOfStockText of the product
|
|
1713
|
+
*/
|
|
1714
|
+
"outOfStockText"?: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* Indicates the price of the card
|
|
1717
|
+
*/
|
|
1718
|
+
"price"?: number;
|
|
1719
|
+
/**
|
|
1720
|
+
* Indicates the ID of the product, can be also a SKU
|
|
1721
|
+
*/
|
|
1722
|
+
"productId"?: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* Indicates the title of the card
|
|
1725
|
+
*/
|
|
1726
|
+
"productName"?: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Indicates the sale price of the card
|
|
1729
|
+
*/
|
|
1730
|
+
"salePrice"?: number;
|
|
1731
|
+
/**
|
|
1732
|
+
* Indicates the subtitle of the card
|
|
1733
|
+
*/
|
|
1734
|
+
"subtitle"?: string;
|
|
1735
|
+
}
|
|
1581
1736
|
interface JumpFilter {
|
|
1582
1737
|
"direction"?: 'horizontal' | 'vertical';
|
|
1583
1738
|
"filterButtonIcon"?: string;
|
|
@@ -1999,6 +2154,7 @@ declare namespace LocalJSX {
|
|
|
1999
2154
|
"jump-card": JumpCard;
|
|
2000
2155
|
"jump-card-ecommerce": JumpCardEcommerce;
|
|
2001
2156
|
"jump-card-ecommerce-option": JumpCardEcommerceOption;
|
|
2157
|
+
"jump-card-ecommerce-showcase": JumpCardEcommerceShowcase;
|
|
2002
2158
|
"jump-filter": JumpFilter;
|
|
2003
2159
|
"jump-filter-checkbox": JumpFilterCheckbox;
|
|
2004
2160
|
"jump-filter-range": JumpFilterRange;
|
|
@@ -2032,6 +2188,7 @@ declare module "@stencil/core" {
|
|
|
2032
2188
|
"jump-card": LocalJSX.JumpCard & JSXBase.HTMLAttributes<HTMLJumpCardElement>;
|
|
2033
2189
|
"jump-card-ecommerce": LocalJSX.JumpCardEcommerce & JSXBase.HTMLAttributes<HTMLJumpCardEcommerceElement>;
|
|
2034
2190
|
"jump-card-ecommerce-option": LocalJSX.JumpCardEcommerceOption & JSXBase.HTMLAttributes<HTMLJumpCardEcommerceOptionElement>;
|
|
2191
|
+
"jump-card-ecommerce-showcase": LocalJSX.JumpCardEcommerceShowcase & JSXBase.HTMLAttributes<HTMLJumpCardEcommerceShowcaseElement>;
|
|
2035
2192
|
"jump-filter": LocalJSX.JumpFilter & JSXBase.HTMLAttributes<HTMLJumpFilterElement>;
|
|
2036
2193
|
"jump-filter-checkbox": LocalJSX.JumpFilterCheckbox & JSXBase.HTMLAttributes<HTMLJumpFilterCheckboxElement>;
|
|
2037
2194
|
"jump-filter-range": LocalJSX.JumpFilterRange & JSXBase.HTMLAttributes<HTMLJumpFilterRangeElement>;
|