@salla.sa/twilight-components 2.14.360 → 2.14.361
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/{filepond-CKWDtDUb.js → filepond-B9wDH0hL.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-2dCMAXPa.js → filepond-plugin-file-poster-CDAuTBej.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size--yuQCRag.js → filepond-plugin-file-validate-size-C4L-Kvct.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C7v_6KQa.js → filepond-plugin-file-validate-type-BW3FEKz1.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-8QQicvms.js → filepond-plugin-image-edit-pAPZWiDo.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DbUFlH3z.js → filepond-plugin-image-exif-orientation-C6OEp0GA.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-B17N1-uQ.js → filepond-plugin-image-preview-sdDdM7uQ.js} +1 -1
- package/dist/cjs/{index-CbYvSkwS.js → index-CbHQk8WJ.js} +1 -1
- package/dist/cjs/{index-Bzd4-c5I.js → index-Cr_tA7my.js} +6 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +1 -1
- 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-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- 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 +72 -0
- package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.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 +1 -1
- 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-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.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-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.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-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- 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-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-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 +1 -1
- 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-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.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-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.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/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-EDhnbSB7.js → vanilla-picker-Cei89uUU.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +8 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +188 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cookies-bar.d.ts +11 -0
- package/dist/components/salla-cookies-bar.js +102 -0
- package/dist/esm/{filepond-BwmKAsaM.js → filepond-CYW89yXc.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-D3K_NYAK.js → filepond-plugin-file-poster-DcZl9j1q.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BHku0bcb.js → filepond-plugin-file-validate-size-C192qRuF.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-hd0JIVJJ.js → filepond-plugin-file-validate-type-ag9RiKtc.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CHiH1S6z.js → filepond-plugin-image-edit-C4VUQy7T.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CAwtIStk.js → filepond-plugin-image-exif-orientation-CEAYAdoN.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-D-h00XLk.js → filepond-plugin-image-preview-DEZzgflX.js} +1 -1
- package/dist/esm/{index-DBXeIJIL.js → index-Bm_JjmLY.js} +6 -2
- package/dist/esm/{index-B08vyG5q.js → index-Dg2FbtYI.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_3.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_4.entry.js +1 -1
- 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-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- 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 +70 -0
- package/dist/esm/salla-count-down_2.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.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 +1 -1
- 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-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.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-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.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-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.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-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- 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-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.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-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.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/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BDL54AFE.js → vanilla-picker-N0WXZp8a.js} +1 -1
- package/dist/twilight/{p-9a9874ec.entry.js → p-00c6b938.entry.js} +1 -1
- package/dist/twilight/{p-d45565e4.entry.js → p-01515b77.entry.js} +1 -1
- package/dist/twilight/{p-3cc27c43.entry.js → p-01758527.entry.js} +1 -1
- package/dist/twilight/{p-060ee1b7.entry.js → p-0aeb742b.entry.js} +1 -1
- package/dist/twilight/{p-66ccf6f3.entry.js → p-0b39ca00.entry.js} +1 -1
- package/dist/twilight/{p-40863326.entry.js → p-14216c7f.entry.js} +1 -1
- package/dist/twilight/{p-3b6a88fd.entry.js → p-161b6be8.entry.js} +1 -1
- package/dist/twilight/{p-45e4adc4.entry.js → p-199d2afc.entry.js} +1 -1
- package/dist/twilight/{p-7fe76ff7.entry.js → p-1a0ebb60.entry.js} +1 -1
- package/dist/twilight/{p-8e62c720.entry.js → p-1c088a28.entry.js} +1 -1
- package/dist/twilight/{p-fad5a832.entry.js → p-1dce335c.entry.js} +1 -1
- package/dist/twilight/{p-e8966aba.entry.js → p-1f36e4ed.entry.js} +1 -1
- package/dist/twilight/{p-c27015c3.entry.js → p-1ffb95e4.entry.js} +1 -1
- package/dist/twilight/{p-0ea768e8.entry.js → p-23eb9541.entry.js} +1 -1
- package/dist/twilight/{p-473945c4.entry.js → p-253af7e4.entry.js} +1 -1
- package/dist/twilight/{p-52544c17.entry.js → p-26cdd544.entry.js} +1 -1
- package/dist/twilight/{p-2250e40e.entry.js → p-29370764.entry.js} +1 -1
- package/dist/twilight/{p-e26c630a.entry.js → p-2c2a5e31.entry.js} +1 -1
- package/dist/twilight/{p-124fc831.entry.js → p-32d4ff3c.entry.js} +1 -1
- package/dist/twilight/{p-e3ca09cc.entry.js → p-3894d390.entry.js} +1 -1
- package/dist/twilight/{p-560e818a.entry.js → p-3d83fcd2.entry.js} +1 -1
- package/dist/twilight/{p-84bce41f.entry.js → p-3eeeee2a.entry.js} +1 -1
- package/dist/twilight/{p-2c64d7d2.entry.js → p-4248cb93.entry.js} +1 -1
- package/dist/twilight/{p-e18b25d3.entry.js → p-448f2198.entry.js} +1 -1
- package/dist/twilight/{p-2f23542f.entry.js → p-46c4028c.entry.js} +1 -1
- package/dist/twilight/{p-6e97b2e1.entry.js → p-49b314ee.entry.js} +1 -1
- package/dist/twilight/{p-5cb2ebab.entry.js → p-49d0e951.entry.js} +1 -1
- package/dist/twilight/{p-a1bdfa51.entry.js → p-4d46ba8f.entry.js} +1 -1
- package/dist/twilight/{p-7c2547c8.entry.js → p-4e84a501.entry.js} +1 -1
- package/dist/twilight/{p-3dda1080.entry.js → p-533058db.entry.js} +1 -1
- package/dist/twilight/{p-edf5b8fe.entry.js → p-676d09dc.entry.js} +1 -1
- package/dist/twilight/{p-dec24992.entry.js → p-67c292c4.entry.js} +1 -1
- package/dist/twilight/{p-994c77a4.entry.js → p-6ae733e7.entry.js} +1 -1
- package/dist/twilight/{p-49944190.entry.js → p-6f1a95cf.entry.js} +1 -1
- package/dist/twilight/{p-d118f16a.entry.js → p-7307d72e.entry.js} +1 -1
- package/dist/twilight/{p-95234b45.entry.js → p-78aa003e.entry.js} +1 -1
- package/dist/twilight/{p-4987ca72.entry.js → p-7f206524.entry.js} +1 -1
- package/dist/twilight/{p-206874a5.entry.js → p-890997b7.entry.js} +1 -1
- package/dist/twilight/{p-7fe01af1.entry.js → p-89ada978.entry.js} +1 -1
- package/dist/twilight/{p-55b45b9d.entry.js → p-8a369c2f.entry.js} +1 -1
- package/dist/twilight/{p-6f5e8a46.entry.js → p-9242d518.entry.js} +1 -1
- package/dist/twilight/{p-96da51a2.entry.js → p-94797588.entry.js} +1 -1
- package/dist/twilight/{p-452165b0.entry.js → p-9adb8d89.entry.js} +1 -1
- package/dist/twilight/{p-B0vxgMkD.js → p-BCSovGhK.js} +1 -1
- package/dist/twilight/{p-DBXeIJIL.js → p-Bm_JjmLY.js} +1 -1
- package/dist/twilight/{p-C2CpdoUG.js → p-BrMsg8LI.js} +1 -1
- package/dist/twilight/{p-cqGzS-xJ.js → p-Bz-InkXO.js} +1 -1
- package/dist/twilight/{p-PAJhz07l.js → p-CJO84kVm.js} +1 -1
- package/dist/twilight/{p-B77qx5ee.js → p-CW14YLAM.js} +2 -2
- package/dist/twilight/{p-VMC9YDvn.js → p-CdycwZVR.js} +1 -1
- package/dist/twilight/{p-CKB6mTwH.js → p-DClbd2fR.js} +1 -1
- package/dist/twilight/{p-DDHq4PsH.js → p-DmucjJ79.js} +1 -1
- package/dist/twilight/{p-6d376095.entry.js → p-a40111cd.entry.js} +1 -1
- package/dist/twilight/{p-ab19537f.entry.js → p-a64b38ff.entry.js} +1 -1
- package/dist/twilight/{p-de3c8eb9.entry.js → p-ac82644e.entry.js} +1 -1
- package/dist/twilight/{p-3f03d862.entry.js → p-ace375d3.entry.js} +1 -1
- package/dist/twilight/{p-f701a180.entry.js → p-ae6c31ec.entry.js} +1 -1
- package/dist/twilight/p-b0aa2fbb.entry.js +4 -0
- package/dist/twilight/{p-1d4eec43.entry.js → p-b2597562.entry.js} +1 -1
- package/dist/twilight/{p-40885946.entry.js → p-b2b1a5c0.entry.js} +1 -1
- package/dist/twilight/{p-fee8967c.entry.js → p-b4fdbde1.entry.js} +1 -1
- package/dist/twilight/{p-9cf5ede2.entry.js → p-c5c69dd5.entry.js} +1 -1
- package/dist/twilight/{p-e54dfcca.entry.js → p-c91e5718.entry.js} +1 -1
- package/dist/twilight/{p-CPmsenDm.js → p-cJK7vs27.js} +1 -1
- package/dist/twilight/{p-ee2f009e.entry.js → p-cc7a045e.entry.js} +1 -1
- package/dist/twilight/{p-ae72fb84.entry.js → p-cd4e8a97.entry.js} +1 -1
- package/dist/twilight/{p-1f998706.entry.js → p-cdff9d44.entry.js} +1 -1
- package/dist/twilight/{p-92fca220.entry.js → p-d1de9401.entry.js} +1 -1
- package/dist/twilight/{p-7a0cb59a.entry.js → p-d1efff1b.entry.js} +1 -1
- package/dist/twilight/{p-bfe400e6.entry.js → p-da0f4af0.entry.js} +1 -1
- package/dist/twilight/{p-c317cd73.entry.js → p-dcc08b7e.entry.js} +1 -1
- package/dist/twilight/{p-17cbc419.entry.js → p-e1bd6fb2.entry.js} +1 -1
- package/dist/twilight/{p-09628b84.entry.js → p-e9db19fa.entry.js} +1 -1
- package/dist/twilight/{p-ccf8f40d.entry.js → p-edb6d017.entry.js} +1 -1
- package/dist/twilight/{p-7e7e3cd0.entry.js → p-f6756659.entry.js} +1 -1
- package/dist/twilight/{p-0504c1e5.entry.js → p-f8277b02.entry.js} +1 -1
- package/dist/twilight/{p-33d4e8b5.entry.js → p-f90ed6b8.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +39 -0
- package/dist/types/components.d.ts +47 -0
- package/package.json +5 -5
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaCookiesBar extends Components.SallaCookiesBar, HTMLElement {}
|
|
4
|
+
export const SallaCookiesBar: {
|
|
5
|
+
prototype: SallaCookiesBar;
|
|
6
|
+
new (): SallaCookiesBar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$2 } from './salla-button2.js';
|
|
6
|
+
|
|
7
|
+
const sallaCookiesBarCss = ":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}";
|
|
8
|
+
|
|
9
|
+
const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
/**
|
|
14
|
+
* Whether the cookies bar is visible.
|
|
15
|
+
*/
|
|
16
|
+
this.isVisible = true;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the viewport is mobile width (updates on resize).
|
|
19
|
+
*/
|
|
20
|
+
this.isMobile = false;
|
|
21
|
+
this.mobileBreakpoint = 768;
|
|
22
|
+
this.mobileQueryHandler = (e) => (this.isMobile = e.matches);
|
|
23
|
+
/**
|
|
24
|
+
* The message displayed in the cookies bar.
|
|
25
|
+
*/
|
|
26
|
+
this.message = 'We use cookies to improve your experience on our site. By continuing to browse, you agree to our use of cookies.';
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
if (Salla.storage.get('cookies-consent')) {
|
|
30
|
+
this.isVisible = false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
componentDidLoad() {
|
|
34
|
+
this.mobileQuery = window.matchMedia(`(max-width: ${this.mobileBreakpoint - 1}px)`);
|
|
35
|
+
this.isMobile = this.mobileQuery.matches;
|
|
36
|
+
this.mobileQuery.addEventListener('change', this.mobileQueryHandler);
|
|
37
|
+
}
|
|
38
|
+
disconnectedCallback() {
|
|
39
|
+
this.mobileQuery?.removeEventListener('change', this.mobileQueryHandler);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Accept cookies consent.
|
|
43
|
+
*/
|
|
44
|
+
async accept() {
|
|
45
|
+
Salla.storage.set('cookies-consent', 'accepted');
|
|
46
|
+
this.isVisible = false;
|
|
47
|
+
Salla.event.emit('salla-cookies-bar::accepted');
|
|
48
|
+
return this.host;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Reject cookies consent.
|
|
52
|
+
*/
|
|
53
|
+
async reject() {
|
|
54
|
+
Salla.storage.set('cookies-consent', 'rejected');
|
|
55
|
+
this.isVisible = false;
|
|
56
|
+
Salla.event.emit('salla-cookies-bar::rejected');
|
|
57
|
+
return this.host;
|
|
58
|
+
}
|
|
59
|
+
isRtl() {
|
|
60
|
+
return salla.config.get('theme.is_rtl', true);
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
if (!this.isVisible) {
|
|
64
|
+
return h(Host, null);
|
|
65
|
+
}
|
|
66
|
+
return (h(Host, null, h("div", { dir: this.isRtl() ? 'rtl' : 'ltr', class: "s-cookies-bar fixed bottom-0 inset-x-0 z-50 bg-white p-4" }, h("div", { class: "s-cookies-bar-content flex flex-col justify-center gap-6 max-w-screen-xl mx-auto px-4" }, h("p", { class: "s-cookies-bar-message text-sm font-medium leading-relaxed text-gray-500 m-0" }, this.message || Salla.lang.get('blocks.footer.cookies_message')), h("div", { class: "s-cookies-bar-actions flex flex-row gap-2 shrink-0" }, h("salla-button", { class: "s-cookies-bar-btn--accept", color: "primary", fill: "solid", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.accept() }, this.acceptLabel || Salla.lang.get('blocks.footer.cookies_accept')), h("salla-button", { class: "s-cookies-bar-btn--reject", fill: "outline", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.reject() }, this.rejectLabel || Salla.lang.get('blocks.footer.cookies_reject')))))));
|
|
67
|
+
}
|
|
68
|
+
get host() { return this; }
|
|
69
|
+
static get style() { return sallaCookiesBarCss; }
|
|
70
|
+
}, [0, "salla-cookies-bar", {
|
|
71
|
+
"message": [1],
|
|
72
|
+
"acceptLabel": [1, "accept-label"],
|
|
73
|
+
"rejectLabel": [1, "reject-label"],
|
|
74
|
+
"isVisible": [32],
|
|
75
|
+
"isMobile": [32],
|
|
76
|
+
"accept": [64],
|
|
77
|
+
"reject": [64]
|
|
78
|
+
}]);
|
|
79
|
+
function defineCustomElement$1() {
|
|
80
|
+
if (typeof customElements === "undefined") {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const components = ["salla-cookies-bar", "salla-button"];
|
|
84
|
+
components.forEach(tagName => { switch (tagName) {
|
|
85
|
+
case "salla-cookies-bar":
|
|
86
|
+
if (!customElements.get(tagName)) {
|
|
87
|
+
customElements.define(tagName, SallaCookiesBar$1);
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
case "salla-button":
|
|
91
|
+
if (!customElements.get(tagName)) {
|
|
92
|
+
defineCustomElement$2();
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
} });
|
|
96
|
+
}
|
|
97
|
+
defineCustomElement$1();
|
|
98
|
+
|
|
99
|
+
const SallaCookiesBar = SallaCookiesBar$1;
|
|
100
|
+
const defineCustomElement = defineCustomElement$1;
|
|
101
|
+
|
|
102
|
+
export { SallaCookiesBar, defineCustomElement };
|