@cntrl-site/components 0.1.9-0 → 0.1.10-alpha.0

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/index.mjs CHANGED
@@ -3,17 +3,17 @@ import React, { useState, useEffect, useRef, useCallback } from "react";
3
3
  import { Splide, SplideSlide } from "@splidejs/react-splide";
4
4
  import cn from "classnames";
5
5
  import { createPortal } from "react-dom";
6
- const wrapper = "ControlSlider-module__wrapper___sHEkd";
6
+ const wrapper$1 = "ControlSlider-module__wrapper___sHEkd";
7
7
  const hoverArrow = "ControlSlider-module__hoverArrow___A-dOH";
8
8
  const sliderItem = "ControlSlider-module__sliderItem___QQSkR";
9
9
  const sliderImage = "ControlSlider-module__sliderImage___9hRl-";
10
- const arrow$1 = "ControlSlider-module__arrow___05ghY";
10
+ const arrow$2 = "ControlSlider-module__arrow___05ghY";
11
11
  const arrowVertical$1 = "ControlSlider-module__arrowVertical___tBfVN";
12
- const nextArrow$1 = "ControlSlider-module__nextArrow___-30Yc";
13
- const arrowInner$1 = "ControlSlider-module__arrowInner___aEra3";
14
- const arrowIcon = "ControlSlider-module__arrowIcon___S4ztF";
15
- const arrowImg$1 = "ControlSlider-module__arrowImg___2dwJW";
16
- const mirror$1 = "ControlSlider-module__mirror___brd6U";
12
+ const nextArrow$2 = "ControlSlider-module__nextArrow___-30Yc";
13
+ const arrowInner$2 = "ControlSlider-module__arrowInner___aEra3";
14
+ const arrowIcon$1 = "ControlSlider-module__arrowIcon___S4ztF";
15
+ const arrowImg$2 = "ControlSlider-module__arrowImg___2dwJW";
16
+ const mirror$2 = "ControlSlider-module__mirror___brd6U";
17
17
  const pagination = "ControlSlider-module__pagination___bicLF";
18
18
  const paginationInner = "ControlSlider-module__paginationInner___bT-P-";
19
19
  const paginationVertical = "ControlSlider-module__paginationVertical___zYqKw";
@@ -45,19 +45,19 @@ const bottomCenterAlignment = "ControlSlider-module__bottomCenterAlignment___c54
45
45
  const bottomRightAlignment = "ControlSlider-module__bottomRightAlignment___kEwrz";
46
46
  const clickOverlay = "ControlSlider-module__clickOverlay___DZA28";
47
47
  const contain$1 = "ControlSlider-module__contain___pLyq7";
48
- const cover$1 = "ControlSlider-module__cover___KdDat";
48
+ const cover$2 = "ControlSlider-module__cover___KdDat";
49
49
  const styles$3 = {
50
- wrapper,
50
+ wrapper: wrapper$1,
51
51
  hoverArrow,
52
52
  sliderItem,
53
53
  sliderImage,
54
- arrow: arrow$1,
54
+ arrow: arrow$2,
55
55
  arrowVertical: arrowVertical$1,
56
- nextArrow: nextArrow$1,
57
- arrowInner: arrowInner$1,
58
- arrowIcon,
59
- arrowImg: arrowImg$1,
60
- mirror: mirror$1,
56
+ nextArrow: nextArrow$2,
57
+ arrowInner: arrowInner$2,
58
+ arrowIcon: arrowIcon$1,
59
+ arrowImg: arrowImg$2,
60
+ mirror: mirror$2,
61
61
  pagination,
62
62
  paginationInner,
63
63
  paginationVertical,
@@ -89,7 +89,7 @@ const styles$3 = {
89
89
  bottomRightAlignment,
90
90
  clickOverlay,
91
91
  contain: contain$1,
92
- cover: cover$1
92
+ cover: cover$2
93
93
  };
94
94
  const link$1 = "RichTextRenderer-module__link___BWeZ2";
95
95
  const styles$2 = {
@@ -343,7 +343,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
343
343
  className: cn(styles$3.arrowImg, styles$3.mirror)
344
344
  }
345
345
  ),
346
- !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg, styles$3.mirror) })
346
+ !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon$1, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg, styles$3.mirror) })
347
347
  ]
348
348
  }
349
349
  )
@@ -378,7 +378,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
378
378
  className: styles$3.arrowImg
379
379
  }
380
380
  ),
381
- !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg) })
381
+ !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon$1, { color: controls.color, className: cn(styles$3.arrowIcon, styles$3.arrowImg) })
382
382
  ]
383
383
  }
384
384
  )
@@ -450,7 +450,7 @@ function ControlSlider({ settings, content, styles: sliderStyles, isEditor }) {
450
450
  }
451
451
  ) });
452
452
  }
453
- function ArrowIcon({ color, className }) {
453
+ function ArrowIcon$1({ color, className }) {
454
454
  return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsx("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsx("path", { d: "M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z", id: "Shape-Copy", fill: color, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
455
455
  }
456
456
  const ControlSliderComponent = {
@@ -1051,10 +1051,12 @@ const ControlSliderComponent = {
1051
1051
  const imageRevealSlider = "ImageRevealSlider-module__imageRevealSlider___UE5Ob";
1052
1052
  const image = "ImageRevealSlider-module__image___Qjt-e";
1053
1053
  const link = "ImageRevealSlider-module__link___N-iLG";
1054
+ const cursor = "ImageRevealSlider-module__cursor___2U03d";
1054
1055
  const styles = {
1055
1056
  imageRevealSlider,
1056
1057
  image,
1057
- link
1058
+ link,
1059
+ cursor
1058
1060
  };
1059
1061
  function isMouseOverImage(mouseX, mouseY, placedImages) {
1060
1062
  for (const img2 of placedImages) {
@@ -1159,8 +1161,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1159
1161
  defaultCursor,
1160
1162
  hoverCursorScale,
1161
1163
  defaultCursorScale,
1162
- placedImages,
1163
- window.scrollY
1164
+ placedImages
1164
1165
  ]);
1165
1166
  useEffect(() => {
1166
1167
  if (!isInside) {
@@ -1202,13 +1203,11 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1202
1203
  const containerHeight = rect.height;
1203
1204
  const defaultPlaced = [];
1204
1205
  const placeImages = async () => {
1205
- for (let i = 0; i < 1 && i < content.length; i++) {
1206
- const imgData = content[i];
1207
- const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1208
- defaultPlaced.push(newImg);
1209
- }
1206
+ const imgData = content[0];
1207
+ const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1208
+ defaultPlaced.push(newImg);
1210
1209
  setPlacedImages(defaultPlaced);
1211
- setCounter(1 % content.length);
1210
+ setCounter(1);
1212
1211
  };
1213
1212
  placeImages();
1214
1213
  }, [sizeType, customWidth, randomRange, revealPosition, divRef]);
@@ -1285,7 +1284,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1285
1284
  isInside && /* @__PURE__ */ jsx(
1286
1285
  "div",
1287
1286
  {
1288
- className: "cursor",
1287
+ className: styles.cursor,
1289
1288
  style: {
1290
1289
  left: `${cursorCenter.x}px`,
1291
1290
  top: `${cursorCenter.y}px`,
@@ -1623,16 +1622,16 @@ const contentStyle = "LightBox-module__contentStyle___Bgnsq";
1623
1622
  const imageStyle = "LightBox-module__imageStyle___tLIlB";
1624
1623
  const imgWrapper = "LightBox-module__imgWrapper___LuFUp";
1625
1624
  const contain = "LightBox-module__contain___8-yaS";
1626
- const cover = "LightBox-module__cover___hNvOG";
1627
- const caption = "LightBox-module__caption___b6L2I";
1625
+ const cover$1 = "LightBox-module__cover___hNvOG";
1626
+ const caption$1 = "LightBox-module__caption___b6L2I";
1628
1627
  const captionTextInner = "LightBox-module__captionTextInner___rCGNH";
1629
1628
  const lightboxSplide = "LightBox-module__lightboxSplide___XFuWC";
1630
- const arrow = "LightBox-module__arrow___iz38X";
1629
+ const arrow$1 = "LightBox-module__arrow___iz38X";
1631
1630
  const arrowVertical = "LightBox-module__arrowVertical___Zfz81";
1632
- const nextArrow = "LightBox-module__nextArrow___zkAQN";
1633
- const arrowInner = "LightBox-module__arrowInner___p48sW";
1634
- const arrowImg = "LightBox-module__arrowImg___pNV88";
1635
- const mirror = "LightBox-module__mirror___pjeXc";
1631
+ const nextArrow$1 = "LightBox-module__nextArrow___zkAQN";
1632
+ const arrowInner$1 = "LightBox-module__arrowInner___p48sW";
1633
+ const arrowImg$1 = "LightBox-module__arrowImg___pNV88";
1634
+ const mirror$1 = "LightBox-module__mirror___pjeXc";
1636
1635
  const thumbsContainerVertical = "LightBox-module__thumbsContainerVertical___wttk5";
1637
1636
  const thumbsContainer = "LightBox-module__thumbsContainer___osSma";
1638
1637
  const thumbsAlignStart = "LightBox-module__thumbsAlignStart___MO6tY";
@@ -1651,7 +1650,7 @@ const slideOutRight = "LightBox-module__slideOutRight___SK7eC";
1651
1650
  const slideOutTop = "LightBox-module__slideOutTop___Vgg0z";
1652
1651
  const slideOutBottom = "LightBox-module__slideOutBottom___nJ0Ef";
1653
1652
  const scaleSlide = "LightBox-module__scaleSlide___vZriG";
1654
- const classes = {
1653
+ const classes$1 = {
1655
1654
  heroImage,
1656
1655
  background,
1657
1656
  editor,
@@ -1659,16 +1658,16 @@ const classes = {
1659
1658
  imageStyle,
1660
1659
  imgWrapper,
1661
1660
  contain,
1662
- cover,
1663
- caption,
1661
+ cover: cover$1,
1662
+ caption: caption$1,
1664
1663
  captionTextInner,
1665
1664
  lightboxSplide,
1666
- arrow,
1665
+ arrow: arrow$1,
1667
1666
  arrowVertical,
1668
- nextArrow,
1669
- arrowInner,
1670
- arrowImg,
1671
- mirror,
1667
+ nextArrow: nextArrow$1,
1668
+ arrowInner: arrowInner$1,
1669
+ arrowImg: arrowImg$1,
1670
+ mirror: mirror$1,
1672
1671
  thumbsContainerVertical,
1673
1672
  thumbsContainer,
1674
1673
  thumbsAlignStart,
@@ -1768,76 +1767,76 @@ function getColorAlpha(color) {
1768
1767
  }
1769
1768
  function getAnimationClasses(type, direction) {
1770
1769
  const appearClass = (() => {
1771
- if (type === "fade in") return classes.fadeIn;
1770
+ if (type === "fade in") return classes$1.fadeIn;
1772
1771
  if (type === "slide in" || type === "mix") {
1773
1772
  switch (direction) {
1774
1773
  case "left":
1775
- return classes.slideInLeft;
1774
+ return classes$1.slideInLeft;
1776
1775
  case "right":
1777
- return classes.slideInRight;
1776
+ return classes$1.slideInRight;
1778
1777
  case "top":
1779
- return classes.slideInTop;
1778
+ return classes$1.slideInTop;
1780
1779
  case "bottom":
1781
- return classes.slideInBottom;
1780
+ return classes$1.slideInBottom;
1782
1781
  default:
1783
- return classes.slideInRight;
1782
+ return classes$1.slideInRight;
1784
1783
  }
1785
1784
  }
1786
- return classes.fadeIn;
1785
+ return classes$1.fadeIn;
1787
1786
  })();
1788
1787
  const backdropAppearClass = (() => {
1789
- if (type === "fade in" || type === "mix") return classes.fadeIn;
1788
+ if (type === "fade in" || type === "mix") return classes$1.fadeIn;
1790
1789
  if (type === "slide in") {
1791
1790
  switch (direction) {
1792
1791
  case "left":
1793
- return classes.slideInLeft;
1792
+ return classes$1.slideInLeft;
1794
1793
  case "right":
1795
- return classes.slideInRight;
1794
+ return classes$1.slideInRight;
1796
1795
  case "top":
1797
- return classes.slideInTop;
1796
+ return classes$1.slideInTop;
1798
1797
  case "bottom":
1799
- return classes.slideInBottom;
1798
+ return classes$1.slideInBottom;
1800
1799
  default:
1801
- return classes.slideInRight;
1800
+ return classes$1.slideInRight;
1802
1801
  }
1803
1802
  }
1804
- return classes.fadeIn;
1803
+ return classes$1.fadeIn;
1805
1804
  })();
1806
1805
  const backdropDisappearClass = (() => {
1807
- if (type === "fade in" || type === "mix") return classes.fadeOut;
1806
+ if (type === "fade in" || type === "mix") return classes$1.fadeOut;
1808
1807
  if (type === "slide in") {
1809
1808
  switch (direction) {
1810
1809
  case "left":
1811
- return classes.slideOutLeft;
1810
+ return classes$1.slideOutLeft;
1812
1811
  case "right":
1813
- return classes.slideOutRight;
1812
+ return classes$1.slideOutRight;
1814
1813
  case "top":
1815
- return classes.slideOutTop;
1814
+ return classes$1.slideOutTop;
1816
1815
  case "bottom":
1817
- return classes.slideOutBottom;
1816
+ return classes$1.slideOutBottom;
1818
1817
  default:
1819
- return classes.slideOutRight;
1818
+ return classes$1.slideOutRight;
1820
1819
  }
1821
1820
  }
1822
- return classes.fadeOut;
1821
+ return classes$1.fadeOut;
1823
1822
  })();
1824
1823
  const disappearClass = (() => {
1825
- if (type === "fade in") return classes.fadeOut;
1824
+ if (type === "fade in") return classes$1.fadeOut;
1826
1825
  if (type === "slide in" || type === "mix") {
1827
1826
  switch (direction) {
1828
1827
  case "left":
1829
- return classes.slideOutLeft;
1828
+ return classes$1.slideOutLeft;
1830
1829
  case "right":
1831
- return classes.slideOutRight;
1830
+ return classes$1.slideOutRight;
1832
1831
  case "top":
1833
- return classes.slideOutTop;
1832
+ return classes$1.slideOutTop;
1834
1833
  case "bottom":
1835
- return classes.slideOutBottom;
1834
+ return classes$1.slideOutBottom;
1836
1835
  default:
1837
- return classes.slideOutRight;
1836
+ return classes$1.slideOutRight;
1838
1837
  }
1839
1838
  }
1840
- return classes.fadeOut;
1839
+ return classes$1.fadeOut;
1841
1840
  })();
1842
1841
  return { appearClass, backdropAppearClass, backdropDisappearClass, disappearClass };
1843
1842
  }
@@ -1858,7 +1857,7 @@ const LightboxGallery = ({ settings, content, styles: styles2, portalId, activeE
1858
1857
  {
1859
1858
  src: url,
1860
1859
  alt: "Cover",
1861
- className: classes.heroImage,
1860
+ className: classes$1.heroImage,
1862
1861
  onClick: () => setOpen(true)
1863
1862
  }
1864
1863
  ),
@@ -2080,7 +2079,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2080
2079
  return;
2081
2080
  }
2082
2081
  const target = e.target;
2083
- if (target && (target.closest(`.${classes.thumbsContainer}`) || target.closest(`.${classes.thumbItem}`))) {
2082
+ if (target && (target.closest(`.${classes$1.thumbsContainer}`) || target.closest(`.${classes$1.thumbItem}`))) {
2084
2083
  return;
2085
2084
  }
2086
2085
  if (e.touches.length === 0 && e.changedTouches.length > 0) {
@@ -2128,7 +2127,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2128
2127
  "div",
2129
2128
  {
2130
2129
  ref: !isEditor ? animationTargetRef : null,
2131
- className: cn(classes.background, isClosing ? backdropDisappearClass : backdropAppearClass, { [classes.editor]: isEditor }),
2130
+ className: cn(classes$1.background, isClosing ? backdropDisappearClass : backdropAppearClass, { [classes$1.editor]: isEditor }),
2132
2131
  style: {
2133
2132
  ...backdropStyles,
2134
2133
  ...animationFinished && !isEditor && !isClosing ? { position: "absolute" } : {}
@@ -2139,7 +2138,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2139
2138
  "div",
2140
2139
  {
2141
2140
  ref: isEditor ? animationTargetRef : null,
2142
- className: cn(classes.contentStyle, !isClosing ? appearClass : disappearClass, { [classes.editor]: isEditor }),
2141
+ className: cn(classes$1.contentStyle, !isClosing ? appearClass : disappearClass, { [classes$1.editor]: isEditor }),
2143
2142
  style: {
2144
2143
  animationDuration: `${parseInt(appear.duration)}ms`,
2145
2144
  animationTimingFunction: "ease",
@@ -2151,7 +2150,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2151
2150
  {
2152
2151
  onMove: (splide) => setCurrentIndex(splide.index),
2153
2152
  ref: lightboxRef,
2154
- className: classes.lightboxSplide,
2153
+ className: classes$1.lightboxSplide,
2155
2154
  options: {
2156
2155
  arrows: false,
2157
2156
  speed: slider.duration ? parseInt(slider.duration) : 500,
@@ -2179,14 +2178,14 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2179
2178
  "--position-transform": transform || "none"
2180
2179
  };
2181
2180
  })() : { ...positionStyles, position: "absolute", padding, boxSizing: "border-box" };
2182
- return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsx("div", { className: classes.imgWrapper, onClick: handleImageWrapperClick, children: /* @__PURE__ */ jsx(
2181
+ return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsx("div", { className: classes$1.imgWrapper, onClick: handleImageWrapperClick, children: /* @__PURE__ */ jsx(
2183
2182
  "img",
2184
2183
  {
2185
2184
  ref: index === currentIndex ? imageRef : null,
2186
- className: cn(classes.imageStyle, {
2187
- [classes.contain]: item.image.objectFit === "contain",
2188
- [classes.cover]: item.image.objectFit === "cover",
2189
- [classes.scaleSlide]: slider.type === "scale"
2185
+ className: cn(classes$1.imageStyle, {
2186
+ [classes$1.contain]: item.image.objectFit === "contain",
2187
+ [classes$1.cover]: item.image.objectFit === "cover",
2188
+ [classes$1.scaleSlide]: slider.type === "scale"
2190
2189
  }),
2191
2190
  onClick: item.image.objectFit !== "contain" ? onImageClick : void 0,
2192
2191
  src: item.image.url,
@@ -2202,12 +2201,12 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2202
2201
  /* @__PURE__ */ jsx(
2203
2202
  "div",
2204
2203
  {
2205
- className: cn(classes.arrow, { [classes.arrowVertical]: slider.direction === "vert" }),
2204
+ className: cn(classes$1.arrow, { [classes$1.arrowVertical]: slider.direction === "vert" }),
2206
2205
  style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
2207
2206
  children: /* @__PURE__ */ jsx(
2208
2207
  "button",
2209
2208
  {
2210
- className: classes.arrowInner,
2209
+ className: classes$1.arrowInner,
2211
2210
  style: { transform: `translate(${scalingValue(controls.offset.x, isEditor)}, ${scalingValue(controls.offset.y * (slider.direction === "horiz" ? 1 : -1), isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
2212
2211
  onClick: () => {
2213
2212
  var _a;
@@ -2220,7 +2219,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2220
2219
  url: controls.arrowsImgUrl,
2221
2220
  fill: controls.color,
2222
2221
  hoverFill: controls.hover,
2223
- className: cn(classes.arrowImg, classes.mirror)
2222
+ className: cn(classes$1.arrowImg, classes$1.mirror)
2224
2223
  }
2225
2224
  )
2226
2225
  }
@@ -2230,12 +2229,12 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2230
2229
  /* @__PURE__ */ jsx(
2231
2230
  "div",
2232
2231
  {
2233
- className: cn(classes.arrow, classes.nextArrow, { [classes.arrowVertical]: slider.direction === "vert" }),
2232
+ className: cn(classes$1.arrow, classes$1.nextArrow, { [classes$1.arrowVertical]: slider.direction === "vert" }),
2234
2233
  style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
2235
2234
  children: /* @__PURE__ */ jsx(
2236
2235
  "button",
2237
2236
  {
2238
- className: classes.arrowInner,
2237
+ className: classes$1.arrowInner,
2239
2238
  style: { transform: `translate(${scalingValue(controls.offset.x * (slider.direction === "horiz" ? -1 : 1), isEditor)}, ${scalingValue(controls.offset.y, isEditor)}) scale(${controls.scale}) rotate(${slider.direction === "horiz" ? "0deg" : "90deg"})` },
2240
2239
  onClick: () => {
2241
2240
  var _a;
@@ -2248,7 +2247,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2248
2247
  url: controls.arrowsImgUrl,
2249
2248
  fill: controls.color,
2250
2249
  hoverFill: controls.hover,
2251
- className: classes.arrowImg
2250
+ className: classes$1.arrowImg
2252
2251
  }
2253
2252
  )
2254
2253
  }
@@ -2260,12 +2259,12 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2260
2259
  const positionStyles = getPositionStyles(area.closeIconAlign, area.closeIconOffset, isEditor);
2261
2260
  const scaleTransform = `scale(${area.closeIconScale})`;
2262
2261
  const combinedTransform = positionStyles.transform ? `${positionStyles.transform} ${scaleTransform}` : scaleTransform;
2263
- return /* @__PURE__ */ jsx("button", { className: classes.closeButton, style: { ...positionStyles, transform: combinedTransform }, onClick: handleClose, "aria-label": "Close lightbox", children: /* @__PURE__ */ jsx(SvgImage, { url: area.closeIconUrl }) });
2262
+ return /* @__PURE__ */ jsx("button", { className: classes$1.closeButton, style: { ...positionStyles, transform: combinedTransform }, onClick: handleClose, "aria-label": "Close lightbox", children: /* @__PURE__ */ jsx(SvgImage, { url: area.closeIconUrl }) });
2264
2263
  })(),
2265
2264
  caption2.isActive && /* @__PURE__ */ jsx(
2266
2265
  "div",
2267
2266
  {
2268
- className: classes.caption,
2267
+ className: classes$1.caption,
2269
2268
  style: {
2270
2269
  ...getPositionStyles(caption2.alignment, caption2.offset, isEditor),
2271
2270
  fontFamily: fontSettings.fontFamily,
@@ -2287,7 +2286,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2287
2286
  "div",
2288
2287
  {
2289
2288
  "data-styles": "caption",
2290
- className: classes.captionTextInner,
2289
+ className: classes$1.captionTextInner,
2291
2290
  style: { ["--link-hover-color"]: caption2.hover },
2292
2291
  children: /* @__PURE__ */ jsx(RichTextRenderer, { content: content[currentIndex].imageCaption })
2293
2292
  }
@@ -2297,11 +2296,11 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2297
2296
  thumbnail.isActive && /* @__PURE__ */ jsx(
2298
2297
  "div",
2299
2298
  {
2300
- className: cn(classes.thumbsContainer, {
2301
- [classes.thumbsContainerVertical]: slider.direction === "vert",
2302
- [classes.thumbsAlignStart]: thumbnail.align === "start",
2303
- [classes.thumbsAlignCenter]: thumbnail.align === "center",
2304
- [classes.thumbsAlignEnd]: thumbnail.align === "end"
2299
+ className: cn(classes$1.thumbsContainer, {
2300
+ [classes$1.thumbsContainerVertical]: slider.direction === "vert",
2301
+ [classes$1.thumbsAlignStart]: thumbnail.align === "start",
2302
+ [classes$1.thumbsAlignCenter]: thumbnail.align === "center",
2303
+ [classes$1.thumbsAlignEnd]: thumbnail.align === "end"
2305
2304
  }),
2306
2305
  style: {
2307
2306
  position: isEditor ? "absolute" : "fixed",
@@ -2335,7 +2334,7 @@ const Lightbox = ({ isOpen, onClose, content, lightboxStyles, settings, portalId
2335
2334
  return /* @__PURE__ */ jsx(
2336
2335
  "button",
2337
2336
  {
2338
- className: classes.thumbItem,
2337
+ className: classes$1.thumbItem,
2339
2338
  style: {
2340
2339
  ...slider.direction === "horiz" && thumbnail.fit !== "fit" ? { height: scalingValue(activeSizeValue, isEditor) } : {},
2341
2340
  ...slider.direction === "vert" && thumbnail.fit !== "fit" ? { width: scalingValue(activeSizeValue, isEditor) } : {},
@@ -3427,10 +3426,931 @@ const LightboxComponent = {
3427
3426
  required: ["settings", "content", "styles"]
3428
3427
  }
3429
3428
  };
3429
+ const wrapper = "Testimonials-module__wrapper___eCRwv";
3430
+ const cover = "Testimonials-module__cover___5I7Fh";
3431
+ const caption = "Testimonials-module__caption___-YQRG";
3432
+ const creds = "Testimonials-module__creds___KKvX1";
3433
+ const icon = "Testimonials-module__icon___SstqT";
3434
+ const arrow = "Testimonials-module__arrow___NO6BN";
3435
+ const nextArrow = "Testimonials-module__nextArrow___L3G-W";
3436
+ const arrowInner = "Testimonials-module__arrowInner___GSjnA";
3437
+ const arrowIcon = "Testimonials-module__arrowIcon___fw7vy";
3438
+ const arrowImg = "Testimonials-module__arrowImg___7R9fl";
3439
+ const mirror = "Testimonials-module__mirror___JkFna";
3440
+ const classes = {
3441
+ wrapper,
3442
+ cover,
3443
+ caption,
3444
+ creds,
3445
+ icon,
3446
+ arrow,
3447
+ nextArrow,
3448
+ arrowInner,
3449
+ arrowIcon,
3450
+ arrowImg,
3451
+ mirror
3452
+ };
3453
+ function getAlignPosition(alignment, offset, isEditor) {
3454
+ const styles2 = {};
3455
+ const [vertical, horizontal] = alignment.split("-");
3456
+ if (vertical === "top") {
3457
+ styles2.top = "0";
3458
+ styles2.bottom = "auto";
3459
+ } else if (vertical === "middle") {
3460
+ styles2.top = "50%";
3461
+ styles2.bottom = "auto";
3462
+ } else if (vertical === "bottom") {
3463
+ styles2.top = "auto";
3464
+ styles2.bottom = "0";
3465
+ }
3466
+ if (horizontal === "left") {
3467
+ styles2.left = "0";
3468
+ styles2.right = "auto";
3469
+ } else if (horizontal === "center") {
3470
+ styles2.left = "50%";
3471
+ styles2.right = "auto";
3472
+ } else if (horizontal === "right") {
3473
+ styles2.left = "auto";
3474
+ styles2.right = "0";
3475
+ }
3476
+ if (vertical === "middle" && horizontal === "center") {
3477
+ styles2.transform = `translate(calc(-50% + ${scalingValue(offset.x, isEditor)}), calc(-50% + ${scalingValue(offset.y, isEditor)}))`;
3478
+ } else if (vertical === "middle") {
3479
+ styles2.transform = `translate(${scalingValue(offset.x, isEditor)}, calc(-50% + ${scalingValue(offset.y, isEditor)}))`;
3480
+ } else if (horizontal === "center") {
3481
+ styles2.transform = `translate(calc(-50% + ${scalingValue(offset.x, isEditor)}), ${scalingValue(offset.y, isEditor)})`;
3482
+ } else {
3483
+ styles2.transform = `translate(${scalingValue(offset.x, isEditor)}, ${scalingValue(offset.y, isEditor)})`;
3484
+ }
3485
+ return styles2;
3486
+ }
3487
+ const Testimonials = ({ settings, content, styles: styles2 }) => {
3488
+ const sliderRef = useRef(null);
3489
+ const { general, card, controls } = settings;
3490
+ const { width, height } = card.dimensions;
3491
+ const perMove = settings.general.move === "one" ? 1 : settings.general.inView || 1;
3492
+ const perPage = settings.general.inView || 3;
3493
+ const wrapperWidth = !settings.general.autoplay ? width * perPage + settings.card.gap * (perPage - 1) + card.borderWidth * 2 : void 0;
3494
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3495
+ /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", display: "flex", justifyContent: settings.general.alignment }, children: /* @__PURE__ */ jsx(
3496
+ "div",
3497
+ {
3498
+ className: `${classes.wrapper}`,
3499
+ style: wrapperWidth ? { width: `${scalingValue(wrapperWidth, false)}` } : void 0,
3500
+ children: /* @__PURE__ */ jsx(
3501
+ Splide,
3502
+ {
3503
+ ref: sliderRef,
3504
+ options: {
3505
+ type: "loop",
3506
+ fixedWidth: width,
3507
+ ...!settings.general.autoplay && {
3508
+ perPage,
3509
+ width: wrapperWidth
3510
+ },
3511
+ arrows: false,
3512
+ perMove,
3513
+ gap: settings.card.gap,
3514
+ padding: 0,
3515
+ autoplay: settings.general.autoplay,
3516
+ speed: settings.general.speed,
3517
+ interval: settings.general.autoplay ? settings.general.speed : 0,
3518
+ rewind: true,
3519
+ easing: "linear",
3520
+ direction: settings.general.direction === "left" ? "ltr" : "rtl",
3521
+ pagination: false,
3522
+ pauseOnHover: settings.general.pause === "hover",
3523
+ pauseOnFocus: settings.general.pause === "click"
3524
+ },
3525
+ children: content.map((item, index) => {
3526
+ var _a, _b, _c, _d, _e;
3527
+ return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsxs("div", { style: { width: `${width}px`, height: `${height}px`, borderRadius: `${settings.card.corner}px`, border: `${settings.card.borderWidth}px solid ${settings.card.borderColor}`, backgroundColor: settings.card.bgColor, overflow: "hidden", boxSizing: "border-box" }, children: [
3528
+ /* @__PURE__ */ jsx("img", { src: (_a = item.image) == null ? void 0 : _a.url, alt: (_b = item.image) == null ? void 0 : _b.name, style: { width: "100%", height: "100%", objectFit: ((_c = item.image) == null ? void 0 : _c.objectFit) || "cover" } }),
3529
+ /* @__PURE__ */ jsx("div", { className: classes.cover, style: { background: settings.elements.cover.gradient, borderRadius: `${settings.card.corner}px` } }),
3530
+ /* @__PURE__ */ jsxs("div", { children: [
3531
+ /* @__PURE__ */ jsx("img", { src: (_d = item.icon) == null ? void 0 : _d.url, alt: (_e = item.icon) == null ? void 0 : _e.name, className: classes.icon, style: getAlignPosition(settings.elements.icon.alignment, settings.elements.icon.offset) }),
3532
+ /* @__PURE__ */ jsx("div", { className: classes.caption, style: getAlignPosition(settings.elements.text.alignment, settings.elements.text.offset), children: /* @__PURE__ */ jsx(RichTextRenderer, { content: item.imageCaption }) }),
3533
+ /* @__PURE__ */ jsx("div", { className: classes.creds, style: getAlignPosition(settings.elements.creds.alignment, settings.elements.creds.offset), children: /* @__PURE__ */ jsx(RichTextRenderer, { content: item.creds }) })
3534
+ ] })
3535
+ ] }) }, index);
3536
+ })
3537
+ }
3538
+ )
3539
+ }
3540
+ ) }),
3541
+ controls.isActive && /* @__PURE__ */ jsxs(Fragment, { children: [
3542
+ /* @__PURE__ */ jsx(
3543
+ "div",
3544
+ {
3545
+ className: classes.arrow,
3546
+ style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
3547
+ children: /* @__PURE__ */ jsxs(
3548
+ "button",
3549
+ {
3550
+ className: classes.arrowInner,
3551
+ style: { transform: `translate(${scalingValue(controls.offset.x, false)}, ${scalingValue(controls.offset.y, false)}) scale(${controls.scale / 100})` },
3552
+ onClick: () => {
3553
+ var _a;
3554
+ return (_a = sliderRef.current) == null ? void 0 : _a.go("-1");
3555
+ },
3556
+ "aria-label": "Previous",
3557
+ children: [
3558
+ controls.arrowsImgUrl && /* @__PURE__ */ jsx(
3559
+ SvgImage,
3560
+ {
3561
+ url: controls.arrowsImgUrl,
3562
+ fill: controls.color,
3563
+ hoverFill: controls.hover,
3564
+ className: cn(classes.arrowImg, classes.mirror)
3565
+ }
3566
+ ),
3567
+ !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon, { color: controls.color, className: cn(classes.arrowIcon, classes.arrowImg, classes.mirror) })
3568
+ ]
3569
+ }
3570
+ )
3571
+ }
3572
+ ),
3573
+ /* @__PURE__ */ jsx(
3574
+ "div",
3575
+ {
3576
+ className: cn(classes.arrow, classes.nextArrow),
3577
+ style: { color: controls.color, ["--arrow-hover-color"]: controls.hover },
3578
+ children: /* @__PURE__ */ jsxs(
3579
+ "button",
3580
+ {
3581
+ className: classes.arrowInner,
3582
+ style: { transform: `translate(${scalingValue(controls.offset.x * -1, false)}, ${scalingValue(controls.offset.y, false)}) scale(${controls.scale / 100})` },
3583
+ onClick: () => {
3584
+ var _a;
3585
+ return (_a = sliderRef.current) == null ? void 0 : _a.go("+1");
3586
+ },
3587
+ "aria-label": "Next",
3588
+ children: [
3589
+ controls.arrowsImgUrl && /* @__PURE__ */ jsx(
3590
+ SvgImage,
3591
+ {
3592
+ url: controls.arrowsImgUrl,
3593
+ fill: controls.color,
3594
+ hoverFill: controls.hover,
3595
+ className: classes.arrowImg
3596
+ }
3597
+ ),
3598
+ !controls.arrowsImgUrl && /* @__PURE__ */ jsx(ArrowIcon, { color: controls.color, className: cn(classes.arrowIcon, classes.arrowImg) })
3599
+ ]
3600
+ }
3601
+ )
3602
+ }
3603
+ )
3604
+ ] })
3605
+ ] });
3606
+ };
3607
+ function ArrowIcon({ color, className }) {
3608
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 10 18", className, children: /* @__PURE__ */ jsx("g", { id: "Symbols", stroke: "none", strokeWidth: "1", fillRule: "evenodd", children: /* @__PURE__ */ jsx("path", { d: "M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z", id: "Shape-Copy", fill: color, transform: "translate(5, 9) rotate(-90) translate(-5, -9)" }) }) });
3609
+ }
3610
+ const TestimonialsComponent = {
3611
+ element: Testimonials,
3612
+ id: "testimonials",
3613
+ name: "Testimonials",
3614
+ preview: {
3615
+ type: "video",
3616
+ url: "https://cdn.cntrl.site/component-assets/testimonials.mp4"
3617
+ },
3618
+ defaultSize: {
3619
+ width: 700,
3620
+ height: 400
3621
+ },
3622
+ schema: {
3623
+ type: "object",
3624
+ properties: {
3625
+ settings: {
3626
+ layoutBased: true,
3627
+ type: "object",
3628
+ display: {
3629
+ type: "settings-block"
3630
+ },
3631
+ properties: {
3632
+ general: {
3633
+ title: "general",
3634
+ icon: "thumbnail",
3635
+ tooltip: "General",
3636
+ type: "object",
3637
+ properties: {
3638
+ autoplay: {
3639
+ type: "boolean",
3640
+ display: {
3641
+ type: "setting-toggle"
3642
+ }
3643
+ },
3644
+ inView: {
3645
+ type: "number",
3646
+ label: "In View",
3647
+ min: 1,
3648
+ display: {
3649
+ type: "numeric-input"
3650
+ }
3651
+ },
3652
+ alignment: {
3653
+ type: "string",
3654
+ display: {
3655
+ type: "ratio-group"
3656
+ },
3657
+ enum: ["left", "center", "right"]
3658
+ },
3659
+ move: {
3660
+ type: "string",
3661
+ display: {
3662
+ type: "ratio-group"
3663
+ },
3664
+ enum: ["one", "view"]
3665
+ },
3666
+ speed: {
3667
+ type: "number",
3668
+ label: "Speed",
3669
+ min: 100,
3670
+ max: 1e4,
3671
+ step: 100,
3672
+ display: {
3673
+ type: "numeric-input"
3674
+ }
3675
+ },
3676
+ direction: {
3677
+ type: "string",
3678
+ display: {
3679
+ type: "ratio-group"
3680
+ },
3681
+ enum: ["left", "right"]
3682
+ },
3683
+ pause: {
3684
+ type: "string",
3685
+ display: {
3686
+ type: "ratio-group"
3687
+ },
3688
+ enum: ["hover", "click", "off"]
3689
+ }
3690
+ }
3691
+ },
3692
+ card: {
3693
+ title: "card",
3694
+ icon: "card",
3695
+ tooltip: "Card",
3696
+ type: "object",
3697
+ properties: {
3698
+ dimensions: {
3699
+ type: "object",
3700
+ title: "Dimensions",
3701
+ display: {
3702
+ type: "group"
3703
+ },
3704
+ properties: {
3705
+ width: {
3706
+ type: "number",
3707
+ label: "Width",
3708
+ scalingEnabled: true,
3709
+ display: {
3710
+ type: "numeric-input",
3711
+ visible: true
3712
+ }
3713
+ },
3714
+ height: {
3715
+ type: "number",
3716
+ label: "Height",
3717
+ scalingEnabled: true,
3718
+ display: {
3719
+ type: "numeric-input",
3720
+ visible: true
3721
+ }
3722
+ }
3723
+ }
3724
+ },
3725
+ gap: {
3726
+ type: "number",
3727
+ label: "Gap",
3728
+ scalingEnabled: true,
3729
+ min: 0,
3730
+ display: {
3731
+ type: "numeric-input"
3732
+ }
3733
+ },
3734
+ corner: {
3735
+ type: "number",
3736
+ label: "Corners",
3737
+ scalingEnabled: true,
3738
+ min: 0,
3739
+ display: {
3740
+ type: "numeric-input"
3741
+ }
3742
+ },
3743
+ borderWidth: {
3744
+ type: "number",
3745
+ label: "Borders",
3746
+ scalingEnabled: true,
3747
+ min: 0,
3748
+ display: {
3749
+ type: "numeric-input"
3750
+ }
3751
+ },
3752
+ borderColor: {
3753
+ title: "Border Color",
3754
+ type: "string",
3755
+ display: {
3756
+ type: "settings-color-picker",
3757
+ format: "single"
3758
+ }
3759
+ },
3760
+ bgColor: {
3761
+ title: "Background Color",
3762
+ type: "string",
3763
+ display: {
3764
+ type: "settings-color-picker",
3765
+ format: "single"
3766
+ }
3767
+ }
3768
+ }
3769
+ },
3770
+ elements: {
3771
+ title: "elements",
3772
+ icon: "star",
3773
+ tooltip: "Elements",
3774
+ type: "object",
3775
+ properties: {
3776
+ text: {
3777
+ type: "object",
3778
+ title: "Text",
3779
+ display: {
3780
+ type: "group"
3781
+ },
3782
+ properties: {
3783
+ alignment: {
3784
+ type: "string",
3785
+ display: {
3786
+ type: "position-selector"
3787
+ },
3788
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
3789
+ },
3790
+ offset: {
3791
+ type: "object",
3792
+ title: "Offset",
3793
+ display: {
3794
+ type: "group"
3795
+ },
3796
+ properties: {
3797
+ x: {
3798
+ type: "number",
3799
+ label: "X",
3800
+ scalingEnabled: true,
3801
+ display: {
3802
+ type: "numeric-input",
3803
+ visible: true
3804
+ }
3805
+ },
3806
+ y: {
3807
+ type: "number",
3808
+ label: "Y",
3809
+ scalingEnabled: true,
3810
+ display: {
3811
+ type: "numeric-input",
3812
+ visible: true
3813
+ }
3814
+ }
3815
+ }
3816
+ }
3817
+ }
3818
+ },
3819
+ icon: {
3820
+ type: "object",
3821
+ title: "Icon",
3822
+ display: {
3823
+ type: "group"
3824
+ },
3825
+ properties: {
3826
+ alignment: {
3827
+ type: "string",
3828
+ display: {
3829
+ type: "position-selector"
3830
+ },
3831
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
3832
+ },
3833
+ offset: {
3834
+ type: "object",
3835
+ title: "Offset",
3836
+ display: {
3837
+ type: "group"
3838
+ },
3839
+ properties: {
3840
+ x: {
3841
+ type: "number",
3842
+ label: "X",
3843
+ scalingEnabled: true,
3844
+ display: {
3845
+ type: "numeric-input",
3846
+ visible: true
3847
+ }
3848
+ },
3849
+ y: {
3850
+ type: "number",
3851
+ label: "Y",
3852
+ scalingEnabled: true,
3853
+ display: {
3854
+ type: "numeric-input",
3855
+ visible: true
3856
+ }
3857
+ }
3858
+ }
3859
+ },
3860
+ scale: {
3861
+ type: "number",
3862
+ title: "scale",
3863
+ min: 50,
3864
+ max: 600,
3865
+ display: {
3866
+ type: "range-control"
3867
+ }
3868
+ }
3869
+ }
3870
+ },
3871
+ creds: {
3872
+ type: "object",
3873
+ title: "Credentials",
3874
+ display: {
3875
+ type: "group"
3876
+ },
3877
+ properties: {
3878
+ alignment: {
3879
+ type: "string",
3880
+ display: {
3881
+ type: "position-selector"
3882
+ },
3883
+ enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
3884
+ },
3885
+ offset: {
3886
+ type: "object",
3887
+ title: "Offset",
3888
+ display: {
3889
+ type: "group"
3890
+ },
3891
+ properties: {
3892
+ x: {
3893
+ type: "number",
3894
+ label: "X",
3895
+ scalingEnabled: true,
3896
+ display: {
3897
+ type: "numeric-input",
3898
+ visible: true
3899
+ }
3900
+ },
3901
+ y: {
3902
+ type: "number",
3903
+ label: "Y",
3904
+ scalingEnabled: true,
3905
+ display: {
3906
+ type: "numeric-input",
3907
+ visible: true
3908
+ }
3909
+ }
3910
+ }
3911
+ }
3912
+ }
3913
+ },
3914
+ cover: {
3915
+ type: "object",
3916
+ title: "Cover",
3917
+ display: {
3918
+ type: "group"
3919
+ },
3920
+ properties: {
3921
+ gradient: {
3922
+ title: "Gradient",
3923
+ type: "string",
3924
+ display: {
3925
+ type: "settings-color-picker",
3926
+ format: "gradient"
3927
+ }
3928
+ }
3929
+ }
3930
+ }
3931
+ }
3932
+ },
3933
+ controls: {
3934
+ title: "controls",
3935
+ icon: "controls",
3936
+ tooltip: "Controls",
3937
+ type: "object",
3938
+ properties: {
3939
+ isActive: {
3940
+ type: "boolean",
3941
+ display: {
3942
+ type: "setting-toggle"
3943
+ }
3944
+ },
3945
+ arrowsImgUrl: {
3946
+ type: ["string", "null"],
3947
+ display: {
3948
+ type: "settings-image-input"
3949
+ }
3950
+ },
3951
+ offset: {
3952
+ type: "object",
3953
+ title: "Offset",
3954
+ display: {
3955
+ type: "group"
3956
+ },
3957
+ properties: {
3958
+ x: {
3959
+ type: "number",
3960
+ label: "X",
3961
+ scalingEnabled: true,
3962
+ display: {
3963
+ type: "numeric-input",
3964
+ visible: true
3965
+ }
3966
+ },
3967
+ y: {
3968
+ type: "number",
3969
+ label: "Y",
3970
+ scalingEnabled: true,
3971
+ display: {
3972
+ type: "numeric-input",
3973
+ visible: true
3974
+ }
3975
+ }
3976
+ }
3977
+ },
3978
+ scale: {
3979
+ type: "number",
3980
+ title: "scale",
3981
+ min: 50,
3982
+ max: 600,
3983
+ display: {
3984
+ type: "range-control"
3985
+ }
3986
+ },
3987
+ color: {
3988
+ title: "color",
3989
+ type: "string",
3990
+ display: {
3991
+ type: "settings-color-picker",
3992
+ format: "single"
3993
+ }
3994
+ },
3995
+ hover: {
3996
+ title: "hover",
3997
+ type: "string",
3998
+ display: {
3999
+ type: "settings-color-picker",
4000
+ format: "single"
4001
+ }
4002
+ }
4003
+ }
4004
+ }
4005
+ },
4006
+ default: {
4007
+ general: {
4008
+ autoplay: false,
4009
+ inView: 3,
4010
+ alignment: "center",
4011
+ move: "one",
4012
+ speed: 3e3,
4013
+ direction: "left",
4014
+ pause: "hover"
4015
+ },
4016
+ card: {
4017
+ dimensions: {
4018
+ width: 300,
4019
+ height: 400
4020
+ },
4021
+ gap: 20,
4022
+ corner: 0,
4023
+ borderWidth: 0,
4024
+ borderColor: "#000000",
4025
+ bgColor: "#ffffff"
4026
+ },
4027
+ controls: {
4028
+ isActive: true,
4029
+ arrowsImgUrl: null,
4030
+ offset: {
4031
+ x: 0,
4032
+ y: 0
4033
+ },
4034
+ scale: 100,
4035
+ color: "#000000",
4036
+ hover: "#cccccc"
4037
+ },
4038
+ elements: {
4039
+ text: {
4040
+ alignment: "bottom-center",
4041
+ offset: {
4042
+ x: 0,
4043
+ y: 0
4044
+ }
4045
+ },
4046
+ icon: {
4047
+ alignment: "top-left",
4048
+ offset: {
4049
+ x: 0,
4050
+ y: 0
4051
+ },
4052
+ scale: 100
4053
+ },
4054
+ creds: {
4055
+ alignment: "bottom-center",
4056
+ offset: {
4057
+ x: 0,
4058
+ y: 0
4059
+ }
4060
+ },
4061
+ cover: {
4062
+ gradient: "linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%)"
4063
+ }
4064
+ }
4065
+ }
4066
+ },
4067
+ content: {
4068
+ layoutBased: false,
4069
+ type: "array",
4070
+ settings: {
4071
+ addItemFromFileExplorer: true,
4072
+ defaultWidth: 500
4073
+ },
4074
+ items: {
4075
+ type: "object",
4076
+ properties: {
4077
+ image: {
4078
+ type: "object",
4079
+ label: "Image",
4080
+ display: {
4081
+ minWidth: 58,
4082
+ maxWidth: 108,
4083
+ type: "media-input"
4084
+ },
4085
+ properties: {
4086
+ url: {
4087
+ type: "string"
4088
+ },
4089
+ name: {
4090
+ type: "string"
4091
+ },
4092
+ objectFit: {
4093
+ type: "string",
4094
+ enum: ["cover", "contain"]
4095
+ }
4096
+ },
4097
+ required: ["url", "name"]
4098
+ },
4099
+ icon: {
4100
+ type: "object",
4101
+ label: "Icon",
4102
+ display: {
4103
+ minWidth: 58,
4104
+ maxWidth: 108,
4105
+ type: "media-input"
4106
+ },
4107
+ properties: {
4108
+ url: {
4109
+ type: "string"
4110
+ },
4111
+ name: {
4112
+ type: "string"
4113
+ },
4114
+ objectFit: {
4115
+ type: "string",
4116
+ enum: ["cover", "contain"]
4117
+ }
4118
+ },
4119
+ required: ["url", "name"]
4120
+ },
4121
+ imageCaption: {
4122
+ placeholder: "Add Caption...",
4123
+ label: "Description",
4124
+ display: {
4125
+ type: "rich-text",
4126
+ minWidth: 300,
4127
+ maxWidth: 550
4128
+ }
4129
+ },
4130
+ creds: {
4131
+ placeholder: "Add Credentials...",
4132
+ label: "Credentials",
4133
+ display: {
4134
+ type: "rich-text",
4135
+ minWidth: 300,
4136
+ maxWidth: 550
4137
+ }
4138
+ }
4139
+ },
4140
+ required: ["image"]
4141
+ },
4142
+ default: [
4143
+ {
4144
+ image: {
4145
+ objectFit: "cover",
4146
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMHNP08T27H1649S67NZV.png",
4147
+ name: "Testimonial-1.png"
4148
+ },
4149
+ icon: {
4150
+ objectFit: "cover",
4151
+ url: "",
4152
+ name: ""
4153
+ },
4154
+ imageCaption: [
4155
+ {
4156
+ type: "paragraph",
4157
+ children: [{ text: "" }]
4158
+ }
4159
+ ],
4160
+ creds: [
4161
+ {
4162
+ type: "paragraph",
4163
+ children: [{ text: "" }]
4164
+ }
4165
+ ]
4166
+ },
4167
+ {
4168
+ image: {
4169
+ objectFit: "cover",
4170
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMTZA3RYMXKF0M095D6JD.png",
4171
+ name: "Testimonial-2.png"
4172
+ },
4173
+ icon: {
4174
+ objectFit: "cover",
4175
+ url: "",
4176
+ name: ""
4177
+ },
4178
+ imageCaption: [
4179
+ {
4180
+ type: "paragraph",
4181
+ children: [{ text: "" }]
4182
+ }
4183
+ ],
4184
+ creds: [
4185
+ {
4186
+ type: "paragraph",
4187
+ children: [{ text: "" }]
4188
+ }
4189
+ ]
4190
+ },
4191
+ {
4192
+ image: {
4193
+ objectFit: "cover",
4194
+ url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMVSCMPVJBG2WF5KJZYHZ.png",
4195
+ name: "Testimonial-3.png"
4196
+ },
4197
+ icon: {
4198
+ objectFit: "cover",
4199
+ url: "",
4200
+ name: ""
4201
+ },
4202
+ imageCaption: [
4203
+ {
4204
+ type: "paragraph",
4205
+ children: [{ text: "" }]
4206
+ }
4207
+ ],
4208
+ creds: [
4209
+ {
4210
+ type: "paragraph",
4211
+ children: [{ text: "" }]
4212
+ }
4213
+ ]
4214
+ }
4215
+ ]
4216
+ },
4217
+ styles: {
4218
+ layoutBased: true,
4219
+ type: "object",
4220
+ properties: {
4221
+ caption: {
4222
+ dataName: "caption",
4223
+ type: "object",
4224
+ properties: {
4225
+ fontSettings: {
4226
+ type: "object",
4227
+ display: {
4228
+ type: "font-settings"
4229
+ },
4230
+ properties: {
4231
+ fontFamily: {
4232
+ type: "string"
4233
+ },
4234
+ fontWeight: {
4235
+ type: "number"
4236
+ },
4237
+ fontStyle: {
4238
+ type: "string"
4239
+ }
4240
+ }
4241
+ },
4242
+ widthSettings: {
4243
+ display: {
4244
+ type: "text-width-control"
4245
+ },
4246
+ type: "object",
4247
+ properties: {
4248
+ width: {
4249
+ type: "number"
4250
+ },
4251
+ sizing: {
4252
+ type: "string",
4253
+ enum: ["auto", "manual"]
4254
+ }
4255
+ }
4256
+ },
4257
+ fontSizeLineHeight: {
4258
+ type: "object",
4259
+ display: {
4260
+ type: "font-size-line-height"
4261
+ },
4262
+ properties: {
4263
+ fontSize: {
4264
+ type: "number"
4265
+ },
4266
+ lineHeight: {
4267
+ type: "number"
4268
+ }
4269
+ }
4270
+ },
4271
+ letterSpacing: {
4272
+ display: {
4273
+ type: "letter-spacing-input"
4274
+ },
4275
+ type: "number"
4276
+ },
4277
+ wordSpacing: {
4278
+ display: {
4279
+ type: "word-spacing-input"
4280
+ },
4281
+ type: "number"
4282
+ },
4283
+ textAlign: {
4284
+ display: {
4285
+ type: "text-align-control"
4286
+ },
4287
+ type: "string",
4288
+ enum: ["left", "center", "right"]
4289
+ },
4290
+ textAppearance: {
4291
+ display: {
4292
+ type: "text-appearance"
4293
+ },
4294
+ properties: {
4295
+ textTransform: {
4296
+ type: "string",
4297
+ enum: ["none", "uppercase", "lowercase"]
4298
+ },
4299
+ textDecoration: {
4300
+ type: "string",
4301
+ enum: ["none", "underline"]
4302
+ },
4303
+ fontVariant: {
4304
+ type: "string",
4305
+ enum: ["normal", "small-caps"]
4306
+ }
4307
+ }
4308
+ },
4309
+ color: {
4310
+ display: {
4311
+ type: "style-panel-color-picker"
4312
+ },
4313
+ type: "string"
4314
+ }
4315
+ }
4316
+ }
4317
+ },
4318
+ default: {
4319
+ caption: {
4320
+ widthSettings: {
4321
+ width: 0.13,
4322
+ sizing: "auto"
4323
+ },
4324
+ fontSettings: {
4325
+ fontFamily: "Arial",
4326
+ fontWeight: 400,
4327
+ fontStyle: "normal"
4328
+ },
4329
+ fontSizeLineHeight: {
4330
+ fontSize: 0.02,
4331
+ lineHeight: 0.02
4332
+ },
4333
+ letterSpacing: 0,
4334
+ wordSpacing: 0,
4335
+ textAlign: "left",
4336
+ textAppearance: {
4337
+ textTransform: "none",
4338
+ textDecoration: "none",
4339
+ fontVariant: "normal"
4340
+ },
4341
+ color: "#000000"
4342
+ }
4343
+ }
4344
+ }
4345
+ },
4346
+ required: ["settings", "content", "styles"]
4347
+ }
4348
+ };
3430
4349
  const components = [
3431
4350
  ControlSliderComponent,
3432
4351
  ControlImageRevealSliderComponent,
3433
- LightboxComponent
4352
+ LightboxComponent,
4353
+ TestimonialsComponent
3434
4354
  ];
3435
4355
  export {
3436
4356
  components