@salla.sa/twilight-components 3.0.22 → 3.0.24

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 (360) hide show
  1. package/dist/cjs/{Helper-CAuzGdeJ.js → Helper-sq6ztayx.js} +1 -1
  2. package/dist/cjs/{filepond-DV6O0i7Z.js → filepond-BMxlEH8M.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-DV6-NSU_.js → filepond-plugin-file-poster-DVSz4StJ.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-Db166u1S.js → filepond-plugin-file-validate-size-CXJiLSzt.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-BYB3PzOs.js → filepond-plugin-file-validate-type-DWK85msl.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-B6QXk344.js → filepond-plugin-image-edit-BHttJI5X.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-Ca5k1F5m.js → filepond-plugin-image-exif-orientation-DTKIO2zE.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-C4j2Udlc.js → filepond-plugin-image-preview-BaRxwhFa.js} +1 -1
  9. package/dist/cjs/{index-CHCpMa_m.js → index-BJ3-fFSF.js} +7 -7
  10. package/dist/cjs/{intlTelInput-BNBzSLpY.js → intlTelInput-DNoOb73M.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
  21. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +89 -7
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-filters.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
  46. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-mobile-update-modal.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
  66. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-items.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-payment.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-order-rewards.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-orders.cjs.entry.js +2 -2
  84. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
  91. package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
  92. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
  94. package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
  95. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-search.cjs.entry.js +2 -2
  100. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-thank-you-header.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-thank-you-page.cjs.entry.js +1 -1
  106. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  107. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  108. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  109. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  110. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  111. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  112. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  113. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  114. package/dist/cjs/salla-wishlist-summary.cjs.entry.js +2 -2
  115. package/dist/cjs/twilight.cjs.js +2 -2
  116. package/dist/cjs/{vanilla-picker-Chebtfev.js → vanilla-picker-CceY3g8c.js} +1 -1
  117. package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +44 -6
  118. package/dist/collection/shared/coupons-request.js +47 -0
  119. package/dist/components/index.js +3 -3
  120. package/dist/components/salla-cart-coupons.js +88 -6
  121. package/dist/docs.json +1 -1
  122. package/dist/esm/{Helper-DfW8RE8Z.js → Helper-BwzPfwZJ.js} +1 -1
  123. package/dist/esm/{filepond-Bc6CLtnG.js → filepond-JNV-1zqR.js} +1 -1
  124. package/dist/esm/{filepond-plugin-file-poster-Bl_fLsTQ.js → filepond-plugin-file-poster-nFqNHCag.js} +1 -1
  125. package/dist/esm/{filepond-plugin-file-validate-size-IuRpnxuB.js → filepond-plugin-file-validate-size-P3KmOTH8.js} +1 -1
  126. package/dist/esm/{filepond-plugin-file-validate-type-Bo7Ab1TY.js → filepond-plugin-file-validate-type-BV0Ctr7U.js} +1 -1
  127. package/dist/esm/{filepond-plugin-image-edit-DgnQoIV9.js → filepond-plugin-image-edit-D62rKlfH.js} +1 -1
  128. package/dist/esm/{filepond-plugin-image-exif-orientation-DsTifPGw.js → filepond-plugin-image-exif-orientation-DerapxIk.js} +1 -1
  129. package/dist/esm/{filepond-plugin-image-preview-cv3hlMNi.js → filepond-plugin-image-preview-BlRd2Ble.js} +1 -1
  130. package/dist/esm/{index-BNekvDFW.js → index-CtoXzf1y.js} +7 -7
  131. package/dist/esm/{intlTelInput-Dz8xcV83.js → intlTelInput-BZz-u5_w.js} +1 -1
  132. package/dist/esm/loader.js +3 -3
  133. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  134. package/dist/esm/salla-accordion_6.entry.js +2 -2
  135. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  136. package/dist/esm/salla-advertisement.entry.js +1 -1
  137. package/dist/esm/salla-alert_2.entry.js +1 -1
  138. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  139. package/dist/esm/salla-applied-filters.entry.js +2 -2
  140. package/dist/esm/salla-apps-icons.entry.js +1 -1
  141. package/dist/esm/salla-attachment-view_9.entry.js +11 -11
  142. package/dist/esm/salla-badge.entry.js +1 -1
  143. package/dist/esm/salla-basket-gap.entry.js +1 -1
  144. package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
  145. package/dist/esm/salla-cart-coupons.entry.js +89 -7
  146. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  147. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  148. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  149. package/dist/esm/salla-comment-factors.entry.js +1 -1
  150. package/dist/esm/salla-comment-form_9.entry.js +2 -2
  151. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  152. package/dist/esm/salla-contacts.entry.js +1 -1
  153. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  154. package/dist/esm/salla-count-down.entry.js +1 -1
  155. package/dist/esm/salla-custom-fields.entry.js +1 -1
  156. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  157. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  158. package/dist/esm/salla-filters-widget.entry.js +2 -2
  159. package/dist/esm/salla-filters.entry.js +2 -2
  160. package/dist/esm/salla-free-shipping-banner.entry.js +1 -1
  161. package/dist/esm/salla-free-shipping-tag.entry.js +1 -1
  162. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  163. package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
  164. package/dist/esm/salla-gifting.entry.js +1 -1
  165. package/dist/esm/salla-hook.entry.js +1 -1
  166. package/dist/esm/salla-infinite-scroll.entry.js +2 -2
  167. package/dist/esm/salla-installment.entry.js +1 -1
  168. package/dist/esm/salla-list-tile.entry.js +1 -1
  169. package/dist/esm/salla-localization-modal.entry.js +1 -1
  170. package/dist/esm/salla-login-modal.entry.js +1 -1
  171. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  172. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  173. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  174. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  175. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  176. package/dist/esm/salla-loyalty.entry.js +1 -1
  177. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  178. package/dist/esm/salla-map_3.entry.js +1 -1
  179. package/dist/esm/salla-menu.entry.js +1 -1
  180. package/dist/esm/salla-metadata.entry.js +1 -1
  181. package/dist/esm/salla-mobile-update-modal.entry.js +1 -1
  182. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  183. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  184. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  185. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  186. package/dist/esm/salla-notification-item_2.entry.js +2 -2
  187. package/dist/esm/salla-offer-modal.entry.js +1 -1
  188. package/dist/esm/salla-offer.entry.js +1 -1
  189. package/dist/esm/salla-order-branch.entry.js +1 -1
  190. package/dist/esm/salla-order-cancel.entry.js +1 -1
  191. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  192. package/dist/esm/salla-order-details-options.entry.js +1 -1
  193. package/dist/esm/salla-order-details.entry.js +1 -1
  194. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  195. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  196. package/dist/esm/salla-order-edit.entry.js +1 -1
  197. package/dist/esm/salla-order-items.entry.js +1 -1
  198. package/dist/esm/salla-order-options-modal.entry.js +1 -1
  199. package/dist/esm/salla-order-payment.entry.js +1 -1
  200. package/dist/esm/salla-order-rewards.entry.js +1 -1
  201. package/dist/esm/salla-order-shipments.entry.js +1 -1
  202. package/dist/esm/salla-order-summary.entry.js +1 -1
  203. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  204. package/dist/esm/salla-orders.entry.js +2 -2
  205. package/dist/esm/salla-payments.entry.js +1 -1
  206. package/dist/esm/salla-placeholder.entry.js +1 -1
  207. package/dist/esm/salla-price-range.entry.js +1 -1
  208. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  209. package/dist/esm/salla-product-card.entry.js +1 -1
  210. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  211. package/dist/esm/salla-products-list.entry.js +2 -2
  212. package/dist/esm/salla-products-slider.entry.js +2 -2
  213. package/dist/esm/salla-quick-order.entry.js +1 -1
  214. package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
  215. package/dist/esm/salla-rating-modal.entry.js +2 -2
  216. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  217. package/dist/esm/salla-review-order-item.entry.js +1 -1
  218. package/dist/esm/salla-scopes.entry.js +1 -1
  219. package/dist/esm/salla-search-product-card.entry.js +1 -1
  220. package/dist/esm/salla-search.entry.js +2 -2
  221. package/dist/esm/salla-skeleton.entry.js +1 -1
  222. package/dist/esm/salla-social-share.entry.js +1 -1
  223. package/dist/esm/salla-social.entry.js +1 -1
  224. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  225. package/dist/esm/salla-thank-you-header.entry.js +1 -1
  226. package/dist/esm/salla-thank-you-page.entry.js +1 -1
  227. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  228. package/dist/esm/salla-trust-badges.entry.js +1 -1
  229. package/dist/esm/salla-user-menu.entry.js +1 -1
  230. package/dist/esm/salla-user-profile.entry.js +1 -1
  231. package/dist/esm/salla-user-settings.entry.js +1 -1
  232. package/dist/esm/salla-verify.entry.js +1 -1
  233. package/dist/esm/salla-wallet.entry.js +1 -1
  234. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  235. package/dist/esm/salla-wishlist-summary.entry.js +2 -2
  236. package/dist/esm/twilight.js +3 -3
  237. package/dist/esm/{vanilla-picker-Cjh-Ze_A.js → vanilla-picker-BfmpXY4G.js} +1 -1
  238. package/dist/twilight/{p-57f318e8.entry.js → p-00a1ec4e.entry.js} +1 -1
  239. package/dist/twilight/{p-8429392a.entry.js → p-02ddd64c.entry.js} +1 -1
  240. package/dist/twilight/{p-f3e1b753.entry.js → p-034b80ad.entry.js} +1 -1
  241. package/dist/twilight/{p-f6b30072.entry.js → p-055bf228.entry.js} +1 -1
  242. package/dist/twilight/{p-fdae9cfe.entry.js → p-061216d4.entry.js} +1 -1
  243. package/dist/twilight/{p-45fe04fd.entry.js → p-0b583810.entry.js} +1 -1
  244. package/dist/twilight/{p-1c2e5260.entry.js → p-0cb60522.entry.js} +1 -1
  245. package/dist/twilight/{p-04e6af9e.entry.js → p-0ce0cdb0.entry.js} +1 -1
  246. package/dist/twilight/{p-125f2ee0.entry.js → p-0d1b8490.entry.js} +1 -1
  247. package/dist/twilight/{p-d6b354e5.entry.js → p-0fb390fb.entry.js} +1 -1
  248. package/dist/twilight/{p-deae85d1.entry.js → p-117e714b.entry.js} +1 -1
  249. package/dist/twilight/{p-1bf191eb.entry.js → p-118aa92e.entry.js} +1 -1
  250. package/dist/twilight/{p-d25b4ee3.entry.js → p-17be7967.entry.js} +1 -1
  251. package/dist/twilight/{p-e07aaa9a.entry.js → p-1af75625.entry.js} +1 -1
  252. package/dist/twilight/{p-5c976451.entry.js → p-1b4c3b85.entry.js} +1 -1
  253. package/dist/twilight/{p-f0399559.entry.js → p-1d105a57.entry.js} +1 -1
  254. package/dist/twilight/{p-e0435187.entry.js → p-1f39ca4f.entry.js} +1 -1
  255. package/dist/twilight/{p-625bdbb6.entry.js → p-213368ef.entry.js} +1 -1
  256. package/dist/twilight/{p-2e24994d.entry.js → p-2140be84.entry.js} +1 -1
  257. package/dist/twilight/{p-bc842250.entry.js → p-2401f0d7.entry.js} +1 -1
  258. package/dist/twilight/{p-ee9aeeac.entry.js → p-2566f688.entry.js} +1 -1
  259. package/dist/twilight/{p-4468ac98.entry.js → p-2882d626.entry.js} +1 -1
  260. package/dist/twilight/{p-9f50ac84.entry.js → p-2afc4658.entry.js} +1 -1
  261. package/dist/twilight/{p-4f098545.entry.js → p-2c04bba3.entry.js} +1 -1
  262. package/dist/twilight/{p-33fba2cf.entry.js → p-2e1dd9cf.entry.js} +1 -1
  263. package/dist/twilight/{p-fb60a276.entry.js → p-3356638d.entry.js} +1 -1
  264. package/dist/twilight/{p-049dea32.entry.js → p-36167cbe.entry.js} +1 -1
  265. package/dist/twilight/{p-f1400765.entry.js → p-365ff361.entry.js} +1 -1
  266. package/dist/twilight/{p-7bf85dae.entry.js → p-36a7344c.entry.js} +1 -1
  267. package/dist/twilight/{p-7838a5fd.entry.js → p-374d9f0c.entry.js} +1 -1
  268. package/dist/twilight/{p-f2d56ad1.entry.js → p-3845e427.entry.js} +1 -1
  269. package/dist/twilight/{p-0b56e95f.entry.js → p-38b70281.entry.js} +1 -1
  270. package/dist/twilight/p-3d3eda0f.entry.js +4 -0
  271. package/dist/twilight/{p-201104da.entry.js → p-3da2e3f3.entry.js} +1 -1
  272. package/dist/twilight/{p-2bab06c3.entry.js → p-3e285056.entry.js} +1 -1
  273. package/dist/twilight/{p-f7886e77.entry.js → p-4008e164.entry.js} +1 -1
  274. package/dist/twilight/{p-cd2174f2.entry.js → p-4080fdc9.entry.js} +1 -1
  275. package/dist/twilight/{p-671ac08f.entry.js → p-40e651ac.entry.js} +1 -1
  276. package/dist/twilight/{p-62fcec73.entry.js → p-4254e9c2.entry.js} +1 -1
  277. package/dist/twilight/{p-4b88f596.entry.js → p-4adaee32.entry.js} +1 -1
  278. package/dist/twilight/{p-81d878de.entry.js → p-4c5a7ffc.entry.js} +1 -1
  279. package/dist/twilight/{p-a956472d.entry.js → p-4f4933f8.entry.js} +1 -1
  280. package/dist/twilight/{p-0ee1dadf.entry.js → p-5bc2190a.entry.js} +1 -1
  281. package/dist/twilight/{p-cf8ecf55.entry.js → p-5dea6c09.entry.js} +1 -1
  282. package/dist/twilight/{p-bbf58048.entry.js → p-60ae422e.entry.js} +1 -1
  283. package/dist/twilight/{p-91ad0bac.entry.js → p-6495383e.entry.js} +1 -1
  284. package/dist/twilight/{p-MZn39yer.js → p-6KZIgnh6.js} +1 -1
  285. package/dist/twilight/{p-41202dbb.entry.js → p-6ffbf505.entry.js} +1 -1
  286. package/dist/twilight/{p-fe4ff3bd.entry.js → p-7169ba9a.entry.js} +1 -1
  287. package/dist/twilight/{p-ec6496db.entry.js → p-71b5546b.entry.js} +1 -1
  288. package/dist/twilight/{p-a95c0a09.entry.js → p-72b0724c.entry.js} +1 -1
  289. package/dist/twilight/{p-a209a2e4.entry.js → p-7303ebd1.entry.js} +1 -1
  290. package/dist/twilight/{p-e6fad08f.entry.js → p-77deaa00.entry.js} +1 -1
  291. package/dist/twilight/{p-lTAe1vb6.js → p-78r0jdyY.js} +1 -1
  292. package/dist/twilight/{p-da315a25.entry.js → p-79b743eb.entry.js} +1 -1
  293. package/dist/twilight/{p-b36fe22d.entry.js → p-7a8fde62.entry.js} +1 -1
  294. package/dist/twilight/p-7c684782.entry.js +4 -0
  295. package/dist/twilight/{p-f0d42626.entry.js → p-8413d52b.entry.js} +1 -1
  296. package/dist/twilight/p-8b9c44c8.entry.js +4 -0
  297. package/dist/twilight/{p-7908a58c.entry.js → p-8cbf3bc2.entry.js} +1 -1
  298. package/dist/twilight/{p-46fa33ae.entry.js → p-8ea3a265.entry.js} +1 -1
  299. package/dist/twilight/{p-e54ae4d1.entry.js → p-8fd6ed52.entry.js} +1 -1
  300. package/dist/twilight/{p-d5dad2cb.entry.js → p-8fe950e8.entry.js} +1 -1
  301. package/dist/twilight/{p-9c9379e6.entry.js → p-919650b7.entry.js} +1 -1
  302. package/dist/twilight/{p-4c5bd7c1.entry.js → p-94d5b080.entry.js} +1 -1
  303. package/dist/twilight/{p-5764788d.entry.js → p-95e7c2e1.entry.js} +1 -1
  304. package/dist/twilight/{p-86ab1578.entry.js → p-97065b4f.entry.js} +1 -1
  305. package/dist/twilight/{p-377cdf1f.entry.js → p-974c100d.entry.js} +1 -1
  306. package/dist/twilight/{p-9a73ca9e.entry.js → p-9c1b0978.entry.js} +1 -1
  307. package/dist/twilight/{p-3c03d14a.entry.js → p-9e50f29c.entry.js} +1 -1
  308. package/dist/twilight/{p-CCPdEfoe.js → p-BeC8AhMn.js} +1 -1
  309. package/dist/twilight/{p-BXKSGzKV.js → p-BwUX8dew.js} +1 -1
  310. package/dist/twilight/{p-LtS3HRdN.js → p-CC-KFXD9.js} +1 -1
  311. package/dist/twilight/p-CtoXzf1y.js +5 -0
  312. package/dist/twilight/{p-lxIDn6jP.js → p-D5DrmlyQ.js} +1 -1
  313. package/dist/twilight/{p-COwkTkvn.js → p-DT73iyFr.js} +1 -1
  314. package/dist/twilight/p-DYAn-F48.js +9 -0
  315. package/dist/twilight/{p-Co_-mXfS.js → p-F1Erq7GR.js} +1 -1
  316. package/dist/twilight/{p-0bbcc35f.entry.js → p-a236dd3b.entry.js} +1 -1
  317. package/dist/twilight/{p-8cf35d34.entry.js → p-a260f35e.entry.js} +1 -1
  318. package/dist/twilight/{p-00d667e8.entry.js → p-a4fee391.entry.js} +1 -1
  319. package/dist/twilight/{p-1e6fa8b3.entry.js → p-a8102290.entry.js} +1 -1
  320. package/dist/twilight/{p-1d2102ad.entry.js → p-a9ae6ab9.entry.js} +1 -1
  321. package/dist/twilight/{p-b02baa8a.entry.js → p-aac9d2fe.entry.js} +1 -1
  322. package/dist/twilight/{p-104bca40.entry.js → p-aca2717e.entry.js} +1 -1
  323. package/dist/twilight/{p-0b5d1aa5.entry.js → p-ae1efde9.entry.js} +1 -1
  324. package/dist/twilight/{p-beec9469.entry.js → p-b1bc70af.entry.js} +1 -1
  325. package/dist/twilight/{p-e6fcad0c.entry.js → p-b2cbdaa0.entry.js} +1 -1
  326. package/dist/twilight/{p-06b6f446.entry.js → p-b3472096.entry.js} +1 -1
  327. package/dist/twilight/{p-ba2c5b59.entry.js → p-b3c9ab0e.entry.js} +1 -1
  328. package/dist/twilight/{p-c44f5313.entry.js → p-c18fe9e5.entry.js} +1 -1
  329. package/dist/twilight/{p-ee9de13c.entry.js → p-c1ab1b40.entry.js} +1 -1
  330. package/dist/twilight/{p-418ad88e.entry.js → p-c4264e87.entry.js} +1 -1
  331. package/dist/twilight/{p-a2488682.entry.js → p-cbff6c68.entry.js} +1 -1
  332. package/dist/twilight/{p-a8fd0442.entry.js → p-cd55369c.entry.js} +1 -1
  333. package/dist/twilight/{p-ce2bf246.entry.js → p-d6a3b2d8.entry.js} +1 -1
  334. package/dist/twilight/{p-b43ef0e9.entry.js → p-d76b7564.entry.js} +1 -1
  335. package/dist/twilight/{p-38f2bd9b.entry.js → p-dc2be7b8.entry.js} +1 -1
  336. package/dist/twilight/{p-bc1f5fe2.entry.js → p-e2cb5c49.entry.js} +1 -1
  337. package/dist/twilight/{p-b4972389.entry.js → p-e5dc1d27.entry.js} +1 -1
  338. package/dist/twilight/{p-a89e40aa.entry.js → p-e8198efc.entry.js} +1 -1
  339. package/dist/twilight/{p-e56faeba.entry.js → p-e89daada.entry.js} +1 -1
  340. package/dist/twilight/{p-9638738f.entry.js → p-e8ebb2fe.entry.js} +1 -1
  341. package/dist/twilight/{p-a19a5611.entry.js → p-ebe45961.entry.js} +1 -1
  342. package/dist/twilight/{p-beab90d6.entry.js → p-ebed682b.entry.js} +1 -1
  343. package/dist/twilight/{p-c11c6c01.entry.js → p-ed37e702.entry.js} +1 -1
  344. package/dist/twilight/{p-c5efb28f.entry.js → p-f310b923.entry.js} +1 -1
  345. package/dist/twilight/{p-f07810d9.entry.js → p-f3455825.entry.js} +1 -1
  346. package/dist/twilight/{p-0dff2fee.entry.js → p-f51f31df.entry.js} +1 -1
  347. package/dist/twilight/{p-f8fb6c94.entry.js → p-f664fa69.entry.js} +1 -1
  348. package/dist/twilight/{p-8d0fb329.entry.js → p-f67d03fb.entry.js} +1 -1
  349. package/dist/twilight/{p-6149030c.entry.js → p-f738f492.entry.js} +1 -1
  350. package/dist/twilight/{p-94f85fa6.entry.js → p-fbce8a18.entry.js} +1 -1
  351. package/dist/twilight/{p-DR0WZviU.js → p-x4_Sxqd_.js} +1 -1
  352. package/dist/twilight/twilight.esm.js +1 -1
  353. package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +11 -0
  354. package/dist/types/shared/coupons-request.d.ts +3 -0
  355. package/package.json +5 -5
  356. package/dist/twilight/p-586d675b.entry.js +0 -4
  357. package/dist/twilight/p-7f6f9d0e.entry.js +0 -4
  358. package/dist/twilight/p-9914bb99.entry.js +0 -4
  359. package/dist/twilight/p-BNekvDFW.js +0 -5
  360. package/dist/twilight/p-D5FQ0WRe.js +0 -9
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as t,h as r,H as a,a as e}from"./p-BNekvDFW.js";import{S as o}from"./p-D4oPi1Ov.js";import{C as c}from"./p-gFG8By9O.js";const i=class{constructor(r){t(this,r),this.hideAddBtn=!1,this.showDonationAmount=!1,this.remained="",this.outOfStock="",this.donationAmount="",this.startingPrice="",this.addToCart="",this.placeholder="",this.COMPACT_TITLE_MAX_LENGTH=90}parseProductData(t){if(t)try{return"object"==typeof t?t:JSON.parse(t)}catch(t){return void salla.log("Bad json passed via product prop")}}handleProductChange(t){this.productData=this.parseProductData(t)}async componentWillLoad(){this.productData=this.parseProductData(this.product),await Promise.all([salla.onReady(),salla.lang.onLoaded()]),this.placeholder=salla.url.asset(salla.config.get("theme.settings.placeholder")),this.remained=salla.lang.get("pages.products.remained"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.startingPrice=salla.lang.get("pages.products.starting_price"),this.addToCart=salla.lang.get("pages.cart.add_to_cart"),this.outOfStock=salla.lang.get("pages.products.out_of_stock")}getDisplayTitle(){const t=this.productData?.name||"";return t.length<=this.COMPACT_TITLE_MAX_LENGTH?t:t.slice(0,this.COMPACT_TITLE_MAX_LENGTH).trimEnd()+"…"}getProductBadge(){return!this.productData?.is_available&&this.productData?.quantity?r("div",{class:"s-search-product-card-quantity"},this.remained," ",salla.helpers.number(this.productData?.quantity)):this.productData.promotion_title?r("div",{class:"s-search-product-card-promotion-title"},this.productData.promotion_title):null}renderAddToCartLabel(){return r("slot",{name:"add-to-cart-label"},r("span",{class:"s-search-product-card-add-to-cart-icon",innerHTML:c}))}getPriceFormat(t){return t&&0!=t?salla.money(t):salla.config.get("store.settings.product.show_price_as_dash")?"-":""}getProductPrice(){return this.productData.is_on_sale?r("div",{class:"s-search-product-card-sale-price"},r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData.sale_price)}),r("span",{innerHTML:this.getPriceFormat(this.productData?.regular_price)})):this.productData.starting_price?r("div",{class:"s-search-product-card-starting-price"},r("p",null,this.startingPrice),r("h4",{innerHTML:this.getPriceFormat(this.productData?.starting_price)})):r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData?.price)})}render(){const t={"s-search-product-card-entry":!0,"s-search-product-card-horizontal":!0,"s-search-product-card-compact":!0,"s-search-product-card-donation":this.productData?.donation},e=this.productData?.url?{href:this.productData.url}:{};return r(a,{key:"6be103faead19fecfbc380ff4ee53f47f057dae0",id:`search-product-${this.productData?.id}`,class:t},this.productData?.url?r("a",{class:"s-search-product-card-overlay-link","aria-label":this.productData?.name,...e}):null,r("div",{key:"1b2200c07aead0031e1b7cf4f4a0d0dbdb165d15",class:"s-search-product-card-image"},r("img",{key:"dca2fd85d56f311845397893bb64f50c1202ed2c",class:`s-search-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)?"contain":"cover"} lazy`,src:this.placeholder,alt:this.productData?.image?.alt||this.productData?.name,"data-src":this.productData?.image?.url||this.productData?.thumbnail}),this.getProductBadge()),r("div",{key:"6b04b97c6ead3c399acd3597c62fcf197a2a3b0d",class:"s-search-product-card-content"},r("div",{key:"750a347824045b181736002aed50b586437065ed",class:"s-search-product-card-content-main"},r("h3",{key:"b0b85cd7d0314e6e5657d208ede0bdb2ab957d8a",class:"s-search-product-card-content-title"},this.getDisplayTitle()),this.productData?.subtitle?r("p",{class:"s-search-product-card-content-subtitle"},this.productData?.subtitle):null),this.showDonationAmount&&this.productData?.donation?[r("salla-progress-bar",{donation:this.productData?.donation}),r("div",{class:"s-search-product-card-donation-input"},this.productData?.donation?.can_donate?[r("label",{htmlFor:"donation-amount"},this.donationAmount," ",r("span",null,"*")),r("input",{type:"text",onInput:t=>{salla.helpers.inputDigitsOnly(t.target),this.addBtn&&(this.addBtn.donatingAmount=t.target.value)},id:"donation-amount",name:"donating_amount",class:"s-form-control",placeholder:this.donationAmount})]:null)]:null,r("div",{key:"f1507e9e9a42d099e46e12b214be70ed41bff404",class:"s-search-product-card-content-sub"},this.getProductPrice(),this.productData?.is_out_of_stock?r("span",{class:"s-search-product-card-out-of-stock-label"},this.outOfStock):null),this.productData?.rating?.stars?r("div",{class:"s-search-product-card-rating"},r("span",{innerHTML:o}),r("span",null,this.productData.rating.stars)):null),this.hideAddBtn?null:r("div",{class:"s-search-product-card-content-footer"},r("salla-add-product-button",{ref:t=>this.addBtn=t,"product-id":this.productData.id,"product-status":this.productData.status,"product-type":this.productData.type,class:"s-add-product-button-compact"},this.renderAddToCartLabel())))}componentDidLoad(){document.lazyLoadInstance?.update(this.host?.querySelectorAll(".lazy"))}get host(){return e(this)}static get watchers(){return{product:["handleProductChange"]}}};i.style='/*!twlt*/.s-search-product-card-image::before{font-family:"sallaicons";content:"\\ec1f" !important}.grid{display:grid}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-search-product-card-entry{position:relative;display:flex;height:100%;justify-content:space-between;border-radius:var(--s-radius, 0.25rem);transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product-card-out-of-stock img.loaded{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-search-product-card-quantity{position:absolute;bottom:0.25rem;left:50%;z-index:1;max-width:calc(100% - 60px);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-quantity{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title{position:absolute;top:1rem;left:0px;z-index:1;max-width:calc(100% - 60px);border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-promotion-title{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title:where([dir="rtl"],[dir="rtl"] *){right:0px;left:unset;border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem);border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-product-card-image{position:relative;height:100%;width:100%;flex-shrink:0;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-card-image::before{position:absolute;top:50%;left:50%;display:inline-block;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;content:var(--tw-content);--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-search-product-card-image:hover{opacity:0.9}.s-search-product-card-image img{height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-search-product-card-image img.lazy{opacity:0}.s-search-product-card-image img.loaded{position:relative;opacity:1}.s-search-product-card-content{position:relative;display:flex;flex-direction:column;padding:0.75rem}@media (min-width: 640px){.s-search-product-card-content{padding:1.25rem}}.s-search-product-card-content-title{margin-bottom:0.625rem;display:block;max-width:100%;text-align:start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-content-title:hover{color:var(--color-primary)}.s-search-product-card-content-subtitle{margin-bottom:0.625rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-card-donation-input{position:relative;z-index:2;flex:1 1 0%}.s-search-product-card-donation-input label{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem}.s-search-product-card-donation-input label span{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-overlay-link{position:absolute;inset:0px;z-index:1}.s-search-product-card-content-sub{margin-bottom:1.25rem;display:flex;width:100%;align-items:center;justify-content:space-between}.s-search-product-card-out-of-stock-label{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-rating{margin-top:0.5rem;display:flex;align-items:center}.s-search-product-card-rating>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-rating{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product-card-rating:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-rating span svg{margin-bottom:3px;height:1rem;width:1rem;fill:#fbbf24}.s-search-product-card-content-footer{margin-top:auto;display:flex;align-items:center}.s-search-product-card-sale-price>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-sale-price:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-sale-price span{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-card-starting-price{display:flex;align-items:center;justify-content:space-between}.s-search-product-card-starting-price h4{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-search-product-card-price-value{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-image-cover{object-fit:cover}.s-search-product-card-image-contain{object-fit:contain}.s-search-product-card-add-to-cart-icon svg{height:1rem;width:1rem;fill:currentColor}.s-search-product-card-horizontal .s-search-product-card-image{height:auto;width:8rem}@media (min-width: 640px){.s-search-product-card-horizontal .s-search-product-card-image{width:14rem}}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-quantity{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.s-search-product-card-horizontal .s-search-product-card-promotion-title{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content{margin-bottom:0.625rem;width:100%}.s-search-product-card-compact{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:0.75rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0px;padding-right:0px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-search-product-card-content-footer{position:relative;z-index:2;margin-top:0px;flex-shrink:0;gap:0.5rem}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn{height:2rem;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);background-color:transparent;padding-left:0.75rem;padding-right:0.75rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn:hover{border-color:var(--color-primary);background-color:var(--color-primary);--tw-bg-opacity:0.1;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content{min-width:0px;flex:1 1 0%;padding:0px;text-align:right}.s-search-product-card-compact .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.25;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-subtitle{margin-top:0.25rem;display:none;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub{margin-bottom:0px;display:flex;align-items:center;justify-content:flex-start;gap:0.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub h4{margin:0px}.s-search-product-card-compact .s-search-product-card-starting-price h4{font-weight:700}.s-search-product-card-compact .s-search-product-card-starting-price{justify-content:flex-start;gap:0.25rem}.s-search-product-card-compact .s-search-product-card-image{height:5rem;width:5rem;flex-shrink:0;border-radius:0.375rem}.s-search-product-card-compact .s-search-product-card-image img{height:100%;width:100%;border-radius:0.375rem;object-fit:cover}.s-search-product-card-compact .s-search-product-card-promotion-title{display:none}';export{i as salla_search_product_card}
4
+ import{r as t,h as r,H as a,a as e}from"./p-CtoXzf1y.js";import{S as o}from"./p-D4oPi1Ov.js";import{C as c}from"./p-gFG8By9O.js";const i=class{constructor(r){t(this,r),this.hideAddBtn=!1,this.showDonationAmount=!1,this.remained="",this.outOfStock="",this.donationAmount="",this.startingPrice="",this.addToCart="",this.placeholder="",this.COMPACT_TITLE_MAX_LENGTH=90}parseProductData(t){if(t)try{return"object"==typeof t?t:JSON.parse(t)}catch(t){return void salla.log("Bad json passed via product prop")}}handleProductChange(t){this.productData=this.parseProductData(t)}async componentWillLoad(){this.productData=this.parseProductData(this.product),await Promise.all([salla.onReady(),salla.lang.onLoaded()]),this.placeholder=salla.url.asset(salla.config.get("theme.settings.placeholder")),this.remained=salla.lang.get("pages.products.remained"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.startingPrice=salla.lang.get("pages.products.starting_price"),this.addToCart=salla.lang.get("pages.cart.add_to_cart"),this.outOfStock=salla.lang.get("pages.products.out_of_stock")}getDisplayTitle(){const t=this.productData?.name||"";return t.length<=this.COMPACT_TITLE_MAX_LENGTH?t:t.slice(0,this.COMPACT_TITLE_MAX_LENGTH).trimEnd()+"…"}getProductBadge(){return!this.productData?.is_available&&this.productData?.quantity?r("div",{class:"s-search-product-card-quantity"},this.remained," ",salla.helpers.number(this.productData?.quantity)):this.productData.promotion_title?r("div",{class:"s-search-product-card-promotion-title"},this.productData.promotion_title):null}renderAddToCartLabel(){return r("slot",{name:"add-to-cart-label"},r("span",{class:"s-search-product-card-add-to-cart-icon",innerHTML:c}))}getPriceFormat(t){return t&&0!=t?salla.money(t):salla.config.get("store.settings.product.show_price_as_dash")?"-":""}getProductPrice(){return this.productData.is_on_sale?r("div",{class:"s-search-product-card-sale-price"},r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData.sale_price)}),r("span",{innerHTML:this.getPriceFormat(this.productData?.regular_price)})):this.productData.starting_price?r("div",{class:"s-search-product-card-starting-price"},r("p",null,this.startingPrice),r("h4",{innerHTML:this.getPriceFormat(this.productData?.starting_price)})):r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData?.price)})}render(){const t={"s-search-product-card-entry":!0,"s-search-product-card-horizontal":!0,"s-search-product-card-compact":!0,"s-search-product-card-donation":this.productData?.donation},e=this.productData?.url?{href:this.productData.url}:{};return r(a,{key:"6be103faead19fecfbc380ff4ee53f47f057dae0",id:`search-product-${this.productData?.id}`,class:t},this.productData?.url?r("a",{class:"s-search-product-card-overlay-link","aria-label":this.productData?.name,...e}):null,r("div",{key:"1b2200c07aead0031e1b7cf4f4a0d0dbdb165d15",class:"s-search-product-card-image"},r("img",{key:"dca2fd85d56f311845397893bb64f50c1202ed2c",class:`s-search-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)?"contain":"cover"} lazy`,src:this.placeholder,alt:this.productData?.image?.alt||this.productData?.name,"data-src":this.productData?.image?.url||this.productData?.thumbnail}),this.getProductBadge()),r("div",{key:"6b04b97c6ead3c399acd3597c62fcf197a2a3b0d",class:"s-search-product-card-content"},r("div",{key:"750a347824045b181736002aed50b586437065ed",class:"s-search-product-card-content-main"},r("h3",{key:"b0b85cd7d0314e6e5657d208ede0bdb2ab957d8a",class:"s-search-product-card-content-title"},this.getDisplayTitle()),this.productData?.subtitle?r("p",{class:"s-search-product-card-content-subtitle"},this.productData?.subtitle):null),this.showDonationAmount&&this.productData?.donation?[r("salla-progress-bar",{donation:this.productData?.donation}),r("div",{class:"s-search-product-card-donation-input"},this.productData?.donation?.can_donate?[r("label",{htmlFor:"donation-amount"},this.donationAmount," ",r("span",null,"*")),r("input",{type:"text",onInput:t=>{salla.helpers.inputDigitsOnly(t.target),this.addBtn&&(this.addBtn.donatingAmount=t.target.value)},id:"donation-amount",name:"donating_amount",class:"s-form-control",placeholder:this.donationAmount})]:null)]:null,r("div",{key:"f1507e9e9a42d099e46e12b214be70ed41bff404",class:"s-search-product-card-content-sub"},this.getProductPrice(),this.productData?.is_out_of_stock?r("span",{class:"s-search-product-card-out-of-stock-label"},this.outOfStock):null),this.productData?.rating?.stars?r("div",{class:"s-search-product-card-rating"},r("span",{innerHTML:o}),r("span",null,this.productData.rating.stars)):null),this.hideAddBtn?null:r("div",{class:"s-search-product-card-content-footer"},r("salla-add-product-button",{ref:t=>this.addBtn=t,"product-id":this.productData.id,"product-status":this.productData.status,"product-type":this.productData.type,class:"s-add-product-button-compact"},this.renderAddToCartLabel())))}componentDidLoad(){document.lazyLoadInstance?.update(this.host?.querySelectorAll(".lazy"))}get host(){return e(this)}static get watchers(){return{product:["handleProductChange"]}}};i.style='/*!twlt*/.s-search-product-card-image::before{font-family:"sallaicons";content:"\\ec1f" !important}.grid{display:grid}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-search-product-card-entry{position:relative;display:flex;height:100%;justify-content:space-between;border-radius:var(--s-radius, 0.25rem);transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product-card-out-of-stock img.loaded{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-search-product-card-quantity{position:absolute;bottom:0.25rem;left:50%;z-index:1;max-width:calc(100% - 60px);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-quantity{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title{position:absolute;top:1rem;left:0px;z-index:1;max-width:calc(100% - 60px);border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-promotion-title{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title:where([dir="rtl"],[dir="rtl"] *){right:0px;left:unset;border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem);border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-product-card-image{position:relative;height:100%;width:100%;flex-shrink:0;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-card-image::before{position:absolute;top:50%;left:50%;display:inline-block;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;content:var(--tw-content);--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-search-product-card-image:hover{opacity:0.9}.s-search-product-card-image img{height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-search-product-card-image img.lazy{opacity:0}.s-search-product-card-image img.loaded{position:relative;opacity:1}.s-search-product-card-content{position:relative;display:flex;flex-direction:column;padding:0.75rem}@media (min-width: 640px){.s-search-product-card-content{padding:1.25rem}}.s-search-product-card-content-title{margin-bottom:0.625rem;display:block;max-width:100%;text-align:start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-content-title:hover{color:var(--color-primary)}.s-search-product-card-content-subtitle{margin-bottom:0.625rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-card-donation-input{position:relative;z-index:2;flex:1 1 0%}.s-search-product-card-donation-input label{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem}.s-search-product-card-donation-input label span{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-overlay-link{position:absolute;inset:0px;z-index:1}.s-search-product-card-content-sub{margin-bottom:1.25rem;display:flex;width:100%;align-items:center;justify-content:space-between}.s-search-product-card-out-of-stock-label{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-rating{margin-top:0.5rem;display:flex;align-items:center}.s-search-product-card-rating>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-rating{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product-card-rating:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-rating span svg{margin-bottom:3px;height:1rem;width:1rem;fill:#fbbf24}.s-search-product-card-content-footer{margin-top:auto;display:flex;align-items:center}.s-search-product-card-sale-price>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-sale-price:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-sale-price span{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-card-starting-price{display:flex;align-items:center;justify-content:space-between}.s-search-product-card-starting-price h4{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-search-product-card-price-value{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-image-cover{object-fit:cover}.s-search-product-card-image-contain{object-fit:contain}.s-search-product-card-add-to-cart-icon svg{height:1rem;width:1rem;fill:currentColor}.s-search-product-card-horizontal .s-search-product-card-image{height:auto;width:8rem}@media (min-width: 640px){.s-search-product-card-horizontal .s-search-product-card-image{width:14rem}}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-quantity{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.s-search-product-card-horizontal .s-search-product-card-promotion-title{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content{margin-bottom:0.625rem;width:100%}.s-search-product-card-compact{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:0.75rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0px;padding-right:0px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-search-product-card-content-footer{position:relative;z-index:2;margin-top:0px;flex-shrink:0;gap:0.5rem}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn{height:2rem;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);background-color:transparent;padding-left:0.75rem;padding-right:0.75rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn:hover{border-color:var(--color-primary);background-color:var(--color-primary);--tw-bg-opacity:0.1;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content{min-width:0px;flex:1 1 0%;padding:0px;text-align:right}.s-search-product-card-compact .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.25;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-subtitle{margin-top:0.25rem;display:none;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub{margin-bottom:0px;display:flex;align-items:center;justify-content:flex-start;gap:0.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub h4{margin:0px}.s-search-product-card-compact .s-search-product-card-starting-price h4{font-weight:700}.s-search-product-card-compact .s-search-product-card-starting-price{justify-content:flex-start;gap:0.25rem}.s-search-product-card-compact .s-search-product-card-image{height:5rem;width:5rem;flex-shrink:0;border-radius:0.375rem}.s-search-product-card-compact .s-search-product-card-image img{height:100%;width:100%;border-radius:0.375rem;object-fit:cover}.s-search-product-card-compact .s-search-product-card-promotion-title{display:none}';export{i as salla_search_product_card}