@jumpgroup/jump-design-system 0.3.64 → 0.3.67

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.
Files changed (50) hide show
  1. package/dist/cjs/jump-design-system.cjs.js +1 -1
  2. package/dist/cjs/jump-filter-select.cjs.entry.js +4 -1
  3. package/dist/cjs/jump-filter-select.cjs.entry.js.map +1 -1
  4. package/dist/cjs/jump-filter-switch.cjs.entry.js +3 -1
  5. package/dist/cjs/jump-filter-switch.cjs.entry.js.map +1 -1
  6. package/dist/cjs/jump-quantity.cjs.entry.js +12 -7
  7. package/dist/cjs/jump-quantity.cjs.entry.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js +6 -11
  10. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -1
  11. package/dist/collection/components/jump-filter-select/jump-filter-select.js +18 -1
  12. package/dist/collection/components/jump-filter-select/jump-filter-select.js.map +1 -1
  13. package/dist/collection/components/jump-filter-switch/jump-filter-switch.js +17 -1
  14. package/dist/collection/components/jump-filter-switch/jump-filter-switch.js.map +1 -1
  15. package/dist/collection/components/jump-quantity/jump-quantity.js +19 -8
  16. package/dist/collection/components/jump-quantity/jump-quantity.js.map +1 -1
  17. package/dist/collection/components/jump-quantity/jump-quantity.stories.js +6 -1
  18. package/dist/collection/components/jump-quantity/jump-quantity.stories.js.map +1 -1
  19. package/dist/components/jump-filter-select.js +4 -1
  20. package/dist/components/jump-filter-select.js.map +1 -1
  21. package/dist/components/jump-filter-switch.js +3 -1
  22. package/dist/components/jump-filter-switch.js.map +1 -1
  23. package/dist/components/jump-quantity.js +13 -7
  24. package/dist/components/jump-quantity.js.map +1 -1
  25. package/dist/esm/jump-design-system.js +1 -1
  26. package/dist/esm/jump-filter-select.entry.js +4 -1
  27. package/dist/esm/jump-filter-select.entry.js.map +1 -1
  28. package/dist/esm/jump-filter-switch.entry.js +3 -1
  29. package/dist/esm/jump-filter-switch.entry.js.map +1 -1
  30. package/dist/esm/jump-quantity.entry.js +12 -7
  31. package/dist/esm/jump-quantity.entry.js.map +1 -1
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  34. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  35. package/dist/jump-design-system/p-3c1076e0.entry.js +2 -0
  36. package/dist/jump-design-system/p-3c1076e0.entry.js.map +1 -0
  37. package/dist/jump-design-system/{p-35633b03.entry.js → p-469ccf77.entry.js} +2 -2
  38. package/dist/jump-design-system/p-469ccf77.entry.js.map +1 -0
  39. package/dist/jump-design-system/{p-53bf2958.entry.js → p-7c06855a.entry.js} +2 -2
  40. package/dist/jump-design-system/p-7c06855a.entry.js.map +1 -0
  41. package/dist/types/components/jump-filter-select/jump-filter-select.d.ts +1 -0
  42. package/dist/types/components/jump-filter-switch/jump-filter-switch.d.ts +1 -0
  43. package/dist/types/components/jump-quantity/jump-quantity.d.ts +1 -0
  44. package/dist/types/components/jump-quantity/jump-quantity.stories.d.ts +5 -0
  45. package/dist/types/components.d.ts +4 -0
  46. package/package.json +1 -1
  47. package/dist/jump-design-system/p-172a50cb.entry.js +0 -2
  48. package/dist/jump-design-system/p-172a50cb.entry.js.map +0 -1
  49. package/dist/jump-design-system/p-35633b03.entry.js.map +0 -1
  50. package/dist/jump-design-system/p-53bf2958.entry.js.map +0 -1
@@ -395,6 +395,7 @@ const JumpFilterSwitch = class {
395
395
  constructor(hostRef) {
396
396
  index.registerInstance(this, hostRef);
397
397
  this.toggleCheckbox = index.createEvent(this, "jump-switch-change", 7);
398
+ this.toggleCheckboxFilterChange = index.createEvent(this, "jump-filterchange", 7);
398
399
  this.value = undefined;
399
400
  this.label = undefined;
400
401
  this.checked = false;
@@ -419,6 +420,7 @@ const JumpFilterSwitch = class {
419
420
  checked: this.checked,
420
421
  };
421
422
  this.toggleCheckbox.emit(eventData);
423
+ this.toggleCheckboxFilterChange.emit(eventData);
422
424
  });
423
425
  }
424
426
  }
@@ -430,7 +432,7 @@ const JumpFilterSwitch = class {
430
432
  return this.checked;
431
433
  }
432
434
  render() {
433
- return (index.h(index.Host, { key: 'f0ede0229c5942aaef3d39acb34930d3a8b7bb49', ref: (host) => (this.host = host) }, this.value && this.label && (index.h("sl-switch", { key: '93db07ff6db118788727e5052457cfa9c3b28754', value: this.value, ref: (el) => (this.el = el), checked: this.checked, disabled: this.disabled }, this.label))));
435
+ return (index.h(index.Host, { key: '38b92b7cbad470b5ca944e2734d01f9409262881', ref: (host) => (this.host = host) }, this.value && this.label && (index.h("sl-switch", { key: '2fac822671f25f54073e0eb9bf01a441a0ffe927', value: this.value, ref: (el) => (this.el = el), checked: this.checked, disabled: this.disabled }, this.label))));
434
436
  }
435
437
  };
436
438
  JumpFilterSwitch.style = JumpFilterSwitchStyle0;
@@ -1 +1 @@
1
- {"file":"jump-filter-switch.entry.cjs.js","mappings":";;;;;;;;;;AAAA;AAEA,IAAI,qBAAqB,GAAGA,kBAAG,CAAC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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CAAC,SAAS,CAAC,CAAC;aACrC,CAAC,CAAC;SACJ;KACF;;;;;IAYD,MAAM,SAAS;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IAED,MAAM;QACJ,QACEC,QAACC,UAAI,qDAAC,GAAG,EAAE,CAAC,IAAiB,MAAM,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IACjD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KACvBD,wEACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,CAAC,EAAO,MAAM,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAChC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAEtB,IAAI,CAAC,KAAK,CACD,CACb,CACI,EACP;KACH;;;;;;","names":["css","ShoelaceElement","FormControlController","HasSlotController","html","classMap","ifDefined","live","component_styles_default","form_control_styles_default","__decorateClass","query","state","property","defaultValue","watch","h","Host"],"sources":["node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EU44RQUN.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.S33XS33R.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TUJRSXNR.js","src/components/jump-filter-switch/jump-filter-switch.scss?tag=jump-filter-switch&encapsulation=shadow","src/components/jump-filter-switch/jump-filter-switch.tsx"],"sourcesContent":["// src/components/switch/switch.styles.ts\nimport { css } from \"lit\";\nvar switch_styles_default = css`\n :host {\n display: inline-block;\n }\n\n :host([size='small']) {\n --height: var(--sl-toggle-size-small);\n --thumb-size: calc(var(--sl-toggle-size-small) + 4px);\n --width: calc(var(--height) * 2);\n\n font-size: var(--sl-input-font-size-small);\n }\n\n :host([size='medium']) {\n --height: var(--sl-toggle-size-medium);\n --thumb-size: calc(var(--sl-toggle-size-medium) + 4px);\n --width: calc(var(--height) * 2);\n\n font-size: var(--sl-input-font-size-medium);\n }\n\n :host([size='large']) {\n --height: var(--sl-toggle-size-large);\n --thumb-size: calc(var(--sl-toggle-size-large) + 4px);\n --width: calc(var(--height) * 2);\n\n font-size: var(--sl-input-font-size-large);\n }\n\n .switch {\n position: relative;\n display: inline-flex;\n align-items: center;\n font-family: var(--sl-input-font-family);\n font-size: inherit;\n font-weight: var(--sl-input-font-weight);\n color: var(--sl-input-label-color);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .switch__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--sl-color-neutral-400);\n border: solid var(--sl-input-border-width) var(--sl-color-neutral-400);\n border-radius: var(--height);\n transition:\n var(--sl-transition-fast) border-color,\n var(--sl-transition-fast) background-color;\n }\n\n .switch__control .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--sl-color-neutral-0);\n border-radius: 50%;\n border: solid var(--sl-input-border-width) var(--sl-color-neutral-400);\n translate: calc((var(--width) - var(--height)) / -2);\n transition:\n var(--sl-transition-fast) translate ease,\n var(--sl-transition-fast) background-color,\n var(--sl-transition-fast) border-color,\n var(--sl-transition-fast) box-shadow;\n }\n\n .switch__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* Hover */\n .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--sl-color-neutral-400);\n border-color: var(--sl-color-neutral-400);\n }\n\n .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-neutral-400);\n }\n\n /* Focus */\n .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {\n background-color: var(--sl-color-neutral-400);\n border-color: var(--sl-color-neutral-400);\n }\n\n .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n outline: var(--sl-focus-ring);\n outline-offset: var(--sl-focus-ring-offset);\n }\n\n /* Checked */\n .switch--checked .switch__control {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n }\n\n .switch--checked .switch__control .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n translate: calc((var(--width) - var(--height)) / 2);\n }\n\n /* Checked + hover */\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n }\n\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n }\n\n /* Checked + focus */\n .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n }\n\n .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n outline: var(--sl-focus-ring);\n outline-offset: var(--sl-focus-ring-offset);\n }\n\n /* Disabled */\n .switch--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .switch__label {\n display: inline-block;\n line-height: var(--height);\n margin-inline-start: 0.5em;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host([required]) .switch__label::after {\n content: var(--sl-input-required-content);\n color: var(--sl-input-required-content-color);\n margin-inline-start: var(--sl-input-required-content-offset);\n }\n\n @media (forced-colors: active) {\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb,\n .switch--checked .switch__control .switch__thumb {\n background-color: ButtonText;\n }\n }\n`;\n\nexport {\n switch_styles_default\n};\n","import {\n switch_styles_default\n} from \"./chunk.EU44RQUN.js\";\nimport {\n defaultValue\n} from \"./chunk.GI7VDIWX.js\";\nimport {\n form_control_styles_default\n} from \"./chunk.SI4ACBFK.js\";\nimport {\n FormControlController\n} from \"./chunk.KWPBDQ6I.js\";\nimport {\n HasSlotController\n} from \"./chunk.NYIIDP5N.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/switch/switch.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { property, query, state } from \"lit/decorators.js\";\nvar SlSwitch = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.formControlController = new FormControlController(this, {\n value: (control) => control.checked ? control.value || \"on\" : void 0,\n defaultValue: (control) => control.defaultChecked,\n setValue: (control, checked) => control.checked = checked\n });\n this.hasSlotController = new HasSlotController(this, \"help-text\");\n this.hasFocus = false;\n this.title = \"\";\n this.name = \"\";\n this.size = \"medium\";\n this.disabled = false;\n this.checked = false;\n this.defaultChecked = false;\n this.form = \"\";\n this.required = false;\n this.helpText = \"\";\n }\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n handleBlur() {\n this.hasFocus = false;\n this.emit(\"sl-blur\");\n }\n handleInput() {\n this.emit(\"sl-input\");\n }\n handleInvalid(event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n handleClick() {\n this.checked = !this.checked;\n this.emit(\"sl-change\");\n }\n handleFocus() {\n this.hasFocus = true;\n this.emit(\"sl-focus\");\n }\n handleKeyDown(event) {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n this.checked = false;\n this.emit(\"sl-change\");\n this.emit(\"sl-input\");\n }\n if (event.key === \"ArrowRight\") {\n event.preventDefault();\n this.checked = true;\n this.emit(\"sl-change\");\n this.emit(\"sl-input\");\n }\n }\n handleCheckedChange() {\n this.input.checked = this.checked;\n this.formControlController.updateValidity();\n }\n handleDisabledChange() {\n this.formControlController.setValidity(true);\n }\n /** Simulates a click on the switch. */\n click() {\n this.input.click();\n }\n /** Sets focus on the switch. */\n focus(options) {\n this.input.focus(options);\n }\n /** Removes focus from the switch. */\n blur() {\n this.input.blur();\n }\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n /** Gets the associated form, if one exists. */\n getForm() {\n return this.formControlController.getForm();\n }\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n render() {\n const hasHelpTextSlot = this.hasSlotController.test(\"help-text\");\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n return html`\n <div\n class=${classMap({\n \"form-control\": true,\n \"form-control--small\": this.size === \"small\",\n \"form-control--medium\": this.size === \"medium\",\n \"form-control--large\": this.size === \"large\",\n \"form-control--has-help-text\": hasHelpText\n })}\n >\n <label\n part=\"base\"\n class=${classMap({\n switch: true,\n \"switch--checked\": this.checked,\n \"switch--disabled\": this.disabled,\n \"switch--focused\": this.hasFocus,\n \"switch--small\": this.size === \"small\",\n \"switch--medium\": this.size === \"medium\",\n \"switch--large\": this.size === \"large\"\n })}\n >\n <input\n class=\"switch__input\"\n type=\"checkbox\"\n title=${this.title}\n name=${this.name}\n value=${ifDefined(this.value)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n role=\"switch\"\n aria-checked=${this.checked ? \"true\" : \"false\"}\n aria-describedby=\"help-text\"\n @click=${this.handleClick}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @keydown=${this.handleKeyDown}\n />\n\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\"></span>\n </span>\n\n <div part=\"label\" class=\"switch__label\">\n <slot></slot>\n </div>\n </label>\n\n <div\n aria-hidden=${hasHelpText ? \"false\" : \"true\"}\n class=\"form-control__help-text\"\n id=\"help-text\"\n part=\"form-control-help-text\"\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n};\nSlSwitch.styles = [component_styles_default, form_control_styles_default, switch_styles_default];\n__decorateClass([\n query('input[type=\"checkbox\"]')\n], SlSwitch.prototype, \"input\", 2);\n__decorateClass([\n state()\n], SlSwitch.prototype, \"hasFocus\", 2);\n__decorateClass([\n property()\n], SlSwitch.prototype, \"title\", 2);\n__decorateClass([\n property()\n], SlSwitch.prototype, \"name\", 2);\n__decorateClass([\n property()\n], SlSwitch.prototype, \"value\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlSwitch.prototype, \"size\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlSwitch.prototype, \"disabled\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlSwitch.prototype, \"checked\", 2);\n__decorateClass([\n defaultValue(\"checked\")\n], SlSwitch.prototype, \"defaultChecked\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlSwitch.prototype, \"form\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlSwitch.prototype, \"required\", 2);\n__decorateClass([\n property({ attribute: \"help-text\" })\n], SlSwitch.prototype, \"helpText\", 2);\n__decorateClass([\n watch(\"checked\", { waitUntilFirstUpdate: true })\n], SlSwitch.prototype, \"handleCheckedChange\", 1);\n__decorateClass([\n watch(\"disabled\", { waitUntilFirstUpdate: true })\n], SlSwitch.prototype, \"handleDisabledChange\", 1);\n\nexport {\n SlSwitch\n};\n","import {\n SlSwitch\n} from \"./chunk.S33XS33R.js\";\n\n// src/components/switch/switch.ts\nvar switch_default = SlSwitch;\nSlSwitch.define(\"sl-switch\");\n\nexport {\n switch_default\n};\n","@import '../../../node_modules/@shoelace-style/shoelace/dist/themes/light.css';\n\n:host {\n /* Definizione delle variabili per il nostro componente */\n --jump-switch-width: 36px;\n --jump-switch-height: 20px;\n --jump-switch-thumb-size: 14px;\n --jump-switch-thumb-color: var(--neutral-white, #ffffff);\n --jump-switch-active-color: var(--secondary-standard, #5e79ba);\n --jump-switch-inactive-color: var(--neutral-grey-disabled, #cbcbcb);\n --jump-switch-disabled-opacity: 0.5;\n --jump-switch-font-family: var(--ff-primary, 'Inter', sans-serif);\n --jump-switch-font-size: 16px;\n --jump-switch-font-weight: normal;\n --jump-switch-label-color: var(--neutral-black, #000000);\n\n display: flex;\n align-items: center;\n width: 100%;\n\n /* Stile diretto per Shoelace switch */\n sl-switch::part(base) {\n width: 100%;\n font-family: var(--jump-switch-font-family);\n font-size: var(--jump-switch-font-size);\n font-weight: var(--jump-switch-font-weight);\n color: var(--jump-switch-label-color);\n }\n\n sl-switch::part(control) {\n width: var(--jump-switch-width) !important;\n height: var(--jump-switch-height) !important;\n background-color: var(--jump-switch-inactive-color) !important;\n border-color: var(--jump-switch-inactive-color) !important;\n }\n\n sl-switch::part(thumb) {\n width: var(--jump-switch-thumb-size) !important;\n height: var(--jump-switch-thumb-size) !important;\n background-color: var(--jump-switch-thumb-color) !important;\n border-color: var(--jump-switch-thumb-color) !important;\n }\n\n sl-switch[checked]::part(control) {\n background-color: var(--jump-switch-active-color) !important;\n border-color: var(--jump-switch-active-color) !important;\n }\n\n sl-switch::part(label) {\n margin-left: 8px;\n }\n\n sl-switch[disabled] {\n opacity: var(--jump-switch-disabled-opacity);\n cursor: not-allowed;\n }\n\n /* Stile per il contatore */\n .count {\n margin-left: auto;\n color: var(--neutral-grey-secondary, #707070);\n font-size: 0.85em;\n }\n}\n","import { Component, Host, Prop, h, Event, EventEmitter, Method } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/switch/switch.js';\n\n/**\n * Componente switch per filtri con supporto per label e stato\n * @slot - Contenuto opzionale da mostrare accanto al switch (alternativo alla label)\n */\n@Component({\n tag: 'jump-filter-switch',\n styleUrl: 'jump-filter-switch.scss',\n shadow: true,\n})\nexport class JumpFilterSwitch {\n /** Il valore associato al switch */\n @Prop() value: string;\n\n /** La label da mostrare accanto al switch */\n @Prop() label: string;\n\n /** Stato del switch (acceso/spento) */\n @Prop({ reflect: true }) checked: boolean = false;\n\n /** Stato del switch (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Riferimento all'elemento host */\n host: HTMLElement;\n\n /** Riferimento all'elemento sl-switch interno */\n el: any; // Usiamo any per evitare problemi di tipo con le proprietà specifiche di sl-switch\n\n componentDidLoad() {\n this.listenSLChange();\n }\n\n /**\n * Ascolta gli eventi di cambio stato dal switch Shoelace\n */\n listenSLChange() {\n if (this.host) {\n this.host.addEventListener('sl-change', () => {\n // Ignora l'evento se lo switch è disabilitato\n if (this.disabled) {\n return;\n }\n\n this.checked = !this.checked;\n\n const eventData = {\n value: this.value,\n checked: this.checked,\n };\n\n this.toggleCheckbox.emit(eventData);\n });\n }\n }\n\n /**\n * Evento emesso quando cambia lo stato del switch\n */\n @Event({ eventName: 'jump-switch-change' }) toggleCheckbox: EventEmitter;\n\n /**\n * Metodo pubblico per verificare lo stato corrente del switch\n * @returns {boolean} Lo stato corrente del switch (true = acceso, false = spento)\n */\n @Method()\n async isChecked() {\n return this.checked;\n }\n\n render() {\n return (\n <Host ref={(host: HTMLElement) => (this.host = host)}>\n {this.value && this.label && (\n <sl-switch\n value={this.value}\n ref={(el: any) => (this.el = el)}\n checked={this.checked}\n disabled={this.disabled}\n >\n {this.label}\n </sl-switch>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"jump-filter-switch.entry.cjs.js","mappings":";;;;;;;;;;AAAA;AAEA,IAAI,qBAAqB,GAAGA,kBAAG,CAAC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;ACrID,IAAI,QAAQ,GAAG,cAAcC,gCAAe,CAAC;AAC7C,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,qBAAqB,GAAG,IAAIC,+BAAqB,CAAC,IAAI,EAAE;AACjE,MAAM,KAAK,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC;AAC1E,MAAM,YAAY,EAAE,CAAC,OAAO,KAAK,OAAO,CAAC,cAAc;AACvD,MAAM,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,GAAG,OAAO;AAC/D,KAAK,CAAC,CAAC;AACP,IAAI,IAAI,CAAC,iBAAiB,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mB;;MCWrB,gBAAgB;;;;;;;uBAQiB,KAAK;wBAGJ,KAAK;;IAQlD,gBAAgB;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;;;;IAKD,cAAc;QACZ,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE;;gBAEtC,IAAI,IAAI,CAAC,QAAQ,EAAE;oBACjB,OAAO;iBACR;gBAED,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;gBAE7B,MAAM,SAAS,GAAG;oBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC;gBAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBACpC,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACjD,CAAC,CAAC;SACJ;KACF;;;;;IAaD,MAAM,SAAS;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IAED,MAAM;QACJ,QACEC,QAACC,UAAI,qDAAC,GAAG,EAAE,CAAC,IAAiB,MAAM,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IACjD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KACvBD,wEACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,CAAC,EAAO,MAAM,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAChC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAEtB,IAAI,CAAC,KAAK,CACD,CACb,CACI,EACP;KACH;;;;;;","names":["css","ShoelaceElement","FormControlController","HasSlotController","html","classMap","ifDefined","live","component_styles_default","form_control_styles_default","__decorateClass","query","state","property","defaultValue","watch","h","Host"],"sources":["node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EU44RQUN.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.S33XS33R.js","node_modules/@shoelace-style/shoelace/dist/chunks/chunk.TUJRSXNR.js","src/components/jump-filter-switch/jump-filter-switch.scss?tag=jump-filter-switch&encapsulation=shadow","src/components/jump-filter-switch/jump-filter-switch.tsx"],"sourcesContent":["// src/components/switch/switch.styles.ts\nimport { css } from \"lit\";\nvar switch_styles_default = css`\n :host {\n display: inline-block;\n }\n\n :host([size='small']) {\n --height: var(--sl-toggle-size-small);\n --thumb-size: calc(var(--sl-toggle-size-small) + 4px);\n --width: calc(var(--height) * 2);\n\n font-size: var(--sl-input-font-size-small);\n }\n\n :host([size='medium']) {\n --height: var(--sl-toggle-size-medium);\n --thumb-size: calc(var(--sl-toggle-size-medium) + 4px);\n --width: calc(var(--height) * 2);\n\n font-size: var(--sl-input-font-size-medium);\n }\n\n :host([size='large']) {\n --height: var(--sl-toggle-size-large);\n --thumb-size: calc(var(--sl-toggle-size-large) + 4px);\n --width: calc(var(--height) * 2);\n\n font-size: var(--sl-input-font-size-large);\n }\n\n .switch {\n position: relative;\n display: inline-flex;\n align-items: center;\n font-family: var(--sl-input-font-family);\n font-size: inherit;\n font-weight: var(--sl-input-font-weight);\n color: var(--sl-input-label-color);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .switch__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--width);\n height: var(--height);\n background-color: var(--sl-color-neutral-400);\n border: solid var(--sl-input-border-width) var(--sl-color-neutral-400);\n border-radius: var(--height);\n transition:\n var(--sl-transition-fast) border-color,\n var(--sl-transition-fast) background-color;\n }\n\n .switch__control .switch__thumb {\n width: var(--thumb-size);\n height: var(--thumb-size);\n background-color: var(--sl-color-neutral-0);\n border-radius: 50%;\n border: solid var(--sl-input-border-width) var(--sl-color-neutral-400);\n translate: calc((var(--width) - var(--height)) / -2);\n transition:\n var(--sl-transition-fast) translate ease,\n var(--sl-transition-fast) background-color,\n var(--sl-transition-fast) border-color,\n var(--sl-transition-fast) box-shadow;\n }\n\n .switch__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* Hover */\n .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {\n background-color: var(--sl-color-neutral-400);\n border-color: var(--sl-color-neutral-400);\n }\n\n .switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-neutral-400);\n }\n\n /* Focus */\n .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {\n background-color: var(--sl-color-neutral-400);\n border-color: var(--sl-color-neutral-400);\n }\n\n .switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n outline: var(--sl-focus-ring);\n outline-offset: var(--sl-focus-ring-offset);\n }\n\n /* Checked */\n .switch--checked .switch__control {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n }\n\n .switch--checked .switch__control .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n translate: calc((var(--width) - var(--height)) / 2);\n }\n\n /* Checked + hover */\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n }\n\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n }\n\n /* Checked + focus */\n .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {\n background-color: var(--sl-color-primary-600);\n border-color: var(--sl-color-primary-600);\n }\n\n .switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {\n background-color: var(--sl-color-neutral-0);\n border-color: var(--sl-color-primary-600);\n outline: var(--sl-focus-ring);\n outline-offset: var(--sl-focus-ring-offset);\n }\n\n /* Disabled */\n .switch--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .switch__label {\n display: inline-block;\n line-height: var(--height);\n margin-inline-start: 0.5em;\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host([required]) .switch__label::after {\n content: var(--sl-input-required-content);\n color: var(--sl-input-required-content-color);\n margin-inline-start: var(--sl-input-required-content-offset);\n }\n\n @media (forced-colors: active) {\n .switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb,\n .switch--checked .switch__control .switch__thumb {\n background-color: ButtonText;\n }\n }\n`;\n\nexport {\n switch_styles_default\n};\n","import {\n switch_styles_default\n} from \"./chunk.EU44RQUN.js\";\nimport {\n defaultValue\n} from \"./chunk.GI7VDIWX.js\";\nimport {\n form_control_styles_default\n} from \"./chunk.SI4ACBFK.js\";\nimport {\n FormControlController\n} from \"./chunk.KWPBDQ6I.js\";\nimport {\n HasSlotController\n} from \"./chunk.NYIIDP5N.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/switch/switch.component.ts\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { live } from \"lit/directives/live.js\";\nimport { property, query, state } from \"lit/decorators.js\";\nvar SlSwitch = class extends ShoelaceElement {\n constructor() {\n super(...arguments);\n this.formControlController = new FormControlController(this, {\n value: (control) => control.checked ? control.value || \"on\" : void 0,\n defaultValue: (control) => control.defaultChecked,\n setValue: (control, checked) => control.checked = checked\n });\n this.hasSlotController = new HasSlotController(this, \"help-text\");\n this.hasFocus = false;\n this.title = \"\";\n this.name = \"\";\n this.size = \"medium\";\n this.disabled = false;\n this.checked = false;\n this.defaultChecked = false;\n this.form = \"\";\n this.required = false;\n this.helpText = \"\";\n }\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n firstUpdated() {\n this.formControlController.updateValidity();\n }\n handleBlur() {\n this.hasFocus = false;\n this.emit(\"sl-blur\");\n }\n handleInput() {\n this.emit(\"sl-input\");\n }\n handleInvalid(event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n handleClick() {\n this.checked = !this.checked;\n this.emit(\"sl-change\");\n }\n handleFocus() {\n this.hasFocus = true;\n this.emit(\"sl-focus\");\n }\n handleKeyDown(event) {\n if (event.key === \"ArrowLeft\") {\n event.preventDefault();\n this.checked = false;\n this.emit(\"sl-change\");\n this.emit(\"sl-input\");\n }\n if (event.key === \"ArrowRight\") {\n event.preventDefault();\n this.checked = true;\n this.emit(\"sl-change\");\n this.emit(\"sl-input\");\n }\n }\n handleCheckedChange() {\n this.input.checked = this.checked;\n this.formControlController.updateValidity();\n }\n handleDisabledChange() {\n this.formControlController.setValidity(true);\n }\n /** Simulates a click on the switch. */\n click() {\n this.input.click();\n }\n /** Sets focus on the switch. */\n focus(options) {\n this.input.focus(options);\n }\n /** Removes focus from the switch. */\n blur() {\n this.input.blur();\n }\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n /** Gets the associated form, if one exists. */\n getForm() {\n return this.formControlController.getForm();\n }\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n render() {\n const hasHelpTextSlot = this.hasSlotController.test(\"help-text\");\n const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;\n return html`\n <div\n class=${classMap({\n \"form-control\": true,\n \"form-control--small\": this.size === \"small\",\n \"form-control--medium\": this.size === \"medium\",\n \"form-control--large\": this.size === \"large\",\n \"form-control--has-help-text\": hasHelpText\n })}\n >\n <label\n part=\"base\"\n class=${classMap({\n switch: true,\n \"switch--checked\": this.checked,\n \"switch--disabled\": this.disabled,\n \"switch--focused\": this.hasFocus,\n \"switch--small\": this.size === \"small\",\n \"switch--medium\": this.size === \"medium\",\n \"switch--large\": this.size === \"large\"\n })}\n >\n <input\n class=\"switch__input\"\n type=\"checkbox\"\n title=${this.title}\n name=${this.name}\n value=${ifDefined(this.value)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n role=\"switch\"\n aria-checked=${this.checked ? \"true\" : \"false\"}\n aria-describedby=\"help-text\"\n @click=${this.handleClick}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @keydown=${this.handleKeyDown}\n />\n\n <span part=\"control\" class=\"switch__control\">\n <span part=\"thumb\" class=\"switch__thumb\"></span>\n </span>\n\n <div part=\"label\" class=\"switch__label\">\n <slot></slot>\n </div>\n </label>\n\n <div\n aria-hidden=${hasHelpText ? \"false\" : \"true\"}\n class=\"form-control__help-text\"\n id=\"help-text\"\n part=\"form-control-help-text\"\n >\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n};\nSlSwitch.styles = [component_styles_default, form_control_styles_default, switch_styles_default];\n__decorateClass([\n query('input[type=\"checkbox\"]')\n], SlSwitch.prototype, \"input\", 2);\n__decorateClass([\n state()\n], SlSwitch.prototype, \"hasFocus\", 2);\n__decorateClass([\n property()\n], SlSwitch.prototype, \"title\", 2);\n__decorateClass([\n property()\n], SlSwitch.prototype, \"name\", 2);\n__decorateClass([\n property()\n], SlSwitch.prototype, \"value\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlSwitch.prototype, \"size\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlSwitch.prototype, \"disabled\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlSwitch.prototype, \"checked\", 2);\n__decorateClass([\n defaultValue(\"checked\")\n], SlSwitch.prototype, \"defaultChecked\", 2);\n__decorateClass([\n property({ reflect: true })\n], SlSwitch.prototype, \"form\", 2);\n__decorateClass([\n property({ type: Boolean, reflect: true })\n], SlSwitch.prototype, \"required\", 2);\n__decorateClass([\n property({ attribute: \"help-text\" })\n], SlSwitch.prototype, \"helpText\", 2);\n__decorateClass([\n watch(\"checked\", { waitUntilFirstUpdate: true })\n], SlSwitch.prototype, \"handleCheckedChange\", 1);\n__decorateClass([\n watch(\"disabled\", { waitUntilFirstUpdate: true })\n], SlSwitch.prototype, \"handleDisabledChange\", 1);\n\nexport {\n SlSwitch\n};\n","import {\n SlSwitch\n} from \"./chunk.S33XS33R.js\";\n\n// src/components/switch/switch.ts\nvar switch_default = SlSwitch;\nSlSwitch.define(\"sl-switch\");\n\nexport {\n switch_default\n};\n","@import '../../../node_modules/@shoelace-style/shoelace/dist/themes/light.css';\n\n:host {\n /* Definizione delle variabili per il nostro componente */\n --jump-switch-width: 36px;\n --jump-switch-height: 20px;\n --jump-switch-thumb-size: 14px;\n --jump-switch-thumb-color: var(--neutral-white, #ffffff);\n --jump-switch-active-color: var(--secondary-standard, #5e79ba);\n --jump-switch-inactive-color: var(--neutral-grey-disabled, #cbcbcb);\n --jump-switch-disabled-opacity: 0.5;\n --jump-switch-font-family: var(--ff-primary, 'Inter', sans-serif);\n --jump-switch-font-size: 16px;\n --jump-switch-font-weight: normal;\n --jump-switch-label-color: var(--neutral-black, #000000);\n\n display: flex;\n align-items: center;\n width: 100%;\n\n /* Stile diretto per Shoelace switch */\n sl-switch::part(base) {\n width: 100%;\n font-family: var(--jump-switch-font-family);\n font-size: var(--jump-switch-font-size);\n font-weight: var(--jump-switch-font-weight);\n color: var(--jump-switch-label-color);\n }\n\n sl-switch::part(control) {\n width: var(--jump-switch-width) !important;\n height: var(--jump-switch-height) !important;\n background-color: var(--jump-switch-inactive-color) !important;\n border-color: var(--jump-switch-inactive-color) !important;\n }\n\n sl-switch::part(thumb) {\n width: var(--jump-switch-thumb-size) !important;\n height: var(--jump-switch-thumb-size) !important;\n background-color: var(--jump-switch-thumb-color) !important;\n border-color: var(--jump-switch-thumb-color) !important;\n }\n\n sl-switch[checked]::part(control) {\n background-color: var(--jump-switch-active-color) !important;\n border-color: var(--jump-switch-active-color) !important;\n }\n\n sl-switch::part(label) {\n margin-left: 8px;\n }\n\n sl-switch[disabled] {\n opacity: var(--jump-switch-disabled-opacity);\n cursor: not-allowed;\n }\n\n /* Stile per il contatore */\n .count {\n margin-left: auto;\n color: var(--neutral-grey-secondary, #707070);\n font-size: 0.85em;\n }\n}\n","import { Component, Host, Prop, h, Event, EventEmitter, Method } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/switch/switch.js';\n\n/**\n * Componente switch per filtri con supporto per label e stato\n * @slot - Contenuto opzionale da mostrare accanto al switch (alternativo alla label)\n */\n@Component({\n tag: 'jump-filter-switch',\n styleUrl: 'jump-filter-switch.scss',\n shadow: true,\n})\nexport class JumpFilterSwitch {\n /** Il valore associato al switch */\n @Prop() value: string;\n\n /** La label da mostrare accanto al switch */\n @Prop() label: string;\n\n /** Stato del switch (acceso/spento) */\n @Prop({ reflect: true }) checked: boolean = false;\n\n /** Stato del switch (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Riferimento all'elemento host */\n host: HTMLElement;\n\n /** Riferimento all'elemento sl-switch interno */\n el: any; // Usiamo any per evitare problemi di tipo con le proprietà specifiche di sl-switch\n\n componentDidLoad() {\n this.listenSLChange();\n }\n\n /**\n * Ascolta gli eventi di cambio stato dal switch Shoelace\n */\n listenSLChange() {\n if (this.host) {\n this.host.addEventListener('sl-change', () => {\n // Ignora l'evento se lo switch è disabilitato\n if (this.disabled) {\n return;\n }\n\n this.checked = !this.checked;\n\n const eventData = {\n value: this.value,\n checked: this.checked,\n };\n\n this.toggleCheckbox.emit(eventData);\n this.toggleCheckboxFilterChange.emit(eventData);\n });\n }\n }\n\n /**\n * Evento emesso quando cambia lo stato del switch\n */\n @Event({ eventName: 'jump-switch-change' }) toggleCheckbox: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) toggleCheckboxFilterChange: EventEmitter;\n\n /**\n * Metodo pubblico per verificare lo stato corrente del switch\n * @returns {boolean} Lo stato corrente del switch (true = acceso, false = spento)\n */\n @Method()\n async isChecked() {\n return this.checked;\n }\n\n render() {\n return (\n <Host ref={(host: HTMLElement) => (this.host = host)}>\n {this.value && this.label && (\n <sl-switch\n value={this.value}\n ref={(el: any) => (this.el = el)}\n checked={this.checked}\n disabled={this.disabled}\n >\n {this.label}\n </sl-switch>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -25,13 +25,17 @@ const JumpQuantity = class {
25
25
  this.type = 'buttons';
26
26
  this.variant = 'vertical';
27
27
  this.showButtons = true;
28
- this.value = undefined;
28
+ this.value = this.min;
29
+ this.internalValue = undefined;
29
30
  }
30
31
  onValueChange(newValue, oldValue) {
31
32
  this.change.emit({
32
33
  value: newValue,
33
34
  oldValue: oldValue,
34
35
  });
36
+ this.internalValue = newValue !== null && newValue !== void 0 ? newValue : this.min;
37
+ this.change.emit({ value: this.internalValue, oldValue });
38
+ this.internals.setFormValue(this.internalValue.toString());
35
39
  this.internals.setFormValue(newValue);
36
40
  }
37
41
  /**
@@ -50,8 +54,9 @@ const JumpQuantity = class {
50
54
  this.value = this.min;
51
55
  }
52
56
  componentWillLoad() {
53
- this.value = this.min;
54
- this.internals.setFormValue(this.value.toString());
57
+ var _a;
58
+ this.internalValue = (_a = this.value) !== null && _a !== void 0 ? _a : this.min;
59
+ this.internals.setFormValue(this.internalValue.toString());
55
60
  }
56
61
  formResetCallback() {
57
62
  this.internals.setValidity({});
@@ -76,11 +81,11 @@ const JumpQuantity = class {
76
81
  }
77
82
  }
78
83
  render() {
79
- return (index.h(index.Host, { key: '2545759aea7e95d367e1071c56fd2713d28b94c3', value: this.value, "data-variant": this.variant, "data-hasbuttons": this.showButtons }, this.label && index.h("label", { key: '75f20b28bc74cdf237100778aeb118a860d37227' }, this.label), index.h("div", { key: '528eb66ad0b83b22cb1b4edf083d48398146a1f2', class: `jump-quantity__InnerWrapper` }, this.showButtons &&
80
- index.h("jump-button", { key: 'ee6e87290d2f3e01b3228956817b274ba854d46f', onClick: () => this.value = this.value - this.step, disabled: this.value <= this.min, variant: 'neutral', size: 'custom' }, index.h("jump-icon", { key: 'bb19f472ea27e02127db5436d7bbc87a1aaa1438', library: "lucide", name: "minus", size: "small" })), index.h("input", { key: '4eab2afcaef6295ee8e6e92528af6602d065a9d1', ref: (el) => {
84
+ return (index.h(index.Host, { key: '16fa43e6148a64681d5cf1c199e890c589375dae', value: this.value, "data-variant": this.variant, "data-hasbuttons": this.showButtons }, this.label && index.h("label", { key: 'af99311b2fde98f695d7fe6e30cb61f3ee087d89' }, this.label), index.h("div", { key: 'e19baf0b29bee7b4aece1cc42c60ea88f5a9e9df', class: `jump-quantity__InnerWrapper` }, this.showButtons &&
85
+ index.h("jump-button", { key: '7b397b23b21df5447b66791a60f7782c471b5bde', onClick: () => this.value = this.value - this.step, disabled: this.value <= this.min, variant: 'neutral', size: 'custom' }, index.h("jump-icon", { key: '2a76ed1efa4ce83386c0953660b8a61e1e6e50de', library: "lucide", name: "minus", size: "small" })), index.h("input", { key: '096583968aeb0dec8811983bbd4dec3d30319d77', ref: (el) => {
81
86
  this.inputEl = el;
82
- }, type: 'number', value: this.value, onInput: (event) => this.handleChange(event), min: this.min, max: this.max, step: this.step, "aria-hasbuttons": this.showButtons }), this.showButtons &&
83
- index.h("jump-button", { key: '0f1bb0b97fc591c3baa3a1c98791c4b8658ab73e', onClick: () => this.value = this.value + this.step, disabled: this.value >= this.max, variant: 'neutral', size: 'custom' }, index.h("jump-icon", { key: '901b8a21adcf844227c5193d801cee415f495ff2', library: "lucide", name: "plus", size: "small" })))));
87
+ }, type: 'number', value: this.internalValue, onInput: (event) => this.handleChange(event), min: this.min, max: this.max, step: this.step, "aria-hasbuttons": this.showButtons }), this.showButtons &&
88
+ index.h("jump-button", { key: 'ea55769654b304cf23ec5863592ed1c6419e9ccd', onClick: () => this.value = this.value + this.step, disabled: this.value >= this.max, variant: 'neutral', size: 'custom' }, index.h("jump-icon", { key: 'd23d4b89d44d12e6f099e3034bb952bc1c06bb30', library: "lucide", name: "plus", size: "small" })))));
84
89
  }
85
90
  static get formAssociated() { return true; }
86
91
  get el() { return index.getElement(this); }
@@ -1 +1 @@
1
- {"file":"jump-quantity.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,g9BAAg9B,CAAC;AACz+B,2BAAe,eAAe;;MCOjB,YAAY;;;;;;;;;;;mBAKD,CAAC;;oBAEA,CAAC;qBACA,EAAE;oBACuB,SAAS;uBACb,UAAU;2BACxB,IAAI;;;IAQnC,aAAa,CAAC,QAAQ,EAAE,QAAQ;QAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACvC;;;;IAMD,MAAM,QAAQ;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;;;;IAMD,MAAM,MAAM,CAAC,KAAa;QACxB,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;KAClB;IAGD,MAAM,KAAK;QACT,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;KACvB;IAED,iBAAiB;QACf,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC;QACtB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;KACpD;IAED,iBAAiB;QACf,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,CAA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aACnB,EACM,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAC5C,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,qBACE,IAAI,CAAC,WAAW,GACtC,EACD,IAAI,CAAC,WAAW;YACfA,0EAAa,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,EACpF,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,IAC1CA,wEAAW,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,GAAa,CACrD,CACZ,CACD,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-quantity/jump-quantity.scss?tag=jump-quantity&encapsulation=shadow","src/components/jump-quantity/jump-quantity.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n align-items: flex-start;\n justify-content: center;\n flex-direction: column;\n gap: 0.5rem;\n\n jump-button, button{\n --jump-button-padding: 0.5rem;\n }\n\n [data-variant='horizontal'] {\n flex-direction: row;\n }\n\n label {\n color: var(--neutral-grey-secondary);\n font-size: 0.875rem;\n }\n\n input {\n //remove user agent styles\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n margin: 0;\n\n //remove + and - buttons\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n outline: none;\n\n &:focus {\n border-color: var(--secondary-standard);\n }\n\n border: 1px solid transparent;\n border-radius: 3px;\n padding: 0.5rem;\n height: 14px;\n width: 36px;\n font-size: 0.875rem;\n text-align: center;\n\n &:not([aria-hasbuttons]) {\n border-color: var(--neutral-grey-secondary);\n }\n\n &[type='button'] {\n cursor: pointer;\n }\n }\n\n ::slotted(jump-button) {\n --jump-button-padding: 0;\n }\n\n\n .jump-quantity__InnerWrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n gap: 0;\n }\n}\n","import { Component, Host, AttachInternals, Watch, Method, Prop, h, Event, Element } from '@stencil/core';\n\n@Component({\n tag: 'jump-quantity',\n styleUrl: 'jump-quantity.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class JumpQuantity {\n\n @AttachInternals() internals: ElementInternals;\n @Element() el;\n\n @Prop() min: number = 1;\n @Prop() max: number;\n @Prop() step: number = 1;\n @Prop() label: string = '';\n @Prop() type: 'buttons' | 'dropdown' | 'input' = 'buttons';\n @Prop() variant: 'vertical' | 'horizontal' = 'vertical';\n @Prop() showButtons: boolean = true;\n @Prop() value: number;\n\n @Event({ eventName: 'jump-change' }) change;\n\n inputEl: HTMLInputElement;\n\n @Watch('value')\n onValueChange(newValue, oldValue) {\n this.change.emit({\n value: newValue,\n oldValue: oldValue,\n });\n this.internals.setFormValue(newValue);\n }\n\n /**\n * Get the current value\n */\n @Method()\n async getValue() {\n return this.value;\n }\n\n /**\n * Set the current value\n */\n @Method()\n async setMax(value: number) {\n this.max = value;\n }\n\n @Method()\n async reset() {\n this.value = this.min;\n }\n\n componentWillLoad() {\n this.value = this.min;\n this.internals.setFormValue(this.value.toString());\n }\n\n formResetCallback() {\n this.internals.setValidity({});\n this.internals.setFormValue('');\n }\n\n handleChange(event) {\n let value = parseInt(event.target.value);\n if(value < this.min){\n this.value = this.min;\n } else if(value > this.max){\n this.value = this.max;\n } else {\n this.value = event.target.value;\n }\n }\n\n //avoid user can change the value below the min\n handleBlur(event) {\n if (event.target.value < this.min) {\n this.value = this.min;\n }\n }\n\n render() {\n return (\n <Host value={this.value} data-variant={this.variant} data-hasbuttons={this.showButtons}>\n {this.label && <label>{this.label}</label>}\n <div class={`jump-quantity__InnerWrapper`}>\n {this.showButtons &&\n <jump-button onClick={() => this.value = this.value - this.step} disabled={this.value <= this.min}\n variant='neutral' size='custom'>\n <jump-icon library=\"lucide\" name=\"minus\" size=\"small\"></jump-icon>\n </jump-button>}\n <input ref={(el) => {\n this.inputEl = el;\n }}\n type='number'\n value={this.value}\n onInput={(event) => this.handleChange(event)}\n min={this.min}\n max={this.max}\n step={this.step}\n aria-hasbuttons={this.showButtons}\n />\n {this.showButtons &&\n <jump-button onClick={() => this.value = this.value + this.step} disabled={this.value >= this.max}\n variant='neutral' size='custom'>\n <jump-icon library=\"lucide\" name=\"plus\" size=\"small\"></jump-icon>\n </jump-button>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"jump-quantity.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,g9BAAg9B,CAAC;AACz+B,2BAAe,eAAe;;MCOjB,YAAY;;;;;;;;;;;mBAKD,CAAC;;oBAEA,CAAC;qBACA,EAAE;oBACuB,SAAS;uBACb,UAAU;2BACxB,IAAI;qBACX,IAAI,CAAC,GAAG;;;IAShC,aAAa,CAAC,QAAQ,EAAE,QAAQ;QAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,CAAC,GAAG,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACvC;;;;IAMD,MAAM,QAAQ;QACZ,O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AAC,KAAK,IAAID,sEAAQ,IAAI,CAAC,KAAK,CAAS,EAC1CA,kEAAK,KAAK,EAAE,6BAA6B,IACxC,IAAI,CAAC,WAAW;YACbA,0EAAa,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,EACpF,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,IAC1CA,wEAAW,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,GAAa,CACtD,EAChBA,oEAAO,GAAG,EAAE,CAAC,EAAE;gBACb,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;aACnB,EACM,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,aAAa,EACzB,OAAO,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAC5C,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,qBACE,IAAI,CAAC,WAAW,GACtC,EACD,IAAI,CAAC,WAAW;YACfA,0EAAa,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,EACpF,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,IAC1CA,wEAAW,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,GAAa,CACrD,CACZ,CACD,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-quantity/jump-quantity.scss?tag=jump-quantity&encapsulation=shadow","src/components/jump-quantity/jump-quantity.tsx"],"sourcesContent":[":host {\n display: inline-flex;\n align-items: flex-start;\n justify-content: center;\n flex-direction: column;\n gap: 0.5rem;\n\n jump-button, button{\n --jump-button-padding: 0.5rem;\n }\n\n [data-variant='horizontal'] {\n flex-direction: row;\n }\n\n label {\n color: var(--neutral-grey-secondary);\n font-size: 0.875rem;\n }\n\n input {\n //remove user agent styles\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n margin: 0;\n\n //remove + and - buttons\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n outline: none;\n\n &:focus {\n border-color: var(--secondary-standard);\n }\n\n border: 1px solid transparent;\n border-radius: 3px;\n padding: 0.5rem;\n height: 14px;\n width: 36px;\n font-size: 0.875rem;\n text-align: center;\n\n &:not([aria-hasbuttons]) {\n border-color: var(--neutral-grey-secondary);\n }\n\n &[type='button'] {\n cursor: pointer;\n }\n }\n\n ::slotted(jump-button) {\n --jump-button-padding: 0;\n }\n\n\n .jump-quantity__InnerWrapper {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: center;\n gap: 0;\n }\n}\n","import { Component, Host, AttachInternals, Watch, Method, Prop, h, Event, Element, State } from '@stencil/core';\n\n@Component({\n tag: 'jump-quantity',\n styleUrl: 'jump-quantity.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class JumpQuantity {\n\n @AttachInternals() internals: ElementInternals;\n @Element() el;\n\n @Prop() min: number = 1;\n @Prop() max: number;\n @Prop() step: number = 1;\n @Prop() label: string = '';\n @Prop() type: 'buttons' | 'dropdown' | 'input' = 'buttons';\n @Prop() variant: 'vertical' | 'horizontal' = 'vertical';\n @Prop() showButtons: boolean = true;\n @Prop() value: number = this.min;\n\n @State() internalValue: number;\n\n @Event({ eventName: 'jump-change' }) change;\n\n inputEl: HTMLInputElement;\n\n @Watch('value')\n onValueChange(newValue, oldValue) {\n this.change.emit({\n value: newValue,\n oldValue: oldValue,\n });\n this.internalValue = newValue ?? this.min;\n this.change.emit({ value: this.internalValue, oldValue });\n this.internals.setFormValue(this.internalValue.toString());\n this.internals.setFormValue(newValue);\n }\n\n /**\n * Get the current value\n */\n @Method()\n async getValue() {\n return this.value;\n }\n\n /**\n * Set the current value\n */\n @Method()\n async setMax(value: number) {\n this.max = value;\n }\n\n @Method()\n async reset() {\n this.value = this.min;\n }\n\n componentWillLoad() {\n this.internalValue = this.value ?? this.min;\n this.internals.setFormValue(this.internalValue.toString());\n }\n\n formResetCallback() {\n this.internals.setValidity({});\n this.internals.setFormValue('');\n }\n\n handleChange(event) {\n let value = parseInt(event.target.value);\n if(value < this.min){\n this.value = this.min;\n } else if(value > this.max){\n this.value = this.max;\n } else {\n this.value = event.target.value;\n }\n }\n\n //avoid user can change the value below the min\n handleBlur(event) {\n if (event.target.value < this.min) {\n this.value = this.min;\n }\n }\n\n render() {\n return (\n <Host value={this.value} data-variant={this.variant} data-hasbuttons={this.showButtons}>\n {this.label && <label>{this.label}</label>}\n <div class={`jump-quantity__InnerWrapper`}>\n {this.showButtons &&\n <jump-button onClick={() => this.value = this.value - this.step} disabled={this.value <= this.min}\n variant='neutral' size='custom'>\n <jump-icon library=\"lucide\" name=\"minus\" size=\"small\"></jump-icon>\n </jump-button>}\n <input ref={(el) => {\n this.inputEl = el;\n }}\n type='number'\n value={this.internalValue}\n onInput={(event) => this.handleChange(event)}\n min={this.min}\n max={this.max}\n step={this.step}\n aria-hasbuttons={this.showButtons}\n />\n {this.showButtons &&\n <jump-button onClick={() => this.value = this.value + this.step} disabled={this.value >= this.max}\n variant='neutral' size='custom'>\n <jump-icon library=\"lucide\" name=\"plus\" size=\"small\"></jump-icon>\n </jump-button>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["jump-button_2.cjs",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce.cjs",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter.cjs",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar.cjs",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar.cjs",[[1,"jump-search-bar",{"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"searchValue":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile.cjs",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-select.cjs",[[1,"jump-filter-select",{"value":[1537],"placeholder":[1],"label":[1],"options":[1],"disabled":[516],"multiple":[4],"required":[4],"loading":[4],"open":[32],"hasSlottedOptions":[32],"getSelectedValue":[64],"getSelectedOption":[64],"setValue":[64]}]]],["jump-filter-switch.cjs",[[1,"jump-filter-switch",{"value":[1],"label":[1],"checked":[516],"disabled":[516],"isChecked":[64]}]]],["jump-search-bar-dropdown-item.cjs",[[1,"jump-search-bar-dropdown-item",{"value":[1],"img":[1],"href":[1],"details":[32]}]]],["jump-tab.cjs",[[1,"jump-tab",{"disabled":[4],"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
11
+ return index.bootstrapLazy([["jump-button_2.cjs",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]],["jump-card-ecommerce.cjs",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter.cjs",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup.cjs",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar.cjs",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination.cjs",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table.cjs",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity.cjs",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar.cjs",[[1,"jump-search-bar",{"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"searchValue":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile.cjs",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion.cjs",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-tab-item.cjs",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group.cjs",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card.cjs",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option.cjs",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox.cjs",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-select.cjs",[[1,"jump-filter-select",{"value":[1537],"placeholder":[1],"label":[1],"options":[1],"disabled":[516],"multiple":[4],"required":[4],"loading":[4],"open":[32],"hasSlottedOptions":[32],"getSelectedValue":[64],"getSelectedOption":[64],"setValue":[64]}]]],["jump-filter-switch.cjs",[[1,"jump-filter-switch",{"value":[1],"label":[1],"checked":[516],"disabled":[516],"isChecked":[64]}]]],["jump-search-bar-dropdown-item.cjs",[[1,"jump-search-bar-dropdown-item",{"value":[1],"img":[1],"href":[1],"details":[32]}]]],["jump-tab.cjs",[[1,"jump-tab",{"disabled":[4],"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel.cjs",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-badge.cjs",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -221,13 +221,8 @@ const TemplateWithEvent = (args, data) => {
221
221
  let id = data.id;
222
222
  const attributes = generateAttributesFromArgs(args);
223
223
  return formatHtml(`
224
- <jump-card-ecommerce ${attributes}>
225
- <div slot="favorite">
226
- <jump-button class="Favorite" variant="primary" size="small" text onlyIcon>
227
- <jump-icon slot="prefix" name="heart" category="light" size="medium"></jump-icon>
228
- </jump-button>
229
- </div>
230
- <jump-quantity slot="quantity" min="1" max="10" step="1" show-buttons variant="horizontal"> </jump-quantity>
224
+ <jump-card-ecommerce ${attributes}>
225
+
231
226
  <jump-card-ecommerce-option code="size1" label="sono una select un pò lunga"></jump-card-ecommerce-option>
232
227
  <jump-card-ecommerce-option code="size2" label="L" sku="cod123"></jump-card-ecommerce-option>
233
228
 
@@ -236,7 +231,7 @@ const TemplateWithEvent = (args, data) => {
236
231
  <script>
237
232
 
238
233
  (function() {
239
- let container;
234
+ let container;
240
235
  container = document.querySelector('#story--${id}');
241
236
 
242
237
  container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {
@@ -254,7 +249,7 @@ const TemplateWithEvent = (args, data) => {
254
249
  let addedToCart = ev.detail.addedToCart;
255
250
  if(addedToCart){
256
251
  console.log( 'Prodotto ' + productId + ' aggiunto al carrello');
257
- }
252
+ }
258
253
  })
259
254
 
260
255
  container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {
@@ -273,7 +268,7 @@ CardEvent.args = {
273
268
  onlyIconButton: false,
274
269
  badge: 'In offerta',
275
270
  hasFavorite: false,
276
- hasSlotForFavorite: true,
271
+ hasSlotForFavorite: false,
277
272
  link: '/prodotto',
278
273
  img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
279
274
  imgAlt: 'Immagine',
@@ -294,6 +289,6 @@ CardEvent.args = {
294
289
  outOfStock: false,
295
290
  outOfStockText: 'Esaurito',
296
291
  waitingListText: 'Notifica disponibilità',
297
- isMini: false,
292
+ isMini: true,
298
293
  };
299
294
  //# sourceMappingURL=jump-card-ecommerce.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE,SAAS;SACnB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,4DAA4D;YACzE,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,MAAM;SAChB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,6JAA6J;YAC1K,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,IAAI;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAA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AAI,EAAE,EAAE;IACvC,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IACjB,MAAM,UAAU,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACpD,OAAO,UAAU,CAAC;2BACO,UAAU;;;;;;;;;;;;;;;;oDAgBe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BnD,CAAE,CAAC;AACN,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,SAAS,CAAC,IAAI,GAAG;IACf,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,KAAK;IACrB,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,KAAK;IAClB,kBAAkB,EAAE,IAAI;IACxB,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,iHAAiH;IACtH,MAAM,EAAE,UAAU;IAClB,QAAQ,EAAE,iHAAiH;IAC3H,WAAW,EAAE,mBAAmB;IAChC,eAAe,EAAE,OAAO;IACxB,gBAAgB,EAAE,sBAAsB;IACxC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,sBAAsB;IACrC,cAAc,EAAE,SAAS;IACzB,gBAAgB,EAAE,KAAK;IACvB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,UAAU;IAC1B,eAAe,EAAE,wBAAwB;IACzC,MAAM,EAAE,KAAK;CACd,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'has-background',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'only-icon-button',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasFavorite: {\n name: 'has-favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasSlotForFavorite: {\n name: 'has-slot-for-favorite',\n description: 'Di default la card ecommerce ha un bottone icona per il favorite che emette un evento; Se hasSlotForFavorite è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: true,\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente video-src',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'img-alt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n hoverImg: {\n name: 'hover-img',\n description: 'Url dell\\'immagine in hover da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://ch.benetton.com/dw/image/v2/BBSF_PRD/on/demandware.static/-/Sites-ucb-master/default/dwf2799586/images/Full_Card_v/UCB-Bambino_24P_3096C10JA_0Z3_FS_Full_Card_v.jpg?sw=600&sh=800',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n hoverImgAlt: {\n name: 'hover-img-alt',\n description: 'Alt dell\\'immagine in hover da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'video-src',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notification-url',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notification-text',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'product-name',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'product-id',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto; Se la card è in versione Mini gli va passato il prezzo scontato',\n control: 'number',\n },\n salePrice: {\n name: 'sale-price',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n addToCartText: {\n name: 'add-to-cart-text',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n addToCartColor: {\n name: 'add-to-cart-color',\n description: 'Colore del bottone aggiungi al carrello',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n hasSlotAddToCart: {\n name: 'has-slot-add-to-cart',\n description: 'Di default la card ecommerce ha un bottone per l\\'aggiunta al carrello; Se has-slot-add-to-cart è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: false,\n },\n badgeColor: {\n name: 'badge-color',\n description: 'Colore del badge',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'warning',\n 'success',\n 'danger',\n ],\n },\n outOfStock: {\n name: 'out-of-stock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'out-of-stock-text',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n waitingListText: {\n name: 'waiting-list-text',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n isMini: {\n name: 'is-mini',\n description: 'Indica se la card è di dimensioni ridotte',\n control: 'boolean',\n defaultValue: false\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n};\n\nconst TemplateWithEvent = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}> \n <div slot=\"favorite\">\n <jump-button class=\"Favorite\" variant=\"primary\" size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category=\"light\" size=\"medium\"></jump-icon>\n </jump-button>\n </div>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" step=\"1\" show-buttons variant=\"horizontal\"> </jump-quantity>\n <jump-card-ecommerce-option code=\"size1\" label=\"sono una select un pò lunga\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size2\" label=\"L\" sku=\"cod123\"></jump-card-ecommerce-option>\n\n <div slot=\"addtocart\"><a href=\"\">Sono un bottone dentro lo slot addotocart</a></div>\n </jump-card-ecommerce>\n <script>\n\n (function() {\n let container; \n container = document.querySelector('#story--${id}');\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n let productId = ev.detail.productId;\n let favorite = ev.detail.favorite;\n if(favorite){\n console.log( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n } else {\n console.log( 'Prodotto ' + productId + ' rimosso dai preferiti');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n let productId = ev.detail.productId;\n let addedToCart = ev.detail.addedToCart;\n if(addedToCart){\n console.log( 'Prodotto ' + productId + ' aggiunto al carrello');\n } \n })\n\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variation selected', variation);\n });\n\n })();\n\n </script>\n ` );\n}\n\nexport const CardEvent = TemplateWithEvent.bind({});\nCardEvent.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n hasFavorite: false,\n hasSlotForFavorite: true,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'primary',\n hasSlotAddToCart: false,\n badgeColor: 'primary',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n};"]}
1
+ {"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC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;IACzB,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,iHAAiH;IACtH,MAAM,EAAE,UAAU;IAClB,QAAQ,EAAE,iHAAiH;IAC3H,WAAW,EAAE,mBAAmB;IAChC,eAAe,EAAE,OAAO;IACxB,gBAAgB,EAAE,sBAAsB;IACxC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,sBAAsB;IACrC,cAAc,EAAE,SAAS;IACzB,gBAAgB,EAAE,KAAK;IACvB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,UAAU;IAC1B,eAAe,EAAE,wBAAwB;IACzC,MAAM,EAAE,IAAI;CACb,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'has-background',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'only-icon-button',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasFavorite: {\n name: 'has-favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasSlotForFavorite: {\n name: 'has-slot-for-favorite',\n description: 'Di default la card ecommerce ha un bottone icona per il favorite che emette un evento; Se hasSlotForFavorite è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: true,\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente video-src',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'img-alt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n hoverImg: {\n name: 'hover-img',\n description: 'Url dell\\'immagine in hover da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://ch.benetton.com/dw/image/v2/BBSF_PRD/on/demandware.static/-/Sites-ucb-master/default/dwf2799586/images/Full_Card_v/UCB-Bambino_24P_3096C10JA_0Z3_FS_Full_Card_v.jpg?sw=600&sh=800',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n hoverImgAlt: {\n name: 'hover-img-alt',\n description: 'Alt dell\\'immagine in hover da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'video-src',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notification-url',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notification-text',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'product-name',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'product-id',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto; Se la card è in versione Mini gli va passato il prezzo scontato',\n control: 'number',\n },\n salePrice: {\n name: 'sale-price',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n addToCartText: {\n name: 'add-to-cart-text',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n addToCartColor: {\n name: 'add-to-cart-color',\n description: 'Colore del bottone aggiungi al carrello',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n hasSlotAddToCart: {\n name: 'has-slot-add-to-cart',\n description: 'Di default la card ecommerce ha un bottone per l\\'aggiunta al carrello; Se has-slot-add-to-cart è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: false,\n },\n badgeColor: {\n name: 'badge-color',\n description: 'Colore del badge',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'warning',\n 'success',\n 'danger',\n ],\n },\n outOfStock: {\n name: 'out-of-stock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'out-of-stock-text',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n waitingListText: {\n name: 'waiting-list-text',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n isMini: {\n name: 'is-mini',\n description: 'Indica se la card è di dimensioni ridotte',\n control: 'boolean',\n defaultValue: false\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n};\n\nconst TemplateWithEvent = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n\n <jump-card-ecommerce-option code=\"size1\" label=\"sono una select un pò lunga\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size2\" label=\"L\" sku=\"cod123\"></jump-card-ecommerce-option>\n\n <div slot=\"addtocart\"><a href=\"\">Sono un bottone dentro lo slot addotocart</a></div>\n </jump-card-ecommerce>\n <script>\n\n (function() {\n let container;\n container = document.querySelector('#story--${id}');\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n let productId = ev.detail.productId;\n let favorite = ev.detail.favorite;\n if(favorite){\n console.log( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n } else {\n console.log( 'Prodotto ' + productId + ' rimosso dai preferiti');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n let productId = ev.detail.productId;\n let addedToCart = ev.detail.addedToCart;\n if(addedToCart){\n console.log( 'Prodotto ' + productId + ' aggiunto al carrello');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variation selected', variation);\n });\n\n })();\n\n </script>\n ` );\n}\n\nexport const CardEvent = TemplateWithEvent.bind({});\nCardEvent.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n hasFavorite: false,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'primary',\n hasSlotAddToCart: false,\n badgeColor: 'primary',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: true,\n};\n"]}
@@ -61,6 +61,7 @@ export class JumpFilterSelect {
61
61
  selectedOption
62
62
  };
63
63
  this.selectionChange.emit(eventData);
64
+ this.selectionFilterChange.emit(eventData);
64
65
  });
65
66
  }
66
67
  }
@@ -101,12 +102,13 @@ export class JumpFilterSelect {
101
102
  programmatic: true // Flag per indicare che il cambio è avvenuto programmaticamente
102
103
  };
103
104
  this.selectionChange.emit(eventData);
105
+ this.selectionFilterChange.emit(eventData);
104
106
  }
105
107
  return this.value;
106
108
  }
107
109
  render() {
108
110
  const optionsArray = this.getOptionsArray();
109
- return (h(Host, { key: '3aeb8a1b3c8757bfecd0b5642ddfa87e61f92849', ref: (host) => (this.host = host) }, this.label && (h("div", { key: '504faaf84a96fd84add35cdaaa34e617391d4c82', class: "select-label" }, this.label)), h("sl-select", { key: '9a707596aa5a2c87c0276ecca51588c02d22edb0', value: this.value, placeholder: this.placeholder, disabled: this.disabled, multiple: this.multiple, required: this.required, loading: this.loading, ref: (el) => (this.el = el) }, !this.hasSlottedOptions && optionsArray.map(option => (h("sl-option", { value: option.value }, option.label))), h("slot", { key: 'b4592e359a2aaea92a87ab7240ddb6d2557697c3' }))));
111
+ return (h(Host, { key: '3bbb46b827ae88ce31d6c1da17fc75b6da4269ec', ref: (host) => (this.host = host) }, this.label && (h("div", { key: 'c0d89bc2668692fe9920a20aaf45a5ad9989d7b2', class: "select-label" }, this.label)), h("sl-select", { key: '299284224f4981547900d0bcb215747ebc17d22c', value: this.value, placeholder: this.placeholder, disabled: this.disabled, multiple: this.multiple, required: this.required, loading: this.loading, ref: (el) => (this.el = el) }, !this.hasSlottedOptions && optionsArray.map(option => (h("sl-option", { value: option.value }, option.label))), h("slot", { key: 'f481903e85538e396e4d270e4545dbd8024ed7ef' }))));
110
112
  }
111
113
  static get is() { return "jump-filter-select"; }
112
114
  static get encapsulation() { return "shadow"; }
@@ -288,6 +290,21 @@ export class JumpFilterSelect {
288
290
  "resolved": "any",
289
291
  "references": {}
290
292
  }
293
+ }, {
294
+ "method": "selectionFilterChange",
295
+ "name": "jump-filterchange",
296
+ "bubbles": true,
297
+ "cancelable": true,
298
+ "composed": true,
299
+ "docs": {
300
+ "tags": [],
301
+ "text": ""
302
+ },
303
+ "complexType": {
304
+ "original": "any",
305
+ "resolved": "any",
306
+ "references": {}
307
+ }
291
308
  }];
292
309
  }
293
310
  static get methods() {
@@ -1 +1 @@
1
- {"version":3,"file":"jump-filter-select.js","sourceRoot":"","sources":["../../../src/components/jump-filter-select/jump-filter-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,2DAA2D,CAAC;AACnE,OAAO,2DAA2D,CAAC;AAEnE;;;GAGG;AAMH,MAAM,OAAO,gBAAgB;;;2BAQG,uBAAuB;;uBAMU,EAAE;wBAGpB,KAAK;wBAGtB,KAAK;wBAGL,KAAK;uBAGN,KAAK;oBAGP,KAAK;iCAGQ,KAAK;;IAQ3C;;OAEG;IACH,mBAAmB;QACjB,6DAA6D;QAC7D,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,E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C,cAAc,IAAE,IAAI,CAAC,KAAK,CAAO,CAC7C;YACD,kEACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,GAAG,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;gBAG/B,CAAC,IAAI,CAAC,iBAAiB,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACrD,iBAAW,KAAK,EAAE,MAAM,CAAC,KAAK,IAAG,MAAM,CAAC,KAAK,CAAa,CAC3D,CAAC;gBAGF,8DAAa,CACH,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Element } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/select/select.js';\nimport '@shoelace-style/shoelace/dist/components/option/option.js';\n\n/**\n * Componente select per filtri con supporto per opzioni e stato\n * @slot - Contenitore per elementi sl-option quando le opzioni sono definite come figli\n */\n@Component({\n tag: 'jump-filter-select',\n styleUrl: 'jump-filter-select.scss',\n shadow: true,\n})\nexport class JumpFilterSelect {\n /** Riferimento all'elemento host */\n @Element() hostElement: HTMLElement;\n\n /** Il valore selezionato */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n /** Il placeholder da mostrare quando nessun valore è selezionato */\n @Prop() placeholder: string = 'Seleziona un\\'opzione';\n\n /** L'etichetta del select */\n @Prop() label: string;\n\n /** Opzioni del select come array di oggetti {value, label} o come stringa JSON */\n @Prop() options: string | { value: string; label: string }[] = [];\n\n /** Stato del select (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Flag per indicare se è possibile selezionare più opzioni */\n @Prop() multiple: boolean = false;\n\n /** Flag per indicare se la selezione è obbligatoria */\n @Prop() required: boolean = false;\n\n /** Flag per indicare se il select è in stato di caricamento */\n @Prop() loading: boolean = false;\n\n /** Stato interno per gestire l'apertura del dropdown */\n @State() open: boolean = false;\n\n /** Flag per determinare se sono presenti opzioni come slot */\n @State() hasSlottedOptions: boolean = false;\n\n /** Riferimento all'elemento host */\n host: HTMLElement;\n\n /** Riferimento all'elemento sl-select interno */\n el: any;\n\n /**\n * Controlla se ci sono opzioni definite come slot\n */\n componentWillRender() {\n // Verifica se ci sono elementi sl-option definiti come figli\n const slotNodes = this.hostElement.childNodes;\n this.hasSlottedOptions = Array.from(slotNodes).some(node => \n node.nodeName && node.nodeName.toLowerCase() === 'sl-option'\n );\n }\n\n /**\n * Converte le opzioni da string o array a array di oggetti\n */\n private getOptionsArray(): { value: string; label: string }[] {\n if (typeof this.options === 'string') {\n try {\n return JSON.parse(this.options);\n } catch (e) {\n console.error('Errore nel parsing delle opzioni:', e);\n return [];\n }\n }\n return this.options;\n }\n\n componentDidLoad() {\n this.listenSLChange();\n }\n\n /**\n * Ascolta gli eventi di cambio selezione dal select Shoelace\n */\n listenSLChange() {\n if (this.host) {\n this.host.addEventListener('sl-change', (event: any) => {\n if (this.disabled) {\n return;\n }\n\n this.value = event.target.value;\n\n const optionsArray = this.getOptionsArray();\n const selectedOption = optionsArray.find(option => option.value === this.value);\n\n const eventData = {\n value: this.value,\n selectedOption\n };\n\n this.selectionChange.emit(eventData);\n });\n }\n }\n\n /**\n * Evento emesso quando cambia la selezione\n */\n @Event({ eventName: 'jump-select-change' }) selectionChange: EventEmitter;\n\n /**\n * Metodo pubblico per ottenere il valore selezionato\n * @returns Il valore attualmente selezionato\n */\n @Method()\n async getSelectedValue() {\n return this.value;\n }\n\n /**\n * Metodo pubblico per ottenere l'opzione selezionata\n * @returns L'opzione attualmente selezionata come oggetto {value, label}\n */\n @Method()\n async getSelectedOption() {\n const optionsArray = this.getOptionsArray();\n return optionsArray.find(option => option.value === this.value);\n }\n\n /**\n * Metodo pubblico per impostare programmaticamente il valore selezionato\n * @param newValue - Il nuovo valore da selezionare\n * @param emitEvent - Se emettere l'evento di cambio (default: true)\n * @returns Il nuovo valore impostato\n */\n @Method()\n async setValue(newValue: string, emitEvent: boolean = true) {\n this.value = newValue;\n \n // Aggiorna anche il valore dell'elemento sl-select interno\n if (this.el) {\n this.el.value = newValue;\n }\n\n // Emetti l'evento di cambio se richiesto\n if (emitEvent) {\n const optionsArray = this.getOptionsArray();\n const selectedOption = optionsArray.find(option => option.value === this.value);\n \n const eventData = {\n value: this.value,\n selectedOption,\n programmatic: true // Flag per indicare che il cambio è avvenuto programmaticamente\n };\n\n this.selectionChange.emit(eventData);\n }\n\n return this.value;\n }\n\n render() {\n const optionsArray = this.getOptionsArray();\n\n return (\n <Host ref={(host: HTMLElement) => (this.host = host)}>\n {this.label && (\n <div class=\"select-label\">{this.label}</div>\n )}\n <sl-select\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n multiple={this.multiple}\n required={this.required}\n loading={this.loading}\n ref={(el: any) => (this.el = el)}\n >\n {/* Renderizza le opzioni dalla prop options solo se non ci sono sl-option nello slot */}\n {!this.hasSlottedOptions && optionsArray.map(option => (\n <sl-option value={option.value}>{option.label}</sl-option>\n ))}\n \n {/* Slot per le opzioni definite come figli */}\n <slot></slot>\n </sl-select>\n </Host>\n );\n }\n} "]}
1
+ {"version":3,"file":"jump-filter-select.js","sourceRoot":"","sources":["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AAM,CAAC,KAAK,CAAa,CAC3D,CAAC;gBAGF,8DAAa,CACH,CACP,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Element } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/select/select.js';\nimport '@shoelace-style/shoelace/dist/components/option/option.js';\n\n/**\n * Componente select per filtri con supporto per opzioni e stato\n * @slot - Contenitore per elementi sl-option quando le opzioni sono definite come figli\n */\n@Component({\n tag: 'jump-filter-select',\n styleUrl: 'jump-filter-select.scss',\n shadow: true,\n})\nexport class JumpFilterSelect {\n /** Riferimento all'elemento host */\n @Element() hostElement: HTMLElement;\n\n /** Il valore selezionato */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n /** Il placeholder da mostrare quando nessun valore è selezionato */\n @Prop() placeholder: string = 'Seleziona un\\'opzione';\n\n /** L'etichetta del select */\n @Prop() label: string;\n\n /** Opzioni del select come array di oggetti {value, label} o come stringa JSON */\n @Prop() options: string | { value: string; label: string }[] = [];\n\n /** Stato del select (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Flag per indicare se è possibile selezionare più opzioni */\n @Prop() multiple: boolean = false;\n\n /** Flag per indicare se la selezione è obbligatoria */\n @Prop() required: boolean = false;\n\n /** Flag per indicare se il select è in stato di caricamento */\n @Prop() loading: boolean = false;\n\n /** Stato interno per gestire l'apertura del dropdown */\n @State() open: boolean = false;\n\n /** Flag per determinare se sono presenti opzioni come slot */\n @State() hasSlottedOptions: boolean = false;\n\n /** Riferimento all'elemento host */\n host: HTMLElement;\n\n /** Riferimento all'elemento sl-select interno */\n el: any;\n\n /**\n * Controlla se ci sono opzioni definite come slot\n */\n componentWillRender() {\n // Verifica se ci sono elementi sl-option definiti come figli\n const slotNodes = this.hostElement.childNodes;\n this.hasSlottedOptions = Array.from(slotNodes).some(node =>\n node.nodeName && node.nodeName.toLowerCase() === 'sl-option'\n );\n }\n\n /**\n * Converte le opzioni da string o array a array di oggetti\n */\n private getOptionsArray(): { value: string; label: string }[] {\n if (typeof this.options === 'string') {\n try {\n return JSON.parse(this.options);\n } catch (e) {\n console.error('Errore nel parsing delle opzioni:', e);\n return [];\n }\n }\n return this.options;\n }\n\n componentDidLoad() {\n this.listenSLChange();\n }\n\n /**\n * Ascolta gli eventi di cambio selezione dal select Shoelace\n */\n listenSLChange() {\n if (this.host) {\n this.host.addEventListener('sl-change', (event: any) => {\n if (this.disabled) {\n return;\n }\n\n this.value = event.target.value;\n\n const optionsArray = this.getOptionsArray();\n const selectedOption = optionsArray.find(option => option.value === this.value);\n\n const eventData = {\n value: this.value,\n selectedOption\n };\n\n this.selectionChange.emit(eventData);\n this.selectionFilterChange.emit(eventData);\n });\n }\n }\n\n /**\n * Evento emesso quando cambia la selezione\n */\n @Event({ eventName: 'jump-select-change' }) selectionChange: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) selectionFilterChange: EventEmitter;\n\n /**\n * Metodo pubblico per ottenere il valore selezionato\n * @returns Il valore attualmente selezionato\n */\n @Method()\n async getSelectedValue() {\n return this.value;\n }\n\n /**\n * Metodo pubblico per ottenere l'opzione selezionata\n * @returns L'opzione attualmente selezionata come oggetto {value, label}\n */\n @Method()\n async getSelectedOption() {\n const optionsArray = this.getOptionsArray();\n return optionsArray.find(option => option.value === this.value);\n }\n\n /**\n * Metodo pubblico per impostare programmaticamente il valore selezionato\n * @param newValue - Il nuovo valore da selezionare\n * @param emitEvent - Se emettere l'evento di cambio (default: true)\n * @returns Il nuovo valore impostato\n */\n @Method()\n async setValue(newValue: string, emitEvent: boolean = true) {\n this.value = newValue;\n\n // Aggiorna anche il valore dell'elemento sl-select interno\n if (this.el) {\n this.el.value = newValue;\n }\n\n // Emetti l'evento di cambio se richiesto\n if (emitEvent) {\n const optionsArray = this.getOptionsArray();\n const selectedOption = optionsArray.find(option => option.value === this.value);\n\n const eventData = {\n value: this.value,\n selectedOption,\n programmatic: true // Flag per indicare che il cambio è avvenuto programmaticamente\n };\n\n this.selectionChange.emit(eventData);\n this.selectionFilterChange.emit(eventData);\n }\n\n return this.value;\n }\n\n render() {\n const optionsArray = this.getOptionsArray();\n\n return (\n <Host ref={(host: HTMLElement) => (this.host = host)}>\n {this.label && (\n <div class=\"select-label\">{this.label}</div>\n )}\n <sl-select\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n multiple={this.multiple}\n required={this.required}\n loading={this.loading}\n ref={(el: any) => (this.el = el)}\n >\n {/* Renderizza le opzioni dalla prop options solo se non ci sono sl-option nello slot */}\n {!this.hasSlottedOptions && optionsArray.map(option => (\n <sl-option value={option.value}>{option.label}</sl-option>\n ))}\n\n {/* Slot per le opzioni definite come figli */}\n <slot></slot>\n </sl-select>\n </Host>\n );\n }\n}\n"]}
@@ -30,6 +30,7 @@ export class JumpFilterSwitch {
30
30
  checked: this.checked,
31
31
  };
32
32
  this.toggleCheckbox.emit(eventData);
33
+ this.toggleCheckboxFilterChange.emit(eventData);
33
34
  });
34
35
  }
35
36
  }
@@ -41,7 +42,7 @@ export class JumpFilterSwitch {
41
42
  return this.checked;
42
43
  }
43
44
  render() {
44
- return (h(Host, { key: 'f0ede0229c5942aaef3d39acb34930d3a8b7bb49', ref: (host) => (this.host = host) }, this.value && this.label && (h("sl-switch", { key: '93db07ff6db118788727e5052457cfa9c3b28754', value: this.value, ref: (el) => (this.el = el), checked: this.checked, disabled: this.disabled }, this.label))));
45
+ return (h(Host, { key: '38b92b7cbad470b5ca944e2734d01f9409262881', ref: (host) => (this.host = host) }, this.value && this.label && (h("sl-switch", { key: '2fac822671f25f54073e0eb9bf01a441a0ffe927', value: this.value, ref: (el) => (this.el = el), checked: this.checked, disabled: this.disabled }, this.label))));
45
46
  }
46
47
  static get is() { return "jump-filter-switch"; }
47
48
  static get encapsulation() { return "shadow"; }
@@ -145,6 +146,21 @@ export class JumpFilterSwitch {
145
146
  "resolved": "any",
146
147
  "references": {}
147
148
  }
149
+ }, {
150
+ "method": "toggleCheckboxFilterChange",
151
+ "name": "jump-filterchange",
152
+ "bubbles": true,
153
+ "cancelable": true,
154
+ "composed": true,
155
+ "docs": {
156
+ "tags": [],
157
+ "text": ""
158
+ },
159
+ "complexType": {
160
+ "original": "any",
161
+ "resolved": "any",
162
+ "references": {}
163
+ }
148
164
  }];
149
165
  }
150
166
  static get methods() {
@@ -1 +1 @@
1
- {"version":3,"file":"jump-filter-switch.js","sourceRoot":"","sources":["../../../src/components/jump-filter-switch/jump-filter-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,2DAA2D,CAAC;AAEnE;;;GAGG;AAMH,MAAM,OAAO,gBAAgB;;;;uBAQiB,KAAK;wBAGJ,KAAK;;IAQlD,gBAAgB;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,GAAG,EAAE;gBAC3C,8CAA8C;gBAC9C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,OAAO;gBACT,CAAC;gBAED,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;gBAE7B,MAAM,SAAS,GAAG;oBAChB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC;gBAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAOD;;;OAGG;IAEH,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,GAAG,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IACjD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,CAC3B,kEACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,EAChC,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAEtB,IAAI,CAAC,KAAK,CACD,CACb,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Method } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/switch/switch.js';\n\n/**\n * Componente switch per filtri con supporto per label e stato\n * @slot - Contenuto opzionale da mostrare accanto al switch (alternativo alla label)\n */\n@Component({\n tag: 'jump-filter-switch',\n styleUrl: 'jump-filter-switch.scss',\n shadow: true,\n})\nexport class JumpFilterSwitch {\n /** Il valore associato al switch */\n @Prop() value: string;\n\n /** La label da mostrare accanto al switch */\n @Prop() label: string;\n\n /** Stato del switch (acceso/spento) */\n @Prop({ reflect: true }) checked: boolean = false;\n\n /** Stato del switch (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Riferimento all'elemento host */\n host: HTMLElement;\n\n /** Riferimento all'elemento sl-switch interno */\n el: any; // Usiamo any per evitare problemi di tipo con le proprietà specifiche di sl-switch\n\n componentDidLoad() {\n this.listenSLChange();\n }\n\n /**\n * Ascolta gli eventi di cambio stato dal switch Shoelace\n */\n listenSLChange() {\n if (this.host) {\n this.host.addEventListener('sl-change', () => {\n // Ignora l'evento se lo switch è disabilitato\n if (this.disabled) {\n return;\n }\n\n this.checked = !this.checked;\n\n const eventData = {\n value: this.value,\n checked: this.checked,\n };\n\n this.toggleCheckbox.emit(eventData);\n });\n }\n }\n\n /**\n * Evento emesso quando cambia lo stato del switch\n */\n @Event({ eventName: 'jump-switch-change' }) toggleCheckbox: EventEmitter;\n\n /**\n * Metodo pubblico per verificare lo stato corrente del switch\n * @returns {boolean} Lo stato corrente del switch (true = acceso, false = spento)\n */\n @Method()\n async isChecked() {\n return this.checked;\n }\n\n render() {\n return (\n <Host ref={(host: HTMLElement) => (this.host = host)}>\n {this.value && this.label && (\n <sl-switch\n value={this.value}\n ref={(el: any) => (this.el = el)}\n checked={this.checked}\n disabled={this.disabled}\n >\n {this.label}\n </sl-switch>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"jump-filter-switch.js","sourceRoot":"","sources":["../../../src/components/jump-filter-switch/jump-filter-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,2DAA2D,CAAC;AAEnE;;;GAGG;AAMH,MAAM,OAAO,gBAAgB;;;;uBAQiB,KAAK;wBAGJ,KAAK;;IAQlD,gBAAgB;QACd,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,IAAI,IAAI,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sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, Method } from '@stencil/core';\nimport '@shoelace-style/shoelace/dist/components/switch/switch.js';\n\n/**\n * Componente switch per filtri con supporto per label e stato\n * @slot - Contenuto opzionale da mostrare accanto al switch (alternativo alla label)\n */\n@Component({\n tag: 'jump-filter-switch',\n styleUrl: 'jump-filter-switch.scss',\n shadow: true,\n})\nexport class JumpFilterSwitch {\n /** Il valore associato al switch */\n @Prop() value: string;\n\n /** La label da mostrare accanto al switch */\n @Prop() label: string;\n\n /** Stato del switch (acceso/spento) */\n @Prop({ reflect: true }) checked: boolean = false;\n\n /** Stato del switch (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Riferimento all'elemento host */\n host: HTMLElement;\n\n /** Riferimento all'elemento sl-switch interno */\n el: any; // Usiamo any per evitare problemi di tipo con le proprietà specifiche di sl-switch\n\n componentDidLoad() {\n this.listenSLChange();\n }\n\n /**\n * Ascolta gli eventi di cambio stato dal switch Shoelace\n */\n listenSLChange() {\n if (this.host) {\n this.host.addEventListener('sl-change', () => {\n // Ignora l'evento se lo switch è disabilitato\n if (this.disabled) {\n return;\n }\n\n this.checked = !this.checked;\n\n const eventData = {\n value: this.value,\n checked: this.checked,\n };\n\n this.toggleCheckbox.emit(eventData);\n this.toggleCheckboxFilterChange.emit(eventData);\n });\n }\n }\n\n /**\n * Evento emesso quando cambia lo stato del switch\n */\n @Event({ eventName: 'jump-switch-change' }) toggleCheckbox: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) toggleCheckboxFilterChange: EventEmitter;\n\n /**\n * Metodo pubblico per verificare lo stato corrente del switch\n * @returns {boolean} Lo stato corrente del switch (true = acceso, false = spento)\n */\n @Method()\n async isChecked() {\n return this.checked;\n }\n\n render() {\n return (\n <Host ref={(host: HTMLElement) => (this.host = host)}>\n {this.value && this.label && (\n <sl-switch\n value={this.value}\n ref={(el: any) => (this.el = el)}\n checked={this.checked}\n disabled={this.disabled}\n >\n {this.label}\n </sl-switch>\n )}\n </Host>\n );\n }\n}\n"]}