dendelion-ui 0.0.13 → 0.0.15

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,4 +1,4 @@
1
- import { defineComponent as $, computed as ce, createElementBlock as h, openBlock as v, normalizeClass as E, createElementVNode as x, renderSlot as N, ref as B, createBlock as G, resolveDynamicComponent as oe, withCtx as le, createTextVNode as ie, toDisplayString as H, onMounted as j, watch as P, Fragment as V, renderList as X, createCommentVNode as D, mergeProps as he, defineAsyncComponent as ee, provide as me, inject as Z, Transition as ye, unref as te, onUnmounted as _e } from "vue";
1
+ import { defineComponent as C, computed as oe, createElementBlock as m, openBlock as v, normalizeClass as z, createElementVNode as y, renderSlot as M, ref as w, createBlock as G, resolveDynamicComponent as ce, withCtx as le, createTextVNode as ie, toDisplayString as H, onMounted as j, watch as P, Fragment as V, renderList as X, createCommentVNode as D, mergeProps as he, defineAsyncComponent as ee, provide as me, inject as Z, Transition as ye, unref as te, onUnmounted as _e } from "vue";
2
2
  var J = /* @__PURE__ */ ((e) => (e[e.Primary = 0] = "Primary", e[e.PrimaryContent = 1] = "PrimaryContent", e[e.Secondary = 2] = "Secondary", e[e.SecondaryContent = 3] = "SecondaryContent", e[e.Accent = 4] = "Accent", e[e.AccentContent = 5] = "AccentContent", e[e.Neutral = 6] = "Neutral", e[e.NeutralContent = 7] = "NeutralContent", e[e.Base100 = 8] = "Base100", e[e.Base200 = 9] = "Base200", e[e.Base300 = 10] = "Base300", e[e.BaseContent = 11] = "BaseContent", e[e.Info = 12] = "Info", e[e.InfoContent = 13] = "InfoContent", e[e.Success = 14] = "Success", e[e.SuccessContent = 15] = "SuccessContent", e[e.Warning = 16] = "Warning", e[e.WarningContent = 17] = "WarningContent", e[e.Error = 18] = "Error", e[e.ErrorContent = 19] = "ErrorContent", e))(J || {});
3
3
  class xe {
4
4
  static toClassName(t) {
@@ -96,7 +96,7 @@ class Se {
96
96
  }
97
97
  }
98
98
  }
99
- class Ye {
99
+ class Qe {
100
100
  static toClassName(t) {
101
101
  switch (t) {
102
102
  case 0:
@@ -221,40 +221,40 @@ var I = { exports: {} };
221
221
  http://jedwatson.github.io/classnames
222
222
  */
223
223
  var ne;
224
- function Me() {
224
+ function Ce() {
225
225
  return ne || (ne = 1, function(e) {
226
226
  (function() {
227
227
  var t = {}.hasOwnProperty;
228
228
  function s() {
229
- for (var n = "", c = 0; c < arguments.length; c++) {
230
- var f = arguments[c];
231
- f && (n = a(n, u(f)));
229
+ for (var r = "", c = 0; c < arguments.length; c++) {
230
+ var i = arguments[c];
231
+ i && (r = a(r, u(i)));
232
232
  }
233
- return n;
233
+ return r;
234
234
  }
235
- function u(n) {
236
- if (typeof n == "string" || typeof n == "number")
237
- return n;
238
- if (typeof n != "object")
235
+ function u(r) {
236
+ if (typeof r == "string" || typeof r == "number")
237
+ return r;
238
+ if (typeof r != "object")
239
239
  return "";
240
- if (Array.isArray(n))
241
- return s.apply(null, n);
242
- if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
243
- return n.toString();
240
+ if (Array.isArray(r))
241
+ return s.apply(null, r);
242
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
243
+ return r.toString();
244
244
  var c = "";
245
- for (var f in n)
246
- t.call(n, f) && n[f] && (c = a(c, f));
245
+ for (var i in r)
246
+ t.call(r, i) && r[i] && (c = a(c, i));
247
247
  return c;
248
248
  }
249
- function a(n, c) {
250
- return c ? n ? n + " " + c : n + c : n;
249
+ function a(r, c) {
250
+ return c ? r ? r + " " + c : r + c : r;
251
251
  }
252
252
  e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
253
253
  })();
254
254
  }(I)), I.exports;
255
255
  }
256
- var $e = Me();
257
- const W = /* @__PURE__ */ de($e), Ce = ["type", "disabled"], Ne = { class: "group-[.is-loading]:text-transparent" }, Qe = /* @__PURE__ */ $({
256
+ var $e = Ce();
257
+ const R = /* @__PURE__ */ de($e), Me = ["type", "disabled"], Ne = { class: "group-[.is-loading]:text-transparent" }, et = /* @__PURE__ */ C({
258
258
  __name: "Button",
259
259
  props: {
260
260
  type: { default: "button" },
@@ -266,26 +266,28 @@ const W = /* @__PURE__ */ de($e), Ce = ["type", "disabled"], Ne = { class: "grou
266
266
  click: {}
267
267
  },
268
268
  setup(e) {
269
- const t = e, s = ce(() => W(
270
- "btn",
271
- "group",
272
- Se.toClassName(t.color),
273
- t.soft ? "btn-soft" : "",
274
- t.outline ? "btn-outline" : "",
275
- t.loading ? "is-loading" : "",
276
- t.disabled ? "disabled" : ""
277
- ));
278
- return (u, a) => (v(), h("button", {
279
- onClick: a[0] || (a[0] = (n) => u.click ? u.click : void 0),
280
- class: E(s.value),
269
+ const t = e, s = oe(
270
+ () => R(
271
+ "btn",
272
+ "group",
273
+ Se.toClassName(t.color),
274
+ t.soft ? "btn-soft" : "",
275
+ t.outline ? "btn-outline" : "",
276
+ t.loading ? "is-loading" : "",
277
+ t.disabled ? "disabled" : ""
278
+ )
279
+ );
280
+ return (u, a) => (v(), m("button", {
281
+ onClick: a[0] || (a[0] = (r) => u.click ? u.click : void 0),
282
+ class: z(s.value),
281
283
  type: u.type,
282
284
  disabled: u.disabled || u.loading
283
285
  }, [
284
- a[1] || (a[1] = x("span", { class: "loading loading-spinner loading-md absolute hidden group-[.is-loading]:block" }, null, -1)),
285
- x("span", Ne, [
286
- N(u.$slots, "default")
286
+ a[1] || (a[1] = y("span", { class: "loading loading-spinner loading-md absolute hidden group-[.is-loading]:block" }, null, -1)),
287
+ y("span", Ne, [
288
+ M(u.$slots, "default")
287
289
  ])
288
- ], 10, Ce));
290
+ ], 10, Me));
289
291
  }
290
292
  }), Q = (e, t) => {
291
293
  const s = e.__vccOpts || e;
@@ -294,9 +296,9 @@ const W = /* @__PURE__ */ de($e), Ce = ["type", "disabled"], Ne = { class: "grou
294
296
  return s;
295
297
  }, ze = {};
296
298
  function Te(e, t) {
297
- return v(), h("button");
299
+ return v(), m("button");
298
300
  }
299
- const et = /* @__PURE__ */ Q(ze, [["render", Te]]), tt = /* @__PURE__ */ $({
301
+ const tt = /* @__PURE__ */ Q(ze, [["render", Te]]), nt = /* @__PURE__ */ C({
300
302
  __name: "Card",
301
303
  props: {
302
304
  backgroundColor: { default: J.Primary },
@@ -306,55 +308,57 @@ const et = /* @__PURE__ */ Q(ze, [["render", Te]]), tt = /* @__PURE__ */ $({
306
308
  roundedSize: {}
307
309
  },
308
310
  setup(e) {
309
- const t = e, s = B(W(
310
- "card",
311
- xe.toClassName(t.backgroundColor),
312
- t.shadow ? "shadow-lg" : "",
313
- t.fullWidth ? "w-full" : "",
314
- t.rounded && !t.roundedSize ? "rounded" : t.roundedSize ? we.toClassName(t.roundedSize) : ""
315
- ));
316
- return (u, a) => (v(), h("div", {
317
- class: E(s.value)
311
+ const t = e, s = w(
312
+ R(
313
+ "card",
314
+ xe.toClassName(t.backgroundColor),
315
+ t.shadow ? "shadow-lg" : "",
316
+ t.fullWidth ? "w-full" : "",
317
+ t.rounded && !t.roundedSize ? "rounded" : t.roundedSize ? we.toClassName(t.roundedSize) : ""
318
+ )
319
+ );
320
+ return (u, a) => (v(), m("div", {
321
+ class: z(s.value)
318
322
  }, [
319
- N(u.$slots, "default")
323
+ M(u.$slots, "default")
320
324
  ], 2));
321
325
  }
322
326
  }), Le = {}, Ee = { class: "card-body" };
323
327
  function Fe(e, t) {
324
- return v(), h("div", Ee, [
325
- N(e.$slots, "default")
328
+ return v(), m("div", Ee, [
329
+ M(e.$slots, "default")
326
330
  ]);
327
331
  }
328
- const nt = /* @__PURE__ */ Q(Le, [["render", Fe]]), rt = /* @__PURE__ */ $({
332
+ const rt = /* @__PURE__ */ Q(Le, [["render", Fe]]), at = /* @__PURE__ */ C({
329
333
  __name: "CardTitle",
330
334
  props: {
331
335
  is: { default: "h1" },
332
336
  text: { default: "" }
333
337
  },
334
338
  setup(e) {
335
- return (t, s) => (v(), G(oe(t.is), { class: "card-title" }, {
339
+ return (t, s) => (v(), G(ce(t.is), { class: "card-title" }, {
336
340
  default: le(() => [
337
341
  ie(H(t.text), 1)
338
342
  ]),
339
343
  _: 1
340
344
  }));
341
345
  }
342
- }), at = /* @__PURE__ */ $({
346
+ }), st = /* @__PURE__ */ C({
343
347
  __name: "Container",
344
348
  props: {
345
349
  container: { type: Boolean, default: !0 },
346
350
  padding: { type: Boolean, default: !0 }
347
351
  },
348
352
  setup(e) {
349
- const t = e, s = B([
353
+ const t = e, s = w([
350
354
  t.container ? "container" : "",
351
355
  //To disable the max width in some cases
352
356
  t.padding ? "p-6" : ""
353
357
  ]);
354
- return (u, a) => (v(), h("div", {
355
- class: E(s.value)
358
+ return (u, a) => (v(), m("div", {
359
+ class: z(s.value)
356
360
  }, [
357
- N(u.$slots, "default")
361
+ M(u.$slots, "default")
358
362
  ], 2));
359
363
  }
360
364
  });
@@ -363,137 +367,137 @@ function fe() {
363
367
  return re || (re = 1, function(e) {
364
368
  e.__esModule = !0, e.default = a;
365
369
  var t = /[\u0300-\u036f]/g, s = /ł/g, u = /ñ/g;
366
- function a(n) {
367
- return n.toLowerCase().normalize("NFD").replace(t, "").replace(s, "l").replace(u, "n").trim();
370
+ function a(r) {
371
+ return r.toLowerCase().normalize("NFD").replace(t, "").replace(s, "l").replace(u, "n").trim();
368
372
  }
369
373
  }(K)), K;
370
374
  }
371
- var F = {}, ae;
375
+ var E = {}, ae;
372
376
  function se() {
373
- if (ae) return F;
374
- ae = 1, F.__esModule = !0, F.aggressiveFuzzyMatch = z, F.createFuzzySearchImpl = b, F.experimentalSmartFuzzyMatch = O, F.fuzzyMatchImpl = y;
377
+ if (ae) return E;
378
+ ae = 1, E.__esModule = !0, E.aggressiveFuzzyMatch = N, E.createFuzzySearchImpl = _, E.experimentalSmartFuzzyMatch = W, E.fuzzyMatchImpl = d;
375
379
  var e = t(fe());
376
- function t(r) {
377
- return r && r.__esModule ? r : { default: r };
380
+ function t(n) {
381
+ return n && n.__esModule ? n : { default: n };
378
382
  }
379
- var s = Number.MAX_SAFE_INTEGER, u = function(o, m) {
383
+ var s = Number.MAX_SAFE_INTEGER, u = function(o, l) {
380
384
  return (
381
385
  /*: number*/
382
- o.score - m.score
386
+ o.score - l.score
383
387
  );
384
- }, a = function(o, m) {
388
+ }, a = function(o, l) {
385
389
  return (
386
390
  /*: number*/
387
- o[0] - m[0]
391
+ o[0] - l[0]
388
392
  );
389
- }, n = new Set(`  []()-–—'"“”`.split(""));
390
- function c(r) {
391
- return n.has(r);
393
+ }, r = new Set(`  []()-–—'"“”`.split(""));
394
+ function c(n) {
395
+ return r.has(n);
392
396
  }
393
- function f(r, o, m, S, l, _, p) {
394
- if (r === S)
395
- return [0, [[0, r.length - 1]]];
396
- var d = S.length, g = o.length, k = l.length;
397
- if (o === l)
398
- return [0.1, [[0, g - 1]]];
399
- if (o.startsWith(l))
400
- return [0.5, [[0, k - 1]]];
401
- var M = r.indexOf(S);
402
- if (M > -1 && c(r[M - 1]))
403
- return [0.9, [[M, M + d - 1]]];
404
- var w = o.indexOf(l);
405
- if (w > -1 && c(o[w - 1]))
406
- return [1, [[w, w + d - 1]]];
407
- var C = _.length;
408
- if (C > 1 && _.every(function(L) {
409
- return m.has(L);
397
+ function i(n, o, l, x, f, g, b) {
398
+ if (n === x)
399
+ return [0, [[0, n.length - 1]]];
400
+ var p = x.length, h = o.length, S = f.length;
401
+ if (o === f)
402
+ return [0.1, [[0, h - 1]]];
403
+ if (o.startsWith(f))
404
+ return [0.5, [[0, S - 1]]];
405
+ var B = n.indexOf(x);
406
+ if (B > -1 && c(n[B - 1]))
407
+ return [0.9, [[B, B + p - 1]]];
408
+ var k = o.indexOf(f);
409
+ if (k > -1 && c(o[k - 1]))
410
+ return [1, [[k, k + p - 1]]];
411
+ var $ = g.length;
412
+ if ($ > 1 && g.every(function(L) {
413
+ return l.has(L);
410
414
  })) {
411
- var T = 1.5 + C * 0.2;
412
- return [T, _.map(function(L) {
413
- var R = o.indexOf(L);
414
- return [R, R + L.length - 1];
415
+ var T = 1.5 + $ * 0.2;
416
+ return [T, g.map(function(L) {
417
+ var F = o.indexOf(L);
418
+ return [F, F + L.length - 1];
415
419
  }).sort(a)];
416
420
  }
417
- return w > -1 ? [2, [[w, w + d - 1]]] : p === "aggressive" ? z(o, l) : p === "smart" ? O(o, l) : null;
421
+ return k > -1 ? [2, [[k, k + p - 1]]] : b === "aggressive" ? N(o, f) : b === "smart" ? W(o, f) : null;
418
422
  }
419
- function z(r, o) {
420
- for (var m = r.length, S = o.length, l = 0, _ = o[l], p = [], d = -1, g = -2, k = 0; k < m; k += 1)
421
- if (r[k] === _) {
422
- if (k !== g + 1 && (d >= 0 && p.push([d, g]), d = k), g = k, l += 1, l === S)
423
- return p.push([d, g]), i(p, r);
424
- _ = o[l];
423
+ function N(n, o) {
424
+ for (var l = n.length, x = o.length, f = 0, g = o[f], b = [], p = -1, h = -2, S = 0; S < l; S += 1)
425
+ if (n[S] === g) {
426
+ if (S !== h + 1 && (p >= 0 && b.push([p, h]), p = S), h = S, f += 1, f === x)
427
+ return b.push([p, h]), O(b, n);
428
+ g = o[f];
425
429
  }
426
430
  return null;
427
431
  }
428
- function O(r, o) {
429
- for (var m = r.length, S = [], l = 0, _ = o[l], p = -1, d = -2; ; ) {
430
- var g = r.indexOf(_, d + 1);
431
- if (g === -1)
432
+ function W(n, o) {
433
+ for (var l = n.length, x = [], f = 0, g = o[f], b = -1, p = -2; ; ) {
434
+ var h = n.indexOf(g, p + 1);
435
+ if (h === -1)
432
436
  break;
433
- if (g === 0 || c(r[g - 1]))
434
- p = g;
437
+ if (h === 0 || c(n[h - 1]))
438
+ b = h;
435
439
  else {
436
- var k = o.length - l, M = r.length - g, w = Math.min(3, k, M), C = o.slice(l, l + w);
437
- if (r.slice(g, g + w) === C)
438
- p = g;
440
+ var S = o.length - f, B = n.length - h, k = Math.min(3, S, B), $ = o.slice(f, f + k);
441
+ if (n.slice(h, h + k) === $)
442
+ b = h;
439
443
  else {
440
- d += 1;
444
+ p += 1;
441
445
  continue;
442
446
  }
443
447
  }
444
- for (d = p; d < m && r[d] === _; d += 1)
445
- l += 1, _ = o[l];
446
- if (d -= 1, S.push([p, d]), l === o.length)
447
- return i(S, r);
448
+ for (p = b; p < l && n[p] === g; p += 1)
449
+ f += 1, g = o[f];
450
+ if (p -= 1, x.push([b, p]), f === o.length)
451
+ return O(x, n);
448
452
  }
449
453
  return null;
450
454
  }
451
- function i(r, o) {
452
- var m = 2;
453
- return r.forEach(function(S) {
454
- var l = S[0], _ = S[1], p = _ - l + 1, d = l === 0 || o[l] === " " || o[l - 1] === " ", g = _ === o.length - 1 || o[_] === " " || o[_ + 1] === " ", k = d && g;
455
- k ? m += 0.2 : d ? m += 0.4 : p >= 3 ? m += 0.8 : m += 1.6;
456
- }), [m, r];
455
+ function O(n, o) {
456
+ var l = 2;
457
+ return n.forEach(function(x) {
458
+ var f = x[0], g = x[1], b = g - f + 1, p = f === 0 || o[f] === " " || o[f - 1] === " ", h = g === o.length - 1 || o[g] === " " || o[g + 1] === " ", S = p && h;
459
+ S ? l += 0.2 : p ? l += 0.4 : b >= 3 ? l += 0.8 : l += 1.6;
460
+ }), [l, n];
457
461
  }
458
- function y(r, o) {
459
- var m = (0, e.default)(o), S = m.split(" "), l = (0, e.default)(r), _ = new Set(l.split(" ")), p = f(r, l, _, o, m, S, "smart");
460
- return p ? {
461
- item: r,
462
- score: p[0],
463
- matches: [p[1]]
462
+ function d(n, o) {
463
+ var l = (0, e.default)(o), x = l.split(" "), f = (0, e.default)(n), g = new Set(f.split(" ")), b = i(n, f, g, o, l, x, "smart");
464
+ return b ? {
465
+ item: n,
466
+ score: b[0],
467
+ matches: [b[1]]
464
468
  } : null;
465
469
  }
466
- function b(r, o) {
467
- var m = o.strategy, S = m === void 0 ? "aggressive" : m, l = o.getText, _ = r.map(function(p) {
468
- var d;
469
- if (l)
470
- d = l(p);
470
+ function _(n, o) {
471
+ var l = o.strategy, x = l === void 0 ? "aggressive" : l, f = o.getText, g = n.map(function(b) {
472
+ var p;
473
+ if (f)
474
+ p = f(b);
471
475
  else {
472
- var g = o.key ? p[o.key] : p;
473
- d = [g];
476
+ var h = o.key ? b[o.key] : b;
477
+ p = [h];
474
478
  }
475
- var k = d.map(function(M) {
476
- var w = M || "", C = (0, e.default)(w), T = new Set(C.split(" "));
477
- return [w, C, T];
479
+ var S = p.map(function(B) {
480
+ var k = B || "", $ = (0, e.default)(k), T = new Set($.split(" "));
481
+ return [k, $, T];
478
482
  });
479
- return [p, k];
483
+ return [b, S];
480
484
  });
481
- return function(p) {
482
- var d = [], g = (0, e.default)(p), k = g.split(" ");
483
- return g.length ? (_.forEach(function(M) {
484
- for (var w = M[0], C = M[1], T = s, L = [], R = 0, pe = C.length; R < pe; R += 1) {
485
- var q = C[R], be = q[0], ve = q[1], ge = q[2], A = f(be, ve, ge, p, g, k, S);
485
+ return function(b) {
486
+ var p = [], h = (0, e.default)(b), S = h.split(" ");
487
+ return h.length ? (g.forEach(function(B) {
488
+ for (var k = B[0], $ = B[1], T = s, L = [], F = 0, pe = $.length; F < pe; F += 1) {
489
+ var q = $[F], be = q[0], ve = q[1], ge = q[2], A = i(be, ve, ge, b, h, S, x);
486
490
  A ? (T = Math.min(T, A[0]), L.push(A[1])) : L.push(null);
487
491
  }
488
- T < s && d.push({
489
- item: w,
492
+ T < s && p.push({
493
+ item: k,
490
494
  score: T,
491
495
  matches: L
492
496
  });
493
- }), d.sort(u), d) : [];
497
+ }), p.sort(u), p) : [];
494
498
  };
495
499
  }
496
- return F;
500
+ return E;
497
501
  }
498
502
  var ue;
499
503
  function Re() {
@@ -501,19 +505,19 @@ function Re() {
501
505
  e.__esModule = !0, e.default = u, e.fuzzyMatch = a;
502
506
  var t = s(fe());
503
507
  e.normalizeText = t.default;
504
- function s(n) {
505
- return n && n.__esModule ? n : { default: n };
508
+ function s(r) {
509
+ return r && r.__esModule ? r : { default: r };
506
510
  }
507
- function u(n, c) {
508
- return c === void 0 && (c = {}), se().createFuzzySearchImpl(n, c);
511
+ function u(r, c) {
512
+ return c === void 0 && (c = {}), se().createFuzzySearchImpl(r, c);
509
513
  }
510
- function a(n, c) {
511
- return se().fuzzyMatchImpl(n, c);
514
+ function a(r, c) {
515
+ return se().fuzzyMatchImpl(r, c);
512
516
  }
513
517
  }(U)), U;
514
518
  }
515
519
  var We = Re();
516
- const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["innerHTML"], st = /* @__PURE__ */ $({
520
+ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["onClick"], qe = ["innerHTML"], ut = /* @__PURE__ */ C({
517
521
  __name: "Table",
518
522
  props: {
519
523
  zebra: { type: Boolean, default: !1 },
@@ -524,118 +528,139 @@ const Oe = /* @__PURE__ */ de(We), Ve = { key: 0 }, De = ["colspan"], Pe = ["inn
524
528
  dataSource: {},
525
529
  ajax: {},
526
530
  searchValue: {},
527
- searchFunction: {}
531
+ searchFunction: {},
532
+ onRowClick: {}
528
533
  },
529
534
  setup(e) {
530
- const t = B([]), s = B([]), u = B(null), a = e, n = B(W("table", Be.toClassName(a.size), {
531
- "table-zebra": a.zebra,
532
- "table-pin-rows": a.pinRows,
533
- "table-pin-cols ": a.pinCols
534
- })), c = (i, y) => String(!i || typeof i != "object" ? i : y.split(".").reduce((b, r) => b && (typeof b == "object" ? b[r] : b), i)), f = (i, y) => y.render === void 0 ? {} : y.render(c(i, y.data), i).props, z = (i) => i && typeof i == "object" && "then" in i ? ee(() => i) : typeof i == "function" ? ee(i) : i;
535
+ const t = w([]), s = w([]), u = w(null), a = e, r = w(
536
+ R("table", Be.toClassName(a.size), {
537
+ "table-zebra": a.zebra,
538
+ "table-pin-rows": a.pinRows,
539
+ "table-pin-cols ": a.pinCols
540
+ })
541
+ ), c = (d, _) => {
542
+ a.onRowClick && a.onRowClick(d, _);
543
+ }, i = (d, _) => String(!d || typeof d != "object" ? d : _.split(".").reduce((n, o) => n && (typeof n == "object" ? n[o] : n), d)), N = (d, _) => _.render === void 0 ? {} : _.render(i(d, _.data), d).props, W = (d) => d && typeof d == "object" && "then" in d ? ee(() => d) : typeof d == "function" ? ee(d) : d;
535
544
  j(() => {
536
545
  t.value = a.dataSource, s.value = a.dataSource;
537
- }), P(() => a.dataSource, (i) => {
538
- t.value = i, s.value = i;
539
- }, { immediate: !0 }), P(() => a.searchValue, (i) => {
540
- if (a.searchFunction) {
541
- s.value = a.searchFunction(i ?? "");
542
- return;
543
- }
544
- s.value = i ? O(i) : t.value;
545
- }, { immediate: !0 });
546
- const O = (i) => {
547
- const y = [];
548
- return t.value.length > 0 ? (Object.keys(t.value[0]).forEach((r) => {
549
- const o = t.value.map((l) => c(l, r)), S = Oe(o)(i);
550
- for (const l of S) {
551
- const _ = t.value.filter((p) => c(p, r) === l.item);
552
- y.push(..._);
546
+ }), P(
547
+ () => a.dataSource,
548
+ (d) => {
549
+ t.value = d, s.value = d;
550
+ },
551
+ { immediate: !0 }
552
+ ), P(
553
+ () => a.searchValue,
554
+ (d) => {
555
+ if (a.searchFunction) {
556
+ s.value = a.searchFunction(d ?? "");
557
+ return;
558
+ }
559
+ s.value = d ? O(d) : t.value;
560
+ },
561
+ { immediate: !0 }
562
+ );
563
+ const O = (d) => {
564
+ const _ = [];
565
+ return t.value.length > 0 ? (Object.keys(t.value[0]).forEach((o) => {
566
+ const l = t.value.map((g) => i(g, o)), f = Oe(l)(d);
567
+ for (const g of f) {
568
+ const b = t.value.filter((p) => i(p, o) === g.item);
569
+ _.push(...b);
553
570
  }
554
- }), y) : [];
571
+ }), _) : [];
555
572
  };
556
- return (i, y) => (v(), h("table", {
573
+ return (d, _) => (v(), m("table", {
557
574
  ref_key: "table",
558
575
  ref: u,
559
- class: E(n.value)
576
+ class: z(r.value)
560
577
  }, [
561
- x("thead", null, [
562
- x("tr", null, [
563
- (v(!0), h(V, null, X(a.columns, (b) => (v(), h("th", {
564
- key: b.title
565
- }, H(b.title), 1))), 128))
578
+ y("thead", null, [
579
+ y("tr", null, [
580
+ (v(!0), m(V, null, X(a.columns, (n) => (v(), m("th", {
581
+ key: n.title
582
+ }, H(n.title), 1))), 128))
566
583
  ])
567
584
  ]),
568
- x("tbody", null, [
569
- s.value.length === 0 ? (v(), h("tr", Ve, [
570
- x("td", {
585
+ y("tbody", null, [
586
+ s.value.length === 0 ? (v(), m("tr", Ve, [
587
+ y("td", {
571
588
  colspan: a.columns.length
572
- }, " No data found ", 8, De)
573
- ])) : (v(!0), h(V, { key: 1 }, X(s.value, (b) => (v(), h("tr", {
574
- key: String(b)
589
+ }, "No data found", 8, De)
590
+ ])) : (v(!0), m(V, { key: 1 }, X(s.value, (n, o) => (v(), m("tr", {
591
+ class: z(a.onRowClick ? "hover" : ""),
592
+ key: String(n),
593
+ onClick: (l) => c(n, o)
575
594
  }, [
576
- (v(!0), h(V, null, X(a.columns, (r) => (v(), h("td", {
577
- key: r.title
595
+ (v(!0), m(V, null, X(a.columns, (l) => (v(), m("td", {
596
+ key: l.title
578
597
  }, [
579
- r.render ? D("", !0) : (v(), h(V, { key: 0 }, [
580
- ie(H(c(b, r.data)), 1)
598
+ l.render ? D("", !0) : (v(), m(V, { key: 0 }, [
599
+ ie(H(i(n, l.data)), 1)
581
600
  ], 64)),
582
- typeof r.render == "function" ? (v(), h(V, { key: 1 }, [
583
- typeof r.render(c(b, r.data), b) == "string" ? (v(), h("div", {
601
+ typeof l.render == "function" ? (v(), m(V, { key: 1 }, [
602
+ typeof l.render(i(n, l.data), n) == "string" ? (v(), m("div", {
584
603
  key: 0,
585
- innerHTML: r.render(c(b, r.data), b)
586
- }, null, 8, Pe)) : (v(), G(oe(z(r.render(c(b, r.data), b).component)), he({
604
+ innerHTML: l.render(i(n, l.data), n)
605
+ }, null, 8, qe)) : (v(), G(ce(W(l.render(i(n, l.data), n).component)), he({
587
606
  key: 1,
588
607
  ref_for: !0
589
- }, f(b, r)), null, 16))
608
+ }, N(n, l)), null, 16))
590
609
  ], 64)) : D("", !0)
591
610
  ]))), 128))
592
- ]))), 128))
611
+ ], 10, Pe))), 128))
593
612
  ])
594
613
  ], 2));
595
614
  }
596
- }), ut = /* @__PURE__ */ $({
615
+ }), ot = /* @__PURE__ */ C({
597
616
  __name: "Stepper",
598
617
  props: {
599
618
  value: {}
600
619
  },
601
620
  emits: ["update:value"],
602
621
  setup(e, { expose: t, emit: s }) {
603
- const u = e, a = B(u.value), n = s, c = (f) => {
604
- a.value = f, n("update:value", f);
622
+ const u = e, a = w(u.value), r = s, c = (i) => {
623
+ a.value = i, r("update:value", i);
605
624
  };
606
625
  return me("stepper", {
607
626
  value: a,
608
627
  updateValue: c
609
- }), P(() => u.value, (f) => {
610
- a.value = f;
611
- }), t({
628
+ }), P(
629
+ () => u.value,
630
+ (i) => {
631
+ a.value = i;
632
+ }
633
+ ), t({
612
634
  updateValue: c
613
- }), (f, z) => N(f.$slots, "default", { updateValue: c });
635
+ }), (i, N) => M(i.$slots, "default", { updateValue: c });
614
636
  }
615
- }), ct = /* @__PURE__ */ $({
637
+ }), ct = /* @__PURE__ */ C({
616
638
  __name: "Step",
617
639
  props: {
618
640
  value: {}
619
641
  },
620
642
  setup(e) {
621
- const t = e, s = Z("stepper"), u = B("");
622
- return P(() => s == null ? void 0 : s.value.value, (a) => {
623
- a && t.value && (u.value = Number(a) >= Number(t.value) ? "step-primary" : "");
624
- }), j(() => {
643
+ const t = e, s = Z("stepper"), u = w("");
644
+ return P(
645
+ () => s?.value.value,
646
+ (a) => {
647
+ a && t.value && (u.value = Number(a) >= Number(t.value) ? "step-primary" : "");
648
+ }
649
+ ), j(() => {
625
650
  s && (u.value = s.value.value === t.value ? "step-primary" : "", Number(s.value.value) >= Number(t.value) && (u.value = "step-primary"));
626
- }), (a, n) => (v(), h("li", {
627
- class: E(["step", u.value])
651
+ }), (a, r) => (v(), m("li", {
652
+ class: z(["step", u.value])
628
653
  }, [
629
- N(a.$slots, "default")
654
+ M(a.$slots, "default")
630
655
  ], 2));
631
656
  }
632
- }), qe = {}, Ae = { class: "steps" };
633
- function Xe(e, t) {
634
- return v(), h("ul", Ae, [
635
- N(e.$slots, "default")
657
+ }), Ae = {}, Xe = { class: "steps" };
658
+ function Ie(e, t) {
659
+ return v(), m("ul", Xe, [
660
+ M(e.$slots, "default")
636
661
  ]);
637
662
  }
638
- const ot = /* @__PURE__ */ Q(qe, [["render", Xe]]), Ie = { key: 0 }, lt = /* @__PURE__ */ $({
663
+ const lt = /* @__PURE__ */ Q(Ae, [["render", Ie]]), Ue = { key: 0 }, it = /* @__PURE__ */ C({
639
664
  __name: "StepPanels",
640
665
  setup(e) {
641
666
  const t = Z("stepper");
@@ -643,38 +668,35 @@ const ot = /* @__PURE__ */ Q(qe, [["render", Xe]]), Ie = { key: 0 }, lt = /* @__
643
668
  name: "fade",
644
669
  mode: "out-in"
645
670
  }, {
646
- default: le(() => {
647
- var a, n;
648
- return [
649
- (a = te(t)) != null && a.value ? (v(), h("div", Ie, [
650
- N(s.$slots, "default", {
651
- currentStep: (n = te(t)) == null ? void 0 : n.value
652
- })
653
- ])) : D("", !0)
654
- ];
655
- }),
671
+ default: le(() => [
672
+ te(t)?.value ? (v(), m("div", Ue, [
673
+ M(s.$slots, "default", {
674
+ currentStep: te(t)?.value
675
+ })
676
+ ])) : D("", !0)
677
+ ]),
656
678
  _: 3
657
679
  }));
658
680
  }
659
- }), Ue = { key: 0 }, it = /* @__PURE__ */ $({
681
+ }), Ke = { key: 0 }, dt = /* @__PURE__ */ C({
660
682
  __name: "StepPanel",
661
683
  props: {
662
684
  value: {}
663
685
  },
664
686
  setup(e, { expose: t }) {
665
- const s = ce(() => u == null ? void 0 : u.value.value), u = Z("stepper"), a = (n) => {
666
- u && u.updateValue(n.toString());
687
+ const s = oe(() => u?.value.value), u = Z("stepper"), a = (r) => {
688
+ u && u.updateValue(r.toString());
667
689
  };
668
690
  return t({
669
691
  activateCallback: a
670
- }), (n, c) => n.value === s.value ? (v(), h("div", Ue, [
671
- N(n.$slots, "default", { activateCallback: a })
692
+ }), (r, c) => r.value === s.value ? (v(), m("div", Ke, [
693
+ M(r.$slots, "default", { activateCallback: a })
672
694
  ])) : D("", !0);
673
695
  }
674
- }), Ke = {
696
+ }), He = {
675
697
  key: 0,
676
698
  method: "dialog"
677
- }, dt = /* @__PURE__ */ $({
699
+ }, ft = /* @__PURE__ */ C({
678
700
  __name: "Modal",
679
701
  props: {
680
702
  closeButton: { type: Boolean, default: !0 },
@@ -684,94 +706,104 @@ const ot = /* @__PURE__ */ Q(qe, [["render", Xe]]), Ie = { key: 0 }, lt = /* @__
684
706
  },
685
707
  emits: ["close"],
686
708
  setup(e, { expose: t, emit: s }) {
687
- const u = B(null), a = s, n = e, c = B(W("modal-box", n.extraBoxClasses)), f = B(W("modal", {
688
- "overflow-visible": n.overflow
689
- })), z = B(W("btn", ke.toClassName(n.closeButtonSize), "btn-circle", "btn-ghost", "absolute", "right-2", "top-2"));
709
+ const u = w(null), a = s, r = e, c = w(R("modal-box", r.extraBoxClasses)), i = w(
710
+ R("modal", {
711
+ "overflow-visible": r.overflow
712
+ })
713
+ ), N = w(
714
+ R(
715
+ "btn",
716
+ ke.toClassName(r.closeButtonSize),
717
+ "btn-circle",
718
+ "btn-ghost",
719
+ "absolute",
720
+ "right-2",
721
+ "top-2"
722
+ )
723
+ );
690
724
  return t({
691
725
  showModal: () => {
692
- var y;
693
- (y = u.value) == null || y.showModal();
726
+ u.value?.showModal();
694
727
  },
695
728
  closeModal: () => {
696
- var y;
697
- (y = u.value) == null || y.close();
729
+ u.value?.close();
698
730
  }
699
- }), (y, b) => (v(), h("dialog", {
731
+ }), (d, _) => (v(), m("dialog", {
700
732
  ref_key: "modal",
701
733
  ref: u,
702
- class: E([f.value, y.$attrs.class]),
734
+ class: z([i.value, d.$attrs.class]),
703
735
  "aria-modal": "true",
704
736
  "aria-hidden": "true",
705
737
  role: "dialog",
706
- onClose: b[0] || (b[0] = (r) => a("close", r))
738
+ onClose: _[0] || (_[0] = (n) => a("close", n))
707
739
  }, [
708
- x("div", {
709
- class: E(c.value)
740
+ y("div", {
741
+ class: z(c.value)
710
742
  }, [
711
- y.closeButton ? (v(), h("form", Ke, [
712
- x("button", {
713
- class: E(z.value)
743
+ d.closeButton ? (v(), m("form", He, [
744
+ y("button", {
745
+ class: z(N.value)
714
746
  }, "✕", 2)
715
747
  ])) : D("", !0),
716
- N(y.$slots, "default")
748
+ M(d.$slots, "default")
717
749
  ], 2),
718
- b[1] || (b[1] = x("form", {
750
+ _[1] || (_[1] = y("form", {
719
751
  method: "dialog",
720
752
  class: "modal-backdrop"
721
753
  }, [
722
- x("button", null, "close")
754
+ y("button", null, "close")
723
755
  ], -1))
724
756
  ], 34));
725
757
  }
726
- }), He = { class: "hidden w-full max-w-sm lg:flex" }, Ge = { class: "relative mx-3 w-full" }, je = { class: "w-full max-w-full relative" }, Ze = ["value"], ft = /* @__PURE__ */ $({
758
+ }), Ge = { class: "hidden w-full max-w-sm lg:flex" }, je = { class: "relative mx-3 w-full" }, Ze = { class: "relative w-full max-w-full" }, Je = ["value"], pt = /* @__PURE__ */ C({
727
759
  __name: "SearchBar",
728
760
  props: ["modelValue"],
729
761
  emits: ["update:modelValue"],
730
762
  setup(e, { emit: t }) {
731
- const s = e, u = B(null), a = t, n = (c) => {
763
+ const s = e, u = w(null), a = t, r = (c) => {
732
764
  (c.ctrlKey || c.metaKey) && c.key.toLowerCase() === "k" && (c.preventDefault(), u.value && u.value.focus());
733
765
  };
734
766
  return j(() => {
735
- document.addEventListener("keydown", n);
767
+ document.addEventListener("keydown", r);
736
768
  }), _e(() => {
737
- document.removeEventListener("keydown", n);
738
- }), (c, f) => (v(), h("div", He, [
739
- x("label", Ge, [
740
- f[1] || (f[1] = x("svg", {
741
- class: "pointer-events-none absolute z-10 my-3.5 ms-4 opacity-60 text-base-content",
769
+ document.removeEventListener("keydown", r);
770
+ }), (c, i) => (v(), m("div", Ge, [
771
+ y("label", je, [
772
+ i[1] || (i[1] = y("svg", {
773
+ class: "pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60",
742
774
  "aria-hidden": "true",
743
775
  width: "16",
744
776
  height: "16",
745
777
  viewBox: "0.48 0.48 23.04 23.04",
746
778
  fill: "currentColor"
747
779
  }, [
748
- x("path", {
780
+ y("path", {
749
781
  fill: "none",
750
782
  d: "M0 0h24v24H0z"
751
783
  }),
752
- x("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })
784
+ y("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })
753
785
  ], -1)),
754
- x("div", je, [
755
- x("form", null, [
756
- x("input", {
786
+ y("div", Ze, [
787
+ y("form", null, [
788
+ y("input", {
757
789
  ref_key: "searchInput",
758
790
  ref: u,
759
791
  type: "search",
760
792
  placeholder: "Zoeken...",
761
793
  value: s.modelValue,
762
- onInput: f[0] || (f[0] = (z) => a("update:modelValue", z.target.value)),
763
- class: "bg-transparent color-[inherit] border-[2px] border-solid border-transparent focus:border-[2px] focus:border-base-200 focus:outline-none rounded-xl w-full px-3 py-2 ps-10"
764
- }, null, 40, Ze)
794
+ onInput: i[0] || (i[0] = (N) => a("update:modelValue", N.target.value)),
795
+ class: "color-[inherit] w-full rounded-xl border-[2px] border-solid border-transparent bg-transparent px-3 py-2 ps-10 focus:border-[2px] focus:border-base-200 focus:outline-none"
796
+ }, null, 40, Je)
765
797
  ])
766
798
  ]),
767
- f[2] || (f[2] = x("div", { class: "pointer-events-none absolute end-10 top-2.5 gap-1 opacity-50 rtl:flex-row-reverse hidden lg:flex" }, [
768
- x("kbd", { class: "kbd kbd-sm" }, "ctrl"),
769
- x("kbd", { class: "kbd kbd-sm" }, "K")
799
+ i[2] || (i[2] = y("div", { class: "pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse" }, [
800
+ y("kbd", { class: "kbd kbd-sm" }, "ctrl"),
801
+ y("kbd", { class: "kbd kbd-sm" }, "K")
770
802
  ], -1))
771
803
  ])
772
804
  ]));
773
805
  }
774
- }), pt = [
806
+ }), bt = [
775
807
  "bg-primary",
776
808
  "bg-primary-content",
777
809
  "bg-secondary",
@@ -858,26 +890,26 @@ const ot = /* @__PURE__ */ Q(qe, [["render", Xe]]), Ie = { key: 0 }, lt = /* @__
858
890
  ];
859
891
  export {
860
892
  xe as BackgroundColorUtils,
861
- Qe as Button,
893
+ et as Button,
862
894
  Se as ButtonColorUtils,
863
895
  ke as ButtonSizeUtils,
864
- tt as Card,
865
- nt as CardBody,
866
- rt as CardTitle,
896
+ nt as Card,
897
+ rt as CardBody,
898
+ at as CardTitle,
867
899
  J as Color,
868
- at as Container,
869
- dt as Modal,
900
+ st as Container,
901
+ ft as Modal,
870
902
  we as RoundedSizeUtils,
871
- ft as SearchBar,
872
- et as SimpleButton,
903
+ pt as SearchBar,
904
+ tt as SimpleButton,
873
905
  Y as Size,
874
906
  ct as Step,
875
- ot as StepList,
876
- it as StepPanel,
877
- lt as StepPanels,
878
- ut as Stepper,
879
- st as Table,
907
+ lt as StepList,
908
+ dt as StepPanel,
909
+ it as StepPanels,
910
+ ot as Stepper,
911
+ ut as Table,
880
912
  Be as TableSizeUtils,
881
- Ye as TextColorUtils,
882
- pt as dendelionSafeList
913
+ Qe as TextColorUtils,
914
+ bt as dendelionSafeList
883
915
  };