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

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
@@ -1049,12 +1049,12 @@ const ControlSliderComponent = {
1049
1049
  }
1050
1050
  };
1051
1051
  const imageRevealSlider = "ImageRevealSlider-module__imageRevealSlider___UE5Ob";
1052
- const image = "ImageRevealSlider-module__image___Qjt-e";
1052
+ const image$1 = "ImageRevealSlider-module__image___Qjt-e";
1053
1053
  const link = "ImageRevealSlider-module__link___N-iLG";
1054
1054
  const cursor = "ImageRevealSlider-module__cursor___2U03d";
1055
1055
  const styles = {
1056
1056
  imageRevealSlider,
1057
- image,
1057
+ image: image$1,
1058
1058
  link,
1059
1059
  cursor
1060
1060
  };
@@ -1722,9 +1722,9 @@ const getPositionStyles = (position, offset, isEditor) => {
1722
1722
  return styles2;
1723
1723
  };
1724
1724
  function getDisplayedImageRect(img2) {
1725
- const container = img2.getBoundingClientRect();
1726
- const containerW = container.width;
1727
- const containerH = container.height;
1725
+ const container2 = img2.getBoundingClientRect();
1726
+ const containerW = container2.width;
1727
+ const containerH = container2.height;
1728
1728
  const imgW = img2.naturalWidth;
1729
1729
  const imgH = img2.naturalHeight;
1730
1730
  const containerRatio = containerW / containerH;
@@ -1737,8 +1737,8 @@ function getDisplayedImageRect(img2) {
1737
1737
  renderedH = containerH;
1738
1738
  renderedW = containerH * imgRatio;
1739
1739
  }
1740
- const offsetX = (containerW - renderedW) / 2 + container.left;
1741
- const offsetY = (containerH - renderedH) / 2 + container.top;
1740
+ const offsetX = (containerW - renderedW) / 2 + container2.left;
1741
+ const offsetY = (containerH - renderedH) / 2 + container2.top;
1742
1742
  return {
1743
1743
  x: offsetX,
1744
1744
  y: offsetY,
@@ -3426,10 +3426,12 @@ const LightboxComponent = {
3426
3426
  required: ["settings", "content", "styles"]
3427
3427
  }
3428
3428
  };
3429
+ const container = "Testimonials-module__container___H14Dc";
3429
3430
  const wrapper = "Testimonials-module__wrapper___eCRwv";
3430
3431
  const cover = "Testimonials-module__cover___5I7Fh";
3431
3432
  const caption = "Testimonials-module__caption___-YQRG";
3432
3433
  const creds = "Testimonials-module__creds___KKvX1";
3434
+ const image = "Testimonials-module__image___nHD1Y";
3433
3435
  const icon = "Testimonials-module__icon___SstqT";
3434
3436
  const arrow = "Testimonials-module__arrow___NO6BN";
3435
3437
  const nextArrow = "Testimonials-module__nextArrow___L3G-W";
@@ -3438,10 +3440,12 @@ const arrowIcon = "Testimonials-module__arrowIcon___fw7vy";
3438
3440
  const arrowImg = "Testimonials-module__arrowImg___7R9fl";
3439
3441
  const mirror = "Testimonials-module__mirror___JkFna";
3440
3442
  const classes = {
3443
+ container,
3441
3444
  wrapper,
3442
3445
  cover,
3443
3446
  caption,
3444
3447
  creds,
3448
+ image,
3445
3449
  icon,
3446
3450
  arrow,
3447
3451
  nextArrow,
@@ -3484,38 +3488,69 @@ function getAlignPosition(alignment, offset, isEditor) {
3484
3488
  }
3485
3489
  return styles2;
3486
3490
  }
3487
- const Testimonials = ({ settings, content, styles: styles2 }) => {
3491
+ const parseSpeedToMs = (speed) => {
3492
+ if (!speed) return 0;
3493
+ const match = speed.match(/^(\d+)(ms|s)$/);
3494
+ if (!match) return 0;
3495
+ const value = parseInt(match[1], 10);
3496
+ const unit = match[2];
3497
+ return unit === "s" ? value * 1e3 : value;
3498
+ };
3499
+ const Testimonials = ({ settings, content, styles: styles2, isEditor }) => {
3488
3500
  const sliderRef = useRef(null);
3489
3501
  const { general, card, controls } = settings;
3490
3502
  const { width, height } = card.dimensions;
3491
3503
  const perMove = settings.general.move === "one" ? 1 : settings.general.inView || 1;
3492
3504
  const perPage = settings.general.inView || 3;
3493
- const wrapperWidth = !settings.general.autoplay ? width * perPage + settings.card.gap * (perPage - 1) + card.borderWidth * 2 : void 0;
3505
+ const isAutoplay = settings.general.autoplay === "on";
3506
+ const marqueePerMove = isAutoplay ? 1 : perMove;
3507
+ const speedMs = isAutoplay ? settings.general.speed ? parseSpeedToMs(settings.general.speed) : 0 : 500;
3508
+ const wrapperWidth = !isAutoplay ? scalingValue(width * perPage + settings.card.gap * (perPage - 1) + card.borders.width * 2 * perPage, isEditor ?? false) : void 0;
3509
+ const splideKey = `${general.autoplay}-${general.inView}`;
3510
+ useEffect(() => {
3511
+ var _a;
3512
+ if ((_a = sliderRef.current) == null ? void 0 : _a.splide) {
3513
+ const splide = sliderRef.current.splide;
3514
+ splide.options = {
3515
+ ...splide.options,
3516
+ autoplay: isAutoplay,
3517
+ perPage,
3518
+ perMove: marqueePerMove,
3519
+ interval: isAutoplay ? speedMs || 500 : 0,
3520
+ rewind: !isAutoplay
3521
+ };
3522
+ splide.refresh();
3523
+ }
3524
+ }, [general.autoplay, general.inView, isAutoplay, perPage, marqueePerMove, speedMs]);
3494
3525
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3495
- /* @__PURE__ */ jsx("div", { style: { overflow: "hidden", display: "flex", justifyContent: settings.general.alignment }, children: /* @__PURE__ */ jsx(
3526
+ /* @__PURE__ */ jsx("div", { className: classes.container, style: { justifyContent: settings.general.alignment }, children: /* @__PURE__ */ jsx(
3496
3527
  "div",
3497
3528
  {
3498
3529
  className: `${classes.wrapper}`,
3499
- style: wrapperWidth ? { width: `${scalingValue(wrapperWidth, false)}` } : void 0,
3530
+ style: wrapperWidth ? { width: wrapperWidth } : void 0,
3500
3531
  children: /* @__PURE__ */ jsx(
3501
3532
  Splide,
3502
3533
  {
3503
3534
  ref: sliderRef,
3504
3535
  options: {
3505
3536
  type: "loop",
3506
- fixedWidth: width,
3507
- ...!settings.general.autoplay && {
3537
+ fixedWidth: scalingValue(width + card.borders.width * 2, isEditor ?? false),
3538
+ ...settings.general.autoplay === "off" && {
3508
3539
  perPage,
3509
3540
  width: wrapperWidth
3510
3541
  },
3511
3542
  arrows: false,
3512
- perMove,
3513
- gap: settings.card.gap,
3543
+ perMove: isAutoplay ? marqueePerMove : perMove,
3544
+ gap: scalingValue(settings.card.gap, isEditor ?? false),
3514
3545
  padding: 0,
3515
- autoplay: settings.general.autoplay,
3516
- speed: settings.general.speed,
3517
- interval: settings.general.autoplay ? settings.general.speed : 0,
3518
- rewind: true,
3546
+ drag: false,
3547
+ autoplay: isAutoplay,
3548
+ speed: speedMs,
3549
+ // Transition duration (default to 500ms if not set)
3550
+ interval: speedMs,
3551
+ // Match speed for continuous marquee flow
3552
+ rewind: !isAutoplay,
3553
+ // Disable rewind for smooth marquee, enable for manual mode
3519
3554
  easing: "linear",
3520
3555
  direction: settings.general.direction === "left" ? "ltr" : "rtl",
3521
3556
  pagination: false,
@@ -3524,17 +3559,71 @@ const Testimonials = ({ settings, content, styles: styles2 }) => {
3524
3559
  },
3525
3560
  children: content.map((item, index) => {
3526
3561
  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);
3562
+ const iconPositionStyles = getAlignPosition(settings.elements.icon.alignment, settings.elements.icon.offset, isEditor);
3563
+ return /* @__PURE__ */ jsx(SplideSlide, { children: /* @__PURE__ */ jsxs(
3564
+ "div",
3565
+ {
3566
+ style: {
3567
+ width: scalingValue(width, isEditor ?? false),
3568
+ height: scalingValue(height, isEditor ?? false),
3569
+ borderRadius: scalingValue(settings.card.corner, isEditor ?? false),
3570
+ border: `${scalingValue(settings.card.borders.width, isEditor ?? false)} solid ${settings.card.borders.color}`,
3571
+ overflow: "hidden",
3572
+ boxSizing: "border-box"
3573
+ },
3574
+ children: [
3575
+ /* @__PURE__ */ jsx(
3576
+ "img",
3577
+ {
3578
+ className: classes.image,
3579
+ src: (_a = item.image) == null ? void 0 : _a.url,
3580
+ alt: (_b = item.image) == null ? void 0 : _b.name,
3581
+ style: { objectFit: ((_c = item.image) == null ? void 0 : _c.objectFit) || "cover" }
3582
+ }
3583
+ ),
3584
+ /* @__PURE__ */ jsx(
3585
+ "div",
3586
+ {
3587
+ className: classes.cover,
3588
+ style: { background: settings.card.bgColor, borderRadius: `${scalingValue(settings.card.corner, isEditor ?? false)}` }
3589
+ }
3590
+ ),
3591
+ /* @__PURE__ */ jsxs("div", { children: [
3592
+ /* @__PURE__ */ jsx(
3593
+ "img",
3594
+ {
3595
+ src: (_d = item.icon) == null ? void 0 : _d.url,
3596
+ alt: (_e = item.icon) == null ? void 0 : _e.name,
3597
+ className: classes.icon,
3598
+ style: {
3599
+ ...iconPositionStyles,
3600
+ transform: `${iconPositionStyles.transform || ""} scale(${settings.elements.icon.scale / 100})`
3601
+ }
3602
+ }
3603
+ ),
3604
+ /* @__PURE__ */ jsx(
3605
+ "div",
3606
+ {
3607
+ className: classes.caption,
3608
+ style: getAlignPosition(settings.elements.text.alignment, settings.elements.text.offset, isEditor),
3609
+ children: /* @__PURE__ */ jsx(RichTextRenderer, { content: item.imageCaption })
3610
+ }
3611
+ ),
3612
+ /* @__PURE__ */ jsx(
3613
+ "div",
3614
+ {
3615
+ className: classes.creds,
3616
+ style: getAlignPosition(settings.elements.creds.alignment, settings.elements.creds.offset, isEditor),
3617
+ children: /* @__PURE__ */ jsx(RichTextRenderer, { content: item.creds })
3618
+ }
3619
+ )
3620
+ ] })
3621
+ ]
3622
+ }
3623
+ ) }, index);
3536
3624
  })
3537
- }
3625
+ },
3626
+ splideKey
3538
3627
  )
3539
3628
  }
3540
3629
  ) }),
@@ -3548,10 +3637,10 @@ const Testimonials = ({ settings, content, styles: styles2 }) => {
3548
3637
  "button",
3549
3638
  {
3550
3639
  className: classes.arrowInner,
3551
- style: { transform: `translate(${scalingValue(controls.offset.x, false)}, ${scalingValue(controls.offset.y, false)}) scale(${controls.scale / 100})` },
3640
+ style: { transform: `translate(${scalingValue(controls.offset.x, isEditor ?? false)}, ${scalingValue(controls.offset.y, isEditor ?? false)}) scale(${controls.scale / 100})` },
3552
3641
  onClick: () => {
3553
3642
  var _a;
3554
- return (_a = sliderRef.current) == null ? void 0 : _a.go("-1");
3643
+ return (_a = sliderRef.current) == null ? void 0 : _a.go(isAutoplay ? "-1" : `-${perMove}`);
3555
3644
  },
3556
3645
  "aria-label": "Previous",
3557
3646
  children: [
@@ -3579,10 +3668,10 @@ const Testimonials = ({ settings, content, styles: styles2 }) => {
3579
3668
  "button",
3580
3669
  {
3581
3670
  className: classes.arrowInner,
3582
- style: { transform: `translate(${scalingValue(controls.offset.x * -1, false)}, ${scalingValue(controls.offset.y, false)}) scale(${controls.scale / 100})` },
3671
+ style: { transform: `translate(${scalingValue(controls.offset.x * -1, isEditor ?? false)}, ${scalingValue(controls.offset.y, isEditor ?? false)}) scale(${controls.scale / 100})` },
3583
3672
  onClick: () => {
3584
3673
  var _a;
3585
- return (_a = sliderRef.current) == null ? void 0 : _a.go("+1");
3674
+ return (_a = sliderRef.current) == null ? void 0 : _a.go(isAutoplay ? "+1" : `+${perMove}`);
3586
3675
  },
3587
3676
  "aria-label": "Next",
3588
3677
  children: [
@@ -3630,20 +3719,21 @@ const TestimonialsComponent = {
3630
3719
  },
3631
3720
  properties: {
3632
3721
  general: {
3633
- title: "general",
3634
3722
  icon: "thumbnail",
3635
- tooltip: "General",
3636
3723
  type: "object",
3637
3724
  properties: {
3638
3725
  autoplay: {
3639
- type: "boolean",
3726
+ type: "string",
3727
+ title: "Autoplay",
3640
3728
  display: {
3641
- type: "setting-toggle"
3642
- }
3729
+ type: "ratio-group",
3730
+ direction: "horizontal"
3731
+ },
3732
+ enum: ["on", "off"]
3643
3733
  },
3644
3734
  inView: {
3645
3735
  type: "number",
3646
- label: "In View",
3736
+ title: "In View",
3647
3737
  min: 1,
3648
3738
  display: {
3649
3739
  type: "numeric-input"
@@ -3651,27 +3741,29 @@ const TestimonialsComponent = {
3651
3741
  },
3652
3742
  alignment: {
3653
3743
  type: "string",
3744
+ title: "Alignment",
3654
3745
  display: {
3655
- type: "ratio-group"
3746
+ type: "align-group",
3747
+ direction: "vertical"
3656
3748
  },
3657
3749
  enum: ["left", "center", "right"]
3658
3750
  },
3659
3751
  move: {
3660
3752
  type: "string",
3753
+ title: "Move",
3661
3754
  display: {
3662
- type: "ratio-group"
3755
+ type: "ratio-group",
3756
+ direction: "horizontal"
3663
3757
  },
3664
3758
  enum: ["one", "view"]
3665
3759
  },
3666
3760
  speed: {
3667
- type: "number",
3668
- label: "Speed",
3669
- min: 100,
3670
- max: 1e4,
3671
- step: 100,
3761
+ type: ["string", "null"],
3762
+ title: "Speed",
3672
3763
  display: {
3673
- type: "numeric-input"
3674
- }
3764
+ type: "step-selector"
3765
+ },
3766
+ enum: ["100ms", "250ms", "500ms", "1000ms", "1500ms", "2000ms"]
3675
3767
  },
3676
3768
  direction: {
3677
3769
  type: "string",
@@ -3681,6 +3773,7 @@ const TestimonialsComponent = {
3681
3773
  enum: ["left", "right"]
3682
3774
  },
3683
3775
  pause: {
3776
+ title: "Pause on",
3684
3777
  type: "string",
3685
3778
  display: {
3686
3779
  type: "ratio-group"
@@ -3690,21 +3783,19 @@ const TestimonialsComponent = {
3690
3783
  }
3691
3784
  },
3692
3785
  card: {
3693
- title: "card",
3694
3786
  icon: "card",
3695
- tooltip: "Card",
3696
3787
  type: "object",
3697
3788
  properties: {
3698
3789
  dimensions: {
3699
3790
  type: "object",
3700
- title: "Dimensions",
3791
+ title: "Size",
3701
3792
  display: {
3702
3793
  type: "group"
3703
3794
  },
3704
3795
  properties: {
3705
3796
  width: {
3706
3797
  type: "number",
3707
- label: "Width",
3798
+ label: "W",
3708
3799
  scalingEnabled: true,
3709
3800
  display: {
3710
3801
  type: "numeric-input",
@@ -3713,7 +3804,7 @@ const TestimonialsComponent = {
3713
3804
  },
3714
3805
  height: {
3715
3806
  type: "number",
3716
- label: "Height",
3807
+ label: "H",
3717
3808
  scalingEnabled: true,
3718
3809
  display: {
3719
3810
  type: "numeric-input",
@@ -3724,7 +3815,7 @@ const TestimonialsComponent = {
3724
3815
  },
3725
3816
  gap: {
3726
3817
  type: "number",
3727
- label: "Gap",
3818
+ title: "Gap",
3728
3819
  scalingEnabled: true,
3729
3820
  min: 0,
3730
3821
  display: {
@@ -3733,32 +3824,41 @@ const TestimonialsComponent = {
3733
3824
  },
3734
3825
  corner: {
3735
3826
  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",
3827
+ title: "Corners",
3746
3828
  scalingEnabled: true,
3747
3829
  min: 0,
3830
+ label: "icon:border-radius",
3748
3831
  display: {
3749
3832
  type: "numeric-input"
3750
3833
  }
3751
3834
  },
3752
- borderColor: {
3753
- title: "Border Color",
3754
- type: "string",
3835
+ borders: {
3836
+ type: "object",
3837
+ title: "Borders",
3755
3838
  display: {
3756
- type: "settings-color-picker",
3757
- format: "single"
3839
+ type: "group"
3840
+ },
3841
+ properties: {
3842
+ width: {
3843
+ type: "number",
3844
+ label: "icon:border-width",
3845
+ scalingEnabled: true,
3846
+ min: 0,
3847
+ display: {
3848
+ type: "numeric-input"
3849
+ }
3850
+ },
3851
+ color: {
3852
+ type: "string",
3853
+ display: {
3854
+ type: "settings-color-picker",
3855
+ format: "single"
3856
+ }
3857
+ }
3758
3858
  }
3759
3859
  },
3760
3860
  bgColor: {
3761
- title: "Background Color",
3861
+ title: "BG color",
3762
3862
  type: "string",
3763
3863
  display: {
3764
3864
  type: "settings-color-picker",
@@ -3770,12 +3870,17 @@ const TestimonialsComponent = {
3770
3870
  elements: {
3771
3871
  title: "elements",
3772
3872
  icon: "star",
3773
- tooltip: "Elements",
3774
3873
  type: "object",
3775
3874
  properties: {
3875
+ elements: {
3876
+ type: "string",
3877
+ display: {
3878
+ type: "ratio-group"
3879
+ },
3880
+ enum: ["text", "icon", "caption"]
3881
+ },
3776
3882
  text: {
3777
3883
  type: "object",
3778
- title: "Text",
3779
3884
  display: {
3780
3885
  type: "group"
3781
3886
  },
@@ -3783,7 +3888,8 @@ const TestimonialsComponent = {
3783
3888
  alignment: {
3784
3889
  type: "string",
3785
3890
  display: {
3786
- type: "position-selector"
3891
+ type: "align-grid",
3892
+ visible: true
3787
3893
  },
3788
3894
  enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
3789
3895
  },
@@ -3791,7 +3897,8 @@ const TestimonialsComponent = {
3791
3897
  type: "object",
3792
3898
  title: "Offset",
3793
3899
  display: {
3794
- type: "group"
3900
+ type: "group",
3901
+ visible: true
3795
3902
  },
3796
3903
  properties: {
3797
3904
  x: {
@@ -3818,7 +3925,6 @@ const TestimonialsComponent = {
3818
3925
  },
3819
3926
  icon: {
3820
3927
  type: "object",
3821
- title: "Icon",
3822
3928
  display: {
3823
3929
  type: "group"
3824
3930
  },
@@ -3826,7 +3932,7 @@ const TestimonialsComponent = {
3826
3932
  alignment: {
3827
3933
  type: "string",
3828
3934
  display: {
3829
- type: "position-selector"
3935
+ type: "align-grid"
3830
3936
  },
3831
3937
  enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
3832
3938
  },
@@ -3863,14 +3969,14 @@ const TestimonialsComponent = {
3863
3969
  min: 50,
3864
3970
  max: 600,
3865
3971
  display: {
3866
- type: "range-control"
3972
+ type: "range-control",
3973
+ visible: false
3867
3974
  }
3868
3975
  }
3869
3976
  }
3870
3977
  },
3871
3978
  creds: {
3872
3979
  type: "object",
3873
- title: "Credentials",
3874
3980
  display: {
3875
3981
  type: "group"
3876
3982
  },
@@ -3878,7 +3984,7 @@ const TestimonialsComponent = {
3878
3984
  alignment: {
3879
3985
  type: "string",
3880
3986
  display: {
3881
- type: "position-selector"
3987
+ type: "align-grid"
3882
3988
  },
3883
3989
  enum: ["top-left", "top-center", "top-right", "middle-left", "middle-center", "middle-right", "bottom-left", "bottom-center", "bottom-right"]
3884
3990
  },
@@ -3910,23 +4016,6 @@ const TestimonialsComponent = {
3910
4016
  }
3911
4017
  }
3912
4018
  }
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
4019
  }
3931
4020
  }
3932
4021
  },
@@ -4005,27 +4094,29 @@ const TestimonialsComponent = {
4005
4094
  },
4006
4095
  default: {
4007
4096
  general: {
4008
- autoplay: false,
4097
+ autoplay: "off",
4009
4098
  inView: 3,
4010
4099
  alignment: "center",
4011
4100
  move: "one",
4012
- speed: 3e3,
4101
+ speed: "3s",
4013
4102
  direction: "left",
4014
- pause: "hover"
4103
+ pause: "off"
4015
4104
  },
4016
4105
  card: {
4017
4106
  dimensions: {
4018
- width: 300,
4019
- height: 400
4107
+ width: 0.1,
4108
+ height: 0.2
4109
+ },
4110
+ gap: 0.02,
4111
+ corner: 0.01,
4112
+ borders: {
4113
+ width: 1e-3,
4114
+ color: "#000000"
4020
4115
  },
4021
- gap: 20,
4022
- corner: 0,
4023
- borderWidth: 0,
4024
- borderColor: "#000000",
4025
- bgColor: "#ffffff"
4116
+ bgColor: "rgba(255, 255, 255, 0.2)"
4026
4117
  },
4027
4118
  controls: {
4028
- isActive: true,
4119
+ isActive: false,
4029
4120
  arrowsImgUrl: null,
4030
4121
  offset: {
4031
4122
  x: 0,
@@ -4036,8 +4127,9 @@ const TestimonialsComponent = {
4036
4127
  hover: "#cccccc"
4037
4128
  },
4038
4129
  elements: {
4130
+ elements: "text",
4039
4131
  text: {
4040
- alignment: "bottom-center",
4132
+ alignment: "middle-left",
4041
4133
  offset: {
4042
4134
  x: 0,
4043
4135
  y: 0
@@ -4052,17 +4144,346 @@ const TestimonialsComponent = {
4052
4144
  scale: 100
4053
4145
  },
4054
4146
  creds: {
4055
- alignment: "bottom-center",
4147
+ alignment: "bottom-left",
4056
4148
  offset: {
4057
4149
  x: 0,
4058
4150
  y: 0
4059
4151
  }
4152
+ }
4153
+ }
4154
+ },
4155
+ displayRules: [
4156
+ {
4157
+ if: {
4158
+ name: "general.autoplay",
4159
+ value: "off"
4160
+ },
4161
+ then: {
4162
+ name: "properties.general.properties.inView.display.visible",
4163
+ value: true
4164
+ }
4165
+ },
4166
+ {
4167
+ if: {
4168
+ name: "general.autoplay",
4169
+ value: "off"
4170
+ },
4171
+ then: {
4172
+ name: "properties.general.properties.alignment.display.visible",
4173
+ value: true
4174
+ }
4175
+ },
4176
+ {
4177
+ if: {
4178
+ name: "general.autoplay",
4179
+ value: "off"
4060
4180
  },
4061
- cover: {
4062
- gradient: "linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%)"
4181
+ then: {
4182
+ name: "properties.general.properties.move.display.visible",
4183
+ value: true
4184
+ }
4185
+ },
4186
+ {
4187
+ if: {
4188
+ name: "general.autoplay",
4189
+ value: "on"
4190
+ },
4191
+ then: {
4192
+ name: "properties.general.properties.inView.display.visible",
4193
+ value: false
4194
+ }
4195
+ },
4196
+ {
4197
+ if: {
4198
+ name: "general.autoplay",
4199
+ value: "on"
4200
+ },
4201
+ then: {
4202
+ name: "properties.general.properties.alignment.display.visible",
4203
+ value: false
4204
+ }
4205
+ },
4206
+ {
4207
+ if: {
4208
+ name: "general.autoplay",
4209
+ value: "on"
4210
+ },
4211
+ then: {
4212
+ name: "properties.general.properties.move.display.visible",
4213
+ value: false
4214
+ }
4215
+ },
4216
+ {
4217
+ if: {
4218
+ name: "general.autoplay",
4219
+ value: "on"
4220
+ },
4221
+ then: {
4222
+ name: "properties.general.properties.speed.display.visible",
4223
+ value: true
4224
+ }
4225
+ },
4226
+ {
4227
+ if: {
4228
+ name: "general.autoplay",
4229
+ value: "on"
4230
+ },
4231
+ then: {
4232
+ name: "properties.general.properties.direction.display.visible",
4233
+ value: true
4234
+ }
4235
+ },
4236
+ {
4237
+ if: {
4238
+ name: "general.autoplay",
4239
+ value: "on"
4240
+ },
4241
+ then: {
4242
+ name: "properties.general.properties.pause.display.visible",
4243
+ value: true
4244
+ }
4245
+ },
4246
+ {
4247
+ if: {
4248
+ name: "general.autoplay",
4249
+ value: "off"
4250
+ },
4251
+ then: {
4252
+ name: "properties.general.properties.speed.display.visible",
4253
+ value: false
4254
+ }
4255
+ },
4256
+ {
4257
+ if: {
4258
+ name: "general.autoplay",
4259
+ value: "off"
4260
+ },
4261
+ then: {
4262
+ name: "properties.general.properties.direction.display.visible",
4263
+ value: false
4264
+ }
4265
+ },
4266
+ {
4267
+ if: {
4268
+ name: "general.autoplay",
4269
+ value: "off"
4270
+ },
4271
+ then: {
4272
+ name: "properties.general.properties.pause.display.visible",
4273
+ value: false
4274
+ }
4275
+ },
4276
+ {
4277
+ if: {
4278
+ name: "elements.elements",
4279
+ value: "text"
4280
+ },
4281
+ then: {
4282
+ name: "properties.elements.properties.text.properties.alignment.display.visible",
4283
+ value: true
4284
+ }
4285
+ },
4286
+ {
4287
+ if: {
4288
+ name: "elements.elements",
4289
+ value: "text"
4290
+ },
4291
+ then: {
4292
+ name: "properties.elements.properties.text.properties.offset.display.visible",
4293
+ value: true
4294
+ }
4295
+ },
4296
+ {
4297
+ if: {
4298
+ name: "elements.elements",
4299
+ value: "text"
4300
+ },
4301
+ then: {
4302
+ name: "properties.elements.properties.icon.properties.alignment.display.visible",
4303
+ value: false
4304
+ }
4305
+ },
4306
+ {
4307
+ if: {
4308
+ name: "elements.elements",
4309
+ value: "text"
4310
+ },
4311
+ then: {
4312
+ name: "properties.elements.properties.icon.properties.offset.display.visible",
4313
+ value: false
4314
+ }
4315
+ },
4316
+ {
4317
+ if: {
4318
+ name: "elements.elements",
4319
+ value: "text"
4320
+ },
4321
+ then: {
4322
+ name: "properties.elements.properties.creds.properties.alignment.display.visible",
4323
+ value: false
4324
+ }
4325
+ },
4326
+ {
4327
+ if: {
4328
+ name: "elements.elements",
4329
+ value: "text"
4330
+ },
4331
+ then: {
4332
+ name: "properties.elements.properties.creds.properties.offset.display.visible",
4333
+ value: false
4334
+ }
4335
+ },
4336
+ {
4337
+ if: {
4338
+ name: "elements.elements",
4339
+ value: "icon"
4340
+ },
4341
+ then: {
4342
+ name: "properties.elements.properties.icon.properties.alignment.display.visible",
4343
+ value: true
4344
+ }
4345
+ },
4346
+ {
4347
+ if: {
4348
+ name: "elements.elements",
4349
+ value: "icon"
4350
+ },
4351
+ then: {
4352
+ name: "properties.elements.properties.icon.properties.offset.display.visible",
4353
+ value: true
4354
+ }
4355
+ },
4356
+ {
4357
+ if: {
4358
+ name: "elements.elements",
4359
+ value: "icon"
4360
+ },
4361
+ then: {
4362
+ name: "properties.elements.properties.text.properties.alignment.display.visible",
4363
+ value: false
4364
+ }
4365
+ },
4366
+ {
4367
+ if: {
4368
+ name: "elements.elements",
4369
+ value: "icon"
4370
+ },
4371
+ then: {
4372
+ name: "properties.elements.properties.text.properties.offset.display.visible",
4373
+ value: false
4374
+ }
4375
+ },
4376
+ {
4377
+ if: {
4378
+ name: "elements.elements",
4379
+ value: "icon"
4380
+ },
4381
+ then: {
4382
+ name: "properties.elements.properties.creds.properties.alignment.display.visible",
4383
+ value: false
4384
+ }
4385
+ },
4386
+ {
4387
+ if: {
4388
+ name: "elements.elements",
4389
+ value: "icon"
4390
+ },
4391
+ then: {
4392
+ name: "properties.elements.properties.creds.properties.offset.display.visible",
4393
+ value: false
4394
+ }
4395
+ },
4396
+ {
4397
+ if: {
4398
+ name: "elements.elements",
4399
+ value: "caption"
4400
+ },
4401
+ then: {
4402
+ name: "properties.elements.properties.creds.properties.alignment.display.visible",
4403
+ value: true
4404
+ }
4405
+ },
4406
+ {
4407
+ if: {
4408
+ name: "elements.elements",
4409
+ value: "caption"
4410
+ },
4411
+ then: {
4412
+ name: "properties.elements.properties.creds.properties.offset.display.visible",
4413
+ value: true
4414
+ }
4415
+ },
4416
+ {
4417
+ if: {
4418
+ name: "elements.elements",
4419
+ value: "caption"
4420
+ },
4421
+ then: {
4422
+ name: "properties.elements.properties.text.properties.alignment.display.visible",
4423
+ value: false
4424
+ }
4425
+ },
4426
+ {
4427
+ if: {
4428
+ name: "elements.elements",
4429
+ value: "caption"
4430
+ },
4431
+ then: {
4432
+ name: "properties.elements.properties.text.properties.offset.display.visible",
4433
+ value: false
4434
+ }
4435
+ },
4436
+ {
4437
+ if: {
4438
+ name: "elements.elements",
4439
+ value: "caption"
4440
+ },
4441
+ then: {
4442
+ name: "properties.elements.properties.icon.properties.alignment.display.visible",
4443
+ value: false
4444
+ }
4445
+ },
4446
+ {
4447
+ if: {
4448
+ name: "elements.elements",
4449
+ value: "caption"
4450
+ },
4451
+ then: {
4452
+ name: "properties.elements.properties.icon.properties.offset.display.visible",
4453
+ value: false
4454
+ }
4455
+ },
4456
+ {
4457
+ if: {
4458
+ name: "elements.elements",
4459
+ value: "icon"
4460
+ },
4461
+ then: {
4462
+ name: "properties.elements.properties.icon.properties.scale.display.visible",
4463
+ value: true
4464
+ }
4465
+ },
4466
+ {
4467
+ if: {
4468
+ name: "elements.elements",
4469
+ value: "text"
4470
+ },
4471
+ then: {
4472
+ name: "properties.elements.properties.icon.properties.scale.display.visible",
4473
+ value: false
4474
+ }
4475
+ },
4476
+ {
4477
+ if: {
4478
+ name: "elements.elements",
4479
+ value: "caption"
4480
+ },
4481
+ then: {
4482
+ name: "properties.elements.properties.icon.properties.scale.display.visible",
4483
+ value: false
4063
4484
  }
4064
4485
  }
4065
- }
4486
+ ]
4066
4487
  },
4067
4488
  content: {
4068
4489
  layoutBased: false,
@@ -4119,8 +4540,8 @@ const TestimonialsComponent = {
4119
4540
  required: ["url", "name"]
4120
4541
  },
4121
4542
  imageCaption: {
4122
- placeholder: "Add Caption...",
4123
- label: "Description",
4543
+ placeholder: "Add Text...",
4544
+ label: "Text",
4124
4545
  display: {
4125
4546
  type: "rich-text",
4126
4547
  minWidth: 300,
@@ -4128,8 +4549,8 @@ const TestimonialsComponent = {
4128
4549
  }
4129
4550
  },
4130
4551
  creds: {
4131
- placeholder: "Add Credentials...",
4132
- label: "Credentials",
4552
+ placeholder: "Add Caption...",
4553
+ label: "Caption",
4133
4554
  display: {
4134
4555
  type: "rich-text",
4135
4556
  minWidth: 300,
@@ -4143,12 +4564,12 @@ const TestimonialsComponent = {
4143
4564
  {
4144
4565
  image: {
4145
4566
  objectFit: "cover",
4146
- url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMHNP08T27H1649S67NZV.png",
4567
+ url: "https://cdn.cntrl.site/component-assets/2.jpg",
4147
4568
  name: "Testimonial-1.png"
4148
4569
  },
4149
4570
  icon: {
4150
4571
  objectFit: "cover",
4151
- url: "",
4572
+ url: "https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KEXYWFPR7GB70E4YBF28T8R6.png",
4152
4573
  name: ""
4153
4574
  },
4154
4575
  imageCaption: [
@@ -4167,12 +4588,12 @@ const TestimonialsComponent = {
4167
4588
  {
4168
4589
  image: {
4169
4590
  objectFit: "cover",
4170
- url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMTZA3RYMXKF0M095D6JD.png",
4591
+ url: "https://cdn.cntrl.site/component-assets/3.jpg",
4171
4592
  name: "Testimonial-2.png"
4172
4593
  },
4173
4594
  icon: {
4174
4595
  objectFit: "cover",
4175
- url: "",
4596
+ url: "https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KEXYWFPR7GB70E4YBF28T8R6.png",
4176
4597
  name: ""
4177
4598
  },
4178
4599
  imageCaption: [
@@ -4191,12 +4612,12 @@ const TestimonialsComponent = {
4191
4612
  {
4192
4613
  image: {
4193
4614
  objectFit: "cover",
4194
- url: "https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERMVSCMPVJBG2WF5KJZYHZ.png",
4615
+ url: "https://cdn.cntrl.site/component-assets/4.jpg",
4195
4616
  name: "Testimonial-3.png"
4196
4617
  },
4197
4618
  icon: {
4198
4619
  objectFit: "cover",
4199
- url: "",
4620
+ url: "https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KEXYWFPR7GB70E4YBF28T8R6.png",
4200
4621
  name: ""
4201
4622
  },
4202
4623
  imageCaption: [