flowrix 1.0.1-beta.147 → 1.0.1-beta.148
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/module.json +1 -1
- package/dist/module.mjs +5 -0
- package/dist/runtime/components/SampleProductCard.d.vue.ts +13 -0
- package/dist/runtime/components/SampleProductCard.vue +362 -0
- package/dist/runtime/components/SampleProductCard.vue.d.ts +13 -0
- package/dist/runtime/components/WishList/dropdown.d.vue.ts +9 -0
- package/dist/runtime/components/WishList/dropdown.vue +417 -0
- package/dist/runtime/components/WishList/dropdown.vue.d.ts +9 -0
- package/dist/runtime/components/WishList/modal.d.vue.ts +13 -0
- package/dist/runtime/components/WishList/modal.vue +229 -0
- package/dist/runtime/components/WishList/modal.vue.d.ts +13 -0
- package/dist/runtime/components/product/AddToCart.d.vue.ts +15 -0
- package/dist/runtime/components/product/AddToCart.vue +176 -0
- package/dist/runtime/components/product/AddToCart.vue.d.ts +15 -0
- package/dist/runtime/components/product/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/product/AddtoCartSample.vue +110 -0
- package/dist/runtime/components/product/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/product/Badges.d.vue.ts +13 -0
- package/dist/runtime/components/product/Badges.vue +84 -0
- package/dist/runtime/components/product/Badges.vue.d.ts +13 -0
- package/dist/runtime/components/product/Description.d.vue.ts +9 -0
- package/dist/runtime/components/product/Description.vue +96 -0
- package/dist/runtime/components/product/Description.vue.d.ts +9 -0
- package/dist/runtime/components/product/Dynamic.d.vue.ts +9 -0
- package/dist/runtime/components/product/Dynamic.vue +136 -0
- package/dist/runtime/components/product/Dynamic.vue.d.ts +9 -0
- package/dist/runtime/components/product/Gallery.d.vue.ts +11 -0
- package/dist/runtime/components/product/Gallery.vue +133 -0
- package/dist/runtime/components/product/Gallery.vue.d.ts +11 -0
- package/dist/runtime/components/product/PopUpCart.d.vue.ts +11 -0
- package/dist/runtime/components/product/PopUpCart.vue +155 -0
- package/dist/runtime/components/product/PopUpCart.vue.d.ts +11 -0
- package/dist/runtime/components/product/ProductInfo.d.vue.ts +7 -0
- package/dist/runtime/components/product/ProductInfo.vue +105 -0
- package/dist/runtime/components/product/ProductInfo.vue.d.ts +7 -0
- package/dist/runtime/components/product/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/product/RequiredPopUp.vue +57 -0
- package/dist/runtime/components/product/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.d.vue.ts +13 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.vue +35 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.vue.d.ts +13 -0
- package/dist/runtime/components/product/bundleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/bundleProduct/index.vue +32 -0
- package/dist/runtime/components/product/bundleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.vue +101 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/product/customProduct/Attributes.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/Attributes.vue +12 -0
- package/dist/runtime/components/product/customProduct/Attributes.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue +253 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue +253 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue +214 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue +133 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue +35 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue +134 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +15 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +138 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +15 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue +149 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue +82 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +108 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue +104 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue +87 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +219 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue +36 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue +45 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue +48 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue +154 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue +111 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +269 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue +63 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue +63 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue +220 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue +47 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue +91 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.vue +25 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.vue +49 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/Reviews.d.vue.ts +7 -0
- package/dist/runtime/components/product/customProduct/Reviews.vue +25 -0
- package/dist/runtime/components/product/customProduct/Reviews.vue.d.ts +7 -0
- package/dist/runtime/components/product/customProduct/SingleStep.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/SingleStep.vue +11 -0
- package/dist/runtime/components/product/customProduct/SingleStep.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/Steps.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/Steps.vue +221 -0
- package/dist/runtime/components/product/customProduct/Steps.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/index.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/index.vue +272 -0
- package/dist/runtime/components/product/customProduct/index.vue.d.ts +9 -0
- package/dist/runtime/components/product/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/index.vue +90 -0
- package/dist/runtime/components/product/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.d.vue.ts +11 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.vue.d.ts +11 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.d.vue.ts +7 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.vue +74 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.vue.d.ts +7 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.d.vue.ts +9 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue +63 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue.d.ts +9 -0
- package/dist/runtime/components/product/sampleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/sampleProduct/index.vue +64 -0
- package/dist/runtime/components/product/sampleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.d.vue.ts +11 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.vue.d.ts +11 -0
- package/dist/runtime/components/product/simpleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/simpleProduct/index.vue +34 -0
- package/dist/runtime/components/product/simpleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.d.ts +3 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.js +20 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.d.ts +70 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.js +63 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.js +107 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.d.ts +159 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.js +2079 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.js +27 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.d.ts +68 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.js +21 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.d.ts +67 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.js +15 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.d.ts +88 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.js +72 -0
- package/dist/runtime/composables/index.d.ts +8 -0
- package/dist/runtime/composables/index.js +8 -0
- package/dist/runtime/pages/flowrix-default.vue +15 -6
- package/dist/runtime/plugins/bootstrap.client.d.ts +2 -0
- package/dist/runtime/plugins/bootstrap.client.js +9 -0
- package/dist/runtime/server/api/cart/related.js +15 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -24,6 +24,7 @@ const module$1 = defineNuxtModule({
|
|
|
24
24
|
FLOWRIX_CDN: env.FCDN || runtimeConfig.FLOWRIX_CDN || runtimeConfig.public.FLOWRIX_CDN || ""
|
|
25
25
|
});
|
|
26
26
|
const resolver = createResolver(import.meta.url);
|
|
27
|
+
nuxt.options.css.push("bootstrap/dist/css/bootstrap.min.css");
|
|
27
28
|
await installModule("@pinia/nuxt");
|
|
28
29
|
nuxt.hook("pages:extend", (pages) => {
|
|
29
30
|
pages.push({
|
|
@@ -35,6 +36,10 @@ const module$1 = defineNuxtModule({
|
|
|
35
36
|
addPlugin({
|
|
36
37
|
src: resolver.resolve("./runtime/plugins/router")
|
|
37
38
|
});
|
|
39
|
+
addPlugin({
|
|
40
|
+
src: resolver.resolve("./runtime/plugins/bootstrap.client"),
|
|
41
|
+
mode: "client"
|
|
42
|
+
});
|
|
38
43
|
addServerHandler({
|
|
39
44
|
middleware: true,
|
|
40
45
|
handler: resolver.resolve("./runtime/utils/htmlCache")
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
swatch: ArrayConstructor;
|
|
3
|
+
otherColor: BooleanConstructor;
|
|
4
|
+
from: StringConstructor;
|
|
5
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
swatch: ArrayConstructor;
|
|
7
|
+
otherColor: BooleanConstructor;
|
|
8
|
+
from: StringConstructor;
|
|
9
|
+
}>> & Readonly<{}>, {
|
|
10
|
+
otherColor: boolean;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const isModalOpen = ref(false);
|
|
3
|
+
const openCustomizeModal = () => isModalOpen.value = true;
|
|
4
|
+
const closeModal = () => isModalOpen.value = false;
|
|
5
|
+
const Wishlist = defineAsyncComponent(() => import("./WishList/modal.vue"));
|
|
6
|
+
const cartStore = useCartStore();
|
|
7
|
+
const openWishlistModal = ref(false);
|
|
8
|
+
const wishlistModalRef = ref(null);
|
|
9
|
+
const activeFlowBiteId = useState("activeFlowBiteId", () => null);
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
swatch: Array,
|
|
12
|
+
otherColor: Boolean,
|
|
13
|
+
from: String
|
|
14
|
+
});
|
|
15
|
+
const isInCart = ref(false);
|
|
16
|
+
watchEffect(() => {
|
|
17
|
+
if (cartStore.cart.items) {
|
|
18
|
+
isInCart.value = Object.values(cartStore.cart.items).some(
|
|
19
|
+
(item) => item.slug === props.swatch.slug
|
|
20
|
+
);
|
|
21
|
+
} else {
|
|
22
|
+
isInCart.value = false;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const addToCart = async (product, qty) => {
|
|
26
|
+
await cartStore.addToCart(product, qty, product);
|
|
27
|
+
};
|
|
28
|
+
const removeProduct = async (productId) => {
|
|
29
|
+
if (cartStore.cart.items) {
|
|
30
|
+
const productToRemove = Object.values(cartStore.cart.items).find(
|
|
31
|
+
(item) => item.slug === productId
|
|
32
|
+
);
|
|
33
|
+
if (productToRemove) {
|
|
34
|
+
await cartStore.removeFromCart(productToRemove.rowId, productToRemove);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const toggleCart = async () => {
|
|
39
|
+
if (isInCart.value) {
|
|
40
|
+
await removeProduct(props.swatch.slug);
|
|
41
|
+
} else {
|
|
42
|
+
await addToCart(props.swatch, 1);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const toggleFlowBite = () => {
|
|
46
|
+
if (activeFlowBiteId.value === props.swatch.slug) {
|
|
47
|
+
activeFlowBiteId.value = null;
|
|
48
|
+
} else {
|
|
49
|
+
activeFlowBiteId.value = props.swatch.slug;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const isFlowBiteOpen = computed(() => {
|
|
53
|
+
return activeFlowBiteId.value === props.swatch.slug;
|
|
54
|
+
});
|
|
55
|
+
const handleClickOutside = (event) => {
|
|
56
|
+
const target = event.target;
|
|
57
|
+
if (!target.closest(".flow-bite") && !target.closest(".flow-bite-box")) {
|
|
58
|
+
activeFlowBiteId.value = null;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
onMounted(() => {
|
|
62
|
+
document.addEventListener("click", handleClickOutside);
|
|
63
|
+
});
|
|
64
|
+
onUnmounted(() => {
|
|
65
|
+
document.removeEventListener("click", handleClickOutside);
|
|
66
|
+
});
|
|
67
|
+
const swatchimagesSrcset = ((swatchImage) => {
|
|
68
|
+
var swatchImage = swatchImage;
|
|
69
|
+
let swatchImage150 = swatchImage?.replace(/.webp/gi, "150.webp");
|
|
70
|
+
let swatchImage320 = swatchImage?.replace(/.webp/gi, "320.webp");
|
|
71
|
+
let swatchImage640 = swatchImage?.replace(/.webp/gi, "640.webp");
|
|
72
|
+
let swatchImage1024 = swatchImage?.replace(/.webp/gi, "1024.webp");
|
|
73
|
+
return swatchImage640;
|
|
74
|
+
});
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<template>
|
|
78
|
+
<div class="card shadow-sm position-relative">
|
|
79
|
+
<div class="flow-bite" @click="toggleFlowBite">
|
|
80
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="flow-bite-icon"
|
|
81
|
+
:class="{ 'rotated': isFlowBiteOpen }">
|
|
82
|
+
<path fill="none" stroke="#333333" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
|
|
83
|
+
d="M9 9L4 4m0 0v4m0-4h4m7 5l5-5m0 0v4m0-4h-4M9 15l-5 5m0 0v-4m0 4h4m7-5l5 5m0 0v-4m0 4h-4" />
|
|
84
|
+
</svg>
|
|
85
|
+
<Teleport to="body">
|
|
86
|
+
<transition name="flow-bite-fade" appear>
|
|
87
|
+
<div v-if="isFlowBiteOpen" class="flow-bite-box">
|
|
88
|
+
<div class="position-absolute end-0 bg-white p-1 rounded-1 me-2 mt-2 cursor-pointer"
|
|
89
|
+
@click.stop="activeFlowBiteId = null">
|
|
90
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
91
|
+
<path fill="#333333"
|
|
92
|
+
d="M16.95 8.464a1 1 0 0 0-1.414-1.414L12 10.586L8.464 7.05A1 1 0 1 0 7.05 8.464L10.586 12L7.05 15.536a1 1 0 1 0 1.414 1.414L12 13.414l3.536 3.536a1 1 0 1 0 1.414-1.414L13.414 12z" />
|
|
93
|
+
</svg>
|
|
94
|
+
</div>
|
|
95
|
+
<img :src="swatchimagesSrcset(swatch.image)" :alt="swatch.name" class="swatch-image mb-2">
|
|
96
|
+
<div class="swatch-name mb-2 fw-semibold ms-2">{{ swatch.name }}</div>
|
|
97
|
+
</div>
|
|
98
|
+
</transition>
|
|
99
|
+
</Teleport>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<img :src="swatchimagesSrcset(swatch.image)" :alt="swatch.name" class="card-img-top">
|
|
103
|
+
|
|
104
|
+
<!-- <NuxtLink :to="{ name: 'sample-slug', params: { slug: swatch.slug } }" class="explore-more">
|
|
105
|
+
<button class="btn btn-secondary rounded-5 text-white fw-semibold px-3 py-2">Explore More</button>
|
|
106
|
+
</NuxtLink> -->
|
|
107
|
+
|
|
108
|
+
<div class="eye-icon" @click="openCustomizeModal">
|
|
109
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
110
|
+
<path fill="none" stroke="#333333" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
|
|
111
|
+
d="M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0" />
|
|
112
|
+
<path fill="none" stroke="#333333" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
|
|
113
|
+
d="M2 12c1.6-4.097 5.336-7 10-7s8.4 2.903 10 7c-1.6 4.097-5.336 7-10 7s-8.4-2.903-10-7" />
|
|
114
|
+
</svg>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div class="cart-icon" @click="toggleCart">
|
|
118
|
+
<svg v-if="isInCart" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
119
|
+
<path fill="#333333"
|
|
120
|
+
d="m15.85 13l-2.025-2h1.725l2.75-5H8.825l-2-2H19.95q.575 0 .888.488t.012 1.062l-3.55 6.4q-.275.5-.7.775t-.75.275M7 22q-.825 0-1.412-.587T5 20t.588-1.412T7 18t1.413.588T9 20t-.587 1.413T7 22m13.5 1.3L14.15 17H7.6q-1.1 0-1.675-.937T5.85 14.1l1.05-2.15L5.1 7.9L.7 3.5l1.4-1.4l19.8 19.8zM12.15 15l-2-2H8.6l-1 2zm3.4-4h-1.725zM17 22q-.825 0-1.412-.587T15 20t.588-1.412T17 18t1.413.588T19 20t-.587 1.413T17 22" />
|
|
121
|
+
</svg>
|
|
122
|
+
<svg v-else xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
123
|
+
<g fill="none" stroke="#333333" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
|
|
124
|
+
<path d="M6 6h12l-2 8H8m8 4H8L4 4H2" />
|
|
125
|
+
<circle cx="18" cy="20" r="2" />
|
|
126
|
+
<circle cx="8" cy="20" r="2" />
|
|
127
|
+
</g>
|
|
128
|
+
</svg>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<div class="wishlist-icon" @click="openWishlistModal = !openWishlistModal">
|
|
132
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
133
|
+
<path
|
|
134
|
+
:fill="wishlistModalRef?.wishlists?.some((w) => wishlistModalRef?.isInWishlist(swatch.id, w.id)) ? '#ff4d4f' : '#000'"
|
|
135
|
+
d="m12.67 20.74l-.67.61l-1.45-1.32C5.4 15.36 2 12.27 2 8.5C2 5.41 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.08C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.41 22 8.5c0 1.43-.5 2.76-1.38 4.11c-.62-.3-1.31-.5-2.03-.57C19.5 10.8 20 9.65 20 8.5c0-2-1.5-3.5-3.5-3.5c-1.54 0-3.04 1-3.57 2.36h-1.86C10.54 6 9.04 5 7.5 5C5.5 5 4 6.5 4 8.5c0 2.89 3.14 5.74 7.89 10.05l.11.1l.04-.04c.08.76.3 1.48.63 2.13M17 14v3h-3v2h3v3h2v-3h3v-2h-3v-3z" />
|
|
136
|
+
</svg>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<Wishlist v-if="openWishlistModal" @closewish="openWishlistModal = false" ref="wishlistModalRef"
|
|
140
|
+
:product="swatch" />
|
|
141
|
+
|
|
142
|
+
<ShopFreeSample v-if="isModalOpen" @close-modal="closeModal" :sampleData="swatch" />
|
|
143
|
+
<div class="card-body text-center" v-if="from == 'sampleSingle'">
|
|
144
|
+
<h5 class="card-title mb-0 text-custom">
|
|
145
|
+
<NuxtLink :to="swatch.slug">{{ swatch.name }}</NuxtLink>
|
|
146
|
+
</h5>
|
|
147
|
+
|
|
148
|
+
</div>
|
|
149
|
+
<div class="card-body text-center" v-else>
|
|
150
|
+
<h5 class="card-title mb-0 text-custom">
|
|
151
|
+
<NuxtLink :to="swatch.url">{{ swatch.name }}</NuxtLink>
|
|
152
|
+
</h5>
|
|
153
|
+
<div><a href="#" class="text-primary fw-semibold" v-if="otherColor">Order a Sample</a></div>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
</div>
|
|
157
|
+
</template>
|
|
158
|
+
|
|
159
|
+
<style scoped>
|
|
160
|
+
.card {
|
|
161
|
+
border-radius: 12px;
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
background: #fff;
|
|
164
|
+
transition: box-shadow 0.2s;
|
|
165
|
+
position: relative;
|
|
166
|
+
border: none;
|
|
167
|
+
overflow: visible;
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
height: 100%;
|
|
171
|
+
min-height: 200px;
|
|
172
|
+
}
|
|
173
|
+
.card:hover {
|
|
174
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
|
175
|
+
}
|
|
176
|
+
.card:hover .explore-more {
|
|
177
|
+
display: block;
|
|
178
|
+
position: absolute;
|
|
179
|
+
bottom: 30%;
|
|
180
|
+
left: 50%;
|
|
181
|
+
transform: translateX(-50%);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.card-body {
|
|
185
|
+
background-color: var(--bs-cream);
|
|
186
|
+
flex-grow: 1;
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
}
|
|
190
|
+
.card-body .card-title a {
|
|
191
|
+
text-decoration: none;
|
|
192
|
+
font-weight: 600;
|
|
193
|
+
color: #333;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.card-img-top {
|
|
197
|
+
border-top-left-radius: 12px;
|
|
198
|
+
border-top-right-radius: 12px;
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 280px;
|
|
201
|
+
object-fit: cover;
|
|
202
|
+
flex-shrink: 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.eye-icon {
|
|
206
|
+
background-color: var(--bs-white);
|
|
207
|
+
position: absolute;
|
|
208
|
+
bottom: 20px;
|
|
209
|
+
right: 20px;
|
|
210
|
+
cursor: pointer;
|
|
211
|
+
top: 57px;
|
|
212
|
+
padding: 6px;
|
|
213
|
+
border-radius: 5px;
|
|
214
|
+
border: 1px solid #ddd;
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
width: 32px;
|
|
219
|
+
height: 32px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.flow-bite {
|
|
223
|
+
background-color: var(--bs-white);
|
|
224
|
+
position: absolute;
|
|
225
|
+
top: 15px;
|
|
226
|
+
right: 20px;
|
|
227
|
+
padding: 6px;
|
|
228
|
+
border-radius: 5px;
|
|
229
|
+
cursor: pointer;
|
|
230
|
+
border: 1px solid #ddd;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
width: 32px;
|
|
235
|
+
height: 32px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.cart-icon {
|
|
239
|
+
background-color: var(--bs-white);
|
|
240
|
+
position: absolute;
|
|
241
|
+
top: 98px;
|
|
242
|
+
right: 19px;
|
|
243
|
+
padding: 6px;
|
|
244
|
+
border-radius: 5px;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
border: 1px solid #ddd;
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
justify-content: center;
|
|
250
|
+
width: 32px;
|
|
251
|
+
height: 32px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.explore-more {
|
|
255
|
+
display: none;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.wishlist-icon {
|
|
259
|
+
background-color: var(--bs-white);
|
|
260
|
+
position: absolute;
|
|
261
|
+
top: 139px;
|
|
262
|
+
right: 19px;
|
|
263
|
+
padding: 6px;
|
|
264
|
+
border-radius: 5px;
|
|
265
|
+
cursor: pointer;
|
|
266
|
+
border: 1px solid #ddd;
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
justify-content: center;
|
|
270
|
+
width: 32px;
|
|
271
|
+
height: 32px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.swatch-image {
|
|
275
|
+
border-radius: 8px;
|
|
276
|
+
border: 1px solid #eee;
|
|
277
|
+
width: 600px !important;
|
|
278
|
+
/* Override inline width */
|
|
279
|
+
height: 400px !important;
|
|
280
|
+
/* Match card-img-top height */
|
|
281
|
+
object-fit: cover;
|
|
282
|
+
/* Ensure image scales properly */
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.flow-bite-box {
|
|
286
|
+
position: fixed;
|
|
287
|
+
top: 30%;
|
|
288
|
+
left: 35%;
|
|
289
|
+
background: #fff;
|
|
290
|
+
border: 1px solid #ddd;
|
|
291
|
+
border-radius: 8px;
|
|
292
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
293
|
+
padding: 6px;
|
|
294
|
+
z-index: 10;
|
|
295
|
+
min-width: 160px;
|
|
296
|
+
transform-origin: top right;
|
|
297
|
+
}
|
|
298
|
+
.flow-bite-box .cursor-pointer {
|
|
299
|
+
cursor: pointer;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.flow-bite-icon {
|
|
303
|
+
transition: transform 0.3s ease;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.flow-bite-icon.rotated {
|
|
307
|
+
transform: rotate(45deg);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.flow-bite-fade-enter-active,
|
|
311
|
+
.flow-bite-fade-leave-active {
|
|
312
|
+
transition: all 0.3s ease;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.flow-bite-fade-enter-from {
|
|
316
|
+
opacity: 0;
|
|
317
|
+
transform: scale(0.8) translateY(-10px);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.flow-bite-fade-leave-to {
|
|
321
|
+
opacity: 0;
|
|
322
|
+
transform: scale(0.8) translateY(-10px);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.flow-bite-fade-enter-to,
|
|
326
|
+
.flow-bite-fade-leave-from {
|
|
327
|
+
opacity: 1;
|
|
328
|
+
transform: scale(1) translateY(0);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@media only screen and (max-width: 768px) {
|
|
332
|
+
.card {
|
|
333
|
+
min-height: 350px;
|
|
334
|
+
}
|
|
335
|
+
.card-img-top {
|
|
336
|
+
height: 250px;
|
|
337
|
+
}
|
|
338
|
+
.swatch-image {
|
|
339
|
+
width: 359px !important;
|
|
340
|
+
height: 350px !important;
|
|
341
|
+
}
|
|
342
|
+
.explore-more {
|
|
343
|
+
display: none;
|
|
344
|
+
}
|
|
345
|
+
.flow-bite-box {
|
|
346
|
+
left: 7%;
|
|
347
|
+
top: 13%;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
@media only screen and (max-width: 400px) {
|
|
351
|
+
.flow-bite-box {
|
|
352
|
+
left: 0%;
|
|
353
|
+
top: 20%;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
@media only screen and (min-width: 769px) and (max-width: 1024px) {
|
|
357
|
+
.flow-bite-box {
|
|
358
|
+
left: 10%;
|
|
359
|
+
top: 30%;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
swatch: ArrayConstructor;
|
|
3
|
+
otherColor: BooleanConstructor;
|
|
4
|
+
from: StringConstructor;
|
|
5
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
swatch: ArrayConstructor;
|
|
7
|
+
otherColor: BooleanConstructor;
|
|
8
|
+
from: StringConstructor;
|
|
9
|
+
}>> & Readonly<{}>, {
|
|
10
|
+
otherColor: boolean;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof props>;
|
|
5
|
+
product: Record<string, any>;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const props: {
|
|
8
|
+
readonly product: Record<string, any>;
|
|
9
|
+
};
|