@jumpgroup/jump-design-system 0.3.55 → 0.3.57

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.
@@ -1 +1 @@
1
- {"version":3,"names":["details_styles_default","css","defaultAnimationRegistry","Map","customAnimationRegistry","WeakMap","ensureAnimation","animation","keyframes","options","duration","getLogicalAnimation","dir","toLowerCase","rtlKeyframes","setDefaultAnimation","animationName","set","getAnimation","el","customAnimation","get","defaultAnimation","waitForEvent","eventName","Promise","resolve","done","event","target","removeEventListener","addEventListener","animateTo","Infinity","Error","animate","__spreadProps","__spreadValues","prefersReducedMotion","once","query","window","matchMedia","matches","stopAnimations","all","getAnimations","map","cancel","requestAnimationFrame","shimKeyframesHeightAuto","calculatedHeight","keyframe","height","connectedElements","Set","documentElementObserver","MutationObserver","update","translations","documentDirection","document","documentElement","documentLanguage","lang","navigator","language","fallback","observe","attributes","attributeFilter","registerTranslation","translation","t","code","$code","has","Object","assign","keys","requestUpdate","LocalizeController","constructor","host","this","addController","hostConnected","add","hostDisconnected","delete","getTranslationData","_a","_b","locale","Intl","Locale","replace","region","primary","secondary","exists","key","includeFallback","term","args","console","error","String","date","dateToFormat","Date","DateTimeFormat","format","number","numberToFormat","Number","isNaN","NumberFormat","relativeTime","value","unit","RelativeTimeFormat","$name","$dir","carousel","clearEntry","close","copied","copy","currentValue","goToSlide","slide","count","hidePassword","loading","nextSlide","numOptionsSelected","num","previousSlide","progress","remove","resize","scrollToEnd","scrollToStart","selectAColorFromTheScreen","showPassword","slideNum","toggleColorFormat","en_default","DefaultLocalizationController","SlDetails","ShoelaceElement","super","arguments","localize","open","disabled","firstUpdated","body","style","details","detailsObserver","changes","change","type","attributeName","show","hide","disconnectedCallback","disconnect","handleSummaryClick","preventDefault","header","focus","handleSummaryKeyDown","handleOpenChange","slShow","emit","cancelable","defaultPrevented","scrollHeight","slHide","render","isRtl","html","classMap","summary","styles","component_styles_default","dependencies","SlIcon","__decorateClass","prototype","property","Boolean","reflect","watch","waitUntilFirstUpdate","opacity","easing","define","jumpAccordionCss","JumpAccordionStyle0","JumpAccordion","handleShow","jumpAccordionOpen","renderIcons","icon","h","library","category","name","size","slot","Host","class","id","identifier"],"sources":["node_modules/@shoelace-style/shoelace/dist/chunks/chunk.J7PLVEQM.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DHU6MIVB.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B4BZKR24.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LHI6QEL2.js","node_modules/@shoelace-style/localize/dist/index.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLV3FVBR.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NTUEQTVT.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MU3U6YPN.js","src/components/jump-accordion/jump-accordion.scss?tag=jump-accordion&encapsulation=shadow","src/components/jump-accordion/jump-accordion.tsx"],"sourcesContent":["// src/components/details/details.styles.ts\nimport { css } from \"lit\";\nvar details_styles_default = css`\n :host {\n display: block;\n }\n\n .details {\n border: solid 1px var(--sl-color-neutral-200);\n border-radius: var(--sl-border-radius-medium);\n background-color: var(--sl-color-neutral-0);\n overflow-anchor: none;\n }\n\n .details--disabled {\n opacity: 0.5;\n }\n\n .details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--sl-spacing-medium);\n user-select: none;\n -webkit-user-select: none;\n cursor: pointer;\n }\n\n .details__header::-webkit-details-marker {\n display: none;\n }\n\n .details__header:focus {\n outline: none;\n }\n\n .details__header:focus-visible {\n outline: var(--sl-focus-ring);\n outline-offset: calc(1px + var(--sl-focus-ring-offset));\n }\n\n .details--disabled .details__header {\n cursor: not-allowed;\n }\n\n .details--disabled .details__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n }\n\n .details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: var(--sl-transition-medium) rotate ease;\n }\n\n .details--open .details__summary-icon {\n rotate: 90deg;\n }\n\n .details--open.details--rtl .details__summary-icon {\n rotate: -90deg;\n }\n\n .details--open slot[name='expand-icon'],\n .details:not(.details--open) slot[name='collapse-icon'] {\n display: none;\n }\n\n .details__body {\n overflow: hidden;\n }\n\n .details__content {\n display: block;\n padding: var(--sl-spacing-medium);\n }\n`;\n\nexport {\n details_styles_default\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/utilities/animation-registry.ts\nvar defaultAnimationRegistry = /* @__PURE__ */ new Map();\nvar customAnimationRegistry = /* @__PURE__ */ new WeakMap();\nfunction ensureAnimation(animation) {\n return animation != null ? animation : { keyframes: [], options: { duration: 0 } };\n}\nfunction getLogicalAnimation(animation, dir) {\n if (dir.toLowerCase() === \"rtl\") {\n return {\n keyframes: animation.rtlKeyframes || animation.keyframes,\n options: animation.options\n };\n }\n return animation;\n}\nfunction setDefaultAnimation(animationName, animation) {\n defaultAnimationRegistry.set(animationName, ensureAnimation(animation));\n}\nfunction setAnimation(el, animationName, animation) {\n customAnimationRegistry.set(el, __spreadProps(__spreadValues({}, customAnimationRegistry.get(el)), { [animationName]: ensureAnimation(animation) }));\n}\nfunction getAnimation(el, animationName, options) {\n const customAnimation = customAnimationRegistry.get(el);\n if (customAnimation == null ? void 0 : customAnimation[animationName]) {\n return getLogicalAnimation(customAnimation[animationName], options.dir);\n }\n const defaultAnimation = defaultAnimationRegistry.get(animationName);\n if (defaultAnimation) {\n return getLogicalAnimation(defaultAnimation, options.dir);\n }\n return {\n keyframes: [],\n options: { duration: 0 }\n };\n}\n\nexport {\n setDefaultAnimation,\n setAnimation,\n getAnimation\n};\n","// src/internal/event.ts\nfunction waitForEvent(el, eventName) {\n return new Promise((resolve) => {\n function done(event) {\n if (event.target === el) {\n el.removeEventListener(eventName, done);\n resolve();\n }\n }\n el.addEventListener(eventName, done);\n });\n}\n\nexport {\n waitForEvent\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/internal/animate.ts\nfunction animateTo(el, keyframes, options) {\n return new Promise((resolve) => {\n if ((options == null ? void 0 : options.duration) === Infinity) {\n throw new Error(\"Promise-based animations must be finite.\");\n }\n const animation = el.animate(keyframes, __spreadProps(__spreadValues({}, options), {\n duration: prefersReducedMotion() ? 0 : options.duration\n }));\n animation.addEventListener(\"cancel\", resolve, { once: true });\n animation.addEventListener(\"finish\", resolve, { once: true });\n });\n}\nfunction parseDuration(delay) {\n delay = delay.toString().toLowerCase();\n if (delay.indexOf(\"ms\") > -1) {\n return parseFloat(delay);\n }\n if (delay.indexOf(\"s\") > -1) {\n return parseFloat(delay) * 1e3;\n }\n return parseFloat(delay);\n}\nfunction prefersReducedMotion() {\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n return query.matches;\n}\nfunction stopAnimations(el) {\n return Promise.all(\n el.getAnimations().map((animation) => {\n return new Promise((resolve) => {\n animation.cancel();\n requestAnimationFrame(resolve);\n });\n })\n );\n}\nfunction shimKeyframesHeightAuto(keyframes, calculatedHeight) {\n return keyframes.map((keyframe) => __spreadProps(__spreadValues({}, keyframe), {\n height: keyframe.height === \"auto\" ? `${calculatedHeight}px` : keyframe.height\n }));\n}\n\nexport {\n animateTo,\n parseDuration,\n prefersReducedMotion,\n stopAnimations,\n shimKeyframesHeightAuto\n};\n","const connectedElements = new Set();\nconst documentElementObserver = new MutationObserver(update);\nconst translations = new Map();\nlet documentDirection = document.documentElement.dir || 'ltr';\nlet documentLanguage = document.documentElement.lang || navigator.language;\nlet fallback;\ndocumentElementObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang']\n});\nexport function registerTranslation(...translation) {\n translation.map(t => {\n const code = t.$code.toLowerCase();\n if (translations.has(code)) {\n translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t));\n }\n else {\n translations.set(code, t);\n }\n if (!fallback) {\n fallback = t;\n }\n });\n update();\n}\nexport function update() {\n documentDirection = document.documentElement.dir || 'ltr';\n documentLanguage = document.documentElement.lang || navigator.language;\n [...connectedElements.keys()].map((el) => {\n if (typeof el.requestUpdate === 'function') {\n el.requestUpdate();\n }\n });\n}\nexport class LocalizeController {\n constructor(host) {\n this.host = host;\n this.host.addController(this);\n }\n hostConnected() {\n connectedElements.add(this.host);\n }\n hostDisconnected() {\n connectedElements.delete(this.host);\n }\n dir() {\n return `${this.host.dir || documentDirection}`.toLowerCase();\n }\n lang() {\n return `${this.host.lang || documentLanguage}`.toLowerCase();\n }\n getTranslationData(lang) {\n var _a, _b;\n const locale = new Intl.Locale(lang.replace(/_/g, '-'));\n const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();\n const region = (_b = (_a = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';\n const primary = translations.get(`${language}-${region}`);\n const secondary = translations.get(language);\n return { locale, language, region, primary, secondary };\n }\n exists(key, options) {\n var _a;\n const { primary, secondary } = this.getTranslationData((_a = options.lang) !== null && _a !== void 0 ? _a : this.lang());\n options = Object.assign({ includeFallback: false }, options);\n if ((primary && primary[key]) ||\n (secondary && secondary[key]) ||\n (options.includeFallback && fallback && fallback[key])) {\n return true;\n }\n return false;\n }\n term(key, ...args) {\n const { primary, secondary } = this.getTranslationData(this.lang());\n let term;\n if (primary && primary[key]) {\n term = primary[key];\n }\n else if (secondary && secondary[key]) {\n term = secondary[key];\n }\n else if (fallback && fallback[key]) {\n term = fallback[key];\n }\n else {\n console.error(`No translation found for: ${String(key)}`);\n return String(key);\n }\n if (typeof term === 'function') {\n return term(...args);\n }\n return term;\n }\n date(dateToFormat, options) {\n dateToFormat = new Date(dateToFormat);\n return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat);\n }\n number(numberToFormat, options) {\n numberToFormat = Number(numberToFormat);\n return isNaN(numberToFormat) ? '' : new Intl.NumberFormat(this.lang(), options).format(numberToFormat);\n }\n relativeTime(value, unit, options) {\n return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit);\n }\n}\n","// src/translations/en.ts\nimport { registerTranslation } from \"@shoelace-style/localize\";\nvar translation = {\n $code: \"en\",\n $name: \"English\",\n $dir: \"ltr\",\n carousel: \"Carousel\",\n clearEntry: \"Clear entry\",\n close: \"Close\",\n copied: \"Copied\",\n copy: \"Copy\",\n currentValue: \"Current value\",\n error: \"Error\",\n goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,\n hidePassword: \"Hide password\",\n loading: \"Loading\",\n nextSlide: \"Next slide\",\n numOptionsSelected: (num) => {\n if (num === 0)\n return \"No options selected\";\n if (num === 1)\n return \"1 option selected\";\n return `${num} options selected`;\n },\n previousSlide: \"Previous slide\",\n progress: \"Progress\",\n remove: \"Remove\",\n resize: \"Resize\",\n scrollToEnd: \"Scroll to end\",\n scrollToStart: \"Scroll to start\",\n selectAColorFromTheScreen: \"Select a color from the screen\",\n showPassword: \"Show password\",\n slideNum: (slide) => `Slide ${slide}`,\n toggleColorFormat: \"Toggle color format\"\n};\nregisterTranslation(translation);\nvar en_default = translation;\n\nexport {\n en_default\n};\n","import {\n en_default\n} from \"./chunk.MAS2SHYD.js\";\n\n// src/utilities/localize.ts\nimport { LocalizeController as DefaultLocalizationController, registerTranslation } from \"@shoelace-style/localize\";\nimport { registerTranslation as registerTranslation2 } from \"@shoelace-style/localize\";\nvar LocalizeController = class extends DefaultLocalizationController {\n};\nregisterTranslation(en_default);\n\nexport {\n LocalizeController,\n registerTranslation2 as registerTranslation\n};\n","import {\n details_styles_default\n} from \"./chunk.J7PLVEQM.js\";\nimport {\n getAnimation,\n setDefaultAnimation\n} from \"./chunk.DHU6MIVB.js\";\nimport {\n waitForEvent\n} from \"./chunk.B4BZKR24.js\";\nimport {\n animateTo,\n shimKeyframesHeightAuto,\n stopAnimations\n} from \"./chunk.LHI6QEL2.js\";\nimport {\n LocalizeController\n} from \"./chunk.WLV3FVBR.js\";\nimport {\n SlIcon\n} from \"./chunk.H33C3MRM.js\";\nimport {\n watch\n} from \"./chunk.2FB5TK5H.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.SFSTXCXC.js\";\nimport {\n __decorateClass\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/components/details/details.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nvar SlDetails = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n this.open = false;\n this.disabled = false;\n }\n firstUpdated() {\n this.body.style.height = this.open ? \"auto\" : \"0\";\n if (this.open) {\n this.details.open = true;\n }\n this.detailsObserver = new MutationObserver((changes) => {\n for (const change of changes) {\n if (change.type === \"attributes\" && change.attributeName === \"open\") {\n if (this.details.open) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n });\n this.detailsObserver.observe(this.details, { attributes: true });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.detailsObserver.disconnect();\n }\n handleSummaryClick(event) {\n event.preventDefault();\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n this.header.focus();\n }\n }\n handleSummaryKeyDown(event) {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n this.hide();\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n this.show();\n }\n }\n async handleOpenChange() {\n if (this.open) {\n this.details.open = true;\n const slShow = this.emit(\"sl-show\", { cancelable: true });\n if (slShow.defaultPrevented) {\n this.open = false;\n this.details.open = false;\n return;\n }\n await stopAnimations(this.body);\n const { keyframes, options } = getAnimation(this, \"details.show\", { dir: this.localize.dir() });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = \"auto\";\n this.emit(\"sl-after-show\");\n } else {\n const slHide = this.emit(\"sl-hide\", { cancelable: true });\n if (slHide.defaultPrevented) {\n this.details.open = true;\n this.open = true;\n return;\n }\n await stopAnimations(this.body);\n const { keyframes, options } = getAnimation(this, \"details.hide\", { dir: this.localize.dir() });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = \"auto\";\n this.details.open = false;\n this.emit(\"sl-after-hide\");\n }\n }\n /** Shows the details. */\n async show() {\n if (this.open || this.disabled) {\n return void 0;\n }\n this.open = true;\n return waitForEvent(this, \"sl-after-show\");\n }\n /** Hides the details */\n async hide() {\n if (!this.open || this.disabled) {\n return void 0;\n }\n this.open = false;\n return waitForEvent(this, \"sl-after-hide\");\n }\n render() {\n const isRtl = this.localize.dir() === \"rtl\";\n return html`\n <details\n part=\"base\"\n class=${classMap({\n details: true,\n \"details--open\": this.open,\n \"details--disabled\": this.disabled,\n \"details--rtl\": isRtl\n })}\n >\n <summary\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=${this.open ? \"true\" : \"false\"}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? \"true\" : \"false\"}\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <sl-icon library=\"system\" name=${isRtl ? \"chevron-left\" : \"chevron-right\"}></sl-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <sl-icon library=\"system\" name=${isRtl ? \"chevron-left\" : \"chevron-right\"}></sl-icon>\n </slot>\n </span>\n </summary>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </details>\n `;\n }\n};\nSlDetails.styles = [component_styles_default, details_styles_default];\nSlDetails.dependencies = {\n \"sl-icon\": SlIcon\n};\n__decorateClass([\n query(\".details\")\n], SlDetails.prototype, \"details\", 2);\n__decorateClass([\n query(\".details__header\")\n], SlDetails.prototype, \"header\", 2);\n__decorateClass([\n query(\".details__body\")\n], SlDetails.prototype, \"body\", 2);\n__decorateClass([\n query(\".details__expand-icon-slot\")\n], SlDetails.prototype, \"expandIconSlot\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDetails.prototype, \"open\", 2);\n__decorateClass([\n property()\n], SlDetails.prototype, \"summary\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDetails.prototype, \"disabled\", 2);\n__decorateClass([\n watch(\"open\", { waitUntilFirstUpdate: true })\n], SlDetails.prototype, \"handleOpenChange\", 1);\nsetDefaultAnimation(\"details.show\", {\n keyframes: [\n { height: \"0\", opacity: \"0\" },\n { height: \"auto\", opacity: \"1\" }\n ],\n options: { duration: 250, easing: \"linear\" }\n});\nsetDefaultAnimation(\"details.hide\", {\n keyframes: [\n { height: \"auto\", opacity: \"1\" },\n { height: \"0\", opacity: \"0\" }\n ],\n options: { duration: 250, easing: \"linear\" }\n});\n\nexport {\n SlDetails\n};\n","import {\n SlDetails\n} from \"./chunk.NTUEQTVT.js\";\n\n// src/components/details/details.ts\nvar details_default = SlDetails;\nSlDetails.define(\"sl-details\");\n\nexport {\n details_default\n};\n",":host {\n --jump-acordion-header-color: var(--neutral-grey-primary, #282828);\n --jump-accordion-border-color: var(--neutral-grey-secondary, #707070);\n --jump-accordion-icon-color: var(--neutral-grey-primary, #282828);\n}\n\n:host ::part(base) {\n border-radius: 3px;\n border: none;\n font-family: 'Inter', sans-serif;\n}\n\n:host ::part(header) {\n padding: 24px;\n font-weight: bold;\n font-size: 18px;\n}\n\n:host ::part(content) {\n padding-left: 24px;\n padding-bottom: 24px;\n padding-right: 24px;\n margin: 0px;\n}\n\n/* Boxed */\n:host(.boxed){\n --jump-accordion-bg-color: var(--secondary-standard, #5e79ba);\n --jump-accordion-color: var(--neutral-white, #ffffff);\n --jump-accordion-icon-color: var(--neutral-white, #ffffff);\n}\n\n:host(.boxed) ::part(base) {\n background-color: var(--jump-accordion-bg-color);\n color: var(--jump-accordion-color);\n}\n\n:host(.boxed) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n/* Sidestroke */\n:host(.sidestroke) {\n --jump-accordion-stroke-color: var(--secondary-standard, #5e79ba);\n --jump-accordion-bg-color: var(--secondary-soft, #EDF2FA);\n --jump-accordion-color: var(--neutral-grey-primary, #282828);\n --jump-accordion-icon-color: var(--neutral-grey-primary, #282828);\n}\n\n:host(.sidestroke) ::part(base) {\n border-left: 6px solid var(--jump-accordion-stroke-color);\n background-color: var(--jump-accordion-bg-color);\n color: var(--jump-accordion-color);\n}\n\n:host(.sidestroke) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n/* Boxed header */\n:host(.boxedheader){\n --jump-accordion-header-bg-color: var(--secondary-soft, #EDF2FA);\n --jump-acordion-header-color: var(--secondary-standard, #5e79ba);\n --jump-accordion-icon-color: var(--secondary-standard, #5e79ba);\n}\n\n:host(.boxedheader) ::part(header) {\n background-color: var(--jump-accordion-header-bg-color);\n color: var(--jump-acordion-header-color);\n}\n\n:host(.boxedheader) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n:host(.boxedheader) ::part(content) {\n background-color: transparent;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n\n/* Divider */\n:host(.divider) ::part(base) {\n background-color: transparent;\n border-top: 1px solid var(--jump-accordion-border-color);\n border-bottom: 1px solid var(--jump-accordion-border-color);\n border-radius: 0px;\n}\n\n:host(.divider) ::part(header){\n color: var(--jump-acordion-header-color);\n}\n\n:host(.divider) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n/* Disabilito la rotazione */\n:host ::part(summary-icon) {\n /* Disable the expand/collapse animation */\n rotate: none;\n}","import { Component, Prop, Event, EventEmitter, Listen, Host, h } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/details/details.js';\n@Component({\n tag: 'jump-accordion',\n styleUrl: 'jump-accordion.scss',\n shadow: true,\n})\nexport class JumpAccordion {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() variant: \"divider\" | \"boxed\" | \"boxedheader\" | \"sidestroke\";\n @Prop() summary: string;\n @Prop() disabled: boolean;\n @Prop({reflect: true}) open: boolean;\n @Prop() icon: \"plus\" | \"chevron\";\n @Prop() identifier: string;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-accordion-open'}) jumpAccordionOpen : EventEmitter;\n\n /* ---------------------- @LISTEN ------------------------- */\n @Listen('sl-show')\n handleShow() {\n this.open = true;\n this.jumpAccordionOpen.emit('open');\n }\n\n /* --------------------- RENDER ------------------------------- */\n renderIcons() {\n if(this.icon === 'plus'){\n return [\n <jump-icon library=\"fa\" category=\"regular\" name=\"plus\" size=\"small\" slot=\"expand-icon\"></jump-icon>,\n <jump-icon library=\"fa\" category=\"regular\" name=\"minus\" size=\"small\" slot=\"collapse-icon\"></jump-icon>\n ]\n } else {\n return [\n <jump-icon library=\"fa\" category=\"regular\" name=\"chevron-down\" size=\"small\" slot=\"expand-icon\"></jump-icon>,\n <jump-icon library=\"fa\" category=\"regular\" name=\"chevron-up\" size=\"small\" slot=\"collapse-icon\"></jump-icon>\n ]\n }\n }\n\n render() {\n return (\n <Host class={\"JumpAccordion \" + (this.variant)} open={this.open} id={this.identifier}>\n <sl-details class=\"item\" summary={this.summary} disabled={this.disabled} open={this.open}>\n {this.renderIcons()}\n <slot name=\"acc-content\"></slot>\n </sl-details>\n </Host>\n );\n }\n}"],"mappings":"uMAEA,IAAIA,EAAyBC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E7B7L,QAAS,CAAEC,SAAU,IAAK6L,OAAQ,YAEpCxL,EAAoB,eAAgB,CAClCP,UAAW,CACT,CAAE6C,OAAQ,OAAQiJ,QAAS,KAC3B,CAAEjJ,OAAQ,IAAKiJ,QAAS,MAE1B7L,QAAS,CAAEC,SAAU,IAAK6L,OAAQ,YC1NpCjD,EAAUkD,OAAO,cCNjB,MAAMC,EAAmB,urEACzB,MAAAC,EAAeD,E,MCMFE,EAAa,M,wNAexB,UAAAC,GACExH,KAAKuE,KAAO,KACZvE,KAAKyH,kBAAkB5B,KAAK,O,CAI9B,WAAA6B,GACE,GAAG1H,KAAK2H,OAAS,OAAO,CACtB,MAAO,CACLC,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,OAAOC,KAAK,QAAQC,KAAK,gBACzEL,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,QAAQC,KAAK,QAAQC,KAAK,kB,KAEvE,CACL,MAAO,CACLL,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,eAAeC,KAAK,QAAQC,KAAK,gBACjFL,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,aAAaC,KAAK,QAAQC,KAAK,kB,EAKrF,MAAA/B,GACE,OACE0B,EAACM,EAAI,CAAAjH,IAAA,2CAACkH,MAAO,iBAAoBnI,KAAY,QAAGuE,KAAMvE,KAAKuE,KAAM6D,GAAIpI,KAAKqI,YACxET,EAAA,cAAA3G,IAAA,2CAAYkH,MAAM,OAAO7B,QAAStG,KAAKsG,QAAS9B,SAAUxE,KAAKwE,SAAUD,KAAMvE,KAAKuE,MACjFvE,KAAK0H,cACJE,EAAA,QAAA3G,IAAA,2CAAM8G,KAAK,iB"}
1
+ {"version":3,"names":["details_styles_default","css","defaultAnimationRegistry","Map","customAnimationRegistry","WeakMap","ensureAnimation","animation","keyframes","options","duration","getLogicalAnimation","dir","toLowerCase","rtlKeyframes","setDefaultAnimation","animationName","set","getAnimation","el","customAnimation","get","defaultAnimation","waitForEvent","eventName","Promise","resolve","done","event","target","removeEventListener","addEventListener","animateTo","Infinity","Error","animate","__spreadProps","__spreadValues","prefersReducedMotion","once","query","window","matchMedia","matches","stopAnimations","all","getAnimations","map","cancel","requestAnimationFrame","shimKeyframesHeightAuto","calculatedHeight","keyframe","height","connectedElements","Set","documentElementObserver","MutationObserver","update","translations","documentDirection","document","documentElement","documentLanguage","lang","navigator","language","fallback","observe","attributes","attributeFilter","registerTranslation","translation","t","code","$code","has","Object","assign","keys","requestUpdate","LocalizeController","constructor","host","this","addController","hostConnected","add","hostDisconnected","delete","getTranslationData","_a","_b","locale","Intl","Locale","replace","region","primary","secondary","exists","key","includeFallback","term","args","console","error","String","date","dateToFormat","Date","DateTimeFormat","format","number","numberToFormat","Number","isNaN","NumberFormat","relativeTime","value","unit","RelativeTimeFormat","$name","$dir","carousel","clearEntry","close","copied","copy","currentValue","goToSlide","slide","count","hidePassword","loading","nextSlide","numOptionsSelected","num","previousSlide","progress","remove","resize","scrollToEnd","scrollToStart","selectAColorFromTheScreen","showPassword","slideNum","toggleColorFormat","en_default","DefaultLocalizationController","SlDetails","ShoelaceElement","super","arguments","localize","open","disabled","firstUpdated","body","style","details","detailsObserver","changes","change","type","attributeName","show","hide","disconnectedCallback","disconnect","handleSummaryClick","preventDefault","header","focus","handleSummaryKeyDown","handleOpenChange","slShow","emit","cancelable","defaultPrevented","scrollHeight","slHide","render","isRtl","html","classMap","summary","styles","component_styles_default","dependencies","SlIcon","__decorateClass","prototype","property","Boolean","reflect","watch","waitUntilFirstUpdate","opacity","easing","define","jumpAccordionCss","JumpAccordionStyle0","JumpAccordion","handleShow","jumpAccordionOpen","renderIcons","icon","h","library","category","name","size","slot","Host","class","id","identifier"],"sources":["node_modules/@shoelace-style/shoelace/dist/chunks/chunk.J7PLVEQM.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.DHU6MIVB.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.B4BZKR24.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.LHI6QEL2.js","node_modules/@shoelace-style/localize/dist/index.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MAS2SHYD.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.WLV3FVBR.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NTUEQTVT.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MU3U6YPN.js","src/components/jump-accordion/jump-accordion.scss?tag=jump-accordion&encapsulation=shadow","src/components/jump-accordion/jump-accordion.tsx"],"sourcesContent":["// src/components/details/details.styles.ts\nimport { css } from \"lit\";\nvar details_styles_default = css`\n :host {\n display: block;\n }\n\n .details {\n border: solid 1px var(--sl-color-neutral-200);\n border-radius: var(--sl-border-radius-medium);\n background-color: var(--sl-color-neutral-0);\n overflow-anchor: none;\n }\n\n .details--disabled {\n opacity: 0.5;\n }\n\n .details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--sl-spacing-medium);\n user-select: none;\n -webkit-user-select: none;\n cursor: pointer;\n }\n\n .details__header::-webkit-details-marker {\n display: none;\n }\n\n .details__header:focus {\n outline: none;\n }\n\n .details__header:focus-visible {\n outline: var(--sl-focus-ring);\n outline-offset: calc(1px + var(--sl-focus-ring-offset));\n }\n\n .details--disabled .details__header {\n cursor: not-allowed;\n }\n\n .details--disabled .details__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n }\n\n .details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: var(--sl-transition-medium) rotate ease;\n }\n\n .details--open .details__summary-icon {\n rotate: 90deg;\n }\n\n .details--open.details--rtl .details__summary-icon {\n rotate: -90deg;\n }\n\n .details--open slot[name='expand-icon'],\n .details:not(.details--open) slot[name='collapse-icon'] {\n display: none;\n }\n\n .details__body {\n overflow: hidden;\n }\n\n .details__content {\n display: block;\n padding: var(--sl-spacing-medium);\n }\n`;\n\nexport {\n details_styles_default\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/utilities/animation-registry.ts\nvar defaultAnimationRegistry = /* @__PURE__ */ new Map();\nvar customAnimationRegistry = /* @__PURE__ */ new WeakMap();\nfunction ensureAnimation(animation) {\n return animation != null ? animation : { keyframes: [], options: { duration: 0 } };\n}\nfunction getLogicalAnimation(animation, dir) {\n if (dir.toLowerCase() === \"rtl\") {\n return {\n keyframes: animation.rtlKeyframes || animation.keyframes,\n options: animation.options\n };\n }\n return animation;\n}\nfunction setDefaultAnimation(animationName, animation) {\n defaultAnimationRegistry.set(animationName, ensureAnimation(animation));\n}\nfunction setAnimation(el, animationName, animation) {\n customAnimationRegistry.set(el, __spreadProps(__spreadValues({}, customAnimationRegistry.get(el)), { [animationName]: ensureAnimation(animation) }));\n}\nfunction getAnimation(el, animationName, options) {\n const customAnimation = customAnimationRegistry.get(el);\n if (customAnimation == null ? void 0 : customAnimation[animationName]) {\n return getLogicalAnimation(customAnimation[animationName], options.dir);\n }\n const defaultAnimation = defaultAnimationRegistry.get(animationName);\n if (defaultAnimation) {\n return getLogicalAnimation(defaultAnimation, options.dir);\n }\n return {\n keyframes: [],\n options: { duration: 0 }\n };\n}\n\nexport {\n setDefaultAnimation,\n setAnimation,\n getAnimation\n};\n","// src/internal/event.ts\nfunction waitForEvent(el, eventName) {\n return new Promise((resolve) => {\n function done(event) {\n if (event.target === el) {\n el.removeEventListener(eventName, done);\n resolve();\n }\n }\n el.addEventListener(eventName, done);\n });\n}\n\nexport {\n waitForEvent\n};\n","import {\n __spreadProps,\n __spreadValues\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/internal/animate.ts\nfunction animateTo(el, keyframes, options) {\n return new Promise((resolve) => {\n if ((options == null ? void 0 : options.duration) === Infinity) {\n throw new Error(\"Promise-based animations must be finite.\");\n }\n const animation = el.animate(keyframes, __spreadProps(__spreadValues({}, options), {\n duration: prefersReducedMotion() ? 0 : options.duration\n }));\n animation.addEventListener(\"cancel\", resolve, { once: true });\n animation.addEventListener(\"finish\", resolve, { once: true });\n });\n}\nfunction parseDuration(delay) {\n delay = delay.toString().toLowerCase();\n if (delay.indexOf(\"ms\") > -1) {\n return parseFloat(delay);\n }\n if (delay.indexOf(\"s\") > -1) {\n return parseFloat(delay) * 1e3;\n }\n return parseFloat(delay);\n}\nfunction prefersReducedMotion() {\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n return query.matches;\n}\nfunction stopAnimations(el) {\n return Promise.all(\n el.getAnimations().map((animation) => {\n return new Promise((resolve) => {\n animation.cancel();\n requestAnimationFrame(resolve);\n });\n })\n );\n}\nfunction shimKeyframesHeightAuto(keyframes, calculatedHeight) {\n return keyframes.map((keyframe) => __spreadProps(__spreadValues({}, keyframe), {\n height: keyframe.height === \"auto\" ? `${calculatedHeight}px` : keyframe.height\n }));\n}\n\nexport {\n animateTo,\n parseDuration,\n prefersReducedMotion,\n stopAnimations,\n shimKeyframesHeightAuto\n};\n","const connectedElements = new Set();\nconst documentElementObserver = new MutationObserver(update);\nconst translations = new Map();\nlet documentDirection = document.documentElement.dir || 'ltr';\nlet documentLanguage = document.documentElement.lang || navigator.language;\nlet fallback;\ndocumentElementObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang']\n});\nexport function registerTranslation(...translation) {\n translation.map(t => {\n const code = t.$code.toLowerCase();\n if (translations.has(code)) {\n translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t));\n }\n else {\n translations.set(code, t);\n }\n if (!fallback) {\n fallback = t;\n }\n });\n update();\n}\nexport function update() {\n documentDirection = document.documentElement.dir || 'ltr';\n documentLanguage = document.documentElement.lang || navigator.language;\n [...connectedElements.keys()].map((el) => {\n if (typeof el.requestUpdate === 'function') {\n el.requestUpdate();\n }\n });\n}\nexport class LocalizeController {\n constructor(host) {\n this.host = host;\n this.host.addController(this);\n }\n hostConnected() {\n connectedElements.add(this.host);\n }\n hostDisconnected() {\n connectedElements.delete(this.host);\n }\n dir() {\n return `${this.host.dir || documentDirection}`.toLowerCase();\n }\n lang() {\n return `${this.host.lang || documentLanguage}`.toLowerCase();\n }\n getTranslationData(lang) {\n var _a, _b;\n const locale = new Intl.Locale(lang.replace(/_/g, '-'));\n const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();\n const region = (_b = (_a = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';\n const primary = translations.get(`${language}-${region}`);\n const secondary = translations.get(language);\n return { locale, language, region, primary, secondary };\n }\n exists(key, options) {\n var _a;\n const { primary, secondary } = this.getTranslationData((_a = options.lang) !== null && _a !== void 0 ? _a : this.lang());\n options = Object.assign({ includeFallback: false }, options);\n if ((primary && primary[key]) ||\n (secondary && secondary[key]) ||\n (options.includeFallback && fallback && fallback[key])) {\n return true;\n }\n return false;\n }\n term(key, ...args) {\n const { primary, secondary } = this.getTranslationData(this.lang());\n let term;\n if (primary && primary[key]) {\n term = primary[key];\n }\n else if (secondary && secondary[key]) {\n term = secondary[key];\n }\n else if (fallback && fallback[key]) {\n term = fallback[key];\n }\n else {\n console.error(`No translation found for: ${String(key)}`);\n return String(key);\n }\n if (typeof term === 'function') {\n return term(...args);\n }\n return term;\n }\n date(dateToFormat, options) {\n dateToFormat = new Date(dateToFormat);\n return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat);\n }\n number(numberToFormat, options) {\n numberToFormat = Number(numberToFormat);\n return isNaN(numberToFormat) ? '' : new Intl.NumberFormat(this.lang(), options).format(numberToFormat);\n }\n relativeTime(value, unit, options) {\n return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit);\n }\n}\n","// src/translations/en.ts\nimport { registerTranslation } from \"@shoelace-style/localize\";\nvar translation = {\n $code: \"en\",\n $name: \"English\",\n $dir: \"ltr\",\n carousel: \"Carousel\",\n clearEntry: \"Clear entry\",\n close: \"Close\",\n copied: \"Copied\",\n copy: \"Copy\",\n currentValue: \"Current value\",\n error: \"Error\",\n goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,\n hidePassword: \"Hide password\",\n loading: \"Loading\",\n nextSlide: \"Next slide\",\n numOptionsSelected: (num) => {\n if (num === 0)\n return \"No options selected\";\n if (num === 1)\n return \"1 option selected\";\n return `${num} options selected`;\n },\n previousSlide: \"Previous slide\",\n progress: \"Progress\",\n remove: \"Remove\",\n resize: \"Resize\",\n scrollToEnd: \"Scroll to end\",\n scrollToStart: \"Scroll to start\",\n selectAColorFromTheScreen: \"Select a color from the screen\",\n showPassword: \"Show password\",\n slideNum: (slide) => `Slide ${slide}`,\n toggleColorFormat: \"Toggle color format\"\n};\nregisterTranslation(translation);\nvar en_default = translation;\n\nexport {\n en_default\n};\n","import {\n en_default\n} from \"./chunk.MAS2SHYD.js\";\n\n// src/utilities/localize.ts\nimport { LocalizeController as DefaultLocalizationController, registerTranslation } from \"@shoelace-style/localize\";\nimport { registerTranslation as registerTranslation2 } from \"@shoelace-style/localize\";\nvar LocalizeController = class extends DefaultLocalizationController {\n};\nregisterTranslation(en_default);\n\nexport {\n LocalizeController,\n registerTranslation2 as registerTranslation\n};\n","import {\n details_styles_default\n} from \"./chunk.J7PLVEQM.js\";\nimport {\n getAnimation,\n setDefaultAnimation\n} from \"./chunk.DHU6MIVB.js\";\nimport {\n waitForEvent\n} from \"./chunk.B4BZKR24.js\";\nimport {\n animateTo,\n shimKeyframesHeightAuto,\n stopAnimations\n} from \"./chunk.LHI6QEL2.js\";\nimport {\n LocalizeController\n} from \"./chunk.WLV3FVBR.js\";\nimport {\n SlIcon\n} from \"./chunk.H33C3MRM.js\";\nimport {\n watch\n} from \"./chunk.2FB5TK5H.js\";\nimport {\n component_styles_default\n} from \"./chunk.TUVJKY7S.js\";\nimport {\n ShoelaceElement\n} from \"./chunk.SFSTXCXC.js\";\nimport {\n __decorateClass\n} from \"./chunk.IFDWM6P4.js\";\n\n// src/components/details/details.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { property, query } from \"lit/decorators.js\";\nvar SlDetails = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.localize = new LocalizeController(this);\n this.open = false;\n this.disabled = false;\n }\n firstUpdated() {\n this.body.style.height = this.open ? \"auto\" : \"0\";\n if (this.open) {\n this.details.open = true;\n }\n this.detailsObserver = new MutationObserver((changes) => {\n for (const change of changes) {\n if (change.type === \"attributes\" && change.attributeName === \"open\") {\n if (this.details.open) {\n this.show();\n } else {\n this.hide();\n }\n }\n }\n });\n this.detailsObserver.observe(this.details, { attributes: true });\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n this.detailsObserver.disconnect();\n }\n handleSummaryClick(event) {\n event.preventDefault();\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n this.header.focus();\n }\n }\n handleSummaryKeyDown(event) {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n this.hide();\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n this.show();\n }\n }\n async handleOpenChange() {\n if (this.open) {\n this.details.open = true;\n const slShow = this.emit(\"sl-show\", { cancelable: true });\n if (slShow.defaultPrevented) {\n this.open = false;\n this.details.open = false;\n return;\n }\n await stopAnimations(this.body);\n const { keyframes, options } = getAnimation(this, \"details.show\", { dir: this.localize.dir() });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = \"auto\";\n this.emit(\"sl-after-show\");\n } else {\n const slHide = this.emit(\"sl-hide\", { cancelable: true });\n if (slHide.defaultPrevented) {\n this.details.open = true;\n this.open = true;\n return;\n }\n await stopAnimations(this.body);\n const { keyframes, options } = getAnimation(this, \"details.hide\", { dir: this.localize.dir() });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = \"auto\";\n this.details.open = false;\n this.emit(\"sl-after-hide\");\n }\n }\n /** Shows the details. */\n async show() {\n if (this.open || this.disabled) {\n return void 0;\n }\n this.open = true;\n return waitForEvent(this, \"sl-after-show\");\n }\n /** Hides the details */\n async hide() {\n if (!this.open || this.disabled) {\n return void 0;\n }\n this.open = false;\n return waitForEvent(this, \"sl-after-hide\");\n }\n render() {\n const isRtl = this.localize.dir() === \"rtl\";\n return html`\n <details\n part=\"base\"\n class=${classMap({\n details: true,\n \"details--open\": this.open,\n \"details--disabled\": this.disabled,\n \"details--rtl\": isRtl\n })}\n >\n <summary\n part=\"header\"\n id=\"header\"\n class=\"details__header\"\n role=\"button\"\n aria-expanded=${this.open ? \"true\" : \"false\"}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? \"true\" : \"false\"}\n tabindex=${this.disabled ? \"-1\" : \"0\"}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"details__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"details__summary-icon\">\n <slot name=\"expand-icon\">\n <sl-icon library=\"system\" name=${isRtl ? \"chevron-left\" : \"chevron-right\"}></sl-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <sl-icon library=\"system\" name=${isRtl ? \"chevron-left\" : \"chevron-right\"}></sl-icon>\n </slot>\n </span>\n </summary>\n\n <div class=\"details__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" class=\"details__content\"></slot>\n </div>\n </details>\n `;\n }\n};\nSlDetails.styles = [component_styles_default, details_styles_default];\nSlDetails.dependencies = {\n \"sl-icon\": SlIcon\n};\n__decorateClass([\n query(\".details\")\n], SlDetails.prototype, \"details\", 2);\n__decorateClass([\n query(\".details__header\")\n], SlDetails.prototype, \"header\", 2);\n__decorateClass([\n query(\".details__body\")\n], SlDetails.prototype, \"body\", 2);\n__decorateClass([\n query(\".details__expand-icon-slot\")\n], SlDetails.prototype, \"expandIconSlot\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDetails.prototype, \"open\", 2);\n__decorateClass([\n property()\n], SlDetails.prototype, \"summary\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlDetails.prototype, \"disabled\", 2);\n__decorateClass([\n watch(\"open\", { waitUntilFirstUpdate: true })\n], SlDetails.prototype, \"handleOpenChange\", 1);\nsetDefaultAnimation(\"details.show\", {\n keyframes: [\n { height: \"0\", opacity: \"0\" },\n { height: \"auto\", opacity: \"1\" }\n ],\n options: { duration: 250, easing: \"linear\" }\n});\nsetDefaultAnimation(\"details.hide\", {\n keyframes: [\n { height: \"auto\", opacity: \"1\" },\n { height: \"0\", opacity: \"0\" }\n ],\n options: { duration: 250, easing: \"linear\" }\n});\n\nexport {\n SlDetails\n};\n","import {\n SlDetails\n} from \"./chunk.NTUEQTVT.js\";\n\n// src/components/details/details.ts\nvar details_default = SlDetails;\nSlDetails.define(\"sl-details\");\n\nexport {\n details_default\n};\n",":host {\n --jump-acordion-header-color: var(--neutral-grey-primary, #282828);\n --jump-accordion-border-color: var(--neutral-grey-secondary, #707070);\n --jump-accordion-icon-color: var(--neutral-grey-primary, #282828);\n --jump-accordion-font-family: var(--ff-primary, 'Inter', sans-serif);\n}\n\n:host ::part(base) {\n border-radius: 3px;\n border: none;\n font-family: var(--jump-accordion-font-family);\n}\n\n:host ::part(header) {\n padding: 24px;\n font-weight: bold;\n font-size: 18px;\n}\n\n:host ::part(content) {\n padding-left: 24px;\n padding-bottom: 24px;\n padding-right: 24px;\n margin: 0px;\n}\n\n/* Boxed */\n:host(.boxed){\n --jump-accordion-bg-color: var(--secondary-standard, #5e79ba);\n --jump-accordion-color: var(--neutral-white, #ffffff);\n --jump-accordion-icon-color: var(--neutral-white, #ffffff);\n}\n\n:host(.boxed) ::part(base) {\n background-color: var(--jump-accordion-bg-color);\n color: var(--jump-accordion-color);\n}\n\n:host(.boxed) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n/* Sidestroke */\n:host(.sidestroke) {\n --jump-accordion-stroke-color: var(--secondary-standard, #5e79ba);\n --jump-accordion-bg-color: var(--secondary-soft, #EDF2FA);\n --jump-accordion-color: var(--neutral-grey-primary, #282828);\n --jump-accordion-icon-color: var(--neutral-grey-primary, #282828);\n}\n\n:host(.sidestroke) ::part(base) {\n border-left: 6px solid var(--jump-accordion-stroke-color);\n background-color: var(--jump-accordion-bg-color);\n color: var(--jump-accordion-color);\n}\n\n:host(.sidestroke) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n/* Boxed header */\n:host(.boxedheader){\n --jump-accordion-header-bg-color: var(--secondary-soft, #EDF2FA);\n --jump-acordion-header-color: var(--secondary-standard, #5e79ba);\n --jump-accordion-icon-color: var(--secondary-standard, #5e79ba);\n}\n\n:host(.boxedheader) ::part(header) {\n background-color: var(--jump-accordion-header-bg-color);\n color: var(--jump-acordion-header-color);\n}\n\n:host(.boxedheader) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n:host(.boxedheader) ::part(content) {\n background-color: transparent;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n\n/* Divider */\n:host(.divider) ::part(base) {\n background-color: transparent;\n border-top: 1px solid var(--jump-accordion-border-color);\n border-bottom: 1px solid var(--jump-accordion-border-color);\n border-radius: 0px;\n}\n\n:host(.divider) ::part(header){\n color: var(--jump-acordion-header-color);\n}\n\n:host(.divider) ::part(summary-icon) {\n color: var(--jump-accordion-icon-color);\n}\n\n/* Disabilito la rotazione */\n:host ::part(summary-icon) {\n /* Disable the expand/collapse animation */\n rotate: none;\n}","import { Component, Prop, Event, EventEmitter, Listen, Host, h } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/details/details.js';\n@Component({\n tag: 'jump-accordion',\n styleUrl: 'jump-accordion.scss',\n shadow: true,\n})\nexport class JumpAccordion {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() variant: \"divider\" | \"boxed\" | \"boxedheader\" | \"sidestroke\";\n @Prop() summary: string;\n @Prop() disabled: boolean;\n @Prop({reflect: true}) open: boolean;\n @Prop() icon: \"plus\" | \"chevron\";\n @Prop() identifier: string;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-accordion-open'}) jumpAccordionOpen : EventEmitter;\n\n /* ---------------------- @LISTEN ------------------------- */\n @Listen('sl-show')\n handleShow() {\n this.open = true;\n this.jumpAccordionOpen.emit('open');\n }\n\n /* --------------------- RENDER ------------------------------- */\n renderIcons() {\n if(this.icon === 'plus'){\n return [\n <jump-icon library=\"fa\" category=\"regular\" name=\"plus\" size=\"small\" slot=\"expand-icon\"></jump-icon>,\n <jump-icon library=\"fa\" category=\"regular\" name=\"minus\" size=\"small\" slot=\"collapse-icon\"></jump-icon>\n ]\n } else {\n return [\n <jump-icon library=\"fa\" category=\"regular\" name=\"chevron-down\" size=\"small\" slot=\"expand-icon\"></jump-icon>,\n <jump-icon library=\"fa\" category=\"regular\" name=\"chevron-up\" size=\"small\" slot=\"collapse-icon\"></jump-icon>\n ]\n }\n }\n\n render() {\n return (\n <Host class={\"JumpAccordion \" + (this.variant)} open={this.open} id={this.identifier}>\n <sl-details class=\"item\" summary={this.summary} disabled={this.disabled} open={this.open}>\n {this.renderIcons()}\n <slot name=\"acc-content\"></slot>\n </sl-details>\n </Host>\n );\n }\n}"],"mappings":"uMAEA,IAAIA,EAAyBC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECIhC,IAAIC,EAA2C,IAAIC,IACnD,IAAIC,EAA0C,IAAIC,QAClD,SAASC,EAAgBC,GACvB,OAAOA,GAAa,KAAOA,EAAY,CAAEC,UAAW,GAAIC,QAAS,CAAEC,SAAU,GAC/E,CACA,SAASC,EAAoBJ,EAAWK,GACtC,G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C,EAAmB,ywEACzB,MAAAC,EAAeD,E,MCMFE,EAAa,M,wNAexB,UAAAC,GACExH,KAAKuE,KAAO,KACZvE,KAAKyH,kBAAkB5B,KAAK,O,CAI9B,WAAA6B,GACE,GAAG1H,KAAK2H,OAAS,OAAO,CACtB,MAAO,CACLC,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,OAAOC,KAAK,QAAQC,KAAK,gBACzEL,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,QAAQC,KAAK,QAAQC,KAAK,kB,KAEvE,CACL,MAAO,CACLL,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,eAAeC,KAAK,QAAQC,KAAK,gBACjFL,EAAA,aAAWC,QAAQ,KAAKC,SAAS,UAAUC,KAAK,aAAaC,KAAK,QAAQC,KAAK,kB,EAKrF,MAAA/B,GACE,OACE0B,EAACM,EAAI,CAAAjH,IAAA,2CAACkH,MAAO,iBAAoBnI,KAAY,QAAGuE,KAAMvE,KAAKuE,KAAM6D,GAAIpI,KAAKqI,YACxET,EAAA,cAAA3G,IAAA,2CAAYkH,MAAM,OAAO7B,QAAStG,KAAKsG,QAAS9B,SAAUxE,KAAKwE,SAAUD,KAAMvE,KAAKuE,MACjFvE,KAAK0H,cACJE,EAAA,QAAA3G,IAAA,2CAAM8G,KAAK,iB"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,H as a,g as e}from"./p-21aa0095.js";const o=":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;max-width:var(--card-max-width);overflow:hidden;display:flex;flex-direction:column;position:relative;width:100%;font-family:var(--ff-primary, \"Arial\"), sans-serif;line-height:var(--lh-400, 1.3);background-color:var(--jump-card-background);color:var(--jump-card-color)}:host .Footer,:host .Body{display:flex;width:100%}:host jump-badge{position:absolute;top:1rem;left:1rem;z-index:2}:host jump-badge.hasBackground.iconOnly{top:calc(1rem + 8px);left:calc(1rem + 8px)}:host .Favorite{position:absolute;top:1rem;right:1rem;z-index:2}:host .Favorite.hasBackground.iconOnly{top:calc(1rem + 8px);right:calc(1rem + 8px)}:host .Media{overflow:hidden;position:relative;border-radius:3px;aspect-ratio:1/1}:host .Media .Images{height:100%;margin:0;position:relative}:host .Media .Images img{height:100%;width:100%;object-fit:cover;position:absolute;top:0;left:0;overflow:hidden}:host .Media .Images__Front{z-index:1;transition:opacity 0.5s linear;cursor:pointer}:host .Media .Images.has-hover-image:hover .Images__Front{opacity:0}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .Media.iconOnly{border-bottom-right-radius:0}:host .Media.is-mini{max-width:180px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box;z-index:2;transform:translate3d(0, 0, 0)}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Content.is-mini{max-width:180px}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Body.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Body.is-mini>*{flex-direction:column}:host .Product{font-size:var(--fs-400);color:var(--neutral-grey-primary);text-decoration:none}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary);line-height:1.2}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .Footer.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Footer__AddToCart{--jump-button-color:var(--jump-card-ecommerce-add-to-cart-color);--jump-button-background:var(--jump-card-ecommerce-add-to-cart-background);--jump-button-color-hover:var(--jump-card-ecommerce-add-to-cart-color-hover);--jump-button-background-hover:var(--jump-card-ecommerce-add-to-cart-background-hover)}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--status-danger-standard)}:host .OnlyIconButton{position:absolute;bottom:0;right:0;background:var(--neutral-white);border-top-left-radius:20px;padding:8px 8px 0px 8px;z-index:2}:host .Price{position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:1.5rem 1.5rem auto;justify-items:end;align-items:end;column-gap:0.5rem;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:var(--lh-400)}:host .Price>*{display:inline-flex}:host .Price__Regular{text-align:right}:host .Price__Regular.sale{text-decoration:line-through;color:var(--neutral-grey-secondary);font-weight:var(--fw-400);font-size:var(--fs-400);grid-column:2;grid-row:1}:host .Price__Sale{grid-column:2;grid-row:2}:host .Price__Discount{color:var(--status-danger-standard);font-weight:var(--fw-400);font-size:var(--fs-300);grid-column:1;grid-row:1}:host .Price.is-mini{display:flex;font-size:var(--fs-400)}:host .SelectVariations{display:flex;align-items:flex-end}:host .SelectVariations select{appearance:none;background-color:transparent;border:1px solid var(--neutral-grey-secondary);border-radius:3px;color:var(--neutral-grey-secondary);font-size:var(--fs-300);padding:0.5rem 0.75rem;max-width:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right 0.5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact}.slide-in-bottom{animation:slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both}.slide-out-bottom{animation:slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both}.fade-in-out{animation-name:fade-in-out;animation-duration:6s;animation-timing-function:ease-in-out}@keyframes fade-in-out{from{opacity:0;transform:translateY(100px)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100px)}}";const r=o;const n=class{constructor(s){t(this,s);this.toggleFavorite=i(this,"jump-toggle-favorite",7);this.productAddToCart=i(this,"jump-add-to-cart",7);this.productWaitingList=i(this,"jump-add-to-waiting-list",7);this.variationSelected=i(this,"jump-variation-selected",7);this.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=false;this.hasSlotAddToCart=false;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="Aggiunto al carrello";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.addToCartColor="secondary";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText="Aggiungi al carrello";this.waitingListText="Notifica disponibilità";this.addToWaitingList=false;this.isMini=false;this.addedToCart=false;this.endAddedToCart=false;this.variations=[];this.selectedVariation=undefined;this.priceFormatted=undefined;this.salePriceFormatted=undefined}async setPrice(t,i){let s=false;if(t&&t>0){s=true;this.price=t}if(i&&i>0){this.salePrice=i}if(s){this.formatPrices()}}addOption(t){let i=t.detail;this.variations=[...this.variations,Object.assign({},i)]}onVariationSelected(){let t=this.variationSelectEl.value;let i=this.variations.find((i=>i.code==t));this.selectedVariation=i;this.variationSelected.emit(i)}componentWillLoad(){}componentDidLoad(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.addEventListener("jump-change",this.onQuantityChange.bind(this));this.quantity=this.jumpQuantityEl.getValue().then((t=>{this.quantity=t}))}this.formatPrices()}disconnectedCallback(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.removeEventListener("jump-change",this.onQuantityChange)}}onQuantityChange(t){var i;this.quantity=(i=t.detail.value)!==null&&i!==void 0?i:false}onToggleFavorite(){this.favorite=!this.favorite;this.toggleFavorite.emit({productId:this.productId,favorite:this.favorite})}addProductToCart(){var t;this.addedToCart=true;let i=this.selectedVariation;if(!i&&this.variations.length>0){i=this.variations[0]}const s={productId:this.productId,addedToCart:this.addedToCart,quantity:(t=this.quantity)!==null&&t!==void 0?t:null,variation:i!==null&&i!==void 0?i:null};this.productAddToCart.emit(s);setTimeout((()=>{this.addedToCart=false}),6e3)}waitingList(){this.addToWaitingList=true;this.productWaitingList.emit({productId:this.productId,addToWaitingList:this.addToWaitingList})}formatPrices(){var t;let i=(t=document.documentElement.lang)!==null&&t!==void 0?t:"it-IT";if(i.length==2){i=`${i}-${i.toUpperCase()}`}this.priceFormatted=this.price.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2});this.salePriceFormatted=this.salePrice.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2})}render(){const t=this.hasBackground&&!this.isMini?"hasBackground":"";const i=this.onlyIconButton&&!this.isMini?"iconOnly":"";const e=this.outOfStock?"justify-between":"";const o=this.hoverImg?"has-hover-image":"";const r=this.isMini?"is-mini":"";function n(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(a,null,!this.isMini&&this.badge?s("jump-badge",{class:`${t} ${i}`,variant:this.badgeColor,dimension:"small",label:this.badge}):"",!this.isMini&&this.hasFavorite?s("jump-button",{onClick:()=>this.onToggleFavorite(),class:`Favorite ${t} ${i}`,variant:this.favorite?"primary":"neutral",size:"small",text:true,onlyIcon:true},s("jump-icon",{slot:"prefix",name:"heart",category:this.favorite?"solid":"light",size:"medium"})):this.hasSlotForFavorite?s("div",{class:"Favorite"},s("slot",{name:"favorite"})):null,s("div",{class:`Media ${i} ${t} ${r}`},s("a",{href:this.link},s("figure",{class:`Images ${o} `},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt}):"",this.hoverImg&&!this.videoSrc?s("img",{class:"Images__OnHover",src:this.hoverImg,alt:this.hoverImgAlt}):""),this.videoSrc&&!this.img?s("video",{autoplay:true},s("source",{src:this.videoSrc,type:"video/mp4"}),s("source",{src:this.videoSrc,type:"video/mov"}),s("source",{src:this.videoSrc,type:"video/webm"})):""),!this.isMini?s("div",{class:`NotificationCart ${this.addedToCart==true?"is-active fade-in-out":""}`},s("jump-button",{href:this.notificationUrl,variant:"white",text:true},s("jump-icon",{slot:"prefix",name:"check"}),s("span",null," ",this.notificationText," "))):null,!this.isMini&&this.onlyIconButton&&!this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("jump-button",{variant:"secondary",size:"large",pill:true,onlyIcon:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular"}))):"",!this.isMini&&this.onlyIconButton&&this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("slot",{name:"add-to-cart"})):""),s("div",{class:`Content ${t} ${i} ${r}`},s("div",{class:`Body ${t} ${i} ${r}`},s("div",null,s("div",{class:"Info"},s("a",{href:this.link,class:"Product"},this.productName),!this.isMini&&this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${r}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",n(this.price,this.salePrice),"% "):null,!this.isMini?s("div",{class:`Price__Regular ${this.salePrice&&this.salePrice<this.price?"sale":""}`},this.currency,this.priceFormatted):s("div",{class:`Price__Regular`},this.currency,this.salePrice&&this.salePrice<this.price?this.salePriceFormatted:this.priceFormatted),!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Sale"},this.currency,this.salePriceFormatted):null):null),!this.isMini||this.variations.length!=0?s("div",null,this.variations.length!=0?s("div",{class:"SelectVariations"},s("select",{ref:t=>this.variationSelectEl=t,onChange:()=>{this.onVariationSelected()}},this.variations.filter((t=>!t.imgUrl)).map((t=>s("option",{value:t.code},t.label))))):null,s("slot",{name:"quantity"})):null),s("div",{class:`Footer ${e} ${t} ${i} ${r}`},this.outOfStock&&!this.isMini?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton&&!this.hasSlotAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular",size:"small"}),this.addToCartText):"",!this.outOfStock&&!this.onlyIconButton&&this.hasSlotAddToCart?s("slot",{name:"add-to-cart"}):null)))}get JumpCardEcommerce(){return e(this)}};n.style=r;export{n as jump_card_ecommerce};
2
- //# sourceMappingURL=p-ba3684ab.entry.js.map
1
+ import{r as t,c as i,h as s,H as a,g as e}from"./p-21aa0095.js";const o=":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;max-width:var(--card-max-width);overflow:hidden;display:flex;flex-direction:column;position:relative;width:100%;font-family:var(--ff-primary, \"Arial\"), sans-serif;line-height:var(--lh-400, 1.3);background-color:var(--jump-card-background);color:var(--jump-card-color)}:host .Footer,:host .Body{display:flex;width:100%}:host jump-badge{position:absolute;top:1rem;left:1rem;z-index:2}:host jump-badge.hasBackground.iconOnly{top:calc(1rem + 8px);left:calc(1rem + 8px)}:host .Favorite{position:absolute;top:1rem;right:1rem;z-index:2}:host .Favorite.hasBackground.iconOnly{top:calc(1rem + 8px);right:calc(1rem + 8px)}:host .Media{overflow:hidden;position:relative;border-radius:3px;aspect-ratio:1/1}:host .Media .Images{height:100%;margin:0;position:relative}:host .Media .Images img{height:100%;width:100%;object-fit:cover;position:absolute;top:0;left:0;overflow:hidden}:host .Media .Images__Front{z-index:1;transition:opacity 0.5s linear;cursor:pointer}:host .Media .Images.has-hover-image:hover .Images__Front{opacity:0}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .Media.iconOnly{border-bottom-right-radius:0}:host .Media.is-mini{max-width:180px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box;z-index:2;transform:translate3d(0, 0, 0)}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Content.is-mini{max-width:180px}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Body.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Body.is-mini>*{flex-direction:column}:host .Product{font-size:var(--fs-400);color:var(--neutral-grey-primary);text-decoration:none}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary);line-height:1.2}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .Footer.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Footer__AddToCart{--jump-button-color:var(--jump-card-ecommerce-add-to-cart-color);--jump-button-background:var(--jump-card-ecommerce-add-to-cart-background);--jump-button-color-hover:var(--jump-card-ecommerce-add-to-cart-color-hover);--jump-button-background-hover:var(--jump-card-ecommerce-add-to-cart-background-hover)}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--status-danger-standard)}:host .OnlyIconButton{position:absolute;bottom:0;right:0;background:var(--neutral-white);border-top-left-radius:20px;padding:8px 8px 0px 8px;z-index:2}:host .Price{position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:1.5rem 1.5rem auto;justify-items:end;align-items:end;column-gap:0.5rem;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:var(--lh-400)}:host .Price>*{display:inline-flex}:host .Price__Regular{text-align:right}:host .Price__Regular.sale{text-decoration:line-through;color:var(--neutral-grey-secondary);font-weight:var(--fw-400);font-size:var(--fs-400);grid-column:2;grid-row:1}:host .Price__Sale{grid-column:2;grid-row:2}:host .Price__Discount{color:var(--status-danger-standard);font-weight:var(--fw-400);font-size:var(--fs-300);grid-column:1;grid-row:1}:host .Price.is-mini{display:flex;font-size:var(--fs-400)}:host .SelectVariations{display:flex;align-items:flex-end}:host .SelectVariations select{appearance:none;background-color:transparent;border:1px solid var(--neutral-grey-secondary);border-radius:3px;color:var(--neutral-grey-secondary);font-size:var(--fs-300);padding:0.5rem 0.75rem;max-width:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right 0.5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact}.slide-in-bottom{animation:slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both}.slide-out-bottom{animation:slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both}.fade-in-out{animation-name:fade-in-out;animation-duration:6s;animation-timing-function:ease-in-out}@keyframes fade-in-out{from{opacity:0;transform:translateY(100px)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100px)}}";const r=o;const n=class{constructor(s){t(this,s);this.toggleFavorite=i(this,"jump-toggle-favorite",7);this.productAddToCart=i(this,"jump-add-to-cart",7);this.productWaitingList=i(this,"jump-add-to-waiting-list",7);this.variationSelected=i(this,"jump-variation-selected",7);this.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=false;this.hasSlotAddToCart=false;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="Aggiunto al carrello";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.addToCartColor="secondary";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText="Aggiungi al carrello";this.waitingListText="Notifica disponibilità";this.addToWaitingList=false;this.isMini=false;this.addedToCart=false;this.endAddedToCart=false;this.variations=[];this.selectedVariation=undefined;this.priceFormatted=undefined;this.salePriceFormatted=undefined}async setPrice(t,i){let s=false;if(t&&t>0){s=true;this.price=t}if(i&&i>0){this.salePrice=i}if(s){this.formatPrices()}}addOption(t){let i=t.detail;this.variations=[...this.variations,Object.assign({},i)]}onVariationSelected(){let t=this.variationSelectEl.value;let i=this.variations.find((i=>i.code==t));this.selectedVariation=i;this.variationSelected.emit(i)}componentWillLoad(){}componentDidLoad(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.addEventListener("jump-change",this.onQuantityChange.bind(this));this.quantity=this.jumpQuantityEl.getValue().then((t=>{this.quantity=t}))}this.formatPrices()}disconnectedCallback(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.removeEventListener("jump-change",this.onQuantityChange)}}onQuantityChange(t){var i;this.quantity=(i=t.detail.value)!==null&&i!==void 0?i:false}onToggleFavorite(){this.favorite=!this.favorite;this.toggleFavorite.emit({productId:this.productId,favorite:this.favorite})}addProductToCart(){var t;this.addedToCart=true;let i=this.selectedVariation;if(!i&&this.variations.length>0){i=this.variations[0]}const s={productId:this.productId,addedToCart:this.addedToCart,quantity:(t=this.quantity)!==null&&t!==void 0?t:null,variation:i!==null&&i!==void 0?i:null};this.productAddToCart.emit(s);setTimeout((()=>{this.addedToCart=false}),6e3)}waitingList(){this.addToWaitingList=true;this.productWaitingList.emit({productId:this.productId,addToWaitingList:this.addToWaitingList})}formatPrices(){var t;let i=(t=document.documentElement.lang)!==null&&t!==void 0?t:"it-IT";if(i.length==2){i=`${i}-${i.toUpperCase()}`}this.priceFormatted=this.price.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2});this.salePriceFormatted=this.salePrice.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2})}render(){const t=this.hasBackground&&!this.isMini?"hasBackground":"";const i=this.onlyIconButton&&!this.isMini?"iconOnly":"";const e=this.outOfStock?"justify-between":"";const o=this.hoverImg?"has-hover-image":"";const r=this.isMini?"is-mini":"";function n(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(a,null,!this.isMini&&this.badge?s("jump-badge",{class:`${t} ${i}`,variant:this.badgeColor,dimension:"small",label:this.badge}):"",!this.isMini&&this.hasFavorite?s("jump-button",{onClick:()=>this.onToggleFavorite(),class:`Favorite ${t} ${i}`,variant:this.favorite?"primary":"neutral",size:"small",text:true,onlyIcon:true},s("jump-icon",{slot:"prefix",name:"heart",category:this.favorite?"solid":"light",size:"medium"})):this.hasSlotForFavorite?s("div",{class:"Favorite"},s("slot",{name:"favorite"})):null,s("div",{class:`Media ${i} ${t} ${r}`},s("a",{href:this.link},s("figure",{class:`Images ${o} `},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt}):"",this.hoverImg&&!this.videoSrc?s("img",{class:"Images__OnHover",src:this.hoverImg,alt:this.hoverImgAlt}):""),this.videoSrc&&!this.img?s("video",{autoplay:true},s("source",{src:this.videoSrc,type:"video/mp4"}),s("source",{src:this.videoSrc,type:"video/mov"}),s("source",{src:this.videoSrc,type:"video/webm"})):""),!this.isMini?s("div",{class:`NotificationCart ${this.addedToCart==true?"is-active fade-in-out":""}`},s("jump-button",{href:this.notificationUrl,variant:"white",text:true},s("jump-icon",{slot:"prefix",name:"check"}),s("span",null," ",this.notificationText," "))):null,!this.isMini&&this.onlyIconButton&&!this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("jump-button",{variant:"secondary",size:"large",pill:true,onlyIcon:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular"}))):"",!this.isMini&&this.onlyIconButton&&this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("slot",{name:"add-to-cart"})):""),s("div",{class:`Content ${t} ${i} ${r}`},s("div",{class:`Body ${t} ${i} ${r}`},s("div",null,s("div",{class:"Info"},s("a",{href:this.link,class:"Product"},this.productName),this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${r}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",n(this.price,this.salePrice),"% "):null,!this.isMini?s("div",{class:`Price__Regular ${this.salePrice&&this.salePrice<this.price?"sale":""}`},this.currency,this.priceFormatted):s("div",{class:`Price__Regular`},this.currency,this.salePrice&&this.salePrice<this.price?this.salePriceFormatted:this.priceFormatted),!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Sale"},this.currency,this.salePriceFormatted):null):null),!this.isMini||this.variations.length!=0?s("div",null,this.variations.length!=0?s("div",{class:"SelectVariations"},s("select",{ref:t=>this.variationSelectEl=t,onChange:()=>{this.onVariationSelected()}},this.variations.filter((t=>!t.imgUrl)).map((t=>s("option",{value:t.code},t.label))))):null,s("slot",{name:"quantity"})):null),s("div",{class:`Footer ${e} ${t} ${i} ${r}`},this.outOfStock&&!this.isMini?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton&&!this.hasSlotAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular",size:"small"}),this.addToCartText):"",!this.outOfStock&&!this.onlyIconButton&&this.hasSlotAddToCart?s("slot",{name:"add-to-cart"}):null)))}get JumpCardEcommerce(){return e(this)}};n.style=r;export{n as jump_card_ecommerce};
2
+ //# sourceMappingURL=p-a9b78af2.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","setPrice","price","salePrice","shouldFormat","this","formatPrices","addOption","e","props","detail","variations","Object","assign","onVariationSelected","currentValue","variationSelectEl","value","variation","find","code","selectedVariation","variationSelected","emit","componentWillLoad","componentDidLoad","jumpQuantityEl","querySelector","addEventListener","onQuantityChange","bind","quantity","getValue","then","disconnectedCallback","removeEventListener","_a","onToggleFavorite","favorite","toggleFavorite","productId","addProductToCart","addedToCart","length","payload","productAddToCart","setTimeout","waitingList","addToWaitingList","productWaitingList","locale","document","documentElement","lang","toUpperCase","priceFormatted","toLocaleString","minimumFractionDigits","maximumFractionDigits","salePriceFormatted","render","backgroundClass","hasBackground","isMini","iconOnlyClass","onlyIconButton","justifyClass","outOfStock","hasImageOnHover","hoverImg","miniCard","calculateDiscount","discount","toFixed","h","Host","badge","class","variant","badgeColor","dimension","label","hasFavorite","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","href","link","img","videoSrc","src","alt","imgAlt","hoverImgAlt","autoplay","type","notificationUrl","notificationText","hasSlotAddToCart","pill","productName","subtitle","currency","ref","el","onChange","filter","imgUrl","map","outOfStockText","addToCartColor","waitingListText","addToCartText"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\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-background);\n color: var(--jump-card-color);\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n }\n }\n\n .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\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 object-fit: cover;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n }\n\n &__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n }\n\n &.has-hover-image {\n &:hover .Images__Front {\n opacity: 0;\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-padding) var(--jump-card-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 .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n z-index: 2;\n transform: translate3d(0, 0, 0);\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-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-padding) 0;\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 &.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 .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n\n &__AddToCart {\n --jump-button-color: var(--jump-card-ecommerce-add-to-cart-color);\n --jump-button-background: var(--jump-card-ecommerce-add-to-cart-background);\n --jump-button-color-hover: var(--jump-card-ecommerce-add-to-cart-color-hover);\n --jump-button-background-hover: var(--jump-card-ecommerce-add-to-cart-background-hover);\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--status-danger-standard);\n }\n\n .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n z-index: 2;\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\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(--status-danger-standard);\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\n .SelectVariations {\n display: flex;\n align-items: flex-end;\n\n select {\n appearance: none;\n background-color: transparent;\n border: 1px solid var(--neutral-grey-secondary);\n border-radius: 3px;\n color: var(--neutral-grey-secondary);\n font-size: var(--fs-300);\n padding: 0.5rem 0.75rem;\n max-width: 100%;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n }\n }\n}\n\n.slide-in-bottom {\n animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.slide-out-bottom {\n animation: slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;\n}\n\n.fade-in-out {\n animation-name: fade-in-out;\n animation-duration: 6s;\n animation-timing-function: ease-in-out;\n}\n\n@keyframes fade-in-out {\n from {\n opacity: 0;\n transform: translateY(100px);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100px);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\ninterface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({ mutable: true, reflect: true }) favorite: boolean = false;\n\n /** Indicate if the whislist is active in shop*/\n @Prop() hasFavorite: boolean = false;\n\n /** Indicate if the whislist will be slotted*/\n @Prop() hasSlotForFavorite: boolean = false;\n\n /** Indicate if the add to cart btn will be slotted*/\n @Prop() hasSlotAddToCart: boolean = false;\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 over image's src of the card*/\n @Prop() hoverImg: string;\n\n /** Indicates the hover img's alt of the card*/\n @Prop() hoverImgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\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() addToCartColor: 'primary' | 'secondary'|'white'|'neutral' = 'secondary';\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 /** Indicates the button class of the add to cart / notification button */\n @Prop() addToCartText: string = 'Aggiungi al carrello';\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /* ---------------------- @STATE ------------------------- */\n\n /** Indicate if the product is added to cart --> non deve esserci nelle storie! */\n @Prop() addedToCart: boolean = false;\n\n @Prop() endAddedToCart: boolean = false;\n\n @State() variations: Variation[] = [];\n\n @State() selectedVariation: Variation;\n\n @State() priceFormatted: string;\n\n @State() salePriceFormatted: string;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\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 @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n this.variations = [...this.variations, { ...props }];\n }\n\n onVariationSelected() {\n let currentValue = this.variationSelectEl.value;\n let variation = this.variations.find(\n (variation) => variation.code == currentValue,\n );\n this.selectedVariation = variation;\n this.variationSelected.emit(variation); // verificare se corretto: emetto l'evento\n }\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {\n }\n\n componentDidLoad() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));\n this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {\n this.quantity = quantity;\n });\n }\n\n this.formatPrices();\n }\n\n disconnectedCallback() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.removeEventListener('jump-change', this.onQuantityChange);\n }\n }\n\n /* ---------------------- @METHODS ------------------------- */\n onQuantityChange(e) {\n this.quantity = e.detail.value ?? false;\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite,\n },\n );\n }\n\n addProductToCart() {\n this.addedToCart = true;\n let variations = this.selectedVariation;\n if (!variations && this.variations.length > 0) {\n variations = this.variations[0];\n }\n\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: this.quantity ?? null,\n variation: variations ?? null,\n };\n this.productAddToCart.emit(payload);\n\n setTimeout(() => {\n this.addedToCart = false;\n }, 6000);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList,\n },\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 = this.hasBackground && !this.isMini ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton && !this.isMini ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n const hasImageOnHover = this.hoverImg ? 'has-hover-image' : '';\n const miniCard = this.isMini ? 'is-mini' : '';\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>\n {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n\n {!this.isMini && this.hasFavorite ?\n <jump-button onClick={() => this.onToggleFavorite()} class={`Favorite ${backgroundClass} ${iconOnlyClass}`}\n variant={this.favorite ? 'primary' : 'neutral'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'solid' : 'light'}\n size=\"medium\"></jump-icon>\n </jump-button>\n :\n this.hasSlotForFavorite ? <div class=\"Favorite\">\n <slot name=\"favorite\"></slot>\n </div> : null\n }\n\n <div class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}>\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} `}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt}></img> : ''}\n {this.hoverImg && !this.videoSrc ?\n <img class=\"Images__OnHover\" src={this.hoverImg} alt={this.hoverImgAlt}></img> : ''}\n </figure>\n {this.videoSrc && !this.img ?\n <video autoplay>\n <source src={this.videoSrc} type=\"video/mp4\" />\n <source src={this.videoSrc} type=\"video/mov\" />\n <source src={this.videoSrc} type=\"video/webm\" />\n </video> : ''}\n </a>\n {!this.isMini ?\n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active fade-in-out' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text>\n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon>\n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n : null\n }\n\n {!this.isMini && this.onlyIconButton && !this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\"></jump-icon>\n </jump-button>\n </div>\n : ''\n }\n\n {!this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <slot name=\"add-to-cart\"></slot>\n </div>\n : ''\n }\n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div>\n <div class=\"Info\">\n <a href={this.link} class=\"Product\">{this.productName}</a>\n {!this.isMini && this.subtitle ? <div class=\"Subtitle\">{this.subtitle}</div> : null}\n </div>\n\n {this.price ?\n <div class={`Price ${miniCard}`}>\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Discount\"> {calculateDiscount(this.price, this.salePrice)}% </div>\n : null}\n\n {!this.isMini ?\n <div class={`Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}`}>\n {this.currency}{this.priceFormatted}\n </div>\n :\n <div class={`Price__Regular`}>\n {this.currency}{this.salePrice && this.salePrice < this.price ? this.salePriceFormatted : this.priceFormatted}\n </div>\n }\n\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Sale\">{this.currency}{this.salePriceFormatted}</div>\n : null}\n </div>\n : null}\n </div>\n\n {!this.isMini || this.variations.length != 0 ?\n <div>\n {this.variations.length != 0 ?\n <div class=\"SelectVariations\">\n <select\n ref={(el) => (this.variationSelectEl = el)} //salvo questo elemento in this.variationSelectEl\n onChange={() => {\n this.onVariationSelected();\n }}\n >\n {this.variations\n .filter((variation) => !variation.imgUrl)\n .map((variation) => (\n <option value={variation.code}>{variation.label}</option>\n ))}\n </select>\n </div>\n : null}\n <slot name=\"quantity\"></slot>\n </div>\n : null}\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock && !this.isMini?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name=\"bell\" category=\"regular\" size=\"small\"></jump-icon>\n {this.waitingListText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && !this.hasSlotAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\" size=\"small\"></jump-icon>\n {this.addToCartText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && this.hasSlotAddToCart ?\n <slot name=\"add-to-cart\"></slot>\n : null\n }\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,u4KAC7B,MAAAC,EAAeD,E,MCcFE,EAAiB,M,6QAQM,M,mBAGD,M,mCAM2B,M,iBAG7B,M,wBAGO,M,sBAGF,M,6LAwBD,uB,wIAkBR,I,oBAGyC,Y,gBAGyB,Y,gBAG/B,M,iDAM9B,uB,qBAGE,yB,sBAGE,M,YAGV,M,iBAKK,M,oBAEG,M,gBAEC,G,iGA6BnC,cAAMC,CAASC,EAAeC,GAC5B,IAAIC,EAAe,MACnB,GAAIF,GAASA,EAAQ,EAAG,CACtBE,EAAe,KACfC,KAAKH,MAAQA,C,CAGf,GAAIC,GAAaA,EAAY,EAAG,CAC9BE,KAAKF,UAAYA,C,CAGnB,GAAIC,EAAc,CAChBC,KAAKC,c,EAKT,SAAAC,CAAUC,GACR,IAAIC,EAAQD,EAAEE,OACdL,KAAKM,WAAa,IAAIN,KAAKM,WAAUC,OAAAC,OAAA,GAAOJ,G,CAG9C,mBAAAK,GACE,IAAIC,EAAeV,KAAKW,kBAAkBC,MAC1C,IAAIC,EAAYb,KAAKM,WAAWQ,MAC7BD,GAAcA,EAAUE,MAAQL,IAEnCV,KAAKgB,kBAAoBH,EACzBb,KAAKiB,kBAAkBC,KAAKL,E,CAK9B,iBAAAM,G,CAGA,gBAAAC,GACEpB,KAAKqB,eAAiBrB,KAAKL,kBAAkB2B,cAAc,iBAE3D,GAAItB,KAAKqB,eAAgB,CACvBrB,KAAKqB,eAAeE,iBAAiB,cAAevB,KAAKwB,iBAAiBC,KAAKzB,OAC/EA,KAAK0B,SAAW1B,KAAKqB,eAA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BC,QAASzE,KAAK8G,eAAgB/B,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAM9E,KAAK0C,eACzG2B,EAAA,aAAWa,KAAK,SAASC,KAAK,OAAOC,SAAS,UAAUL,KAAK,UAC5D/E,KAAK+G,iBACS,IAGjB/G,KAAK8D,aAAe9D,KAAK4D,iBAAmB5D,KAAKkG,iBACjD7B,EAAA,eAAaG,MAAM,oBAAoBC,QAASzE,KAAK8G,eAAgB/B,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAM9E,KAAKoC,oBACzGiC,EAAA,aAAWa,KAAK,SAASC,KAAK,gBAAgBC,SAAS,UAAUL,KAAK,UACrE/E,KAAKgH,eACS,IAGjBhH,KAAK8D,aAAe9D,KAAK4D,gBAAkB5D,KAAKkG,iBAC9C7B,EAAA,QAAMc,KAAK,gBACX,O"}
1
+ {"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","setPrice","price","salePrice","shouldFormat","this","formatPrices","addOption","e","props","detail","variations","Object","assign","onVariationSelected","currentValue","variationSelectEl","value","variation","find","code","selectedVariation","variationSelected","emit","componentWillLoad","componentDidLoad","jumpQuantityEl","querySelector","addEventListener","onQuantityChange","bind","quantity","getValue","then","disconnectedCallback","removeEventListener","_a","onToggleFavorite","favorite","toggleFavorite","productId","addProductToCart","addedToCart","length","payload","productAddToCart","setTimeout","waitingList","addToWaitingList","productWaitingList","locale","document","documentElement","lang","toUpperCase","priceFormatted","toLocaleString","minimumFractionDigits","maximumFractionDigits","salePriceFormatted","render","backgroundClass","hasBackground","isMini","iconOnlyClass","onlyIconButton","justifyClass","outOfStock","hasImageOnHover","hoverImg","miniCard","calculateDiscount","discount","toFixed","h","Host","badge","class","variant","badgeColor","dimension","label","hasFavorite","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","href","link","img","videoSrc","src","alt","imgAlt","hoverImgAlt","autoplay","type","notificationUrl","notificationText","hasSlotAddToCart","pill","productName","subtitle","currency","ref","el","onChange","filter","imgUrl","map","outOfStockText","addToCartColor","waitingListText","addToCartText"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\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-background);\n color: var(--jump-card-color);\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n }\n }\n\n .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\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 object-fit: cover;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n }\n\n &__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n }\n\n &.has-hover-image {\n &:hover .Images__Front {\n opacity: 0;\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-padding) var(--jump-card-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 .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n z-index: 2;\n transform: translate3d(0, 0, 0);\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-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-padding) 0;\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 &.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 .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n\n &__AddToCart {\n --jump-button-color: var(--jump-card-ecommerce-add-to-cart-color);\n --jump-button-background: var(--jump-card-ecommerce-add-to-cart-background);\n --jump-button-color-hover: var(--jump-card-ecommerce-add-to-cart-color-hover);\n --jump-button-background-hover: var(--jump-card-ecommerce-add-to-cart-background-hover);\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--status-danger-standard);\n }\n\n .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n z-index: 2;\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\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(--status-danger-standard);\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\n .SelectVariations {\n display: flex;\n align-items: flex-end;\n\n select {\n appearance: none;\n background-color: transparent;\n border: 1px solid var(--neutral-grey-secondary);\n border-radius: 3px;\n color: var(--neutral-grey-secondary);\n font-size: var(--fs-300);\n padding: 0.5rem 0.75rem;\n max-width: 100%;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n }\n }\n}\n\n.slide-in-bottom {\n animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.slide-out-bottom {\n animation: slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;\n}\n\n.fade-in-out {\n animation-name: fade-in-out;\n animation-duration: 6s;\n animation-timing-function: ease-in-out;\n}\n\n@keyframes fade-in-out {\n from {\n opacity: 0;\n transform: translateY(100px);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100px);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\ninterface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({ mutable: true, reflect: true }) favorite: boolean = false;\n\n /** Indicate if the whislist is active in shop*/\n @Prop() hasFavorite: boolean = false;\n\n /** Indicate if the whislist will be slotted*/\n @Prop() hasSlotForFavorite: boolean = false;\n\n /** Indicate if the add to cart btn will be slotted*/\n @Prop() hasSlotAddToCart: boolean = false;\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 over image's src of the card*/\n @Prop() hoverImg: string;\n\n /** Indicates the hover img's alt of the card*/\n @Prop() hoverImgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\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() addToCartColor: 'primary' | 'secondary'|'white'|'neutral' = 'secondary';\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 /** Indicates the button class of the add to cart / notification button */\n @Prop() addToCartText: string = 'Aggiungi al carrello';\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /* ---------------------- @STATE ------------------------- */\n\n /** Indicate if the product is added to cart --> non deve esserci nelle storie! */\n @Prop() addedToCart: boolean = false;\n\n @Prop() endAddedToCart: boolean = false;\n\n @State() variations: Variation[] = [];\n\n @State() selectedVariation: Variation;\n\n @State() priceFormatted: string;\n\n @State() salePriceFormatted: string;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\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 @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n this.variations = [...this.variations, { ...props }];\n }\n\n onVariationSelected() {\n let currentValue = this.variationSelectEl.value;\n let variation = this.variations.find(\n (variation) => variation.code == currentValue,\n );\n this.selectedVariation = variation;\n this.variationSelected.emit(variation); // verificare se corretto: emetto l'evento\n }\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {\n }\n\n componentDidLoad() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));\n this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {\n this.quantity = quantity;\n });\n }\n\n this.formatPrices();\n }\n\n disconnectedCallback() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.removeEventListener('jump-change', this.onQuantityChange);\n }\n }\n\n /* ---------------------- @METHODS ------------------------- */\n onQuantityChange(e) {\n this.quantity = e.detail.value ?? false;\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite,\n },\n );\n }\n\n addProductToCart() {\n this.addedToCart = true;\n let variations = this.selectedVariation;\n if (!variations && this.variations.length > 0) {\n variations = this.variations[0];\n }\n\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: this.quantity ?? null,\n variation: variations ?? null,\n };\n this.productAddToCart.emit(payload);\n\n setTimeout(() => {\n this.addedToCart = false;\n }, 6000);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList,\n },\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 = this.hasBackground && !this.isMini ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton && !this.isMini ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n const hasImageOnHover = this.hoverImg ? 'has-hover-image' : '';\n const miniCard = this.isMini ? 'is-mini' : '';\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>\n {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n\n {!this.isMini && this.hasFavorite ?\n <jump-button onClick={() => this.onToggleFavorite()} class={`Favorite ${backgroundClass} ${iconOnlyClass}`}\n variant={this.favorite ? 'primary' : 'neutral'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'solid' : 'light'}\n size=\"medium\"></jump-icon>\n </jump-button>\n :\n this.hasSlotForFavorite ? <div class=\"Favorite\">\n <slot name=\"favorite\"></slot>\n </div> : null\n }\n\n <div class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}>\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} `}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt}></img> : ''}\n {this.hoverImg && !this.videoSrc ?\n <img class=\"Images__OnHover\" src={this.hoverImg} alt={this.hoverImgAlt}></img> : ''}\n </figure>\n {this.videoSrc && !this.img ?\n <video autoplay>\n <source src={this.videoSrc} type=\"video/mp4\" />\n <source src={this.videoSrc} type=\"video/mov\" />\n <source src={this.videoSrc} type=\"video/webm\" />\n </video> : ''}\n </a>\n {!this.isMini ?\n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active fade-in-out' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text>\n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon>\n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n : null\n }\n\n {!this.isMini && this.onlyIconButton && !this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\"></jump-icon>\n </jump-button>\n </div>\n : ''\n }\n\n {!this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <slot name=\"add-to-cart\"></slot>\n </div>\n : ''\n }\n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div>\n <div class=\"Info\">\n <a href={this.link} class=\"Product\">{this.productName}</a>\n {this.subtitle ? <div class=\"Subtitle\">{this.subtitle}</div> : null}\n </div>\n\n {this.price ?\n <div class={`Price ${miniCard}`}>\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Discount\"> {calculateDiscount(this.price, this.salePrice)}% </div>\n : null}\n\n {!this.isMini ?\n <div class={`Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}`}>\n {this.currency}{this.priceFormatted}\n </div>\n :\n <div class={`Price__Regular`}>\n {this.currency}{this.salePrice && this.salePrice < this.price ? this.salePriceFormatted : this.priceFormatted}\n </div>\n }\n\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Sale\">{this.currency}{this.salePriceFormatted}</div>\n : null}\n </div>\n : null}\n </div>\n\n {!this.isMini || this.variations.length != 0 ?\n <div>\n {this.variations.length != 0 ?\n <div class=\"SelectVariations\">\n <select\n ref={(el) => (this.variationSelectEl = el)} //salvo questo elemento in this.variationSelectEl\n onChange={() => {\n this.onVariationSelected();\n }}\n >\n {this.variations\n .filter((variation) => !variation.imgUrl)\n .map((variation) => (\n <option value={variation.code}>{variation.label}</option>\n ))}\n </select>\n </div>\n : null}\n <slot name=\"quantity\"></slot>\n </div>\n : null}\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock && !this.isMini?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name=\"bell\" category=\"regular\" size=\"small\"></jump-icon>\n {this.waitingListText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && !this.hasSlotAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\" size=\"small\"></jump-icon>\n {this.addToCartText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && this.hasSlotAddToCart ?\n <slot name=\"add-to-cart\"></slot>\n : null\n }\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,u4KAC7B,MAAAC,EAAeD,E,MCcFE,EAAiB,M,6QAQM,M,mBAGD,M,mCAM2B,M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KAAK,gBAAgBC,SAAS,UAAUL,KAAK,UACrE/E,KAAKgH,eACS,IAGjBhH,KAAK8D,aAAe9D,KAAK4D,gBAAkB5D,KAAKkG,iBAC9C7B,EAAA,QAAMc,KAAK,gBACX,O"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jumpgroup/jump-design-system",
3
- "version": "0.3.55",
3
+ "version": "0.3.57",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",