@dcodegroup-au/page-builder 0.2.7 → 0.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/page-builder",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/page-builder.es.js"
@@ -40,7 +40,6 @@
40
40
  <div class="flex flex-col gap-1.5">
41
41
  <VFileUpload
42
42
  name="image"
43
- background="bg-white"
44
43
  v-model="item.logo"
45
44
  />
46
45
  <input-wrapper
@@ -30,8 +30,8 @@
30
30
  {{ tag }}
31
31
  </span>
32
32
  </div>
33
- <h3 class="text-[24px] font-semibold text-gray-900 mb-3 leading-[32px] mt-3">
34
- {{ slide?.title }}
33
+ <h3 class="my-3">
34
+ <a class="text-[24px] font-semibold text-gray-900 leading-[32px] hover:underline" :href="slide.url" target="_blank">{{ slide?.title }}</a>
35
35
  </h3>
36
36
  <p
37
37
  class="text-base font-normal text-gray-600 leading-[24px] multiline-ellipsis"
@@ -47,19 +47,7 @@
47
47
  </div>
48
48
  </div>
49
49
  <div class="border-t border-gray-200 mt-4 pt-[17px] flex justify-between items-center">
50
- <a
51
- v-if="slide.primary_button?.url"
52
- :href="formatUrl(slide.primary_button.url)"
53
- target="_blank"
54
- class="hover:bg-brand-600 bg-brand-500 text-white h-[40px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center shadow-xs text-sm"
55
- >
56
- <Plus v-if="slide.primary_button?.icon === 'plus'" class="w-4 h-4" />
57
- <ShoppingCart
58
- v-if="slide.primary_button?.icon === 'shopping-cart-01'"
59
- class="w-4 h-4"
60
- />
61
- {{ slide.primary_button.title }}
62
- </a>
50
+ <VCarouselPrimaryButton :button="slide.primary_button" />
63
51
  <a
64
52
  v-if="slide.secondary_button"
65
53
  target="_blank"
@@ -101,14 +89,16 @@
101
89
  </template>
102
90
 
103
91
  <script setup>
104
- import { ref } from "vue";
92
+ import { ref, inject } from "vue";
105
93
  import Clock from "@/assets/img/icons/clock.svg";
106
- import Plus from "@/assets/img/icons/plus.svg";
107
- import ShoppingCart from "@/assets/img/icons/shopping-cart-01.svg";
108
94
  import ChevronRight from "@/assets/img/icons/chevron-right.svg";
109
95
  import ChevronLeft from "@/assets/img/icons/chevron-left.svg";
110
96
  import ArrowUpRight from "@/assets/img/icons/arrow-up-right.svg";
111
97
  import Ticket from "@/assets/img/icons/ticket-02.svg";
98
+ import DefaultPrimaryButton from "@/components/presenters/overridables/VCarouselPrimaryButton.vue";
99
+
100
+ // Inject the FileUpload component or fallback to the default one
101
+ const VCarouselPrimaryButton = inject("VCarouselPrimaryButton", DefaultPrimaryButton);
112
102
 
113
103
  const props = defineProps({
114
104
  component: {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="rounded-[48px] max-w-[1392px] 1xl:max-w-[1824px] mx-auto w-full">
2
+ <div class="rounded-[48px] 1xl:max-w-[1824px] mx-auto w-full">
3
3
  <div v-for="(component, index) in section.components" class="md:px-[90px]">
4
4
  <component
5
5
  :is="currentComponent(component)"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="w-full relative" :class="{'bg-gray-50': !isHorizontal}">
2
+ <div class="w-full relative">
3
3
  <div class="1xl:max-w-[1824px] mx-auto relative flex justify-center items-center"
4
4
  :class="{'py-8': isHorizontal, 'flex-col py-6': !isHorizontal}">
5
5
  <div v-for="(component, index) in section.components">
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <a
3
+ v-if="button?.url"
4
+ :href="formatUrl(button.url)"
5
+ target="_blank"
6
+ class="hover:bg-brand-600 bg-brand-500 text-white h-[40px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center shadow-xs text-sm"
7
+ >
8
+ <Plus v-if="button?.icon === 'plus'" class="w-4 h-4" />
9
+ <ShoppingCart v-if="button?.icon === 'shopping-cart-01'" class="w-4 h-4" />
10
+ {{ button.title }}
11
+ </a>
12
+ </template>
13
+
14
+ <script setup>
15
+ import Plus from "@/assets/img/icons/plus.svg";
16
+ import ShoppingCart from "@/assets/img/icons/shopping-cart-01.svg";
17
+
18
+ const props = defineProps({
19
+ button: {
20
+ type: Object,
21
+ required: true,
22
+ },
23
+ });
24
+
25
+ const formatUrl = (url) => {
26
+ return url.startsWith("http") ? url : `//${url}`;
27
+ };
28
+ </script>