@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
package/dist/nuxt.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { defineNuxtModule as t, addPluginTemplate as n } from "@nuxt/kit";
2
- const a = t({
1
+ import { defineNuxtModule as o, addPluginTemplate as i } from "@nuxt/kit";
2
+ const p = o({
3
3
  meta: {
4
4
  name: "@nmorph/nmorph-ui-kit",
5
5
  configKey: "nmorph",
@@ -10,15 +10,16 @@ const a = t({
10
10
  defaults: {
11
11
  styles: !1
12
12
  },
13
- setup(o, e) {
14
- const { styles: i, ...s } = o;
15
- e.options.build.transpile.push("@nmorph/nmorph-ui-kit"), i === "all" && e.options.css.push("@nmorph/nmorph-ui-kit/dist/style.css"), n({
16
- filename: "nmorph-i18n.mjs",
13
+ setup(s, e) {
14
+ const { styles: t, ...n } = s;
15
+ e.options.build.transpile.push("@nmorph/nmorph-ui-kit"), t === "all" && e.options.css.push("@nmorph/nmorph-ui-kit/dist/style.css"), i({
16
+ filename: "nmorph.mjs",
17
17
  getContents: () => `
18
18
  import { defineNuxtPlugin } from '#app'
19
- import { en, ru, zh } from '@nmorph/nmorph-ui-kit/plugin'
19
+ import { useHead } from '#imports'
20
+ import { NmorphLibrary, en, ru, zh, getCommonStyles, getNmorphThemeStyles } from '@nmorph/nmorph-ui-kit/plugin'
20
21
 
21
- const options = ${JSON.stringify(s)}
22
+ const options = ${JSON.stringify(n)}
22
23
  const libraryMessages = { en, ru, zh }
23
24
 
24
25
  const mergeMessages = (base, overrides = {}) => {
@@ -30,39 +31,22 @@ const mergeMessages = (base, overrides = {}) => {
30
31
  }
31
32
 
32
33
  export default defineNuxtPlugin((nuxtApp) => {
33
- const i18nOptions = { ...(options.i18n || {}) }
34
+ const pluginOptions = { ...options }
35
+ const i18nOptions = { ...(pluginOptions.i18n || {}) }
34
36
  const messages = mergeMessages(libraryMessages, i18nOptions.messages)
35
37
  const i18n = nuxtApp.$i18n
36
38
 
37
- if (i18n?.mergeLocaleMessage) {
38
- Object.entries(messages).forEach(([locale, localeMessages]) => {
39
- i18n.mergeLocaleMessage(locale, localeMessages)
39
+ if (import.meta.server) {
40
+ useHead({
41
+ htmlAttrs: {
42
+ 'nmorph-data-theme': pluginOptions.theme?.defaultTheme || 'dark',
43
+ },
44
+ style: [
45
+ { id: 'nmorph-theme-styles', children: getNmorphThemeStyles(pluginOptions.theme) },
46
+ { id: 'nmorph-common-styles', children: getCommonStyles() },
47
+ ],
40
48
  })
41
49
  }
42
- })
43
- `
44
- }), n({
45
- filename: "nmorph.client.mjs",
46
- getContents: () => `
47
- import { defineNuxtPlugin } from '#app'
48
- import { NmorphLibrary, en, ru, zh } from '@nmorph/nmorph-ui-kit/plugin'
49
-
50
- const options = ${JSON.stringify(s)}
51
- const libraryMessages = { en, ru, zh }
52
-
53
- const mergeMessages = (base, overrides = {}) => {
54
- const result = { ...base }
55
- Object.entries(overrides).forEach(([locale, messages]) => {
56
- result[locale] = { ...(result[locale] || {}), ...messages }
57
- })
58
- return result
59
- }
60
-
61
- export default defineNuxtPlugin((nuxtApp) => {
62
- const pluginOptions = { ...options }
63
- const i18nOptions = { ...(pluginOptions.i18n || {}) }
64
- const messages = mergeMessages(libraryMessages, i18nOptions.messages)
65
- const i18n = nuxtApp.$i18n
66
50
 
67
51
  i18nOptions.messages = messages
68
52
 
@@ -81,5 +65,5 @@ export default defineNuxtPlugin((nuxtApp) => {
81
65
  }
82
66
  });
83
67
  export {
84
- a as default
68
+ p as default
85
69
  };
@@ -1,21 +1,21 @@
1
- import { ref as r } from "vue";
2
- const d = () => {
3
- const e = r({ width: 0, height: 0 }), i = r(0);
4
- let o, t;
5
- const n = () => {
1
+ import { ref as t } from "vue";
2
+ const s = () => {
3
+ const e = t({ width: 0, height: 0 }), i = t(0);
4
+ let o, n;
5
+ const r = () => {
6
6
  clearTimeout(o), o = setTimeout(() => {
7
7
  e.value.width = window.innerWidth, e.value.height = window.innerHeight;
8
8
  }, 400);
9
- }, s = () => {
10
- clearTimeout(t), t = setTimeout(() => {
9
+ }, l = () => {
10
+ clearTimeout(n), n = setTimeout(() => {
11
11
  i.value = window.scrollY;
12
12
  }, 400);
13
13
  };
14
- return window && (window.addEventListener("resize", n), window.addEventListener("scroll", s)), {
14
+ return typeof window < "u" && (e.value.width = window.innerWidth, e.value.height = window.innerHeight, i.value = window.scrollY, window.addEventListener("resize", r), window.addEventListener("scroll", l)), {
15
15
  dimensions: e,
16
16
  scrollTop: i
17
17
  };
18
18
  };
19
19
  export {
20
- d as useNmorphBrowser
20
+ s as useNmorphBrowser
21
21
  };
@@ -1,8 +1,8 @@
1
- import { ref as H, readonly as _ } from "vue";
2
- import I from "../package.json.js";
3
- import { nmorphLog as O } from "../outside-utils/index.js";
4
- import { camelToKebab as M } from "../utils/case-transformers.js";
5
- const v = {
1
+ import { ref as A, readonly as H } from "vue";
2
+ import _ from "../package.json.js";
3
+ import { nmorphLog as I } from "../outside-utils/index.js";
4
+ import { camelToKebab as b } from "../utils/case-transformers.js";
5
+ const $ = {
6
6
  info: "#d4e5edbb",
7
7
  infoText: "#506c80",
8
8
  success: "#67C23A",
@@ -15,7 +15,7 @@ const v = {
15
15
  white: "#ffffff",
16
16
  black: "#000000",
17
17
  overlay: "#00000095"
18
- }, w = {
18
+ }, V = {
19
19
  darkShade: "#c8c9ca",
20
20
  main: "#e9ecec",
21
21
  lightShade: "#fdfdfd",
@@ -26,7 +26,7 @@ const v = {
26
26
  placeholderText: "#c1c9cf",
27
27
  semiContrastText: "#8a9dc0",
28
28
  contrastText: "#b4c4de"
29
- }, B = {
29
+ }, w = {
30
30
  darkShade: "#0f1112",
31
31
  main: "#1c1f21",
32
32
  lightShade: "#292d30",
@@ -37,11 +37,11 @@ const v = {
37
37
  placeholderText: "#575757",
38
38
  semiContrastText: "#9caab0",
39
39
  contrastText: "#c3cdd1"
40
- }, u = "nmorph-data-theme", R = "dark", l = {
40
+ }, C = "nmorph-data-theme", R = "dark", S = {
41
41
  themes: {
42
- common: v,
43
- light: w,
44
- dark: B
42
+ common: $,
43
+ light: V,
44
+ dark: w
45
45
  },
46
46
  defaultTheme: R,
47
47
  saveCurrentThemeToLS: !0,
@@ -51,97 +51,143 @@ const v = {
51
51
  baseShadowWidth: "3.5px",
52
52
  baseShadowBlurCoefficient: "2"
53
53
  }
54
- }, j = (r) => /^#[0-9A-Fa-f]{6}$/.test(r), F = (r) => {
55
- if (!j(r)) throw new Error(`Invalid hex color: ${r}`);
56
- return r;
57
- }, V = (r, t) => {
58
- const s = {};
59
- return r.forEach(({ name: n, color: o }) => {
60
- s[n] = o;
61
- }), t.forEach(({ name: n, color: o }) => {
62
- s[n] = o;
63
- }), Object.entries(s).map(([n, o]) => ({ name: n, color: o }));
64
- }, L = (r, t) => {
65
- let s = parseInt(r.substring(1, 3), 16), n = parseInt(r.substring(3, 5), 16), o = parseInt(r.substring(5, 7), 16);
66
- s = Math.round(s * (1 + t / 100)), n = Math.round(n * (1 + t / 100)), o = Math.round(o * (1 + t / 100)), s = Math.min(255, Math.max(0, s)), n = Math.min(255, Math.max(0, n)), o = Math.min(255, Math.max(0, o));
67
- const S = s.toString(16).padStart(2, "0"), C = n.toString(16).padStart(2, "0"), d = o.toString(16).padStart(2, "0");
68
- return `#${S}${C}${d}`;
69
- }, W = (r) => {
70
- O("warn", `NMORPH(v${I.version})`);
71
- const t = {
72
- themes: r?.themes ?? l.themes,
73
- defaultTheme: r?.defaultTheme ?? l.defaultTheme,
74
- saveCurrentThemeToLS: r?.saveCurrentThemeToLS ?? l.saveCurrentThemeToLS,
75
- darkShadeGeneratorCoefficient: r?.darkShadeGeneratorCoefficient ?? l.darkShadeGeneratorCoefficient,
76
- lightShadeGeneratorCoefficient: r?.lightShadeGeneratorCoefficient ?? l.lightShadeGeneratorCoefficient,
77
- other: r?.other ?? l.other
78
- }, s = (a) => {
54
+ }, F = (t) => /^#[0-9A-Fa-f]{6}$/.test(t), v = (t) => {
55
+ if (!F(t)) throw new Error(`Invalid hex color: ${t}`);
56
+ return t;
57
+ }, L = (t, e) => {
58
+ const n = {};
59
+ return t.forEach(({ name: o, color: s }) => {
60
+ n[o] = s;
61
+ }), e.forEach(({ name: o, color: s }) => {
62
+ n[o] = s;
63
+ }), Object.entries(n).map(([o, s]) => ({ name: o, color: s }));
64
+ }, E = (t, e) => {
65
+ let n = parseInt(t.substring(1, 3), 16), o = parseInt(t.substring(3, 5), 16), s = parseInt(t.substring(5, 7), 16);
66
+ n = Math.round(n * (1 + e / 100)), o = Math.round(o * (1 + e / 100)), s = Math.round(s * (1 + e / 100)), n = Math.min(255, Math.max(0, n)), o = Math.min(255, Math.max(0, o)), s = Math.min(255, Math.max(0, s));
67
+ const c = n.toString(16).padStart(2, "0"), i = o.toString(16).padStart(2, "0"), d = s.toString(16).padStart(2, "0");
68
+ return `#${c}${i}${d}`;
69
+ }, G = (t) => ({
70
+ themes: t?.themes ?? S.themes,
71
+ defaultTheme: t?.defaultTheme ?? S.defaultTheme,
72
+ saveCurrentThemeToLS: t?.saveCurrentThemeToLS ?? S.saveCurrentThemeToLS,
73
+ darkShadeGeneratorCoefficient: t?.darkShadeGeneratorCoefficient ?? S.darkShadeGeneratorCoefficient,
74
+ lightShadeGeneratorCoefficient: t?.lightShadeGeneratorCoefficient ?? S.lightShadeGeneratorCoefficient,
75
+ other: t?.other ?? S.other
76
+ }), U = (t, e) => {
77
+ try {
78
+ const n = v(e);
79
+ return {
80
+ darkShade: E(n, t.darkShadeGeneratorCoefficient),
81
+ lightShade: E(n, t.lightShadeGeneratorCoefficient)
82
+ };
83
+ } catch (n) {
84
+ return console.error(n instanceof Error ? n.message : n), {};
85
+ }
86
+ }, x = (t) => Object.entries(t).filter(([, e]) => typeof e == "string").map(([e, n]) => ({
87
+ name: `--nmorph-${b(e)}-color`,
88
+ color: n
89
+ })), N = (t, e) => {
90
+ const n = (c) => c.map((i) => `${i.name}: ${i.color};`).join(" "), o = Object.entries(e).map(([c, i]) => `--${b(c)}: ${i};`).join(" "), s = [];
91
+ return Object.entries(t).forEach(([c, i]) => {
92
+ const d = x($);
93
+ if (c === "common") s.push(n(L(d, i)));
94
+ else {
95
+ const T = `
96
+ &[${C}='${c}'] {
97
+ ${n(i)}
98
+ }
99
+ `;
100
+ s.push(T);
101
+ }
102
+ }), `
103
+ :root {
104
+ ${s.join(" ")}
105
+ ${o}
106
+ }
107
+ `;
108
+ }, P = (t) => {
109
+ const e = {};
110
+ return Object.entries(t.themes).forEach(([n, o]) => {
111
+ e[n] = [];
112
+ const s = !!o.darkShade, c = !!o.lightShade;
113
+ !!o.main && !s && !c && o.main && (e[n] = x(U(t, o.main))), e[n] = [...e[n], ...x(o)];
114
+ }), e;
115
+ }, z = (t) => {
116
+ const e = G(t);
117
+ return N(P(e), e.other);
118
+ }, J = (t) => {
119
+ I("warn", `NMORPH(v${_.version})`);
120
+ const e = G(t), n = (a) => {
79
121
  try {
80
- const e = F(a);
122
+ const r = v(a);
81
123
  return {
82
- darkShade: L(e, t.darkShadeGeneratorCoefficient),
83
- lightShade: L(e, t.lightShadeGeneratorCoefficient)
124
+ darkShade: E(r, e.darkShadeGeneratorCoefficient),
125
+ lightShade: E(r, e.lightShadeGeneratorCoefficient)
84
126
  };
85
- } catch (e) {
86
- return console.error(e instanceof Error ? e.message : e), {};
127
+ } catch (r) {
128
+ return console.error(r instanceof Error ? r.message : r), {};
87
129
  }
88
- }, n = (a) => {
89
- const e = s(a);
90
- return o(e);
91
- }, o = (a) => Object.entries(a).filter(([, e]) => typeof e == "string").map(([e, c]) => ({
92
- name: `--nmorph-${M(e)}-color`,
93
- color: c
94
- })), S = (a, e) => {
95
- const c = (i) => i.map((m) => `${m.name}: ${m.color};`).join(" "), h = Object.entries(e).map(([i, m]) => `--${M(i)}: ${m};`).join(" "), T = [];
96
- return Object.entries(a).forEach(([i, m]) => {
97
- const E = o(v);
98
- if (i === "common") T.push(c(V(E, m)));
130
+ }, o = (a) => {
131
+ const r = n(a);
132
+ return s(r);
133
+ }, s = (a) => Object.entries(a).filter(([, r]) => typeof r == "string").map(([r, h]) => ({
134
+ name: `--nmorph-${b(r)}-color`,
135
+ color: h
136
+ })), c = (a, r) => {
137
+ const h = (f) => f.map((u) => `${u.name}: ${u.color};`).join(" "), l = Object.entries(r).map(([f, u]) => `--${b(f)}: ${u};`).join(" "), g = [];
138
+ return Object.entries(a).forEach(([f, u]) => {
139
+ const k = s($);
140
+ if (f === "common") g.push(h(L(k, u)));
99
141
  else {
100
- const D = `
101
- &[${u}='${i}'] {
102
- ${c(m)}
142
+ const B = `
143
+ &[${C}='${f}'] {
144
+ ${h(u)}
103
145
  }
104
146
  `;
105
- T.push(D);
147
+ g.push(B);
106
148
  }
107
149
  }), `
108
150
  :root {
109
- ${T.join(" ")}
110
- ${h}
151
+ ${g.join(" ")}
152
+ ${l}
111
153
  }
112
154
  `;
113
- }, C = (a) => {
114
- const e = {};
115
- return Object.entries(a).forEach(([c, h]) => {
116
- e[c] = [];
117
- const T = !!h.darkShade, i = !!h.lightShade;
118
- !!h.main && !T && !i && h.main && (e[c] = n(h.main)), e[c] = [...e[c], ...o(h)];
119
- }), e;
155
+ }, i = (a) => {
156
+ const r = {};
157
+ return Object.entries(a).forEach(([h, l]) => {
158
+ r[h] = [];
159
+ const g = !!l.darkShade, f = !!l.lightShade;
160
+ !!l.main && !g && !f && l.main && (r[h] = o(l.main)), r[h] = [...r[h], ...s(l)];
161
+ }), r;
162
+ }, d = typeof document < "u", T = A(e.defaultTheme);
163
+ let p = i(e.themes), m = null;
164
+ d && (m = document.getElementById("nmorph-theme-styles"), m || (m = document.createElement("style"), m.id = "nmorph-theme-styles", m.type = "text/css", document.head.appendChild(m)), m.innerHTML = c(p, e.other));
165
+ const D = () => {
166
+ p = i(e.themes), m && (m.innerHTML = c(p, e.other));
167
+ }, y = (a) => {
168
+ T.value = a, d && (document.documentElement.setAttribute(C, T.value), !(typeof localStorage > "u") && (e.saveCurrentThemeToLS ? localStorage.setItem(C, a) : localStorage.removeItem(C)));
169
+ }, M = (a, r) => {
170
+ const h = r.main && !r.darkShade && !r.lightShade ? n(r.main) : {};
171
+ e.themes[a] = { ...e.themes[a], ...r, ...h }, D();
172
+ }, O = (a, r) => {
173
+ r && M(a, r), y(a);
120
174
  };
121
- let d = C(t.themes);
122
- const g = document.createElement("style");
123
- g.type = "text/css", g.innerHTML = S(d, t.other), document.head.appendChild(g);
124
- const y = () => {
125
- d = C(t.themes), g.innerHTML = S(d, t.other);
126
- }, p = (a) => {
127
- f.value = a, k.setAttribute(u, f.value), t.saveCurrentThemeToLS ? localStorage.setItem(u, a) : localStorage.removeItem(u);
128
- }, x = (a, e) => {
129
- const c = e.main && !e.darkShade && !e.lightShade ? s(e.main) : {};
130
- t.themes[a] = { ...t.themes[a], ...e, ...c }, y();
131
- }, $ = (a, e) => {
132
- e && x(a, e), p(a);
133
- }, f = H(t.defaultTheme), k = document.documentElement, b = localStorage.getItem(u), G = b ? d[b] : void 0;
134
- t.saveCurrentThemeToLS && G && (f.value = b), p(f.value);
135
- const A = t;
175
+ if (d && typeof localStorage < "u") {
176
+ const a = localStorage.getItem(C), r = a ? p[a] : void 0;
177
+ e.saveCurrentThemeToLS && r && (T.value = a);
178
+ }
179
+ y(T.value);
180
+ const j = e;
136
181
  return {
137
- setTheme: p,
138
- setThemeColors: x,
139
- applyTheme: $,
140
- currentTheme: _(f),
141
- data: A,
142
- getDynamicColorVariables: n
182
+ setTheme: y,
183
+ setThemeColors: M,
184
+ applyTheme: O,
185
+ currentTheme: H(T),
186
+ data: j,
187
+ getDynamicColorVariables: o
143
188
  };
144
189
  };
145
190
  export {
146
- W as useNmorphTheme
191
+ z as getNmorphThemeStyles,
192
+ J as useNmorphTheme
147
193
  };
@@ -1,4 +1,4 @@
1
- const a = "2.2.12", e = {
1
+ const a = "2.2.13", e = {
2
2
  version: a
3
3
  };
4
4
  export {
package/dist/plugin.js CHANGED
@@ -1,48 +1,52 @@
1
- import { default as T } from "./locales/ru.js";
1
+ import { default as C } from "./locales/ru.js";
2
2
  import { default as _ } from "./locales/zh.js";
3
3
  import { default as w } from "./locales/en.js";
4
4
  import { nmorphLog as M } from "./outside-utils/index.js";
5
- import { AvatarShapeType as E, Locale as H, NmorphColor as O, NmorphComponentDirection as j, NmorphComponentHeight as A, NmorphComponentPosition as B, NmorphImageFit as F, NmorphRadioStyleType as P, NmorphSelectionControlHeight as R, NmorphSelectionDateType as U, NmorphShadowType as Z, NmorphSortOrder as k } from "./types/index.js";
6
- import { useNmorphTranslation as h } from "./hooks/use-nmorph-translation.js";
5
+ import { useNmorphTheme as h } from "./outside-hooks/use-nmorph-theme.js";
6
+ import { getNmorphThemeStyles as E } from "./outside-hooks/use-nmorph-theme.js";
7
7
  import { useCommonStyles as i } from "./hooks/use-common-styles.js";
8
- import { useNmorphTheme as f } from "./outside-hooks/use-nmorph-theme.js";
8
+ import { getCommonStyles as O } from "./hooks/use-common-styles.js";
9
+ import { AvatarShapeType as A, Locale as B, NmorphColor as F, NmorphComponentDirection as P, NmorphComponentHeight as R, NmorphComponentPosition as U, NmorphImageFit as Z, NmorphRadioStyleType as k, NmorphSelectionControlHeight as q, NmorphSelectionDateType as G, NmorphShadowType as J, NmorphSortOrder as K } from "./types/index.js";
10
+ import { useNmorphTranslation as f } from "./hooks/use-nmorph-translation.js";
9
11
  import { useNmorphBrowser as c } from "./outside-hooks/use-nmorph-browser.js";
10
12
  import { useNmorphZIndex as N } from "./outside-hooks/use-nmorph-z-index.js";
11
- import { useNmorph as G } from "./outside-hooks/use-nmorph.js";
12
- import { useNmorphNotification as K } from "./outside-hooks/use-nmorph-notification.js";
13
- const u = {
13
+ import { useNmorph as W } from "./outside-hooks/use-nmorph.js";
14
+ import { useNmorphNotification as Y } from "./outside-hooks/use-nmorph-notification.js";
15
+ const g = {
14
16
  install(e, r = {}) {
15
17
  if (!r?.i18n?.outsideMessagesMerge) {
16
- const o = h(r.i18n), m = e.__VUE_I18N__;
18
+ const o = f(r.i18n), m = e.__VUE_I18N__;
17
19
  m ? (o.global.messages.value && Object.entries(o.global.messages.value).forEach(([s, n]) => {
18
20
  m.global.mergeLocaleMessage(s, n);
19
21
  }), o.global.locale.value && (m.global.locale.value = o.global.locale.value)) : e.use(o);
20
22
  }
21
23
  i();
22
- const t = f(r.theme), a = c(), l = N(r.zIndex), p = { theme: t, browser: a, zIndex: l };
24
+ const t = h(r.theme), a = c(), l = N(r.zIndex), p = { theme: t, browser: a, zIndex: l };
23
25
  return e.provide("nmorph", p), e;
24
26
  }
25
- }, y = u;
27
+ }, S = g;
26
28
  export {
27
- E as AvatarShapeType,
28
- H as Locale,
29
- O as NmorphColor,
30
- j as NmorphComponentDirection,
31
- A as NmorphComponentHeight,
32
- B as NmorphComponentPosition,
33
- F as NmorphImageFit,
34
- y as NmorphLibrary,
35
- P as NmorphRadioStyleType,
36
- R as NmorphSelectionControlHeight,
37
- U as NmorphSelectionDateType,
38
- Z as NmorphShadowType,
39
- k as NmorphSortOrder,
29
+ A as AvatarShapeType,
30
+ B as Locale,
31
+ F as NmorphColor,
32
+ P as NmorphComponentDirection,
33
+ R as NmorphComponentHeight,
34
+ U as NmorphComponentPosition,
35
+ Z as NmorphImageFit,
36
+ S as NmorphLibrary,
37
+ k as NmorphRadioStyleType,
38
+ q as NmorphSelectionControlHeight,
39
+ G as NmorphSelectionDateType,
40
+ J as NmorphShadowType,
41
+ K as NmorphSortOrder,
40
42
  w as en,
43
+ O as getCommonStyles,
44
+ E as getNmorphThemeStyles,
41
45
  M as nmorphLog,
42
- T as ru,
43
- G as useNmorph,
46
+ C as ru,
47
+ W as useNmorph,
44
48
  c as useNmorphBrowser,
45
- K as useNmorphNotification,
46
- f as useNmorphTheme,
49
+ Y as useNmorphNotification,
50
+ h as useNmorphTheme,
47
51
  _ as zh
48
52
  };
@@ -6,6 +6,10 @@ interface INmorphProps {
6
6
  bordered?: boolean;
7
7
  sort?: NmorphTableSortType;
8
8
  design?: 'nmorph' | 'common';
9
+ virtual?: boolean;
10
+ virtualHeight?: number | string;
11
+ virtualOverscan?: number;
12
+ virtualRowHeight?: number;
9
13
  }
10
14
  declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
11
15
  sort: NmorphTableSortType;
@@ -13,8 +17,13 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
13
17
  bordered: boolean;
14
18
  design: "nmorph" | "common";
15
19
  rowHover: boolean;
20
+ virtual: boolean;
21
+ virtualHeight: string | number;
22
+ virtualOverscan: number;
23
+ virtualRowHeight: number;
16
24
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
17
25
  default?(_: {}): any;
26
+ default?(_: {}): any;
18
27
  }>;
19
28
  export default _default;
20
29
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { NmorphSortOrderType } from '../../../types';
2
- import { Ref } from 'vue';
2
+ import { ComputedRef, Ref } from 'vue';
3
3
  export type NmorphTableSortType = Record<string, NmorphSortOrderType>;
4
4
  export type NmorphDataTableElRecordType = Record<string, unknown>;
5
5
  export type NmorphCellAlignmentType = 'left' | 'center' | 'right';
@@ -14,7 +14,7 @@ export interface NmorphTableColumnData extends INmorphTableColumnProps {
14
14
  id?: number;
15
15
  }
16
16
  export interface INmorphTableDataInjection {
17
- rows: Ref<NmorphDataTableElRecordType[]>;
17
+ rows: Ref<NmorphDataTableElRecordType[]> | ComputedRef<NmorphDataTableElRecordType[]>;
18
18
  columns: Ref<NmorphTableColumnData[]>;
19
19
  }
20
20
  export type NmorphTableColumnPropertyInjectionType = string;
@@ -10,7 +10,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
10
10
  tooltipBody: Ref<HTMLElement, HTMLElement>;
11
11
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
12
12
  text: string;
13
- position: "top" | "right" | "left" | "bottom";
13
+ position: NmorphPlacementType;
14
14
  forceShow: boolean;
15
15
  forceCoordinate: Partial<INmorphCoords<string>>;
16
16
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
@@ -8,6 +8,10 @@ interface INmorphProps extends INmorphCommonInputProps {
8
8
  list: INmorphAutocompleteListItem[];
9
9
  actionCallback?: NmorphAutocompleteActionCallbackType;
10
10
  zIndex?: number;
11
+ virtual?: boolean;
12
+ virtualItemHeight?: number;
13
+ virtualMaxHeight?: number | string;
14
+ virtualOverscan?: number;
11
15
  }
12
16
  declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
13
17
  select: (value: unknown) => any;
@@ -19,15 +23,22 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
19
23
  height: "thick" | "basic" | "thin";
20
24
  disabled: boolean;
21
25
  modelValue: string;
26
+ virtual: boolean;
27
+ virtualOverscan: number;
22
28
  placeholder: string;
23
29
  clearable: boolean;
24
30
  list: INmorphAutocompleteListItem[];
25
31
  actionCallback: NmorphAutocompleteActionCallbackType;
32
+ virtualItemHeight: number;
33
+ virtualMaxHeight: string | number;
26
34
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
27
35
  loader?(_: {}): any;
28
36
  default?(_: {
29
37
  scope: INmorphAutocompleteListItem;
30
38
  }): any;
39
+ default?(_: {
40
+ scope: INmorphAutocompleteListItem;
41
+ }): any;
31
42
  }>;
32
43
  export default _default;
33
44
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -12,6 +12,10 @@ interface INmorphProps extends INmorphCommonInputProps {
12
12
  fill?: boolean;
13
13
  optionsWidth?: 'truncate' | 'auto';
14
14
  zIndex?: number;
15
+ virtual?: boolean;
16
+ virtualItemHeight?: number;
17
+ virtualMaxHeight?: number | string;
18
+ virtualOverscan?: number;
15
19
  }
16
20
  declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
17
21
  "update:model-value": (val: NmorphSelectModelValueType) => any;
@@ -24,7 +28,11 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
24
28
  disabled: boolean;
25
29
  modelValue: NmorphSelectModelValueType;
26
30
  open: boolean;
31
+ virtual: boolean;
32
+ virtualOverscan: number;
27
33
  options: INmorphSelectOption[];
34
+ virtualItemHeight: number;
35
+ virtualMaxHeight: string | number;
28
36
  noElementPlaceholder: string;
29
37
  valueRequired: boolean;
30
38
  optionsMap: INmorphSelectOption[];
@@ -8,6 +8,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphSelectOp
8
8
  height: "thick" | "basic" | "thin";
9
9
  disabled: boolean;
10
10
  label: string;
11
+ focused: boolean;
11
12
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
12
13
  default?(_: {}): any;
13
14
  }>;
@@ -6,4 +6,5 @@ export type NmorphSelectChangeSelectedValue = (value: string) => void;
6
6
  export interface INmorphSelectOption extends INmorphCommonInputProps {
7
7
  value: string;
8
8
  label: string;
9
+ focused?: boolean;
9
10
  }
@@ -1,8 +1,9 @@
1
- import { NmorphDomElementType } from '../../../types';
1
+ import { NmorphDomElementType, NmorphPlacementType } from '../../../types';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  interface INmorphProps {
4
4
  open: boolean;
5
5
  relativeElement: NmorphDomElementType;
6
+ placement?: NmorphPlacementType;
6
7
  width?: number | string;
7
8
  minWidth?: number | string;
8
9
  maxWidth?: number | string;
@@ -17,6 +18,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
17
18
  "onOn-outside-click"?: () => any;
18
19
  }>, {
19
20
  width: string | number;
21
+ placement: NmorphPlacementType;
20
22
  xOffset: number;
21
23
  yOffset: number;
22
24
  fillWidth: boolean;
@@ -3,6 +3,8 @@ interface INmorphProps {
3
3
  show: boolean;
4
4
  transparent?: boolean;
5
5
  zIndex?: number;
6
+ teleportTo?: string | HTMLElement;
7
+ disabledTeleport?: boolean;
6
8
  }
7
9
  declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
8
10
  "on-outside-click": () => any;
@@ -10,6 +12,8 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<INmorphProps, {
10
12
  "onOn-outside-click"?: () => any;
11
13
  }>, {
12
14
  transparent: boolean;
15
+ teleportTo: string | HTMLElement;
16
+ disabledTeleport: boolean;
13
17
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
14
18
  default?(_: {}): any;
15
19
  }>;
@@ -8,7 +8,7 @@ interface INmorphProps {
8
8
  }
9
9
  declare const _default: DefineComponent<INmorphProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<INmorphProps> & Readonly<{}>, {
10
10
  zIndex: number;
11
- placement: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
11
+ placement: "top-center" | "bottom-center" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
12
12
  quantity: number;
13
13
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
14
14
  export default _default;