@salla.sa/twilight-components 2.14.540 → 2.14.541

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 (397) hide show
  1. package/dist/cjs/{filepond-U8F_iDbp.js → filepond-CNdvfaMJ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CAJAmCHU.js → filepond-plugin-file-poster-Di_D3w89.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-Dxgl8Gdz.js → filepond-plugin-file-validate-size-BiRa98qd.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-BPhw8zXs.js → filepond-plugin-file-validate-type-Bolv-kyJ.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DNKfSuCy.js → filepond-plugin-image-edit-AN6huMV9.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-NCmUtKOd.js → filepond-plugin-image-exif-orientation-Bwa8QtGo.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-jRCd9jSG.js → filepond-plugin-image-preview-CaVYLAvG.js} +1 -1
  8. package/dist/cjs/helpers-ClOJIAG8.js +89 -0
  9. package/dist/cjs/{index-F_FURF-0.js → index-DX2EKTCE.js} +18 -14
  10. package/dist/cjs/{intlTelInput-yt9noy9U.js → intlTelInput-DnwdGAiP.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 +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  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-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/{salla-booking-field_7.cjs.entry.js → salla-attachment-view_9.cjs.entry.js} +1003 -40
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +2 -2
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +14 -5
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +420 -84
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -5
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +4 -83
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +125 -0
  88. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/upload-limits-C3RarAPN.js +136 -0
  106. package/dist/cjs/{vanilla-picker-DXgSpklI.js → vanilla-picker-BUFYPi-_.js} +1 -1
  107. package/dist/collection/collection-manifest.json +16 -11
  108. package/dist/collection/components/salla-attachment-view/salla-attachment-view.css +164 -0
  109. package/dist/collection/components/salla-attachment-view/salla-attachment-view.js +250 -0
  110. package/dist/collection/components/salla-attachments/salla-attachments.css +69 -0
  111. package/dist/collection/components/salla-attachments/salla-attachments.js +375 -0
  112. package/dist/collection/components/salla-comments/salla-comment-item.js +13 -3
  113. package/dist/collection/components/salla-comments/salla-comments.css +7 -0
  114. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  115. package/dist/collection/components/salla-file-upload/salla-file-upload.css +149 -0
  116. package/dist/collection/components/salla-file-upload/salla-file-upload.js +784 -42
  117. package/dist/collection/components/salla-file-upload/upload-limits.js +127 -0
  118. package/dist/collection/components/salla-products-slider/salla-products-slider.js +1 -1
  119. package/dist/collection/components/salla-rating-modal/rating-modal-media.js +85 -0
  120. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +348 -85
  121. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +17 -7
  122. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +1 -3
  123. package/dist/collection/components/salla-review-factors-tags/helpers.js +8 -7
  124. package/dist/collection/components/salla-review-order-item/interfaces.js +1 -0
  125. package/dist/collection/components/salla-review-order-item/salla-review-order-item.js +154 -0
  126. package/dist/components/index.js +2 -2
  127. package/dist/components/salla-add-product-button2.js +40 -28
  128. package/dist/components/salla-attachment-view.d.ts +11 -0
  129. package/dist/components/salla-attachment-view.js +9 -0
  130. package/dist/components/salla-attachment-view2.js +323 -0
  131. package/dist/components/salla-attachments.d.ts +11 -0
  132. package/dist/components/salla-attachments.js +9 -0
  133. package/dist/components/salla-attachments2.js +232 -0
  134. package/dist/components/salla-basket-gap.js +46 -34
  135. package/dist/components/salla-breadcrumb.js +1 -1
  136. package/dist/components/salla-comment-factors2.js +1 -1
  137. package/dist/components/salla-comment-item2.js +26 -4
  138. package/dist/components/salla-comments.js +14 -2
  139. package/dist/components/salla-custom-fields.js +28 -4
  140. package/dist/components/salla-file-upload2.js +703 -31
  141. package/dist/components/salla-gifting.js +7 -1
  142. package/dist/components/salla-loyalty-exchange-product-card2.js +46 -34
  143. package/dist/components/salla-loyalty-panel.js +8 -2
  144. package/dist/components/salla-loyalty-program.js +8 -2
  145. package/dist/components/salla-multiple-bundle-product-cart2.js +40 -28
  146. package/dist/components/salla-multiple-bundle-product-details2.js +12 -6
  147. package/dist/components/salla-multiple-bundle-product-options-modal2.js +7 -1
  148. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  149. package/dist/components/salla-multiple-bundle-product.js +12 -6
  150. package/dist/components/salla-offer-modal.js +8 -2
  151. package/dist/components/salla-order-edit-item2.js +36 -24
  152. package/dist/components/salla-order-edit.js +42 -30
  153. package/dist/components/salla-order-options-modal2.js +34 -22
  154. package/dist/components/salla-product-card2.js +44 -32
  155. package/dist/components/salla-product-options2.js +32 -20
  156. package/dist/components/salla-products-slider2.js +8 -2
  157. package/dist/components/salla-quick-buy2.js +36 -24
  158. package/dist/components/salla-rating-modal-v22.js +449 -97
  159. package/dist/components/salla-rating-modal.js +30 -20
  160. package/dist/components/salla-review-factors-tags2.js +9 -8
  161. package/dist/components/salla-review-order-item.d.ts +11 -0
  162. package/dist/components/salla-review-order-item.js +196 -0
  163. package/dist/components/salla-reward-details2.js +8 -2
  164. package/dist/components/salla-slider2.js +1 -1
  165. package/dist/esm/{filepond-Bxzb6RRZ.js → filepond-CKsbRWmS.js} +1 -1
  166. package/dist/esm/{filepond-plugin-file-poster-CZfrjnEX.js → filepond-plugin-file-poster-B_gYCESq.js} +1 -1
  167. package/dist/esm/{filepond-plugin-file-validate-size-Dqa69lX7.js → filepond-plugin-file-validate-size-Bep6fNi3.js} +1 -1
  168. package/dist/esm/{filepond-plugin-file-validate-type-C_76nxDb.js → filepond-plugin-file-validate-type-r3uRmGIr.js} +1 -1
  169. package/dist/esm/{filepond-plugin-image-edit-BvzVMeMY.js → filepond-plugin-image-edit-BJcOlOFL.js} +1 -1
  170. package/dist/esm/{filepond-plugin-image-exif-orientation-Br4ANTi7.js → filepond-plugin-image-exif-orientation-DJoDaRwQ.js} +1 -1
  171. package/dist/esm/{filepond-plugin-image-preview-e54xZ08P.js → filepond-plugin-image-preview-BsuTLPS0.js} +1 -1
  172. package/dist/esm/helpers-DqXpn47Z.js +85 -0
  173. package/dist/esm/{index-5UtJVEzd.js → index-BVqCTDsV.js} +18 -14
  174. package/dist/esm/{intlTelInput-BQXch__5.js → intlTelInput-CD2FA0nI.js} +1 -1
  175. package/dist/esm/loader.js +3 -3
  176. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  177. package/dist/esm/salla-accordion_6.entry.js +1 -1
  178. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  179. package/dist/esm/salla-advertisement.entry.js +1 -1
  180. package/dist/esm/salla-alert_2.entry.js +1 -1
  181. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  182. package/dist/esm/salla-apps-icons.entry.js +1 -1
  183. package/dist/esm/{salla-booking-field_7.entry.js → salla-attachment-view_9.entry.js} +1002 -41
  184. package/dist/esm/salla-badge.entry.js +1 -1
  185. package/dist/esm/salla-basket-gap.entry.js +1 -1
  186. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  187. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  188. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  189. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  190. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  191. package/dist/esm/salla-comment-factors.entry.js +2 -2
  192. package/dist/esm/salla-comment-form_8.entry.js +14 -5
  193. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  194. package/dist/esm/salla-contacts.entry.js +1 -1
  195. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  196. package/dist/esm/salla-count-down.entry.js +1 -1
  197. package/dist/esm/salla-custom-fields.entry.js +1 -1
  198. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  199. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  200. package/dist/esm/salla-filters-widget.entry.js +1 -1
  201. package/dist/esm/salla-filters.entry.js +1 -1
  202. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  203. package/dist/esm/salla-gifting.entry.js +1 -1
  204. package/dist/esm/salla-hook.entry.js +1 -1
  205. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  206. package/dist/esm/salla-installment.entry.js +1 -1
  207. package/dist/esm/salla-list-tile.entry.js +1 -1
  208. package/dist/esm/salla-localization-modal.entry.js +1 -1
  209. package/dist/esm/salla-login-modal.entry.js +1 -1
  210. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  211. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  212. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  213. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  214. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  215. package/dist/esm/salla-loyalty.entry.js +1 -1
  216. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  217. package/dist/esm/salla-map_2.entry.js +1 -1
  218. package/dist/esm/salla-menu.entry.js +1 -1
  219. package/dist/esm/salla-metadata.entry.js +1 -1
  220. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  221. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  222. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  223. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  224. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  225. package/dist/esm/salla-offer-modal.entry.js +1 -1
  226. package/dist/esm/salla-offer.entry.js +1 -1
  227. package/dist/esm/salla-order-branch.entry.js +1 -1
  228. package/dist/esm/salla-order-cancel.entry.js +1 -1
  229. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  230. package/dist/esm/salla-order-details-options.entry.js +1 -1
  231. package/dist/esm/salla-order-details.entry.js +1 -1
  232. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  233. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  234. package/dist/esm/salla-order-edit.entry.js +1 -1
  235. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  236. package/dist/esm/salla-order-shipments.entry.js +1 -1
  237. package/dist/esm/salla-order-summary.entry.js +1 -1
  238. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  239. package/dist/esm/salla-orders.entry.js +1 -1
  240. package/dist/esm/salla-payments.entry.js +1 -1
  241. package/dist/esm/salla-placeholder.entry.js +1 -1
  242. package/dist/esm/salla-price-range.entry.js +1 -1
  243. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  244. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  245. package/dist/esm/salla-products-list.entry.js +1 -1
  246. package/dist/esm/salla-products-slider.entry.js +1 -1
  247. package/dist/esm/salla-quick-order.entry.js +1 -1
  248. package/dist/esm/salla-rating-modal-v2.entry.js +420 -84
  249. package/dist/esm/salla-rating-modal.entry.js +3 -5
  250. package/dist/esm/salla-review-factors-tags.entry.js +2 -81
  251. package/dist/esm/salla-review-order-item.entry.js +123 -0
  252. package/dist/esm/salla-scopes.entry.js +1 -1
  253. package/dist/esm/salla-search.entry.js +1 -1
  254. package/dist/esm/salla-skeleton.entry.js +1 -1
  255. package/dist/esm/salla-slider.entry.js +1 -1
  256. package/dist/esm/salla-social-share.entry.js +1 -1
  257. package/dist/esm/salla-social.entry.js +1 -1
  258. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  259. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  260. package/dist/esm/salla-tooltip.entry.js +1 -1
  261. package/dist/esm/salla-trust-badges.entry.js +1 -1
  262. package/dist/esm/salla-user-menu.entry.js +1 -1
  263. package/dist/esm/salla-user-profile.entry.js +1 -1
  264. package/dist/esm/salla-user-settings.entry.js +1 -1
  265. package/dist/esm/salla-verify.entry.js +1 -1
  266. package/dist/esm/salla-wallet.entry.js +1 -1
  267. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  268. package/dist/esm/twilight.js +3 -3
  269. package/dist/esm/upload-limits-DrXX8XG8.js +121 -0
  270. package/dist/esm/{vanilla-picker-lLULIehu.js → vanilla-picker-Ba_za9Iy.js} +1 -1
  271. package/dist/twilight/{p-1c66fdb3.entry.js → p-003499a8.entry.js} +1 -1
  272. package/dist/twilight/{p-0bc1c246.entry.js → p-0974f6c6.entry.js} +1 -1
  273. package/dist/twilight/{p-1578cbe5.entry.js → p-0a9093f1.entry.js} +1 -1
  274. package/dist/twilight/{p-ad54610c.entry.js → p-0ce2c41f.entry.js} +1 -1
  275. package/dist/twilight/{p-acd1a9d8.entry.js → p-0ea8365b.entry.js} +1 -1
  276. package/dist/twilight/p-1174e53e.entry.js +4 -0
  277. package/dist/twilight/{p-d8a69feb.entry.js → p-11ef8b82.entry.js} +1 -1
  278. package/dist/twilight/{p-5cbbf472.entry.js → p-13244c52.entry.js} +1 -1
  279. package/dist/twilight/{p-9af31040.entry.js → p-14689252.entry.js} +1 -1
  280. package/dist/twilight/{p-397acd73.entry.js → p-17940d8a.entry.js} +1 -1
  281. package/dist/twilight/{p-40a0baa7.entry.js → p-1974f6da.entry.js} +1 -1
  282. package/dist/twilight/{p-02e821a0.entry.js → p-1a191989.entry.js} +1 -1
  283. package/dist/twilight/{p-900ee42a.entry.js → p-1ec6e0fe.entry.js} +1 -1
  284. package/dist/twilight/{p-3af52c82.entry.js → p-1fcebaad.entry.js} +1 -1
  285. package/dist/twilight/{p-6c4cef7a.entry.js → p-2b0cf190.entry.js} +1 -1
  286. package/dist/twilight/{p-7e9d67f2.entry.js → p-333ea76b.entry.js} +1 -1
  287. package/dist/twilight/{p-d6b6f984.entry.js → p-337cc9f6.entry.js} +1 -1
  288. package/dist/twilight/{p-71731e63.entry.js → p-34d5c7bf.entry.js} +1 -1
  289. package/dist/twilight/{p-49c2e935.entry.js → p-36abc50f.entry.js} +1 -1
  290. package/dist/twilight/{p-e6007706.entry.js → p-37d9f762.entry.js} +1 -1
  291. package/dist/twilight/{p-891009e2.entry.js → p-3961522a.entry.js} +1 -1
  292. package/dist/twilight/{p-b5c90151.entry.js → p-39d9e02f.entry.js} +1 -1
  293. package/dist/twilight/{p-088c1ab3.entry.js → p-3a4bb8de.entry.js} +1 -1
  294. package/dist/twilight/{p-538a1642.entry.js → p-409f95a8.entry.js} +1 -1
  295. package/dist/twilight/{p-fb2c863d.entry.js → p-42952fac.entry.js} +1 -1
  296. package/dist/twilight/{p-913d4965.entry.js → p-436dfe93.entry.js} +1 -1
  297. package/dist/twilight/{p-ed9899c0.entry.js → p-50c90e0a.entry.js} +1 -1
  298. package/dist/twilight/{p-ce941081.entry.js → p-5115117b.entry.js} +1 -1
  299. package/dist/twilight/{p-693d012f.entry.js → p-56647774.entry.js} +1 -1
  300. package/dist/twilight/{p-18d7763b.entry.js → p-598cadf4.entry.js} +1 -1
  301. package/dist/twilight/{p-66313db6.entry.js → p-635265d1.entry.js} +1 -1
  302. package/dist/twilight/{p-95224232.entry.js → p-659e2280.entry.js} +1 -1
  303. package/dist/twilight/{p-6757a647.entry.js → p-6a3487de.entry.js} +1 -1
  304. package/dist/twilight/{p-582247b3.entry.js → p-6d07d195.entry.js} +1 -1
  305. package/dist/twilight/{p-8dab94d8.entry.js → p-6ee096e8.entry.js} +1 -1
  306. package/dist/twilight/{p-c138132c.entry.js → p-723aeda4.entry.js} +1 -1
  307. package/dist/twilight/{p-c8c36233.entry.js → p-743b79ae.entry.js} +1 -1
  308. package/dist/twilight/{p-5f1b8510.entry.js → p-75e692d1.entry.js} +1 -1
  309. package/dist/twilight/{p-0895958b.entry.js → p-79444897.entry.js} +1 -1
  310. package/dist/twilight/{p-4e2e4e92.entry.js → p-7b23dec7.entry.js} +1 -1
  311. package/dist/twilight/p-7bb24ad6.entry.js +4 -0
  312. package/dist/twilight/{p-4c34e1fd.entry.js → p-7d9288b0.entry.js} +1 -1
  313. package/dist/twilight/{p-0ecbe43b.entry.js → p-85f95a58.entry.js} +1 -1
  314. package/dist/twilight/{p-2a9a4e12.entry.js → p-86a1f616.entry.js} +1 -1
  315. package/dist/twilight/{p-1bc7ab28.entry.js → p-87115499.entry.js} +1 -1
  316. package/dist/twilight/{p-497cc3a6.entry.js → p-878c2be2.entry.js} +1 -1
  317. package/dist/twilight/{p-524aabd2.entry.js → p-89e9a91f.entry.js} +1 -1
  318. package/dist/twilight/{p-f3771ebc.entry.js → p-90ee37c7.entry.js} +1 -1
  319. package/dist/twilight/{p-e4cb5ee8.entry.js → p-96584590.entry.js} +1 -1
  320. package/dist/twilight/{p-3136d942.entry.js → p-96a57e9c.entry.js} +1 -1
  321. package/dist/twilight/{p-7a17138f.entry.js → p-978e4164.entry.js} +1 -1
  322. package/dist/twilight/{p-b9b32feb.entry.js → p-97fc57c1.entry.js} +1 -1
  323. package/dist/twilight/p-98b1ff35.entry.js +4 -0
  324. package/dist/twilight/{p-5a26fb06.entry.js → p-9d18525b.entry.js} +1 -1
  325. package/dist/twilight/p-B83s3cRn.js +9 -0
  326. package/dist/twilight/{p-5UtJVEzd.js → p-BVqCTDsV.js} +1 -1
  327. package/dist/twilight/{p-5njrWPq2.js → p-CP29f7RQ.js} +2 -2
  328. package/dist/twilight/{p-CXv4fDWa.js → p-CS-t4QAX.js} +1 -1
  329. package/dist/twilight/{p-1YJa6YaH.js → p-Cluq3aDa.js} +1 -1
  330. package/dist/twilight/{p-yEKxvrPt.js → p-D-zqM6k8.js} +1 -1
  331. package/dist/twilight/{p-Dke2dnYe.js → p-DJmqmO68.js} +1 -1
  332. package/dist/twilight/{p-CkJpLPBM.js → p-DgwK96eP.js} +1 -1
  333. package/dist/twilight/p-DqXpn47Z.js +4 -0
  334. package/dist/twilight/p-DrXX8XG8.js +4 -0
  335. package/dist/twilight/{p-Cf5WZwC9.js → p-DzW3U8TR.js} +1 -1
  336. package/dist/twilight/{p-Dso9PQdO.js → p-JKh0XFIn.js} +1 -1
  337. package/dist/twilight/{p-64ee420e.entry.js → p-a347e701.entry.js} +1 -1
  338. package/dist/twilight/{p-271a2d55.entry.js → p-a5d08af6.entry.js} +1 -1
  339. package/dist/twilight/{p-fbb156e8.entry.js → p-a774f6f0.entry.js} +7 -7
  340. package/dist/twilight/p-afaa0fbe.entry.js +4 -0
  341. package/dist/twilight/p-b389b1d3.entry.js +4 -0
  342. package/dist/twilight/{p-3b0032e4.entry.js → p-b6d5ae9b.entry.js} +1 -1
  343. package/dist/twilight/{p-2d62c356.entry.js → p-b862c670.entry.js} +1 -1
  344. package/dist/twilight/{p-4e71dacc.entry.js → p-bab59319.entry.js} +1 -1
  345. package/dist/twilight/{p-16c09de9.entry.js → p-bf4c2184.entry.js} +1 -1
  346. package/dist/twilight/{p-b9477568.entry.js → p-c19cf93c.entry.js} +1 -1
  347. package/dist/twilight/{p-b16c1eac.entry.js → p-c34f8c08.entry.js} +1 -1
  348. package/dist/twilight/{p-d4e1a8f7.entry.js → p-c47ecca7.entry.js} +1 -1
  349. package/dist/twilight/{p-46d2375b.entry.js → p-c48f5c6b.entry.js} +1 -1
  350. package/dist/twilight/{p-1c049149.entry.js → p-c53c2f59.entry.js} +1 -1
  351. package/dist/twilight/{p-f5747d3c.entry.js → p-cd805a38.entry.js} +1 -1
  352. package/dist/twilight/{p-ac9a54cc.entry.js → p-cdd8ed7f.entry.js} +1 -1
  353. package/dist/twilight/{p-02df1c31.entry.js → p-ced4b7ac.entry.js} +1 -1
  354. package/dist/twilight/{p-21e9a475.entry.js → p-cf3365e2.entry.js} +1 -1
  355. package/dist/twilight/p-d78998b7.entry.js +4 -0
  356. package/dist/twilight/{p-bb7bc52f.entry.js → p-daea3207.entry.js} +1 -1
  357. package/dist/twilight/{p-6e766b2a.entry.js → p-dff6d623.entry.js} +1 -1
  358. package/dist/twilight/p-e04221de.entry.js +4 -0
  359. package/dist/twilight/{p-66448f0f.entry.js → p-e2934193.entry.js} +1 -1
  360. package/dist/twilight/{p-a9e276fa.entry.js → p-e3dab961.entry.js} +1 -1
  361. package/dist/twilight/{p-73607393.entry.js → p-e41e5fc7.entry.js} +1 -1
  362. package/dist/twilight/{p-fe222cbe.entry.js → p-e4c9cef4.entry.js} +1 -1
  363. package/dist/twilight/{p-a5afb821.entry.js → p-eaf9d536.entry.js} +1 -1
  364. package/dist/twilight/{p-c05513ae.entry.js → p-ee2b16d7.entry.js} +1 -1
  365. package/dist/twilight/{p-c224fa3a.entry.js → p-ee3ddc23.entry.js} +1 -1
  366. package/dist/twilight/{p-963d34af.entry.js → p-f0a14b18.entry.js} +1 -1
  367. package/dist/twilight/{p-4cff8533.entry.js → p-f195a63d.entry.js} +1 -1
  368. package/dist/twilight/{p-200a9c11.entry.js → p-f2c688d6.entry.js} +1 -1
  369. package/dist/twilight/{p-b7f1bad9.entry.js → p-f4ac8cae.entry.js} +1 -1
  370. package/dist/twilight/{p-1ee008c3.entry.js → p-f58d14ed.entry.js} +1 -1
  371. package/dist/twilight/{p-d505caaf.entry.js → p-f82cee0c.entry.js} +1 -1
  372. package/dist/twilight/{p-b639f062.entry.js → p-fa17989b.entry.js} +1 -1
  373. package/dist/twilight/{p-575b3b4c.entry.js → p-fbc075fe.entry.js} +1 -1
  374. package/dist/twilight/{p-f27472f4.entry.js → p-fc5d5473.entry.js} +1 -1
  375. package/dist/twilight/twilight.esm.js +1 -1
  376. package/dist/types/components/salla-attachment-view/salla-attachment-view.d.ts +47 -0
  377. package/dist/types/components/salla-attachments/salla-attachments.d.ts +73 -0
  378. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  379. package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
  380. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +127 -4
  381. package/dist/types/components/salla-file-upload/upload-limits.d.ts +49 -0
  382. package/dist/types/components/salla-rating-modal/rating-modal-media.d.ts +38 -0
  383. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +30 -7
  384. package/dist/types/components/salla-review-factors-tags/helpers.d.ts +1 -1
  385. package/dist/types/components/salla-review-factors-tags/interfaces.d.ts +7 -0
  386. package/dist/types/components/salla-review-order-item/interfaces.d.ts +30 -0
  387. package/dist/types/components/salla-review-order-item/salla-review-order-item.d.ts +30 -0
  388. package/dist/types/components.d.ts +282 -7
  389. package/package.json +5 -5
  390. package/dist/twilight/p-3024f859.entry.js +0 -4
  391. package/dist/twilight/p-3b821dc9.entry.js +0 -4
  392. package/dist/twilight/p-4dabd999.entry.js +0 -4
  393. package/dist/twilight/p-WDLGvEaR.js +0 -9
  394. package/dist/twilight/p-aaa37ca1.entry.js +0 -4
  395. package/dist/twilight/p-dcf53c45.entry.js +0 -4
  396. package/dist/twilight/p-f17fa83f.entry.js +0 -4
  397. package/dist/components/{keyboard_arrow_right.js → keyboard_arrow_left.js} +6 -6
@@ -0,0 +1,164 @@
1
+ /*!twlt*/.s-attachment-view-modal-host .s-modal-header {
2
+ display: flex;
3
+ flex-direction: row;
4
+ align-items: center;
5
+ position: relative;
6
+ min-height: 2.75rem;
7
+ }
8
+ .s-attachment-view-modal-host .s-modal-close {
9
+ top: 50%;
10
+ transform: translateY(-50%);
11
+ }
12
+ .s-attachment-view-modal-host .s-modal-header-inner {
13
+ display: flex !important;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: 100%;
17
+ margin-bottom: 0;
18
+ text-align: start;
19
+ padding-inline: 2.75rem;
20
+ }
21
+ @media (min-width: 768px) {
22
+ .s-attachment-view-modal-host .s-modal-header-inner {
23
+ justify-content: flex-start;
24
+ padding: 0 1.5rem !important;
25
+ margin-top: 0.5rem;
26
+ }
27
+ }
28
+ .s-attachment-view-modal-host .s-modal-header-content,
29
+ .s-attachment-view-modal-host .s-modal-title {
30
+ text-align: center !important;
31
+ }
32
+ @media (min-width: 768px) {
33
+ .s-attachment-view-modal-host .s-modal-header-content,
34
+ .s-attachment-view-modal-host .s-modal-title {
35
+ text-align: start !important;
36
+ }
37
+ }
38
+ .s-attachment-view-modal-host .s-modal-title {
39
+ margin-bottom: 0;
40
+ }
41
+ @media (min-width: 768px) {
42
+ .s-attachment-view-modal-host .s-modal-title {
43
+ margin-bottom: 0.5rem;
44
+ }
45
+ }
46
+
47
+ .s-attachment-view-modal {
48
+ --s-attachment-view-thumb-size: 2.5rem;
49
+ --s-attachment-view-thumb-gap: 10px;
50
+ width: 100%;
51
+ padding: 0.75rem;
52
+ }
53
+ .s-attachment-view-modal .s-slider-block__title-nav button {
54
+ background: #fff;
55
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
56
+ }
57
+ .s-attachment-view-gallery {
58
+ width: 100%;
59
+ }
60
+ .s-attachment-view-thumbs {
61
+ display: flex;
62
+ gap: var(--s-attachment-view-thumb-gap);
63
+ margin-top: 0.75rem;
64
+ padding-bottom: 0.25rem;
65
+ overflow-x: auto;
66
+ overflow-y: hidden;
67
+ scrollbar-width: thin;
68
+ }
69
+ .s-attachment-view-thumb-btn {
70
+ flex: 0 0 auto;
71
+ padding: 0;
72
+ border: none;
73
+ background: transparent;
74
+ cursor: pointer;
75
+ border-radius: 0.25rem;
76
+ transition: opacity 0.2s ease;
77
+ }
78
+ .s-attachment-view-thumb-btn:not(.is-active) {
79
+ opacity: 0.75;
80
+ }
81
+ .s-attachment-view-thumb-btn:hover {
82
+ opacity: 1;
83
+ }
84
+ .s-attachment-view-thumb-btn.is-active .s-attachment-view-thumb {
85
+ box-shadow: 0 0 0 2px var(--color-primary, #004d5a);
86
+ }
87
+ .s-attachment-view-slider .s-slider-container .swiper-slide {
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ }
92
+ .s-attachment-view-slider .s-slider-container .s-attachment-view-slide {
93
+ display: flex;
94
+ align-items: center;
95
+ justify-content: center;
96
+ width: 100%;
97
+ }
98
+ .s-attachment-view-slider .s-slider-container img {
99
+ width: 100%;
100
+ max-width: 100%;
101
+ height: min(50vh, 320px);
102
+ object-fit: contain;
103
+ margin-inline: auto;
104
+ }
105
+ .s-attachment-view-slider video.s-attachment-view-video {
106
+ display: block;
107
+ width: 100%;
108
+ max-width: 100%;
109
+ height: min(50vh, 320px);
110
+ object-fit: contain;
111
+ margin-inline: auto;
112
+ background-color: #000;
113
+ }
114
+ .s-attachment-view-thumb {
115
+ width: var(--s-attachment-view-thumb-size);
116
+ height: var(--s-attachment-view-thumb-size);
117
+ overflow: hidden;
118
+ border-radius: 0.25rem;
119
+ }
120
+ .s-attachment-view-thumb img,
121
+ .s-attachment-view-thumb video {
122
+ display: block;
123
+ width: 100%;
124
+ height: 100%;
125
+ object-fit: cover;
126
+ }
127
+ .s-attachment-view-thumb.is-video {
128
+ position: relative;
129
+ }
130
+ .s-attachment-view-thumb-play {
131
+ position: absolute;
132
+ inset: 0;
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ background-color: rgba(0, 0, 0, 0.25);
137
+ pointer-events: none;
138
+ }
139
+ .s-attachment-view-thumb-play svg {
140
+ width: 0.875rem;
141
+ height: 0.875rem;
142
+ fill: #fff;
143
+ opacity: 0.95;
144
+ }
145
+ .block {
146
+ display: block;
147
+ }
148
+ .inline {
149
+ display: inline;
150
+ }
151
+ .s-scrollbar::-webkit-scrollbar {
152
+ width: 5px;
153
+ }
154
+ .s-scrollbar::-webkit-scrollbar-track {
155
+ background-color: #eee;
156
+ }
157
+ .s-scrollbar::-webkit-scrollbar-thumb {
158
+ background-color: var(--color-primary);
159
+ border-radius: 10px;
160
+ -webkit-border-radius: 10px;
161
+ -moz-border-radius: 10px;
162
+ -ms-border-radius: 10px;
163
+ -o-border-radius: 10px;
164
+ }
@@ -0,0 +1,250 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { Host, h } from "@stencil/core";
5
+ import { isVideoMimeType } from "../salla-file-upload/upload-limits";
6
+ import PlayIcon from "../../assets/svg/play-circle.svg";
7
+ /**
8
+ * A reusable lightbox for viewing image/video attachments in a modal with a
9
+ * scrollable thumbnails strip. Open it imperatively via the `open()` method.
10
+ *
11
+ * @example
12
+ * const viewer = document.querySelector('salla-attachment-view');
13
+ * viewer.attachments = [{ id: '1', url: '/a.jpg' }, { id: '2', url: '/b.mp4' }];
14
+ * viewer.open(0);
15
+ */
16
+ export class SallaAttachmentView {
17
+ constructor() {
18
+ /**
19
+ * Attachments to display. Accepts an array of `{ id, url, mimeType? }` or a
20
+ * JSON string of the same shape (for consumers outside of JSX/Stencil).
21
+ */
22
+ this.attachments = [];
23
+ this.isOpen = false;
24
+ this.activeIndex = 0;
25
+ this.handleKeyDown = (event) => {
26
+ if (!this.isOpen)
27
+ return;
28
+ if (event.key === 'Escape') {
29
+ event.preventDefault();
30
+ this.close();
31
+ return;
32
+ }
33
+ const items = this.getAttachments();
34
+ if (items.length <= 1)
35
+ return;
36
+ const isRtl = document.documentElement.dir === 'rtl';
37
+ const goPrevious = () => this.goToSlide(this.activeIndex - 1);
38
+ const goNext = () => this.goToSlide(this.activeIndex + 1);
39
+ if (event.key === 'ArrowLeft') {
40
+ event.preventDefault();
41
+ (isRtl ? goNext : goPrevious)();
42
+ return;
43
+ }
44
+ if (event.key === 'ArrowRight') {
45
+ event.preventDefault();
46
+ (isRtl ? goPrevious : goNext)();
47
+ }
48
+ };
49
+ this.handleModalVisibilityChanged = (open) => {
50
+ this.isOpen = open;
51
+ if (open) {
52
+ window.addEventListener('keydown', this.handleKeyDown);
53
+ this.scrollActiveThumbIntoView();
54
+ return;
55
+ }
56
+ window.removeEventListener('keydown', this.handleKeyDown);
57
+ this.pauseVideos();
58
+ };
59
+ this.handleSlideChange = (event) => {
60
+ const swiper = event.detail;
61
+ if (swiper?.activeIndex == null) {
62
+ return;
63
+ }
64
+ this.activeIndex = swiper.activeIndex;
65
+ this.pauseVideos();
66
+ this.scrollActiveThumbIntoView();
67
+ };
68
+ }
69
+ componentWillLoad() {
70
+ Salla.lang.onLoaded(() => {
71
+ Salla.lang.addBulk({
72
+ 'blocks.comments.customer_feedback': { ar: 'مراجعة العميل', en: 'Customer feedback' },
73
+ });
74
+ });
75
+ }
76
+ /**
77
+ * Open the viewer at the given attachment index.
78
+ * @param index - Index of the attachment to show first (defaults to 0).
79
+ */
80
+ async open(index = 0) {
81
+ const items = this.getAttachments();
82
+ if (!items.length)
83
+ return;
84
+ this.activeIndex = Math.min(Math.max(index, 0), items.length - 1);
85
+ this.isOpen = true;
86
+ await this.modal?.open();
87
+ this.scrollActiveThumbIntoView();
88
+ }
89
+ /** Close the viewer. */
90
+ async close() {
91
+ this.modal?.close();
92
+ }
93
+ disconnectedCallback() {
94
+ window.removeEventListener('keydown', this.handleKeyDown);
95
+ }
96
+ getAttachments() {
97
+ if (typeof this.attachments !== 'string') {
98
+ return Array.isArray(this.attachments) ? this.attachments : [];
99
+ }
100
+ try {
101
+ const parsed = JSON.parse(this.attachments);
102
+ return Array.isArray(parsed) ? parsed : [];
103
+ }
104
+ catch {
105
+ return [];
106
+ }
107
+ }
108
+ isVideo(file) {
109
+ return isVideoMimeType(file.mimeType, file.url);
110
+ }
111
+ pauseVideos() {
112
+ this.host.querySelectorAll('video.s-attachment-view-video').forEach(element => {
113
+ const video = element;
114
+ video.pause();
115
+ video.currentTime = 0;
116
+ });
117
+ }
118
+ goToSlide(index) {
119
+ const items = this.getAttachments();
120
+ const nextIndex = Math.min(Math.max(index, 0), items.length - 1);
121
+ if (nextIndex === this.activeIndex) {
122
+ return;
123
+ }
124
+ this.activeIndex = nextIndex;
125
+ this.sliderEl?.slideTo(nextIndex);
126
+ this.pauseVideos();
127
+ this.scrollActiveThumbIntoView();
128
+ }
129
+ scrollActiveThumbIntoView() {
130
+ requestAnimationFrame(() => {
131
+ const activeThumb = this.thumbsScroller?.querySelector('.is-active');
132
+ activeThumb?.scrollIntoView({ inline: 'nearest', block: 'nearest', behavior: 'smooth' });
133
+ });
134
+ }
135
+ renderSlide(file) {
136
+ if (this.isVideo(file)) {
137
+ return (h("video", { class: "s-attachment-view-video", src: file.url, controls: true, playsInline: true, preload: "metadata" }));
138
+ }
139
+ return h("img", { src: file.url, alt: "" });
140
+ }
141
+ renderThumb(file) {
142
+ if (this.isVideo(file)) {
143
+ return (h("div", { class: "s-attachment-view-thumb is-video" }, h("video", { src: file.url, muted: true, playsInline: true, preload: "metadata" }), h("span", { class: "s-attachment-view-thumb-play", innerHTML: PlayIcon })));
144
+ }
145
+ return (h("div", { class: "s-attachment-view-thumb" }, h("img", { src: file.url, alt: "" })));
146
+ }
147
+ render() {
148
+ const items = this.getAttachments();
149
+ if (!items.length)
150
+ return null;
151
+ const itemsKey = items.map(file => file.id).join('-');
152
+ return (h(Host, null, h("salla-modal", { ref: el => (this.modal = el), class: "s-attachment-view-modal-host", width: "md", noPadding: true, onModalVisibilityChanged: event => this.handleModalVisibilityChanged(!!event.detail) }, h("div", { class: "s-attachment-view-modal" }, this.isOpen && (h("div", { class: "s-attachment-view-gallery" }, h("salla-slider", { ref: el => (this.sliderEl = el), class: "s-attachment-view-slider", key: `attachment-${itemsKey}`, id: `${this.host.id || 'attachment-view'}-preview`, autoHeight: true, showControls: items.length > 1, sliderConfig: JSON.stringify({ initialSlide: this.activeIndex }), onSlideChange: event => this.handleSlideChange(event) }, h("div", { slot: "items" }, items.map(file => (h("div", { class: "s-attachment-view-slide", key: file.id }, this.renderSlide(file)))))), items.length > 1 && (h("div", { class: "s-attachment-view-thumbs s-scrollbar", ref: el => (this.thumbsScroller = el) }, items.map((file, index) => (h("button", { type: "button", class: {
153
+ 's-attachment-view-thumb-btn': true,
154
+ 'is-active': this.activeIndex === index,
155
+ }, key: file.id, "aria-label": `${index + 1}`, "aria-current": this.activeIndex === index ? 'true' : undefined, onClick: () => this.goToSlide(index) }, this.renderThumb(file))))))))))));
156
+ }
157
+ static get is() { return "salla-attachment-view"; }
158
+ static get originalStyleUrls() {
159
+ return {
160
+ "$": ["salla-attachment-view.scss"]
161
+ };
162
+ }
163
+ static get styleUrls() {
164
+ return {
165
+ "$": ["salla-attachment-view.css"]
166
+ };
167
+ }
168
+ static get properties() {
169
+ return {
170
+ "attachments": {
171
+ "type": "string",
172
+ "attribute": "attachments",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "Attachment[] | string",
176
+ "resolved": "Attachment[] | string",
177
+ "references": {
178
+ "Attachment": {
179
+ "location": "local",
180
+ "path": "/home/runner/_work/twilight/twilight/packages/twilight-components/src/components/salla-attachment-view/salla-attachment-view.tsx",
181
+ "id": "src/components/salla-attachment-view/salla-attachment-view.tsx::Attachment"
182
+ }
183
+ }
184
+ },
185
+ "required": false,
186
+ "optional": false,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": "Attachments to display. Accepts an array of `{ id, url, mimeType? }` or a\nJSON string of the same shape (for consumers outside of JSX/Stencil)."
190
+ },
191
+ "getter": false,
192
+ "setter": false,
193
+ "reflect": false,
194
+ "defaultValue": "[]"
195
+ }
196
+ };
197
+ }
198
+ static get states() {
199
+ return {
200
+ "isOpen": {},
201
+ "activeIndex": {}
202
+ };
203
+ }
204
+ static get methods() {
205
+ return {
206
+ "open": {
207
+ "complexType": {
208
+ "signature": "(index?: number) => Promise<void>",
209
+ "parameters": [{
210
+ "name": "index",
211
+ "type": "number",
212
+ "docs": "- Index of the attachment to show first (defaults to 0)."
213
+ }],
214
+ "references": {
215
+ "Promise": {
216
+ "location": "global",
217
+ "id": "global::Promise"
218
+ }
219
+ },
220
+ "return": "Promise<void>"
221
+ },
222
+ "docs": {
223
+ "text": "Open the viewer at the given attachment index.",
224
+ "tags": [{
225
+ "name": "param",
226
+ "text": "index - Index of the attachment to show first (defaults to 0)."
227
+ }]
228
+ }
229
+ },
230
+ "close": {
231
+ "complexType": {
232
+ "signature": "() => Promise<void>",
233
+ "parameters": [],
234
+ "references": {
235
+ "Promise": {
236
+ "location": "global",
237
+ "id": "global::Promise"
238
+ }
239
+ },
240
+ "return": "Promise<void>"
241
+ },
242
+ "docs": {
243
+ "text": "Close the viewer.",
244
+ "tags": []
245
+ }
246
+ }
247
+ };
248
+ }
249
+ static get elementRef() { return "host"; }
250
+ }
@@ -0,0 +1,69 @@
1
+ /*!twlt*/:host {
2
+ display: block;
3
+ }
4
+
5
+ .s-attachments {
6
+ display: flex;
7
+ max-width: 100%;
8
+ overflow-x: auto;
9
+ flex-wrap: nowrap;
10
+ gap: 0.5rem;
11
+ }
12
+
13
+ .s-attachments-image-thumb,
14
+ .s-attachments-video-thumb {
15
+ position: relative;
16
+ width: 65px;
17
+ height: 65px;
18
+ flex-shrink: 0;
19
+ border-radius: 0.375rem;
20
+ overflow: hidden;
21
+ }
22
+
23
+ .s-attachments.is-clickable .s-attachments-image-thumb,
24
+ .s-attachments.is-clickable .s-attachments-video-thumb {
25
+ cursor: pointer;
26
+ }
27
+
28
+ .s-attachments-image-thumb img,
29
+ .s-attachments-video-thumb video {
30
+ display: block;
31
+ width: 100%;
32
+ height: 100%;
33
+ object-fit: cover;
34
+ }
35
+
36
+ .s-attachments-more-overlay {
37
+ position: absolute;
38
+ inset: 0;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ background-color: rgba(0, 0, 0, 0.55);
43
+ color: #fff;
44
+ font-size: 1rem;
45
+ font-weight: 700;
46
+ pointer-events: none;
47
+ }
48
+
49
+ .s-attachments-video-thumb-play {
50
+ position: absolute;
51
+ inset: 0;
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ background-color: rgba(0, 0, 0, 0.25);
56
+ pointer-events: none;
57
+ }
58
+ .s-attachments-video-thumb-play svg {
59
+ width: 1.5rem;
60
+ height: 1.5rem;
61
+ fill: #fff;
62
+ opacity: 0.95;
63
+ }
64
+ .visible {
65
+ visibility: visible;
66
+ }
67
+ .filter {
68
+ 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);
69
+ }