@salla.sa/twilight-components 2.14.467 → 2.14.468

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 (364) hide show
  1. package/dist/cjs/{filepond-Li5IcLEr.js → filepond-C1SAyrFq.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CXgEvsrj.js → filepond-plugin-file-poster-DAhQ7rGa.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-DISjKBXN.js → filepond-plugin-file-validate-size-qfwxpApK.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-BeDqb2RU.js → filepond-plugin-file-validate-type-BbYanfPf.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CTKgasCY.js → filepond-plugin-image-edit-lWdFhMNt.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BqvyVbfM.js → filepond-plugin-image-exif-orientation-C2wUYBSb.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DfX-wD-s.js → filepond-plugin-image-preview-B1ukjrjT.js} +1 -1
  8. package/dist/cjs/{functions-DXNacMtu.js → functions-DCSgyun2.js} +1 -1
  9. package/dist/cjs/{index-JuURs8Nc.js → index-CXr_39D8.js} +9 -5
  10. package/dist/cjs/{index-2n84VIdz.js → index-D3oJJZKW.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{mail-Bgvt2hc9.js → mail-C9D8MHae.js} +2 -2
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +29 -84
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-booking-field_7.cjs.entry.js +11 -11
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +91 -7
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
  29. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-gifting.cjs.entry.js +63 -28
  38. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-login-modal.cjs.entry.js +32 -2
  44. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  45. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +4 -4
  46. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  52. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-map.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +259 -64
  82. package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
  84. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
  85. package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
  86. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-social-share.cjs.entry.js +252 -32
  91. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
  93. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  95. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
  99. package/dist/cjs/salla-verify.cjs.entry.js +3 -3
  100. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +329 -0
  102. package/dist/cjs/{tracked-promise-BdbqBT_O.js → tracked-promise-BsYRgTGD.js} +1 -1
  103. package/dist/cjs/twilight.cjs.js +2 -2
  104. package/dist/cjs/{vanilla-picker-Cj5ogibZ.js → vanilla-picker-DkdzTjSC.js} +1 -1
  105. package/dist/collection/collection-manifest.json +2 -1
  106. package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +90 -6
  107. package/dist/collection/components/salla-gifting/salla-gifting.js +69 -29
  108. package/dist/collection/components/salla-login-modal/salla-login-modal.js +31 -1
  109. package/dist/collection/components/salla-product-options/salla-product-options.css +0 -3
  110. package/dist/collection/components/salla-product-options/salla-product-options.js +28 -84
  111. package/dist/collection/components/salla-products-list/salla-products-list.css +76 -0
  112. package/dist/collection/components/salla-products-list/salla-products-list.js +387 -65
  113. package/dist/collection/components/salla-social-share/salla-social-share.css +161 -0
  114. package/dist/collection/components/salla-social-share/salla-social-share.js +316 -50
  115. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  116. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  117. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  118. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  119. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  120. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  121. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.css +65 -0
  122. package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +432 -0
  123. package/dist/components/index.js +5 -5
  124. package/dist/components/salla-bullet-delivery.js +90 -6
  125. package/dist/components/salla-gifting.js +63 -27
  126. package/dist/components/salla-login-modal2.js +31 -1
  127. package/dist/components/salla-product-options2.js +28 -84
  128. package/dist/components/salla-products-list2.js +266 -64
  129. package/dist/components/salla-social-share.js +1 -189
  130. package/dist/components/salla-social-share2.js +420 -0
  131. package/dist/components/salla-tab-content2.js +1 -1
  132. package/dist/components/salla-tab-header2.js +1 -1
  133. package/dist/components/salla-tabs2.js +1 -1
  134. package/dist/components/salla-tel-input2.js +1 -1
  135. package/dist/components/salla-tooltip2.js +1 -1
  136. package/dist/components/salla-user-settings.js +1 -1
  137. package/dist/components/salla-wishlist-actions.d.ts +11 -0
  138. package/dist/components/salla-wishlist-actions.js +375 -0
  139. package/dist/esm/{filepond-Cpf2HNH9.js → filepond-C4pZr9nR.js} +1 -1
  140. package/dist/esm/{filepond-plugin-file-poster-CVurRtjC.js → filepond-plugin-file-poster-CXpAGxT4.js} +1 -1
  141. package/dist/esm/{filepond-plugin-file-validate-size-Dw2xFbfx.js → filepond-plugin-file-validate-size-Dk4M6ge1.js} +1 -1
  142. package/dist/esm/{filepond-plugin-file-validate-type-D6seJVa2.js → filepond-plugin-file-validate-type-DD7qvRsg.js} +1 -1
  143. package/dist/esm/{filepond-plugin-image-edit-CBikW78V.js → filepond-plugin-image-edit-DMllAEkg.js} +1 -1
  144. package/dist/esm/{filepond-plugin-image-exif-orientation-5yNhe9TO.js → filepond-plugin-image-exif-orientation-BRCbcu_E.js} +1 -1
  145. package/dist/esm/{filepond-plugin-image-preview-PlAAXB7f.js → filepond-plugin-image-preview-DgeylrwN.js} +1 -1
  146. package/dist/esm/{functions-Egzz8fEM.js → functions-DrS7by6t.js} +1 -1
  147. package/dist/esm/{index-Do4FV1UZ.js → index-9SnsJoYO.js} +1 -1
  148. package/dist/esm/{index-a4x9urdK.js → index-D2yBy7Jh.js} +9 -5
  149. package/dist/esm/loader.js +3 -3
  150. package/dist/esm/{mail-DLNIOD9t.js → mail-DzAIgzdz.js} +2 -2
  151. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  152. package/dist/esm/salla-accordion_6.entry.js +1 -1
  153. package/dist/esm/salla-add-product-button_5.entry.js +29 -84
  154. package/dist/esm/salla-advertisement.entry.js +1 -1
  155. package/dist/esm/salla-alert_2.entry.js +1 -1
  156. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  157. package/dist/esm/salla-apps-icons.entry.js +1 -1
  158. package/dist/esm/salla-badge.entry.js +1 -1
  159. package/dist/esm/salla-booking-field_7.entry.js +11 -11
  160. package/dist/esm/salla-bullet-delivery_2.entry.js +91 -7
  161. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  162. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  163. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  164. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  165. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  166. package/dist/esm/salla-contacts.entry.js +3 -3
  167. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  168. package/dist/esm/salla-count-down.entry.js +1 -1
  169. package/dist/esm/salla-custom-fields.entry.js +1 -1
  170. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  171. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  172. package/dist/esm/salla-filters-widget.entry.js +1 -1
  173. package/dist/esm/salla-filters.entry.js +1 -1
  174. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  175. package/dist/esm/salla-gifting.entry.js +63 -28
  176. package/dist/esm/salla-hook.entry.js +1 -1
  177. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  178. package/dist/esm/salla-installment.entry.js +1 -1
  179. package/dist/esm/salla-list-tile.entry.js +1 -1
  180. package/dist/esm/salla-localization-modal.entry.js +1 -1
  181. package/dist/esm/salla-login-modal.entry.js +32 -2
  182. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  183. package/dist/esm/salla-loyalty-hero_2.entry.js +4 -4
  184. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  185. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  186. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  187. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  188. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  189. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  190. package/dist/esm/salla-loyalty.entry.js +1 -1
  191. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  192. package/dist/esm/salla-map.entry.js +1 -1
  193. package/dist/esm/salla-menu.entry.js +1 -1
  194. package/dist/esm/salla-metadata.entry.js +1 -1
  195. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  196. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  197. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  198. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  199. package/dist/esm/salla-notification-item.entry.js +1 -1
  200. package/dist/esm/salla-notifications.entry.js +1 -1
  201. package/dist/esm/salla-offer-modal.entry.js +1 -1
  202. package/dist/esm/salla-offer.entry.js +1 -1
  203. package/dist/esm/salla-order-branch.entry.js +1 -1
  204. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  205. package/dist/esm/salla-order-details-options.entry.js +1 -1
  206. package/dist/esm/salla-order-details.entry.js +1 -1
  207. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  208. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  209. package/dist/esm/salla-order-edit.entry.js +1 -1
  210. package/dist/esm/salla-order-summary.entry.js +1 -1
  211. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  212. package/dist/esm/salla-orders.entry.js +1 -1
  213. package/dist/esm/salla-payments.entry.js +1 -1
  214. package/dist/esm/salla-placeholder.entry.js +1 -1
  215. package/dist/esm/salla-price-range.entry.js +1 -1
  216. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  217. package/dist/esm/salla-product-card_2.entry.js +1 -1
  218. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  219. package/dist/esm/salla-products-list.entry.js +259 -64
  220. package/dist/esm/salla-progress-bar.entry.js +1 -1
  221. package/dist/esm/salla-quick-order.entry.js +3 -3
  222. package/dist/esm/salla-rating-modal.entry.js +3 -3
  223. package/dist/esm/salla-reward-action_4.entry.js +3 -3
  224. package/dist/esm/salla-scopes.entry.js +1 -1
  225. package/dist/esm/salla-search.entry.js +1 -1
  226. package/dist/esm/salla-skeleton.entry.js +1 -1
  227. package/dist/esm/salla-slider.entry.js +1 -1
  228. package/dist/esm/salla-social-share.entry.js +252 -32
  229. package/dist/esm/salla-social.entry.js +1 -1
  230. package/dist/esm/salla-tab-content_3.entry.js +4 -4
  231. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  232. package/dist/esm/salla-tooltip.entry.js +2 -2
  233. package/dist/esm/salla-trust-badges.entry.js +1 -1
  234. package/dist/esm/salla-user-menu.entry.js +1 -1
  235. package/dist/esm/salla-user-profile.entry.js +1 -1
  236. package/dist/esm/salla-user-settings.entry.js +2 -2
  237. package/dist/esm/salla-verify.entry.js +3 -3
  238. package/dist/esm/salla-wallet.entry.js +1 -1
  239. package/dist/esm/salla-wishlist-actions.entry.js +327 -0
  240. package/dist/esm/{tracked-promise-BX5clCDX.js → tracked-promise-CTcAqNfZ.js} +1 -1
  241. package/dist/esm/twilight.js +3 -3
  242. package/dist/esm/{vanilla-picker-DB0pDHa7.js → vanilla-picker-DfeK45Yv.js} +1 -1
  243. package/dist/twilight/{p-61b1fd3b.entry.js → p-07af3286.entry.js} +1 -1
  244. package/dist/twilight/{p-ee605cef.entry.js → p-08337b2b.entry.js} +1 -1
  245. package/dist/twilight/{p-74a61155.entry.js → p-08771dff.entry.js} +1 -1
  246. package/dist/twilight/{p-13a033fa.entry.js → p-0e1bab4f.entry.js} +1 -1
  247. package/dist/twilight/{p-b0bf7a5b.entry.js → p-0eadca17.entry.js} +1 -1
  248. package/dist/twilight/{p-92b02f3c.entry.js → p-12ccc1ab.entry.js} +1 -1
  249. package/dist/twilight/{p-52fe97c8.entry.js → p-1574176e.entry.js} +1 -1
  250. package/dist/twilight/{p-0957f323.entry.js → p-17015f9c.entry.js} +1 -1
  251. package/dist/twilight/{p-b8ab7da8.entry.js → p-1920b702.entry.js} +1 -1
  252. package/dist/twilight/{p-91363b7e.entry.js → p-1a1cebfa.entry.js} +1 -1
  253. package/dist/twilight/{p-1130d4b7.entry.js → p-1a844fda.entry.js} +1 -1
  254. package/dist/twilight/{p-42a0b54a.entry.js → p-1b7ebf47.entry.js} +1 -1
  255. package/dist/twilight/{p-e726123e.entry.js → p-223d7ceb.entry.js} +1 -1
  256. package/dist/twilight/{p-ff270706.entry.js → p-255f5d2a.entry.js} +1 -1
  257. package/dist/twilight/{p-0da78d4e.entry.js → p-266f57de.entry.js} +1 -1
  258. package/dist/twilight/p-28bdf8ec.entry.js +4 -0
  259. package/dist/twilight/{p-fbfacb11.entry.js → p-2c7086ec.entry.js} +1 -1
  260. package/dist/twilight/{p-d33203b7.entry.js → p-2c7f524a.entry.js} +1 -1
  261. package/dist/twilight/{p-c60c302f.entry.js → p-30ea9a82.entry.js} +1 -1
  262. package/dist/twilight/{p-b80adb19.entry.js → p-313d38cd.entry.js} +1 -1
  263. package/dist/twilight/{p-241bd42e.entry.js → p-315ce27b.entry.js} +1 -1
  264. package/dist/twilight/p-378d45e2.entry.js +4 -0
  265. package/dist/twilight/p-3c2fe8cd.entry.js +4 -0
  266. package/dist/twilight/{p-d905fbca.entry.js → p-3d1e7982.entry.js} +1 -1
  267. package/dist/twilight/{p-a068fff4.entry.js → p-3d7c0ac6.entry.js} +1 -1
  268. package/dist/twilight/{p-c0380d40.entry.js → p-3d8d289e.entry.js} +1 -1
  269. package/dist/twilight/{p-f6bb956c.entry.js → p-4144c908.entry.js} +1 -1
  270. package/dist/twilight/{p-5b365561.entry.js → p-453a7bb2.entry.js} +1 -1
  271. package/dist/twilight/{p-6d87b134.entry.js → p-4c457ba5.entry.js} +1 -1
  272. package/dist/twilight/{p-735fafef.entry.js → p-4d3bcacd.entry.js} +1 -1
  273. package/dist/twilight/{p-d9d4ea5b.entry.js → p-4dedb514.entry.js} +1 -1
  274. package/dist/twilight/{p-0b169d4e.entry.js → p-50dfec0a.entry.js} +1 -1
  275. package/dist/twilight/{p-1ce817c2.entry.js → p-53f83426.entry.js} +1 -1
  276. package/dist/twilight/{p-afcb0117.entry.js → p-54e9ac89.entry.js} +1 -1
  277. package/dist/twilight/{p-35ac1fc9.entry.js → p-571b8e00.entry.js} +1 -1
  278. package/dist/twilight/{p-9dc0fec4.entry.js → p-5a5057a8.entry.js} +1 -1
  279. package/dist/twilight/{p-ec073354.entry.js → p-5a9b94f8.entry.js} +1 -1
  280. package/dist/twilight/{p-9b639078.entry.js → p-5c1c520a.entry.js} +1 -1
  281. package/dist/twilight/{p-f170aff7.entry.js → p-5d06fe77.entry.js} +1 -1
  282. package/dist/twilight/{p-ec5ae058.entry.js → p-5e433652.entry.js} +1 -1
  283. package/dist/twilight/{p-b0ed6a9f.entry.js → p-6046666d.entry.js} +1 -1
  284. package/dist/twilight/{p-10e0936d.entry.js → p-67e23040.entry.js} +1 -1
  285. package/dist/twilight/{p-fa039238.entry.js → p-6c777951.entry.js} +1 -1
  286. package/dist/twilight/{p-53cbb271.entry.js → p-749dbf27.entry.js} +1 -1
  287. package/dist/twilight/p-7bd464f3.entry.js +4 -0
  288. package/dist/twilight/{p-c8fd03c0.entry.js → p-7ffc1711.entry.js} +1 -1
  289. package/dist/twilight/{p-89f11893.entry.js → p-83b6c374.entry.js} +1 -1
  290. package/dist/twilight/{p-bfbf8121.entry.js → p-8b5d26d3.entry.js} +1 -1
  291. package/dist/twilight/{p-92f3ea44.entry.js → p-9a0514dd.entry.js} +1 -1
  292. package/dist/twilight/{p-f5135cb5.entry.js → p-9ba953ab.entry.js} +1 -1
  293. package/dist/twilight/{p-BVqg7xd9.js → p-BGpAIcg-.js} +1 -1
  294. package/dist/twilight/{p-fCaOxwGH.js → p-BHkz1ssL.js} +1 -1
  295. package/dist/twilight/{p-CsMnvJkR.js → p-BZhp8a87.js} +1 -1
  296. package/dist/twilight/p-Bo1nXenO.js +4 -0
  297. package/dist/twilight/{p-D9ni3BuG.js → p-BojnM4VS.js} +1 -1
  298. package/dist/twilight/{p-B7KW0zhB.js → p-CBU9I-zy.js} +1 -1
  299. package/dist/twilight/{p-pOgjUtf9.js → p-CGd7EQZr.js} +1 -1
  300. package/dist/twilight/{p-EPfEwqOC.js → p-D01LipFK.js} +1 -1
  301. package/dist/twilight/{p-a4x9urdK.js → p-D2yBy7Jh.js} +2 -2
  302. package/dist/twilight/{p-DiWHgCMH.js → p-DSgSJMud.js} +1 -1
  303. package/dist/twilight/{p-DLNIOD9t.js → p-DzAIgzdz.js} +1 -1
  304. package/dist/twilight/{p-fe506679.entry.js → p-a0d88c4d.entry.js} +1 -1
  305. package/dist/twilight/{p-f684d7bf.entry.js → p-a2b53a52.entry.js} +1 -1
  306. package/dist/twilight/{p-78020271.entry.js → p-a3e1fafc.entry.js} +1 -1
  307. package/dist/twilight/{p-fdde8399.entry.js → p-a463d567.entry.js} +1 -1
  308. package/dist/twilight/{p-ba1199ba.entry.js → p-a6a9e398.entry.js} +1 -1
  309. package/dist/twilight/{p-0405f5e8.entry.js → p-a79f60e6.entry.js} +1 -1
  310. package/dist/twilight/{p-0bdf58a4.entry.js → p-aadfd70e.entry.js} +1 -1
  311. package/dist/twilight/{p-ad19661d.entry.js → p-ad0a27e2.entry.js} +1 -1
  312. package/dist/twilight/{p-e90d18b2.entry.js → p-ae8bd2e7.entry.js} +1 -1
  313. package/dist/twilight/{p-d17596ff.entry.js → p-af121bbf.entry.js} +1 -1
  314. package/dist/twilight/p-b0f28806.entry.js +4 -0
  315. package/dist/twilight/{p-0b1970c2.entry.js → p-b3f6b725.entry.js} +1 -1
  316. package/dist/twilight/{p-1a37b959.entry.js → p-b7e720e8.entry.js} +1 -1
  317. package/dist/twilight/{p-a53d5944.entry.js → p-b80016c8.entry.js} +1 -1
  318. package/dist/twilight/{p-635347c9.entry.js → p-c0f40eea.entry.js} +1 -1
  319. package/dist/twilight/p-c4bc10c1.entry.js +4 -0
  320. package/dist/twilight/p-c637b6bb.entry.js +4 -0
  321. package/dist/twilight/{p-127ee640.entry.js → p-c6e18746.entry.js} +1 -1
  322. package/dist/twilight/{p-5803c158.entry.js → p-cb855cb3.entry.js} +1 -1
  323. package/dist/twilight/{p-4d393389.entry.js → p-cbc44b3e.entry.js} +1 -1
  324. package/dist/twilight/{p-6d47892b.entry.js → p-cbf547f0.entry.js} +1 -1
  325. package/dist/twilight/{p-e27363dd.entry.js → p-cebad615.entry.js} +1 -1
  326. package/dist/twilight/{p-316135f8.entry.js → p-cfd910a8.entry.js} +1 -1
  327. package/dist/twilight/{p-d0340e11.entry.js → p-d0a8b9be.entry.js} +1 -1
  328. package/dist/twilight/{p-59f7f014.entry.js → p-d0cae7da.entry.js} +1 -1
  329. package/dist/twilight/{p-03d13b9f.entry.js → p-d861eea6.entry.js} +1 -1
  330. package/dist/twilight/p-daa9c0b3.entry.js +4 -0
  331. package/dist/twilight/{p-59f815bc.entry.js → p-db43fa93.entry.js} +1 -1
  332. package/dist/twilight/{p-e1205d19.entry.js → p-e06a7e19.entry.js} +1 -1
  333. package/dist/twilight/{p-0c748664.entry.js → p-e34f68e0.entry.js} +1 -1
  334. package/dist/twilight/{p-08b2c781.entry.js → p-e4cac2a9.entry.js} +1 -1
  335. package/dist/twilight/{p-056400a1.entry.js → p-e5de1833.entry.js} +1 -1
  336. package/dist/twilight/{p-fa1cc092.entry.js → p-e80ee5b0.entry.js} +6 -6
  337. package/dist/twilight/{p-16bcc5ab.entry.js → p-e8ffc069.entry.js} +1 -1
  338. package/dist/twilight/{p-2bcfb4f3.entry.js → p-ee8c7a5a.entry.js} +1 -1
  339. package/dist/twilight/p-f0dedf42.entry.js +4 -0
  340. package/dist/twilight/{p-37457147.entry.js → p-f3a01895.entry.js} +1 -1
  341. package/dist/twilight/{p-ef8fb222.entry.js → p-fb56a444.entry.js} +1 -1
  342. package/dist/twilight/{p-e8a82952.entry.js → p-fe1bced4.entry.js} +1 -1
  343. package/dist/twilight/{p-DSBkBAFI.js → p-paiaALkJ.js} +1 -1
  344. package/dist/twilight/{p-CkA6UKAD.js → p-xz8gqXL9.js} +1 -1
  345. package/dist/twilight/twilight.esm.js +1 -1
  346. package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +16 -0
  347. package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
  348. package/dist/types/components/salla-gifting/salla-gifting.d.ts +4 -1
  349. package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +2 -0
  350. package/dist/types/components/salla-product-options/salla-product-options.d.ts +0 -11
  351. package/dist/types/components/salla-products-list/salla-products-list.d.ts +60 -6
  352. package/dist/types/components/salla-social-share/salla-social-share.d.ts +39 -2
  353. package/dist/types/components/salla-wishlist-actions/salla-wishlist-actions.d.ts +93 -0
  354. package/dist/types/components.d.ts +172 -18
  355. package/package.json +5 -5
  356. package/dist/twilight/p-234fdf72.entry.js +0 -4
  357. package/dist/twilight/p-3fbd88d0.entry.js +0 -4
  358. package/dist/twilight/p-7a1cfd65.entry.js +0 -4
  359. package/dist/twilight/p-865c602e.entry.js +0 -4
  360. package/dist/twilight/p-9df5c9a7.entry.js +0 -4
  361. package/dist/twilight/p-C4aFleDM.js +0 -4
  362. package/dist/twilight/p-e485d0b8.entry.js +0 -4
  363. package/dist/twilight/p-f5072671.entry.js +0 -4
  364. package/dist/twilight/p-fb7904e6.entry.js +0 -4
@@ -0,0 +1,161 @@
1
+ :global(body.s-social-share-modal-is-open) {
2
+ overflow: hidden;
3
+ }
4
+
5
+ .s-social-share-modal {
6
+ position: fixed;
7
+ inset: 0;
8
+ z-index: 60;
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ padding: 1rem;
13
+ background-color: rgba(17, 24, 39, 0.5);
14
+ }
15
+
16
+ .s-social-share-modal-dialog {
17
+ position: relative;
18
+ width: 100%;
19
+ max-width: 32rem;
20
+ padding: 1.5rem;
21
+ background-color: #fff;
22
+ border-radius: 1rem;
23
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
24
+ }
25
+
26
+ .s-social-share-modal-handle {
27
+ display: none;
28
+ }
29
+
30
+ .s-social-share-modal-header {
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: space-between;
34
+ gap: 1rem;
35
+ margin-bottom: 1.25rem;
36
+ }
37
+
38
+ .s-social-share-modal-title {
39
+ font-size: 1.125rem;
40
+ font-weight: 700;
41
+ color: #1f2937;
42
+ }
43
+
44
+ .s-social-share-modal-close {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ padding: 0.25rem;
49
+ line-height: 0;
50
+ background: transparent;
51
+ border: 0;
52
+ cursor: pointer;
53
+ }
54
+
55
+ .s-social-share-modal-close-icon svg {
56
+ width: 1.25rem;
57
+ height: 1.25rem;
58
+ fill: #ef4444;
59
+ }
60
+
61
+ .s-social-share-modal-platforms {
62
+ display: grid;
63
+ grid-template-columns: repeat(4, minmax(0, 1fr));
64
+ gap: 0.75rem;
65
+ }
66
+
67
+ .s-social-share-modal-card {
68
+ display: flex;
69
+ flex-direction: column;
70
+ align-items: center;
71
+ gap: 0.5rem;
72
+ padding: 0.75rem;
73
+ border: 1px solid #e5e7eb;
74
+ border-radius: 0.75rem;
75
+ text-decoration: none;
76
+ cursor: pointer;
77
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
78
+ }
79
+
80
+ .s-social-share-modal-card:hover {
81
+ border-color: #d1d5db;
82
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
83
+ }
84
+
85
+ .s-social-share-modal-icon {
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ width: 3rem;
90
+ height: 3rem;
91
+ border-radius: 9999px;
92
+ }
93
+
94
+ .s-social-share-modal-icon svg {
95
+ width: 1.25rem;
96
+ height: 1.25rem;
97
+ fill: #fff;
98
+ }
99
+
100
+ .s-social-share-modal-card-label {
101
+ font-size: 0.875rem;
102
+ color: #4b5563;
103
+ }
104
+
105
+ .s-social-share-modal-copy-row {
106
+ display: flex;
107
+ align-items: center;
108
+ gap: 0.75rem;
109
+ margin-top: 1rem;
110
+ padding: 0.5rem;
111
+ background-color: #f3f4f6;
112
+ border-radius: 0.75rem;
113
+ }
114
+
115
+ .s-social-share-modal-url {
116
+ flex: 1 1 auto;
117
+ min-width: 0;
118
+ padding: 0 0.5rem;
119
+ font-size: 0.875rem;
120
+ color: #6b7280;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ }
125
+
126
+ @keyframes s-social-share-sheet-in {
127
+ from {
128
+ transform: translateY(100%);
129
+ }
130
+ to {
131
+ transform: translateY(0);
132
+ }
133
+ }
134
+ @media (max-width: 640px) {
135
+ .s-social-share-modal {
136
+ align-items: flex-end;
137
+ justify-content: center;
138
+ padding: 0;
139
+ }
140
+ .s-social-share-modal-dialog {
141
+ max-width: none;
142
+ padding: 0.75rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
143
+ border-radius: 1rem 1rem 0 0;
144
+ box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
145
+ animation: s-social-share-sheet-in 0.28s ease-out;
146
+ }
147
+ .s-social-share-modal-handle {
148
+ display: block;
149
+ width: 2.5rem;
150
+ height: 0.25rem;
151
+ margin: 0 auto 0.75rem;
152
+ background-color: #d1d5db;
153
+ border-radius: 9999px;
154
+ }
155
+ .s-social-share-modal-header {
156
+ margin-bottom: 1rem;
157
+ }
158
+ .s-social-share-modal-platforms {
159
+ grid-template-columns: repeat(2, minmax(0, 1fr));
160
+ }
161
+ }
@@ -16,30 +16,69 @@ import ShareAlt from "../../assets/svg/share-alt.svg";
16
16
  */
17
17
  export class SallaSocialShare {
18
18
  constructor() {
19
+ this.ignoreOutsideClick = false;
20
+ /** Bilingual defaults for the modal variant; store translations always win. */
21
+ this.translationDefaults = {
22
+ 'common.social.share': { ar: 'مشاركة', en: 'Share' },
23
+ 'common.social.email': { ar: 'إيميل', en: 'Email' },
24
+ 'common.social.whatsapp': { ar: 'واتساب', en: 'WhatsApp' },
25
+ 'common.social.twitter': { ar: 'أكس', en: 'X' },
26
+ 'common.social.facebook': { ar: 'فيسبوك', en: 'Facebook' },
27
+ 'common.social.copy': { ar: 'نسخ', en: 'Copy' },
28
+ 'common.social.copied': { ar: 'تم النسخ', en: 'Copied' },
29
+ };
30
+ this.onDocumentClick = (event) => {
31
+ if (this.ignoreOutsideClick || !this.opened || this.host.contains(event.target)) {
32
+ return;
33
+ }
34
+ void this.close();
35
+ };
19
36
  this.opened = false;
20
- this.allPlatforms = [Socials.WHATSAPP, Socials.FACEBOOK, Socials.TWITTER, Socials.EMAIL, Socials.COPY_LINK];
21
- this.platformIcons = [{ icon: whatsapp, name: Socials.WHATSAPP }, {
37
+ this.copied = false;
38
+ this.allPlatforms = [
39
+ Socials.WHATSAPP,
40
+ Socials.FACEBOOK,
41
+ Socials.TWITTER,
42
+ Socials.EMAIL,
43
+ Socials.COPY_LINK,
44
+ ];
45
+ this.platformIcons = [
46
+ { icon: whatsapp, name: Socials.WHATSAPP },
47
+ {
22
48
  icon: facebook,
23
- name: Socials.FACEBOOK
24
- }, { icon: twitter, name: Socials.TWITTER }, { icon: email, name: Socials.EMAIL }, {
49
+ name: Socials.FACEBOOK,
50
+ },
51
+ { icon: twitter, name: Socials.TWITTER },
52
+ { icon: email, name: Socials.EMAIL },
53
+ {
25
54
  icon: copy_link,
26
- name: Socials.COPY_LINK
27
- }];
55
+ name: Socials.COPY_LINK,
56
+ },
57
+ ];
28
58
  this.convertedPlatforms = [];
29
59
  /**
30
60
  * page url that will be shared custom | current page url
31
61
  */
32
- this.url = "";
62
+ this.url = '';
33
63
  /**
34
64
  * page url name that will be shared custom | current page url
35
65
  */
36
- this.urlName = "";
66
+ this.urlName = '';
37
67
  /**
38
68
  * selected platforms to share | all platforms
39
69
  */
40
70
  this.platforms = 'facebook,twitter,whatsapp,email,copy_link';
71
+ /**
72
+ * Share UI variant: `default` dropdown menu or centered `modal` dialog.
73
+ */
74
+ this.mode = 'default';
75
+ /**
76
+ * Optional title for the modal variant header. Defaults to a localized "Share".
77
+ */
78
+ this.modalTitle = '';
41
79
  }
42
80
  componentWillLoad() {
81
+ this.registerTranslationDefaults();
43
82
  if (this.host.hasAttribute('aria-label')) {
44
83
  this.host.removeAttribute('aria-label');
45
84
  }
@@ -54,50 +93,123 @@ export class SallaSocialShare {
54
93
  window.a2a_config.locale = salla.config.get('user.language_code', salla.lang.getLocale());
55
94
  window.a2a_config.callbacks = window.a2a_config.callbacks || [];
56
95
  window.a2a_config.callbacks.push({
57
- share: (data) => {
96
+ share: data => {
58
97
  // Handle share event
59
98
  const shareData = {
60
99
  share_via: data.service.toLowerCase(),
61
100
  url: data.url,
62
- title: data.title
101
+ title: data.title,
63
102
  };
64
103
  // Dispatch the share event
65
104
  salla.event.emit('share-element', shareData);
66
- }
105
+ },
67
106
  });
68
107
  };
69
108
  document.body.appendChild(script);
70
109
  }
110
+ componentDidLoad() {
111
+ document.addEventListener('click', this.onDocumentClick);
112
+ }
113
+ disconnectedCallback() {
114
+ document.removeEventListener('click', this.onDocumentClick);
115
+ if (this.copiedResetTimeout) {
116
+ window.clearTimeout(this.copiedResetTimeout);
117
+ }
118
+ this.setBodyScrollLocked(false);
119
+ }
71
120
  /**
72
- * Activate or open the share menu.
121
+ * Register bilingual (ar/en) defaults without overriding existing translations.
122
+ */
123
+ registerTranslationDefaults() {
124
+ if (!salla?.lang?.addBulk) {
125
+ return;
126
+ }
127
+ const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
128
+ if (salla.lang.get(key) === key) {
129
+ acc[key] = value;
130
+ }
131
+ return acc;
132
+ }, {});
133
+ if (Object.keys(missing).length) {
134
+ salla.lang.addBulk(missing);
135
+ }
136
+ }
137
+ resolveShareKit() {
138
+ return this.host.querySelector('.a2a_kit');
139
+ }
140
+ deferOutsideClickGuard() {
141
+ this.ignoreOutsideClick = true;
142
+ requestAnimationFrame(() => {
143
+ this.ignoreOutsideClick = false;
144
+ });
145
+ }
146
+ /**
147
+ * Open the share menu.
73
148
  */
74
149
  async open() {
75
- const animateList = new anime.timeline().add({
76
- targets: this.shareMenu,
150
+ if (this.opened) {
151
+ return;
152
+ }
153
+ this.opened = true;
154
+ this.deferOutsideClickGuard();
155
+ if (this.mode === 'modal') {
156
+ this.setBodyScrollLocked(true);
157
+ }
158
+ await new Promise(resolve => requestAnimationFrame(() => resolve()));
159
+ if (!this.opened) {
160
+ return;
161
+ }
162
+ // Wire AddToAny on the freshly rendered anchors (kit only exists once opened).
163
+ await this.refresh();
164
+ if (this.mode === 'modal') {
165
+ return;
166
+ }
167
+ const menu = this.resolveShareKit();
168
+ if (!menu) {
169
+ this.opened = false;
170
+ return;
171
+ }
172
+ this.openAnimation = new anime.timeline().add({
173
+ targets: menu,
77
174
  translateY: [-50, 0],
78
175
  opacity: [0, 1],
79
176
  duration: 300,
80
177
  podding: '0',
81
- easing: 'easeInOutSine'
178
+ easing: 'easeInOutSine',
82
179
  });
83
- animateList.add({
84
- targets: this.shareMenu.children,
180
+ this.openAnimation.add({
181
+ targets: menu.children,
85
182
  translateZ: 0,
86
183
  translateY: [-30, 0],
87
184
  scaleY: [0, 1],
88
185
  opacity: [0, 1],
89
186
  duration: 1400,
90
- delay: anime.stagger(100)
187
+ delay: anime.stagger(100),
91
188
  }, '-=200');
92
- this.opened = !this.opened;
93
- if (this.opened) {
94
- this.shareMenu.classList.add('opened');
189
+ }
190
+ /**
191
+ * Close the share menu.
192
+ */
193
+ async close() {
194
+ if (!this.opened) {
195
+ return;
196
+ }
197
+ this.openAnimation?.pause();
198
+ this.openAnimation?.seek(0);
199
+ this.opened = false;
200
+ if (this.mode === 'modal') {
201
+ this.setBodyScrollLocked(false);
95
202
  }
96
- else {
97
- animateList.pause();
98
- animateList.seek(0);
99
- this.shareMenu.classList.remove('opened');
203
+ }
204
+ setBodyScrollLocked(locked) {
205
+ document.body.classList.toggle('s-social-share-modal-is-open', locked);
206
+ }
207
+ toggle() {
208
+ if (this.opened) {
209
+ return this.close();
100
210
  }
211
+ this.deferOutsideClickGuard();
212
+ return this.open();
101
213
  }
102
214
  /**
103
215
  * Asynchronously initializes the "AddToAny" (a2a) social sharing tool on the current page.
@@ -117,18 +229,123 @@ export class SallaSocialShare {
117
229
  * @async
118
230
  * @returns {Promise<void>} A promise that resolves once the initialization is complete.
119
231
  */
232
+ onUrlChanged(newUrl, oldUrl) {
233
+ if (newUrl !== oldUrl) {
234
+ void this.refresh();
235
+ }
236
+ }
237
+ getShareUrl() {
238
+ return this.url || window.location.href;
239
+ }
240
+ getModalTitle() {
241
+ return this.modalTitle || salla.lang.get('common.social.share');
242
+ }
243
+ syncShareAttributes() {
244
+ const kit = this.resolveShareKit();
245
+ if (!kit) {
246
+ return;
247
+ }
248
+ kit.setAttribute('data-a2a-url', this.getShareUrl());
249
+ kit.setAttribute('data-a2a-title', this.urlName || document.title);
250
+ }
120
251
  async refresh() {
121
- // Attempt to initialize AddToAny with 'page' mode if the global object `window.a2a` is available.
252
+ this.syncShareAttributes();
253
+ // Re-scan kits so AddToAny picks up the updated data-a2a-url (init caches the first URL).
254
+ if (typeof window.a2a?.init_all === 'function') {
255
+ window.a2a.init_all();
256
+ return;
257
+ }
122
258
  window.a2a?.init('page');
123
259
  }
124
- render() {
125
- return (h("div", { key: 'e45420682a1b9bf686cbb9d3beff5a208505e1c7', class: "s-social-share-wrapper" }, h("slot", { key: '265102d26da7ce2d297969e1941b9a5785da3971', name: 'widget' }, h("salla-button", { key: '9f36a44dc9487f4956c1d8b73f0fcc41cf8a01b8', "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: 'b34ed78cd6549bff733de5c542a42ca9aaf805d0', innerHTML: this.opened ? Cancel : ShareAlt }))), h("ul", { key: 'f8eb408030d409880391b7d13b5a701226b0d42a', ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share", "data-a2a-url": this.url ? this.url : window.location.href, "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
260
+ async copyLink() {
261
+ const url = this.getShareUrl();
262
+ try {
263
+ await navigator.clipboard.writeText(url);
264
+ }
265
+ catch {
266
+ const textarea = document.createElement('textarea');
267
+ textarea.value = url;
268
+ textarea.style.position = 'fixed';
269
+ textarea.style.opacity = '0';
270
+ document.body.appendChild(textarea);
271
+ textarea.select();
272
+ try {
273
+ document.execCommand('copy');
274
+ }
275
+ catch {
276
+ /* noop */
277
+ }
278
+ textarea.remove();
279
+ }
280
+ salla.event.emit('share-element', {
281
+ share_via: 'copy_link',
282
+ url,
283
+ title: this.urlName || document.title,
284
+ });
285
+ this.copied = true;
286
+ if (this.copiedResetTimeout) {
287
+ window.clearTimeout(this.copiedResetTimeout);
288
+ }
289
+ this.copiedResetTimeout = window.setTimeout(() => (this.copied = false), 2000);
290
+ }
291
+ modalPlatformMeta(platform) {
292
+ switch (platform) {
293
+ case Socials.WHATSAPP:
294
+ return {
295
+ icon: whatsapp,
296
+ color: '#25D366',
297
+ label: salla.lang.get('common.social.whatsapp'),
298
+ };
299
+ case Socials.FACEBOOK:
300
+ return {
301
+ icon: facebook,
302
+ color: '#1877F2',
303
+ label: salla.lang.get('common.social.facebook'),
304
+ };
305
+ case Socials.TWITTER:
306
+ return { icon: twitter, color: '#000000', label: salla.lang.get('common.social.twitter') };
307
+ case Socials.EMAIL:
308
+ return { icon: email, color: '#2BA6FF', label: salla.lang.get('common.social.email') };
309
+ default:
310
+ return { icon: copy_link, color: '#6b7280', label: platform };
311
+ }
312
+ }
313
+ renderModalCard(platform) {
314
+ const meta = this.modalPlatformMeta(platform);
315
+ return (h("a", { class: `s-social-share-modal-card a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, h("span", { class: "s-social-share-modal-icon", style: { backgroundColor: meta.color }, innerHTML: meta.icon }), h("span", { class: "s-social-share-modal-card-label" }, meta.label)));
316
+ }
317
+ renderModal() {
318
+ if (!this.opened) {
319
+ return null;
320
+ }
321
+ const enabled = this.platforms.split(',').map(platform => platform.trim());
322
+ const order = [Socials.EMAIL, Socials.WHATSAPP, Socials.TWITTER, Socials.FACEBOOK];
323
+ const platforms = order.filter(platform => enabled.includes(platform));
324
+ const showCopy = enabled.includes(Socials.COPY_LINK);
325
+ return (h("div", { class: "s-social-share-modal", onClick: event => {
326
+ if (event.target === event.currentTarget) {
327
+ void this.close();
328
+ }
329
+ } }, h("div", { class: "s-social-share-modal-dialog", role: "dialog", "aria-modal": "true" }, h("div", { class: "s-social-share-modal-handle", "aria-hidden": "true" }), h("div", { class: "s-social-share-modal-header" }, h("span", { class: "s-social-share-modal-title" }, this.getModalTitle()), h("button", { type: "button", class: "s-social-share-modal-close", "aria-label": salla.lang.get('common.elements.close'), onClick: () => this.close() }, h("span", { class: "s-social-share-modal-close-icon", innerHTML: Cancel }))), h("div", { class: "s-social-share-modal-platforms a2a_kit", "data-a2a-url": this.getShareUrl(), "data-a2a-title": this.urlName ? this.urlName : document.title }, platforms.map(platform => this.renderModalCard(platform))), showCopy && (h("div", { class: "s-social-share-modal-copy-row" }, h("span", { class: "s-social-share-modal-url", dir: "ltr" }, this.getShareUrl()), h("salla-button", { type: "button", fill: "outline", onClick: () => this.copyLink() }, this.copied
330
+ ? salla.lang.get('common.social.copied')
331
+ : salla.lang.get('common.social.copy')))))));
332
+ }
333
+ renderPopupList() {
334
+ return (h("ul", { class: {
335
+ 's-social-share-list': true,
336
+ a2a_kit: true,
337
+ share: true,
338
+ opened: this.opened,
339
+ }, "data-a2a-url": this.getShareUrl(), "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
126
340
  return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
127
341
  if (icon.name === platform) {
128
342
  return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
129
343
  }
130
344
  }))));
131
- }))));
345
+ })));
346
+ }
347
+ render() {
348
+ return (h("div", { key: '56f669cd8567efe9f1a73e302d2d85be23dd901b', class: "s-social-share-wrapper" }, h("slot", { key: '2c1848fa62c1ec3b8301d0544cd8098ea647e2e7', name: "widget" }, h("salla-button", { key: '0a7ccac871963382f1c2fc594877b5445e5f8830', "aria-label": "Share", onClick: () => this.toggle(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: '658cd0182e40140a73614ae477b43ff2e388e155', innerHTML: this.opened ? Cancel : ShareAlt }))), this.mode === 'modal' ? this.renderModal() : this.renderPopupList()));
132
349
  }
133
350
  static get is() { return "salla-social-share"; }
134
351
  static get originalStyleUrls() {
@@ -146,7 +363,7 @@ export class SallaSocialShare {
146
363
  "url": {
147
364
  "type": "string",
148
365
  "attribute": "url",
149
- "mutable": false,
366
+ "mutable": true,
150
367
  "complexType": {
151
368
  "original": "string",
152
369
  "resolved": "string",
@@ -161,7 +378,7 @@ export class SallaSocialShare {
161
378
  "getter": false,
162
379
  "setter": false,
163
380
  "reflect": true,
164
- "defaultValue": "\"\""
381
+ "defaultValue": "''"
165
382
  },
166
383
  "urlName": {
167
384
  "type": "string",
@@ -181,7 +398,7 @@ export class SallaSocialShare {
181
398
  "getter": false,
182
399
  "setter": false,
183
400
  "reflect": true,
184
- "defaultValue": "\"\""
401
+ "defaultValue": "''"
185
402
  },
186
403
  "platforms": {
187
404
  "type": "string",
@@ -202,12 +419,53 @@ export class SallaSocialShare {
202
419
  "setter": false,
203
420
  "reflect": true,
204
421
  "defaultValue": "'facebook,twitter,whatsapp,email,copy_link'"
422
+ },
423
+ "mode": {
424
+ "type": "string",
425
+ "attribute": "mode",
426
+ "mutable": false,
427
+ "complexType": {
428
+ "original": "'modal' | 'default'",
429
+ "resolved": "\"default\" | \"modal\"",
430
+ "references": {}
431
+ },
432
+ "required": false,
433
+ "optional": false,
434
+ "docs": {
435
+ "tags": [],
436
+ "text": "Share UI variant: `default` dropdown menu or centered `modal` dialog."
437
+ },
438
+ "getter": false,
439
+ "setter": false,
440
+ "reflect": true,
441
+ "defaultValue": "'default'"
442
+ },
443
+ "modalTitle": {
444
+ "type": "string",
445
+ "attribute": "modal-title",
446
+ "mutable": false,
447
+ "complexType": {
448
+ "original": "string",
449
+ "resolved": "string",
450
+ "references": {}
451
+ },
452
+ "required": false,
453
+ "optional": false,
454
+ "docs": {
455
+ "tags": [],
456
+ "text": "Optional title for the modal variant header. Defaults to a localized \"Share\"."
457
+ },
458
+ "getter": false,
459
+ "setter": false,
460
+ "reflect": false,
461
+ "defaultValue": "''"
205
462
  }
206
463
  };
207
464
  }
208
465
  static get states() {
209
466
  return {
210
467
  "opened": {},
468
+ "copied": {},
211
469
  "allPlatforms": {},
212
470
  "platformIcons": {},
213
471
  "convertedPlatforms": {}
@@ -228,7 +486,24 @@ export class SallaSocialShare {
228
486
  "return": "Promise<void>"
229
487
  },
230
488
  "docs": {
231
- "text": "Activate or open the share menu.",
489
+ "text": "Open the share menu.",
490
+ "tags": []
491
+ }
492
+ },
493
+ "close": {
494
+ "complexType": {
495
+ "signature": "() => Promise<void>",
496
+ "parameters": [],
497
+ "references": {
498
+ "Promise": {
499
+ "location": "global",
500
+ "id": "global::Promise"
501
+ }
502
+ },
503
+ "return": "Promise<void>"
504
+ },
505
+ "docs": {
506
+ "text": "Close the share menu.",
232
507
  "tags": []
233
508
  }
234
509
  },
@@ -245,26 +520,17 @@ export class SallaSocialShare {
245
520
  "return": "Promise<void>"
246
521
  },
247
522
  "docs": {
248
- "text": "Asynchronously initializes the \"AddToAny\" (a2a) social sharing tool on the current page.\nIf the global object `window.a2a` is available, it initializes the tool with the 'page' mode.\nThe 'page' mode is typically used to enable sharing of the current webpage.",
249
- "tags": [{
250
- "name": "remarks",
251
- "text": "This function is designed to be used in scenarios where dynamic loading or refreshing of social sharing tools is needed.\nEnsure that the AddToAny script is properly included in the HTML document before calling this function."
252
- }, {
253
- "name": "example",
254
- "text": "// Call the refresh function to initialize AddToAny on the page.\nawait refresh();"
255
- }, {
256
- "name": "throws",
257
- "text": "{Error} Throws an error if the AddToAny script is not properly included or if there are issues during initialization."
258
- }, {
259
- "name": "async",
260
- "text": undefined
261
- }, {
262
- "name": "returns",
263
- "text": "A promise that resolves once the initialization is complete."
264
- }]
523
+ "text": "",
524
+ "tags": []
265
525
  }
266
526
  }
267
527
  };
268
528
  }
269
529
  static get elementRef() { return "host"; }
530
+ static get watchers() {
531
+ return [{
532
+ "propName": "url",
533
+ "methodName": "onUrlChanged"
534
+ }];
535
+ }
270
536
  }
@@ -30,7 +30,7 @@ export class SallaTabContent {
30
30
  's-tabs-content': true,
31
31
  's-tabs-content-selected': this.isSelected
32
32
  };
33
- return (h("div", { key: '8017c442a775f17fe6f5bf3c92dd083c9daa164e', class: classes }, h("slot", { key: '3be5606bf4ff8f3d3332f154333d4101d9dafdb5' })));
33
+ return (h("div", { key: 'f2deb9c1508aafe3aff5352094cccc97bdcd42ef', class: classes }, h("slot", { key: '460588864047444acdb06e757a7124d28935c24b' })));
34
34
  }
35
35
  static get is() { return "salla-tab-content"; }
36
36
  static get originalStyleUrls() {
@@ -52,7 +52,7 @@ export class SallaTabHeader {
52
52
  's-tabs-active': this.isSelected,
53
53
  };
54
54
  return [
55
- h("div", { key: '17847f97d80e9f52f460b7ebcc918736cafd757d', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: 'e936ad59f8255ec9ad713ecb69735404e741d294' })),
55
+ h("div", { key: '153247ab5a7c73819ccc506a45e60b9c084c391c', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '417a3ae0c0aec8a965b5d3be9a4f917f290d2109' })),
56
56
  ];
57
57
  }
58
58
  static get is() { return "salla-tab-header"; }
@@ -50,7 +50,7 @@ export class SallaTabs {
50
50
  }
51
51
  render() {
52
52
  return [
53
- h("div", { key: '2a76978734a3d8deeabbcfa7517b15a283d3071f', class: "s-tabs" }, h("div", { key: '0c565b46e62ed8fbcae0d9131619dbe83be61546', class: "s-tabs-header" }, h("slot", { key: '27ea98ff742bc51b75b35e0346733fb1c5b9526c', name: "header" })), h("div", { key: '9a76cba0e3c1f7ffb4c9d77d800ebc4d827e877c', class: "s-tabs-content-wrapper" }, h("slot", { key: '49ffe5586016252e8e3439a851c9aab0bf4e4079', name: "content" })))
53
+ h("div", { key: 'ae50836f68ee92459720fa9bf00d73848d849627', class: "s-tabs" }, h("div", { key: '55e8186e80381902269f9bad5738d9a555f71d37', class: "s-tabs-header" }, h("slot", { key: '46ce3e1ea75f92165b3d5ee7c16f19f8693f6d31', name: "header" })), h("div", { key: '3669e643abb37ed2edca73fc0577822a3f7fbb90', class: "s-tabs-content-wrapper" }, h("slot", { key: '2cf8b79f44630e21103991325ceff2cd3a4019ba', name: "content" })))
54
54
  ];
55
55
  }
56
56
  static get is() { return "salla-tabs"; }