@jumpgroup/jump-design-system 0.3.64 → 0.3.68

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 +106 -4
  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 +235 -5
  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 +115 -6
  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 +106 -4
  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-79c78037.entry.js} +4 -4
  40. package/dist/jump-design-system/{p-53bf2958.entry.js.map → p-79c78037.entry.js.map} +1 -1
  41. package/dist/jump-design-system-elements.json +4 -0
  42. package/dist/types/components/jump-filter-select/jump-filter-select.d.ts +1 -0
  43. package/dist/types/components/jump-filter-switch/jump-filter-switch.d.ts +34 -0
  44. package/dist/types/components/jump-quantity/jump-quantity.d.ts +1 -0
  45. package/dist/types/components/jump-quantity/jump-quantity.stories.d.ts +5 -0
  46. package/dist/types/components.d.ts +34 -0
  47. package/package.json +1 -1
  48. package/dist/jump-design-system/p-172a50cb.entry.js +0 -2
  49. package/dist/jump-design-system/p-172a50cb.entry.js.map +0 -1
  50. package/dist/jump-design-system/p-35633b03.entry.js.map +0 -1
@@ -395,13 +395,42 @@ 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);
399
+ this.valueChange = index.createEvent(this, "jump-switch-value-change", 7);
398
400
  this.value = undefined;
399
401
  this.label = undefined;
402
+ this.name = 'switch-filter';
400
403
  this.checked = false;
401
404
  this.disabled = false;
405
+ this.values = [];
406
+ }
407
+ /**
408
+ * Watch sulla proprietà checked per reagire ai cambiamenti esterni
409
+ */
410
+ checkedChanged(newValue, oldValue) {
411
+ if (newValue !== oldValue) {
412
+ // Aggiorna l'elemento sl-switch
413
+ if (this.el) {
414
+ this.el.checked = newValue;
415
+ }
416
+ // Aggiorna i valori
417
+ this.updateValues();
418
+ }
402
419
  }
403
420
  componentDidLoad() {
404
421
  this.listenSLChange();
422
+ // Inizializza i valori in base allo stato del checkbox
423
+ this.updateValues();
424
+ // Se è stato passato un valore di checked, applica lo stato all'elemento sl-switch
425
+ if (this.el && this.checked) {
426
+ this.el.checked = this.checked;
427
+ }
428
+ }
429
+ /**
430
+ * Aggiorna l'array dei valori in base allo stato del checkbox
431
+ */
432
+ updateValues() {
433
+ this.values = this.checked && this.value ? [this.value] : [];
405
434
  }
406
435
  /**
407
436
  * Ascolta gli eventi di cambio stato dal switch Shoelace
@@ -414,14 +443,70 @@ const JumpFilterSwitch = class {
414
443
  return;
415
444
  }
416
445
  this.checked = !this.checked;
417
- const eventData = {
446
+ this.updateValues();
447
+ // Evento specifico per il componente switch
448
+ const switchEventData = {
418
449
  value: this.value,
419
- checked: this.checked,
450
+ checked: this.checked
451
+ };
452
+ this.toggleCheckbox.emit(switchEventData);
453
+ // Evento standard per il sistema di filtri
454
+ const filterEventData = {
455
+ name: this.name,
456
+ values: this.values,
457
+ checked: this.checked
420
458
  };
421
- this.toggleCheckbox.emit(eventData);
459
+ this.toggleCheckboxFilterChange.emit(filterEventData);
422
460
  });
423
461
  }
424
462
  }
463
+ /**
464
+ * Metodo pubblico per impostare programmaticamente lo stato del switch
465
+ * @param checked - Il nuovo stato del switch (true = acceso, false = spento)
466
+ * @param emitEvent - Se emettere eventi di cambio stato (default: true)
467
+ * @returns {Promise<boolean>} Il nuovo stato del switch
468
+ */
469
+ async setValue(checked, emitEvent = true) {
470
+ // Se il component è disabilitato, non fare nulla
471
+ if (this.disabled) {
472
+ return this.checked;
473
+ }
474
+ // Salva il valore precedente per l'evento
475
+ const oldValue = this.checked;
476
+ // Imposta il nuovo valore
477
+ this.checked = checked;
478
+ // Aggiorna l'elemento sl-switch interno
479
+ if (this.el) {
480
+ this.el.checked = checked;
481
+ }
482
+ // Aggiorna l'array dei valori
483
+ this.updateValues();
484
+ // Emetti eventi se richiesto
485
+ if (emitEvent && oldValue !== checked) {
486
+ // Evento specifico per il componente switch
487
+ const switchEventData = {
488
+ value: this.value,
489
+ checked: this.checked,
490
+ programmatic: true
491
+ };
492
+ this.toggleCheckbox.emit(switchEventData);
493
+ // Evento standard per il sistema di filtri
494
+ const filterEventData = {
495
+ name: this.name,
496
+ values: this.values,
497
+ checked: this.checked,
498
+ programmatic: true
499
+ };
500
+ this.toggleCheckboxFilterChange.emit(filterEventData);
501
+ // Evento specifico per cambio valore programmato
502
+ this.valueChange.emit({
503
+ value: this.value,
504
+ checked: this.checked,
505
+ oldChecked: oldValue
506
+ });
507
+ }
508
+ return this.checked;
509
+ }
425
510
  /**
426
511
  * Metodo pubblico per verificare lo stato corrente del switch
427
512
  * @returns {boolean} Lo stato corrente del switch (true = acceso, false = spento)
@@ -429,9 +514,26 @@ const JumpFilterSwitch = class {
429
514
  async isChecked() {
430
515
  return this.checked;
431
516
  }
517
+ /**
518
+ * Metodo pubblico per ottenere i valori selezionati
519
+ * @returns {string[]} Array contenente il valore se selezionato, altrimenti array vuoto
520
+ */
521
+ async getValues() {
522
+ return this.values;
523
+ }
524
+ /**
525
+ * Metodo pubblico per ottenere il nome del filtro
526
+ * @returns {string} Il nome del filtro
527
+ */
528
+ async getName() {
529
+ return this.name;
530
+ }
432
531
  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))));
532
+ return (index.h(index.Host, { key: '5aaeb4633e6b9392d4adc3c461d1842ec3a90173', ref: (host) => (this.host = host) }, this.value && this.label && (index.h("sl-switch", { key: 'd261e71b29afd307de4941f8e81e71d47246e036', value: this.value, ref: (el) => (this.el = el), checked: this.checked, disabled: this.disabled }, this.label))));
434
533
  }
534
+ static get watchers() { return {
535
+ "checked": ["checkedChanged"]
536
+ }; }
435
537
  };
436
538
  JumpFilterSwitch.style = JumpFilterSwitchStyle0;
437
539
 
@@ -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;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,W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K,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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AI,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, Watch, Method, State } 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 /** Nome identificativo del filtro, utilizzato negli eventi */\n @Prop() name: string = 'switch-filter';\n\n /** Stato del switch (acceso/spento) */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n\n /** Stato del switch (disabilitato) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Stato interno per tenere traccia dei valori selezionati */\n @State() values: string[] = [];\n\n /**\n * Watch sulla proprietà checked per reagire ai cambiamenti esterni\n */\n @Watch('checked')\n checkedChanged(newValue: boolean, oldValue: boolean) {\n if (newValue !== oldValue) {\n // Aggiorna l'elemento sl-switch\n if (this.el) {\n this.el.checked = newValue;\n }\n\n // Aggiorna i valori\n this.updateValues();\n }\n }\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 // Inizializza i valori in base allo stato del checkbox\n this.updateValues();\n\n // Se è stato passato un valore di checked, applica lo stato all'elemento sl-switch\n if (this.el && this.checked) {\n this.el.checked = this.checked;\n }\n }\n\n /**\n * Aggiorna l'array dei valori in base allo stato del checkbox\n */\n private updateValues() {\n this.values = this.checked && this.value ? [this.value] : [];\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 this.updateValues();\n\n // Evento specifico per il componente switch\n const switchEventData = {\n value: this.value,\n checked: this.checked\n };\n this.toggleCheckbox.emit(switchEventData);\n\n // Evento standard per il sistema di filtri\n const filterEventData = {\n name: this.name,\n values: this.values,\n checked: this.checked\n };\n this.toggleCheckboxFilterChange.emit(filterEventData);\n });\n }\n }\n\n /**\n * Metodo pubblico per impostare programmaticamente lo stato del switch\n * @param checked - Il nuovo stato del switch (true = acceso, false = spento)\n * @param emitEvent - Se emettere eventi di cambio stato (default: true)\n * @returns {Promise<boolean>} Il nuovo stato del switch\n */\n @Method()\n async setValue(checked: boolean, emitEvent: boolean = true): Promise<boolean> {\n // Se il component è disabilitato, non fare nulla\n if (this.disabled) {\n return this.checked;\n }\n\n // Salva il valore precedente per l'evento\n const oldValue = this.checked;\n\n // Imposta il nuovo valore\n this.checked = checked;\n\n // Aggiorna l'elemento sl-switch interno\n if (this.el) {\n this.el.checked = checked;\n }\n\n // Aggiorna l'array dei valori\n this.updateValues();\n\n // Emetti eventi se richiesto\n if (emitEvent && oldValue !== checked) {\n // Evento specifico per il componente switch\n const switchEventData = {\n value: this.value,\n checked: this.checked,\n programmatic: true\n };\n this.toggleCheckbox.emit(switchEventData);\n\n // Evento standard per il sistema di filtri\n const filterEventData = {\n name: this.name,\n values: this.values,\n checked: this.checked,\n programmatic: true\n };\n this.toggleCheckboxFilterChange.emit(filterEventData);\n\n // Evento specifico per cambio valore programmato\n this.valueChange.emit({\n value: this.value,\n checked: this.checked,\n oldChecked: oldValue\n });\n }\n\n return this.checked;\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 * Evento emesso quando il valore viene cambiato programmaticamente\n */\n @Event({ eventName: 'jump-switch-value-change' }) valueChange: 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 /**\n * Metodo pubblico per ottenere i valori selezionati\n * @returns {string[]} Array contenente il valore se selezionato, altrimenti array vuoto\n */\n @Method()\n async getValues() {\n return this.values;\n }\n\n /**\n * Metodo pubblico per ottenere il nome del filtro\n * @returns {string} Il nome del filtro\n */\n @Method()\n async getName() {\n return this.name;\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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,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 <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,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],"name":[1],"checked":[1540],"disabled":[516],"values":[32],"setValue":[64],"isChecked":[64],"getValues":[64],"getName":[64]},null,{"checked":["checkedChanged"]}]]],["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,MAAM;YACZ,WAAW,EAAE,iBAAiB;YAC9B,OAAO,EAAE,MAAM;SAChB;QACD,GAAG,EAAE;YACH,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,gFAAgF;YAC7F,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,gIAAgI;YAC9I,EAAE,EAAC;gBACD,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,KAAK;aACd;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,WA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iB,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;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,KA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,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() {