@salla.sa/twilight-components 2.14.353 → 2.14.354

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 (311) hide show
  1. package/dist/cjs/bell-ring-BfKPinNo.js +13 -0
  2. package/dist/cjs/{interfaces-CX9-6aLf.js → camera-DytepEoK.js} +0 -11
  3. package/dist/cjs/cancel-De6vslRA.js +13 -0
  4. package/dist/cjs/cart-s-x1Fshk.js +13 -0
  5. package/dist/cjs/check-circle2-BDvlT4_n.js +13 -0
  6. package/dist/cjs/{check-CLRvuniI.js → check-x3w3-gpj.js} +2 -2
  7. package/dist/cjs/{filepond-7SxqaoXb.js → filepond-CuKErtOy.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-file-poster-DwIv84hN.js → filepond-plugin-file-poster-d-8BSuST.js} +1 -1
  9. package/dist/cjs/{filepond-plugin-file-validate-size-NUNnIo4Q.js → filepond-plugin-file-validate-size-zgI_JcqY.js} +1 -1
  10. package/dist/cjs/{filepond-plugin-file-validate-type-CXI-hfww.js → filepond-plugin-file-validate-type-Cy8IgG2P.js} +1 -1
  11. package/dist/cjs/{filepond-plugin-image-edit-fBeBGIBb.js → filepond-plugin-image-edit-9ZAUzCvh.js} +1 -1
  12. package/dist/cjs/{filepond-plugin-image-exif-orientation-BmLTdQ6d.js → filepond-plugin-image-exif-orientation-DzNe_tY2.js} +1 -1
  13. package/dist/cjs/{filepond-plugin-image-preview-CssKRM6n.js → filepond-plugin-image-preview-Cfna6xTB.js} +1 -1
  14. package/dist/{esm/gift-C0JNGIpa.js → cjs/gift-CJ-3Yw_x.js} +4 -2
  15. package/dist/cjs/image-BoZ6Hums.js +13 -0
  16. package/dist/cjs/{index-B5soIVRX.js → index-Ce40E8tZ.js} +136 -12
  17. package/dist/cjs/{index-B9TEdQDE.js → index-ff-xJfhj.js} +1 -1
  18. package/dist/cjs/interfaces-CRqrf5RX.js +15 -0
  19. package/dist/cjs/keyboard_arrow_down-DHJ3FFZq.js +13 -0
  20. package/dist/cjs/keyboard_arrow_right-BayM_Il2.js +21 -0
  21. package/dist/cjs/loader.cjs.js +2 -2
  22. package/dist/cjs/minus-CCryh1qf.js +21 -0
  23. package/dist/cjs/salla-accordion-body_3.cjs.entry.js +775 -0
  24. package/dist/cjs/salla-accordion_6.cjs.entry.js +768 -0
  25. package/dist/cjs/salla-add-product-button_4.cjs.entry.js +2389 -0
  26. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-alert_2.cjs.entry.js +194 -0
  28. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-booking-field_7.cjs.entry.js +1565 -0
  31. package/dist/cjs/{salla-cart-item-offers.cjs.entry.js → salla-cart-item-offers_2.cjs.entry.js} +104 -5
  32. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1661 -0
  33. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
  35. package/dist/cjs/salla-count-down_2.cjs.entry.js +302 -0
  36. package/dist/cjs/salla-custom-fields.cjs.entry.js +4 -3
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +488 -0
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +91 -0
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +34 -0
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +137 -0
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +320 -0
  46. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  48. package/dist/cjs/salla-loyalty.cjs.entry.js +211 -0
  49. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +40 -0
  50. package/dist/cjs/salla-menu.cjs.entry.js +139 -0
  51. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +220 -0
  53. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +598 -0
  54. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +69 -0
  55. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-offer-modal.cjs.entry.js +206 -0
  58. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-order-summary.cjs.entry.js +3 -3
  63. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-placeholder.cjs.entry.js +51 -0
  67. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-product-size-guide.cjs.entry.js +66 -0
  69. package/dist/cjs/salla-products-list.cjs.entry.js +762 -0
  70. package/dist/cjs/salla-products-slider.cjs.entry.js +115 -0
  71. package/dist/cjs/salla-progress-bar.cjs.entry.js +73 -0
  72. package/dist/cjs/salla-quick-order.cjs.entry.js +239 -0
  73. package/dist/cjs/salla-rating-modal.cjs.entry.js +453 -0
  74. package/dist/cjs/salla-scopes.cjs.entry.js +180 -0
  75. package/dist/cjs/salla-search.cjs.entry.js +153 -0
  76. package/dist/cjs/salla-skeleton.cjs.entry.js +36 -0
  77. package/dist/cjs/salla-slider.cjs.entry.js +10389 -0
  78. package/dist/cjs/salla-social-share.cjs.entry.js +165 -0
  79. package/dist/cjs/salla-social.cjs.entry.js +3 -3
  80. package/dist/cjs/salla-tab-content_3.cjs.entry.js +157 -0
  81. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-user-menu.cjs.entry.js +275 -0
  85. package/dist/cjs/salla-user-profile.cjs.entry.js +145 -0
  86. package/dist/cjs/salla-user-settings.cjs.entry.js +88 -0
  87. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  89. package/dist/cjs/search-c7Aa7lM9.js +13 -0
  90. package/dist/cjs/{special-discount-OVG_9Kf9.js → special-discount-DC2oXurL.js} +0 -8
  91. package/dist/cjs/star-DGcH7Yso.js +13 -0
  92. package/dist/cjs/star2-R146a27p.js +13 -0
  93. package/dist/cjs/twilight.cjs.js +2 -2
  94. package/dist/cjs/{vanilla-picker-C6fk8_TR.js → vanilla-picker-zQsXQIff.js} +1 -1
  95. package/dist/cjs/{whatsapp2-D7Sbg8Ey.js → whatsapp2-BdMd5Gx1.js} +2 -2
  96. package/dist/collection/collection-manifest.json +55 -1
  97. package/dist/collection/components/salla-product-options/salla-product-options.js +36 -3
  98. package/dist/components/index.js +2 -2
  99. package/dist/components/salla-product-options2.js +19 -2
  100. package/dist/esm/bell-ring-D3mWkc-3.js +11 -0
  101. package/dist/esm/{interfaces-CBT_Nxny.js → camera-C6jIkM-X.js} +1 -12
  102. package/dist/esm/cancel-BsLF_HK7.js +11 -0
  103. package/dist/esm/cart-DY4LZmNP.js +11 -0
  104. package/dist/esm/{check-uTyAzPSy.js → check-BsXh13x8.js} +2 -2
  105. package/dist/esm/check-circle2-BV4kqbdL.js +11 -0
  106. package/dist/esm/{filepond-Cuqyleyy.js → filepond-DEzyRrdH.js} +1 -1
  107. package/dist/esm/{filepond-plugin-file-poster-C6Wara8q.js → filepond-plugin-file-poster-DyLcCcHM.js} +1 -1
  108. package/dist/esm/{filepond-plugin-file-validate-size-D-M3KSxo.js → filepond-plugin-file-validate-size-Cxp5Yzea.js} +1 -1
  109. package/dist/esm/{filepond-plugin-file-validate-type-DzAl1VI8.js → filepond-plugin-file-validate-type-D2qNOQP4.js} +1 -1
  110. package/dist/esm/{filepond-plugin-image-edit-flutfc9I.js → filepond-plugin-image-edit-DndTlA7m.js} +1 -1
  111. package/dist/esm/{filepond-plugin-image-exif-orientation-B2UkG6iE.js → filepond-plugin-image-exif-orientation-CiT1CQoK.js} +1 -1
  112. package/dist/esm/{filepond-plugin-image-preview-B4u8N2nE.js → filepond-plugin-image-preview-DBG7keFZ.js} +1 -1
  113. package/dist/{cjs/gift-BPDUPIY_.js → esm/gift-BChI23pG.js} +2 -4
  114. package/dist/esm/image-C-tzSDxw.js +11 -0
  115. package/dist/esm/{index-6mr785rH.js → index-B74h9G6a.js} +137 -13
  116. package/dist/esm/{index-xWIb6INF.js → index-BLw7mdtM.js} +1 -1
  117. package/dist/esm/interfaces-OF8QcbMM.js +15 -0
  118. package/dist/esm/keyboard_arrow_down-DCZbpt2a.js +11 -0
  119. package/dist/esm/keyboard_arrow_right-Vqpj4CWE.js +18 -0
  120. package/dist/esm/loader.js +3 -3
  121. package/dist/esm/minus-DfeagqF1.js +18 -0
  122. package/dist/esm/salla-accordion-body_3.entry.js +771 -0
  123. package/dist/esm/salla-accordion_6.entry.js +761 -0
  124. package/dist/esm/salla-add-product-button_4.entry.js +2384 -0
  125. package/dist/esm/salla-advertisement.entry.js +1 -1
  126. package/dist/esm/salla-alert_2.entry.js +191 -0
  127. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  128. package/dist/esm/salla-apps-icons.entry.js +1 -1
  129. package/dist/esm/salla-booking-field_7.entry.js +1539 -0
  130. package/dist/esm/{salla-cart-item-offers.entry.js → salla-cart-item-offers_2.entry.js} +104 -6
  131. package/dist/esm/salla-comment-form_8.entry.js +1652 -0
  132. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  133. package/dist/esm/salla-contacts.entry.js +3 -3
  134. package/dist/esm/salla-count-down_2.entry.js +299 -0
  135. package/dist/esm/salla-custom-fields.entry.js +3 -2
  136. package/dist/esm/salla-filters-widget.entry.js +1 -1
  137. package/dist/esm/salla-filters.entry.js +1 -1
  138. package/dist/esm/salla-gifting.entry.js +486 -0
  139. package/dist/esm/salla-hook.entry.js +1 -1
  140. package/dist/esm/salla-infinite-scroll.entry.js +89 -0
  141. package/dist/esm/salla-installment.entry.js +1 -1
  142. package/dist/esm/salla-list-tile.entry.js +32 -0
  143. package/dist/esm/salla-localization-modal.entry.js +135 -0
  144. package/dist/esm/salla-login-modal.entry.js +318 -0
  145. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  146. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  147. package/dist/esm/salla-loyalty.entry.js +209 -0
  148. package/dist/esm/salla-maintenance-alert.entry.js +38 -0
  149. package/dist/esm/salla-menu.entry.js +137 -0
  150. package/dist/esm/salla-metadata.entry.js +1 -1
  151. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +217 -0
  152. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +595 -0
  153. package/dist/esm/salla-multiple-bundle-product.entry.js +67 -0
  154. package/dist/esm/salla-notification-item.entry.js +1 -1
  155. package/dist/esm/salla-notifications.entry.js +1 -1
  156. package/dist/esm/salla-offer-modal.entry.js +204 -0
  157. package/dist/esm/salla-offer.entry.js +1 -1
  158. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  159. package/dist/esm/salla-order-details-options.entry.js +1 -1
  160. package/dist/esm/salla-order-details.entry.js +1 -1
  161. package/dist/esm/salla-order-summary.entry.js +3 -3
  162. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  163. package/dist/esm/salla-orders.entry.js +1 -1
  164. package/dist/esm/salla-payments.entry.js +1 -1
  165. package/dist/esm/salla-placeholder.entry.js +49 -0
  166. package/dist/esm/salla-price-range.entry.js +1 -1
  167. package/dist/esm/salla-product-size-guide.entry.js +64 -0
  168. package/dist/esm/salla-products-list.entry.js +760 -0
  169. package/dist/esm/salla-products-slider.entry.js +113 -0
  170. package/dist/esm/salla-progress-bar.entry.js +71 -0
  171. package/dist/esm/salla-quick-order.entry.js +237 -0
  172. package/dist/esm/salla-rating-modal.entry.js +451 -0
  173. package/dist/esm/salla-scopes.entry.js +178 -0
  174. package/dist/esm/salla-search.entry.js +151 -0
  175. package/dist/esm/salla-skeleton.entry.js +34 -0
  176. package/dist/esm/salla-slider.entry.js +10387 -0
  177. package/dist/esm/salla-social-share.entry.js +163 -0
  178. package/dist/esm/salla-social.entry.js +2 -2
  179. package/dist/esm/salla-tab-content_3.entry.js +153 -0
  180. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  181. package/dist/esm/salla-tooltip.entry.js +1 -1
  182. package/dist/esm/salla-trust-badges.entry.js +1 -1
  183. package/dist/esm/salla-user-menu.entry.js +273 -0
  184. package/dist/esm/salla-user-profile.entry.js +143 -0
  185. package/dist/esm/salla-user-settings.entry.js +86 -0
  186. package/dist/esm/salla-verify.entry.js +1 -1
  187. package/dist/esm/salla-wallet.entry.js +1 -1
  188. package/dist/esm/search-BscTeWDc.js +11 -0
  189. package/dist/esm/{special-discount-yRO-ZESF.js → special-discount-Ctkfc4K-.js} +1 -8
  190. package/dist/esm/star-ZT7ehBBk.js +11 -0
  191. package/dist/esm/star2-D4oPi1Ov.js +11 -0
  192. package/dist/esm/twilight.js +3 -3
  193. package/dist/esm/{vanilla-picker-B4PKRAhm.js → vanilla-picker-CtwkXTap.js} +1 -1
  194. package/dist/esm/{whatsapp2-DWksgowB.js → whatsapp2-CgR-T_ZS.js} +2 -2
  195. package/dist/twilight/{p-2a26c1d6.entry.js → p-0134b4fd.entry.js} +1 -1
  196. package/dist/twilight/{p-d4aaeef4.entry.js → p-01daaaa6.entry.js} +1 -1
  197. package/dist/twilight/p-07da7390.entry.js +4 -0
  198. package/dist/twilight/{p-81702ecb.entry.js → p-08badc32.entry.js} +1 -1
  199. package/dist/twilight/{p-4bc98557.entry.js → p-0aa5a12a.entry.js} +1 -1
  200. package/dist/twilight/{p-6f576591.entry.js → p-10dcd981.entry.js} +1 -1
  201. package/dist/twilight/{p-5067322a.entry.js → p-212a0710.entry.js} +1 -1
  202. package/dist/twilight/p-229275db.entry.js +4 -0
  203. package/dist/twilight/{p-dde21f4b.entry.js → p-232185ec.entry.js} +1 -1
  204. package/dist/twilight/{p-12e49031.entry.js → p-2a927eac.entry.js} +1 -1
  205. package/dist/twilight/p-2d880232.entry.js +4 -0
  206. package/dist/twilight/p-2de9df64.entry.js +4 -0
  207. package/dist/twilight/p-309a0ba4.entry.js +4 -0
  208. package/dist/twilight/{p-e909d28b.entry.js → p-32732ca7.entry.js} +1 -1
  209. package/dist/twilight/{p-19e07b9e.entry.js → p-32ca34ec.entry.js} +1 -1
  210. package/dist/twilight/{p-9946fa76.entry.js → p-33093880.entry.js} +1 -1
  211. package/dist/twilight/p-3cffa4c9.entry.js +4 -0
  212. package/dist/twilight/p-3d0bb451.entry.js +4 -0
  213. package/dist/twilight/p-3e0d814c.entry.js +4 -0
  214. package/dist/twilight/p-4036d5dc.entry.js +4 -0
  215. package/dist/twilight/p-40fe4b01.entry.js +4 -0
  216. package/dist/twilight/p-47ac0ca5.entry.js +4 -0
  217. package/dist/twilight/{p-5bf05092.entry.js → p-4cd9da44.entry.js} +1 -1
  218. package/dist/twilight/p-5c9281d3.entry.js +4 -0
  219. package/dist/twilight/p-5d044466.entry.js +4 -0
  220. package/dist/twilight/p-5d21334a.entry.js +4 -0
  221. package/dist/twilight/{p-c096e336.entry.js → p-654429df.entry.js} +1 -1
  222. package/dist/twilight/p-6b8453be.entry.js +4 -0
  223. package/dist/twilight/p-6be7bbb0.entry.js +4 -0
  224. package/dist/twilight/{p-4253fc44.entry.js → p-6c8f5c94.entry.js} +1 -1
  225. package/dist/twilight/{p-6f5d02c6.entry.js → p-6fa02770.entry.js} +1 -1
  226. package/dist/twilight/p-7040ea33.entry.js +4 -0
  227. package/dist/twilight/p-8c189d76.entry.js +4 -0
  228. package/dist/twilight/p-8f1f052c.entry.js +4 -0
  229. package/dist/twilight/{p-ac6fc286.entry.js → p-9051a540.entry.js} +1 -1
  230. package/dist/twilight/p-9f1c561f.entry.js +4 -0
  231. package/dist/twilight/{p-B2SkkGH8.js → p-B69XOH6h.js} +1 -1
  232. package/dist/twilight/{p-6mr785rH.js → p-B74h9G6a.js} +2 -2
  233. package/dist/twilight/{p-C0JNGIpa.js → p-BChI23pG.js} +1 -1
  234. package/dist/twilight/{p-C_h1JDCU.js → p-BCxm-ISm.js} +1 -1
  235. package/dist/twilight/{p-Bp_xKTyn.js → p-BPqZ249Z.js} +1 -1
  236. package/dist/twilight/p-BV4kqbdL.js +4 -0
  237. package/dist/twilight/p-BsLF_HK7.js +4 -0
  238. package/dist/twilight/{p-uTyAzPSy.js → p-BsXh13x8.js} +1 -1
  239. package/dist/twilight/p-BscTeWDc.js +4 -0
  240. package/dist/twilight/p-C-tzSDxw.js +4 -0
  241. package/dist/twilight/p-C6jIkM-X.js +4 -0
  242. package/dist/twilight/p-CO-PeZ27.js +4 -0
  243. package/dist/twilight/{p-ChfiVIJv.js → p-CQq81yb5.js} +1 -1
  244. package/dist/twilight/{p-DWksgowB.js → p-CgR-T_ZS.js} +1 -1
  245. package/dist/twilight/p-Ctkfc4K-.js +4 -0
  246. package/dist/twilight/p-D3mWkc-3.js +4 -0
  247. package/dist/twilight/p-D4oPi1Ov.js +4 -0
  248. package/dist/twilight/p-DCZbpt2a.js +4 -0
  249. package/dist/twilight/p-DY4LZmNP.js +4 -0
  250. package/dist/twilight/p-DfeagqF1.js +4 -0
  251. package/dist/twilight/{p-Cuxsz9f-.js → p-DpsbV3x1.js} +1 -1
  252. package/dist/twilight/p-OF8QcbMM.js +4 -0
  253. package/dist/twilight/p-Vqpj4CWE.js +4 -0
  254. package/dist/twilight/p-ZT7ehBBk.js +4 -0
  255. package/dist/twilight/{p-tFBCbVoG.js → p-_-aXm0Wb.js} +1 -1
  256. package/dist/twilight/p-a100bd38.entry.js +4 -0
  257. package/dist/twilight/{p-0c87ef6c.entry.js → p-a2756650.entry.js} +1 -1
  258. package/dist/twilight/{p-8b018d82.entry.js → p-aab45a16.entry.js} +1 -1
  259. package/dist/twilight/p-aae761ff.entry.js +4 -0
  260. package/dist/twilight/p-afd61e47.entry.js +4 -0
  261. package/dist/twilight/p-b1fc6dfc.entry.js +4 -0
  262. package/dist/twilight/p-b206a0a1.entry.js +4 -0
  263. package/dist/twilight/p-b2332516.entry.js +4 -0
  264. package/dist/twilight/{p-18ebec2c.entry.js → p-b588ef46.entry.js} +1 -1
  265. package/dist/twilight/p-b71fc1b5.entry.js +4 -0
  266. package/dist/twilight/{p-zHj-W7EE.js → p-bVqtOl1F.js} +1 -1
  267. package/dist/twilight/{p-300624bb.entry.js → p-bf65b263.entry.js} +1 -1
  268. package/dist/twilight/{p-33ea3141.entry.js → p-c56a47b0.entry.js} +1 -1
  269. package/dist/twilight/p-c73189e3.entry.js +4 -0
  270. package/dist/twilight/p-d1203242.entry.js +4 -0
  271. package/dist/twilight/p-d4edfed4.entry.js +4 -0
  272. package/dist/twilight/{p-6472200c.entry.js → p-d86ce978.entry.js} +1 -1
  273. package/dist/twilight/{p-fa585081.entry.js → p-d9e7973d.entry.js} +1 -1
  274. package/dist/twilight/p-e3e33238.entry.js +4 -0
  275. package/dist/twilight/p-e6bb7362.entry.js +4 -0
  276. package/dist/twilight/{p-28900b2e.entry.js → p-e7813c80.entry.js} +1 -1
  277. package/dist/twilight/p-ec2fd37e.entry.js +4 -0
  278. package/dist/twilight/{p-b60db6c8.entry.js → p-ec77c523.entry.js} +1 -1
  279. package/dist/twilight/{p-8c7b7712.entry.js → p-efc18ce6.entry.js} +1 -1
  280. package/dist/twilight/p-f4039c40.entry.js +4 -0
  281. package/dist/twilight/p-f47b130c.entry.js +4 -0
  282. package/dist/twilight/{p-7e39343d.entry.js → p-f57ca123.entry.js} +1 -1
  283. package/dist/twilight/{p-2d209f96.entry.js → p-f5ad6572.entry.js} +1 -1
  284. package/dist/twilight/p-fc65084f.entry.js +4 -0
  285. package/dist/twilight/p-fd81a311.entry.js +4 -0
  286. package/dist/twilight/{p-16b8d78c.entry.js → p-fe983809.entry.js} +1 -1
  287. package/dist/twilight/{p-BijadG7g.js → p-i5J7XGS6.js} +1 -1
  288. package/dist/twilight/{p-DnELO4MH.js → p-shFpk0H3.js} +1 -1
  289. package/dist/twilight/twilight.esm.js +1 -1
  290. package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -1
  291. package/dist/types/components.d.ts +4 -0
  292. package/package.json +5 -5
  293. package/dist/cjs/salla-accordion_62.cjs.entry.js +0 -22470
  294. package/dist/cjs/salla-review-card.cjs.entry.js +0 -183
  295. package/dist/cjs/salla-reviews-page.cjs.entry.js +0 -695
  296. package/dist/cjs/salla-reviews.cjs.entry.js +0 -106
  297. package/dist/esm/salla-accordion_62.entry.js +0 -22389
  298. package/dist/esm/salla-review-card.entry.js +0 -181
  299. package/dist/esm/salla-reviews-page.entry.js +0 -693
  300. package/dist/esm/salla-reviews.entry.js +0 -104
  301. package/dist/twilight/p-67830f2a.entry.js +0 -4
  302. package/dist/twilight/p-751dddd4.entry.js +0 -4
  303. package/dist/twilight/p-9b22a7eb.entry.js +0 -4
  304. package/dist/twilight/p-CBT_Nxny.js +0 -4
  305. package/dist/twilight/p-Dz7o69vX.js +0 -4
  306. package/dist/twilight/p-a515a8cc.entry.js +0 -4
  307. package/dist/twilight/p-c4821f8b.entry.js +0 -4
  308. package/dist/twilight/p-de807340.entry.js +0 -4
  309. package/dist/twilight/p-yRO-ZESF.js +0 -4
  310. package/dist/cjs/{twitter-pOrUNjXi.js → facebook-DbXua6B9.js} +2 -2
  311. package/dist/esm/{twitter-Dz7o69vX.js → facebook-CO-PeZ27.js} +2 -2
@@ -0,0 +1,768 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ var index = require('./index-Ce40E8tZ.js');
7
+ var keyboard_arrow_right = require('./keyboard_arrow_right-BayM_Il2.js');
8
+ var cancel = require('./cancel-De6vslRA.js');
9
+ var checkCircle2 = require('./check-circle2-BDvlT4_n.js');
10
+ var Helper = require('./Helper-DHRnzcFm.js');
11
+ require('./anime.es-BqW8JHZi.js');
12
+
13
+ const sallaAccordionCss = "";
14
+
15
+ const SallaAccordion = class {
16
+ constructor(hostRef) {
17
+ index.registerInstance(this, hostRef);
18
+ /** Should the accordion be collapsible or not. Default is true. */
19
+ this.collapsible = true;
20
+ this.bordered = false;
21
+ this.size = "md";
22
+ /** Detect if accordion collapsed or not. */
23
+ this.collapsed = true;
24
+ /** Represents the direction of the layout. */
25
+ this.dir = document.dir || 'rtl';
26
+ }
27
+ directionChangedHandler(event) {
28
+ this.dir = event.detail.dir;
29
+ }
30
+ handleCollapse(event) {
31
+ this.collapsed = event.detail.payload.collapsed;
32
+ }
33
+ setcollapsibleProp() {
34
+ const head = this.host.querySelector('salla-accordion-head');
35
+ if (this.collapsible && head) {
36
+ head.setAttribute('collapsible', 'true');
37
+ head.setAttribute('collapsed', this.collapsed.toString());
38
+ }
39
+ }
40
+ componentDidRender() {
41
+ this.setcollapsibleProp();
42
+ const body = this.host.querySelector('salla-accordion-body');
43
+ if (this.collapsible) {
44
+ this.host.setAttribute('data-collapsed', this.collapsed.toString());
45
+ body?.setAttribute('data-collapsed', this.collapsed.toString());
46
+ }
47
+ }
48
+ render() {
49
+ return (index.h(index.Host, { key: 'ed8e4c0f24fa4462654e94fa46706e892c141351', class: `s-accordion-wrapper ${this.dir} ${this.bordered ? 's-accordion-wrapper-bordered' : ''} ${this.size ? `size-${this.size}` : ''}`, "data-collapsed": this.collapsed.toString() }, index.h("slot", { key: '1dbda01c073f3018a55ebcf5d8613a82a5dc6b27' })));
50
+ }
51
+ get host() { return index.getElement(this); }
52
+ };
53
+ SallaAccordion.style = sallaAccordionCss;
54
+
55
+ const sallaBreadcrumbCss = ":host{display:block}";
56
+
57
+ const SallaBreadcrumb = class {
58
+ constructor(hostRef) {
59
+ index.registerInstance(this, hostRef);
60
+ this.sessionStorageKey = "breadcrumb_snapshot";
61
+ this.itemSlot = this.host.querySelector('[slot="item"]')?.outerHTML || `<li class="s-breadcrumb-item"><a href={url}>{title}</a></li>`;
62
+ this.iconSlot = this.host.querySelector('[slot="icon"]')?.outerHTML;
63
+ }
64
+ componentWillLoad() {
65
+ return (new Promise(resolve => salla.onReady(() => salla.lang.onLoaded(resolve))))
66
+ .then(() => {
67
+ if (salla.url.is_page('index')) {
68
+ throw new Error('salla-breadcrumb:: breadcrumb not supported on home page');
69
+ }
70
+ })
71
+ .then(() => {
72
+ if (!salla.config.get('theme.settings.is_breadcrumbs_enabled', true)) {
73
+ throw new Error('salla-breadcrumb:: merchant disabled the feature');
74
+ }
75
+ })
76
+ .then(() => {
77
+ const page = salla.config.get("page");
78
+ if (!page || !page.slug) {
79
+ salla.logger.error('salla-breadcrumbs:: page object not existed on salla.config.get("page")!');
80
+ this.breadcrumbs = [];
81
+ return;
82
+ }
83
+ let sessionBreadcrumbs = this.getSessionBreadcrumbs();
84
+ if (page.slug === "product.single" && sessionBreadcrumbs && sessionBreadcrumbs.length > 0) {
85
+ sessionBreadcrumbs.push({
86
+ title: page.title,
87
+ url: page.url
88
+ });
89
+ this.breadcrumbs = this.setBreadcrumbsFromArray(sessionBreadcrumbs);
90
+ this.storeBreadcrumbSnapshot();
91
+ }
92
+ else if (sessionBreadcrumbs && sessionBreadcrumbs.length > 0) {
93
+ if (this.isNewPage(page, sessionBreadcrumbs)) {
94
+ this.breadcrumbs = this.generateBreadcrumbs(page);
95
+ this.storeBreadcrumbSnapshot();
96
+ }
97
+ else {
98
+ this.breadcrumbs = this.setBreadcrumbsFromArray(sessionBreadcrumbs);
99
+ }
100
+ }
101
+ else {
102
+ this.breadcrumbs = this.generateBreadcrumbs(page);
103
+ this.storeBreadcrumbSnapshot();
104
+ }
105
+ if (this.breadcrumbs?.length) {
106
+ this.breadcrumbs[this.breadcrumbs.length - 1].is_last = true;
107
+ }
108
+ return this.breadcrumbs;
109
+ })
110
+ .catch((error) => {
111
+ salla.logger.error('salla-breadcrumb:: unexpected error!', error);
112
+ this.breadcrumbs = [];
113
+ });
114
+ }
115
+ getSessionBreadcrumbs() {
116
+ if (new URLSearchParams(window.location.search).get('from') === 'search-bar') {
117
+ return [];
118
+ }
119
+ return JSON.parse(sessionStorage.getItem(this.sessionStorageKey) || '[]');
120
+ }
121
+ /**
122
+ * Helper function to determine if we're navigating to a new page that requires updating the session storage.
123
+ */
124
+ isNewPage(page, sessionBreadcrumbs) {
125
+ // Check if the last breadcrumb in sessionStorage matches the current page's URL.
126
+ const lastBreadcrumb = sessionBreadcrumbs[sessionBreadcrumbs.length - 1];
127
+ return lastBreadcrumb?.url !== page.url; // If the URLs don't match, it's a new page.
128
+ }
129
+ setBreadcrumbsFromArray(breadcrumbArray) {
130
+ return breadcrumbArray.map((item, index) => ({
131
+ ...item,
132
+ is_last: index === breadcrumbArray.length - 1,
133
+ }));
134
+ }
135
+ /**
136
+ * Sanitizes the breadcrumb title by splitting it on the `|` character and returning
137
+ * the part based on `preferedIndex`. If no separator is found, returns the trimmed title.
138
+ *
139
+ * @param {string} title - The title to sanitize.
140
+ * @param {number} [preferedIndex=1] - Index of the part to return (0 for first, 1 for second).
141
+ * @returns {string} - The sanitized title.
142
+ */
143
+ sanitizeBreadcrumbTitle(title, preferedIndex = 1) {
144
+ if (!title.includes('|')) {
145
+ return title.trim();
146
+ }
147
+ return title.split('|').map(part => part.trim())[preferedIndex];
148
+ }
149
+ generateBreadcrumbs(page) {
150
+ let breadcrumbs = [];
151
+ //TODO:: check what is the need from this?
152
+ if (page.slug === 'product.single') {
153
+ const previousPage = this.getSessionBreadcrumbs();
154
+ if (previousPage.length > 0 && previousPage[1]?.url === page.parent?.url) {
155
+ return this.setBreadcrumbsFromArray([...previousPage, page]);
156
+ }
157
+ }
158
+ // Start with the current page
159
+ let currentPage = page;
160
+ // Traverse up to the parent pages
161
+ while (currentPage) {
162
+ if (currentPage.title) {
163
+ breadcrumbs.unshift({
164
+ title: currentPage.title,
165
+ url: currentPage.url,
166
+ });
167
+ }
168
+ currentPage = currentPage.parent;
169
+ }
170
+ // Additional logic based on page slug or title
171
+ if (page.slug.includes("customer") && page.slug !== 'customer.profile') {
172
+ breadcrumbs.unshift({ title: salla.lang.get('common.titles.profile'), url: salla.url.get('profile') });
173
+ }
174
+ if (page.slug.includes('blog')) {
175
+ breadcrumbs.unshift({ title: salla.lang.get('blocks.footer.blog'), url: salla.url.get('blog') });
176
+ }
177
+ if (page.slug === 'brands.single') {
178
+ breadcrumbs.unshift({ title: salla.lang.get('common.titles.brands'), url: salla.url.get('brands') });
179
+ }
180
+ if (!page.title && page.slug === 'loyalty') {
181
+ breadcrumbs.unshift({ title: salla.lang.get('common.titles.loyalty_program'), url: salla.url.get('loyalty') });
182
+ }
183
+ // Add home breadcrumb
184
+ breadcrumbs.unshift({ title: salla.lang.get('common.titles.home'), url: salla.url.get('') });
185
+ return breadcrumbs;
186
+ }
187
+ storeBreadcrumbSnapshot() {
188
+ try {
189
+ const page = salla.config.get("page");
190
+ // Skip storing breadcrumbs for product.single page
191
+ if (page?.slug === 'product.single') {
192
+ return;
193
+ }
194
+ const items = [...this.breadcrumbs];
195
+ // Find the last item and update its URL
196
+ const lastItemIndex = items.length - 1;
197
+ if (lastItemIndex >= 0) {
198
+ items[lastItemIndex].url = window.location.href;
199
+ }
200
+ const breadcrumbSnapshot = JSON.stringify(items);
201
+ sessionStorage.setItem(this.sessionStorageKey, breadcrumbSnapshot);
202
+ }
203
+ catch (error) {
204
+ salla.logger.error('salla-breadcrumb:: Failed to store breadcrumb snapshot in sessionStorage.', error);
205
+ }
206
+ }
207
+ render() {
208
+ if (this.breadcrumbs.length <= 1) {
209
+ salla.log('salla-breadcrumb:: There is no breadcrumbs!');
210
+ return null;
211
+ }
212
+ return (index.h("ol", { class: {
213
+ "s-breadcrumb-wrapper": true,
214
+ "s-breadcrumb-dark": salla.url.is_page('loyalty'),
215
+ "s-breadcrumb-primary-reverse": salla.config.get('page.slug').includes('customer')
216
+ } }, this.breadcrumbs.map(item => {
217
+ const isProductSingle = salla.config.get('page.slug') === "product.single";
218
+ const title = (isProductSingle && item.is_last) ? item.title : this.sanitizeBreadcrumbTitle(item.title);
219
+ const itemHTML = this.itemSlot.replace(/\{url\}/g, item.url).replace(/\{title\}/g, title);
220
+ return [
221
+ index.h("div", { class: "s-breadcrumb-slot", innerHTML: itemHTML }),
222
+ this.getArrowDomForItem(item)
223
+ ];
224
+ })));
225
+ }
226
+ getArrowDomForItem(item) {
227
+ if (item.is_last) {
228
+ return '';
229
+ }
230
+ let iconDom = this.iconSlot || (salla.config.get('theme.is_rtl', true) ? keyboard_arrow_right.ArrowLeftIcon : keyboard_arrow_right.ArrowRightIcon);
231
+ return index.h("li", { class: "s-breadcrumb-arrow" }, index.h("div", { class: { "s-breadcrumb-icon-slot": true, "s-breadcrumb-default-icon": !this.iconSlot }, innerHTML: iconDom }));
232
+ }
233
+ /**
234
+ * Lifecycle method called after the component is rendered.
235
+ * - Reduces the number of elements in the DOM.
236
+ * - Removes unnecessary slots parent elements.
237
+ * - Replaces the last anchor tag in the breadcrumb with its content.
238
+ */
239
+ componentDidRender() {
240
+ // Reduces the number of elements in the DOM
241
+ this.host.querySelectorAll('.s-breadcrumb-slot').forEach(el => el.replaceWith(el.firstChild));
242
+ this.host.querySelectorAll('.s-breadcrumb-icon-slot.s-breadcrumb-default-icon').forEach(el => el.replaceWith(el.querySelector('svg')));
243
+ // Removes the slots parent elements if exists
244
+ this.host.querySelector('[slot="item"]')?.remove();
245
+ this.host.querySelector('[slot="icon"]')?.remove();
246
+ let lastEl = this.host.querySelectorAll('.s-breadcrumb-item')[this.breadcrumbs.length - 1]?.querySelector('a');
247
+ lastEl && lastEl.replaceWith(lastEl.firstChild);
248
+ }
249
+ get host() { return index.getElement(this); }
250
+ };
251
+ SallaBreadcrumb.style = sallaBreadcrumbCss;
252
+
253
+ const sallaButtonCss = "";
254
+
255
+ const SallaButton = class {
256
+ constructor(hostRef) {
257
+ index.registerInstance(this, hostRef);
258
+ /**
259
+ * Button Type
260
+ */
261
+ this.shape = 'btn';
262
+ /**
263
+ * Button Color
264
+ */
265
+ this.color = 'primary';
266
+ /**
267
+ * Button Fill
268
+ */
269
+ this.fill = 'solid';
270
+ /**
271
+ * Button Size
272
+ */
273
+ this.size = 'medium';
274
+ /**
275
+ * Button Width
276
+ */
277
+ this.width = 'normal';
278
+ /**
279
+ * Is the button currently loading
280
+ */
281
+ this.loading = false;
282
+ /**
283
+ * Is the button currently disabled
284
+ */
285
+ this.disabled = false;
286
+ /**
287
+ * If there is need to change loader position, pass the position
288
+ */
289
+ this.loaderPosition = 'after';
290
+ /**
291
+ * Determines the type of the rendered button.
292
+ * By default, the type is set to "button," making it a general-purpose button.
293
+ * Setting `type` to "submit" makes the button behave as a submit button within a form, triggering form submission.
294
+ * Possible values for `type` include "button," "submit," "reset," and "menu.".
295
+ *
296
+ * Possible values and their usage are as follows:
297
+ * "button" (default, used for general button functionality),
298
+ * "reset" (resets form fields to their default values), and
299
+ * "menu" (represents a button that, when activated, displays a context menu).
300
+ */
301
+ this.type = "button";
302
+ }
303
+ /**
304
+ * Run loading animation
305
+ */
306
+ async load() {
307
+ if (this.loaderPosition == 'center')
308
+ this.text.classList.add('s-button-hide');
309
+ this.host.setAttribute('loading', '');
310
+ return this.host;
311
+ }
312
+ /**
313
+ * Stop loading animation
314
+ */
315
+ async stop() {
316
+ this.host.removeAttribute('loading');
317
+ this.host.querySelector('button').removeAttribute('loading');
318
+ if (this.loaderPosition == 'center')
319
+ this.text.classList.remove('s-button-hide');
320
+ return this.host;
321
+ }
322
+ /**
323
+ * Changing the body of the button
324
+ * @param html
325
+ */
326
+ async setText(html) {
327
+ this.text.innerHTML = html;
328
+ return this.host;
329
+ }
330
+ /**
331
+ * Add `disabled` attribute
332
+ */
333
+ async disable() {
334
+ this.host.setAttribute('disabled', '');
335
+ return this.host;
336
+ }
337
+ /**
338
+ * Remove `disabled` attribute
339
+ */
340
+ async enable() {
341
+ this.host.removeAttribute('disabled');
342
+ return this.host;
343
+ }
344
+ getBtnAttributes() {
345
+ const hostAttributes = {};
346
+ for (let i = 0; i < this.host.attributes.length; i++) {
347
+ if (!['color', 'fill', 'size', 'width', 'id'].includes(this.host.attributes[i].name)) {
348
+ hostAttributes[this.host.attributes[i].name] = this.host.attributes[i].value;
349
+ }
350
+ }
351
+ hostAttributes.type = hostAttributes.type || this.type;
352
+ const buttonClass = hostAttributes.class || '';
353
+ hostAttributes.class = buttonClass +
354
+ ' s-button-element s-button-' + this.shape
355
+ + ' s-button-' + (this.fill == "none" ? 'fill-none' : this.fill)
356
+ + (this.size != "medium" ? ' s-button-' + this.size : '')
357
+ + (this.width != "normal" ? ' s-button-' + this.width : '')
358
+ + (this.shape == "link" ? ' s-button-' + this.color + '-link' : '')
359
+ + (this.shape != "link" && this.fill != 'outline' ? ' s-button-' + this.color : '')
360
+ + (this.fill == 'outline' ? ' s-button-' + this.color + '-outline' : '')
361
+ + (this.disabled ? ' s-button-disabled ' : '')
362
+ + (this.shape == 'icon' ? ' s-button-loader-center' : ' s-button-loader-' + this.loaderPosition);
363
+ if (!hostAttributes['aria-label'] && !hostAttributes['aria-labelledby']) {
364
+ const buttonText = (this.host.textContent || '').trim();
365
+ // Only add aria-label for buttons without visible text (icon buttons)
366
+ // Buttons with visible text don't need aria-label as screen readers already announce the text
367
+ if (!buttonText) {
368
+ // Check if it's a wishlist button and add aria-label automatically
369
+ const isWishlistButton = buttonClass.includes('btn--wishlist') || buttonClass.includes('wishlist');
370
+ if (isWishlistButton) {
371
+ hostAttributes['aria-label'] = salla.lang.getWithDefault('pages.products.add_to_wishlist', 'Add or remove to wishlist');
372
+ }
373
+ else if (this.shape === 'icon') {
374
+ console.warn('Icon button is missing aria-label attribute');
375
+ }
376
+ }
377
+ }
378
+ return hostAttributes;
379
+ }
380
+ button() {
381
+ return (index.h("button", { ...this.getBtnAttributes(), disabled: this.disabled }, index.h("span", { class: "s-button-text", ref: el => this.text = el }, index.h("slot", null)), this.loading ? index.h("span", { class: "s-button-loader" }) : ''));
382
+ }
383
+ render() {
384
+ //TODO:: find a better fix, this is a patch for issue that duplicates the buttons twice @see the screenshot inside this folder
385
+ return this.host.closest('.swiper-slide')?.classList.contains('swiper-slide-duplicate')
386
+ ? ''
387
+ : (index.h(index.Host, { class: "s-button-wrap" }, this.href ? index.h("a", { href: this.href }, this.button()) : this.button()));
388
+ }
389
+ get host() { return index.getElement(this); }
390
+ };
391
+ SallaButton.style = sallaButtonCss;
392
+
393
+ var AlertEngineIcon = `<!-- Generated by IcoMoon.io -->
394
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
395
+ <title>alert-engine</title>
396
+ <path d="M16 18.673c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM2.667 16c0-3.092 1.083-6.105 3.047-8.484 0.469-0.568 0.389-1.408-0.179-1.877-0.568-0.468-1.408-0.388-1.877 0.179-2.359 2.857-3.657 6.473-3.657 10.183s1.299 7.325 3.657 10.183c0.264 0.319 0.645 0.484 1.029 0.484 0.299 0 0.6-0.1 0.848-0.305 0.568-0.469 0.648-1.309 0.179-1.877-1.964-2.379-3.047-5.392-3.047-8.484zM16 10.667c-0.736 0-1.333 0.597-1.333 1.333v4c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-4c0-0.736-0.597-1.333-1.333-1.333zM16 5.333c-5.881 0-10.667 4.785-10.667 10.667s4.785 10.667 10.667 10.667 10.667-4.785 10.667-10.667-4.785-10.667-10.667-10.667zM16 24c-4.412 0-8-3.588-8-8s3.588-8 8-8 8 3.588 8 8-3.588 8-8 8zM28.343 5.817c-0.469-0.567-1.307-0.647-1.877-0.179-0.568 0.469-0.648 1.309-0.179 1.877 1.964 2.379 3.047 5.392 3.047 8.484s-1.083 6.105-3.047 8.484c-0.469 0.568-0.389 1.408 0.179 1.877 0.249 0.205 0.549 0.305 0.848 0.305 0.384 0 0.765-0.165 1.028-0.484 2.36-2.857 3.659-6.473 3.659-10.183s-1.299-7.325-3.657-10.183z"></path>
397
+ </svg>
398
+ `;
399
+
400
+ const sallaDrawerCss = "";
401
+
402
+ const SallaDrawer = class {
403
+ constructor(hostRef) {
404
+ index.registerInstance(this, hostRef);
405
+ this.drawerVisibilityChanged = index.createEvent(this, "drawerVisibilityChanged");
406
+ /**
407
+ * Sets the drawer to be closable. Defaults to `true`
408
+ */
409
+ this.isClosable = true;
410
+ /**
411
+ * The width of the drawer
412
+ */
413
+ this.width = 'md';
414
+ /**
415
+ * The position of the drawer (left or right)
416
+ */
417
+ this.position = 'right';
418
+ /**
419
+ * open the drawer on rendering
420
+ */
421
+ this.visible = false;
422
+ /**
423
+ * open the drawer on rendering
424
+ */
425
+ this.hasSkeleton = false;
426
+ /**
427
+ * Show loading in the middle
428
+ */
429
+ this.isLoading = false;
430
+ /**
431
+ * Show subtitle before the title or not, defaults to `false` (after the title)
432
+ */
433
+ this.subTitleFirst = false;
434
+ /**
435
+ * Avoid padding in the drawer body or not, defaults to `false`
436
+ */
437
+ this.noPadding = false;
438
+ /**
439
+ * Set drawer sub title.
440
+ */
441
+ this.subTitle = '';
442
+ /**
443
+ * Align drawer content to center, defaults to `false`
444
+ */
445
+ this.centered = false;
446
+ /**
447
+ * Set the style of the header icon.
448
+ */
449
+ this.iconStyle = undefined;
450
+ salla.event.on('drawer::open', target => target == this.host.id && this.open());
451
+ salla.event.on('drawer::close', target => target == this.host.id && this.close());
452
+ this.drawerTitle = this.host.getAttribute('drawer-title');
453
+ }
454
+ handleVisible(newValue) {
455
+ if (!newValue) {
456
+ this.drawerVisibilityChanged.emit(false);
457
+ this.toggleDrawer(false);
458
+ return;
459
+ }
460
+ this.drawerVisibilityChanged.emit(true);
461
+ this.host.classList.remove('s-hidden');
462
+ setTimeout(() => this.toggleDrawer(true)); //small amont of time to running toggle After adding hidden
463
+ }
464
+ handleKeyUp(ev) {
465
+ if (ev.key === "Escape") {
466
+ this.closeDrawer();
467
+ }
468
+ }
469
+ /**
470
+ * Open the drawer
471
+ */
472
+ async open() {
473
+ this.host.setAttribute('visible', '');
474
+ this.handleAutoFocus();
475
+ return this.host;
476
+ }
477
+ /**
478
+ * close the drawer
479
+ */
480
+ async close() {
481
+ this.host.removeAttribute('visible');
482
+ return this.host;
483
+ }
484
+ /**
485
+ * Change the Drawer Title
486
+ * @param {string} drawerTitle
487
+ */
488
+ async setTitle(drawerTitle) {
489
+ this.drawerTitle = drawerTitle;
490
+ return this.host;
491
+ }
492
+ /**
493
+ * Start loading
494
+ */
495
+ async loading() {
496
+ this.isLoading = true;
497
+ return this.host;
498
+ }
499
+ /**
500
+ * Stop the loading
501
+ */
502
+ async stopLoading() {
503
+ this.isLoading = false;
504
+ return this.host;
505
+ }
506
+ handleAutoFocus() {
507
+ const firstFocusableElement = this.host.querySelector('input, textarea, select');
508
+ if (!firstFocusableElement) {
509
+ return;
510
+ }
511
+ setTimeout(() => {
512
+ firstFocusableElement.focus();
513
+ }, 100);
514
+ }
515
+ toggleDrawer(isOpen) {
516
+ const body = this.host.querySelector('.s-drawer-body');
517
+ Helper.Helper.toggleElementClassIf(body, 's-drawer-entering', 's-drawer-leaving', () => isOpen)
518
+ .toggleElementClassIf(this.overlay, 's-drawer-entering', 's-drawer-overlay-leaving', () => isOpen)
519
+ .toggleElementClassIf(document.body, 'drawer-is-open', 'drawer-is-closed', () => isOpen);
520
+ if (!isOpen) {
521
+ setTimeout(() => this.host.classList.add('s-hidden'), 350);
522
+ }
523
+ }
524
+ closeDrawer(reason) {
525
+ if (!this.isClosable) {
526
+ return;
527
+ }
528
+ salla.event.dispatch('drawer::close', { reason });
529
+ this.host.removeAttribute('visible');
530
+ }
531
+ iconBlockClasses() {
532
+ return {
533
+ 's-drawer-icon': true,
534
+ 's-drawer-bg-error': this.iconStyle == 'error',
535
+ 's-drawer-bg-success': this.iconStyle == 'success',
536
+ 's-drawer-bg-normal': !this.iconStyle,
537
+ 's-drawer-bg-primary': this.iconStyle == 'primary'
538
+ };
539
+ }
540
+ getWidth() {
541
+ return this.isLoading ? (this.hasSkeleton ? 'md' : 'xs') : this.width;
542
+ }
543
+ render() {
544
+ this.host.id = this.host.id || 'salla-drawer';
545
+ if (this.isLoading) {
546
+ return (index.h(index.Host, { class: 'salla-drawer s-drawer s-drawer-container s-hidden', "aria-modal": "true", role: "dialog", onKeyUp: e => this.handleKeyUp(e) }, index.h("div", { class: "s-drawer-overlay s-drawer-overlay-leaving", ref: el => this.overlay = el, onClick: () => this.closeDrawer("backdropClick") }), index.h("div", { class: "s-drawer-wrapper s-drawer-wrapper-" + this.position }, index.h("div", { class: 's-drawer-body flex justify-center s-drawer-leaving s-drawer-' + this.position + ' s-drawer-' + this.getWidth() + (this.noPadding ? ' s-drawer-nopadding' : ' s-drawer-padding') }, index.h("slot", { name: "loading" }, index.h("salla-loading", null)), index.h("div", { class: "s-hidden" }, index.h("slot", null))))));
547
+ }
548
+ return (index.h(index.Host, { class: 'salla-drawer s-drawer s-drawer-container s-hidden', "aria-modal": "true", role: "dialog" }, index.h("div", { class: "s-drawer-overlay s-drawer-overlay-leaving", ref: el => this.overlay = el, onClick: () => this.closeDrawer("backdropClick") }), index.h("div", { class: "s-drawer-wrapper s-drawer-wrapper-" + this.position }, index.h("div", { class: 's-drawer-body s-drawer-leaving s-drawer-' + this.position + ' s-drawer-' + this.getWidth() + (this.noPadding ? ' s-drawer-nopadding' : ' s-drawer-padding') }, index.h("div", { class: { 's-drawer-header': true, 's-drawer-is-center': this.centered } }, this.isClosable ?
549
+ index.h("button", { class: "s-drawer-close", onClick: () => this.closeDrawer("closeButtonClick"), type: "button" }, index.h("span", { innerHTML: cancel.Cancel }))
550
+ : '', this.drawerTitle || this.subTitle ?
551
+ index.h("div", { class: "s-drawer-header-inner" }, index.h("slot", { name: 'icon' }, !!this.iconStyle ?
552
+ index.h("div", { class: this.iconBlockClasses(), innerHTML: this.iconStyle == 'error' ? AlertEngineIcon : checkCircle2.CheckCircle2 })
553
+ : ''), index.h("div", { class: "s-drawer-header-content" }, this.drawerTitle ? index.h("div", { class: { 's-drawer-title': true, 's-drawer-title-below': this.subTitleFirst }, innerHTML: this.drawerTitle }) : '', this.subTitle ? index.h("p", { class: { 's-drawer-sub-title': true }, innerHTML: this.subTitle }) : ''))
554
+ : ''), index.h("slot", null), index.h("slot", { name: "footer" })))));
555
+ }
556
+ //move the drawer as root dom, because we need the drawer to be outside the forms
557
+ componentDidLoad() {
558
+ document.body.append(this.host);
559
+ }
560
+ get host() { return index.getElement(this); }
561
+ static get watchers() { return {
562
+ "visible": ["handleVisible"]
563
+ }; }
564
+ };
565
+ SallaDrawer.style = sallaDrawerCss;
566
+
567
+ const sallaLoadingCss = ".s-loading{animation:spin 1s linear infinite;fill:var(--color-primary)}.s-loading-container{display:flex;justify-content:center;align-items:center}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
568
+
569
+ const SallaLoading = class {
570
+ constructor(hostRef) {
571
+ index.registerInstance(this, hostRef);
572
+ /**
573
+ * Sets the diameter of the circle in pixels, Defaults to `32`
574
+ */
575
+ this.size = 32;
576
+ /**
577
+ * Sets the stroke of the circle (border) in pixels, Defaults to `4`
578
+ */
579
+ this.width = 2;
580
+ /**
581
+ * Spinner content color.
582
+ */
583
+ this.color = undefined; // TODO: Should be replaced with primary color (variable)
584
+ /**
585
+ * Spinner background color.
586
+ */
587
+ this.bgColor = "#e5e7eb";
588
+ }
589
+ render() {
590
+ return (index.h(index.Host, { key: '2592e9504b03cb78f212d57e51c19075172fadd0', class: "s-loading-container" }, index.h("svg", { key: '4d495370551559a59423d5b672a3f1b4ed6bd7e3', "aria-hidden": "true", style: { width: `${this.size}px`, height: `${this.size}px`, fill: this.color, color: this.bgColor }, class: "s-loading", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'aedf2f6df87ac1dc82c32180cbf11dcf925a2267', d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" }), index.h("path", { key: 'db02a829fe6142c41f43f4c6d3d07695b1fa41f9', d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" }))));
591
+ }
592
+ };
593
+ SallaLoading.style = sallaLoadingCss;
594
+
595
+ const sallaModalCss = "@media screen and (max-width: 470px){.modal-is-open{position:fixed;width:100%}}";
596
+
597
+ const SallaModal = class {
598
+ constructor(hostRef) {
599
+ index.registerInstance(this, hostRef);
600
+ this.modalVisibilityChanged = index.createEvent(this, "modalVisibilityChanged");
601
+ /**
602
+ * Sets the modal to be closable. Defaults to `true`
603
+ */
604
+ this.isClosable = true; //todo::rename unclude. Suggestion => persistent
605
+ /**
606
+ * The size of the modal
607
+ */
608
+ this.width = 'md';
609
+ /**
610
+ * The position of the modal
611
+ */
612
+ this.position = 'middle';
613
+ /**
614
+ * open the modal on rendering
615
+ */
616
+ this.visible = false;
617
+ /**
618
+ * open the modal on rendering
619
+ */
620
+ this.hasSkeleton = false;
621
+ /**
622
+ * Show loading in the middle
623
+ */
624
+ this.isLoading = false;
625
+ /**
626
+ * Show subtitle before the title or not, defaults to `false` (after the title)
627
+ */
628
+ this.subTitleFirst = false; //todo:: choose better name
629
+ /**
630
+ * Avoid padding in the modal body or not, defaults to `false`
631
+ */
632
+ this.noPadding = false; //todo:: choose better name
633
+ /**
634
+ * Set modal sub title.
635
+ */
636
+ this.subTitle = '';
637
+ /**
638
+ * Align modal content to center, defaults to `false`
639
+ */
640
+ this.centered = false;
641
+ /**
642
+ * Set the style of the header icon.
643
+ */
644
+ this.iconStyle = undefined;
645
+ salla.event.on('modal::open', target => target == this.host.id && this.open());
646
+ salla.event.on('modal::close', target => target == this.host.id && this.close());
647
+ this.modalTitle = this.host.getAttribute('modal-title');
648
+ }
649
+ handleVisible(newValue) {
650
+ if (!newValue) {
651
+ this.modalVisibilityChanged.emit(false);
652
+ this.toggleModal(false);
653
+ return;
654
+ }
655
+ this.modalVisibilityChanged.emit(true);
656
+ this.host.classList.remove('s-hidden');
657
+ setTimeout(() => this.toggleModal(true)); //small amont of time to running toggle After adding hidden
658
+ }
659
+ handleKeyUp(ev) {
660
+ if (ev.key === "KeyUp") {
661
+ this.closeModal();
662
+ }
663
+ }
664
+ /**
665
+ * Open the modal
666
+ */
667
+ async open() {
668
+ this.host.setAttribute('visible', '');
669
+ this.handleAutoFocus();
670
+ return this.host;
671
+ }
672
+ /**
673
+ * close the modal
674
+ */
675
+ async close() {
676
+ this.host.removeAttribute('visible');
677
+ return this.host;
678
+ }
679
+ /**
680
+ * Change the Modal Title
681
+ * @param {string} modalTitle
682
+ */
683
+ async setTitle(modalTitle) {
684
+ this.modalTitle = modalTitle;
685
+ return this.host;
686
+ }
687
+ /**
688
+ * Start loading
689
+ */
690
+ async loading() {
691
+ this.isLoading = true;
692
+ return this.host;
693
+ }
694
+ /**
695
+ * Stop the loading
696
+ */
697
+ async stopLoading() {
698
+ this.isLoading = false;
699
+ return this.host;
700
+ }
701
+ handleAutoFocus() {
702
+ const firstFocusableElement = this.host.querySelector('input, textarea, select');
703
+ if (!firstFocusableElement) {
704
+ return;
705
+ }
706
+ setTimeout(() => {
707
+ firstFocusableElement.focus();
708
+ }, 100);
709
+ }
710
+ toggleModal(isOpen) {
711
+ const body = this.host.querySelector('.s-modal-body');
712
+ Helper.Helper.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)
713
+ .toggleElementClassIf(this.overlay, 's-modal-entering', 's-modal-overlay-leaving', () => isOpen)
714
+ .toggleElementClassIf(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);
715
+ if (!isOpen) {
716
+ setTimeout(() => this.host.classList.add('s-hidden'), 350);
717
+ }
718
+ }
719
+ closeModal(reason) {
720
+ if (!this.isClosable) {
721
+ return;
722
+ }
723
+ salla.event.dispatch('modal::close', { reason });
724
+ this.host.removeAttribute('visible');
725
+ }
726
+ iconBlockClasses() {
727
+ return {
728
+ 's-modal-icon': true,
729
+ 's-modal-bg-error': this.iconStyle == 'error',
730
+ 's-modal-bg-success': this.iconStyle == 'success',
731
+ 's-modal-bg-normal': !this.iconStyle,
732
+ 's-modal-bg-primary': this.iconStyle == 'primary'
733
+ };
734
+ }
735
+ getWidth() {
736
+ return this.isLoading ? (this.hasSkeleton ? 'md' : 'xs') : this.width;
737
+ }
738
+ //todo:: pref for each modal
739
+ render() {
740
+ this.host.id = this.host.id || 'salla-modal';
741
+ if (this.isLoading) {
742
+ return (index.h(index.Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog", onKeyUp: e => this.handleKeyUp(e) }, index.h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal("backdropClick") }), index.h("div", { class: "s-modal-wrapper" }, index.h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), index.h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, index.h("slot", { name: "loading" }, index.h("salla-loading", null)), index.h("div", { class: "s-hidden" }, index.h("slot", null))))));
743
+ }
744
+ return (index.h(index.Host, { class: 'salla-modal s-modal s-modal-container s-hidden', "aria-modal": "true", role: "dialog" }, index.h("div", { class: "s-modal-overlay", ref: el => this.overlay = el, onClick: () => this.closeModal("backdropClick") }), index.h("div", { class: "s-modal-wrapper" }, index.h("span", { class: 's-modal-spacer s-modal-align-' + this.position }, "\u200B"), index.h("div", { class: 's-modal-body ' + 's-modal-align-' + this.position + ' s-modal-' + this.getWidth() + (this.noPadding ? ' s-modal-nopadding' : ' s-modal-padding') }, index.h("div", { class: { 's-modal-header': true, 's-modal-is-center': this.centered } }, this.isClosable ?
745
+ index.h("button", { class: "s-modal-close", onClick: () => this.closeModal("closeButtonClick"), type: "button" }, index.h("span", { innerHTML: cancel.Cancel }))
746
+ : '', this.modalTitle || this.subTitle ?
747
+ index.h("div", { class: "s-modal-header-inner" }, index.h("slot", { name: 'icon' }, !!this.iconStyle ?
748
+ index.h("div", { class: this.iconBlockClasses(), innerHTML: this.iconStyle == 'error' ? AlertEngineIcon : checkCircle2.CheckCircle2 })
749
+ : ''), index.h("div", { class: "s-modal-header-content" }, this.modalTitle ? index.h("div", { class: { 's-modal-title': true, 's-modal-title-below': this.subTitleFirst }, innerHTML: this.modalTitle }) : '', this.subTitle ? index.h("p", { class: { 's-modal-sub-title': true }, innerHTML: this.subTitle }) : ''))
750
+ : ''), index.h("slot", null), index.h("slot", { name: "footer" })))));
751
+ }
752
+ //move the modal as root dom, because we need the model to be outside the forms
753
+ componentDidLoad() {
754
+ document.body.append(this.host);
755
+ }
756
+ get host() { return index.getElement(this); }
757
+ static get watchers() { return {
758
+ "visible": ["handleVisible"]
759
+ }; }
760
+ };
761
+ SallaModal.style = sallaModalCss;
762
+
763
+ exports.salla_accordion = SallaAccordion;
764
+ exports.salla_breadcrumb = SallaBreadcrumb;
765
+ exports.salla_button = SallaButton;
766
+ exports.salla_drawer = SallaDrawer;
767
+ exports.salla_loading = SallaLoading;
768
+ exports.salla_modal = SallaModal;