@jumpgroup/jump-design-system 0.3.0 → 0.3.2

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 (177) hide show
  1. package/dist/cjs/{index-418c607f.js → index-674508e2.js} +9 -4
  2. package/dist/cjs/index-674508e2.js.map +1 -0
  3. package/dist/cjs/jump-accordion.cjs.entry.js +1 -1
  4. package/dist/cjs/jump-badge.cjs.entry.js +27 -0
  5. package/dist/cjs/jump-badge.cjs.entry.js.map +1 -0
  6. package/dist/cjs/{jump-icon.cjs.entry.js → jump-button_2.cjs.entry.js} +35 -2
  7. package/dist/cjs/jump-button_2.cjs.entry.js.map +1 -0
  8. package/dist/cjs/jump-card-ecommerce.cjs.entry.js +31 -26
  9. package/dist/cjs/jump-card-ecommerce.cjs.entry.js.map +1 -1
  10. package/dist/cjs/jump-card.cjs.entry.js +3 -3
  11. package/dist/cjs/jump-design-system.cjs.js +2 -2
  12. package/dist/cjs/jump-filter.cjs.entry.js +3 -3
  13. package/dist/cjs/jump-filtergroup.cjs.entry.js +3 -3
  14. package/dist/cjs/jump-pagination-table.cjs.entry.js +16 -4
  15. package/dist/cjs/jump-pagination-table.cjs.entry.js.map +1 -1
  16. package/dist/cjs/jump-pagination.cjs.entry.js +18 -5
  17. package/dist/cjs/jump-pagination.cjs.entry.js.map +1 -1
  18. package/dist/cjs/{jump-badge_2.cjs.entry.js → jump-quantity.cjs.entry.js} +16 -24
  19. package/dist/cjs/jump-quantity.cjs.entry.js.map +1 -0
  20. package/dist/cjs/jump-tab-item.cjs.entry.js +4 -4
  21. package/dist/cjs/jump-tab-item.cjs.entry.js.map +1 -1
  22. package/dist/cjs/jump-tab-panel.cjs.entry.js +2 -2
  23. package/dist/cjs/jump-tab.cjs.entry.js +3 -3
  24. package/dist/cjs/jump-tab.cjs.entry.js.map +1 -1
  25. package/dist/cjs/loader.cjs.js +2 -2
  26. package/dist/collection/components/jump-badge/jump-badge.css +90 -6
  27. package/dist/collection/components/jump-badge/jump-badge.js +60 -3
  28. package/dist/collection/components/jump-badge/jump-badge.js.map +1 -1
  29. package/dist/collection/components/jump-badge/jump-badge.stories.js +79 -4
  30. package/dist/collection/components/jump-badge/jump-badge.stories.js.map +1 -1
  31. package/dist/collection/components/jump-button/jump-button.js +1 -1
  32. package/dist/collection/components/jump-card/jump-card.js +2 -2
  33. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.css +4 -0
  34. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +30 -74
  35. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js.map +1 -1
  36. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js +15 -21
  37. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -1
  38. package/dist/collection/components/jump-filter/jump-filter.js +2 -2
  39. package/dist/collection/components/jump-filtergroup/jump-filtergroup.js +2 -2
  40. package/dist/collection/components/jump-pagination/jump-pagination.css +1 -0
  41. package/dist/collection/components/jump-pagination/jump-pagination.js +17 -3
  42. package/dist/collection/components/jump-pagination/jump-pagination.js.map +1 -1
  43. package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +15 -3
  44. package/dist/collection/components/jump-pagination-table/jump-pagination-table.js.map +1 -1
  45. package/dist/collection/components/jump-quantity/jump-quantity.css +3 -1
  46. package/dist/collection/components/jump-quantity/jump-quantity.js +69 -11
  47. package/dist/collection/components/jump-quantity/jump-quantity.js.map +1 -1
  48. package/dist/collection/components/jump-tab/jump-tab.css +2 -5
  49. package/dist/collection/components/jump-tab/jump-tab.js +1 -1
  50. package/dist/collection/components/jump-tab/jump-tab.js.map +1 -1
  51. package/dist/collection/components/jump-tab/jump-tab.stories.js +13 -13
  52. package/dist/collection/components/jump-tab/jump-tab.stories.js.map +1 -1
  53. package/dist/collection/components/jump-tab-item/jump-tab-item-boxed.stories.js +3 -5
  54. package/dist/collection/components/jump-tab-item/jump-tab-item-boxed.stories.js.map +1 -1
  55. package/dist/collection/components/jump-tab-item/jump-tab-item-inline.stories.js +3 -5
  56. package/dist/collection/components/jump-tab-item/jump-tab-item-inline.stories.js.map +1 -1
  57. package/dist/collection/components/jump-tab-item/jump-tab-item.css +34 -34
  58. package/dist/collection/components/jump-tab-item/jump-tab-item.js +3 -2
  59. package/dist/collection/components/jump-tab-item/jump-tab-item.js.map +1 -1
  60. package/dist/collection/components/jump-tab-panel/jump-tab-panel.js +1 -1
  61. package/dist/components/jump-badge2.js +9 -3
  62. package/dist/components/jump-badge2.js.map +1 -1
  63. package/dist/components/jump-button2.js +1 -1
  64. package/dist/components/jump-card-ecommerce.js +36 -39
  65. package/dist/components/jump-card-ecommerce.js.map +1 -1
  66. package/dist/components/jump-card.js +2 -2
  67. package/dist/components/jump-filter.js +2 -2
  68. package/dist/components/jump-filtergroup.js +2 -2
  69. package/dist/components/jump-pagination-table.js +22 -4
  70. package/dist/components/jump-pagination-table.js.map +1 -1
  71. package/dist/components/jump-pagination.js +26 -6
  72. package/dist/components/jump-pagination.js.map +1 -1
  73. package/dist/components/jump-quantity.js +106 -1
  74. package/dist/components/jump-quantity.js.map +1 -1
  75. package/dist/components/jump-tab-item.js +5 -4
  76. package/dist/components/jump-tab-item.js.map +1 -1
  77. package/dist/components/jump-tab-panel.js +1 -1
  78. package/dist/components/jump-tab.js +2 -2
  79. package/dist/components/jump-tab.js.map +1 -1
  80. package/dist/esm/{index-056a0a66.js → index-70f1949a.js} +9 -4
  81. package/dist/esm/index-70f1949a.js.map +1 -0
  82. package/dist/esm/jump-accordion.entry.js +1 -1
  83. package/dist/esm/jump-badge.entry.js +23 -0
  84. package/dist/esm/jump-badge.entry.js.map +1 -0
  85. package/dist/esm/{jump-icon.entry.js → jump-button_2.entry.js} +35 -3
  86. package/dist/esm/jump-button_2.entry.js.map +1 -0
  87. package/dist/esm/jump-card-ecommerce.entry.js +31 -26
  88. package/dist/esm/jump-card-ecommerce.entry.js.map +1 -1
  89. package/dist/esm/jump-card.entry.js +3 -3
  90. package/dist/esm/jump-design-system.js +3 -3
  91. package/dist/esm/jump-filter.entry.js +3 -3
  92. package/dist/esm/jump-filtergroup.entry.js +3 -3
  93. package/dist/esm/jump-pagination-table.entry.js +16 -4
  94. package/dist/esm/jump-pagination-table.entry.js.map +1 -1
  95. package/dist/esm/jump-pagination.entry.js +18 -5
  96. package/dist/esm/jump-pagination.entry.js.map +1 -1
  97. package/dist/esm/{jump-badge_2.entry.js → jump-quantity.entry.js} +17 -24
  98. package/dist/esm/jump-quantity.entry.js.map +1 -0
  99. package/dist/esm/jump-tab-item.entry.js +4 -4
  100. package/dist/esm/jump-tab-item.entry.js.map +1 -1
  101. package/dist/esm/jump-tab-panel.entry.js +2 -2
  102. package/dist/esm/jump-tab.entry.js +3 -3
  103. package/dist/esm/jump-tab.entry.js.map +1 -1
  104. package/dist/esm/loader.js +3 -3
  105. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  106. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  107. package/dist/jump-design-system/p-2cb7d817.entry.js +2 -0
  108. package/dist/jump-design-system/p-2cb7d817.entry.js.map +1 -0
  109. package/dist/jump-design-system/p-34a46a10.entry.js +2 -0
  110. package/dist/jump-design-system/p-34a46a10.entry.js.map +1 -0
  111. package/dist/jump-design-system/p-377a769b.entry.js +2 -0
  112. package/dist/jump-design-system/p-377a769b.entry.js.map +1 -0
  113. package/dist/jump-design-system/p-493c7f4a.entry.js +2 -0
  114. package/dist/jump-design-system/p-493c7f4a.entry.js.map +1 -0
  115. package/dist/jump-design-system/p-4d6cc90d.js +3 -0
  116. package/dist/jump-design-system/p-4d6cc90d.js.map +1 -0
  117. package/dist/jump-design-system/p-56609b82.entry.js +2 -0
  118. package/dist/jump-design-system/p-5a6fbc53.entry.js +2 -0
  119. package/dist/jump-design-system/p-5d713084.entry.js +2 -0
  120. package/dist/jump-design-system/p-7dcb59ed.entry.js +2 -0
  121. package/dist/jump-design-system/p-7dcb59ed.entry.js.map +1 -0
  122. package/dist/jump-design-system/p-8343b4f5.entry.js +2 -0
  123. package/dist/jump-design-system/p-8343b4f5.entry.js.map +1 -0
  124. package/dist/jump-design-system/{p-83e6ab6e.entry.js → p-a6fc23f7.entry.js} +2 -2
  125. package/dist/jump-design-system/{p-58602fcb.entry.js → p-c1665537.entry.js} +2 -2
  126. package/dist/jump-design-system/p-c2bc6395.entry.js +66 -0
  127. package/dist/jump-design-system/p-c2bc6395.entry.js.map +1 -0
  128. package/dist/jump-design-system/p-fafe6478.entry.js +2 -0
  129. package/dist/jump-design-system/p-fafe6478.entry.js.map +1 -0
  130. package/dist/jump-design-system-elements.json +42 -8
  131. package/dist/types/components/jump-badge/jump-badge.d.ts +13 -1
  132. package/dist/types/components/jump-badge/jump-badge.stories.d.ts +22 -1
  133. package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.d.ts +5 -6
  134. package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.stories.d.ts +0 -6
  135. package/dist/types/components/jump-quantity/jump-quantity.d.ts +6 -1
  136. package/dist/types/components/jump-tab-item/jump-tab-item-boxed.stories.d.ts +0 -1
  137. package/dist/types/components/jump-tab-item/jump-tab-item-inline.stories.d.ts +0 -1
  138. package/dist/types/components.d.ts +33 -20
  139. package/package.json +1 -1
  140. package/dist/cjs/index-418c607f.js.map +0 -1
  141. package/dist/cjs/jump-badge_2.cjs.entry.js.map +0 -1
  142. package/dist/cjs/jump-button.cjs.entry.js +0 -41
  143. package/dist/cjs/jump-button.cjs.entry.js.map +0 -1
  144. package/dist/cjs/jump-icon.cjs.entry.js.map +0 -1
  145. package/dist/components/jump-quantity2.js +0 -94
  146. package/dist/components/jump-quantity2.js.map +0 -1
  147. package/dist/esm/index-056a0a66.js.map +0 -1
  148. package/dist/esm/jump-badge_2.entry.js.map +0 -1
  149. package/dist/esm/jump-button.entry.js +0 -37
  150. package/dist/esm/jump-button.entry.js.map +0 -1
  151. package/dist/esm/jump-icon.entry.js.map +0 -1
  152. package/dist/jump-design-system/p-0dc744ce.entry.js +0 -2
  153. package/dist/jump-design-system/p-357cf73d.entry.js +0 -66
  154. package/dist/jump-design-system/p-357cf73d.entry.js.map +0 -1
  155. package/dist/jump-design-system/p-58bed455.entry.js +0 -2
  156. package/dist/jump-design-system/p-58bed455.entry.js.map +0 -1
  157. package/dist/jump-design-system/p-647ec30b.entry.js +0 -2
  158. package/dist/jump-design-system/p-647ec30b.entry.js.map +0 -1
  159. package/dist/jump-design-system/p-8ec76454.entry.js +0 -2
  160. package/dist/jump-design-system/p-8ec76454.entry.js.map +0 -1
  161. package/dist/jump-design-system/p-91794ae6.js +0 -3
  162. package/dist/jump-design-system/p-91794ae6.js.map +0 -1
  163. package/dist/jump-design-system/p-afe0cca0.entry.js +0 -2
  164. package/dist/jump-design-system/p-b2ca2e96.entry.js +0 -2
  165. package/dist/jump-design-system/p-b2ca2e96.entry.js.map +0 -1
  166. package/dist/jump-design-system/p-d58e0952.entry.js +0 -2
  167. package/dist/jump-design-system/p-d58e0952.entry.js.map +0 -1
  168. package/dist/jump-design-system/p-e2318686.entry.js +0 -2
  169. package/dist/jump-design-system/p-e2318686.entry.js.map +0 -1
  170. package/dist/jump-design-system/p-ee61c223.entry.js +0 -2
  171. package/dist/jump-design-system/p-f842ff46.entry.js +0 -2
  172. package/dist/jump-design-system/p-f842ff46.entry.js.map +0 -1
  173. /package/dist/jump-design-system/{p-afe0cca0.entry.js.map → p-56609b82.entry.js.map} +0 -0
  174. /package/dist/jump-design-system/{p-ee61c223.entry.js.map → p-5a6fbc53.entry.js.map} +0 -0
  175. /package/dist/jump-design-system/{p-0dc744ce.entry.js.map → p-5d713084.entry.js.map} +0 -0
  176. /package/dist/jump-design-system/{p-83e6ab6e.entry.js.map → p-a6fc23f7.entry.js.map} +0 -0
  177. /package/dist/jump-design-system/{p-58602fcb.entry.js.map → p-c1665537.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"jump-tab-item.js","sourceRoot":"","sources":["../../../src/components/jump-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AC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU;gBACvP,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC;oBACvE,kEAAW,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAc;gBAE5D,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop,State, h, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab-item',\n styleUrl: 'jump-tab-item.scss',\n shadow: false,\n})\nexport class JumpTabItem {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Identifier of the tab\n */\n @Prop() identifier: string = undefined;\n\n /**\n * Name of the icon. If not provided, the icon will not be displayed\n */\n @Prop() iconName: string = undefined;\n\n /**\n * Icon position, apply only if the icon is present\n * Choosed from \"left\", \"top\"\n */\n @Prop() iconPosition: string = 'left';\n @Prop() label: string = '';\n @Prop() active: boolean = false;\n\n @Prop() disabled: boolean = false;\n\n /**\n * The style of the tab item\n * Choosed from \"inline\", \"boxed\", \"sheet\", \"rounded\"\n */\n @State() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-active-tab' }) changeActiveTab: EventEmitter;\n\n changeTab(identifier){\n this.changeActiveTab.emit({id: identifier});\n }\n\n componentDidLoad() {\n console.log('Component has been rendered');\n // Deve leggere la prop \"variant\" del componente babbo jump-tab e popolare la propria prop \"variant\"\n let parentVariant = this.tabEl.parentElement.getAttribute('variant');\n this.variant = parentVariant;\n }\n\n // componentDidLoad() {\n // console.log('Component has been rendered');\n \n // // console.log('THIS', this);\n // if(this.active){\n // let tab = this.tabEl.previousElementSibling as any;\n // if(tab){\n // tab.style.borderRight = 'none';\n // }\n // }\n // }\n\n // @Watch('active')\n // watchActive(newValue) {\n // console.log('watch active');\n // // Devo ripristinare i bordi di tutti i fratelli di this.tabEl\n // let siblings = this.tabEl.parentElement.children as any;\n // for (let i = 0; i < siblings.length; i++) {\n // siblings[i].style.borderRight = '1px solid red';\n // }\n\n // console.log('thisel', this.tabEl);\n // console.log('newvalue', newValue);\n // console.log('xxxxxx', this.tabEl.classList);\n\n // // Se this.tabEl ha la classe 'active' allora rimuovo il bordo destro\n // if (newValue && this.tabEl.classList.contains('active')) {\n // console.log('contiene ');\n // this.tabEl.style.borderRight = 'none';\n\n // // Rimuovere il bordo destro dal fratello precedente, se esiste\n // let prevEl = this.tabEl.previousElementSibling as any;\n // console.log('revEl', prevEl);\n // if (prevEl) {\n // prevEl.style.borderRight = 'none';\n // }\n // }\n // }\n\n // @Watch('active')\n // watchActive(newValue) {\n // // Ripristina i bordi di tutti gli elementi\n // const items = document.querySelectorAll('.JumpTabItem') as any;\n // console.log('ITEMS', items);\n // items.forEach(item => {\n // item.style.borderRight = '1px solid red';\n // });\n\n // // Verifica se this.tabEl ha la classe 'active'\n // if (newValue && this.tabEl.classList.contains('active')) {\n // // Rimuovere il bordo destro dal nuovo elemento attivo\n // this.tabEl.style.borderRight = 'none';\n\n // // Rimuovere il bordo destro dal fratello precedente, se esiste\n // let prevEl = this.tabEl.previousElementSibling as any;\n // if (prevEl) {\n // prevEl.style.borderRight = 'none';\n // }\n // }\n // }\n\n\n tabEl: HTMLElement;\n\n render() {\n return (\n <Host\n ref={(el) => { this.tabEl = el }}\n class={\"JumpTabItem \" + (this.active ? 'active' : '') + \" \" +(this.variant)}>\n <div class={\"JumpTabItem__Content \" + (this.iconName ? this.iconPosition : '') + \" \" + (this.variant) + \" \" + (this.active ? 'active' : '') + \" \" + (this.disabled ? 'disabled' : '')} onClick={() => this.changeTab(this.identifier)} id={this.identifier}>\n {(this.iconName && (this.variant == 'inline' || this.variant == 'boxed')) &&\n <jump-icon class=\"small\" name={this.iconName}></jump-icon>\n }\n <span class=\"label\">{this.label}</span>\n </div>\n </Host>\n );\n }\n}\n\n"]}
1
+ {"version":3,"file":"jump-tab-item.js","sourceRoot":"","sources":["../../../src/components/jump-tab-item/jump-tab-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAC,KAAK,EAAG,CAAC,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAOrF,MAAM,OAAO,WAAW;;0BAOO,SAAS;wBAKX,SAAS;4BAML,MAAM;qBACb,EAAE;sBACA,KAAK;wBAEH,KAAK;uBAMN,QAAQ;;IAInC,SAAS,CAAC,UAAU;QAClB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAC,EAAE,EAAE,UAAU,EAAC,CAAC,CAAC;IAC9C,CAAC;IAED,gBAAgB;QACd,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;QAC3C,oGAAoG;QACpG,IAAI,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;IAC9B,CAAC;IAkED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA,CAAC,CAAC,EACjC,KAAK,EAAE,cAAc,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,GAAE,CAAC,IAAI,CAAC,OAAO,CAAC;YAC1E,4DAAK,KAAK,EAAE,UAAU,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU;gBAC1O,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC;oBACvE,kEAAW,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,OAAO,GAAa;gBAE3F,6DAAM,KAAK,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CACnC,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop,State, h, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-tab-item',\n styleUrl: 'jump-tab-item.scss',\n shadow: true,\n})\nexport class JumpTabItem {\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Identifier of the tab\n */\n @Prop() identifier: string = undefined;\n\n /**\n * Name of the icon. If not provided, the icon will not be displayed\n */\n @Prop() iconName: string = undefined;\n\n /**\n * Icon position, apply only if the icon is present\n * Choosed from \"left\", \"top\"\n */\n @Prop() iconPosition: string = 'left';\n @Prop() label: string = '';\n @Prop() active: boolean = false;\n\n @Prop() disabled: boolean = false;\n\n /**\n * The style of the tab item\n * Choosed from \"inline\", \"boxed\", \"sheet\", \"rounded\"\n */\n @State() variant: string = 'inline';\n\n @Event({ eventName: 'jump-change-active-tab' }) changeActiveTab: EventEmitter;\n\n changeTab(identifier){\n this.changeActiveTab.emit({id: identifier});\n }\n\n componentDidLoad() {\n console.log('Component has been rendered');\n // Deve leggere la prop \"variant\" del componente babbo jump-tab e popolare la propria prop \"variant\"\n let parentVariant = this.tabEl.parentElement.getAttribute('variant');\n this.variant = parentVariant;\n }\n\n // componentDidLoad() {\n // console.log('Component has been rendered');\n \n // // console.log('THIS', this);\n // if(this.active){\n // let tab = this.tabEl.previousElementSibling as any;\n // if(tab){\n // tab.style.borderRight = 'none';\n // }\n // }\n // }\n\n // @Watch('active')\n // watchActive(newValue) {\n // console.log('watch active');\n // // Devo ripristinare i bordi di tutti i fratelli di this.tabEl\n // let siblings = this.tabEl.parentElement.children as any;\n // for (let i = 0; i < siblings.length; i++) {\n // siblings[i].style.borderRight = '1px solid red';\n // }\n\n // console.log('thisel', this.tabEl);\n // console.log('newvalue', newValue);\n // console.log('xxxxxx', this.tabEl.classList);\n\n // // Se this.tabEl ha la classe 'active' allora rimuovo il bordo destro\n // if (newValue && this.tabEl.classList.contains('active')) {\n // console.log('contiene ');\n // this.tabEl.style.borderRight = 'none';\n\n // // Rimuovere il bordo destro dal fratello precedente, se esiste\n // let prevEl = this.tabEl.previousElementSibling as any;\n // console.log('revEl', prevEl);\n // if (prevEl) {\n // prevEl.style.borderRight = 'none';\n // }\n // }\n // }\n\n // @Watch('active')\n // watchActive(newValue) {\n // // Ripristina i bordi di tutti gli elementi\n // const items = document.querySelectorAll('.JumpTabItem') as any;\n // console.log('ITEMS', items);\n // items.forEach(item => {\n // item.style.borderRight = '1px solid red';\n // });\n\n // // Verifica se this.tabEl ha la classe 'active'\n // if (newValue && this.tabEl.classList.contains('active')) {\n // // Rimuovere il bordo destro dal nuovo elemento attivo\n // this.tabEl.style.borderRight = 'none';\n\n // // Rimuovere il bordo destro dal fratello precedente, se esiste\n // let prevEl = this.tabEl.previousElementSibling as any;\n // if (prevEl) {\n // prevEl.style.borderRight = 'none';\n // }\n // }\n // }\n\n\n tabEl: HTMLElement;\n\n render() {\n return (\n <Host\n ref={(el) => { this.tabEl = el }}\n class={\"JumpTabItem \" + (this.active ? 'active' : '') + \" \" +(this.variant)}>\n <div class={\"Content \" + (this.iconName ? this.iconPosition : '') + \" \" + (this.variant) + \" \" + (this.active ? 'active' : '') + \" \" + (this.disabled ? 'disabled' : '')} onClick={() => this.changeTab(this.identifier)} id={this.identifier}>\n {(this.iconName && (this.variant == 'inline' || this.variant == 'boxed')) &&\n <jump-icon library=\"fa\" category=\"regular\" name={this.iconName} size=\"small\"></jump-icon>\n }\n <span class=\"label\">{this.label}</span>\n </div>\n </Host>\n );\n }\n}\n\n"]}
@@ -5,7 +5,7 @@ export class JumpTabPanel {
5
5
  this.active = false;
6
6
  }
7
7
  render() {
8
- return (h(Host, { key: '5a2a846c7470d079a668b9951d9463a312be4341', class: "JumpTabPanel", id: this.identifier }, h("div", { key: '0b04369ba6c7ed54566383516b8e736cad30b2c3', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, h("slot", { key: '1381d2e4e39f2ddbac4b9532458419c5c03dc704' }))));
8
+ return (h(Host, { key: '90108df0339c76ec7ffef78722400cbd5e5b125d', class: "JumpTabPanel", id: this.identifier }, h("div", { key: '4e127ffdeb05efdd63dc538cb38976252ff5a060', class: "JumpTabPanel__Content " + (this.active ? 'active' : '') }, h("slot", { key: '5e54c0eaed6558e97226ffdc347e0ca8c0d9aa1b' }))));
9
9
  }
10
10
  static get is() { return "jump-tab-panel"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const jumpBadgeCss = ":host{--jump-badge-background:var(--primary-standard);--jump-badge-color:#fff;--jump-badge-border-radius:50px;display:inline-flex;color:var(--jump-badge-color);background-color:var(--jump-badge-background);align-items:center;justify-content:center;font-family:var(--ff-primary, \"Arial\"), sans-serif;font-size:var(--fs-300);font-weight:var(--fw-900);line-height:1;border-radius:var(--jump-badge-border-radius);border:solid 1px var(--jump-badge-border-radius);white-space:nowrap;padding:0.35em 0.6em;user-select:none;cursor:inherit}";
3
+ const jumpBadgeCss = ":host{--jump-badge-background:var(--primary-standard);--jump-badge-color:var(--neutral-white);--jump-badge-border-radius:50px;--jump-badge-border:var(--primary-standard);--jump-badge-padding:4px 12px;display:flex;width:fit-content;gap:0.5rem;color:var(--jump-badge-color);background-color:var(--jump-badge-background);align-items:center;justify-content:center;font-family:var(--ff-primary, \"Arial\"), sans-serif;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:1.2;border-radius:var(--jump-badge-border-radius);border:solid 1px var(--jump-badge-border);white-space:nowrap;padding:var(--jump-badge-padding);user-select:none;cursor:inherit}:host([variant=primary]):host([soft]){--jump-badge-background:var(--primary-soft);--jump-badge-color:var(--primary-standard);--jump-badge-border:var(--primary-soft)}:host([variant=secondary]){--jump-badge-background:var(--secondary-standard);--jump-badge-border:var(--secondary-standard)}:host([variant=secondary]):host([soft]){--jump-badge-background:var(--secondary-soft);--jump-badge-color:var(--secondary-standard);--jump-badge-border:var(--secondary-soft)}:host([variant=neutral]){--jump-badge-background:var(--neutral-grey-secondary);--jump-badge-border:var(--neutral-grey-secondary)}:host([variant=neutral]):host([soft]){--jump-badge-background:var(--neutral-grey-disabled);--jump-badge-color:var(--neutral-grey-secondary);--jump-badge-border:var(--neutral-grey-disabled)}:host([variant=danger]){--jump-badge-background:var(--status-danger-standard);--jump-badge-border:var(--status-danger-standard)}:host([variant=danger]):host([soft]){--jump-badge-background:var(--status-danger-soft);--jump-badge-color:var(--status-danger-standard);--jump-badge-border:var(--status-danger-soft)}:host([variant=success]){--jump-badge-background:var(--status-success-standard);--jump-badge-border:var(--status-success-standard)}:host([variant=success]):host([soft]){--jump-badge-background:var(--status-success-soft);--jump-badge-color:var(--status-success-standard);--jump-badge-border:var(--status-success-soft)}:host([variant=warning]){--jump-badge-background:var(--status-warning-standard);--jump-badge-border:var(--status-warning-standard)}:host([variant=warning]):host([soft]){--jump-badge-background:var(--status-warning-soft);--jump-badge-color:var(--status-warning-standard);--jump-badge-border:var(--status-warning-soft)}:host([dimension=small]){font-size:var(--fs-300)}:host([dimension=dot]){font-size:var(--fs-300);--jump-badge-padding:0 5px;--jump-badge-border-radius:50%}:host([dimension=microdot]){width:0.5rem;height:0.5rem;padding:0;--jump-badge-border-radius:50%}:host([outline]){background-color:var(--jump-badge-background-outline);border:1px solid var(--jump-badge-background);color:var(--jump-badge-background);background-color:transparent}";
4
4
  const JumpBadgeStyle0 = jumpBadgeCss;
5
5
 
6
6
  const AppBadge = /*@__PURE__*/ proxyCustomElement(class AppBadge extends HTMLElement {
@@ -10,14 +10,20 @@ const AppBadge = /*@__PURE__*/ proxyCustomElement(class AppBadge extends HTMLEle
10
10
  this.__attachShadow();
11
11
  this.label = '';
12
12
  this.variant = 'primary';
13
+ this.dimension = 'large';
14
+ this.soft = false;
15
+ this.outline = false;
13
16
  }
14
17
  render() {
15
- return (h(Host, { key: '00c947abf3e46b224b6f20421f3e8ee35fdd9401', "data-variant": this.variant }, this.label));
18
+ return (h(Host, { key: 'c820f0fd33cdbcf6d4269a8346085f1efdf87aab' }, h("slot", { key: '704280d65559cbcb283aeead333ddb27636f905b', name: "prefix" }), this.label));
16
19
  }
17
20
  static get style() { return JumpBadgeStyle0; }
18
21
  }, [1, "jump-badge", {
19
22
  "label": [1],
20
- "variant": [1]
23
+ "variant": [1],
24
+ "dimension": [1],
25
+ "soft": [4],
26
+ "outline": [4]
21
27
  }]);
22
28
  function defineCustomElement() {
23
29
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"jump-badge2.js","mappings":";;AAAA,MAAM,YAAY,GAAG,shBAAshB,CAAC;AAC5iB,wBAAe,YAAY;;MCMd,QAAQ;;;;;qBAIK,EAAE;uBAKe,SAAS;;IAElD,MAAM;QACJ,QACE,EAAC,IAAI,qEAAe,IAAI,CAAC,OAAO,IAC7B,IAAI,CAAC,KAAK,CACN,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/jump-badge/jump-badge.scss?tag=jump-badge&encapsulation=shadow","src/components/jump-badge/jump-badge.tsx"],"sourcesContent":[":host {\n --jump-badge-background: var(--primary-standard);\n --jump-badge-color: #fff;\n --jump-badge-border-radius: 50px;\n\n display: inline-flex;\n color: var(--jump-badge-color);\n background-color: var(--jump-badge-background);\n align-items: center;\n justify-content: center;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n line-height: 1;\n border-radius: var(--jump-badge-border-radius);\n border: solid 1px var(--jump-badge-border-radius);\n white-space: nowrap;\n padding: 0.35em 0.6em;\n user-select: none;\n cursor: inherit;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'jump-badge',\n styleUrl: 'jump-badge.scss',\n shadow: true,\n})\nexport class AppBadge {\n /**\n * Indicates the label of the badge\n */\n @Prop() label: string = '';\n\n /**\n * Indicates the variant of the badge\n */\n @Prop() variant: 'primary'|'secondary' = 'primary';\n\n render() {\n return (\n <Host data-variant={this.variant}>\n {this.label}\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"jump-badge2.js","mappings":";;AAAA,MAAM,YAAY,GAAG,wvFAAwvF,CAAC;AAC9wF,wBAAe,YAAY;;MCMd,QAAQ;;;;;qBAIK,EAAE;uBAKsD,SAAS;yBAKnC,OAAO;oBAKrC,KAAK;uBAKF,KAAK;;IAEhC,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,6DAAM,IAAI,EAAC,QAAQ,GAAQ,EAC1B,IAAI,CAAC,KAAK,CACN,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/jump-badge/jump-badge.scss?tag=jump-badge&encapsulation=shadow","src/components/jump-badge/jump-badge.tsx"],"sourcesContent":[":host {\n --jump-badge-background: var(--primary-standard);\n --jump-badge-color: var(--neutral-white);\n --jump-badge-border-radius: 50px;\n --jump-badge-border: var(--primary-standard);\n --jump-badge-padding: 4px 12px;\n\n display: flex;\n width: fit-content;\n gap: 0.5rem;\n color: var(--jump-badge-color);\n background-color: var(--jump-badge-background);\n align-items: center;\n justify-content: center;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: 1.2;\n border-radius: var(--jump-badge-border-radius);\n border: solid 1px var(--jump-badge-border);\n white-space: nowrap;\n padding: var(--jump-badge-padding);\n user-select: none;\n cursor: inherit;\n}\n\n:host([variant='primary']) {\n &:host([soft]) {\n --jump-badge-background: var(--primary-soft);\n --jump-badge-color: var(--primary-standard);\n --jump-badge-border: var(--primary-soft);\n }\n}\n\n:host([variant='secondary']) {\n --jump-badge-background: var(--secondary-standard);\n --jump-badge-border: var(--secondary-standard);\n\n &:host([soft]) {\n --jump-badge-background: var(--secondary-soft);\n --jump-badge-color: var(--secondary-standard);\n --jump-badge-border: var(--secondary-soft);\n }\n}\n\n:host([variant='neutral']) {\n --jump-badge-background: var(--neutral-grey-secondary);\n --jump-badge-border: var(--neutral-grey-secondary);\n\n &:host([soft]) {\n --jump-badge-background: var(--neutral-grey-disabled);\n --jump-badge-color: var(--neutral-grey-secondary);\n --jump-badge-border: var(--neutral-grey-disabled);\n }\n}\n\n:host([variant='danger']) {\n --jump-badge-background: var(--status-danger-standard);\n --jump-badge-border: var(--status-danger-standard);\n\n &:host([soft]) {\n --jump-badge-background: var(--status-danger-soft);\n --jump-badge-color: var(--status-danger-standard);\n --jump-badge-border: var(--status-danger-soft);\n }\n}\n\n:host([variant='success']) {\n --jump-badge-background: var(--status-success-standard);\n --jump-badge-border: var(--status-success-standard);\n\n &:host([soft]) {\n --jump-badge-background: var(--status-success-soft);\n --jump-badge-color: var(--status-success-standard);\n --jump-badge-border: var(--status-success-soft);\n }\n}\n\n:host([variant='warning']) {\n --jump-badge-background: var(--status-warning-standard);\n --jump-badge-border: var(--status-warning-standard);\n\n &:host([soft]) {\n --jump-badge-background: var(--status-warning-soft);\n --jump-badge-color: var(--status-warning-standard);\n --jump-badge-border: var(--status-warning-soft);\n }\n}\n\n:host([dimension='small']) {\n font-size: var(--fs-300);\n}\n\n:host([dimension='dot']) {\n font-size: var(--fs-300);\n --jump-badge-padding: 0 5px;\n --jump-badge-border-radius: 50%;\n}\n\n:host([dimension='microdot']) {\n width: 0.5rem;\n height: 0.5rem;\n padding: 0;\n --jump-badge-border-radius: 50%;\n}\n\n:host([outline]) {\n background-color: var(--jump-badge-background-outline);\n border: 1px solid var(--jump-badge-background);\n color: var(--jump-badge-background);\n background-color: transparent;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'jump-badge',\n styleUrl: 'jump-badge.scss',\n shadow: true,\n})\nexport class AppBadge {\n /**\n * Indicates the label of the badge\n */\n @Prop() label: string = '';\n\n /**\n * Indicates the variant of the badge\n */\n @Prop() variant: 'primary'|'secondary'|'neutral'|'warning'|'success'|'danger' = 'primary';\n\n /**\n * Indicates the variant of the badge\n */\n @Prop() dimension: 'large'|'small'|'dot'|'microdot' = 'large';\n\n /**\n * Indicates the variant of the badge\n */\n @Prop() soft: boolean = false;\n\n /**\n * Indicates the variant of the badge\n */\n @Prop() outline: boolean = false;\n\n render() {\n return (\n <Host>\n <slot name=\"prefix\"></slot>\n {this.label}\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -29,7 +29,7 @@ const JumpButton = /*@__PURE__*/ proxyCustomElement(class JumpButton extends HTM
29
29
  this.target = this.href ? this.target : '_self';
30
30
  }
31
31
  render() {
32
- return (h(Host, { key: 'b7db771baa0578e8397424b28d1c3aa3b99f5900' }, this.href ? (h("a", { href: this.href, id: this.buttonId, class: this.class, "data-variant": this.variant, "data-outline": this.outline, "data-size": this.size, "data-full": this.full, "data-pill": this.pill, "data-text": this.text, "data-only-icon": this.onlyIcon, "aria-label": this.ariaLabel, target: this.target }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" }))) : (h("button", { id: this.buttonId, class: this.class, "data-variant": this.variant, "data-outline": this.outline, "data-size": this.size, "data-full": this.full, "data-pill": this.pill, "data-text": this.text, "data-only-icon": this.onlyIcon, disabled: this.disabled, "aria-label": this.ariaLabel, type: this.type, name: this.name, value: this.value }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" })))));
32
+ return (h(Host, { key: '654a8147c4251ebab7834f6ddb569e0a3ebe2b77' }, this.href ? (h("a", { href: this.href, id: this.buttonId, class: this.class, "data-variant": this.variant, "data-outline": this.outline, "data-size": this.size, "data-full": this.full, "data-pill": this.pill, "data-text": this.text, "data-only-icon": this.onlyIcon, "aria-label": this.ariaLabel, target: this.target }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" }))) : (h("button", { id: this.buttonId, class: this.class, "data-variant": this.variant, "data-outline": this.outline, "data-size": this.size, "data-full": this.full, "data-pill": this.pill, "data-text": this.text, "data-only-icon": this.onlyIcon, disabled: this.disabled, "aria-label": this.ariaLabel, type: this.type, name: this.name, value: this.value }, h("slot", { name: "prefix" }), !this.onlyIcon && h("slot", null), h("slot", { name: "suffix" })))));
33
33
  }
34
34
  static get style() { return JumpButtonStyle0; }
35
35
  }, [1, "jump-button", {
@@ -1,10 +1,9 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$5 } from './jump-badge2.js';
3
- import { d as defineCustomElement$4 } from './jump-button2.js';
4
- import { d as defineCustomElement$3 } from './jump-icon2.js';
5
- import { d as defineCustomElement$2 } from './jump-quantity2.js';
2
+ import { d as defineCustomElement$4 } from './jump-badge2.js';
3
+ import { d as defineCustomElement$3 } from './jump-button2.js';
4
+ import { d as defineCustomElement$2 } from './jump-icon2.js';
6
5
 
7
- const jumpCardEcommerceCss = ":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;max-width:var(--card-max-width);overflow:hidden;display:flex;flex-direction:column;position:relative;width:100%;font-family:var(--ff-primary, \"Arial\"), sans-serif;line-height:var(--lh-400, 1.3);background-color:var(--jump-card-background);color:var(--jump-card-color)}:host .Footer,:host .Body{display:flex;width:100%}:host jump-badge{position:absolute;top:1rem;left:1rem;z-index:1}:host jump-badge.hasBackground.iconOnly{top:calc(1rem + 8px);left:calc(1rem + 8px)}:host .Favorite{position:absolute;top:1rem;right:1rem;z-index:1}:host .Favorite.hasBackground.iconOnly{top:calc(1rem + 8px);right:calc(1rem + 8px)}:host .Media{overflow:hidden;position:relative;border-top-left-radius:3px;border-top-right-radius:3px;aspect-ratio:1/1}:host .Media img{height:100%;width:100%;object-fit:cover}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Product{font-size:var(--fs-400)}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary)}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--status-danger-standard)}:host .OnlyIconButton{position:absolute;bottom:0;right:0;background:var(--neutral-white);border-top-left-radius:20px;padding:8px 8px 0px 8px}:host .Price{position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:1.5rem 1.5rem auto;justify-items:end;align-items:end;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:var(--lh-400)}:host .Price>*{display:inline-flex}:host .Price__Regular{text-align:right}:host .Price__Regular.sale{text-decoration:line-through;color:var(--neutral-grey-secondary);font-weight:var(--fw-400);font-size:var(--fs-400);grid-column:2;grid-row:1}:host .Price__Sale{grid-column:2;grid-row:2}:host .Price__Discount{color:var(--status-danger-standard);font-weight:var(--fw-400);font-size:var(--fs-300);grid-column:1;grid-row:1}";
6
+ const jumpCardEcommerceCss = ":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;max-width:var(--card-max-width);overflow:hidden;display:flex;flex-direction:column;position:relative;width:100%;font-family:var(--ff-primary, \"Arial\"), sans-serif;line-height:var(--lh-400, 1.3);background-color:var(--jump-card-background);color:var(--jump-card-color)}:host .Footer,:host .Body{display:flex;width:100%}:host jump-badge{position:absolute;top:1rem;left:1rem;z-index:1}:host jump-badge.hasBackground.iconOnly{top:calc(1rem + 8px);left:calc(1rem + 8px)}:host .Favorite{position:absolute;top:1rem;right:1rem;z-index:1}:host .Favorite.hasBackground.iconOnly{top:calc(1rem + 8px);right:calc(1rem + 8px)}:host .Media{overflow:hidden;position:relative;border-top-left-radius:3px;border-top-right-radius:3px;aspect-ratio:1/1}:host .Media img{height:100%;width:100%;object-fit:cover}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Product{font-size:var(--fs-400)}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary)}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--status-danger-standard)}:host .OnlyIconButton{position:absolute;bottom:0;right:0;background:var(--neutral-white);border-top-left-radius:20px;padding:8px 8px 0px 8px}:host .Price{position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:1.5rem 1.5rem auto;justify-items:end;align-items:end;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:var(--lh-400)}:host .Price>*{display:inline-flex}:host .Price__Regular{text-align:right}:host .Price__Regular.sale{text-decoration:line-through;color:var(--neutral-grey-secondary);font-weight:var(--fw-400);font-size:var(--fs-400);grid-column:2;grid-row:1}:host .Price__Sale{grid-column:2;grid-row:2}:host .Price__Discount{color:var(--status-danger-standard);font-weight:var(--fw-400);font-size:var(--fs-300);grid-column:1;grid-row:1}:host(.Pippo){background-color:red}";
8
7
  const JumpCardEcommerceStyle0 = jumpCardEcommerceCss;
9
8
 
10
9
  const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcommerce extends HTMLElement {
@@ -15,7 +14,6 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
15
14
  this.toggleFavorite = createEvent(this, "jump-toggle-favorite", 7);
16
15
  this.productAddToCart = createEvent(this, "jump-add-to-cart", 7);
17
16
  this.productWaitingList = createEvent(this, "jump-add-to-waiting-list", 7);
18
- this.changeQuantity = createEvent(this, "jump-change-quantity", 7);
19
17
  this.changeVariation = createEvent(this, "jump-change-variation", 7);
20
18
  this.onlyIconButton = false;
21
19
  this.hasBackground = false;
@@ -39,13 +37,29 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
39
37
  this.addtoCartText = undefined;
40
38
  this.waitingListText = undefined;
41
39
  this.addToWaitingList = false;
42
- this.quantity = false;
43
- this.changedQuantity = false;
44
40
  this.changedVariation = false;
45
41
  }
46
42
  /* ---------------------- @LIFECYCLE ------------------------- */
47
- componentWillLoad() {
48
- // this._selectVariations = this.selectVariations?.split(',');
43
+ componentWillLoad() { }
44
+ componentDidLoad() {
45
+ this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');
46
+ if (this.jumpQuantityEl) {
47
+ this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));
48
+ this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {
49
+ this.quantity = quantity;
50
+ });
51
+ console.log('Quantity:', this.quantity);
52
+ }
53
+ }
54
+ disconnectedCallback() {
55
+ this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');
56
+ if (this.jumpQuantityEl) {
57
+ this.jumpQuantityEl.removeEventListener('jump-change', this.onQuantityChange);
58
+ }
59
+ }
60
+ /* ---------------------- @METHODS ------------------------- */
61
+ onQuantityChange(e) {
62
+ this.quantity = e.detail.value;
49
63
  }
50
64
  onToggleFavorite() {
51
65
  this.favorite = !this.favorite;
@@ -59,7 +73,7 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
59
73
  const payload = {
60
74
  productId: this.productId,
61
75
  addedToCart: this.addedToCart,
62
- quantity: 2 // da prendere dal quantity
76
+ quantity: this.quantity
63
77
  // mancano le variazioni
64
78
  };
65
79
  this.productAddToCart.emit(payload);
@@ -72,21 +86,6 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
72
86
  addToWaitingList: this.addToWaitingList
73
87
  });
74
88
  }
75
- changeQuantityProduct(event) {
76
- // const quantityInput = this.JumpCardEcommerce.querySelector('jump-quantity');
77
- // const quantityValue = quantityInput.value; // Access the `value` property
78
- const quantityElement = event.target;
79
- console.log('Valore selezionato:', quantityElement);
80
- // const quantityValue = quantityElement.value;
81
- this.changedQuantity = true;
82
- const payload = {
83
- productId: this.productId,
84
- changedQuantity: this.changedQuantity,
85
- quantity: 2 // da sostituire con quaintity value
86
- };
87
- this.changeQuantity.emit(payload);
88
- console.log("changeQuantity payload:", payload);
89
- }
90
89
  changeVariationBody(event) {
91
90
  const selectElement = event.target;
92
91
  const selectedValue = selectElement.value;
@@ -103,13 +102,18 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
103
102
  const backgroundClass = this.hasBackground ? 'hasBackground' : '';
104
103
  const iconOnlyClass = this.onlyIconButton ? 'iconOnly' : '';
105
104
  const justifyClass = this.outOfStock ? 'justify-between' : '';
106
- return (h(Host, { key: 'cf789b80987e6382306da2ad5ace446580a61990', ref: (el) => { this.JumpCardEcommerce = el; } }, this.badge ? h("jump-badge", { class: `${backgroundClass} ${iconOnlyClass}`, variant: "secondary", label: this.badge }) : '', h("jump-button", { key: 'd8a4cf5efe00c8524760cc72cbf442746e6c2597', onClick: () => this.onToggleFavorite(), class: `Favorite ${backgroundClass} ${iconOnlyClass}`, variant: this.favorite ? 'neutral' : 'primary', size: "small", text: true, onlyIcon: true }, h("jump-icon", { key: '16b89f2a5626b9e7fb4691a0de7d629c5ce8dc1c', slot: "prefix", name: "heart", category: this.favorite ? 'light' : 'solid', size: "medium" })), h("div", { key: 'dc3147d29ade372ee937f9cf2a65bd68069d7e30', class: `Media ${iconOnlyClass} ${backgroundClass}` }, h("a", { key: '92d62f4458c29704bda0170e15f00b72c0a79bd0', href: this.link }, this.img && !this.videoSrc ? h("img", { src: this.img, alt: this.imgAlt }) : '', this.videoSrc && !this.img ?
107
- h("video", { autoplay: true }, h("source", { src: this.videoSrc, type: "video/mp4" }), h("source", { src: this.videoSrc, type: "video/mov" }), h("source", { src: this.videoSrc, type: "video/webm" })) : ''), h("div", { key: '0d9ac0e6d99a33313602eafeeba8f2bde64e02d0', class: `NotificationCart ${this.addedToCart == true ? 'is-active' : ''}` }, h("jump-button", { key: '4117a6d5811a18cab91efc6205a4b1674c417bd9', href: this.notificationUrl, variant: "white", text: true }, h("jump-icon", { key: '871ca055dbae216cac54bc269360b16836903cc1', slot: "prefix", name: "check" }), h("span", { key: '039ffeced52e62d4ffb381dfe18d349eed42973a' }, " ", this.notificationText, " "))), this.onlyIconButton ?
105
+ function calculateDiscount(price, salePrice) {
106
+ const discount = ((price - salePrice) / price) * 100;
107
+ return discount.toFixed(0);
108
+ }
109
+ return (h(Host, null, this.badge ? h("jump-badge", { class: `${backgroundClass} ${iconOnlyClass}`, variant: "secondary", dimension: "small", label: this.badge }) : '', h("jump-button", { onClick: () => this.onToggleFavorite(), class: `Favorite ${backgroundClass} ${iconOnlyClass}`, variant: this.favorite ? 'neutral' : 'primary', size: "small", text: true, onlyIcon: true }, h("jump-icon", { slot: "prefix", name: "heart", category: this.favorite ? 'light' : 'solid', size: "medium" })), h("div", { class: `Media ${iconOnlyClass} ${backgroundClass}` }, h("a", { href: this.link }, this.img && !this.videoSrc ? h("img", { src: this.img, alt: this.imgAlt }) : '', this.videoSrc && !this.img ?
110
+ h("video", { autoplay: true }, h("source", { src: this.videoSrc, type: "video/mp4" }), h("source", { src: this.videoSrc, type: "video/mov" }), h("source", { src: this.videoSrc, type: "video/webm" })) : ''), h("div", { class: `NotificationCart ${this.addedToCart == true ? 'is-active' : ''}` }, h("jump-button", { href: this.notificationUrl, variant: "white", text: true }, h("jump-icon", { slot: "prefix", name: "check" }), h("span", null, " ", this.notificationText, " "))), this.onlyIconButton ?
108
111
  h("div", { class: "OnlyIconButton" }, h("jump-button", { variant: "secondary", size: "large", pill: true, onlyIcon: true, onClick: () => this.addProductToCart() }, h("jump-icon", { slot: "prefix", name: 'cart-shopping', category: "regular" })))
109
- : ''), h("div", { key: 'ec82214460c67faba8af6098369d4235bec773e5', class: `Content ${backgroundClass} ${iconOnlyClass}` }, h("div", { key: '953cf7cfd621a0209c2fd10af584cc3cac98760e', class: `Body ${backgroundClass} ${iconOnlyClass}` }, h("div", { key: '09701cab14c47d008f9fd381679c75fff137e3fa' }, h("div", { key: 'fd0bbbff94d79d1a6e0c6ba396da2e74cd4c080c', class: "Info" }, h("div", { key: '9c16dc172061744b418e263b8f2d361ec1761836', class: "Product" }, this.productName), h("div", { key: '5e2c9a1441a2f0dea4e7b6983204ec7a7071f52c', class: "Subtitle" }, this.subtitle)), h("div", { key: '4c0e6462f9600552c6bf2f958c0ece70804f3ab3', class: "Price" }, h("div", { key: 'f02d651ed87dda490d9dd5d45ba3f587b9ebe4e5', class: "Price__Discount" }, "-5%"), h("div", { key: 'cae9ab50ca4739f7e91a759e4d175c2341a98872', class: `Price__Regular ${this.salePrice ? 'sale' : ''}` }, this.currency, this.price), h("div", { key: 'e628599318e8d4a8c249476712f95e8e19951d83', class: "Price__Sale" }, this.currency, this.salePrice))), h("div", { key: 'c324067e3c63718e56a3315cc7e14b1255b97103' }, h("select", { key: '43b91f6b4c88c865a3df41abd583b5aa1f538c84', name: "select", id: "selectID", onChange: (event) => this.changeVariationBody(event) }, h("option", { key: 'a9ae9bec327dc262608cd2dfd7efb5d877dc8a5c', value: 'm' }, "medium"), h("option", { key: '88c68917a0c97b8a208d7906b4603e1ccefec1a4', value: 'l' }, "large"), h("option", { key: '9d84d95a72aa2f7ab5299ea8a478c5c9cff85402', value: 'xl' }, "extra large")), this.quantity ? h("jump-quantity", { onClick: (event) => this.changeQuantityProduct(event) }) : '')), h("div", { key: 'a647b17041f2bc51d91f758e858ae7302930159e', class: `Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass}` }, this.outOfStock ? h("div", { class: "OutOfStock" }, this.outOfStockText ? this.outOfStockText : 'Esaurito') : '', this.outOfStock ?
112
+ : ''), h("div", { class: `Content ${backgroundClass} ${iconOnlyClass}` }, h("div", { class: `Body ${backgroundClass} ${iconOnlyClass}` }, h("div", null, h("div", { class: "Info" }, h("div", { class: "Product" }, this.productName), h("div", { class: "Subtitle" }, this.subtitle)), h("div", { class: "Price" }, h("div", { class: "Price__Discount" }, calculateDiscount(this.price, this.salePrice), "%"), h("div", { class: `Price__Regular ${this.salePrice ? 'sale' : ''}` }, this.currency, this.price), h("div", { class: "Price__Sale" }, this.currency, this.salePrice))), h("div", null, h("slot", { name: "select" }), h("slot", { name: "quantity" }))), h("div", { class: `Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass}` }, this.outOfStock ? h("div", { class: "OutOfStock" }, this.outOfStockText ? this.outOfStockText : 'Esaurito') : '', this.outOfStock ?
110
113
  h("jump-button", { variant: "secondary", size: "small", text: true, onClick: () => this.waitingList() }, h("jump-icon", { slot: "prefix", name: !this.outOfStock ? 'cart-shopping' : 'bell', category: "regular", size: "small" }), this.waitingListText ? this.waitingListText : 'Notifica disponibilità') : '', !this.outOfStock && !this.onlyIconButton ?
111
114
  h("jump-button", { variant: "secondary", size: "small", text: true, onClick: () => this.addProductToCart() }, h("jump-icon", { slot: "prefix", name: !this.outOfStock ? 'cart-shopping' : 'bell', category: "regular", size: "small" }), this.addtoCartText ? this.addtoCartText : 'Aggiungi al carrello') : ''))));
112
115
  }
116
+ get JumpCardEcommerce() { return this; }
113
117
  static get style() { return JumpCardEcommerceStyle0; }
114
118
  }, [1, "jump-card-ecommerce", {
115
119
  "onlyIconButton": [4, "only-icon-button"],
@@ -134,15 +138,13 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
134
138
  "addtoCartText": [1, "addto-cart-text"],
135
139
  "waitingListText": [1, "waiting-list-text"],
136
140
  "addToWaitingList": [4, "add-to-waiting-list"],
137
- "quantity": [1540],
138
- "changedQuantity": [4, "changed-quantity"],
139
141
  "changedVariation": [4, "changed-variation"]
140
142
  }]);
141
143
  function defineCustomElement$1() {
142
144
  if (typeof customElements === "undefined") {
143
145
  return;
144
146
  }
145
- const components = ["jump-card-ecommerce", "jump-badge", "jump-button", "jump-icon", "jump-quantity"];
147
+ const components = ["jump-card-ecommerce", "jump-badge", "jump-button", "jump-icon"];
146
148
  components.forEach(tagName => { switch (tagName) {
147
149
  case "jump-card-ecommerce":
148
150
  if (!customElements.get(tagName)) {
@@ -150,21 +152,16 @@ function defineCustomElement$1() {
150
152
  }
151
153
  break;
152
154
  case "jump-badge":
153
- if (!customElements.get(tagName)) {
154
- defineCustomElement$5();
155
- }
156
- break;
157
- case "jump-button":
158
155
  if (!customElements.get(tagName)) {
159
156
  defineCustomElement$4();
160
157
  }
161
158
  break;
162
- case "jump-icon":
159
+ case "jump-button":
163
160
  if (!customElements.get(tagName)) {
164
161
  defineCustomElement$3();
165
162
  }
166
163
  break;
167
- case "jump-quantity":
164
+ case "jump-icon":
168
165
  if (!customElements.get(tagName)) {
169
166
  defineCustomElement$2();
170
167
  }
@@ -1 +1 @@
1
- {"file":"jump-card-ecommerce.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,mvGAAmvG,CAAC;AACjxG,gCAAe,oBAAoB;;MCMtBA,mBAAiB;;;;;;;;;;8BAOM,KAAK;6BAGN,KAAK;;wBAMmB,KAAK;;;;;2BAe/B,KAAK;;gCAMD,sBAAsB;;;;;;;0BAqBE,KAAK;;;;gCAY5B,KAAK;wBAGgB,KAAK;+BAG3B,KAAK;gCAGJ,KAAK;;;IAqBzC,iBAAiB;;KAEhB;IAED,gBAAgB;QACd,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,CACtB;YACE,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CACF,CAAC;KACH;IAED,gBAAgB;QACd,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,MAAM,OAAO,GAAG;YACd,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,CAAC;;SAEZ,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;KACnD;IAED,WAAW;QACT,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAC1B;YACE,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CACF,CAAA;KACF;IAED,qBAAqB,CAAC,KAAY;;;QAGhC,MAAM,eAAe,GAAG,KAAK,CAAC,MAA0B,CAAC;QACzD,OA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CardEcommerce"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\n\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-background);\n color: var(--jump-card-color);\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 1;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n }\n }\n\n .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 1;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\n }\n }\n\n .Media {\n // aspect-ratio: 3/4;\n overflow: hidden;\n position: relative;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n aspect-ratio: 1/1;\n\n img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n\n &.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-padding) var(--jump-card-padding) 0;\n\n img {\n border-radius: 6px;\n }\n }\n }\n }\n\n .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-padding);\n }\n }\n\n .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-padding) 0;\n\n & > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n & > * {\n flex: 0 1 auto;\n }\n }\n\n &.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n }\n\n &.iconOnly {\n padding: 0;\n }\n }\n\n .Product {\n font-size: var(--fs-400);\n }\n\n .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n }\n\n .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--status-danger-standard);\n }\n\n .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n }\n\n .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n\n & > * {\n display: inline-flex;\n }\n\n &__Regular {\n text-align: right;\n\n &.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n }\n }\n\n &__Sale {\n grid-column: 2;\n grid-row: 2;\n }\n\n &__Discount {\n color: var(--status-danger-standard);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n }\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n JumpCardEcommerce: HTMLElement;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({mutable:true, reflect: true}) favorite: boolean = false;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string ;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string; \n\n /** Indicate if the product is added to cart*/\n @Prop() addedToCart: boolean = false;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\n\n /** Indicates the title of the card*/\n @Prop() productName: string ;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string ;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string;\n\n /** Indicates if the product is outOfStock */\n @Prop({mutable:true, reflect: true}) outOfStock: boolean = false;\n \n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() addtoCartText: string ;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string ;\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicates if the user can choose how much quantity of the product add to cart */\n @Prop({mutable:true, reflect: true}) quantity: boolean = false;\n\n /** Indicate if the quantity is change*/\n @Prop() changedQuantity: boolean = false;\n\n /** Indicate if the variation is change*/\n @Prop() changedVariation: boolean = false;\n\n // /** Indicates the inizial value of input quantity*/\n // @Prop() quantity: number ;\n\n\n /* ---------------------- @EVENTS ------------------------- */\n \n @Event({eventName: 'jump-toggle-favorite'}) toggleFavorite: EventEmitter;\n\n @Event({eventName: 'jump-add-to-cart'}) productAddToCart: EventEmitter;\n\n @Event({eventName: 'jump-add-to-waiting-list'}) productWaitingList: EventEmitter;\n\n @Event({eventName: 'jump-change-quantity'}) changeQuantity: EventEmitter;\n\n @Event({eventName: 'jump-change-variation'}) changeVariation: EventEmitter;\n\n \n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {\n // this._selectVariations = this.selectVariations?.split(',');\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite\n }\n ); \n }\n\n addProductToCart() {\n this.addedToCart = true;\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: 2 // da prendere dal quantity\n // mancano le variazioni\n };\n this.productAddToCart.emit(payload);\n console.log(\"productAddToCart payload:\", payload);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList\n }\n )\n }\n\n changeQuantityProduct(event: Event) {\n // const quantityInput = this.JumpCardEcommerce.querySelector('jump-quantity');\n // const quantityValue = quantityInput.value; // Access the `value` property\n const quantityElement = event.target as HTMLInputElement;\n console.log('Valore selezionato:', quantityElement);\n // const quantityValue = quantityElement.value;\n\n this.changedQuantity = true;\n const payload = {\n productId: this.productId,\n changedQuantity: this.changedQuantity,\n quantity: 2 // da sostituire con quaintity value\n };\n this.changeQuantity.emit(payload);\n console.log(\"changeQuantity payload:\", payload)\n }\n\n changeVariationBody(event: Event) {\n const selectElement = event.target as HTMLSelectElement;\n const selectedValue = selectElement.value;\n\n this.changedVariation = true;\n const payload = {\n productId: this.productId,\n changedVariation: this.changedVariation,\n variation: selectedValue // da sostituire\n };\n this.changeVariation.emit(payload);\n console.log(\"changeVariation payload:\", payload)\n }\n\n render() {\n const backgroundClass = this.hasBackground ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n\n return (\n\n <Host ref={(el) => {this.JumpCardEcommerce = el;}} >\n {this.badge ? <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant=\"secondary\" label={this.badge}></jump-badge> : ''}\n \n <jump-button onClick={ () => this.onToggleFavorite() } class={`Favorite ${backgroundClass} ${iconOnlyClass}`} variant={this.favorite ? 'neutral' : 'primary'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'light' : 'solid'} size=\"medium\"></jump-icon>\n </jump-button> \n\n <div class={`Media ${iconOnlyClass} ${backgroundClass}`}>\n <a href={this.link}>\n {this.img && !this.videoSrc ? <img src={this.img} alt={this.imgAlt}></img> : ''}\n {this.videoSrc && !this.img ? \n <video autoplay> \n <source src={this.videoSrc} type=\"video/mp4\"/> \n <source src={this.videoSrc} type=\"video/mov\"/> \n <source src={this.videoSrc} type=\"video/webm\"/> \n </video> : ''}\n </a> \n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text> \n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon> \n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n {this.onlyIconButton ? \n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}> \n <jump-icon slot=\"prefix\" name='cart-shopping' category=\"regular\"></jump-icon> \n </jump-button> \n </div>\n : ''\n }\n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass}`}>\n <div>\n <div class=\"Info\">\n <div class=\"Product\">{this.productName}</div>\n <div class=\"Subtitle\">{this.subtitle}</div>\n </div>\n\n <div class=\"Price\">\n <div class=\"Price__Discount\">-5%</div>\n <div class={`Price__Regular ${this.salePrice ? 'sale' : ''}`}> \n {this.currency}{this.price}\n </div>\n <div class=\"Price__Sale\">{this.currency}{this.salePrice}</div>\n </div>\n </div>\n <div>\n {/* manca la proprietà se ci sono variazioni o no */}\n <select name=\"select\" id=\"selectID\" onChange={(event) => this.changeVariationBody(event)}>\n <option value='m'>medium</option>\n <option value='l'>large</option>\n <option value='xl'>extra large</option>\n </select>\n\n {this.quantity ? <jump-quantity onClick={(event) => this.changeQuantityProduct(event)}></jump-quantity> : ''}\n \n {/* <slot name=\"select\"></slot>\n <slot name=\"quantity\"></slot> */}\n </div>\n \n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass}`}>\n \n {this.outOfStock ? <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n \n { this.outOfStock ? \n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.waitingList()}> \n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\" size=\"small\"></jump-icon> \n {this.waitingListText ? this.waitingListText : 'Notifica disponibilità'} \n </jump-button> : ''\n }\n\n { !this.outOfStock && !this.onlyIconButton ? \n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.addProductToCart()}> \n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\" size=\"small\"></jump-icon> \n {this.addtoCartText ? this.addtoCartText : 'Aggiungi al carrello'} \n </jump-button> : ''\n }\n\n </div>\n\n </div>\n </Host>\n );\n }\n\n}"],"version":3}
1
+ {"file":"jump-card-ecommerce.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,sxGAAsxG,CAAC;AACpzG,gCAAe,oBAAoB;;MCMtBA,mBAAiB;;;;;;;;;8BAQM,KAAK;6BAGN,KAAK;;wBA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ce"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\n\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-background);\n color: var(--jump-card-color);\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 1;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n }\n }\n\n .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 1;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\n }\n }\n\n .Media {\n // aspect-ratio: 3/4;\n overflow: hidden;\n position: relative;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n aspect-ratio: 1/1;\n\n img {\n height: 100%;\n width: 100%;\n object-fit: cover;\n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n\n &.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-padding) var(--jump-card-padding) 0;\n\n img {\n border-radius: 6px;\n }\n }\n }\n }\n\n .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-padding);\n }\n }\n\n .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-padding) 0;\n\n & > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n & > * {\n flex: 0 1 auto;\n }\n }\n\n &.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n }\n\n &.iconOnly {\n padding: 0;\n }\n }\n\n .Product {\n font-size: var(--fs-400);\n }\n\n .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n }\n\n .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--status-danger-standard);\n }\n\n .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n }\n\n .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n\n & > * {\n display: inline-flex;\n }\n\n &__Regular {\n text-align: right;\n\n &.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n }\n }\n\n &__Sale {\n grid-column: 2;\n grid-row: 2;\n }\n\n &__Discount {\n color: var(--status-danger-standard);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n }\n }\n}\n\n:host(.Pippo) {\n background-color: red;\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element} from '@stencil/core';\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({mutable:true, reflect: true}) favorite: boolean = false;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string ;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string; \n\n /** Indicate if the product is added to cart*/\n @Prop() addedToCart: boolean = false;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\n\n /** Indicates the title of the card*/\n @Prop() productName: string ;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string ;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string;\n\n /** Indicates if the product is outOfStock */\n @Prop({mutable:true, reflect: true}) outOfStock: boolean = false;\n \n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() addtoCartText: string ;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string ;\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the variation is change*/\n @Prop() changedVariation: boolean = false;\n\n /* ---------------------- @STATE ------------------------- */ \n\n // è una proprietà che viene cambiata solo da dentro\n\n quantity: number;\n\n // @Watch('quantity') \n // funziona solo dalla seconda volta in poi \n // watchQuantity(newValue, oldValue) {\n // console.log('quantity changed:', newValue, oldValue);\n // }\n\n /* ---------------------- @EVENTS ------------------------- */\n \n @Event({eventName: 'jump-toggle-favorite'}) toggleFavorite: EventEmitter;\n\n @Event({eventName: 'jump-add-to-cart'}) productAddToCart: EventEmitter;\n\n @Event({eventName: 'jump-add-to-waiting-list'}) productWaitingList: EventEmitter;\n\n @Event({eventName: 'jump-change-variation'}) changeVariation: EventEmitter;\n \n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {}\n\n componentDidLoad() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n \n if(this.jumpQuantityEl){\n this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));\n this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {\n this.quantity = quantity;\n });\n\n console.log('Quantity:', this.quantity)\n }\n }\n\n disconnectedCallback() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n if(this.jumpQuantityEl){\n this.jumpQuantityEl.removeEventListener('jump-change',this.onQuantityChange);\n }\n }\n\n /* ---------------------- @METHODS ------------------------- */\n onQuantityChange(e) {\n this.quantity = e.detail.value;\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite\n }\n ); \n }\n\n addProductToCart() {\n this.addedToCart = true;\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: this.quantity\n // mancano le variazioni\n };\n this.productAddToCart.emit(payload);\n console.log(\"productAddToCart payload:\", payload);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList\n }\n )\n }\n\n changeVariationBody(event: Event) {\n const selectElement = event.target as HTMLSelectElement;\n const selectedValue = selectElement.value;\n\n this.changedVariation = true;\n const payload = {\n productId: this.productId,\n changedVariation: this.changedVariation,\n variation: selectedValue // da sostituire\n };\n this.changeVariation.emit(payload);\n console.log(\"changeVariation payload:\", payload)\n }\n\n \n render() {\n const backgroundClass = this.hasBackground ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host>\n {this.badge ? <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant=\"secondary\" dimension=\"small\" label={this.badge}></jump-badge> : ''}\n \n <jump-button onClick={ () => this.onToggleFavorite() } class={`Favorite ${backgroundClass} ${iconOnlyClass}`} variant={this.favorite ? 'neutral' : 'primary'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'light' : 'solid'} size=\"medium\"></jump-icon>\n </jump-button> \n\n <div class={`Media ${iconOnlyClass} ${backgroundClass}`}>\n <a href={this.link}>\n {this.img && !this.videoSrc ? <img src={this.img} alt={this.imgAlt}></img> : ''}\n {this.videoSrc && !this.img ? \n <video autoplay> \n <source src={this.videoSrc} type=\"video/mp4\"/> \n <source src={this.videoSrc} type=\"video/mov\"/> \n <source src={this.videoSrc} type=\"video/webm\"/> \n </video> : ''}\n </a> \n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text> \n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon> \n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n {this.onlyIconButton ? \n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}> \n <jump-icon slot=\"prefix\" name='cart-shopping' category=\"regular\"></jump-icon> \n </jump-button> \n </div>\n : ''\n }\n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass}`}>\n <div>\n <div class=\"Info\">\n <div class=\"Product\">{this.productName}</div>\n <div class=\"Subtitle\">{this.subtitle}</div>\n </div>\n\n <div class=\"Price\">\n <div class=\"Price__Discount\">\n {calculateDiscount(this.price, this.salePrice)}%\n </div>\n <div class={`Price__Regular ${this.salePrice ? 'sale' : ''}`}> \n {this.currency}{this.price}\n </div>\n <div class=\"Price__Sale\">{this.currency}{this.salePrice}</div>\n </div>\n </div>\n <div>\n \n <slot name=\"select\"></slot>\n <slot name=\"quantity\"></slot>\n </div>\n \n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass}`}>\n \n {this.outOfStock ? <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n \n { this.outOfStock ? \n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.waitingList()}> \n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\" size=\"small\"></jump-icon> \n {this.waitingListText ? this.waitingListText : 'Notifica disponibilità'} \n </jump-button> : ''\n }\n\n { !this.outOfStock && !this.onlyIconButton ? \n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.addProductToCart()}> \n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\" size=\"small\"></jump-icon> \n {this.addtoCartText ? this.addtoCartText : 'Aggiungi al carrello'} \n </jump-button> : ''\n }\n\n </div>\n\n </div>\n </Host>\n );\n }\n\n}"],"version":3}
@@ -20,8 +20,8 @@ const AppCard = /*@__PURE__*/ proxyCustomElement(class AppCard extends HTMLEleme
20
20
  this.videoSrc = '';
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: 'a6d672e0dc05d8d596bf3eb4472339f2b6ad0e33', horizontal: this.horizontal, "border-radius": this.borderRadius, "rounded-media": this.roundedMedia, "top-border-content-radius": this.topBorderContentRadius, boxed: this.boxed, shadow: this.shadow, border: this.border }, this.imgSrc && !this.videoSrc ? h("img", { src: this.imgSrc, alt: this.imgAlt }) : '', this.videoSrc && !this.imgSrc ?
24
- h("video", { autoplay: true }, h("source", { src: this.videoSrc, type: "video/mp4" }), h("source", { src: this.videoSrc, type: "video/mov" }), h("source", { src: this.videoSrc, type: "video/webm" })) : '', h("div", { key: 'cffc3af0b3c23d9738427113f03eb7f17eec99da', class: "Content" }, h("slot", { key: '69b0806f909ecea66e1b83d51ddd6d02003401ea', name: "body" }), h("slot", { key: '9830621fc1314e5f99f3e3f4b1626cb7feb29cb2', name: "footer" }))));
23
+ return (h(Host, { key: '7cb28f9f3ef1a64c859b7b4de719ca9dc58eea8d', horizontal: this.horizontal, "border-radius": this.borderRadius, "rounded-media": this.roundedMedia, "top-border-content-radius": this.topBorderContentRadius, boxed: this.boxed, shadow: this.shadow, border: this.border }, this.imgSrc && !this.videoSrc ? h("img", { src: this.imgSrc, alt: this.imgAlt }) : '', this.videoSrc && !this.imgSrc ?
24
+ h("video", { autoplay: true }, h("source", { src: this.videoSrc, type: "video/mp4" }), h("source", { src: this.videoSrc, type: "video/mov" }), h("source", { src: this.videoSrc, type: "video/webm" })) : '', h("div", { key: 'dabe68c686a49f1af7386182ad4b14181d7c7bcc', class: "Content" }, h("slot", { key: '18be998730900c91de0e93e410ae34abccff4bfc', name: "body" }), h("slot", { key: 'd9dfbf2a4cf014ceb761432cd435179689d5baa6', name: "footer" }))));
25
25
  }
26
26
  static get style() { return JumpCardStyle0; }
27
27
  }, [4, "jump-card", {
@@ -48,8 +48,8 @@ const JumpFilter$1 = /*@__PURE__*/ proxyCustomElement(class JumpFilter extends H
48
48
  }
49
49
  }
50
50
  render() {
51
- return (h(Host, { key: 'a25627f52d4e4eabd9714bca4605f7d506e8302a', mobileFilters: this.showMobileFilters }, this.isMobile && h("jump-button", { key: 'e58ab446793fd152b0e724ea8067f1030d6ecaaa', ref: (el) => { this.mobileToggle = el; }, buttonId: this.filterButtonIcon, variant: 'primary', outline: true }, h("slot", { key: '1ffb7d8f787733c037da73c4643d016a5d314c85', name: "prefix" }, this.filterButtonIcon && h("jump-icon", { key: 'ce09716fa23121cd5b4921eab94260d6a931a36a', class: "small", name: this.filterButtonIcon }), this.filterButtonLabel), h("slot", { key: 'fd339c7580f3e142fd80b4c4eb8503391b7ebfa2', name: "suffix" }, this.activeFilters > 0 ? `(${this.activeFilters})` : '0')), h("div", { key: '078c8038b81200c09f7ddf8d6d054449e896554b', ref: (el) => { this.filtersDrawer = el; }, class: "filtersDrawer", "data-variant": this.direction }, !this.isMobile &&
52
- h("div", { key: '5476fe397f3599a50548b0ea4f47b4c66bbbd6cd', class: 'filtersDrawer__header' }, h("jump-icon", { key: '1e16b65feb8f923c2b9d1f421d939f6eeee136f7', class: "small", name: this.filterButtonIcon }), h("h3", { key: '02f99e915aa045d62d7afedaf0d216adbf8db7d0' }, this.filterHeading)), h("slot", { key: 'aa697d79b5ca21bdcf75e020780019effd19898c' }))));
51
+ return (h(Host, { key: '66c02e0b1d1e1b57c12a7124874b4d41f0281579', mobileFilters: this.showMobileFilters }, this.isMobile && h("jump-button", { key: 'c6533178a0f3a4b389f289ca919925c160a24df8', ref: (el) => { this.mobileToggle = el; }, buttonId: this.filterButtonIcon, variant: 'primary', outline: true }, h("slot", { key: 'd95b2240c4a7cfec153213ba73c5679b9e72d227', name: "prefix" }, this.filterButtonIcon && h("jump-icon", { key: '9b964e09eb0942e796b4bee737a97326e0363c4e', class: "small", name: this.filterButtonIcon }), this.filterButtonLabel), h("slot", { key: '39cc668bd11bcbff18521fed0216024676827487', name: "suffix" }, this.activeFilters > 0 ? `(${this.activeFilters})` : '0')), h("div", { key: 'f864e224be6ef13cd2530cca0e4e61366253ccf0', ref: (el) => { this.filtersDrawer = el; }, class: "filtersDrawer", "data-variant": this.direction }, !this.isMobile &&
52
+ h("div", { key: 'e56713bbe8701eb7c5cabf9a768206c688bebfac', class: 'filtersDrawer__header' }, h("jump-icon", { key: 'eb27d23ae68ed0e245d6ef2d9feb600a6e47ebd2', class: "small", name: this.filterButtonIcon }), h("h3", { key: '4396ffb6e8a10397fe12c322192ab085e06ffa32' }, this.filterHeading)), h("slot", { key: '54b6684aad46df572655a8f29e4c865182c0f1a3' }))));
53
53
  }
54
54
  static get style() { return JumpFilterStyle0; }
55
55
  }, [1, "jump-filter", {
@@ -108,8 +108,8 @@ const JumpFiltergroup$1 = /*@__PURE__*/ proxyCustomElement(class JumpFiltergroup
108
108
  });
109
109
  }
110
110
  render() {
111
- return (h(Host, { key: '839a19d9b3c6e54a9852942d5ed2742f0c3bb148' }, this.heading && h("h5", { key: 'e6ee76715547568a0a523238bccf1270bbf5e51d' }, this.heading), h("div", { key: 'bf592042f4ac6d24f1fc781a1bfa243096e6533b', class: "filterGroup" }, h("slot", { key: '017cdc449f638dfbd280053c7883ae2cdaf460c7', ref: (el) => (this.slotItemsWrapper = el) })), this.inputs.length > this.maxElements &&
112
- h("jump-button", { key: '4ab0117c15d7de1b4a026444f0492810bffe13bc', variant: "primary", size: "small", text: true, name: this.showMore ? this.otherLabel : this.lessLabel, "aria-label": this.showMore ? this.otherLabel : this.lessLabel, onClick: () => this.handleShowMore() }, this.showMore ? this.otherLabel : this.lessLabel, h("jump-icon", { key: '720871af9f4c520b8e11a72615300243b8d14dcb', slot: "suffix", name: this.showMore ? 'chevron-down' : 'chevron-down' }))));
111
+ return (h(Host, { key: '6ea498729a7279ad7b686ef158e6d912c7ec86ce' }, this.heading && h("h5", { key: 'a4d4a1b71dec49d90bd92a30c2335c8a69034906' }, this.heading), h("div", { key: '215a8386f89ba7026b2e1b05aad67157e7f512d6', class: "filterGroup" }, h("slot", { key: '6e96d228078df165e364adccae8d6dceac8626f4', ref: (el) => (this.slotItemsWrapper = el) })), this.inputs.length > this.maxElements &&
112
+ h("jump-button", { key: '6f1a595c19d8d7528b8f99d3665607e56b4c1d27', variant: "primary", size: "small", text: true, name: this.showMore ? this.otherLabel : this.lessLabel, "aria-label": this.showMore ? this.otherLabel : this.lessLabel, onClick: () => this.handleShowMore() }, this.showMore ? this.otherLabel : this.lessLabel, h("jump-icon", { key: '79e9c1540e53fee842bc5ba0658b0437eddbf47d', slot: "suffix", name: this.showMore ? 'chevron-down' : 'chevron-down' }))));
113
113
  }
114
114
  static get style() { return JumpFiltergroupStyle0; }
115
115
  }, [1, "jump-filtergroup", {
@@ -1,4 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$3 } from './jump-button2.js';
2
3
  import { d as defineCustomElement$2 } from './jump-icon2.js';
3
4
 
4
5
  const jumpPaginationTableCss = ":host{display:block}.JumpPaginationTable{--jump-pagination-table-label:var(--neutral-grey-secondary);--jump-pagination-table-arrows:var(--neutral-grey-secondary);--jump-pagination-table-arrows-disabled:var(--neutral-grey-disabled);font-family:var(--ff-primary)}.JumpPaginationTable__Wrapper{display:flex;justify-content:space-between}.JumpPaginationTable__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPaginationTable__Wrapper .elementsPerPage label{color:var(--jump-pagination-table-label);font-size:var(--fs-300);font-weight:normal}.JumpPaginationTable__Wrapper .indicators{font-size:var(--fs-400);font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--jump-pagination-table-label)}.JumpPaginationTable__Wrapper .indicators .arrow{color:var(--jump-pagination-table-arrows);display:flex;align-items:center;gap:10px}.JumpPaginationTable__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPaginationTable__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--jump-pagination-table-arrows-disabled)}.JumpPaginationTable__Wrapper .indicators .elements{color:var(--jump-pagination-table-label);display:flex;align-items:center;gap:5px}";
@@ -69,9 +70,21 @@ const JumpPaginationTable$1 = /*@__PURE__*/ proxyCustomElement(class JumpPaginat
69
70
  /* --------------------- RENDER ------------------------------- */
70
71
  render() {
71
72
  var _a;
72
- return (h(Host, { key: '7aaf182b98f9dbdbb1d6534a1d7b466bbc486fca', class: "JumpPaginationTable" }, h("div", { key: 'b8a5d5213ae3a20ee69aeb75b0d82c58ab4d5200', class: "JumpPaginationTable__Wrapper" }, h("div", { key: '2de29a7b2bb549e3b6e4260429651c1cc3ba72b6', class: "elementsPerPage" }, h("label", { key: 'a9d541046112f0a44239b3d61dea7a80924e56a6', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { key: '28db5dfa88e11493b41a1b846ae35da95ab97926', name: "elements", id: "elements", onChange: (e) => this.setElPerPage(e) }, this.elementsRanges.map((range) => (h("option", { value: range, selected: (this.elPerPage == range) && true }, range))))), h("div", { key: '67f6433160f242f108682af2e97c6fdca2136836', class: "indicators" }, h("div", { key: 'a2babacab58ca903d543396f184ac0e82af517c0', class: "elements" }, h("span", { key: 'b50d80c5aff8d99a9146fb22a7624f3c47784f78' }, h("span", { key: '33e54e9d66a4c80ed6c85ad3ac48e82bd1b329f0' }, this.first), " - ", h("span", { key: '925393912439fb60530f18eb863de15b22e41f25' }, this.last), " ", this.pagLabel, " ", h("span", { key: '1d27a6418dbe2a43e18b99bb48164ffbc0c2c8ca' }, this.total))), h("div", { key: '7d5f3508e4110320bf990c51e8f324d1e2c3cb8a', class: "arrow" }, this.showFirstAndLast &&
73
- h("button", { key: '6807e1defb67535f7ca92443d6869ae203155226', onClick: () => this.doChangePage('first'), disabled: this.first === 1 }, h("jump-icon", { key: '221eda90c3a22540531674ff4bf6e980fded8e22', slot: "prefix", name: "chevrons-left" })), h("button", { key: '7cc613b04ac2aee3621fe8d8375afc5fbfffe41b', onClick: () => this.doChangePage('previous'), disabled: this.first === 1 }, h("jump-icon", { key: 'e05d4ea32e2f48fb59c768a6f5a7589b16dbabe2', slot: "prefix", name: "chevron-left" })), h("button", { key: 'dc347685f6183ed76c4b3e0ac1e9b762d974ef39', onClick: () => this.doChangePage('next'), disabled: this.last === this.total }, h("jump-icon", { key: 'd2b9da97638a1d53936d7ff238ee93f0eff910c2', slot: "prefix", name: "chevron-right" })), this.showFirstAndLast &&
74
- h("button", { key: '9a4a7253847f4e60ae44866b3e12d8623562f7f6', onClick: () => this.doChangePage('last'), disabled: this.last === this.total }, h("jump-icon", { key: 'bcec81a82757e92facd426c351986b19552c9506', slot: "prefix", name: "chevrons-right" })))))));
73
+ return (h(Host, { key: '824d23ed1c7c26ea21047e5ce764887d526b2df6', class: "JumpPaginationTable" }, h("div", { key: '742793df17e3f1826768d7839905baddd0223d2b', class: "JumpPaginationTable__Wrapper" }, h("div", { key: 'b11952c253e2472672418fc1c48ab59a1ba06e51', class: "elementsPerPage" }, h("label", { key: '9dd4f75b634d818787f050bf2fcf01ef4faad36e', htmlFor: "elements" }, (_a = this.labelElementsPerPage) !== null && _a !== void 0 ? _a : 'Elements per page'), h("select", { key: 'f33c5d47808e09b0d6cef474b29373564243c3a2', name: "elements", id: "elements", onChange: (e) => this.setElPerPage(e) }, this.elementsRanges.map((range) => (h("option", { value: range, selected: (this.elPerPage == range) && true }, range))))), h("div", { key: '392ede73df269175c997b713f9a4a5ecd92a0e25', class: "indicators" }, h("div", { key: '2438ecab0062bb1fec07d62e32597e2b2aba3fe4', class: "elements" }, h("span", { key: '49e7ad9c4e6298c41b6dba1d984bc5649b15bbbe' }, h("span", { key: '471b63b04e31295192e992f9c61e31878e1cb04d' }, this.first), " - ", h("span", { key: 'b1d61554e28c1e254efc1cf6768da9480a363aea' }, this.last), " ", this.pagLabel, " ", h("span", { key: 'b0727788ea7159d9bc07708814429c95866faa62' }, this.total))), h("div", { key: '0aa5a04cb2837c519790d43805f83cca903eca7e', class: "arrow" }, this.showFirstAndLast &&
74
+ // <button
75
+ // onClick={() => this.doChangePage('first')}
76
+ // disabled={this.first === 1}
77
+ // >
78
+ // <jump-icon slot="prefix" name="chevrons-left"></jump-icon>
79
+ // </button>
80
+ h("jump-button", { key: 'd767d7705db97eecb2d9111eca909f633c4ae6fa', onClick: () => this.doChangePage('first'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.first === 1 }, " ", h("jump-icon", { key: 'f6799dbdd47a0e845bf7860585c21f5b06d39811', slot: "suffix", name: "chevrons-left" }), " "), h("jump-button", { key: 'd417512e45c62fbed1a1780da00fb01dea27a7e1', onClick: () => this.doChangePage('previous'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.first === 1 }, " ", h("jump-icon", { key: '22199b55ffcfc402f01b9880a728a86b00dc47d3', slot: "suffix", name: "chevron-left" }), " "), h("jump-button", { key: 'ea388be01e0be9adb03033e94665078cb30f64a2', onClick: () => this.doChangePage('next'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.last === this.total }, " ", h("jump-icon", { key: '1cdb6a7d147ad4757e3b7c717e0bd1fab8e356fb', slot: "suffix", name: "chevron-right" }), " "), this.showFirstAndLast &&
81
+ // <button
82
+ // onClick={() => this.doChangePage('last')}
83
+ // disabled={this.last === this.total}
84
+ // >
85
+ // <jump-icon slot="prefix" name="chevrons-right"></jump-icon>
86
+ // </button>
87
+ h("jump-button", { key: '2309eeed0c9a78ffaf9c886979ff35f566841592', onClick: () => this.doChangePage('last'), variant: "primary", text: true, size: "small", name: "scopri", value: "value", "aria-label": "Scopri di pi\u00F9", id: "button", onlyIcon: true, disabled: this.last === this.total }, " ", h("jump-icon", { key: 'f8a929bcdbd2b488cb1bf481a2247fa8d0aa1daf', slot: "suffix", name: "chevrons-right" }), " "))))));
75
88
  }
76
89
  static get watchers() { return {
77
90
  "elPerPage": ["elPerPageChanged"]
@@ -93,13 +106,18 @@ function defineCustomElement$1() {
93
106
  if (typeof customElements === "undefined") {
94
107
  return;
95
108
  }
96
- const components = ["jump-pagination-table", "jump-icon"];
109
+ const components = ["jump-pagination-table", "jump-button", "jump-icon"];
97
110
  components.forEach(tagName => { switch (tagName) {
98
111
  case "jump-pagination-table":
99
112
  if (!customElements.get(tagName)) {
100
113
  customElements.define(tagName, JumpPaginationTable$1);
101
114
  }
102
115
  break;
116
+ case "jump-button":
117
+ if (!customElements.get(tagName)) {
118
+ defineCustomElement$3();
119
+ }
120
+ break;
103
121
  case "jump-icon":
104
122
  if (!customElements.get(tagName)) {
105
123
  defineCustomElement$2();
@@ -1 +1 @@
1
- {"file":"jump-pagination-table.js","mappings":";;;AAAA,MAAM,sBAAsB,GAAG,+wCAA+wC,CAAC;AAC/yC,kCAAe,sBAAsB;;MCMxBA,qBAAmB;;;;;;8BAa2B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;yBAK9C,EAAE;wBAYc,IAAI;oCAKQ,qBAAqB;qBAKpC,GAAG;qBAKH,CAAC;oBAKF,EAAE;gCAKW,KAAK;;IAnC1D,gBAAgB,CAAC,QAAgB,EAAE,QAAgB;QACjD,IAAI,QAAQ,KAAK,QAAQ,EAAE;;YAEzB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;SAC5C;QAED,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;KACpD;;IAkCD,iBAAiB;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;KACzC;;;;IAOD,YAAY,CAAC,CAAC;QACZ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KACjC;IAED,YAAY,CAAC,GAAG;QACd,IAAI,QAAQ,CAAC;QACb,IAAI,OAAO,CAAC;;QAGZ,IAAI,GAAG,KAAK,OAAO,EAAE;YACnB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AAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,eAAe,GAAa,CACnD,EACR,IAAI,CAAC,gBAAgB;YACpB,+DACE,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EACxC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,IAElC,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,gBAAgB,GAAa,CACpD,CAEP,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpPaginationTable"],"sources":["src/components/jump-pagination-table/jump-pagination-table.scss?tag=jump-pagination-table","src/components/jump-pagination-table/jump-pagination-table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPaginationTable {\n --jump-pagination-table-label: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows-disabled: var(--neutral-grey-disabled); //mappare una variabile del design system\n\n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n \n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n \n label {\n color: var(--jump-pagination-table-label);\n font-size: var(--fs-300);\n font-weight: normal;\n }\n }\n \n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-table-label);\n \n .arrow {\n color: var(--jump-pagination-table-arrows);\n display: flex;\n align-items: center;\n gap: 10px;\n \n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n \n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-table-arrows-disabled);\n \n }\n }\n \n .elements {\n color: var(--jump-pagination-table-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n}","import { Component, Event, EventEmitter, Watch, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination-table',\n styleUrl: 'jump-pagination-table.scss',\n shadow: false,\n})\nexport class JumpPaginationTable {\n\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n\n /* ---------------------- @STATE ------------------------------ */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Values for the elements per page select\n */\n @Prop({ reflect: true }) elementsRanges: Array<number> = [10, 20, 60, 100];\n\n /**\n * Number of elements per page selected\n */\n @Prop() elPerPage: number = 10;\n @Watch('elPerPage')\n elPerPageChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n // Riporta la paginazione allo stato iniziale\n this.first = 1;\n this.last = Math.min(this.total, newValue);\n }\n\n this.changeElPerPage.emit({ elPerPage: newValue });\n }\n\n @Prop({ reflect: true }) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n /**\n * Label for the elements per page select\n */\n @Prop({ reflect: true }) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Total of elements\n */\n @Prop({ reflect: true }) total: number = 100; \n\n /**\n * First element of the page\n */\n @Prop({ reflect: true }) first: number = 1;\n\n /**\n * Last element of the page\n */\n @Prop({ reflect: true }) last: number = 10;\n\n /**\n * Show button to navigate so first e last page\n */\n @Prop({ reflect: true }) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n @Event({ eventName: 'jump-change-el-per-page' }) changeElPerPage: EventEmitter;\n\n /* -------------------- LYFECYCLE EVENTS ---------------------- */\n componentWillLoad() {\n this.elPerPage = this.elementsRanges[0];\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n setElPerPage(e) {\n this.elPerPage = e.target.value;\n }\n\n doChangePage(dir) {\n let newFirst;\n let newLast;\n\n //TODO refactorare \n if (dir === 'first') {\n newFirst = 1;\n newLast = Math.min(this.total, this.elPerPage);\n } else if (dir === 'last') {\n newLast = this.total;\n newFirst = Math.max(1, this.total - this.elPerPage + 1);\n } else if (dir === 'previous') {\n newFirst = Math.max(1, this.first - this.elPerPage);\n newLast = Math.min(this.total, newFirst + this.elPerPage - 1);\n } else if (dir === 'next') {\n newLast = Math.min(this.total, this.last + this.elPerPage);\n newFirst = Math.max(1, newLast - this.elPerPage + 1);\n }\n\n this.first = newFirst;\n this.last = newLast;\n\n let details = {\n first: newFirst,\n last: newLast,\n direction: dir\n }\n\n this.changePage.emit(details);\n }\n\n /* --------------------- RENDER ------------------------------- */\n render() {\n return (\n <Host class=\"JumpPaginationTable\">\n <div class=\"JumpPaginationTable__Wrapper\">\n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\" onChange={(e) => this.setElPerPage(e)}>\n {this.elementsRanges.map((range) => (\n <option value={range} selected={(this.elPerPage == range) && true}>{range}</option>\n ))}\n </select>\n </div> \n <div class=\"indicators\">\n <div class=\"elements\">\n <span>\n <span>{this.first}</span> - <span>{this.last}</span> {this.pagLabel} <span>{this.total}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <button \n onClick={() => this.doChangePage('first')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon>\n </button>\n }\n <button\n onClick={() => this.doChangePage('previous')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon>\n </button>\n <button\n onClick={() => this.doChangePage('next')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon>\n </button>\n {this.showFirstAndLast &&\n <button\n onClick={() => this.doChangePage('last')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon>\n </button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"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I,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,OAAO,gBAAY,oBAAe,EAAC,EAAE,EAAC,QAAQ,EAAC,QAAQ,QAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,SAAG,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,eAAe,GAAc,MAAe,EAOrR,IAAI,CAAC,gBAAgB;;;;;;;YAOpB,oEAAa,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,EAAC,SAAS,EAAC,IAAI,QAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,OAAO,gBAAY,oBAAe,EAAC,EAAE,EAAC,QAAQ,EAAC,QAAQ,QAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,SAAG,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,gBAAgB,GAAc,MAAe,CAErR,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpPaginationTable"],"sources":["src/components/jump-pagination-table/jump-pagination-table.scss?tag=jump-pagination-table","src/components/jump-pagination-table/jump-pagination-table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPaginationTable {\n --jump-pagination-table-label: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows-disabled: var(--neutral-grey-disabled); //mappare una variabile del design system\n\n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n \n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n \n label {\n color: var(--jump-pagination-table-label);\n font-size: var(--fs-300);\n font-weight: normal;\n }\n }\n \n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-table-label);\n \n .arrow {\n color: var(--jump-pagination-table-arrows);\n display: flex;\n align-items: center;\n gap: 10px;\n \n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n \n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-table-arrows-disabled);\n \n }\n }\n \n .elements {\n color: var(--jump-pagination-table-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n}","import { Component, Event, EventEmitter, Watch, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination-table',\n styleUrl: 'jump-pagination-table.scss',\n shadow: false,\n})\nexport class JumpPaginationTable {\n\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n\n /* ---------------------- @STATE ------------------------------ */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Values for the elements per page select\n */\n @Prop({ reflect: true }) elementsRanges: Array<number> = [10, 20, 60, 100];\n\n /**\n * Number of elements per page selected\n */\n @Prop() elPerPage: number = 10;\n @Watch('elPerPage')\n elPerPageChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n // Riporta la paginazione allo stato iniziale\n this.first = 1;\n this.last = Math.min(this.total, newValue);\n }\n\n this.changeElPerPage.emit({ elPerPage: newValue });\n }\n\n @Prop({ reflect: true }) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n /**\n * Label for the elements per page select\n */\n @Prop({ reflect: true }) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Total of elements\n */\n @Prop({ reflect: true }) total: number = 100; \n\n /**\n * First element of the page\n */\n @Prop({ reflect: true }) first: number = 1;\n\n /**\n * Last element of the page\n */\n @Prop({ reflect: true }) last: number = 10;\n\n /**\n * Show button to navigate so first e last page\n */\n @Prop({ reflect: true }) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n @Event({ eventName: 'jump-change-el-per-page' }) changeElPerPage: EventEmitter;\n\n /* -------------------- LYFECYCLE EVENTS ---------------------- */\n componentWillLoad() {\n this.elPerPage = this.elementsRanges[0];\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n setElPerPage(e) {\n this.elPerPage = e.target.value;\n }\n\n doChangePage(dir) {\n let newFirst;\n let newLast;\n\n //TODO refactorare \n if (dir === 'first') {\n newFirst = 1;\n newLast = Math.min(this.total, this.elPerPage);\n } else if (dir === 'last') {\n newLast = this.total;\n newFirst = Math.max(1, this.total - this.elPerPage + 1);\n } else if (dir === 'previous') {\n newFirst = Math.max(1, this.first - this.elPerPage);\n newLast = Math.min(this.total, newFirst + this.elPerPage - 1);\n } else if (dir === 'next') {\n newLast = Math.min(this.total, this.last + this.elPerPage);\n newFirst = Math.max(1, newLast - this.elPerPage + 1);\n }\n\n this.first = newFirst;\n this.last = newLast;\n\n let details = {\n first: newFirst,\n last: newLast,\n direction: dir\n }\n\n this.changePage.emit(details);\n }\n\n /* --------------------- RENDER ------------------------------- */\n render() {\n return (\n <Host class=\"JumpPaginationTable\">\n <div class=\"JumpPaginationTable__Wrapper\">\n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\" onChange={(e) => this.setElPerPage(e)}>\n {this.elementsRanges.map((range) => (\n <option value={range} selected={(this.elPerPage == range) && true}>{range}</option>\n ))}\n </select>\n </div> \n <div class=\"indicators\">\n <div class=\"elements\">\n <span>\n <span>{this.first}</span> - <span>{this.last}</span> {this.pagLabel} <span>{this.total}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n // <button \n // onClick={() => this.doChangePage('first')}\n // disabled={this.first === 1}\n // >\n // <jump-icon slot=\"prefix\" name=\"chevrons-left\"></jump-icon>\n // </button>\n <jump-button onClick={() => this.doChangePage('first')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.first === 1}> <jump-icon slot=\"suffix\" name=\"chevrons-left\" ></jump-icon> </jump-button>\n }\n {/* <button\n onClick={() => this.doChangePage('previous')}\n disabled={this.first === 1}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-left\"></jump-icon>\n </button> */}\n <jump-button onClick={() => this.doChangePage('previous')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.first === 1}> <jump-icon slot=\"suffix\" name=\"chevron-left\" ></jump-icon> </jump-button>\n <jump-button onClick={() => this.doChangePage('next')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.last === this.total}> <jump-icon slot=\"suffix\" name=\"chevron-right\" ></jump-icon> </jump-button>\n {/* <button\n onClick={() => this.doChangePage('next')}\n disabled={this.last === this.total}\n >\n <jump-icon slot=\"prefix\" name=\"chevron-right\"></jump-icon>\n </button> */}\n {this.showFirstAndLast &&\n // <button\n // onClick={() => this.doChangePage('last')}\n // disabled={this.last === this.total}\n // >\n // <jump-icon slot=\"prefix\" name=\"chevrons-right\"></jump-icon>\n // </button>\n <jump-button onClick={() => this.doChangePage('last')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.last === this.total}> <jump-icon slot=\"suffix\" name=\"chevrons-right\" ></jump-icon> </jump-button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}