@nmorph/nmorph-ui-kit 3.0.20 → 3.0.21

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.
@@ -1,15 +1,15 @@
1
1
  import './NmorphBacktop.css';
2
2
  import i from "./NmorphBacktop.vue2.js";
3
- import { openBlock as e, createElementBlock as s, createBlock as p, Teleport as a, createElementVNode as l, normalizeStyle as c, normalizeClass as d, withModifiers as m, renderSlot as h, createVNode as r, withCtx as n } from "vue";
3
+ import { openBlock as e, createElementBlock as a, createBlock as c, Teleport as s, createElementVNode as l, normalizeStyle as d, normalizeClass as p, withModifiers as m, renderSlot as f, createVNode as r, withCtx as n } from "vue";
4
4
  /* empty css */
5
- import f from "../../../_virtual/_plugin-vue_export-helper.js";
5
+ import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const _ = { ref: "placeholderDOMEl" };
7
- function k(t, b, v, o, N, g) {
8
- return e(), s(
7
+ function k(t, b, C, o, N, v) {
8
+ return e(), a(
9
9
  "div",
10
10
  _,
11
11
  [
12
- (e(), p(a, {
12
+ (e(), c(s, {
13
13
  to: o.props.teleportTo,
14
14
  disabled: !o.isMounted || o.props.teleportDisabled
15
15
  }, [
@@ -17,22 +17,23 @@ function k(t, b, v, o, N, g) {
17
17
  "div",
18
18
  {
19
19
  ref: "selfDOMEl",
20
- class: d(o.modifiers),
21
- style: c(o.styles)
20
+ class: p(o.modifiers),
21
+ style: d(o.styles)
22
22
  },
23
23
  [
24
24
  l("div", {
25
25
  onClick: m(o.scrollToTopHandler, ["stop"])
26
26
  }, [
27
- h(t.$slots, "default", {}, () => [
27
+ f(t.$slots, "default", {}, () => [
28
28
  r(o.NmorphButton, {
29
29
  design: o.props.design,
30
- borderless: o.props.design === "plain"
30
+ borderless: o.props.design === "plain",
31
+ color: o.plainControlColor
31
32
  }, {
32
33
  default: n(() => [
33
34
  r(o.NmorphIcon, {
34
35
  class: "nmorph-backtop__up-icon",
35
- color: o.props.design === "nmorph" ? void 0 : "var(--nmorph-white-color)"
36
+ color: o.plainControlColor
36
37
  }, {
37
38
  default: n(() => [
38
39
  r(o.NmorphIconChevronDown)
@@ -43,7 +44,7 @@ function k(t, b, v, o, N, g) {
43
44
  ]),
44
45
  _: 1
45
46
  /* STABLE */
46
- }, 8, ["design", "borderless"])
47
+ }, 8, ["design", "borderless", "color"])
47
48
  ])
48
49
  ])
49
50
  ],
@@ -56,7 +57,7 @@ function k(t, b, v, o, N, g) {
56
57
  /* NEED_PATCH */
57
58
  );
58
59
  }
59
- const D = /* @__PURE__ */ f(i, [["render", k], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
60
+ const D = /* @__PURE__ */ h(i, [["render", k], ["__file", "/home/runner/work/nmorph/nmorph/library/src/components/navigation/nmorph-backtop/NmorphBacktop.vue"]]);
60
61
  export {
61
62
  D as default
62
63
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphBacktop.css';
2
- import { defineComponent as E, computed as h, ref as l, onMounted as T, onUnmounted as k } from "vue";
3
- import { useModifiers as q } from "../../../utils/create-modifiers.js";
4
- import x from "../../basic/nmorph-icon/NmorphIcon.vue.js";
2
+ import { defineComponent as T, computed as s, ref as l, onMounted as k, onUnmounted as q } from "vue";
3
+ import { useModifiers as x } from "../../../utils/create-modifiers.js";
4
+ import C from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
5
  import I from "../../basic/nmorph-button/NmorphButton.vue.js";
6
6
  import B from "../../../assets/icons/chevron-down.svg.js";
7
- const Y = /* @__PURE__ */ E({
7
+ const L = /* @__PURE__ */ T({
8
8
  __name: "NmorphBacktop",
9
9
  props: {
10
10
  right: { type: Number, required: !1, default: 40 },
@@ -18,50 +18,50 @@ const Y = /* @__PURE__ */ E({
18
18
  emits: ["click"],
19
19
  setup(b, { expose: w, emit: y }) {
20
20
  w();
21
- const t = b, u = y, g = h(
22
- () => q({
23
- "nmorph-backtop": [n.value && "show", t.design]
21
+ const o = b, u = y, g = s(
22
+ () => x({
23
+ "nmorph-backtop": [n.value && "show", o.design]
24
24
  })
25
- ), N = h(() => ({
26
- "--nmorph-private-backtop-right": `${t.right}px`,
27
- "--nmorph-private-backtop-bottom": `${t.bottom}px`,
28
- "--nmorph-private-backtop-z-index": t.zIndex
29
- })), s = (r) => r === window, a = (r) => s(r) ? window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0 : r.scrollTop, c = (r) => {
30
- let o = r?.parentElement ?? null;
31
- for (; o; ) {
32
- const v = window.getComputedStyle(o), S = v.overflowY || v.overflow;
33
- if (["auto", "scroll", "overlay"].includes(S) && o.scrollHeight > o.clientHeight) return o;
34
- o = o.parentElement;
25
+ ), N = s(() => ({
26
+ "--nmorph-private-backtop-right": `${o.right}px`,
27
+ "--nmorph-private-backtop-bottom": `${o.bottom}px`,
28
+ "--nmorph-private-backtop-z-index": o.zIndex
29
+ })), _ = s(() => o.design === "plain" ? "var(--nmorph-white-color)" : void 0), a = (r) => r === window, c = (r) => a(r) ? window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0 : r.scrollTop, p = (r) => {
30
+ let t = r?.parentElement ?? null;
31
+ for (; t; ) {
32
+ const h = window.getComputedStyle(t), E = h.overflowY || h.overflow;
33
+ if (["auto", "scroll", "overlay"].includes(E) && t.scrollHeight > t.clientHeight) return t;
34
+ t = t.parentElement;
35
35
  }
36
36
  return window;
37
- }, e = l(null), p = l(null), m = l(null), n = l(!1), d = l(!1), i = () => {
37
+ }, e = l(null), m = l(null), d = l(null), n = l(!1), f = l(!1), i = () => {
38
38
  if (!e.value) {
39
39
  n.value = !1;
40
40
  return;
41
41
  }
42
- n.value = a(e.value) > t.visibilityHeight;
43
- }, _ = () => {
42
+ n.value = c(e.value) > o.visibilityHeight;
43
+ }, S = () => {
44
44
  u("click"), e.value && e.value.scrollTo({
45
45
  top: 0,
46
46
  left: 0,
47
47
  behavior: "smooth"
48
48
  });
49
49
  };
50
- T(() => {
51
- e.value = c(p.value ?? m.value), e.value.addEventListener("scroll", i), i(), d.value = !0;
52
- }), k(() => {
50
+ k(() => {
51
+ e.value = p(m.value ?? d.value), e.value.addEventListener("scroll", i), i(), f.value = !0;
52
+ }), q(() => {
53
53
  e.value && e.value.removeEventListener("scroll", i);
54
54
  });
55
- const f = { props: t, emit: u, modifiers: g, styles: N, isWindow: s, getScrollTop: a, findScrollableAncestor: c, container: e, placeholderDOMEl: p, selfDOMEl: m, showButton: n, isMounted: d, updateVisibility: i, scrollToTopHandler: _, get NmorphButton() {
55
+ const v = { props: o, emit: u, modifiers: g, styles: N, plainControlColor: _, isWindow: a, getScrollTop: c, findScrollableAncestor: p, container: e, placeholderDOMEl: m, selfDOMEl: d, showButton: n, isMounted: f, updateVisibility: i, scrollToTopHandler: S, get NmorphButton() {
56
56
  return I;
57
57
  }, get NmorphIcon() {
58
- return x;
58
+ return C;
59
59
  }, get NmorphIconChevronDown() {
60
60
  return B;
61
61
  } };
62
- return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
62
+ return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
63
63
  }
64
64
  });
65
65
  export {
66
- Y as default
66
+ L as default
67
67
  };