@salla.sa/twilight-components 3.0.23 → 3.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Helper-D7ZKv2vD.js → Helper-sq6ztayx.js} +1 -1
- package/dist/cjs/{filepond-CgF0UCyN.js → filepond-BMxlEH8M.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-De2yzkk2.js → filepond-plugin-file-poster-DVSz4StJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-TEJXuY0m.js → filepond-plugin-file-validate-size-CXJiLSzt.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CB3OKB9j.js → filepond-plugin-file-validate-type-DWK85msl.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-gQ02gAQb.js → filepond-plugin-image-edit-BHttJI5X.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-B-gcb-0a.js → filepond-plugin-image-exif-orientation-DTKIO2zE.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-D6yQ6Ge9.js → filepond-plugin-image-preview-BaRxwhFa.js} +1 -1
- package/dist/cjs/{index-HxqdY5S_.js → index-BJ3-fFSF.js} +6 -6
- package/dist/cjs/{intlTelInput-BdzLlitA.js → intlTelInput-DNoOb73M.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +89 -7
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +2 -2
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-mobile-update-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-items.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-payment.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-rewards.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +2 -2
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +2 -2
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +2 -2
- package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +2 -2
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-thank-you-header.cjs.entry.js +1 -1
- package/dist/cjs/salla-thank-you-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-CwkSfjkN.js → vanilla-picker-CceY3g8c.js} +1 -1
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +44 -6
- package/dist/collection/shared/coupons-request.js +47 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cart-coupons.js +88 -6
- package/dist/docs.json +1 -1
- package/dist/esm/{Helper-D0RzyeI1.js → Helper-BwzPfwZJ.js} +1 -1
- package/dist/esm/{filepond-CLk9FTOP.js → filepond-JNV-1zqR.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B4S2eO6Q.js → filepond-plugin-file-poster-nFqNHCag.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DVKiwMoA.js → filepond-plugin-file-validate-size-P3KmOTH8.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Be_jLxLc.js → filepond-plugin-file-validate-type-BV0Ctr7U.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-D82X0TVT.js → filepond-plugin-image-edit-D62rKlfH.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation--N2kKQ_T.js → filepond-plugin-image-exif-orientation-DerapxIk.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CrMEZ16K.js → filepond-plugin-image-preview-BlRd2Ble.js} +1 -1
- package/dist/esm/{index-Dlr254cS.js → index-CtoXzf1y.js} +6 -6
- package/dist/esm/{intlTelInput-E_2akM-H.js → intlTelInput-BZz-u5_w.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +2 -2
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +2 -2
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +11 -11
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +89 -7
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +2 -2
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-free-shipping-banner.entry.js +1 -1
- package/dist/esm/salla-free-shipping-tag.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-mobile-update-modal.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +2 -2
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-items.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-payment.entry.js +1 -1
- package/dist/esm/salla-order-rewards.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +2 -2
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +2 -2
- package/dist/esm/salla-products-slider.entry.js +2 -2
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +2 -2
- package/dist/esm/salla-rating-modal.entry.js +2 -2
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +2 -2
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-thank-you-header.entry.js +1 -1
- package/dist/esm/salla-thank-you-page.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-C2sRN_ke.js → vanilla-picker-BfmpXY4G.js} +1 -1
- package/dist/twilight/{p-e9d32f2b.entry.js → p-00a1ec4e.entry.js} +1 -1
- package/dist/twilight/{p-44826102.entry.js → p-02ddd64c.entry.js} +1 -1
- package/dist/twilight/{p-6f4a5f08.entry.js → p-034b80ad.entry.js} +1 -1
- package/dist/twilight/{p-6cc7155b.entry.js → p-055bf228.entry.js} +1 -1
- package/dist/twilight/{p-886fec5f.entry.js → p-061216d4.entry.js} +1 -1
- package/dist/twilight/{p-232e01e7.entry.js → p-0b583810.entry.js} +1 -1
- package/dist/twilight/p-0cb60522.entry.js +4 -0
- package/dist/twilight/{p-08b48300.entry.js → p-0ce0cdb0.entry.js} +1 -1
- package/dist/twilight/{p-f4137bdf.entry.js → p-0d1b8490.entry.js} +1 -1
- package/dist/twilight/{p-f3507d9c.entry.js → p-0fb390fb.entry.js} +1 -1
- package/dist/twilight/{p-6ac44557.entry.js → p-117e714b.entry.js} +1 -1
- package/dist/twilight/{p-d356a745.entry.js → p-118aa92e.entry.js} +1 -1
- package/dist/twilight/{p-1a7e2b8b.entry.js → p-17be7967.entry.js} +1 -1
- package/dist/twilight/{p-d3c84d52.entry.js → p-1af75625.entry.js} +1 -1
- package/dist/twilight/{p-7a1ff06b.entry.js → p-1b4c3b85.entry.js} +1 -1
- package/dist/twilight/{p-45250f93.entry.js → p-1d105a57.entry.js} +1 -1
- package/dist/twilight/{p-7f297fe9.entry.js → p-1f39ca4f.entry.js} +1 -1
- package/dist/twilight/{p-0f3ce271.entry.js → p-213368ef.entry.js} +1 -1
- package/dist/twilight/{p-49c353c9.entry.js → p-2140be84.entry.js} +1 -1
- package/dist/twilight/{p-f55fa716.entry.js → p-2401f0d7.entry.js} +1 -1
- package/dist/twilight/{p-d9c049a6.entry.js → p-2566f688.entry.js} +1 -1
- package/dist/twilight/{p-ec044c15.entry.js → p-2882d626.entry.js} +1 -1
- package/dist/twilight/{p-cfcc7537.entry.js → p-2afc4658.entry.js} +1 -1
- package/dist/twilight/{p-42556e74.entry.js → p-2c04bba3.entry.js} +1 -1
- package/dist/twilight/{p-80fd5011.entry.js → p-2e1dd9cf.entry.js} +1 -1
- package/dist/twilight/{p-4a874f3c.entry.js → p-3356638d.entry.js} +1 -1
- package/dist/twilight/{p-50ebbec7.entry.js → p-36167cbe.entry.js} +1 -1
- package/dist/twilight/{p-85e251dc.entry.js → p-365ff361.entry.js} +1 -1
- package/dist/twilight/{p-dcb37ec6.entry.js → p-36a7344c.entry.js} +1 -1
- package/dist/twilight/{p-e2af5853.entry.js → p-374d9f0c.entry.js} +1 -1
- package/dist/twilight/{p-7f5e1513.entry.js → p-3845e427.entry.js} +1 -1
- package/dist/twilight/{p-27cf397c.entry.js → p-38b70281.entry.js} +1 -1
- package/dist/twilight/p-3d3eda0f.entry.js +4 -0
- package/dist/twilight/{p-f643db36.entry.js → p-3da2e3f3.entry.js} +1 -1
- package/dist/twilight/{p-c3d025f6.entry.js → p-3e285056.entry.js} +1 -1
- package/dist/twilight/{p-884e112e.entry.js → p-4008e164.entry.js} +1 -1
- package/dist/twilight/{p-d36dc785.entry.js → p-4080fdc9.entry.js} +1 -1
- package/dist/twilight/{p-a56a1415.entry.js → p-40e651ac.entry.js} +1 -1
- package/dist/twilight/{p-9cbb4591.entry.js → p-4254e9c2.entry.js} +1 -1
- package/dist/twilight/{p-2bdae257.entry.js → p-4adaee32.entry.js} +1 -1
- package/dist/twilight/{p-062063b2.entry.js → p-4c5a7ffc.entry.js} +1 -1
- package/dist/twilight/{p-dfecf2f7.entry.js → p-4f4933f8.entry.js} +1 -1
- package/dist/twilight/{p-e9a506e6.entry.js → p-5bc2190a.entry.js} +1 -1
- package/dist/twilight/{p-f50a3d12.entry.js → p-5dea6c09.entry.js} +1 -1
- package/dist/twilight/{p-7f1b77dd.entry.js → p-60ae422e.entry.js} +1 -1
- package/dist/twilight/{p-99b50412.entry.js → p-6495383e.entry.js} +1 -1
- package/dist/twilight/{p-Dpj_5kRc.js → p-6KZIgnh6.js} +1 -1
- package/dist/twilight/{p-64cefedc.entry.js → p-6ffbf505.entry.js} +1 -1
- package/dist/twilight/{p-beebd25b.entry.js → p-7169ba9a.entry.js} +1 -1
- package/dist/twilight/{p-7548d271.entry.js → p-71b5546b.entry.js} +1 -1
- package/dist/twilight/{p-5ee8e1d9.entry.js → p-72b0724c.entry.js} +1 -1
- package/dist/twilight/{p-30f684ca.entry.js → p-7303ebd1.entry.js} +1 -1
- package/dist/twilight/p-77deaa00.entry.js +4 -0
- package/dist/twilight/{p-CrWhtWBj.js → p-78r0jdyY.js} +1 -1
- package/dist/twilight/{p-965cd6db.entry.js → p-79b743eb.entry.js} +1 -1
- package/dist/twilight/{p-3420bcd9.entry.js → p-7a8fde62.entry.js} +1 -1
- package/dist/twilight/{p-affd80ef.entry.js → p-7c684782.entry.js} +1 -1
- package/dist/twilight/{p-cf3d4b03.entry.js → p-8413d52b.entry.js} +1 -1
- package/dist/twilight/p-8b9c44c8.entry.js +4 -0
- package/dist/twilight/{p-a2509beb.entry.js → p-8cbf3bc2.entry.js} +1 -1
- package/dist/twilight/{p-5fd4d2a8.entry.js → p-8ea3a265.entry.js} +1 -1
- package/dist/twilight/{p-5778ec88.entry.js → p-8fd6ed52.entry.js} +1 -1
- package/dist/twilight/{p-7c2c9437.entry.js → p-8fe950e8.entry.js} +1 -1
- package/dist/twilight/{p-057f7c41.entry.js → p-919650b7.entry.js} +1 -1
- package/dist/twilight/{p-9f99720f.entry.js → p-94d5b080.entry.js} +1 -1
- package/dist/twilight/{p-cc80fe0a.entry.js → p-95e7c2e1.entry.js} +1 -1
- package/dist/twilight/{p-b7f5bf7f.entry.js → p-97065b4f.entry.js} +1 -1
- package/dist/twilight/{p-d1ddef43.entry.js → p-974c100d.entry.js} +1 -1
- package/dist/twilight/{p-d34de754.entry.js → p-9c1b0978.entry.js} +1 -1
- package/dist/twilight/{p-abe8eb3e.entry.js → p-9e50f29c.entry.js} +1 -1
- package/dist/twilight/{p-gn30Eq58.js → p-BeC8AhMn.js} +1 -1
- package/dist/twilight/{p-xUW2rh4u.js → p-BwUX8dew.js} +1 -1
- package/dist/twilight/{p-BwHQ1q5j.js → p-CC-KFXD9.js} +1 -1
- package/dist/twilight/{p-Dlr254cS.js → p-CtoXzf1y.js} +1 -1
- package/dist/twilight/{p-NCszeo4N.js → p-D5DrmlyQ.js} +1 -1
- package/dist/twilight/{p-Dyk5c-z9.js → p-DT73iyFr.js} +1 -1
- package/dist/twilight/{p-BfIR6xlw.js → p-DYAn-F48.js} +2 -2
- package/dist/twilight/{p-D-sz1Kxb.js → p-F1Erq7GR.js} +1 -1
- package/dist/twilight/{p-8174d52f.entry.js → p-a236dd3b.entry.js} +1 -1
- package/dist/twilight/{p-ba40d16a.entry.js → p-a260f35e.entry.js} +1 -1
- package/dist/twilight/{p-d169c4cc.entry.js → p-a4fee391.entry.js} +1 -1
- package/dist/twilight/{p-b3673a47.entry.js → p-a8102290.entry.js} +1 -1
- package/dist/twilight/{p-11174a7f.entry.js → p-a9ae6ab9.entry.js} +1 -1
- package/dist/twilight/{p-29579fd5.entry.js → p-aac9d2fe.entry.js} +1 -1
- package/dist/twilight/{p-b57f4dd9.entry.js → p-aca2717e.entry.js} +1 -1
- package/dist/twilight/{p-f16b4066.entry.js → p-ae1efde9.entry.js} +1 -1
- package/dist/twilight/{p-58653a8d.entry.js → p-b1bc70af.entry.js} +1 -1
- package/dist/twilight/{p-bc8d3957.entry.js → p-b2cbdaa0.entry.js} +1 -1
- package/dist/twilight/{p-53edf4ac.entry.js → p-b3472096.entry.js} +1 -1
- package/dist/twilight/{p-57010429.entry.js → p-b3c9ab0e.entry.js} +1 -1
- package/dist/twilight/{p-738d448e.entry.js → p-c18fe9e5.entry.js} +1 -1
- package/dist/twilight/{p-b9effddb.entry.js → p-c1ab1b40.entry.js} +1 -1
- package/dist/twilight/{p-ed419d9f.entry.js → p-c4264e87.entry.js} +1 -1
- package/dist/twilight/{p-0e81f2c8.entry.js → p-cbff6c68.entry.js} +1 -1
- package/dist/twilight/{p-92782ec3.entry.js → p-cd55369c.entry.js} +1 -1
- package/dist/twilight/{p-c724e583.entry.js → p-d6a3b2d8.entry.js} +1 -1
- package/dist/twilight/{p-805e7435.entry.js → p-d76b7564.entry.js} +1 -1
- package/dist/twilight/{p-e28d6181.entry.js → p-dc2be7b8.entry.js} +1 -1
- package/dist/twilight/{p-94293309.entry.js → p-e2cb5c49.entry.js} +1 -1
- package/dist/twilight/{p-4f336fb5.entry.js → p-e5dc1d27.entry.js} +1 -1
- package/dist/twilight/{p-787a4a1c.entry.js → p-e8198efc.entry.js} +1 -1
- package/dist/twilight/{p-3b465776.entry.js → p-e89daada.entry.js} +1 -1
- package/dist/twilight/{p-47e90d17.entry.js → p-e8ebb2fe.entry.js} +1 -1
- package/dist/twilight/{p-479b64ef.entry.js → p-ebe45961.entry.js} +1 -1
- package/dist/twilight/{p-c7364f66.entry.js → p-ebed682b.entry.js} +1 -1
- package/dist/twilight/{p-c7d32612.entry.js → p-ed37e702.entry.js} +1 -1
- package/dist/twilight/{p-88581a27.entry.js → p-f310b923.entry.js} +1 -1
- package/dist/twilight/{p-449a8200.entry.js → p-f3455825.entry.js} +1 -1
- package/dist/twilight/{p-12845768.entry.js → p-f51f31df.entry.js} +1 -1
- package/dist/twilight/{p-df77bb1c.entry.js → p-f664fa69.entry.js} +1 -1
- package/dist/twilight/{p-3c0ae33e.entry.js → p-f67d03fb.entry.js} +1 -1
- package/dist/twilight/{p-4dd12d0a.entry.js → p-f738f492.entry.js} +1 -1
- package/dist/twilight/{p-3f95569b.entry.js → p-fbce8a18.entry.js} +1 -1
- package/dist/twilight/{p-4aJjS7cx.js → p-x4_Sxqd_.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +11 -0
- package/dist/types/shared/coupons-request.d.ts +3 -0
- package/package.json +5 -5
- package/dist/twilight/p-3dc7dfdb.entry.js +0 -4
- package/dist/twilight/p-9393c067.entry.js +0 -4
- package/dist/twilight/p-e50f9afa.entry.js +0 -4
- package/dist/twilight/p-f106168e.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as r,H as a,a as e}from"./p-Dlr254cS.js";import{S as o}from"./p-D4oPi1Ov.js";import{C as c}from"./p-gFG8By9O.js";const i=class{constructor(r){t(this,r),this.hideAddBtn=!1,this.showDonationAmount=!1,this.remained="",this.outOfStock="",this.donationAmount="",this.startingPrice="",this.addToCart="",this.placeholder="",this.COMPACT_TITLE_MAX_LENGTH=90}parseProductData(t){if(t)try{return"object"==typeof t?t:JSON.parse(t)}catch(t){return void salla.log("Bad json passed via product prop")}}handleProductChange(t){this.productData=this.parseProductData(t)}async componentWillLoad(){this.productData=this.parseProductData(this.product),await Promise.all([salla.onReady(),salla.lang.onLoaded()]),this.placeholder=salla.url.asset(salla.config.get("theme.settings.placeholder")),this.remained=salla.lang.get("pages.products.remained"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.startingPrice=salla.lang.get("pages.products.starting_price"),this.addToCart=salla.lang.get("pages.cart.add_to_cart"),this.outOfStock=salla.lang.get("pages.products.out_of_stock")}getDisplayTitle(){const t=this.productData?.name||"";return t.length<=this.COMPACT_TITLE_MAX_LENGTH?t:t.slice(0,this.COMPACT_TITLE_MAX_LENGTH).trimEnd()+"…"}getProductBadge(){return!this.productData?.is_available&&this.productData?.quantity?r("div",{class:"s-search-product-card-quantity"},this.remained," ",salla.helpers.number(this.productData?.quantity)):this.productData.promotion_title?r("div",{class:"s-search-product-card-promotion-title"},this.productData.promotion_title):null}renderAddToCartLabel(){return r("slot",{name:"add-to-cart-label"},r("span",{class:"s-search-product-card-add-to-cart-icon",innerHTML:c}))}getPriceFormat(t){return t&&0!=t?salla.money(t):salla.config.get("store.settings.product.show_price_as_dash")?"-":""}getProductPrice(){return this.productData.is_on_sale?r("div",{class:"s-search-product-card-sale-price"},r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData.sale_price)}),r("span",{innerHTML:this.getPriceFormat(this.productData?.regular_price)})):this.productData.starting_price?r("div",{class:"s-search-product-card-starting-price"},r("p",null,this.startingPrice),r("h4",{innerHTML:this.getPriceFormat(this.productData?.starting_price)})):r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData?.price)})}render(){const t={"s-search-product-card-entry":!0,"s-search-product-card-horizontal":!0,"s-search-product-card-compact":!0,"s-search-product-card-donation":this.productData?.donation},e=this.productData?.url?{href:this.productData.url}:{};return r(a,{key:"6be103faead19fecfbc380ff4ee53f47f057dae0",id:`search-product-${this.productData?.id}`,class:t},this.productData?.url?r("a",{class:"s-search-product-card-overlay-link","aria-label":this.productData?.name,...e}):null,r("div",{key:"1b2200c07aead0031e1b7cf4f4a0d0dbdb165d15",class:"s-search-product-card-image"},r("img",{key:"dca2fd85d56f311845397893bb64f50c1202ed2c",class:`s-search-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)?"contain":"cover"} lazy`,src:this.placeholder,alt:this.productData?.image?.alt||this.productData?.name,"data-src":this.productData?.image?.url||this.productData?.thumbnail}),this.getProductBadge()),r("div",{key:"6b04b97c6ead3c399acd3597c62fcf197a2a3b0d",class:"s-search-product-card-content"},r("div",{key:"750a347824045b181736002aed50b586437065ed",class:"s-search-product-card-content-main"},r("h3",{key:"b0b85cd7d0314e6e5657d208ede0bdb2ab957d8a",class:"s-search-product-card-content-title"},this.getDisplayTitle()),this.productData?.subtitle?r("p",{class:"s-search-product-card-content-subtitle"},this.productData?.subtitle):null),this.showDonationAmount&&this.productData?.donation?[r("salla-progress-bar",{donation:this.productData?.donation}),r("div",{class:"s-search-product-card-donation-input"},this.productData?.donation?.can_donate?[r("label",{htmlFor:"donation-amount"},this.donationAmount," ",r("span",null,"*")),r("input",{type:"text",onInput:t=>{salla.helpers.inputDigitsOnly(t.target),this.addBtn&&(this.addBtn.donatingAmount=t.target.value)},id:"donation-amount",name:"donating_amount",class:"s-form-control",placeholder:this.donationAmount})]:null)]:null,r("div",{key:"f1507e9e9a42d099e46e12b214be70ed41bff404",class:"s-search-product-card-content-sub"},this.getProductPrice(),this.productData?.is_out_of_stock?r("span",{class:"s-search-product-card-out-of-stock-label"},this.outOfStock):null),this.productData?.rating?.stars?r("div",{class:"s-search-product-card-rating"},r("span",{innerHTML:o}),r("span",null,this.productData.rating.stars)):null),this.hideAddBtn?null:r("div",{class:"s-search-product-card-content-footer"},r("salla-add-product-button",{ref:t=>this.addBtn=t,"product-id":this.productData.id,"product-status":this.productData.status,"product-type":this.productData.type,class:"s-add-product-button-compact"},this.renderAddToCartLabel())))}componentDidLoad(){document.lazyLoadInstance?.update(this.host?.querySelectorAll(".lazy"))}get host(){return e(this)}static get watchers(){return{product:["handleProductChange"]}}};i.style='/*!twlt*/.s-search-product-card-image::before{font-family:"sallaicons";content:"\\ec1f" !important}.grid{display:grid}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-search-product-card-entry{position:relative;display:flex;height:100%;justify-content:space-between;border-radius:var(--s-radius, 0.25rem);transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product-card-out-of-stock img.loaded{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-search-product-card-quantity{position:absolute;bottom:0.25rem;left:50%;z-index:1;max-width:calc(100% - 60px);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-quantity{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title{position:absolute;top:1rem;left:0px;z-index:1;max-width:calc(100% - 60px);border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-promotion-title{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title:where([dir="rtl"],[dir="rtl"] *){right:0px;left:unset;border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem);border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-product-card-image{position:relative;height:100%;width:100%;flex-shrink:0;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-card-image::before{position:absolute;top:50%;left:50%;display:inline-block;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;content:var(--tw-content);--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-search-product-card-image:hover{opacity:0.9}.s-search-product-card-image img{height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-search-product-card-image img.lazy{opacity:0}.s-search-product-card-image img.loaded{position:relative;opacity:1}.s-search-product-card-content{position:relative;display:flex;flex-direction:column;padding:0.75rem}@media (min-width: 640px){.s-search-product-card-content{padding:1.25rem}}.s-search-product-card-content-title{margin-bottom:0.625rem;display:block;max-width:100%;text-align:start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-content-title:hover{color:var(--color-primary)}.s-search-product-card-content-subtitle{margin-bottom:0.625rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-card-donation-input{position:relative;z-index:2;flex:1 1 0%}.s-search-product-card-donation-input label{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem}.s-search-product-card-donation-input label span{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-overlay-link{position:absolute;inset:0px;z-index:1}.s-search-product-card-content-sub{margin-bottom:1.25rem;display:flex;width:100%;align-items:center;justify-content:space-between}.s-search-product-card-out-of-stock-label{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-rating{margin-top:0.5rem;display:flex;align-items:center}.s-search-product-card-rating>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-rating{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product-card-rating:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-rating span svg{margin-bottom:3px;height:1rem;width:1rem;fill:#fbbf24}.s-search-product-card-content-footer{margin-top:auto;display:flex;align-items:center}.s-search-product-card-sale-price>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-sale-price:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-sale-price span{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-card-starting-price{display:flex;align-items:center;justify-content:space-between}.s-search-product-card-starting-price h4{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-search-product-card-price-value{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-image-cover{object-fit:cover}.s-search-product-card-image-contain{object-fit:contain}.s-search-product-card-add-to-cart-icon svg{height:1rem;width:1rem;fill:currentColor}.s-search-product-card-horizontal .s-search-product-card-image{height:auto;width:8rem}@media (min-width: 640px){.s-search-product-card-horizontal .s-search-product-card-image{width:14rem}}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-quantity{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.s-search-product-card-horizontal .s-search-product-card-promotion-title{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content{margin-bottom:0.625rem;width:100%}.s-search-product-card-compact{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:0.75rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0px;padding-right:0px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-search-product-card-content-footer{position:relative;z-index:2;margin-top:0px;flex-shrink:0;gap:0.5rem}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn{height:2rem;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);background-color:transparent;padding-left:0.75rem;padding-right:0.75rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn:hover{border-color:var(--color-primary);background-color:var(--color-primary);--tw-bg-opacity:0.1;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content{min-width:0px;flex:1 1 0%;padding:0px;text-align:right}.s-search-product-card-compact .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.25;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-subtitle{margin-top:0.25rem;display:none;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub{margin-bottom:0px;display:flex;align-items:center;justify-content:flex-start;gap:0.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub h4{margin:0px}.s-search-product-card-compact .s-search-product-card-starting-price h4{font-weight:700}.s-search-product-card-compact .s-search-product-card-starting-price{justify-content:flex-start;gap:0.25rem}.s-search-product-card-compact .s-search-product-card-image{height:5rem;width:5rem;flex-shrink:0;border-radius:0.375rem}.s-search-product-card-compact .s-search-product-card-image img{height:100%;width:100%;border-radius:0.375rem;object-fit:cover}.s-search-product-card-compact .s-search-product-card-promotion-title{display:none}';export{i as salla_search_product_card}
|
|
4
|
+
import{r as t,h as r,H as a,a as e}from"./p-CtoXzf1y.js";import{S as o}from"./p-D4oPi1Ov.js";import{C as c}from"./p-gFG8By9O.js";const i=class{constructor(r){t(this,r),this.hideAddBtn=!1,this.showDonationAmount=!1,this.remained="",this.outOfStock="",this.donationAmount="",this.startingPrice="",this.addToCart="",this.placeholder="",this.COMPACT_TITLE_MAX_LENGTH=90}parseProductData(t){if(t)try{return"object"==typeof t?t:JSON.parse(t)}catch(t){return void salla.log("Bad json passed via product prop")}}handleProductChange(t){this.productData=this.parseProductData(t)}async componentWillLoad(){this.productData=this.parseProductData(this.product),await Promise.all([salla.onReady(),salla.lang.onLoaded()]),this.placeholder=salla.url.asset(salla.config.get("theme.settings.placeholder")),this.remained=salla.lang.get("pages.products.remained"),this.donationAmount=salla.lang.get("pages.products.donation_amount"),this.startingPrice=salla.lang.get("pages.products.starting_price"),this.addToCart=salla.lang.get("pages.cart.add_to_cart"),this.outOfStock=salla.lang.get("pages.products.out_of_stock")}getDisplayTitle(){const t=this.productData?.name||"";return t.length<=this.COMPACT_TITLE_MAX_LENGTH?t:t.slice(0,this.COMPACT_TITLE_MAX_LENGTH).trimEnd()+"…"}getProductBadge(){return!this.productData?.is_available&&this.productData?.quantity?r("div",{class:"s-search-product-card-quantity"},this.remained," ",salla.helpers.number(this.productData?.quantity)):this.productData.promotion_title?r("div",{class:"s-search-product-card-promotion-title"},this.productData.promotion_title):null}renderAddToCartLabel(){return r("slot",{name:"add-to-cart-label"},r("span",{class:"s-search-product-card-add-to-cart-icon",innerHTML:c}))}getPriceFormat(t){return t&&0!=t?salla.money(t):salla.config.get("store.settings.product.show_price_as_dash")?"-":""}getProductPrice(){return this.productData.is_on_sale?r("div",{class:"s-search-product-card-sale-price"},r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData.sale_price)}),r("span",{innerHTML:this.getPriceFormat(this.productData?.regular_price)})):this.productData.starting_price?r("div",{class:"s-search-product-card-starting-price"},r("p",null,this.startingPrice),r("h4",{innerHTML:this.getPriceFormat(this.productData?.starting_price)})):r("p",{class:"s-search-product-card-price-value",innerHTML:this.getPriceFormat(this.productData?.price)})}render(){const t={"s-search-product-card-entry":!0,"s-search-product-card-horizontal":!0,"s-search-product-card-compact":!0,"s-search-product-card-donation":this.productData?.donation},e=this.productData?.url?{href:this.productData.url}:{};return r(a,{key:"6be103faead19fecfbc380ff4ee53f47f057dae0",id:`search-product-${this.productData?.id}`,class:t},this.productData?.url?r("a",{class:"s-search-product-card-overlay-link","aria-label":this.productData?.name,...e}):null,r("div",{key:"1b2200c07aead0031e1b7cf4f4a0d0dbdb165d15",class:"s-search-product-card-image"},r("img",{key:"dca2fd85d56f311845397893bb64f50c1202ed2c",class:`s-search-product-card-image-${salla.url.is_placeholder(this.productData?.image?.url)?"contain":"cover"} lazy`,src:this.placeholder,alt:this.productData?.image?.alt||this.productData?.name,"data-src":this.productData?.image?.url||this.productData?.thumbnail}),this.getProductBadge()),r("div",{key:"6b04b97c6ead3c399acd3597c62fcf197a2a3b0d",class:"s-search-product-card-content"},r("div",{key:"750a347824045b181736002aed50b586437065ed",class:"s-search-product-card-content-main"},r("h3",{key:"b0b85cd7d0314e6e5657d208ede0bdb2ab957d8a",class:"s-search-product-card-content-title"},this.getDisplayTitle()),this.productData?.subtitle?r("p",{class:"s-search-product-card-content-subtitle"},this.productData?.subtitle):null),this.showDonationAmount&&this.productData?.donation?[r("salla-progress-bar",{donation:this.productData?.donation}),r("div",{class:"s-search-product-card-donation-input"},this.productData?.donation?.can_donate?[r("label",{htmlFor:"donation-amount"},this.donationAmount," ",r("span",null,"*")),r("input",{type:"text",onInput:t=>{salla.helpers.inputDigitsOnly(t.target),this.addBtn&&(this.addBtn.donatingAmount=t.target.value)},id:"donation-amount",name:"donating_amount",class:"s-form-control",placeholder:this.donationAmount})]:null)]:null,r("div",{key:"f1507e9e9a42d099e46e12b214be70ed41bff404",class:"s-search-product-card-content-sub"},this.getProductPrice(),this.productData?.is_out_of_stock?r("span",{class:"s-search-product-card-out-of-stock-label"},this.outOfStock):null),this.productData?.rating?.stars?r("div",{class:"s-search-product-card-rating"},r("span",{innerHTML:o}),r("span",null,this.productData.rating.stars)):null),this.hideAddBtn?null:r("div",{class:"s-search-product-card-content-footer"},r("salla-add-product-button",{ref:t=>this.addBtn=t,"product-id":this.productData.id,"product-status":this.productData.status,"product-type":this.productData.type,class:"s-add-product-button-compact"},this.renderAddToCartLabel())))}componentDidLoad(){document.lazyLoadInstance?.update(this.host?.querySelectorAll(".lazy"))}get host(){return e(this)}static get watchers(){return{product:["handleProductChange"]}}};i.style='/*!twlt*/.s-search-product-card-image::before{font-family:"sallaicons";content:"\\ec1f" !important}.grid{display:grid}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-search-product-card-entry{position:relative;display:flex;height:100%;justify-content:space-between;border-radius:var(--s-radius, 0.25rem);transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-search-product-card-out-of-stock img.loaded{--tw-grayscale:grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-search-product-card-quantity{position:absolute;bottom:0.25rem;left:50%;z-index:1;max-width:calc(100% - 60px);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-quantity{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title{position:absolute;top:1rem;left:0px;z-index:1;max-width:calc(100% - 60px);border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(248 113 113 / var(--tw-bg-opacity, 1));padding-left:0.625rem;padding-right:0.625rem;padding-top:0.375rem;padding-bottom:0.375rem;font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-search-product-card-promotion-title{padding-top:0.5rem;padding-bottom:0.5rem}}.s-search-product-card-promotion-title:where([dir="rtl"],[dir="rtl"] *){right:0px;left:unset;border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem);border-top-right-radius:0px;border-bottom-right-radius:0px}.s-search-product-card-image{position:relative;height:100%;width:100%;flex-shrink:0;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-search-product-card-image::before{position:absolute;top:50%;left:50%;display:inline-block;--tw-translate-x:-50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;content:var(--tw-content);--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-search-product-card-image:hover{opacity:0.9}.s-search-product-card-image img{height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-search-product-card-image img.lazy{opacity:0}.s-search-product-card-image img.loaded{position:relative;opacity:1}.s-search-product-card-content{position:relative;display:flex;flex-direction:column;padding:0.75rem}@media (min-width: 640px){.s-search-product-card-content{padding:1.25rem}}.s-search-product-card-content-title{margin-bottom:0.625rem;display:block;max-width:100%;text-align:start;font-size:0.875rem;font-weight:700;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-content-title:hover{color:var(--color-primary)}.s-search-product-card-content-subtitle{margin-bottom:0.625rem;font-size:0.875rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.s-search-product-card-donation-input{position:relative;z-index:2;flex:1 1 0%}.s-search-product-card-donation-input label{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem}.s-search-product-card-donation-input label span{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-overlay-link{position:absolute;inset:0px;z-index:1}.s-search-product-card-content-sub{margin-bottom:1.25rem;display:flex;width:100%;align-items:center;justify-content:space-between}.s-search-product-card-out-of-stock-label{font-size:0.75rem;line-height:1rem;font-weight:700;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-search-product-card-rating{margin-top:0.5rem;display:flex;align-items:center}.s-search-product-card-rating>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.25rem * var(--tw-space-x-reverse));margin-left:calc(0.25rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-rating{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-search-product-card-rating:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-rating span svg{margin-bottom:3px;height:1rem;width:1rem;fill:#fbbf24}.s-search-product-card-content-footer{margin-top:auto;display:flex;align-items:center}.s-search-product-card-sale-price>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-search-product-card-sale-price:where([dir="rtl"],[dir="rtl"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-search-product-card-sale-price span{font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1));text-decoration-line:line-through}.s-search-product-card-starting-price{display:flex;align-items:center;justify-content:space-between}.s-search-product-card-starting-price h4{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-search-product-card-price-value{display:inline-block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-search-product-card-image-cover{object-fit:cover}.s-search-product-card-image-contain{object-fit:contain}.s-search-product-card-add-to-cart-icon svg{height:1rem;width:1rem;fill:currentColor}.s-search-product-card-horizontal .s-search-product-card-image{height:auto;width:8rem}@media (min-width: 640px){.s-search-product-card-horizontal .s-search-product-card-image{width:14rem}}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="ltr"],[dir="ltr"] *){border-top-left-radius:var(--s-radius, 0.25rem);border-bottom-left-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-image:where([dir="rtl"],[dir="rtl"] *){border-top-right-radius:var(--s-radius, 0.25rem);border-bottom-right-radius:var(--s-radius, 0.25rem)}.s-search-product-card-horizontal .s-search-product-card-quantity{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.s-search-product-card-horizontal .s-search-product-card-promotion-title{max-width:unset}.s-search-product-card-horizontal .s-search-product-card-content{margin-bottom:0.625rem;width:100%}.s-search-product-card-compact{display:flex;cursor:pointer;flex-direction:row;align-items:center;gap:0.75rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0px;padding-right:0px;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-search-product-card-content-footer{position:relative;z-index:2;margin-top:0px;flex-shrink:0;gap:0.5rem}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn{height:2rem;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);background-color:transparent;padding-left:0.75rem;padding-right:0.75rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-search-product-card-compact .s-add-product-button-compact salla-button .s-button-btn:hover{border-color:var(--color-primary);background-color:var(--color-primary);--tw-bg-opacity:0.1;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content{min-width:0px;flex:1 1 0%;padding:0px;text-align:right}.s-search-product-card-compact .s-search-product-card-content-title{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.25;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-subtitle{margin-top:0.25rem;display:none;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub{margin-bottom:0px;display:flex;align-items:center;justify-content:flex-start;gap:0.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-search-product-card-compact .s-search-product-card-content-sub h4{margin:0px}.s-search-product-card-compact .s-search-product-card-starting-price h4{font-weight:700}.s-search-product-card-compact .s-search-product-card-starting-price{justify-content:flex-start;gap:0.25rem}.s-search-product-card-compact .s-search-product-card-image{height:5rem;width:5rem;flex-shrink:0;border-radius:0.375rem}.s-search-product-card-compact .s-search-product-card-image img{height:100%;width:100%;border-radius:0.375rem;object-fit:cover}.s-search-product-card-compact .s-search-product-card-promotion-title{display:none}';export{i as salla_search_product_card}
|