evo-vue-carousel 2.0.2 → 2.1.1

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.
@@ -574,6 +574,7 @@ var Ot = [
574
574
  "gap",
575
575
  "slideBy",
576
576
  "transitionSpeed",
577
+ "transitionDuration",
577
578
  "pauseOnHover",
578
579
  "slideTransitionTimingClass",
579
580
  "hideNavigation",
@@ -680,7 +681,7 @@ var At = (e, t = !1) => {
680
681
  }, Ht = () => v(Bt), Ut = ["aria-label"], Wt = { class: "evo-vue-carousel__content h-full max-h-full relative" }, Gt = {
681
682
  key: 0,
682
683
  class: "evo-vue-carousel__overlay absolute inset-0"
683
- }, Kt = {
684
+ }, Kt = /*@__PURE__*/ Object.assign({ name: "EvoVueCarousel" }, {
684
685
  __name: "index",
685
686
  props: /*@__PURE__*/ x({
686
687
  autoplay: {
@@ -799,6 +800,10 @@ var At = (e, t = !1) => {
799
800
  label: {
800
801
  type: String,
801
802
  default: "Image Carousel"
803
+ },
804
+ transitionDuration: {
805
+ type: Boolean,
806
+ default: !1
802
807
  }
803
808
  }, {
804
809
  modelValue: {
@@ -910,7 +915,7 @@ var At = (e, t = !1) => {
910
915
  }, 8, ["slots"])
911
916
  ], 10, Ut));
912
917
  }
913
- };
918
+ });
914
919
  //#endregion
915
920
  //#region node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
916
921
  function qt(e) {
@@ -3461,6 +3466,7 @@ var hi = /* @__PURE__ */ mi({
3461
3466
  }
3462
3467
  return r ?? e;
3463
3468
  }, bi = {
3469
+ name: "EvoVueCarouselSlide",
3464
3470
  props: {
3465
3471
  isClone: {
3466
3472
  type: Boolean,
@@ -3492,7 +3498,7 @@ var hi = /* @__PURE__ */ mi({
3492
3498
  let n = e.__vccOpts || e;
3493
3499
  for (let [e, r] of t) n[e] = r;
3494
3500
  return n;
3495
- }, Si = ["data-width", "data-height"], Ci = /*#__PURE__*/ xi({
3501
+ }, Si = ["data-width", "data-height"], Ci = /*#__PURE__*/ xi(/* @__PURE__ */ Object.assign({ name: "EvoVueCarouselSlider" }, {
3496
3502
  __name: "Slider",
3497
3503
  props: {
3498
3504
  totalSlides: {
@@ -3505,14 +3511,14 @@ var hi = /* @__PURE__ */ mi({
3505
3511
  }
3506
3512
  },
3507
3513
  setup(e) {
3508
- ae((e) => ({ v13ccef35: E.value }));
3514
+ ae((e) => ({ d62beeb4: E.value }));
3509
3515
  let t = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, n = Object.freeze({
3510
3516
  element: !0,
3511
3517
  component: !0,
3512
3518
  static: !0,
3513
3519
  comment: !1,
3514
3520
  text: !1
3515
- }), r = e, { config: i, currentIndex: a, setCurrentIndex: s, isHovered: c, isNavigating: u, setIsNavigating: d, pauseAutoplay: p, resumeAutoplay: m, autoplayIsActive: h } = Rt(), _ = D(!0), v = (e, t) => e / t * 100, y = D(0), b = D(0), x = D(0), ee = o(() => Ge(x.value + 1, x.value + 1 + i.value.perPage)), te = o(() => ({
3521
+ }), r = e, { config: i, currentIndex: a, setCurrentIndex: s, isHovered: c, isNavigating: u, setIsNavigating: d, pauseAutoplay: p, resumeAutoplay: m, autoplayIsActive: h } = Rt(), _ = D(!0), v = (e, t) => i.value.transitionDuration ? i.value.transitionDuration : e / t * 100, y = D(0), b = D(0), x = D(0), ee = o(() => Ge(x.value + 1, x.value + 1 + i.value.perPage)), te = o(() => ({
3516
3522
  transform: `translate3d(${y.value}px, 0, 0)`,
3517
3523
  transitionDuration: `${v(O.value, i.value.transitionSpeed)}ms`
3518
3524
  })), C = (e) => {
@@ -3524,17 +3530,18 @@ var hi = /* @__PURE__ */ mi({
3524
3530
  });
3525
3531
  P(() => r.isInit, async (e) => {
3526
3532
  e && (y.value = C(a.value), await oi(2), _.value = !1);
3527
- });
3533
+ }, { immediate: !0 });
3528
3534
  let O = o(() => Math.abs(y.value - b.value));
3529
3535
  P(a, (e) => {
3530
3536
  r.isInit && (u.value === !1 && (b.value = y.value), y.value = C(e), t && ie());
3531
3537
  }, { immediate: !0 });
3532
- let k = () => {
3533
- d(!0);
3534
- }, ie = async () => {
3538
+ let k = (e) => {
3539
+ e.target.classList.contains("evo-vue-carousel__viewport-track") !== !1 && d(!0);
3540
+ }, ie = async (e) => {
3541
+ if (e.target.classList.contains("evo-vue-carousel__viewport-track") === !1) return;
3535
3542
  _.value = !0, await oi();
3536
- let e = r.totalSlides;
3537
- s(ei(a.value, 0, e)), await oi(), _.value = !1, d(!1);
3543
+ let t = r.totalSlides;
3544
+ s(ei(a.value, 0, t)), await oi(), _.value = !1, d(!1);
3538
3545
  };
3539
3546
  P(c, (e) => {
3540
3547
  i.value.pauseOnHover === !0 && (e ? p() : m());
@@ -3598,7 +3605,7 @@ var hi = /* @__PURE__ */ mi({
3598
3605
  _: 1
3599
3606
  }, 8, ["slots"])], 8, Si));
3600
3607
  }
3601
- }, [["__scopeId", "data-v-1a3c2409"]]), wi = ["data-height"], Ti = {
3608
+ }), [["__scopeId", "data-v-049f31e0"]]), wi = ["data-height"], Ti = {
3602
3609
  __name: "Gallery",
3603
3610
  props: {
3604
3611
  totalSlides: {
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .evo-vue-carousel__pagination{pointer-events:none}.evo-vue-carousel__pagination>*{pointer-events:auto}.evo-vue-carousel__navigation{pointer-events:none}.evo-vue-carousel__navigation>*{pointer-events:auto}.evo-vue-carousel__viewport-track[data-v-1a3c2409]{--slide-width:var(--v13ccef35)}
1
+ .evo-vue-carousel__pagination{pointer-events:none}.evo-vue-carousel__pagination>*{pointer-events:auto}.evo-vue-carousel__navigation{pointer-events:none}.evo-vue-carousel__navigation>*{pointer-events:auto}.evo-vue-carousel__viewport-track[data-v-049f31e0]{--slide-width:var(--d62beeb4)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo-vue-carousel",
3
- "version": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "type": "module",
5
5
  "license": "GPL-3.0-only",
6
6
  "files": [