@dcodegroup-au/page-builder 0.8.2 → 0.8.4

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.
@@ -727,6 +727,9 @@ select {
727
727
  .bottom-0 {
728
728
  bottom: 0px;
729
729
  }
730
+ .bottom-10 {
731
+ bottom: 2.5rem;
732
+ }
730
733
  .bottom-\[40px\] {
731
734
  bottom: 40px;
732
735
  }
@@ -867,9 +870,6 @@ select {
867
870
  .mr-3 {
868
871
  margin-right: 0.75rem;
869
872
  }
870
- .mr-6 {
871
- margin-right: 1.5rem;
872
- }
873
873
  .mr-\[40px\] {
874
874
  margin-right: 40px;
875
875
  }
@@ -1252,6 +1252,9 @@ select {
1252
1252
  .transform {
1253
1253
  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));
1254
1254
  }
1255
+ .cursor-default {
1256
+ cursor: default;
1257
+ }
1255
1258
  .cursor-pointer {
1256
1259
  cursor: pointer;
1257
1260
  }
@@ -1270,6 +1273,9 @@ select {
1270
1273
  .grid-cols-2 {
1271
1274
  grid-template-columns: repeat(2, minmax(0, 1fr));
1272
1275
  }
1276
+ .grid-cols-3 {
1277
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1278
+ }
1273
1279
  .flex-row {
1274
1280
  flex-direction: row;
1275
1281
  }
@@ -1315,9 +1321,6 @@ select {
1315
1321
  .\!gap-4 {
1316
1322
  gap: 1rem !important;
1317
1323
  }
1318
- .gap-0 {
1319
- gap: 0px;
1320
- }
1321
1324
  .gap-1 {
1322
1325
  gap: 0.25rem;
1323
1326
  }
@@ -1388,9 +1391,6 @@ select {
1388
1391
  .rounded-\[24px\] {
1389
1392
  border-radius: 24px;
1390
1393
  }
1391
- .rounded-\[6px\] {
1392
- border-radius: 6px;
1393
- }
1394
1394
  .rounded-\[8px\] {
1395
1395
  border-radius: 8px;
1396
1396
  }
@@ -1465,10 +1465,6 @@ select {
1465
1465
  .border-none {
1466
1466
  border-style: none;
1467
1467
  }
1468
- .border-brand-200 {
1469
- --tw-border-opacity: 1;
1470
- border-color: rgb(217 176 200 / var(--tw-border-opacity, 1));
1471
- }
1472
1468
  .border-brand-300 {
1473
1469
  --tw-border-opacity: 1;
1474
1470
  border-color: rgb(199 138 173 / var(--tw-border-opacity, 1));
@@ -1505,22 +1501,18 @@ select {
1505
1501
  --tw-border-opacity: 1;
1506
1502
  border-color: rgb(209 213 219 / var(--tw-border-opacity, 1));
1507
1503
  }
1508
- .border-navy-100 {
1504
+ .border-gray-blue-200 {
1509
1505
  --tw-border-opacity: 1;
1510
- border-color: rgb(169 184 198 / var(--tw-border-opacity, 1));
1506
+ border-color: rgb(213 217 235 / var(--tw-border-opacity, 1));
1511
1507
  }
1512
- .border-navy-200 {
1508
+ .border-navy-100 {
1513
1509
  --tw-border-opacity: 1;
1514
- border-color: rgb(148 166 184 / var(--tw-border-opacity, 1));
1510
+ border-color: rgb(169 184 198 / var(--tw-border-opacity, 1));
1515
1511
  }
1516
1512
  .border-navy-25 {
1517
1513
  --tw-border-opacity: 1;
1518
1514
  border-color: rgb(239 242 245 / var(--tw-border-opacity, 1));
1519
1515
  }
1520
- .border-orange-200 {
1521
- --tw-border-opacity: 1;
1522
- border-color: rgb(249 219 175 / var(--tw-border-opacity, 1));
1523
- }
1524
1516
  .border-transparent {
1525
1517
  border-color: transparent;
1526
1518
  }
@@ -1564,10 +1556,6 @@ select {
1564
1556
  --tw-bg-opacity: 1;
1565
1557
  background-color: rgb(245 239 243 / var(--tw-bg-opacity, 1));
1566
1558
  }
1567
- .bg-brand-50 {
1568
- --tw-bg-opacity: 1;
1569
- background-color: rgb(237 222 231 / var(--tw-bg-opacity, 1));
1570
- }
1571
1559
  .bg-brand-500 {
1572
1560
  --tw-bg-opacity: 1;
1573
1561
  background-color: rgb(169 73 129 / var(--tw-bg-opacity, 1));
@@ -1600,6 +1588,10 @@ select {
1600
1588
  --tw-bg-opacity: 1;
1601
1589
  background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
1602
1590
  }
1591
+ .bg-gray-blue-50 {
1592
+ --tw-bg-opacity: 1;
1593
+ background-color: rgb(248 249 252 / var(--tw-bg-opacity, 1));
1594
+ }
1603
1595
  .bg-navy-25 {
1604
1596
  --tw-bg-opacity: 1;
1605
1597
  background-color: rgb(239 242 245 / var(--tw-bg-opacity, 1));
@@ -1620,10 +1612,6 @@ select {
1620
1612
  --tw-bg-opacity: 1;
1621
1613
  background-color: rgb(32 62 90 / var(--tw-bg-opacity, 1));
1622
1614
  }
1623
- .bg-orange-50 {
1624
- --tw-bg-opacity: 1;
1625
- background-color: rgb(254 246 238 / var(--tw-bg-opacity, 1));
1626
- }
1627
1615
  .bg-pale-100 {
1628
1616
  --tw-bg-opacity: 1;
1629
1617
  background-color: rgb(251 245 244 / var(--tw-bg-opacity, 1));
@@ -1687,6 +1675,10 @@ select {
1687
1675
  padding-left: 0px;
1688
1676
  padding-right: 0px;
1689
1677
  }
1678
+ .px-1\.5 {
1679
+ padding-left: 0.375rem;
1680
+ padding-right: 0.375rem;
1681
+ }
1690
1682
  .px-12 {
1691
1683
  padding-left: 3rem;
1692
1684
  padding-right: 3rem;
@@ -2034,6 +2026,10 @@ select {
2034
2026
  --tw-text-opacity: 1;
2035
2027
  color: rgb(17 24 39 / var(--tw-text-opacity, 1));
2036
2028
  }
2029
+ .text-gray-blue-700 {
2030
+ --tw-text-opacity: 1;
2031
+ color: rgb(54 63 114 / var(--tw-text-opacity, 1));
2032
+ }
2037
2033
  .text-navy-25 {
2038
2034
  --tw-text-opacity: 1;
2039
2035
  color: rgb(239 242 245 / var(--tw-text-opacity, 1));
@@ -2042,18 +2038,10 @@ select {
2042
2038
  --tw-text-opacity: 1;
2043
2039
  color: rgb(223 229 236 / var(--tw-text-opacity, 1));
2044
2040
  }
2045
- .text-navy-700 {
2046
- --tw-text-opacity: 1;
2047
- color: rgb(40 77 112 / var(--tw-text-opacity, 1));
2048
- }
2049
2041
  .text-navy-800 {
2050
2042
  --tw-text-opacity: 1;
2051
2043
  color: rgb(32 62 90 / var(--tw-text-opacity, 1));
2052
2044
  }
2053
- .text-orange-700 {
2054
- --tw-text-opacity: 1;
2055
- color: rgb(185 56 21 / var(--tw-text-opacity, 1));
2056
- }
2057
2045
  .text-success-500 {
2058
2046
  --tw-text-opacity: 1;
2059
2047
  color: rgb(23 178 106 / var(--tw-text-opacity, 1));
@@ -3164,6 +3152,14 @@ select {
3164
3152
  margin-top: 2rem;
3165
3153
  }
3166
3154
 
3155
+ .md\:grid {
3156
+ display: grid;
3157
+ }
3158
+
3159
+ .md\:hidden {
3160
+ display: none;
3161
+ }
3162
+
3167
3163
  .md\:h-5 {
3168
3164
  height: 1.25rem;
3169
3165
  }
@@ -3192,18 +3188,23 @@ select {
3192
3188
  max-width: 324px;
3193
3189
  }
3194
3190
 
3195
- .md\:grid-cols-2 {
3196
- grid-template-columns: repeat(2, minmax(0, 1fr));
3191
+ .md\:\!translate-x-0 {
3192
+ --tw-translate-x: 0px !important;
3193
+ 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)) !important;
3197
3194
  }
3198
3195
 
3199
- .md\:grid-cols-3 {
3200
- grid-template-columns: repeat(3, minmax(0, 1fr));
3196
+ .md\:grid-cols-2 {
3197
+ grid-template-columns: repeat(2, minmax(0, 1fr));
3201
3198
  }
3202
3199
 
3203
3200
  .md\:flex-row {
3204
3201
  flex-direction: row;
3205
3202
  }
3206
3203
 
3204
+ .md\:items-center {
3205
+ align-items: center;
3206
+ }
3207
+
3207
3208
  .md\:\!gap-8 {
3208
3209
  gap: 2rem !important;
3209
3210
  }
@@ -3247,6 +3248,11 @@ select {
3247
3248
  padding-right: 6rem;
3248
3249
  }
3249
3250
 
3251
+ .md\:px-4 {
3252
+ padding-left: 1rem;
3253
+ padding-right: 1rem;
3254
+ }
3255
+
3250
3256
  .md\:px-6 {
3251
3257
  padding-left: 1.5rem;
3252
3258
  padding-right: 1.5rem;
@@ -3907,7 +3913,7 @@ select {
3907
3913
  -webkit-line-clamp: 4; /* Limit the text to 3 lines */
3908
3914
  }
3909
3915
 
3910
- .card[data-v-77dcb437] {
3916
+ .card[data-v-269a5876] {
3911
3917
  display: flex;
3912
3918
  flex-direction: column;
3913
3919
  align-items: center;
@@ -45235,7 +45235,7 @@ const _hoisted_15$7 = {
45235
45235
  class: "flex flex-col gap-1.5"
45236
45236
  };
45237
45237
  const _hoisted_16$4 = ["onUpdate:modelValue", "maxlength"];
45238
- const _hoisted_17$2 = ["onUpdate:modelValue", "maxlength"];
45238
+ const _hoisted_17$3 = ["onUpdate:modelValue", "maxlength"];
45239
45239
  const _hoisted_18$2 = { key: 2 };
45240
45240
  const _sfc_main$C = {
45241
45241
  __name: "Links",
@@ -45416,7 +45416,7 @@ const _sfc_main$C = {
45416
45416
  maxlength: ((_b2 = componentData.value) == null ? void 0 : _b2.max_title) ?? 200,
45417
45417
  rows: "4",
45418
45418
  class: "border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
45419
- }, null, 8, _hoisted_17$2)), [
45419
+ }, null, 8, _hoisted_17$3)), [
45420
45420
  [vModelText, item.title]
45421
45421
  ]) : createCommentVNode("", true)
45422
45422
  ];
@@ -46194,7 +46194,7 @@ const _hoisted_15$6 = {
46194
46194
  class: "mb-4 px-6 py-5 rounded-xl bg-gray-50"
46195
46195
  };
46196
46196
  const _hoisted_16$3 = { class: "flex flex-col gap-1 pt-6 text-gray-600" };
46197
- const _hoisted_17$1 = ["value"];
46197
+ const _hoisted_17$2 = ["value"];
46198
46198
  const _hoisted_18$1 = {
46199
46199
  key: 1,
46200
46200
  class: "rounded-xl bg-gray-50 px-6 py-5"
@@ -46349,7 +46349,7 @@ const _sfc_main$t = {
46349
46349
  name: "url"
46350
46350
  }, [
46351
46351
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.breadcrumbs, (b) => {
46352
- return openBlock(), createElementBlock("option", { value: b }, toDisplayString(b), 9, _hoisted_17$1);
46352
+ return openBlock(), createElementBlock("option", { value: b }, toDisplayString(b), 9, _hoisted_17$2);
46353
46353
  }), 256))
46354
46354
  ], 512), [
46355
46355
  [vModelSelect, __props.modelValue.breadcrumb]
@@ -48459,7 +48459,7 @@ const _hoisted_2$h = {
48459
48459
  const _hoisted_3$g = ["src"];
48460
48460
  const _hoisted_4$g = {
48461
48461
  key: 1,
48462
- class: "flex gap-2"
48462
+ class: "flex gap-2 mb-2"
48463
48463
  };
48464
48464
  const _hoisted_5$g = { class: "mb-2" };
48465
48465
  const _hoisted_6$g = ["href"];
@@ -48545,13 +48545,13 @@ const _sfc_main$j = {
48545
48545
  var _a2;
48546
48546
  return openBlock(), createElementBlock("div", _hoisted_1$y, [
48547
48547
  createElementVNode("div", {
48548
- class: "slider-wrapper flex transition-transform duration-500 gap-0 mb-6",
48548
+ class: "slider-wrapper flex transition-transform duration-500 gap-6 mb-6",
48549
48549
  style: normalizeStyle({ transform: `translateX(-${currentSlide.value * ((windowWidth.value >= slideWidth.value ? slideWidth.value : windowWidth.value) + 24)}px)` })
48550
48550
  }, [
48551
48551
  (openBlock(), createElementBlock(Fragment, null, renderList(slides, (slide, index) => {
48552
48552
  return createElementVNode("div", {
48553
48553
  key: index,
48554
- class: normalizeClass(["slider-item flex-shrink-0 mr-6 w-[480px] max-w-full", { "h-[318px]": !__props.hasBackground, "h-full": __props.hasBackground }])
48554
+ class: normalizeClass(["slider-item flex-shrink-0 w-[480px] max-w-full", { "h-[318px]": !__props.hasBackground, "h-full": __props.hasBackground }])
48555
48555
  }, [
48556
48556
  createElementVNode("div", {
48557
48557
  class: normalizeClass(["w-full p-4 rounded-lg md:rounded-2xl", { "bg-gray-50 h-full flex flex-col justify-between": !__props.hasBackground, "bg-white": __props.hasBackground }])
@@ -48568,7 +48568,7 @@ const _sfc_main$j = {
48568
48568
  (openBlock(true), createElementBlock(Fragment, null, renderList(slide.tags, (tag) => {
48569
48569
  return openBlock(), createElementBlock("span", {
48570
48570
  key: tag,
48571
- class: "bg-navy-50 border border-navy-200 text-navy-700 px-2 py-0.5 rounded-[6px] text-sm"
48571
+ class: "border py-0.5 px-1.5 text-xs font-medium bg-gray-blue-50 border-gray-blue-200 text-gray-blue-700 rounded-md"
48572
48572
  }, toDisplayString(tag), 1);
48573
48573
  }), 128))
48574
48574
  ])) : createCommentVNode("", true),
@@ -48699,39 +48699,35 @@ function render$e(_ctx, _cache) {
48699
48699
  ]));
48700
48700
  }
48701
48701
  const PlayButton = { render: render$e };
48702
- const _hoisted_1$v = { class: "grid grid-cols-1 md:grid-cols-3 gap-6 w-full" };
48703
- const _hoisted_2$f = {
48702
+ const _hoisted_1$v = {
48704
48703
  key: 0,
48705
48704
  class: "relative group w-full object-cover rounded-lg md:rounded-2xl overflow-hidden"
48706
48705
  };
48707
- const _hoisted_3$f = {
48706
+ const _hoisted_2$f = {
48708
48707
  key: 0,
48709
48708
  class: "w-full h-[281px] md:rounded-2xl"
48710
48709
  };
48711
- const _hoisted_4$f = ["src"];
48712
- const _hoisted_5$f = ["onClick"];
48713
- const _hoisted_6$f = ["src"];
48710
+ const _hoisted_3$f = ["src"];
48711
+ const _hoisted_4$f = ["onClick"];
48712
+ const _hoisted_5$f = ["src"];
48713
+ const _hoisted_6$f = ["href"];
48714
48714
  const _hoisted_7$e = ["src"];
48715
- const _hoisted_8$d = {
48716
- key: 2,
48717
- class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4",
48718
- alt: "No Available",
48719
- src: _imports_0
48720
- };
48715
+ const _hoisted_8$d = ["href"];
48721
48716
  const _hoisted_9$d = { class: "flex flex-col gap-2 items-start text-left w-full" };
48722
48717
  const _hoisted_10$9 = {
48723
48718
  key: 0,
48724
- class: "flex gap-2"
48719
+ class: "flex gap-2 flex-wrap"
48725
48720
  };
48726
48721
  const _hoisted_11$8 = ["href"];
48727
- const _hoisted_12$6 = { class: "flex justify-between" };
48728
- const _hoisted_13$6 = ["innerHTML"];
48729
- const _hoisted_14$5 = { class: "text-gray-500 text-sm mb-4" };
48730
- const _hoisted_15$4 = {
48722
+ const _hoisted_12$6 = ["href"];
48723
+ const _hoisted_13$6 = { class: "flex justify-between" };
48724
+ const _hoisted_14$5 = ["innerHTML"];
48725
+ const _hoisted_15$4 = { class: "text-gray-500 text-sm mb-4" };
48726
+ const _hoisted_16$1 = {
48731
48727
  key: 0,
48732
48728
  class: "flex justify-center"
48733
48729
  };
48734
- const _hoisted_16$1 = ["href", "target"];
48730
+ const _hoisted_17$1 = ["href", "target"];
48735
48731
  const _sfc_main$h = {
48736
48732
  __name: "CollectionGridPresenter",
48737
48733
  props: {
@@ -48743,6 +48739,37 @@ const _sfc_main$h = {
48743
48739
  setup(__props) {
48744
48740
  var _a, _b;
48745
48741
  const props = __props;
48742
+ const currentSlide = ref(0);
48743
+ const windowWidth = ref(480);
48744
+ const slideWidth = ref(480);
48745
+ onMounted(() => {
48746
+ windowWidth.value = window.innerWidth;
48747
+ slideWidth.value = windowWidth.value - 32;
48748
+ window.addEventListener("resize", updateWidth);
48749
+ });
48750
+ onUnmounted(() => {
48751
+ window.removeEventListener("resize", updateWidth);
48752
+ });
48753
+ const activeRightButton = computed(() => {
48754
+ return currentSlide.value <= items.length - 2;
48755
+ });
48756
+ const activeLeftButton = computed(() => {
48757
+ return currentSlide.value !== 0;
48758
+ });
48759
+ const updateWidth = () => {
48760
+ windowWidth.value = window.innerWidth;
48761
+ slideWidth.value = windowWidth.value - 32;
48762
+ };
48763
+ const nextSlide = () => {
48764
+ if (currentSlide.value <= items.length - 2) {
48765
+ currentSlide.value++;
48766
+ }
48767
+ };
48768
+ const prevSlide = () => {
48769
+ if (currentSlide.value > 0) {
48770
+ currentSlide.value--;
48771
+ }
48772
+ };
48746
48773
  let items = [];
48747
48774
  if (props.component.type === "news_grid") {
48748
48775
  items = [...((_a = props.component.content) == null ? void 0 : _a.items) || []];
@@ -48776,25 +48803,28 @@ const _sfc_main$h = {
48776
48803
  return `https://www.youtube.com/embed/${id}`;
48777
48804
  };
48778
48805
  return (_ctx, _cache) => {
48779
- var _a2, _b2;
48806
+ var _a2, _b2, _c;
48780
48807
  return openBlock(), createElementBlock("div", {
48781
- class: normalizeClass(["flex flex-col items-center gap-6 pb-[40px] pt-[24px]", { "!pt-0": __props.component.hasOwnProperty("padding_top") && !((_a2 = __props.component) == null ? void 0 : _a2.padding_top) }])
48808
+ class: normalizeClass(["flex flex-col items-start md:items-center gap-6 pb-[40px] pt-[24px] relative", { "!pt-0": __props.component.hasOwnProperty("padding_top") && !((_a2 = __props.component) == null ? void 0 : _a2.padding_top) }])
48782
48809
  }, [
48783
- createElementVNode("div", _hoisted_1$v, [
48810
+ createElementVNode("div", {
48811
+ class: "flex md:grid grid-cols-3 gap-6 w-full transition-transform duration-500 md:!translate-x-0",
48812
+ style: normalizeStyle({ transform: `translateX(-${currentSlide.value * ((windowWidth.value >= slideWidth.value ? slideWidth.value : windowWidth.value) + 24)}px)` })
48813
+ }, [
48784
48814
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(items), (card, index) => {
48785
48815
  return openBlock(), createElementBlock("div", {
48786
48816
  key: index,
48787
- class: "card bg-white sm:p-0 px-4 w-full"
48817
+ class: "card bg-white sm:p-0 md:px-4 w-full flex-shrink-0"
48788
48818
  }, [
48789
- __props.component.type === "video_grid" ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
48790
- (card == null ? void 0 : card.youtube_url) && getEmbedUrl(card) ? (openBlock(), createElementBlock("div", _hoisted_3$f, [
48819
+ __props.component.type === "video_grid" ? (openBlock(), createElementBlock("div", _hoisted_1$v, [
48820
+ (card == null ? void 0 : card.youtube_url) && getEmbedUrl(card) ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
48791
48821
  createElementVNode("iframe", {
48792
48822
  src: getEmbedUrl(card),
48793
48823
  frameborder: "0",
48794
48824
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
48795
48825
  allowfullscreen: "",
48796
48826
  class: "w-full h-full"
48797
- }, null, 8, _hoisted_4$f)
48827
+ }, null, 8, _hoisted_3$f)
48798
48828
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
48799
48829
  createElementVNode("video", {
48800
48830
  onClick: ($event) => togglePlayPause(index),
@@ -48807,31 +48837,47 @@ const _sfc_main$h = {
48807
48837
  }, [
48808
48838
  createElementVNode("source", {
48809
48839
  src: `${card.video}#t=2`
48810
- }, null, 8, _hoisted_6$f)
48811
- ], 8, _hoisted_5$f),
48840
+ }, null, 8, _hoisted_5$f)
48841
+ ], 8, _hoisted_4$f),
48812
48842
  !isPlaying.value[index] ? (openBlock(), createBlock(unref(PlayButton), {
48813
48843
  key: 0,
48814
48844
  class: "cursor-pointer absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 group-hover:opacity-100 transition-opacity",
48815
48845
  onClick: ($event) => togglePlayPause(index)
48816
48846
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
48817
48847
  ], 64))
48818
- ])) : card.image ? (openBlock(), createElementBlock("img", {
48848
+ ])) : card.image ? (openBlock(), createElementBlock("a", {
48819
48849
  key: 1,
48820
- src: card.image,
48821
- alt: "Card Image",
48822
- class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4"
48823
- }, null, 8, _hoisted_7$e)) : (openBlock(), createElementBlock("img", _hoisted_8$d)),
48850
+ href: (card == null ? void 0 : card.link) ? unref(formatUrl)(card.link) : "javascript:void(0)",
48851
+ class: "mb-4 w-full",
48852
+ target: "_blank",
48853
+ rel: "noopener noreferrer"
48854
+ }, [
48855
+ createElementVNode("img", {
48856
+ src: card.image,
48857
+ alt: "Card Image",
48858
+ class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl"
48859
+ }, null, 8, _hoisted_7$e)
48860
+ ], 8, _hoisted_6$f)) : (openBlock(), createElementBlock("a", {
48861
+ key: 2,
48862
+ href: (card == null ? void 0 : card.link) ? unref(formatUrl)(card.link) : "javascript:void(0)",
48863
+ class: "mb-4 w-full",
48864
+ target: "_blank",
48865
+ rel: "noopener noreferrer"
48866
+ }, _cache[0] || (_cache[0] = [
48867
+ createElementVNode("img", {
48868
+ class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl",
48869
+ alt: "No Available",
48870
+ src: _imports_0
48871
+ }, null, -1)
48872
+ ]), 8, _hoisted_8$d)),
48824
48873
  createElementVNode("div", _hoisted_9$d, [
48825
48874
  card.categories && card.categories.length ? (openBlock(), createElementBlock("div", _hoisted_10$9, [
48826
48875
  (openBlock(true), createElementBlock(Fragment, null, renderList(card.categories, (tag) => {
48827
- return openBlock(), createElementBlock("span", {
48876
+ return openBlock(), createElementBlock("a", {
48828
48877
  key: tag,
48829
- class: normalizeClass(["border px-2 py-0.5 rounded-[6px] text-sm", {
48830
- "bg-navy-50 border-navy-200 text-navy-700": tag.style === "navy",
48831
- "bg-brand-50 border-brand-200 text-brand-700": tag.style === "brand",
48832
- "bg-orange-50 border-orange-200 text-orange-700": tag.style === "orange"
48833
- }])
48834
- }, toDisplayString(tag.name), 3);
48878
+ href: tag.link ? unref(formatUrl)(tag.link) : "javascript:void(0)",
48879
+ class: normalizeClass(["border py-0.5 px-1.5 text-xs font-medium bg-gray-blue-50 border-gray-blue-200 text-gray-blue-700 rounded-md", tag.link ? "hover:bg-gray-200" : "cursor-default"])
48880
+ }, toDisplayString(tag.name), 11, _hoisted_11$8);
48835
48881
  }), 128))
48836
48882
  ])) : createCommentVNode("", true),
48837
48883
  (card == null ? void 0 : card.link) ? (openBlock(), createElementBlock("a", {
@@ -48841,20 +48887,36 @@ const _sfc_main$h = {
48841
48887
  target: "_blank",
48842
48888
  rel: "noopener noreferrer"
48843
48889
  }, [
48844
- createElementVNode("div", _hoisted_12$6, [
48890
+ createElementVNode("div", _hoisted_13$6, [
48845
48891
  createElementVNode("span", {
48846
48892
  class: "w-5/6 leading-[28px]",
48847
48893
  innerHTML: card.title
48848
- }, null, 8, _hoisted_13$6),
48894
+ }, null, 8, _hoisted_14$5),
48849
48895
  createVNode(unref(ArrowUpRight), { class: "w-5 h-5 mt-1" })
48850
48896
  ])
48851
- ], 8, _hoisted_11$8)) : createCommentVNode("", true),
48852
- createElementVNode("p", _hoisted_14$5, toDisplayString(card.dateTime), 1)
48897
+ ], 8, _hoisted_12$6)) : createCommentVNode("", true),
48898
+ createElementVNode("p", _hoisted_15$4, toDisplayString(card.dateTime), 1)
48853
48899
  ])
48854
48900
  ]);
48855
48901
  }), 128))
48856
- ]),
48857
- Object.keys(unref(button)).length && ((_b2 = unref(button)) == null ? void 0 : _b2.show) ? (openBlock(), createElementBlock("div", _hoisted_15$4, [
48902
+ ], 4),
48903
+ createElementVNode("div", {
48904
+ class: normalizeClass(["md:hidden absolute right-0 flex gap-4", Object.keys(unref(button)).length && ((_b2 = unref(button)) == null ? void 0 : _b2.show) ? "bottom-10" : "bottom-0"])
48905
+ }, [
48906
+ createElementVNode("button", {
48907
+ onClick: prevSlide,
48908
+ class: normalizeClass(["p-2.5 bg-aqua-100 text-navy-800 rounded-full opacity-100", { "opacity-50 pointer-events-none": !activeLeftButton.value }])
48909
+ }, [
48910
+ createVNode(unref(ChevronLeft), { class: "w-6 h-6" })
48911
+ ], 2),
48912
+ createElementVNode("button", {
48913
+ onClick: nextSlide,
48914
+ class: normalizeClass(["p-2.5 bg-aqua-100 text-navy-800 rounded-full opacity-100", { "opacity-50 pointer-events-auto": !activeRightButton.value }])
48915
+ }, [
48916
+ createVNode(unref(ChevronRight), { class: "w-6 h-6" })
48917
+ ], 2)
48918
+ ], 2),
48919
+ Object.keys(unref(button)).length && ((_c = unref(button)) == null ? void 0 : _c.show) ? (openBlock(), createElementBlock("div", _hoisted_16$1, [
48858
48920
  createElementVNode("a", {
48859
48921
  class: "border-brand-300 hover:border-brand-700 border text-brand-700 h-[44px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center font-semibold text-base",
48860
48922
  href: unref(formatUrl)(unref(button).url),
@@ -48862,13 +48924,13 @@ const _sfc_main$h = {
48862
48924
  }, [
48863
48925
  createTextVNode(toDisplayString(unref(button).title) + " ", 1),
48864
48926
  createVNode(unref(ArrowUpRight), { class: "w-5 h-5" })
48865
- ], 8, _hoisted_16$1)
48927
+ ], 8, _hoisted_17$1)
48866
48928
  ])) : createCommentVNode("", true)
48867
48929
  ], 2);
48868
48930
  };
48869
48931
  }
48870
48932
  };
48871
- const CollectionGridPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-77dcb437"]]);
48933
+ const CollectionGridPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-269a5876"]]);
48872
48934
  const _hoisted_1$u = { class: "overflow-hidden" };
48873
48935
  const _sfc_main$g = {
48874
48936
  __name: "CollectionGrid",
@@ -45238,7 +45238,7 @@ ${escapeText(this.code(index, length))}
45238
45238
  class: "flex flex-col gap-1.5"
45239
45239
  };
45240
45240
  const _hoisted_16$4 = ["onUpdate:modelValue", "maxlength"];
45241
- const _hoisted_17$2 = ["onUpdate:modelValue", "maxlength"];
45241
+ const _hoisted_17$3 = ["onUpdate:modelValue", "maxlength"];
45242
45242
  const _hoisted_18$2 = { key: 2 };
45243
45243
  const _sfc_main$C = {
45244
45244
  __name: "Links",
@@ -45419,7 +45419,7 @@ ${escapeText(this.code(index, length))}
45419
45419
  maxlength: ((_b2 = componentData.value) == null ? void 0 : _b2.max_title) ?? 200,
45420
45420
  rows: "4",
45421
45421
  class: "border-1 border-solid border-gray-300 rounded-lg bg-white w-full"
45422
- }, null, 8, _hoisted_17$2)), [
45422
+ }, null, 8, _hoisted_17$3)), [
45423
45423
  [vue.vModelText, item.title]
45424
45424
  ]) : vue.createCommentVNode("", true)
45425
45425
  ];
@@ -46197,7 +46197,7 @@ ${escapeText(this.code(index, length))}
46197
46197
  class: "mb-4 px-6 py-5 rounded-xl bg-gray-50"
46198
46198
  };
46199
46199
  const _hoisted_16$3 = { class: "flex flex-col gap-1 pt-6 text-gray-600" };
46200
- const _hoisted_17$1 = ["value"];
46200
+ const _hoisted_17$2 = ["value"];
46201
46201
  const _hoisted_18$1 = {
46202
46202
  key: 1,
46203
46203
  class: "rounded-xl bg-gray-50 px-6 py-5"
@@ -46352,7 +46352,7 @@ ${escapeText(this.code(index, length))}
46352
46352
  name: "url"
46353
46353
  }, [
46354
46354
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.breadcrumbs, (b) => {
46355
- return vue.openBlock(), vue.createElementBlock("option", { value: b }, vue.toDisplayString(b), 9, _hoisted_17$1);
46355
+ return vue.openBlock(), vue.createElementBlock("option", { value: b }, vue.toDisplayString(b), 9, _hoisted_17$2);
46356
46356
  }), 256))
46357
46357
  ], 512), [
46358
46358
  [vue.vModelSelect, __props.modelValue.breadcrumb]
@@ -48462,7 +48462,7 @@ ${escapeText(this.code(index, length))}
48462
48462
  const _hoisted_3$g = ["src"];
48463
48463
  const _hoisted_4$g = {
48464
48464
  key: 1,
48465
- class: "flex gap-2"
48465
+ class: "flex gap-2 mb-2"
48466
48466
  };
48467
48467
  const _hoisted_5$g = { class: "mb-2" };
48468
48468
  const _hoisted_6$g = ["href"];
@@ -48548,13 +48548,13 @@ ${escapeText(this.code(index, length))}
48548
48548
  var _a2;
48549
48549
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
48550
48550
  vue.createElementVNode("div", {
48551
- class: "slider-wrapper flex transition-transform duration-500 gap-0 mb-6",
48551
+ class: "slider-wrapper flex transition-transform duration-500 gap-6 mb-6",
48552
48552
  style: vue.normalizeStyle({ transform: `translateX(-${currentSlide.value * ((windowWidth.value >= slideWidth.value ? slideWidth.value : windowWidth.value) + 24)}px)` })
48553
48553
  }, [
48554
48554
  (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(slides, (slide, index) => {
48555
48555
  return vue.createElementVNode("div", {
48556
48556
  key: index,
48557
- class: vue.normalizeClass(["slider-item flex-shrink-0 mr-6 w-[480px] max-w-full", { "h-[318px]": !__props.hasBackground, "h-full": __props.hasBackground }])
48557
+ class: vue.normalizeClass(["slider-item flex-shrink-0 w-[480px] max-w-full", { "h-[318px]": !__props.hasBackground, "h-full": __props.hasBackground }])
48558
48558
  }, [
48559
48559
  vue.createElementVNode("div", {
48560
48560
  class: vue.normalizeClass(["w-full p-4 rounded-lg md:rounded-2xl", { "bg-gray-50 h-full flex flex-col justify-between": !__props.hasBackground, "bg-white": __props.hasBackground }])
@@ -48571,7 +48571,7 @@ ${escapeText(this.code(index, length))}
48571
48571
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(slide.tags, (tag) => {
48572
48572
  return vue.openBlock(), vue.createElementBlock("span", {
48573
48573
  key: tag,
48574
- class: "bg-navy-50 border border-navy-200 text-navy-700 px-2 py-0.5 rounded-[6px] text-sm"
48574
+ class: "border py-0.5 px-1.5 text-xs font-medium bg-gray-blue-50 border-gray-blue-200 text-gray-blue-700 rounded-md"
48575
48575
  }, vue.toDisplayString(tag), 1);
48576
48576
  }), 128))
48577
48577
  ])) : vue.createCommentVNode("", true),
@@ -48702,39 +48702,35 @@ ${escapeText(this.code(index, length))}
48702
48702
  ]));
48703
48703
  }
48704
48704
  const PlayButton = { render: render$e };
48705
- const _hoisted_1$v = { class: "grid grid-cols-1 md:grid-cols-3 gap-6 w-full" };
48706
- const _hoisted_2$f = {
48705
+ const _hoisted_1$v = {
48707
48706
  key: 0,
48708
48707
  class: "relative group w-full object-cover rounded-lg md:rounded-2xl overflow-hidden"
48709
48708
  };
48710
- const _hoisted_3$f = {
48709
+ const _hoisted_2$f = {
48711
48710
  key: 0,
48712
48711
  class: "w-full h-[281px] md:rounded-2xl"
48713
48712
  };
48714
- const _hoisted_4$f = ["src"];
48715
- const _hoisted_5$f = ["onClick"];
48716
- const _hoisted_6$f = ["src"];
48713
+ const _hoisted_3$f = ["src"];
48714
+ const _hoisted_4$f = ["onClick"];
48715
+ const _hoisted_5$f = ["src"];
48716
+ const _hoisted_6$f = ["href"];
48717
48717
  const _hoisted_7$e = ["src"];
48718
- const _hoisted_8$d = {
48719
- key: 2,
48720
- class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4",
48721
- alt: "No Available",
48722
- src: _imports_0
48723
- };
48718
+ const _hoisted_8$d = ["href"];
48724
48719
  const _hoisted_9$d = { class: "flex flex-col gap-2 items-start text-left w-full" };
48725
48720
  const _hoisted_10$9 = {
48726
48721
  key: 0,
48727
- class: "flex gap-2"
48722
+ class: "flex gap-2 flex-wrap"
48728
48723
  };
48729
48724
  const _hoisted_11$8 = ["href"];
48730
- const _hoisted_12$6 = { class: "flex justify-between" };
48731
- const _hoisted_13$6 = ["innerHTML"];
48732
- const _hoisted_14$5 = { class: "text-gray-500 text-sm mb-4" };
48733
- const _hoisted_15$4 = {
48725
+ const _hoisted_12$6 = ["href"];
48726
+ const _hoisted_13$6 = { class: "flex justify-between" };
48727
+ const _hoisted_14$5 = ["innerHTML"];
48728
+ const _hoisted_15$4 = { class: "text-gray-500 text-sm mb-4" };
48729
+ const _hoisted_16$1 = {
48734
48730
  key: 0,
48735
48731
  class: "flex justify-center"
48736
48732
  };
48737
- const _hoisted_16$1 = ["href", "target"];
48733
+ const _hoisted_17$1 = ["href", "target"];
48738
48734
  const _sfc_main$h = {
48739
48735
  __name: "CollectionGridPresenter",
48740
48736
  props: {
@@ -48746,6 +48742,37 @@ ${escapeText(this.code(index, length))}
48746
48742
  setup(__props) {
48747
48743
  var _a, _b;
48748
48744
  const props = __props;
48745
+ const currentSlide = vue.ref(0);
48746
+ const windowWidth = vue.ref(480);
48747
+ const slideWidth = vue.ref(480);
48748
+ vue.onMounted(() => {
48749
+ windowWidth.value = window.innerWidth;
48750
+ slideWidth.value = windowWidth.value - 32;
48751
+ window.addEventListener("resize", updateWidth);
48752
+ });
48753
+ vue.onUnmounted(() => {
48754
+ window.removeEventListener("resize", updateWidth);
48755
+ });
48756
+ const activeRightButton = vue.computed(() => {
48757
+ return currentSlide.value <= items.length - 2;
48758
+ });
48759
+ const activeLeftButton = vue.computed(() => {
48760
+ return currentSlide.value !== 0;
48761
+ });
48762
+ const updateWidth = () => {
48763
+ windowWidth.value = window.innerWidth;
48764
+ slideWidth.value = windowWidth.value - 32;
48765
+ };
48766
+ const nextSlide = () => {
48767
+ if (currentSlide.value <= items.length - 2) {
48768
+ currentSlide.value++;
48769
+ }
48770
+ };
48771
+ const prevSlide = () => {
48772
+ if (currentSlide.value > 0) {
48773
+ currentSlide.value--;
48774
+ }
48775
+ };
48749
48776
  let items = [];
48750
48777
  if (props.component.type === "news_grid") {
48751
48778
  items = [...((_a = props.component.content) == null ? void 0 : _a.items) || []];
@@ -48779,25 +48806,28 @@ ${escapeText(this.code(index, length))}
48779
48806
  return `https://www.youtube.com/embed/${id}`;
48780
48807
  };
48781
48808
  return (_ctx, _cache) => {
48782
- var _a2, _b2;
48809
+ var _a2, _b2, _c;
48783
48810
  return vue.openBlock(), vue.createElementBlock("div", {
48784
- class: vue.normalizeClass(["flex flex-col items-center gap-6 pb-[40px] pt-[24px]", { "!pt-0": __props.component.hasOwnProperty("padding_top") && !((_a2 = __props.component) == null ? void 0 : _a2.padding_top) }])
48811
+ class: vue.normalizeClass(["flex flex-col items-start md:items-center gap-6 pb-[40px] pt-[24px] relative", { "!pt-0": __props.component.hasOwnProperty("padding_top") && !((_a2 = __props.component) == null ? void 0 : _a2.padding_top) }])
48785
48812
  }, [
48786
- vue.createElementVNode("div", _hoisted_1$v, [
48813
+ vue.createElementVNode("div", {
48814
+ class: "flex md:grid grid-cols-3 gap-6 w-full transition-transform duration-500 md:!translate-x-0",
48815
+ style: vue.normalizeStyle({ transform: `translateX(-${currentSlide.value * ((windowWidth.value >= slideWidth.value ? slideWidth.value : windowWidth.value) + 24)}px)` })
48816
+ }, [
48787
48817
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(items), (card, index) => {
48788
48818
  return vue.openBlock(), vue.createElementBlock("div", {
48789
48819
  key: index,
48790
- class: "card bg-white sm:p-0 px-4 w-full"
48820
+ class: "card bg-white sm:p-0 md:px-4 w-full flex-shrink-0"
48791
48821
  }, [
48792
- __props.component.type === "video_grid" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
48793
- (card == null ? void 0 : card.youtube_url) && getEmbedUrl(card) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$f, [
48822
+ __props.component.type === "video_grid" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
48823
+ (card == null ? void 0 : card.youtube_url) && getEmbedUrl(card) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$f, [
48794
48824
  vue.createElementVNode("iframe", {
48795
48825
  src: getEmbedUrl(card),
48796
48826
  frameborder: "0",
48797
48827
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
48798
48828
  allowfullscreen: "",
48799
48829
  class: "w-full h-full"
48800
- }, null, 8, _hoisted_4$f)
48830
+ }, null, 8, _hoisted_3$f)
48801
48831
  ])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
48802
48832
  vue.createElementVNode("video", {
48803
48833
  onClick: ($event) => togglePlayPause(index),
@@ -48810,31 +48840,47 @@ ${escapeText(this.code(index, length))}
48810
48840
  }, [
48811
48841
  vue.createElementVNode("source", {
48812
48842
  src: `${card.video}#t=2`
48813
- }, null, 8, _hoisted_6$f)
48814
- ], 8, _hoisted_5$f),
48843
+ }, null, 8, _hoisted_5$f)
48844
+ ], 8, _hoisted_4$f),
48815
48845
  !isPlaying.value[index] ? (vue.openBlock(), vue.createBlock(vue.unref(PlayButton), {
48816
48846
  key: 0,
48817
48847
  class: "cursor-pointer absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 group-hover:opacity-100 transition-opacity",
48818
48848
  onClick: ($event) => togglePlayPause(index)
48819
48849
  }, null, 8, ["onClick"])) : vue.createCommentVNode("", true)
48820
48850
  ], 64))
48821
- ])) : card.image ? (vue.openBlock(), vue.createElementBlock("img", {
48851
+ ])) : card.image ? (vue.openBlock(), vue.createElementBlock("a", {
48822
48852
  key: 1,
48823
- src: card.image,
48824
- alt: "Card Image",
48825
- class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4"
48826
- }, null, 8, _hoisted_7$e)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_8$d)),
48853
+ href: (card == null ? void 0 : card.link) ? vue.unref(formatUrl)(card.link) : "javascript:void(0)",
48854
+ class: "mb-4 w-full",
48855
+ target: "_blank",
48856
+ rel: "noopener noreferrer"
48857
+ }, [
48858
+ vue.createElementVNode("img", {
48859
+ src: card.image,
48860
+ alt: "Card Image",
48861
+ class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl"
48862
+ }, null, 8, _hoisted_7$e)
48863
+ ], 8, _hoisted_6$f)) : (vue.openBlock(), vue.createElementBlock("a", {
48864
+ key: 2,
48865
+ href: (card == null ? void 0 : card.link) ? vue.unref(formatUrl)(card.link) : "javascript:void(0)",
48866
+ class: "mb-4 w-full",
48867
+ target: "_blank",
48868
+ rel: "noopener noreferrer"
48869
+ }, _cache[0] || (_cache[0] = [
48870
+ vue.createElementVNode("img", {
48871
+ class: "w-full h-[281px] object-cover rounded-lg md:rounded-2xl",
48872
+ alt: "No Available",
48873
+ src: _imports_0
48874
+ }, null, -1)
48875
+ ]), 8, _hoisted_8$d)),
48827
48876
  vue.createElementVNode("div", _hoisted_9$d, [
48828
48877
  card.categories && card.categories.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$9, [
48829
48878
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(card.categories, (tag) => {
48830
- return vue.openBlock(), vue.createElementBlock("span", {
48879
+ return vue.openBlock(), vue.createElementBlock("a", {
48831
48880
  key: tag,
48832
- class: vue.normalizeClass(["border px-2 py-0.5 rounded-[6px] text-sm", {
48833
- "bg-navy-50 border-navy-200 text-navy-700": tag.style === "navy",
48834
- "bg-brand-50 border-brand-200 text-brand-700": tag.style === "brand",
48835
- "bg-orange-50 border-orange-200 text-orange-700": tag.style === "orange"
48836
- }])
48837
- }, vue.toDisplayString(tag.name), 3);
48881
+ href: tag.link ? vue.unref(formatUrl)(tag.link) : "javascript:void(0)",
48882
+ class: vue.normalizeClass(["border py-0.5 px-1.5 text-xs font-medium bg-gray-blue-50 border-gray-blue-200 text-gray-blue-700 rounded-md", tag.link ? "hover:bg-gray-200" : "cursor-default"])
48883
+ }, vue.toDisplayString(tag.name), 11, _hoisted_11$8);
48838
48884
  }), 128))
48839
48885
  ])) : vue.createCommentVNode("", true),
48840
48886
  (card == null ? void 0 : card.link) ? (vue.openBlock(), vue.createElementBlock("a", {
@@ -48844,20 +48890,36 @@ ${escapeText(this.code(index, length))}
48844
48890
  target: "_blank",
48845
48891
  rel: "noopener noreferrer"
48846
48892
  }, [
48847
- vue.createElementVNode("div", _hoisted_12$6, [
48893
+ vue.createElementVNode("div", _hoisted_13$6, [
48848
48894
  vue.createElementVNode("span", {
48849
48895
  class: "w-5/6 leading-[28px]",
48850
48896
  innerHTML: card.title
48851
- }, null, 8, _hoisted_13$6),
48897
+ }, null, 8, _hoisted_14$5),
48852
48898
  vue.createVNode(vue.unref(ArrowUpRight), { class: "w-5 h-5 mt-1" })
48853
48899
  ])
48854
- ], 8, _hoisted_11$8)) : vue.createCommentVNode("", true),
48855
- vue.createElementVNode("p", _hoisted_14$5, vue.toDisplayString(card.dateTime), 1)
48900
+ ], 8, _hoisted_12$6)) : vue.createCommentVNode("", true),
48901
+ vue.createElementVNode("p", _hoisted_15$4, vue.toDisplayString(card.dateTime), 1)
48856
48902
  ])
48857
48903
  ]);
48858
48904
  }), 128))
48859
- ]),
48860
- Object.keys(vue.unref(button)).length && ((_b2 = vue.unref(button)) == null ? void 0 : _b2.show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15$4, [
48905
+ ], 4),
48906
+ vue.createElementVNode("div", {
48907
+ class: vue.normalizeClass(["md:hidden absolute right-0 flex gap-4", Object.keys(vue.unref(button)).length && ((_b2 = vue.unref(button)) == null ? void 0 : _b2.show) ? "bottom-10" : "bottom-0"])
48908
+ }, [
48909
+ vue.createElementVNode("button", {
48910
+ onClick: prevSlide,
48911
+ class: vue.normalizeClass(["p-2.5 bg-aqua-100 text-navy-800 rounded-full opacity-100", { "opacity-50 pointer-events-none": !activeLeftButton.value }])
48912
+ }, [
48913
+ vue.createVNode(vue.unref(ChevronLeft), { class: "w-6 h-6" })
48914
+ ], 2),
48915
+ vue.createElementVNode("button", {
48916
+ onClick: nextSlide,
48917
+ class: vue.normalizeClass(["p-2.5 bg-aqua-100 text-navy-800 rounded-full opacity-100", { "opacity-50 pointer-events-auto": !activeRightButton.value }])
48918
+ }, [
48919
+ vue.createVNode(vue.unref(ChevronRight), { class: "w-6 h-6" })
48920
+ ], 2)
48921
+ ], 2),
48922
+ Object.keys(vue.unref(button)).length && ((_c = vue.unref(button)) == null ? void 0 : _c.show) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16$1, [
48861
48923
  vue.createElementVNode("a", {
48862
48924
  class: "border-brand-300 hover:border-brand-700 border text-brand-700 h-[44px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center font-semibold text-base",
48863
48925
  href: vue.unref(formatUrl)(vue.unref(button).url),
@@ -48865,13 +48927,13 @@ ${escapeText(this.code(index, length))}
48865
48927
  }, [
48866
48928
  vue.createTextVNode(vue.toDisplayString(vue.unref(button).title) + " ", 1),
48867
48929
  vue.createVNode(vue.unref(ArrowUpRight), { class: "w-5 h-5" })
48868
- ], 8, _hoisted_16$1)
48930
+ ], 8, _hoisted_17$1)
48869
48931
  ])) : vue.createCommentVNode("", true)
48870
48932
  ], 2);
48871
48933
  };
48872
48934
  }
48873
48935
  };
48874
- const CollectionGridPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-77dcb437"]]);
48936
+ const CollectionGridPresenter = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-269a5876"]]);
48875
48937
  const _hoisted_1$u = { class: "overflow-hidden" };
48876
48938
  const _sfc_main$g = {
48877
48939
  __name: "CollectionGrid",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcodegroup-au/page-builder",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./dist/page-builder.es.js"
@@ -2,13 +2,13 @@
2
2
  <div class="relative">
3
3
  <!-- Slider Wrapper -->
4
4
  <div
5
- class="slider-wrapper flex transition-transform duration-500 gap-0 mb-6"
5
+ class="slider-wrapper flex transition-transform duration-500 gap-6 mb-6"
6
6
  :style="{ transform: `translateX(-${currentSlide * ((windowWidth >= slideWidth ? slideWidth : windowWidth) + 24)}px)` }"
7
7
  >
8
8
  <div
9
9
  v-for="(slide, index) in slides"
10
10
  :key="index"
11
- class="slider-item flex-shrink-0 mr-6 w-[480px] max-w-full"
11
+ class="slider-item flex-shrink-0 w-[480px] max-w-full"
12
12
  :class="{'h-[318px]': !hasBackground, 'h-full': hasBackground}"
13
13
  >
14
14
  <div class="w-full p-4 rounded-lg md:rounded-2xl" :class="{'bg-gray-50 h-full flex flex-col justify-between': !hasBackground, 'bg-white': hasBackground}">
@@ -20,11 +20,11 @@
20
20
  class="rounded-[8px] h-[220px] w-full object-cover"
21
21
  />
22
22
  </div>
23
- <div v-if="slide.tags && slide.tags.length" class="flex gap-2">
23
+ <div v-if="slide.tags && slide.tags.length" class="flex gap-2 mb-2">
24
24
  <span
25
25
  v-for="tag in slide.tags"
26
26
  :key="tag"
27
- class="bg-navy-50 border border-navy-200 text-navy-700 px-2 py-0.5 rounded-[6px] text-sm"
27
+ class="border py-0.5 px-1.5 text-xs font-medium bg-gray-blue-50 border-gray-blue-200 text-gray-blue-700 rounded-md"
28
28
  >
29
29
  {{ tag }}
30
30
  </span>
@@ -119,8 +119,8 @@ const props = defineProps({
119
119
  const currentSlide = ref(0); // Start at 0
120
120
  const itemsToShow = ref(4); // Number of items to show at a time
121
121
  const slides = [...props.component.content?.items || []];
122
- const windowWidth = ref(480)
123
- const slideWidth = ref(480)
122
+ const windowWidth = ref(480);
123
+ const slideWidth = ref(480);
124
124
 
125
125
  onMounted(() => {
126
126
  windowWidth.value = window.innerWidth
@@ -1,7 +1,9 @@
1
1
  <template>
2
- <div class="flex flex-col items-center gap-6 pb-[40px] pt-[24px]" :class="{'!pt-0': component.hasOwnProperty('padding_top') && !component?.padding_top}">
3
- <div class="grid grid-cols-1 md:grid-cols-3 gap-6 w-full">
4
- <div v-for="(card, index) in items" :key="index" class="card bg-white sm:p-0 px-4 w-full">
2
+ <div class="flex flex-col items-start md:items-center gap-6 pb-[40px] pt-[24px] relative" :class="{'!pt-0': component.hasOwnProperty('padding_top') && !component?.padding_top}">
3
+ <div class="flex md:grid grid-cols-3 gap-6 w-full transition-transform duration-500 md:!translate-x-0"
4
+ :style="{ transform: `translateX(-${currentSlide * ((windowWidth >= slideWidth ? slideWidth : windowWidth) + 24)}px)` }"
5
+ >
6
+ <div v-for="(card, index) in items" :key="index" class="card bg-white sm:p-0 md:px-4 w-full flex-shrink-0">
5
7
  <div v-if="component.type === 'video_grid'" class="relative group w-full object-cover rounded-lg md:rounded-2xl overflow-hidden">
6
8
  <div v-if="card?.youtube_url && getEmbedUrl(card)" class="w-full h-[281px] md:rounded-2xl">
7
9
  <iframe
@@ -31,27 +33,33 @@
31
33
  </PlayButton>
32
34
  </template>
33
35
  </div>
34
- <img
35
- v-else-if="card.image"
36
- :src="card.image"
37
- alt="Card Image"
38
- class="w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4"
39
- />
40
- <img v-else class="w-full h-[281px] object-cover rounded-lg md:rounded-2xl mb-4" alt="No Available" src="@/assets/img/no_image_available.jpeg">
36
+ <a v-else-if="card.image"
37
+ :href="card?.link ? formatUrl(card.link) : 'javascript:void(0)'"
38
+ class="mb-4 w-full"
39
+ target="_blank"
40
+ rel="noopener noreferrer"
41
+ >
42
+ <img :src="card.image" alt="Card Image" class="w-full h-[281px] object-cover rounded-lg md:rounded-2xl" />
43
+ </a>
44
+ <a v-else
45
+ :href="card?.link ? formatUrl(card.link) : 'javascript:void(0)'"
46
+ class="mb-4 w-full"
47
+ target="_blank"
48
+ rel="noopener noreferrer"
49
+ >
50
+ <img class="w-full h-[281px] object-cover rounded-lg md:rounded-2xl" alt="No Available" src="@/assets/img/no_image_available.jpeg">
51
+ </a>
41
52
  <div class="flex flex-col gap-2 items-start text-left w-full">
42
- <div v-if="card.categories && card.categories.length" class="flex gap-2">
43
- <span
53
+ <div v-if="card.categories && card.categories.length" class="flex gap-2 flex-wrap">
54
+ <a
44
55
  v-for="tag in card.categories"
45
56
  :key="tag"
46
- class="border px-2 py-0.5 rounded-[6px] text-sm"
47
- :class="{
48
- 'bg-navy-50 border-navy-200 text-navy-700': tag.style === 'navy',
49
- 'bg-brand-50 border-brand-200 text-brand-700': tag.style === 'brand',
50
- 'bg-orange-50 border-orange-200 text-orange-700': tag.style === 'orange',
51
- }"
57
+ :href="tag.link ? formatUrl(tag.link) : 'javascript:void(0)'"
58
+ class="border py-0.5 px-1.5 text-xs font-medium bg-gray-blue-50 border-gray-blue-200 text-gray-blue-700 rounded-md"
59
+ :class="tag.link ? 'hover:bg-gray-200' : 'cursor-default'"
52
60
  >
53
61
  {{ tag.name }}
54
- </span>
62
+ </a>
55
63
  </div>
56
64
  <a
57
65
  v-if="card?.link"
@@ -69,6 +77,25 @@
69
77
  </div>
70
78
  </div>
71
79
  </div>
80
+ <!-- Control Buttons -->
81
+ <div class="md:hidden absolute right-0 flex gap-4"
82
+ :class="Object.keys(button).length && button?.show ? 'bottom-10' : 'bottom-0'"
83
+ >
84
+ <button
85
+ @click="prevSlide"
86
+ class="p-2.5 bg-aqua-100 text-navy-800 rounded-full opacity-100"
87
+ :class="{'opacity-50 pointer-events-none': !activeLeftButton}"
88
+ >
89
+ <ChevronLeft class="w-6 h-6" />
90
+ </button>
91
+ <button
92
+ @click="nextSlide"
93
+ class="p-2.5 bg-aqua-100 text-navy-800 rounded-full opacity-100"
94
+ :class="{'opacity-50 pointer-events-auto': !activeRightButton}"
95
+ >
96
+ <ChevronRight class="w-6 h-6" />
97
+ </button>
98
+ </div>
72
99
  <div v-if="Object.keys(button).length && button?.show" class="flex justify-center">
73
100
  <a
74
101
  class="border-brand-300 hover:border-brand-700 border text-brand-700 h-[44px] rounded-full px-[14px] py-[10px] inline-flex gap-1.5 items-center font-semibold text-base"
@@ -83,7 +110,9 @@
83
110
  </template>
84
111
 
85
112
  <script setup>
86
- import { ref } from "vue";
113
+ import { ref, onMounted, onUnmounted, computed } from 'vue';
114
+ import ChevronRight from "@/assets/img/icons/chevron-right.svg";
115
+ import ChevronLeft from "@/assets/img/icons/chevron-left.svg";
87
116
  import ArrowUpRight from "@/assets/img/icons/arrow-up-right.svg";
88
117
  import PlayButton from "@/assets/svg/play.svg";
89
118
  import { formatUrl } from "@/components/helpers/common";
@@ -95,6 +124,47 @@ const props = defineProps({
95
124
  },
96
125
  });
97
126
 
127
+ const currentSlide = ref(0);
128
+ const windowWidth = ref(480);
129
+ const slideWidth = ref(480);
130
+
131
+ onMounted(() => {
132
+ windowWidth.value = window.innerWidth
133
+ slideWidth.value = windowWidth.value - 32;
134
+ window.addEventListener('resize', updateWidth)
135
+ })
136
+
137
+ onUnmounted(() => {
138
+ window.removeEventListener('resize', updateWidth)
139
+ })
140
+
141
+ const activeRightButton = computed(() => {
142
+ return currentSlide.value <= items.length - 2;
143
+ })
144
+
145
+ const activeLeftButton = computed(() => {
146
+ return currentSlide.value !== 0;
147
+ })
148
+
149
+ const updateWidth = () => {
150
+ windowWidth.value = window.innerWidth;
151
+ slideWidth.value = windowWidth.value - 32;
152
+ }
153
+
154
+ // Navigate to the next slide
155
+ const nextSlide = () => {
156
+ if (currentSlide.value <= items.length - 2) {
157
+ currentSlide.value++;
158
+ }
159
+ };
160
+
161
+ // Navigate to the previous slide
162
+ const prevSlide = () => {
163
+ if (currentSlide.value > 0) {
164
+ currentSlide.value--;
165
+ }
166
+ };
167
+
98
168
  let items = [];
99
169
  if (props.component.type === 'news_grid') {
100
170
  items = [...props.component.content?.items || []];
@@ -78,12 +78,26 @@ module.exports = {
78
78
  },
79
79
  yellow: {
80
80
  100: '#DAAA00',
81
- }
81
+ },
82
+ "gray-blue": {
83
+ 25: "#FCFCFD",
84
+ 50: "#F8F9FC",
85
+ 100: "#EAECF5",
86
+ 200: "#D5D9EB",
87
+ 300: "#B3B8DB",
88
+ 400: "#717BBC",
89
+ 500: "#4E5BA6",
90
+ 600: "#3E4784",
91
+ 700: "#363F72",
92
+ 800: "#293056",
93
+ 900: "#101323",
94
+ 950: "#0D0F1C",
95
+ },
82
96
  },
83
97
  },
84
98
  },
85
99
  safelist: [
86
- "md:grid-cols-2",
100
+ "md:grid-cols-2", "bg-gray-blue-50", "border-gray-blue-200", "text-gray-blue-700"
87
101
  ],
88
102
  plugins: [require("@tailwindcss/forms"), require("@tailwindcss/typography")],
89
103
  };