@nmorph/nmorph-ui-kit 2.2.12 → 2.2.13

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.
Files changed (53) hide show
  1. package/README.md +11 -7
  2. package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -1
  3. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +11 -11
  4. package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
  5. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +13 -12
  6. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +46 -40
  7. package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
  8. package/dist/components/data/nmorph-table/NmorphTable.vue.js +228 -103
  9. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +49 -30
  10. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  11. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +91 -35
  12. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +48 -35
  13. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
  14. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +11 -10
  15. package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
  16. package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
  17. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +115 -58
  18. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +104 -75
  19. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +12 -10
  20. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +29 -42
  21. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +39 -20
  22. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue.js +29 -24
  23. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +17 -15
  24. package/dist/hooks/use-common-styles.js +16 -12
  25. package/dist/hooks/use-placement.js +76 -44
  26. package/dist/hooks/use-virtual-list.js +46 -0
  27. package/dist/index.es.js +22 -19
  28. package/dist/index.umd.js +38 -29
  29. package/dist/nuxt.mjs +21 -37
  30. package/dist/outside-hooks/use-nmorph-browser.js +9 -9
  31. package/dist/outside-hooks/use-nmorph-theme.js +133 -87
  32. package/dist/package.json.js +1 -1
  33. package/dist/plugin.js +31 -27
  34. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +9 -0
  35. package/dist/src/components/data/nmorph-table/types.d.ts +2 -2
  36. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +1 -1
  37. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +11 -0
  38. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +8 -0
  39. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +1 -0
  40. package/dist/src/components/form/nmorph-select/types.d.ts +1 -0
  41. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +3 -1
  42. package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +4 -0
  43. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +1 -1
  44. package/dist/src/hooks/index.d.ts +1 -0
  45. package/dist/src/hooks/use-common-styles.d.ts +1 -0
  46. package/dist/src/hooks/use-placement.d.ts +8 -4
  47. package/dist/src/hooks/use-virtual-list.d.ts +21 -0
  48. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -2
  49. package/dist/src/outside-hooks/use-nmorph-theme.d.ts +1 -0
  50. package/dist/src/plugin.d.ts +2 -0
  51. package/dist/src/types/index.d.ts +3 -1
  52. package/dist/style.css +1 -1
  53. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
1
  import './NmorphDropdown.css';
2
- import { defineComponent as a, ref as c, computed as l } from "vue";
3
- import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
- import { usePlacement as h } from "../../../hooks/use-placement.js";
5
- import O from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
- const w = /* @__PURE__ */ a({
2
+ import { defineComponent as w, ref as b, toRef as r, computed as i, watch as v } from "vue";
3
+ import { useModifiers as x } from "../../../utils/create-modifiers.js";
4
+ import { usePlacement as O } from "../../../hooks/use-placement.js";
5
+ import q from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
+ const g = /* @__PURE__ */ w({
7
7
  __name: "NmorphDropdown",
8
8
  props: {
9
9
  open: { type: Boolean, required: !0 },
10
10
  relativeElement: { type: null, required: !0 },
11
+ placement: { type: null, required: !1, default: "bottom" },
11
12
  width: { type: [Number, String], required: !1, default: 160 },
12
13
  minWidth: { type: [Number, String], required: !1 },
13
14
  maxWidth: { type: [Number, String], required: !1 },
@@ -17,26 +18,44 @@ const w = /* @__PURE__ */ a({
17
18
  zIndex: { type: Number, required: !1 }
18
19
  },
19
20
  emits: ["on-outside-click"],
20
- setup(s, { expose: d, emit: f }) {
21
- d();
22
- const e = s, r = f, o = c(null), { placementCoords: m } = h({
23
- initialPlacement: "bottom",
24
- contentDOMElement: o,
25
- relativeElement: e.relativeElement,
26
- yOffset: e.yOffset,
27
- xOffset: e.xOffset
28
- }), u = l(
29
- () => y({
21
+ setup(u, { expose: f, emit: c }) {
22
+ f();
23
+ const e = u, l = c, d = b(null), { placementCoords: n, placementReady: p, adjustPlacement: m } = O({
24
+ initialPlacement: r(e, "placement"),
25
+ contentDOMElement: d,
26
+ relativeElement: r(e, "relativeElement"),
27
+ yOffset: r(e, "yOffset"),
28
+ xOffset: r(e, "xOffset"),
29
+ enabled: r(e, "open")
30
+ }), h = i(
31
+ () => x({
30
32
  "nmorph-dropdown": [`${!e.open && "closed"}`]
31
33
  })
32
- ), i = (t) => typeof t == "number" ? `${t}px` : t, p = l(() => e.fillWidth ? `${e.relativeElement?.clientWidth}px` : i(e.width)), n = { props: e, emit: r, dropdownDOMRef: o, placementCoords: m, modifiers: u, getCssSize: i, width: p, outsideClickHandler: () => {
33
- r("on-outside-click");
34
+ ), o = (t) => typeof t == "number" ? `${t}px` : t, s = i(
35
+ () => e.fillWidth && e.relativeElement ? `${e.relativeElement.clientWidth}px` : o(e.width)
36
+ ), y = i(() => ({
37
+ "--nmorph-dropdown-width": s.value,
38
+ "--nmorph-dropdown-min-width": o(e.minWidth) || "auto",
39
+ "--nmorph-dropdown-max-width": o(e.maxWidth) || "none",
40
+ left: n.value.x,
41
+ top: n.value.y,
42
+ visibility: e.open && p.value ? "visible" : "hidden"
43
+ }));
44
+ v(
45
+ () => e.open,
46
+ (t) => {
47
+ t && m();
48
+ },
49
+ { flush: "post" }
50
+ );
51
+ const a = { props: e, emit: l, dropdownDOMRef: d, placementCoords: n, placementReady: p, adjustPlacement: m, modifiers: h, getCssSize: o, width: s, dropdownStyle: y, outsideClickHandler: () => {
52
+ l("on-outside-click");
34
53
  }, get NmorphOverlay() {
35
- return O;
54
+ return q;
36
55
  } };
37
- return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
56
+ return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
38
57
  }
39
58
  });
40
59
  export {
41
- w as default
60
+ g as default
42
61
  };
@@ -1,30 +1,35 @@
1
1
  import './NmorphOverlay.css';
2
- import t from "./NmorphOverlay.vue2.js";
3
- import { openBlock as n, createElementBlock as i, withModifiers as e, normalizeStyle as s, normalizeClass as m, createElementVNode as a, renderSlot as p } from "vue";
2
+ import s from "./NmorphOverlay.vue2.js";
3
+ import { openBlock as i, createBlock as n, Teleport as p, createElementVNode as e, withModifiers as l, normalizeStyle as a, normalizeClass as d, renderSlot as m } from "vue";
4
4
  /* empty css */
5
5
  import c from "../../../_virtual/_plugin-vue_export-helper.js";
6
- function d(l, r, f, o, _, v) {
7
- return n(), i(
8
- "div",
9
- {
10
- class: m(o.modifiers),
11
- style: s({ "--nmorph-overlay-z-index": o.zIndex }),
12
- onClick: e(o.clickHandler, ["stop"])
13
- },
14
- [
15
- a("div", {
16
- class: "nmorph-overlay__slot",
17
- onClick: r[0] || (r[0] = e(() => {
18
- }, ["stop"]))
19
- }, [
20
- p(l.$slots, "default")
21
- ])
22
- ],
23
- 6
24
- /* CLASS, STYLE */
25
- );
6
+ function f(t, r, _, o, h, v) {
7
+ return i(), n(p, {
8
+ to: o.props.teleportTo,
9
+ disabled: o.props.disabledTeleport || !o.props.show
10
+ }, [
11
+ e(
12
+ "div",
13
+ {
14
+ class: d(o.modifiers),
15
+ style: a({ "--nmorph-overlay-z-index": o.zIndex }),
16
+ onClick: l(o.clickHandler, ["stop"])
17
+ },
18
+ [
19
+ e("div", {
20
+ class: "nmorph-overlay__slot",
21
+ onClick: r[0] || (r[0] = l(() => {
22
+ }, ["stop"]))
23
+ }, [
24
+ m(t.$slots, "default")
25
+ ])
26
+ ],
27
+ 6
28
+ /* CLASS, STYLE */
29
+ )
30
+ ], 8, ["to", "disabled"]);
26
31
  }
27
- const x = /* @__PURE__ */ c(t, [["render", d], ["__file", "/builds/ketjo/nmorph/library/src/components/others/nmorph-overlay/NmorphOverlay.vue"]]);
32
+ const z = /* @__PURE__ */ c(s, [["render", f], ["__file", "/builds/ketjo/nmorph/library/src/components/others/nmorph-overlay/NmorphOverlay.vue"]]);
28
33
  export {
29
- x as default
34
+ z as default
30
35
  };
@@ -1,30 +1,32 @@
1
1
  import './NmorphOverlay.css';
2
- import { defineComponent as d, computed as t } from "vue";
3
- import { useModifiers as m } from "../../../utils/create-modifiers.js";
4
- import { useZIndex as c } from "../../../hooks/use-z-index.js";
5
- const h = /* @__PURE__ */ d({
2
+ import { defineComponent as d, computed as o } from "vue";
3
+ import { useModifiers as u } from "../../../utils/create-modifiers.js";
4
+ import { useZIndex as f } from "../../../hooks/use-z-index.js";
5
+ const y = /* @__PURE__ */ d({
6
6
  __name: "NmorphOverlay",
7
7
  props: {
8
8
  show: { type: Boolean, required: !0 },
9
9
  transparent: { type: Boolean, required: !1, default: !1 },
10
- zIndex: { type: Number, required: !1 }
10
+ zIndex: { type: Number, required: !1 },
11
+ teleportTo: { type: null, required: !1, default: "body" },
12
+ disabledTeleport: { type: Boolean, required: !1, default: !1 }
11
13
  },
12
14
  emits: ["on-outside-click"],
13
- setup(n, { expose: s, emit: i }) {
14
- s();
15
- const e = n, p = c(
16
- t(() => e.show),
15
+ setup(s, { expose: n, emit: a }) {
16
+ n();
17
+ const e = s, l = f(
18
+ o(() => e.show),
17
19
  () => e.zIndex
18
- ), a = t(
19
- () => m({
20
+ ), p = o(
21
+ () => u({
20
22
  "nmorph-overlay": [`${e.show && "show"}`, `${e.transparent && "transparent"}`]
21
23
  })
22
- ), u = () => {
24
+ ), i = () => {
23
25
  r("on-outside-click");
24
- }, r = i, o = { props: e, zIndex: p, modifiers: a, clickHandler: u, emit: r };
25
- return Object.defineProperty(o, "__isScriptSetup", { enumerable: !1, value: !0 }), o;
26
+ }, r = a, t = { props: e, zIndex: l, modifiers: p, clickHandler: i, emit: r };
27
+ return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
26
28
  }
27
29
  });
28
30
  export {
29
- h as default
31
+ y as default
30
32
  };
@@ -1,18 +1,18 @@
1
- import { nmorphCombined as p, nmorphInset as o, nmorphOutset as e, title1 as s, title2 as d, title3 as l, title4 as m, body1 as n, body2 as c, body3 as i, body4 as u } from "../utils/theme-style.js";
1
+ import { nmorphCombined as p, nmorphInset as t, nmorphOutset as e, title1 as s, title2 as d, title3 as m, title4 as l, body1 as n, body2 as c, body3 as i, body4 as u } from "../utils/theme-style.js";
2
2
  const b = {
3
3
  "nmorph-body-4": u,
4
4
  "nmorph-body-3": i,
5
5
  "nmorph-body-2": c,
6
6
  "nmorph-body-1": n,
7
- "nmorph-title-4": m,
8
- "nmorph-title-3": l,
7
+ "nmorph-title-4": l,
8
+ "nmorph-title-3": m,
9
9
  "nmorph-title-2": d,
10
10
  "nmorph-title-1": s,
11
11
  "nmorph--shadow-outset": e,
12
- "nmorph--shadow-inset": o,
12
+ "nmorph--shadow-inset": t,
13
13
  "nmorph--shadow-combined": p
14
- }, g = () => {
15
- let t = `
14
+ }, v = () => {
15
+ let r = `
16
16
  :root {
17
17
  --font-size-tiny: 10px;
18
18
  --font-size-extra-small: 12px;
@@ -379,7 +379,7 @@ const b = {
379
379
  text-indent: var(--nmorph-text-input-indentation);
380
380
  border: none;
381
381
  border-radius: var(--default-border-radius);
382
- ${o()}
382
+ ${t()}
383
383
  }
384
384
 
385
385
  .nmorph-text-input--with-action input {
@@ -512,7 +512,7 @@ const b = {
512
512
 
513
513
  .nmorph-scroll::-webkit-scrollbar-track {
514
514
  border-radius: var(--border-radius-40);
515
- ${o()}
515
+ ${t()}
516
516
  }
517
517
 
518
518
  .nmorph-scroll::-webkit-scrollbar-thumb {
@@ -525,14 +525,18 @@ const b = {
525
525
  }
526
526
  `;
527
527
  for (const [a, h] of Object.entries(b))
528
- t += `
528
+ r += `
529
529
  .${a} {
530
530
  ${h()}
531
531
  }
532
532
  `;
533
- const r = document.createElement("style");
534
- r.innerHTML = t, document.head.appendChild(r);
533
+ return r;
534
+ }, x = () => {
535
+ if (typeof document > "u" || document.getElementById("nmorph-common-styles")) return;
536
+ const o = document.createElement("style");
537
+ o.id = "nmorph-common-styles", o.innerHTML = v(), document.head.appendChild(o);
535
538
  };
536
539
  export {
537
- g as useCommonStyles
540
+ v as getCommonStyles,
541
+ x as useCommonStyles
538
542
  };
@@ -1,57 +1,89 @@
1
- import { ref as p, inject as R, watch as S, onMounted as W, onUnmounted as k, nextTick as E } from "vue";
2
- const T = (b) => {
3
- const { initialPlacement: y, relativeElement: s, contentDOMElement: c, yOffset: u = 0, xOffset: v = 0 } = b, e = p(y), r = p({ x: "0px", y: "0px" }), C = R("nmorph"), a = p(null);
4
- S(
5
- () => C.browser,
1
+ import { ref as b, unref as n, inject as T, watch as F, onMounted as U, onUnmounted as X, nextTick as S } from "vue";
2
+ const G = (j) => {
3
+ const { initialPlacement: g, relativeElement: y, contentDOMElement: u, yOffset: L = 0, xOffset: O = 0, enabled: h } = j, R = b(n(g)), C = b({ x: "0px", y: "0px" }), v = b(!1), k = T("nmorph"), P = { passive: !0, capture: !0 };
4
+ let w = null;
5
+ F(
6
+ () => k?.browser,
6
7
  () => {
7
- n();
8
+ o();
8
9
  },
9
10
  { deep: !0 }
10
- ), W(() => {
11
- n(), L(), $(), h.observe(document.body, {
12
- childList: !0,
13
- subtree: !0
14
- }), f();
15
- }), k(() => {
16
- O(), h.disconnect();
17
- });
18
- const f = () => {
19
- E(() => {
20
- c.value && n();
11
+ ), U(() => {
12
+ o(), V(), window.addEventListener("resize", o, { passive: !0 }), w = new MutationObserver(() => {
13
+ M();
14
+ }), w.observe(document.body, { childList: !0, subtree: !0 }), M();
15
+ }), X(() => {
16
+ W(), window.removeEventListener("resize", o), w?.disconnect();
17
+ }), F(
18
+ () => [n(g), n(y), n(O), n(L), n(h)],
19
+ () => {
20
+ o();
21
+ },
22
+ { flush: "post" }
23
+ );
24
+ const M = () => {
25
+ S(() => {
26
+ u.value && o();
21
27
  });
22
- }, h = new MutationObserver(() => {
23
- f();
24
- }), L = () => {
25
- let t = c.value;
26
- for (; t; ) {
27
- const o = window.getComputedStyle(t);
28
- if (o.overflowY === "auto" || o.overflowY === "scroll") {
29
- a.value = t;
30
- break;
31
- }
32
- t = t.parentElement;
33
- }
34
- }, $ = () => {
35
- a.value ? a.value.addEventListener("scroll", n, { passive: !0 }) : window.addEventListener("scroll", n, { passive: !0 });
36
- }, O = () => {
37
- a.value ? a.value.removeEventListener("scroll", n) : window.removeEventListener("scroll", n);
38
- }, n = () => {
39
- E(() => {
40
- if (!c.value || !s) {
41
- console.warn("There is no relative element or content DOM element");
28
+ }, A = () => h === void 0 || n(h) !== !1, q = (e) => {
29
+ const [s, t] = e.split("-");
30
+ return {
31
+ side: s,
32
+ align: t || "start",
33
+ hasAlign: !!t
34
+ };
35
+ }, z = (e, s, t) => t ? `${e}-${s}` : e, B = () => n(y), H = (e, s, t, l, d, r, i) => e === "top" && t - i < 0 ? "bottom" : e === "bottom" && t + d + i > window.innerHeight ? "top" : e === "left" && s - r < 0 ? "right" : e === "right" && s + l + r > window.innerWidth ? "left" : e, V = () => {
36
+ window.addEventListener("scroll", o, P);
37
+ }, W = () => {
38
+ window.removeEventListener("scroll", o, P);
39
+ }, o = () => {
40
+ S(() => {
41
+ if (typeof window > "u") return;
42
+ if (!A()) {
43
+ v.value = !1;
42
44
  return;
43
45
  }
44
- const t = c.value.getBoundingClientRect(), o = t.width, d = t.height, w = "value" in s ? s.value : s;
45
- if (!w) {
46
- console.warn("Relative element is not an HTMLElement");
46
+ const e = B();
47
+ if (!u.value || !e) {
48
+ v.value = !1;
47
49
  return;
48
50
  }
49
- const m = w.getBoundingClientRect(), { x: l, y: i } = m, x = m.width, g = m.height, H = window.innerWidth, M = window.innerHeight;
50
- e.value === "top" && i - d < 0 && (e.value = "bottom"), e.value === "bottom" && i + g + d > M && (e.value = "top"), e.value === "left" && l - o < 0 && (e.value = "right"), e.value === "right" && l + x + o > H && (e.value = "left"), e.value === "top" && (r.value = { x: `${l + v}px`, y: `${i - d + u}px` }), e.value === "bottom" && (r.value = { x: `${l + v}px`, y: `${i + g + u}px` }), e.value === "right" && (r.value = { x: `${l + x + v}px`, y: `${i + u}px` }), e.value === "left" && (r.value = { x: `${l - o + v}px`, y: `${i + u}px` });
51
+ const s = u.value.getBoundingClientRect(), t = s.width, l = s.height, d = e.getBoundingClientRect(), { x: r, y: i } = d, m = d.width, p = d.height, D = n(O) || 0, N = n(L) || 0, f = q(n(g)), a = H(
52
+ f.side,
53
+ r,
54
+ i,
55
+ m,
56
+ p,
57
+ t,
58
+ l
59
+ );
60
+ let E = r, x = i;
61
+ if (a === "top" || a === "bottom") {
62
+ const c = {
63
+ start: r,
64
+ center: r + m / 2 - t / 2,
65
+ end: r + m - t
66
+ };
67
+ E = c[f.align] ?? c.start, x = a === "top" ? i - l : i + p;
68
+ }
69
+ if (a === "left" || a === "right") {
70
+ const c = {
71
+ start: i,
72
+ center: i + p / 2 - l / 2,
73
+ end: i + p - l
74
+ };
75
+ E = a === "left" ? r - t : r + m, x = c[f.align] ?? c.start;
76
+ }
77
+ R.value = z(a, f.align, f.hasAlign), C.value = { x: `${E + D}px`, y: `${x + N}px` }, v.value = !0, typeof requestAnimationFrame == "function" && requestAnimationFrame(() => {
78
+ const c = B();
79
+ if (!u.value || !c || !A()) return;
80
+ const $ = u.value.getBoundingClientRect();
81
+ ($.width !== t || $.height !== l) && o();
82
+ });
51
83
  });
52
84
  };
53
- return { placement: e, placementCoords: r };
85
+ return { placement: R, placementCoords: C, placementReady: v, adjustPlacement: o };
54
86
  };
55
87
  export {
56
- T as usePlacement
88
+ G as usePlacement
57
89
  };
@@ -0,0 +1,46 @@
1
+ import { ref as d, computed as t, onMounted as I, nextTick as p, onUnmounted as z, watch as L } from "vue";
2
+ const y = (l, v) => {
3
+ const c = d(null), s = d(0), h = d(0), n = t(() => v.enabled?.value ?? !0), i = t(() => Math.max(v.overscan?.value ?? 0, 0)), a = t(() => Math.max(v.itemHeight.value, 1)), f = t(() => n.value ? l.value.length * a.value : 0), u = () => {
4
+ const e = c.value;
5
+ e && (s.value = e.scrollTop, h.value = e.clientHeight);
6
+ }, w = () => {
7
+ u();
8
+ }, r = t(() => n.value ? Math.max(Math.floor(s.value / a.value) - i.value, 0) : 0), m = t(() => {
9
+ if (!n.value) return l.value.length;
10
+ const e = Math.ceil((s.value + h.value) / a.value) + i.value;
11
+ return Math.min(Math.max(e, r.value + i.value), l.value.length);
12
+ }), M = t(() => r.value * a.value), g = t(() => n.value ? l.value.slice(r.value, m.value).map((e, o) => ({
13
+ item: e,
14
+ index: r.value + o
15
+ })) : l.value.map((e, o) => ({ item: e, index: o }))), H = (e) => {
16
+ const o = c.value;
17
+ if (!o || !n.value) return;
18
+ const T = Math.min(Math.max(e, 0) * a.value, f.value);
19
+ o.scrollTop = T, u();
20
+ }, x = () => {
21
+ u();
22
+ };
23
+ return I(() => {
24
+ p(u), typeof window < "u" && window.addEventListener("resize", x);
25
+ }), z(() => {
26
+ typeof window < "u" && window.removeEventListener("resize", x);
27
+ }), L(
28
+ () => [l.value.length, n.value, a.value],
29
+ () => {
30
+ p(u);
31
+ }
32
+ ), {
33
+ containerRef: c,
34
+ endIndex: m,
35
+ offsetTop: M,
36
+ refresh: u,
37
+ scrollHandler: w,
38
+ scrollToIndex: H,
39
+ startIndex: r,
40
+ totalHeight: f,
41
+ virtualItems: g
42
+ };
43
+ };
44
+ export {
45
+ y as useVirtualList
46
+ };
package/dist/index.es.js CHANGED
@@ -331,15 +331,16 @@ import { default as vh } from "./components/form/nmorph-text-input/NmorphTextInp
331
331
  import { default as Gh } from "./components/feedback/nmorph-tooltip/NmorphTooltip.vue.js";
332
332
  import { default as Eh } from "./locales/en.js";
333
333
  import { formatDateIntl as Hh, getDecadeYears as Vh, getMonthDaysByWeek as qh, getMonthName as zh, hasAnyRangeDateInNextMonth as Zh, hasAnyRangeDateInPrevMonth as Kh, isTodayInMonthRange as Qh, resetTimeToZero as Yh } from "./components/data/nmorph-calendar/utils.js";
334
- import { getTabContentId as Jh, getTabLabelId as Xh } from "./components/navigation/nmorph-tabs/utils.js";
335
- import { nmorphLog as $h } from "./outside-utils/index.js";
336
- import { default as ru } from "./locales/ru.js";
337
- import { useCalendarTexts as tu } from "./components/data/nmorph-calendar/hooks/use-calendar-texts.js";
338
- import { useNmorph as pu } from "./outside-hooks/use-nmorph.js";
339
- import { useNmorphBrowser as fu } from "./outside-hooks/use-nmorph-browser.js";
340
- import { useNmorphNotification as nu } from "./outside-hooks/use-nmorph-notification.js";
341
- import { useNmorphTheme as hu } from "./outside-hooks/use-nmorph-theme.js";
342
- import { default as su } from "./locales/zh.js";
334
+ import { getCommonStyles as Jh } from "./hooks/use-common-styles.js";
335
+ import { getNmorphThemeStyles as _h, useNmorphTheme as $h } from "./outside-hooks/use-nmorph-theme.js";
336
+ import { getTabContentId as ru, getTabLabelId as eu } from "./components/navigation/nmorph-tabs/utils.js";
337
+ import { nmorphLog as au } from "./outside-utils/index.js";
338
+ import { default as mu } from "./locales/ru.js";
339
+ import { useCalendarTexts as lu } from "./components/data/nmorph-calendar/hooks/use-calendar-texts.js";
340
+ import { useNmorph as du } from "./outside-hooks/use-nmorph.js";
341
+ import { useNmorphBrowser as uu } from "./outside-hooks/use-nmorph-browser.js";
342
+ import { useNmorphNotification as cu } from "./outside-hooks/use-nmorph-notification.js";
343
+ import { default as xu } from "./locales/zh.js";
343
344
  export {
344
345
  a as AvatarShapeType,
345
346
  p as Locale,
@@ -693,22 +694,24 @@ export {
693
694
  y as NmorphVideoResolution,
694
695
  Eh as en,
695
696
  Hh as formatDateIntl,
697
+ Jh as getCommonStyles,
696
698
  Vh as getDecadeYears,
697
699
  qh as getMonthDaysByWeek,
698
700
  zh as getMonthName,
699
- Jh as getTabContentId,
700
- Xh as getTabLabelId,
701
+ _h as getNmorphThemeStyles,
702
+ ru as getTabContentId,
703
+ eu as getTabLabelId,
701
704
  Zh as hasAnyRangeDateInNextMonth,
702
705
  Kh as hasAnyRangeDateInPrevMonth,
703
706
  Qh as isTodayInMonthRange,
704
- $h as nmorphLog,
707
+ au as nmorphLog,
705
708
  Yh as resetTimeToZero,
706
709
  k as resolution,
707
- ru,
708
- tu as useCalendarTexts,
709
- pu as useNmorph,
710
- fu as useNmorphBrowser,
711
- nu as useNmorphNotification,
712
- hu as useNmorphTheme,
713
- su as zh
710
+ mu as ru,
711
+ lu as useCalendarTexts,
712
+ du as useNmorph,
713
+ uu as useNmorphBrowser,
714
+ cu as useNmorphNotification,
715
+ $h as useNmorphTheme,
716
+ xu as zh
714
717
  };