@evercam/ui 0.0.55-beta.4 → 0.0.55-beta.5

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
@@ -21993,9 +21993,9 @@ const Ah = {
21993
21993
  };
21994
21994
  },
21995
21995
  positionStyles() {
21996
- return !this.dot || !this.isMouseOver ? {} : {
21996
+ return this.dot && this.isMouseOver ? {
21997
21997
  transform: `translateY(calc(-100% - ${this.lineHeight}px))`
21998
- };
21998
+ } : {};
21999
21999
  },
22000
22000
  styles() {
22001
22001
  return {
@@ -22048,33 +22048,31 @@ const Ah = {
22048
22048
  };
22049
22049
  }
22050
22050
  },
22051
- updated() {
22051
+ mounted() {
22052
22052
  this.$nextTick(() => {
22053
- this.isInitialRender = !1;
22053
+ this.dot || (this.onMilestoneMouseOver(), this.onMilestoneMouseLeave()), this.isInitialRender = !1;
22054
22054
  });
22055
22055
  },
22056
22056
  methods: {
22057
- onMilestoneMouseOver(s, e) {
22058
- if (this.dot) {
22059
- this.isMouseOver = !0;
22057
+ onMilestoneMouseOver(s) {
22058
+ if (this.isMouseOver = !0, this.dot)
22060
22059
  return;
22061
- }
22062
- const t = s.target;
22060
+ const e = (s == null ? void 0 : s.target) || this.$refs.container;
22061
+ if (!e)
22062
+ return;
22063
+ const t = e.children[0];
22063
22064
  if (!t)
22064
22065
  return;
22065
22066
  const i = t.children[0];
22066
22067
  if (!i)
22067
22068
  return;
22068
- const r = i.children[0];
22069
- if (!r)
22070
- return;
22071
- const n = r.getBoundingClientRect(), a = t.dataset.timeoutId;
22072
- a && (clearTimeout(Number(a)), t.dataset.timeoutId = ""), t.dataset.initialWidth || (t.dataset.initialWidth = t.style.width), t.dataset.initialHeight || (t.dataset.initialHeight = t.style.height), t.dataset.initialContentWidth || (t.dataset.initialContentWidth = String(n.width)), t.dataset.initialContentHeight || (t.dataset.initialContentHeight = String(n.height)), t.dataset.transitionStart = String(Date.now()), t.style.width = t.dataset.initialContentWidth + "px", t.style.height = t.dataset.initialContentHeight + "px", t.style.borderRadius = "0.5em", t.classList.add(Ye.milestoneHovered), i.style.opacity = "1", i.style.width = t.dataset.initialContentWidth + "px", i.style.height = t.dataset.initialContentHeight + "px";
22069
+ const r = i.getBoundingClientRect(), n = e.dataset.timeoutId;
22070
+ n && (clearTimeout(Number(n)), e.dataset.timeoutId = ""), e.dataset.initialWidth || (e.dataset.initialWidth = e.style.width), e.dataset.initialHeight || (e.dataset.initialHeight = e.style.height), e.dataset.initialContentWidth || (e.dataset.initialContentWidth = String(r.width)), e.dataset.initialContentHeight || (e.dataset.initialContentHeight = String(r.height)), e.dataset.transitionStart = String(Date.now()), e.style.width = e.dataset.initialContentWidth + "px", e.style.height = e.dataset.initialContentHeight + "px", e.style.borderRadius = "0.5em", e.classList.add(Ye.milestoneHovered), t.style.opacity = "1", t.style.width = e.dataset.initialContentWidth + "px", t.style.height = e.dataset.initialContentHeight + "px";
22073
22071
  },
22074
22072
  onMilestoneMouseMove() {
22075
22073
  this.timeouts.forEach((s) => clearTimeout(s)), this.isMouseOver = !0;
22076
22074
  },
22077
- onMilestoneMouseLeave(s, e) {
22075
+ onMilestoneMouseLeave(s) {
22078
22076
  if (this.dot) {
22079
22077
  this.timeouts.push(
22080
22078
  setTimeout(() => {
@@ -22083,18 +22081,18 @@ const Ah = {
22083
22081
  );
22084
22082
  return;
22085
22083
  }
22086
- const t = s.target;
22087
- if (!t)
22084
+ const e = (s == null ? void 0 : s.target) || this.$refs.container;
22085
+ if (!e)
22088
22086
  return;
22089
- t.style.width = t.dataset.initialWidth || "", t.style.height = t.dataset.initialHeight || "", t.style.borderRadius = "10em";
22090
- const i = t.children[0];
22091
- if (!i)
22087
+ e.style.width = e.dataset.initialWidth || "", e.style.height = e.dataset.initialHeight || "", e.style.borderRadius = "10em";
22088
+ const t = e.children[0];
22089
+ if (!t)
22092
22090
  return;
22093
- i.style.width = "0", i.style.height = "0", i.style.opacity = "0";
22094
- const r = Date.now() - Number(t.dataset.transitionStart), n = r > this.transitionDuration ? this.transitionDuration : r, a = setTimeout(() => {
22095
- t.classList.remove(Ye.milestoneHovered), t.dataset.timeoutId = "";
22096
- }, n);
22097
- t.dataset.timeoutId = String(a), this.timeouts.push(a);
22091
+ t.style.width = "0", t.style.height = "0", t.style.opacity = "0";
22092
+ const i = Date.now() - Number(e.dataset.transitionStart), r = i > this.transitionDuration ? this.transitionDuration : i, n = setTimeout(() => {
22093
+ e.classList.remove(Ye.milestoneHovered), e.dataset.timeoutId = "";
22094
+ }, r);
22095
+ e.dataset.timeoutId = String(n), this.timeouts.push(n);
22098
22096
  },
22099
22097
  onMilestoneClick(s, e) {
22100
22098
  this.$emit("milestone-click", e);
@@ -22103,11 +22101,12 @@ const Ah = {
22103
22101
  });
22104
22102
  var Ch = function() {
22105
22103
  var e = this, t = e._self._c;
22106
- return t("div", { class: {
22104
+ return t("div", { ref: "container", class: {
22107
22105
  [e.milestoneClasses.milestone]: !0,
22108
- [e.milestoneClasses.milestoneDot]: e.dot,
22109
22106
  [e.milestoneClasses.milestoneBullet]: !e.dot,
22110
- [e.milestoneClasses.milestoneDotHovered]: e.isMouseOver
22107
+ [e.milestoneClasses.milestoneHovered]: e.isMouseOver && !e.dot,
22108
+ [e.milestoneClasses.milestoneDot]: e.dot,
22109
+ [e.milestoneClasses.milestoneDotHovered]: e.isMouseOver && e.dot
22111
22110
  }, style: e.styles, attrs: { tabindex: "0" }, on: { mouseover: (i) => e.onMilestoneMouseOver(i, e.milestone), mousemove: e.onMilestoneMouseMove, mouseleave: (i) => e.onMilestoneMouseLeave(i, e.milestone), click: (i) => e.onMilestoneClick(i, e.milestone) } }, [t("div", { class: e.milestoneClasses.milestoneContent, style: e.contentStyles }, [e._t("content", function() {
22112
22111
  return [t("span", [e._v(" " + e._s(e.milestone.text) + " ")])];
22113
22112
  })], 2), e.dot ? t("div", { class: e.milestoneClasses.milestoneDotContainer, style: e.dotContainerStyles }, [t("div", { class: e.milestoneClasses.milestoneDotLine, style: e.lineStyles }), t("div", { class: e.milestoneClasses.milestoneDotDot, style: e.dotStyles })]) : t("div", { class: e.milestoneClasses.milestoneLabel, style: e.labelStyles }, [e._t("label")], 2)]);