@nmorph/nmorph-ui-kit 2.2.10 → 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 (75) 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-avatar/NmorphAvatar.css +1 -0
  5. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +74 -46
  6. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +26 -21
  7. package/dist/components/data/nmorph-carousel/NmorphCarousel.vue2.js +4 -4
  8. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue.js +77 -38
  9. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +31 -30
  10. package/dist/components/data/nmorph-pagination/NmorphPagination.css +1 -1
  11. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +36 -30
  12. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +48 -41
  13. package/dist/components/data/nmorph-table/NmorphTable.css +1 -1
  14. package/dist/components/data/nmorph-table/NmorphTable.vue.js +228 -103
  15. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +49 -30
  16. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  17. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +91 -35
  18. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +48 -35
  19. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
  20. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue.js +15 -13
  21. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +8 -8
  22. package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +22 -14
  23. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +11 -10
  24. package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
  25. package/dist/components/form/nmorph-radio/NmorphRadio.vue.js +22 -20
  26. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +7 -7
  27. package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +14 -14
  28. package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
  29. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +115 -58
  30. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +104 -75
  31. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +12 -10
  32. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +7 -7
  33. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue.js +29 -42
  34. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +39 -20
  35. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue.js +29 -24
  36. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +17 -15
  37. package/dist/hooks/use-common-styles.js +23 -20
  38. package/dist/hooks/use-placement.js +76 -44
  39. package/dist/hooks/use-virtual-list.js +46 -0
  40. package/dist/index.es.js +698 -694
  41. package/dist/index.umd.js +46 -38
  42. package/dist/nuxt.mjs +21 -8
  43. package/dist/outside-hooks/use-nmorph-browser.js +9 -9
  44. package/dist/outside-hooks/use-nmorph-theme.js +133 -87
  45. package/dist/package.json.js +1 -1
  46. package/dist/plugin.js +34 -29
  47. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
  48. package/dist/src/components/data/nmorph-image/NmorphImage.vue.d.ts +3 -3
  49. package/dist/src/components/data/nmorph-image-preview/NmorphImagePreview.vue.d.ts +14 -2
  50. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +3 -0
  51. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +9 -0
  52. package/dist/src/components/data/nmorph-table/types.d.ts +2 -2
  53. package/dist/src/components/feedback/nmorph-tooltip/NmorphTooltip.vue.d.ts +1 -1
  54. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +11 -0
  55. package/dist/src/components/form/nmorph-checkbox/NmorphCheckbox.vue.d.ts +1 -0
  56. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +4 -3
  57. package/dist/src/components/form/nmorph-radio/NmorphRadio.vue.d.ts +1 -0
  58. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +4 -3
  59. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +8 -0
  60. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +1 -0
  61. package/dist/src/components/form/nmorph-select/types.d.ts +1 -0
  62. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +3 -1
  63. package/dist/src/components/others/nmorph-overlay/NmorphOverlay.vue.d.ts +4 -0
  64. package/dist/src/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.d.ts +1 -1
  65. package/dist/src/hooks/index.d.ts +1 -0
  66. package/dist/src/hooks/use-common-styles.d.ts +1 -0
  67. package/dist/src/hooks/use-placement.d.ts +8 -4
  68. package/dist/src/hooks/use-virtual-list.d.ts +21 -0
  69. package/dist/src/outside-hooks/use-nmorph-notification.d.ts +2 -2
  70. package/dist/src/outside-hooks/use-nmorph-theme.d.ts +1 -0
  71. package/dist/src/plugin.d.ts +2 -0
  72. package/dist/src/types/index.d.ts +12 -3
  73. package/dist/style.css +1 -1
  74. package/dist/types/index.js +14 -8
  75. package/package.json +1 -1
@@ -1,67 +1,67 @@
1
1
  import './NmorphTable.css';
2
- import h from "./NmorphTable.vue2.js";
3
- import { openBlock as t, createElementBlock as o, normalizeClass as i, createElementVNode as e, Fragment as a, renderList as d, normalizeStyle as s, toDisplayString as p, createBlock as b, createCommentVNode as m, renderSlot as y } from "vue";
2
+ import m from "./NmorphTable.vue2.js";
3
+ import { openBlock as t, createElementBlock as e, normalizeClass as _, createElementVNode as o, Fragment as n, renderList as i, normalizeStyle as d, toDisplayString as b, createBlock as y, createCommentVNode as u, renderSlot as p } from "vue";
4
4
  /* empty css */
5
- import u from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const f = { class: "nmorph-table__wrapper" }, w = { class: "nmorph-table__header" }, k = ["data-src"], v = { class: "nmorph-table__table-row" }, g = { class: "nmorph-table__cell" }, S = { class: "nmorph-table__body" }, x = ["id"], N = { class: "nmorph-table__slot-columns" };
7
- function B(c, W, T, l, j, z) {
8
- return t(), o("div", null, [
9
- (t(), o(
5
+ import v from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const w = { class: "nmorph-table__wrapper" }, f = { class: "nmorph-table__header" }, k = ["data-src"], g = { class: "nmorph-table__table-row" }, S = { class: "nmorph-table__cell" }, x = ["id"], W = { class: "nmorph-table__slot-columns" }, B = ["id"], N = { class: "nmorph-table__slot-columns" };
7
+ function E(c, h, H, l, L, C) {
8
+ return t(), e("div", null, [
9
+ (t(), e(
10
10
  "div",
11
11
  {
12
12
  ref: "nmorphDOMTable",
13
13
  key: l.key,
14
- class: i(l.modifiers)
14
+ class: _(l.modifiers)
15
15
  },
16
16
  [
17
- e("div", f, [
18
- e("table", w, [
19
- e("colgroup", null, [
20
- (t(!0), o(
21
- a,
17
+ o("div", w, [
18
+ o("table", f, [
19
+ o("colgroup", null, [
20
+ (t(!0), e(
21
+ n,
22
22
  null,
23
- d(l.columns, (r) => (t(), o("col", {
23
+ i(l.columns, (r) => (t(), e("col", {
24
24
  key: r.prop,
25
- style: s({ width: `${l.getWidth(r.width)}px` }),
25
+ style: d({ width: `${l.getWidth(r.width)}px` }),
26
26
  "data-src": `${l.getWidth(r.width)}px`
27
27
  }, null, 12, k))),
28
28
  128
29
29
  /* KEYED_FRAGMENT */
30
30
  ))
31
31
  ]),
32
- e("thead", null, [
33
- e("tr", v, [
34
- (t(!0), o(
35
- a,
32
+ o("thead", null, [
33
+ o("tr", g, [
34
+ (t(!0), e(
35
+ n,
36
36
  null,
37
- d(l.columns, (r, _) => (t(), o(
37
+ i(l.columns, (r, s) => (t(), e(
38
38
  "th",
39
39
  {
40
- key: _,
41
- class: i(["nmorph-table__table-data", { "nmorph-table__table-data--bordered": l.props.bordered }])
40
+ key: s,
41
+ class: _(["nmorph-table__table-data", { "nmorph-table__table-data--bordered": l.props.bordered }])
42
42
  },
43
43
  [
44
- e("div", g, [
45
- e(
44
+ o("div", S, [
45
+ o(
46
46
  "div",
47
47
  {
48
- style: s({ "justify-content": r.alignment }),
48
+ style: d({ "justify-content": r.alignment }),
49
49
  class: "nmorph-table__cell-content"
50
50
  },
51
51
  [
52
- e(
52
+ o(
53
53
  "span",
54
54
  null,
55
- p(r.label),
55
+ b(r.label),
56
56
  1
57
57
  /* TEXT */
58
58
  ),
59
- l.sortData && l.sortData[r.prop] ? (t(), b(l.NmorphSortButton, {
59
+ l.sortData && l.sortData[r.prop] ? (t(), y(l.NmorphSortButton, {
60
60
  key: 0,
61
61
  class: "nmorph-table__button-wrapper",
62
62
  value: l.sortData[r.prop],
63
- onSort: (n) => l.onSort(n, r.prop)
64
- }, null, 8, ["value", "onSort"])) : m("v-if", !0)
63
+ onSort: (a) => l.onSort(a, r.prop)
64
+ }, null, 8, ["value", "onSort"])) : u("v-if", !0)
65
65
  ],
66
66
  4
67
67
  /* STYLE */
@@ -77,52 +77,177 @@ function B(c, W, T, l, j, z) {
77
77
  ])
78
78
  ])
79
79
  ]),
80
- e("div", S, [
81
- e("table", null, [
82
- e("colgroup", null, [
83
- (t(!0), o(
84
- a,
85
- null,
86
- d(l.columns, (r) => (t(), o(
87
- "col",
80
+ o(
81
+ "div",
82
+ {
83
+ ref: l.virtualList.containerRef,
84
+ class: _(["nmorph-table__body", { "nmorph-table__body--virtual": l.virtualEnabled }]),
85
+ style: d(l.tableBodyStyle),
86
+ onScroll: h[0] || (h[0] = (...r) => l.virtualList.scrollHandler && l.virtualList.scrollHandler(...r))
87
+ },
88
+ [
89
+ l.virtualEnabled ? (t(), e(
90
+ "div",
91
+ {
92
+ key: 0,
93
+ class: "nmorph-table__virtual-spacer",
94
+ style: d(l.virtualSpacerStyle)
95
+ },
96
+ [
97
+ o(
98
+ "div",
88
99
  {
89
- key: r.prop,
90
- style: s({ width: `${l.getWidth(r.width)}px` })
100
+ class: "nmorph-table__virtual-content",
101
+ style: d(l.virtualContentStyle)
91
102
  },
92
- null,
103
+ [
104
+ o("table", null, [
105
+ o("colgroup", null, [
106
+ (t(!0), e(
107
+ n,
108
+ null,
109
+ i(l.columns, (r) => (t(), e(
110
+ "col",
111
+ {
112
+ key: r.prop,
113
+ style: d({ width: `${l.getWidth(r.width)}px` })
114
+ },
115
+ null,
116
+ 4
117
+ /* STYLE */
118
+ ))),
119
+ 128
120
+ /* KEYED_FRAGMENT */
121
+ ))
122
+ ]),
123
+ o("tbody", null, [
124
+ (t(!0), e(
125
+ n,
126
+ null,
127
+ i(l.tableRows, (r, s) => (t(), e(
128
+ "tr",
129
+ {
130
+ key: s,
131
+ class: _(["nmorph-table__table-data-row", { "nmorph-table__table-data-row--row-hover": l.props.rowHover }])
132
+ },
133
+ [
134
+ (t(!0), e(
135
+ n,
136
+ null,
137
+ i(l.columns, (a) => (t(), e(
138
+ "td",
139
+ {
140
+ key: a.prop,
141
+ class: _([{ "nmorph-table__table-data--bordered": l.props.bordered }, "nmorph-table__table-data"])
142
+ },
143
+ [
144
+ o("div", {
145
+ id: `table-cell-${l.tableIdentifier}-${s}-${a.prop}`,
146
+ style: d({ "text-align": a.alignment }),
147
+ class: "nmorph-table__cell nmorph-table__cell--data"
148
+ }, b(l.tableData(r[a.prop])), 13, x)
149
+ ],
150
+ 2
151
+ /* CLASS */
152
+ ))),
153
+ 128
154
+ /* KEYED_FRAGMENT */
155
+ ))
156
+ ],
157
+ 2
158
+ /* CLASS */
159
+ ))),
160
+ 128
161
+ /* KEYED_FRAGMENT */
162
+ ))
163
+ ])
164
+ ]),
165
+ o("table", null, [
166
+ o("colgroup", null, [
167
+ (t(!0), e(
168
+ n,
169
+ null,
170
+ i(l.columns, (r) => (t(), e(
171
+ "col",
172
+ {
173
+ key: r.prop,
174
+ style: d({ width: `${l.getWidth(r.width)}px` })
175
+ },
176
+ null,
177
+ 4
178
+ /* STYLE */
179
+ ))),
180
+ 128
181
+ /* KEYED_FRAGMENT */
182
+ ))
183
+ ]),
184
+ o("tbody", W, [
185
+ p(c.$slots, "default")
186
+ ])
187
+ ])
188
+ ],
93
189
  4
94
190
  /* STYLE */
95
- ))),
96
- 128
97
- /* KEYED_FRAGMENT */
98
- ))
99
- ]),
100
- e("tbody", null, [
101
- (t(!0), o(
102
- a,
103
- null,
104
- d(l.rows, (r, _) => (t(), o(
105
- "tr",
106
- {
107
- key: _,
108
- class: i(["nmorph-table__table-data-row", { "nmorph-table__table-data-row--row-hover": l.props.rowHover }])
109
- },
110
- [
111
- (t(!0), o(
112
- a,
191
+ )
192
+ ],
193
+ 4
194
+ /* STYLE */
195
+ )) : (t(), e(
196
+ n,
197
+ { key: 1 },
198
+ [
199
+ o("table", null, [
200
+ o("colgroup", null, [
201
+ (t(!0), e(
202
+ n,
113
203
  null,
114
- d(l.columns, (n) => (t(), o(
115
- "td",
204
+ i(l.columns, (r) => (t(), e(
205
+ "col",
116
206
  {
117
- key: n.prop,
118
- class: i([{ "nmorph-table__table-data--bordered": l.props.bordered }, "nmorph-table__table-data"])
207
+ key: r.prop,
208
+ style: d({ width: `${l.getWidth(r.width)}px` })
209
+ },
210
+ null,
211
+ 4
212
+ /* STYLE */
213
+ ))),
214
+ 128
215
+ /* KEYED_FRAGMENT */
216
+ ))
217
+ ]),
218
+ o("tbody", null, [
219
+ (t(!0), e(
220
+ n,
221
+ null,
222
+ i(l.tableRows, (r, s) => (t(), e(
223
+ "tr",
224
+ {
225
+ key: s,
226
+ class: _(["nmorph-table__table-data-row", { "nmorph-table__table-data-row--row-hover": l.props.rowHover }])
119
227
  },
120
228
  [
121
- e("div", {
122
- id: `table-cell-${l.tableIdentifier}-${_}-${n.prop}`,
123
- style: s({ "text-align": n.alignment }),
124
- class: "nmorph-table__cell nmorph-table__cell--data"
125
- }, p(l.tableData(r[n.prop])), 13, x)
229
+ (t(!0), e(
230
+ n,
231
+ null,
232
+ i(l.columns, (a) => (t(), e(
233
+ "td",
234
+ {
235
+ key: a.prop,
236
+ class: _([{ "nmorph-table__table-data--bordered": l.props.bordered }, "nmorph-table__table-data"])
237
+ },
238
+ [
239
+ o("div", {
240
+ id: `table-cell-${l.tableIdentifier}-${s}-${a.prop}`,
241
+ style: d({ "text-align": a.alignment }),
242
+ class: "nmorph-table__cell nmorph-table__cell--data"
243
+ }, b(l.tableData(r[a.prop])), 13, B)
244
+ ],
245
+ 2
246
+ /* CLASS */
247
+ ))),
248
+ 128
249
+ /* KEYED_FRAGMENT */
250
+ ))
126
251
  ],
127
252
  2
128
253
  /* CLASS */
@@ -130,39 +255,39 @@ function B(c, W, T, l, j, z) {
130
255
  128
131
256
  /* KEYED_FRAGMENT */
132
257
  ))
133
- ],
134
- 2
135
- /* CLASS */
136
- ))),
137
- 128
138
- /* KEYED_FRAGMENT */
139
- ))
140
- ])
141
- ]),
142
- e("table", null, [
143
- e("colgroup", null, [
144
- (t(!0), o(
145
- a,
146
- null,
147
- d(l.columns, (r) => (t(), o(
148
- "col",
149
- {
150
- key: r.prop,
151
- style: s({ width: `${l.getWidth(r.width)}px` })
152
- },
153
- null,
154
- 4
155
- /* STYLE */
156
- ))),
157
- 128
158
- /* KEYED_FRAGMENT */
159
- ))
160
- ]),
161
- e("tbody", N, [
162
- y(c.$slots, "default")
163
- ])
164
- ])
165
- ])
258
+ ])
259
+ ]),
260
+ o("table", null, [
261
+ o("colgroup", null, [
262
+ (t(!0), e(
263
+ n,
264
+ null,
265
+ i(l.columns, (r) => (t(), e(
266
+ "col",
267
+ {
268
+ key: r.prop,
269
+ style: d({ width: `${l.getWidth(r.width)}px` })
270
+ },
271
+ null,
272
+ 4
273
+ /* STYLE */
274
+ ))),
275
+ 128
276
+ /* KEYED_FRAGMENT */
277
+ ))
278
+ ]),
279
+ o("tbody", N, [
280
+ p(c.$slots, "default")
281
+ ])
282
+ ])
283
+ ],
284
+ 64
285
+ /* STABLE_FRAGMENT */
286
+ ))
287
+ ],
288
+ 38
289
+ /* CLASS, STYLE, NEED_HYDRATION */
290
+ )
166
291
  ])
167
292
  ],
168
293
  2
@@ -170,7 +295,7 @@ function B(c, W, T, l, j, z) {
170
295
  ))
171
296
  ]);
172
297
  }
173
- const H = /* @__PURE__ */ u(h, [["render", B], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-table/NmorphTable.vue"]]);
298
+ const I = /* @__PURE__ */ v(m, [["render", E], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-table/NmorphTable.vue"]]);
174
299
  export {
175
- H as default
300
+ I as default
176
301
  };
@@ -1,52 +1,71 @@
1
1
  import './NmorphTable.css';
2
- import { defineComponent as w, computed as b, ref as l, provide as g, watch as B } from "vue";
3
- import { useModifiers as D } from "../../../utils/create-modifiers.js";
4
- import { generateUUID as j } from "../../../utils/common.js";
5
- import x from "./inner-components/nmorph-sort-button/NmorphSortButton.vue.js";
6
- const M = /* @__PURE__ */ w({
2
+ import { defineComponent as j, computed as r, ref as s, provide as q, watch as I } from "vue";
3
+ import { useModifiers as T } from "../../../utils/create-modifiers.js";
4
+ import { generateUUID as M } from "../../../utils/common.js";
5
+ import Q from "./inner-components/nmorph-sort-button/NmorphSortButton.vue.js";
6
+ import { useVirtualList as U } from "../../../hooks/use-virtual-list.js";
7
+ const P = /* @__PURE__ */ j({
7
8
  __name: "NmorphTable",
8
9
  props: {
9
10
  data: { type: Array, required: !1, default: () => [] },
10
11
  rowHover: { type: Boolean, required: !1, default: !0 },
11
12
  bordered: { type: Boolean, required: !1, default: !1 },
12
13
  sort: { type: Object, required: !1, default: void 0 },
13
- design: { type: String, required: !1, default: "nmorph" }
14
+ design: { type: String, required: !1, default: "nmorph" },
15
+ virtual: { type: Boolean, required: !1, default: !1 },
16
+ virtualHeight: { type: [Number, String], required: !1, default: "320px" },
17
+ virtualOverscan: { type: Number, required: !1, default: 5 },
18
+ virtualRowHeight: { type: Number, required: !1, default: 42 }
14
19
  },
15
- setup(y, { expose: C }) {
16
- C();
17
- const r = y, _ = b(
18
- () => D({
19
- "nmorph-table": [`${r.design}`]
20
+ setup(x, { expose: W }) {
21
+ W();
22
+ const t = x, B = r(
23
+ () => T({
24
+ "nmorph-table": [`${t.design}`]
20
25
  })
21
- ), u = l(r.data), n = l(r.sort), W = (e, o) => {
22
- n.value && (n.value[o] = e, u.value.sort((c, f) => {
23
- const m = String(c[o]).toLowerCase(), t = String(f[o]).toLowerCase();
26
+ ), l = s([...t.data]), i = r(() => t.virtual), g = r(() => t.virtualRowHeight), b = r(() => t.virtualOverscan), d = U(l, {
27
+ enabled: i,
28
+ itemHeight: g,
29
+ overscan: b
30
+ }), y = r(
31
+ () => i.value ? d.virtualItems.value.map((e) => e.item) : l.value
32
+ ), n = s(t.sort), N = (e, o) => {
33
+ n.value && (n.value[o] = e, l.value.sort((m, p) => {
34
+ const h = String(m[o]).toLowerCase(), a = String(p[o]).toLowerCase();
24
35
  if (!n.value)
25
36
  return 0;
26
- const i = n.value[o];
27
- return i === "ascending" ? m.localeCompare(t) : i === "descending" ? t.localeCompare(m) : 0;
37
+ const c = n.value[o];
38
+ return c === "ascending" ? h.localeCompare(a) : c === "descending" ? a.localeCompare(h) : 0;
28
39
  }));
29
- }, s = l(null), a = l([]);
30
- g("table-data", { rows: u, columns: a });
31
- const p = b(() => {
32
- const e = a.value.map((t) => t.width).filter((t) => !!t), o = e.length, c = e.reduce((t, i) => (t += Number(i), t), 0), f = a.value.length - o;
33
- return s.value?.clientWidth ? (s.value?.clientWidth - c) / f : 0;
34
- }), S = (e) => e !== "" ? e : p.value, d = l(0);
35
- B(
36
- () => r.data,
40
+ }, f = s(null), u = s([]);
41
+ q("table-data", { rows: y, columns: u });
42
+ const w = r(() => {
43
+ const e = u.value.map((a) => a.width).filter((a) => !!a), o = e.length, m = e.reduce((a, c) => (a += Number(c), a), 0), p = u.value.length - o;
44
+ return f.value?.clientWidth ? (f.value?.clientWidth - m) / p : 0;
45
+ }), O = (e) => e !== "" ? e : w.value, v = s(0);
46
+ I(
47
+ () => t.data,
37
48
  () => {
38
- d.value = d.value + 1, u.value = r.data, a.value = [];
49
+ v.value = v.value + 1, l.value = [...t.data], u.value = [];
39
50
  },
40
51
  {
41
52
  immediate: !0
42
53
  }
43
54
  );
44
- const q = (e) => typeof e == "object" ? "" : e, v = j();
45
- g("table-identifier", v);
46
- const h = { props: r, modifiers: _, rows: u, sortData: n, onSort: W, nmorphDOMTable: s, columns: a, defaultColWidth: p, getWidth: S, key: d, tableData: q, tableIdentifier: v, NmorphSortButton: x };
47
- return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
55
+ const R = (e) => typeof e == "object" ? "" : e, C = M();
56
+ q("table-identifier", C);
57
+ const S = (e) => typeof e == "number" ? `${e}px` : e, H = r(() => S(t.virtualHeight)), $ = r(() => ({
58
+ "--table-virtual-row-height": `${t.virtualRowHeight}px`,
59
+ height: i.value ? H.value : void 0,
60
+ overflowY: i.value ? "auto" : void 0
61
+ })), D = r(() => ({
62
+ height: `${d.totalHeight.value}px`
63
+ })), L = r(() => ({
64
+ transform: `translateY(${d.offsetTop.value}px)`
65
+ })), _ = { props: t, modifiers: B, rows: l, virtualEnabled: i, virtualRowHeight: g, virtualOverscan: b, virtualList: d, tableRows: y, sortData: n, onSort: N, nmorphDOMTable: f, columns: u, defaultColWidth: w, getWidth: O, key: v, tableData: R, tableIdentifier: C, getCssSize: S, virtualHeight: H, tableBodyStyle: $, virtualSpacerStyle: D, virtualContentStyle: L, NmorphSortButton: Q };
66
+ return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
48
67
  }
49
68
  });
50
69
  export {
51
- M as default
70
+ P as default
52
71
  };
@@ -1 +1 @@
1
- .nmorph-autocomplete .nmorph-autocomplete__list-item{padding:var(--indentation-02) var(--indentation-04);cursor:pointer}.nmorph-autocomplete .nmorph-autocomplete__list-item:last-child{border-bottom-left-radius:var(--indentation-02);border-bottom-right-radius:var(--indentation-02)}.nmorph-autocomplete .nmorph-autocomplete__loading{display:flex;align-items:center;justify-content:center;height:100px}.nmorph-autocomplete .nmorph-autocomplete__list-item:hover{color:var(--nmorph-white-color);background:var(--nmorph-accent-color)}
1
+ .nmorph-autocomplete .nmorph-autocomplete__list-item{padding:var(--indentation-02) var(--indentation-04);cursor:pointer}.nmorph-autocomplete .nmorph-autocomplete__list-item:last-child{border-bottom-left-radius:var(--indentation-02);border-bottom-right-radius:var(--indentation-02)}.nmorph-autocomplete .nmorph-autocomplete__loading{display:flex;align-items:center;justify-content:center;height:100px}.nmorph-autocomplete .nmorph-autocomplete__list-item:hover{color:var(--nmorph-white-color);background:var(--nmorph-accent-color)}.nmorph-autocomplete .nmorph-autocomplete__list--virtual{overflow-y:auto}.nmorph-autocomplete .nmorph-autocomplete__list--virtual .nmorph-autocomplete__list-item{height:var(--autocomplete-virtual-item-height);overflow:hidden}.nmorph-autocomplete .nmorph-autocomplete__virtual-spacer{position:relative}.nmorph-autocomplete .nmorph-autocomplete__virtual-content{position:absolute;top:0;right:0;left:0}