dendelion-ui 0.0.24 → 0.0.26
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.
- package/dist/dendelion-ui.cjs.js +1 -5
- package/dist/dendelion-ui.es.js +298 -298
- package/dist/dendelion-ui.umd.js +1 -5
- package/dist/types/components/stepper/StepPanels.vue.d.ts +2 -2
- package/dist/types/components/table/Table.vue.d.ts +8 -4
- package/dist/types/components/table/TableColumn.vue.d.ts +8 -4
- package/dist/types/components/table/interface.d.ts +9 -4
- package/package.json +80 -77
- package/src/components/table/Table.vue +38 -18
- package/src/components/table/interface.ts +24 -12
package/dist/dendelion-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, computed as q, openBlock as l, createElementBlock as i, normalizeClass as M, createElementVNode as h, renderSlot as z, ref as B, createBlock as A, resolveDynamicComponent as ee, withCtx as fe, createTextVNode as te, toDisplayString as I, onMounted as H, Fragment as R, unref as K, isVNode as ye, normalizeProps as xe, guardReactiveProps as _e, createCommentVNode as E, defineAsyncComponent as se, watch as X, renderList as P, provide as we, inject as ne, Transition as Se, onUnmounted as ke, normalizeStyle as Be, withDirectives as Ce, vModelRadio as $e } from "vue";
|
|
2
2
|
var re = /* @__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))(re || {});
|
|
3
3
|
class Me {
|
|
4
4
|
static toClassName(t) {
|
|
@@ -233,24 +233,19 @@ function pe(e) {
|
|
|
233
233
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
234
234
|
}
|
|
235
235
|
var Z = { exports: {} };
|
|
236
|
-
/*!
|
|
237
|
-
Copyright (c) 2018 Jed Watson.
|
|
238
|
-
Licensed under the MIT License (MIT), see
|
|
239
|
-
http://jedwatson.github.io/classnames
|
|
240
|
-
*/
|
|
241
236
|
var oe;
|
|
242
237
|
function Ee() {
|
|
243
|
-
return oe || (oe = 1, function(e) {
|
|
238
|
+
return oe || (oe = 1, (function(e) {
|
|
244
239
|
(function() {
|
|
245
240
|
var t = {}.hasOwnProperty;
|
|
246
241
|
function r() {
|
|
247
|
-
for (var n = "",
|
|
248
|
-
var
|
|
249
|
-
|
|
242
|
+
for (var n = "", c = 0; c < arguments.length; c++) {
|
|
243
|
+
var p = arguments[c];
|
|
244
|
+
p && (n = a(n, o(p)));
|
|
250
245
|
}
|
|
251
246
|
return n;
|
|
252
247
|
}
|
|
253
|
-
function
|
|
248
|
+
function o(n) {
|
|
254
249
|
if (typeof n == "string" || typeof n == "number")
|
|
255
250
|
return n;
|
|
256
251
|
if (typeof n != "object")
|
|
@@ -259,20 +254,20 @@ function Ee() {
|
|
|
259
254
|
return r.apply(null, n);
|
|
260
255
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
261
256
|
return n.toString();
|
|
262
|
-
var
|
|
263
|
-
for (var
|
|
264
|
-
t.call(n,
|
|
265
|
-
return
|
|
257
|
+
var c = "";
|
|
258
|
+
for (var p in n)
|
|
259
|
+
t.call(n, p) && n[p] && (c = a(c, p));
|
|
260
|
+
return c;
|
|
266
261
|
}
|
|
267
|
-
function a(n,
|
|
268
|
-
return
|
|
262
|
+
function a(n, c) {
|
|
263
|
+
return c ? n ? n + " " + c : n + c : n;
|
|
269
264
|
}
|
|
270
265
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
271
266
|
})();
|
|
272
|
-
}(Z)), Z.exports;
|
|
267
|
+
})(Z)), Z.exports;
|
|
273
268
|
}
|
|
274
269
|
var Fe = Ee();
|
|
275
|
-
const
|
|
270
|
+
const V = /* @__PURE__ */ pe(Fe), We = ["type", "disabled"], De = { class: "group-[.is-loading]:text-transparent" }, gt = /* @__PURE__ */ C({
|
|
276
271
|
__name: "Button",
|
|
277
272
|
props: {
|
|
278
273
|
type: { default: "button" },
|
|
@@ -284,8 +279,8 @@ const D = /* @__PURE__ */ pe(Fe), We = ["type", "disabled"], Ve = { class: "grou
|
|
|
284
279
|
click: {}
|
|
285
280
|
},
|
|
286
281
|
setup(e) {
|
|
287
|
-
const t = e, r =
|
|
288
|
-
() =>
|
|
282
|
+
const t = e, r = q(
|
|
283
|
+
() => V(
|
|
289
284
|
"btn",
|
|
290
285
|
"group",
|
|
291
286
|
ze.toClassName(t.color),
|
|
@@ -295,28 +290,28 @@ const D = /* @__PURE__ */ pe(Fe), We = ["type", "disabled"], Ve = { class: "grou
|
|
|
295
290
|
t.disabled ? "disabled" : ""
|
|
296
291
|
)
|
|
297
292
|
);
|
|
298
|
-
return (
|
|
293
|
+
return (o, a) => (l(), i("button", {
|
|
299
294
|
onClick: a[0] || (a[0] = (n) => e.click ? e.click : void 0),
|
|
300
|
-
class:
|
|
295
|
+
class: M(r.value),
|
|
301
296
|
type: e.type,
|
|
302
297
|
disabled: e.disabled || e.loading
|
|
303
298
|
}, [
|
|
304
|
-
a[1] || (a[1] =
|
|
305
|
-
|
|
306
|
-
|
|
299
|
+
a[1] || (a[1] = h("span", { class: "loading loading-spinner loading-md absolute hidden group-[.is-loading]:block" }, null, -1)),
|
|
300
|
+
h("span", De, [
|
|
301
|
+
z(o.$slots, "default")
|
|
307
302
|
])
|
|
308
303
|
], 10, We));
|
|
309
304
|
}
|
|
310
305
|
}), ae = (e, t) => {
|
|
311
306
|
const r = e.__vccOpts || e;
|
|
312
|
-
for (const [
|
|
313
|
-
r[
|
|
307
|
+
for (const [o, a] of t)
|
|
308
|
+
r[o] = a;
|
|
314
309
|
return r;
|
|
315
|
-
},
|
|
310
|
+
}, Ve = {};
|
|
316
311
|
function Oe(e, t) {
|
|
317
|
-
return
|
|
312
|
+
return l(), i("button");
|
|
318
313
|
}
|
|
319
|
-
const yt = /* @__PURE__ */ ae(
|
|
314
|
+
const yt = /* @__PURE__ */ ae(Ve, [["render", Oe]]), xt = /* @__PURE__ */ C({
|
|
320
315
|
__name: "Card",
|
|
321
316
|
props: {
|
|
322
317
|
backgroundColor: { default: re.Primary },
|
|
@@ -326,8 +321,8 @@ const yt = /* @__PURE__ */ ae(De, [["render", Oe]]), xt = /* @__PURE__ */ M({
|
|
|
326
321
|
roundedSize: {}
|
|
327
322
|
},
|
|
328
323
|
setup(e) {
|
|
329
|
-
const t = e, r =
|
|
330
|
-
|
|
324
|
+
const t = e, r = B(
|
|
325
|
+
V(
|
|
331
326
|
"card",
|
|
332
327
|
Me.toClassName(t.backgroundColor),
|
|
333
328
|
t.shadow ? "shadow-lg" : "",
|
|
@@ -335,207 +330,207 @@ const yt = /* @__PURE__ */ ae(De, [["render", Oe]]), xt = /* @__PURE__ */ M({
|
|
|
335
330
|
t.rounded && !t.roundedSize ? "rounded" : t.roundedSize ? Te.toClassName(t.roundedSize) : ""
|
|
336
331
|
)
|
|
337
332
|
);
|
|
338
|
-
return (
|
|
339
|
-
class:
|
|
333
|
+
return (o, a) => (l(), i("div", {
|
|
334
|
+
class: M(r.value)
|
|
340
335
|
}, [
|
|
341
|
-
|
|
336
|
+
z(o.$slots, "default")
|
|
342
337
|
], 2));
|
|
343
338
|
}
|
|
344
339
|
}), Pe = {}, Ae = { class: "card-body" };
|
|
345
340
|
function qe(e, t) {
|
|
346
|
-
return
|
|
347
|
-
|
|
341
|
+
return l(), i("div", Ae, [
|
|
342
|
+
z(e.$slots, "default")
|
|
348
343
|
]);
|
|
349
344
|
}
|
|
350
|
-
const _t = /* @__PURE__ */ ae(Pe, [["render", qe]]), wt = /* @__PURE__ */
|
|
345
|
+
const _t = /* @__PURE__ */ ae(Pe, [["render", qe]]), wt = /* @__PURE__ */ C({
|
|
351
346
|
__name: "CardTitle",
|
|
352
347
|
props: {
|
|
353
348
|
is: { default: "h1" },
|
|
354
349
|
text: { default: "" }
|
|
355
350
|
},
|
|
356
351
|
setup(e) {
|
|
357
|
-
return (t, r) => (
|
|
352
|
+
return (t, r) => (l(), A(ee(e.is), { class: "card-title" }, {
|
|
358
353
|
default: fe(() => [
|
|
359
|
-
te(
|
|
354
|
+
te(I(e.text), 1)
|
|
360
355
|
]),
|
|
361
356
|
_: 1
|
|
362
357
|
}));
|
|
363
358
|
}
|
|
364
|
-
}), St = /* @__PURE__ */
|
|
359
|
+
}), St = /* @__PURE__ */ C({
|
|
365
360
|
__name: "Container",
|
|
366
361
|
props: {
|
|
367
362
|
container: { type: Boolean, default: !0 },
|
|
368
363
|
padding: { type: Boolean, default: !0 }
|
|
369
364
|
},
|
|
370
365
|
setup(e) {
|
|
371
|
-
const t = e, r =
|
|
366
|
+
const t = e, r = B([
|
|
372
367
|
t.container ? "container" : "",
|
|
373
368
|
//To disable the max width in some cases
|
|
374
369
|
t.padding ? "p-6" : ""
|
|
375
370
|
]);
|
|
376
|
-
return (
|
|
377
|
-
class:
|
|
371
|
+
return (o, a) => (l(), i("div", {
|
|
372
|
+
class: M(r.value)
|
|
378
373
|
}, [
|
|
379
|
-
|
|
374
|
+
z(o.$slots, "default")
|
|
380
375
|
], 2));
|
|
381
376
|
}
|
|
382
|
-
})
|
|
377
|
+
});
|
|
383
378
|
var Y = {}, Q = {}, ue;
|
|
384
379
|
function be() {
|
|
385
|
-
return ue || (ue = 1, function(e) {
|
|
380
|
+
return ue || (ue = 1, (function(e) {
|
|
386
381
|
e.__esModule = !0, e.default = a;
|
|
387
|
-
var t = /[\u0300-\u036f]/g, r = /ł/g,
|
|
382
|
+
var t = /[\u0300-\u036f]/g, r = /ł/g, o = /ñ/g;
|
|
388
383
|
function a(n) {
|
|
389
|
-
return n.toLowerCase().normalize("NFD").replace(t, "").replace(r, "l").replace(
|
|
384
|
+
return n.toLowerCase().normalize("NFD").replace(t, "").replace(r, "l").replace(o, "n").trim();
|
|
390
385
|
}
|
|
391
|
-
}(Q)), Q;
|
|
386
|
+
})(Q)), Q;
|
|
392
387
|
}
|
|
393
|
-
var
|
|
388
|
+
var D = {}, ce;
|
|
394
389
|
function le() {
|
|
395
|
-
if (ce) return
|
|
396
|
-
ce = 1,
|
|
390
|
+
if (ce) return D;
|
|
391
|
+
ce = 1, D.__esModule = !0, D.aggressiveFuzzyMatch = _, D.createFuzzySearchImpl = x, D.experimentalSmartFuzzyMatch = T, D.fuzzyMatchImpl = m;
|
|
397
392
|
var e = t(be());
|
|
398
|
-
function t(
|
|
399
|
-
return
|
|
393
|
+
function t(s) {
|
|
394
|
+
return s && s.__esModule ? s : { default: s };
|
|
400
395
|
}
|
|
401
|
-
var r = Number.MAX_SAFE_INTEGER,
|
|
396
|
+
var r = Number.MAX_SAFE_INTEGER, o = function(u, d) {
|
|
402
397
|
return (
|
|
403
398
|
/*: number*/
|
|
404
|
-
|
|
399
|
+
u.score - d.score
|
|
405
400
|
);
|
|
406
|
-
}, a = function(
|
|
401
|
+
}, a = function(u, d) {
|
|
407
402
|
return (
|
|
408
403
|
/*: number*/
|
|
409
|
-
|
|
404
|
+
u[0] - d[0]
|
|
410
405
|
);
|
|
411
406
|
}, n = new Set(` []()-–—'"“”`.split(""));
|
|
412
|
-
function
|
|
413
|
-
return n.has(
|
|
407
|
+
function c(s) {
|
|
408
|
+
return n.has(s);
|
|
414
409
|
}
|
|
415
|
-
function
|
|
416
|
-
if (
|
|
417
|
-
return [0, [[0,
|
|
418
|
-
var
|
|
419
|
-
if (
|
|
420
|
-
return [0.1, [[0,
|
|
421
|
-
if (
|
|
410
|
+
function p(s, u, d, w, f, g, v) {
|
|
411
|
+
if (s === w)
|
|
412
|
+
return [0, [[0, s.length - 1]]];
|
|
413
|
+
var b = w.length, y = u.length, S = f.length;
|
|
414
|
+
if (u === f)
|
|
415
|
+
return [0.1, [[0, y - 1]]];
|
|
416
|
+
if (u.startsWith(f))
|
|
422
417
|
return [0.5, [[0, S - 1]]];
|
|
423
|
-
var
|
|
424
|
-
if (
|
|
425
|
-
return [0.9, [[
|
|
426
|
-
var
|
|
427
|
-
if (
|
|
428
|
-
return [1, [[
|
|
429
|
-
var
|
|
430
|
-
if (
|
|
431
|
-
return
|
|
418
|
+
var $ = s.indexOf(w);
|
|
419
|
+
if ($ > -1 && c(s[$ - 1]))
|
|
420
|
+
return [0.9, [[$, $ + b - 1]]];
|
|
421
|
+
var k = u.indexOf(f);
|
|
422
|
+
if (k > -1 && c(u[k - 1]))
|
|
423
|
+
return [1, [[k, k + b - 1]]];
|
|
424
|
+
var N = g.length;
|
|
425
|
+
if (N > 1 && g.every(function(W) {
|
|
426
|
+
return d.has(W);
|
|
432
427
|
})) {
|
|
433
|
-
var F = 1.5 +
|
|
428
|
+
var F = 1.5 + N * 0.2;
|
|
434
429
|
return [F, g.map(function(W) {
|
|
435
|
-
var O =
|
|
430
|
+
var O = u.indexOf(W);
|
|
436
431
|
return [O, O + W.length - 1];
|
|
437
432
|
}).sort(a)];
|
|
438
433
|
}
|
|
439
|
-
return
|
|
434
|
+
return k > -1 ? [2, [[k, k + b - 1]]] : v === "aggressive" ? _(u, f) : v === "smart" ? T(u, f) : null;
|
|
440
435
|
}
|
|
441
|
-
function
|
|
442
|
-
for (var
|
|
443
|
-
if (
|
|
444
|
-
if (S !==
|
|
445
|
-
return
|
|
446
|
-
g =
|
|
436
|
+
function _(s, u) {
|
|
437
|
+
for (var d = s.length, w = u.length, f = 0, g = u[f], v = [], b = -1, y = -2, S = 0; S < d; S += 1)
|
|
438
|
+
if (s[S] === g) {
|
|
439
|
+
if (S !== y + 1 && (b >= 0 && v.push([b, y]), b = S), y = S, f += 1, f === w)
|
|
440
|
+
return v.push([b, y]), L(v, s);
|
|
441
|
+
g = u[f];
|
|
447
442
|
}
|
|
448
443
|
return null;
|
|
449
444
|
}
|
|
450
|
-
function
|
|
451
|
-
for (var
|
|
452
|
-
var
|
|
453
|
-
if (
|
|
445
|
+
function T(s, u) {
|
|
446
|
+
for (var d = s.length, w = [], f = 0, g = u[f], v = -1, b = -2; ; ) {
|
|
447
|
+
var y = s.indexOf(g, b + 1);
|
|
448
|
+
if (y === -1)
|
|
454
449
|
break;
|
|
455
|
-
if (
|
|
456
|
-
|
|
450
|
+
if (y === 0 || c(s[y - 1]))
|
|
451
|
+
v = y;
|
|
457
452
|
else {
|
|
458
|
-
var S =
|
|
459
|
-
if (
|
|
460
|
-
|
|
453
|
+
var S = u.length - f, $ = s.length - y, k = Math.min(3, S, $), N = u.slice(f, f + k);
|
|
454
|
+
if (s.slice(y, y + k) === N)
|
|
455
|
+
v = y;
|
|
461
456
|
else {
|
|
462
|
-
|
|
457
|
+
b += 1;
|
|
463
458
|
continue;
|
|
464
459
|
}
|
|
465
460
|
}
|
|
466
|
-
for (
|
|
467
|
-
|
|
468
|
-
if (
|
|
469
|
-
return
|
|
461
|
+
for (b = v; b < d && s[b] === g; b += 1)
|
|
462
|
+
f += 1, g = u[f];
|
|
463
|
+
if (b -= 1, w.push([v, b]), f === u.length)
|
|
464
|
+
return L(w, s);
|
|
470
465
|
}
|
|
471
466
|
return null;
|
|
472
467
|
}
|
|
473
|
-
function
|
|
474
|
-
var
|
|
475
|
-
return
|
|
476
|
-
var
|
|
477
|
-
S ?
|
|
478
|
-
}), [
|
|
468
|
+
function L(s, u) {
|
|
469
|
+
var d = 2;
|
|
470
|
+
return s.forEach(function(w) {
|
|
471
|
+
var f = w[0], g = w[1], v = g - f + 1, b = f === 0 || u[f] === " " || u[f - 1] === " ", y = g === u.length - 1 || u[g] === " " || u[g + 1] === " ", S = b && y;
|
|
472
|
+
S ? d += 0.2 : b ? d += 0.4 : v >= 3 ? d += 0.8 : d += 1.6;
|
|
473
|
+
}), [d, s];
|
|
479
474
|
}
|
|
480
|
-
function
|
|
481
|
-
var
|
|
482
|
-
return
|
|
483
|
-
item:
|
|
484
|
-
score:
|
|
485
|
-
matches: [
|
|
475
|
+
function m(s, u) {
|
|
476
|
+
var d = (0, e.default)(u), w = d.split(" "), f = (0, e.default)(s), g = new Set(f.split(" ")), v = p(s, f, g, u, d, w, "smart");
|
|
477
|
+
return v ? {
|
|
478
|
+
item: s,
|
|
479
|
+
score: v[0],
|
|
480
|
+
matches: [v[1]]
|
|
486
481
|
} : null;
|
|
487
482
|
}
|
|
488
|
-
function
|
|
489
|
-
var
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
492
|
-
|
|
483
|
+
function x(s, u) {
|
|
484
|
+
var d = u.strategy, w = d === void 0 ? "aggressive" : d, f = u.getText, g = s.map(function(v) {
|
|
485
|
+
var b;
|
|
486
|
+
if (f)
|
|
487
|
+
b = f(v);
|
|
493
488
|
else {
|
|
494
|
-
var
|
|
495
|
-
|
|
489
|
+
var y = u.key ? v[u.key] : v;
|
|
490
|
+
b = [y];
|
|
496
491
|
}
|
|
497
|
-
var S =
|
|
498
|
-
var
|
|
499
|
-
return [
|
|
492
|
+
var S = b.map(function($) {
|
|
493
|
+
var k = $ || "", N = (0, e.default)(k), F = new Set(N.split(" "));
|
|
494
|
+
return [k, N, F];
|
|
500
495
|
});
|
|
501
|
-
return [
|
|
496
|
+
return [v, S];
|
|
502
497
|
});
|
|
503
|
-
return function(
|
|
504
|
-
var
|
|
505
|
-
return
|
|
506
|
-
for (var
|
|
507
|
-
var j =
|
|
498
|
+
return function(v) {
|
|
499
|
+
var b = [], y = (0, e.default)(v), S = y.split(" ");
|
|
500
|
+
return y.length ? (g.forEach(function($) {
|
|
501
|
+
for (var k = $[0], N = $[1], F = r, W = [], O = 0, ve = N.length; O < ve; O += 1) {
|
|
502
|
+
var j = N[O], me = j[0], he = j[1], ge = j[2], J = p(me, he, ge, v, y, S, w);
|
|
508
503
|
J ? (F = Math.min(F, J[0]), W.push(J[1])) : W.push(null);
|
|
509
504
|
}
|
|
510
|
-
F < r &&
|
|
511
|
-
item:
|
|
505
|
+
F < r && b.push({
|
|
506
|
+
item: k,
|
|
512
507
|
score: F,
|
|
513
508
|
matches: W
|
|
514
509
|
});
|
|
515
|
-
}),
|
|
510
|
+
}), b.sort(o), b) : [];
|
|
516
511
|
};
|
|
517
512
|
}
|
|
518
|
-
return
|
|
513
|
+
return D;
|
|
519
514
|
}
|
|
520
515
|
var ie;
|
|
521
516
|
function Ie() {
|
|
522
|
-
return ie || (ie = 1, function(e) {
|
|
523
|
-
e.__esModule = !0, e.default =
|
|
517
|
+
return ie || (ie = 1, (function(e) {
|
|
518
|
+
e.__esModule = !0, e.default = o, e.fuzzyMatch = a;
|
|
524
519
|
var t = r(be());
|
|
525
520
|
e.normalizeText = t.default;
|
|
526
521
|
function r(n) {
|
|
527
522
|
return n && n.__esModule ? n : { default: n };
|
|
528
523
|
}
|
|
529
|
-
function
|
|
530
|
-
return
|
|
524
|
+
function o(n, c) {
|
|
525
|
+
return c === void 0 && (c = {}), le().createFuzzySearchImpl(n, c);
|
|
531
526
|
}
|
|
532
|
-
function a(n,
|
|
533
|
-
return le().fuzzyMatchImpl(n,
|
|
527
|
+
function a(n, c) {
|
|
528
|
+
return le().fuzzyMatchImpl(n, c);
|
|
534
529
|
}
|
|
535
|
-
}(Y)), Y;
|
|
530
|
+
})(Y)), Y;
|
|
536
531
|
}
|
|
537
532
|
var Xe = Ie();
|
|
538
|
-
const Ue = /* @__PURE__ */ pe(Xe), Ke = { key: 0 }, He = { key: 0 }, Ge = ["innerHTML"], je = { key: 1 }, Je = { key: 2 }, de = /* @__PURE__ */
|
|
533
|
+
const Ue = /* @__PURE__ */ pe(Xe), U = (e, t) => !e || typeof e != "object" ? String(e) : t.split(".").reduce((r, o) => r && (typeof r == "object" ? r[o] : r), e), Ke = { key: 0 }, He = { key: 0 }, Ge = ["innerHTML"], je = { key: 1 }, Je = { key: 2 }, de = /* @__PURE__ */ C({
|
|
539
534
|
__name: "TableColumn",
|
|
540
535
|
props: {
|
|
541
536
|
column: {},
|
|
@@ -543,28 +538,28 @@ const Ue = /* @__PURE__ */ pe(Xe), Ke = { key: 0 }, He = { key: 0 }, Ge = ["inne
|
|
|
543
538
|
rowIndex: {}
|
|
544
539
|
},
|
|
545
540
|
setup(e) {
|
|
546
|
-
const t = e, r =
|
|
541
|
+
const t = e, r = q(() => t.column.render ? t.column.render(U(t.row, t.column.data), t.row) : U(t.row, t.column.data));
|
|
547
542
|
H(() => {
|
|
548
543
|
r.value && typeof r.value == "object" && "then" in r.value && console.warn("Async component detected in TableColumn, this may cause issues with rendering.");
|
|
549
544
|
});
|
|
550
|
-
const
|
|
551
|
-
return (n,
|
|
552
|
-
e.column.render ? e.row ? (
|
|
553
|
-
r.value ? (
|
|
554
|
-
typeof r.value == "string" ? (
|
|
555
|
-
|
|
556
|
-
])) : ye(r.value) ? (
|
|
557
|
-
(
|
|
558
|
-
])) : (
|
|
559
|
-
(
|
|
545
|
+
const o = (n, c) => c.render === void 0 ? {} : c.render(U(n, c.data), n).props, a = (n) => (console.log("getComponent", n), n && typeof n == "object" && "then" in n ? se(() => n) : typeof n == "function" ? se(n) : n);
|
|
546
|
+
return (n, c) => (l(), i("td", null, [
|
|
547
|
+
e.column.render ? e.row ? (l(), i(R, { key: 1 }, [
|
|
548
|
+
r.value ? (l(), i("div", Ke, [
|
|
549
|
+
typeof r.value == "string" ? (l(), i("div", He, [
|
|
550
|
+
h("div", { innerHTML: r.value }, null, 8, Ge)
|
|
551
|
+
])) : ye(r.value) ? (l(), i("div", je, [
|
|
552
|
+
(l(), A(ee(r.value)))
|
|
553
|
+
])) : (l(), i("div", Je, [
|
|
554
|
+
(l(), A(ee(a(r.value.component)), xe(_e(o(e.row, e.column))), null, 16))
|
|
560
555
|
]))
|
|
561
556
|
])) : E("", !0)
|
|
562
|
-
], 64)) : E("", !0) : (
|
|
563
|
-
te(
|
|
557
|
+
], 64)) : E("", !0) : (l(), i(R, { key: 0 }, [
|
|
558
|
+
te(I(K(U)(e.row, e.column.data)), 1)
|
|
564
559
|
], 64))
|
|
565
560
|
]));
|
|
566
561
|
}
|
|
567
|
-
}), Ze = { key: 0 }, Ye = { key: 1 }, Qe = { key: 0 }, et = ["colspan"], tt = ["onClick"], nt = { key: 2 }, rt = { key: 0 }, at = ["colspan"], kt = /* @__PURE__ */
|
|
562
|
+
}), Ze = { key: 0 }, Ye = { key: 1 }, Qe = { key: 0 }, et = ["colspan"], tt = ["onClick"], nt = { key: 2 }, rt = { key: 0 }, at = ["colspan"], kt = /* @__PURE__ */ C({
|
|
568
563
|
__name: "Table",
|
|
569
564
|
props: {
|
|
570
565
|
zebra: { type: Boolean, default: !1 },
|
|
@@ -581,91 +576,96 @@ const Ue = /* @__PURE__ */ pe(Xe), Ke = { key: 0 }, He = { key: 0 }, Ge = ["inne
|
|
|
581
576
|
onRowClick: {}
|
|
582
577
|
},
|
|
583
578
|
setup(e) {
|
|
584
|
-
const t =
|
|
579
|
+
const t = B([]), r = B([]), o = B(null), a = e, n = B(V(
|
|
585
580
|
a.customRowClasses,
|
|
586
581
|
{ hover: a.onRowClick }
|
|
587
|
-
)),
|
|
588
|
-
|
|
582
|
+
)), c = B(
|
|
583
|
+
V("table", Le.toClassName(a.size), {
|
|
589
584
|
"table-zebra": a.zebra,
|
|
590
585
|
"table-pin-rows": a.pinRows,
|
|
591
586
|
"table-pin-cols ": a.pinCols
|
|
592
587
|
})
|
|
593
|
-
),
|
|
594
|
-
a.onRowClick && a.onRowClick(
|
|
588
|
+
), p = (m, x) => {
|
|
589
|
+
a.onRowClick && a.onRowClick(m, x);
|
|
595
590
|
};
|
|
596
591
|
H(() => {
|
|
597
592
|
t.value = a.dataSource, r.value = a.dataSource;
|
|
598
|
-
}),
|
|
593
|
+
}), X(
|
|
599
594
|
() => a.dataSource,
|
|
600
|
-
(
|
|
601
|
-
t.value =
|
|
595
|
+
(m) => {
|
|
596
|
+
t.value = m, r.value = m;
|
|
602
597
|
},
|
|
603
598
|
{ immediate: !0 }
|
|
604
|
-
),
|
|
599
|
+
), X(
|
|
605
600
|
() => a.searchValue,
|
|
606
|
-
(
|
|
601
|
+
(m) => {
|
|
607
602
|
if (a.searchFunction) {
|
|
608
|
-
r.value = a.searchFunction(
|
|
603
|
+
r.value = a.searchFunction(m ?? "");
|
|
609
604
|
return;
|
|
610
605
|
}
|
|
611
|
-
r.value =
|
|
606
|
+
r.value = m ? L(m) : t.value;
|
|
612
607
|
},
|
|
613
608
|
{ immediate: !0 }
|
|
614
609
|
);
|
|
615
|
-
const
|
|
616
|
-
const
|
|
617
|
-
return
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
610
|
+
const _ = (m, x = "") => Object.keys(m).flatMap((s) => {
|
|
611
|
+
const u = m[s], d = x ? `${x}.${s}` : s;
|
|
612
|
+
return u !== null && typeof u == "object" ? _(u, d) : [d];
|
|
613
|
+
}), T = (m, x) => x.split(".").reduce((s, u) => s !== null && typeof s == "object" ? s[u] : void 0, m), L = (m) => {
|
|
614
|
+
const x = [];
|
|
615
|
+
return t.value.length > 0 ? (_(t.value[0]).forEach((u) => {
|
|
616
|
+
const d = t.value.map((g) => T(g, u)), f = Ue(d)(m);
|
|
617
|
+
for (const g of f) {
|
|
618
|
+
const v = t.value.filter(
|
|
619
|
+
(b) => T(b, u) === g.item
|
|
620
|
+
);
|
|
621
|
+
x.push(...v);
|
|
622
622
|
}
|
|
623
|
-
}),
|
|
623
|
+
}), [...new Set(x)]) : [];
|
|
624
624
|
};
|
|
625
|
-
return (
|
|
625
|
+
return (m, x) => (l(), i("table", {
|
|
626
626
|
ref_key: "table",
|
|
627
|
-
ref:
|
|
628
|
-
class:
|
|
627
|
+
ref: o,
|
|
628
|
+
class: M(c.value)
|
|
629
629
|
}, [
|
|
630
|
-
e.horizontal ? E("", !0) : (
|
|
631
|
-
|
|
632
|
-
(
|
|
633
|
-
key:
|
|
634
|
-
},
|
|
630
|
+
e.horizontal ? E("", !0) : (l(), i("thead", Ze, [
|
|
631
|
+
h("tr", null, [
|
|
632
|
+
(l(!0), i(R, null, P(a.columns, (s) => (l(), i("th", {
|
|
633
|
+
key: s.title
|
|
634
|
+
}, I(s.title), 1))), 128))
|
|
635
635
|
])
|
|
636
636
|
])),
|
|
637
|
-
e.horizontal ? E("", !0) : (
|
|
638
|
-
r.value.length === 0 ? (
|
|
639
|
-
|
|
637
|
+
e.horizontal ? E("", !0) : (l(), i("tbody", Ye, [
|
|
638
|
+
r.value.length === 0 ? (l(), i("tr", Qe, [
|
|
639
|
+
h("td", {
|
|
640
640
|
colspan: a.columns.length
|
|
641
641
|
}, "No data found", 8, et)
|
|
642
|
-
])) : (
|
|
643
|
-
class:
|
|
644
|
-
key: JSON.stringify(
|
|
645
|
-
onClick: (
|
|
642
|
+
])) : (l(!0), i(R, { key: 1 }, P(r.value, (s, u) => (l(), i("tr", {
|
|
643
|
+
class: M(n.value),
|
|
644
|
+
key: JSON.stringify(s),
|
|
645
|
+
onClick: (d) => p(s, u)
|
|
646
646
|
}, [
|
|
647
|
-
(
|
|
648
|
-
key:
|
|
649
|
-
column:
|
|
650
|
-
row:
|
|
651
|
-
rowIndex:
|
|
647
|
+
(l(!0), i(R, null, P(a.columns, (d) => (l(), A(de, {
|
|
648
|
+
key: d.data,
|
|
649
|
+
column: d,
|
|
650
|
+
row: s,
|
|
651
|
+
rowIndex: u
|
|
652
652
|
}, null, 8, ["column", "row", "rowIndex"]))), 128))
|
|
653
653
|
], 10, tt))), 128))
|
|
654
654
|
])),
|
|
655
|
-
e.horizontal ? (
|
|
656
|
-
(
|
|
657
|
-
key:
|
|
655
|
+
e.horizontal ? (l(), i("tbody", nt, [
|
|
656
|
+
(l(!0), i(R, null, P(a.columns, (s) => (l(), i("tr", {
|
|
657
|
+
key: s.title
|
|
658
658
|
}, [
|
|
659
|
-
|
|
660
|
-
(
|
|
661
|
-
key:
|
|
662
|
-
column:
|
|
663
|
-
row:
|
|
664
|
-
rowIndex:
|
|
659
|
+
h("th", null, I(s.title), 1),
|
|
660
|
+
(l(!0), i(R, null, P(r.value, (u, d) => (l(), A(de, {
|
|
661
|
+
key: d,
|
|
662
|
+
column: s,
|
|
663
|
+
row: u,
|
|
664
|
+
rowIndex: d
|
|
665
665
|
}, null, 8, ["column", "row", "rowIndex"]))), 128))
|
|
666
666
|
]))), 128)),
|
|
667
|
-
r.value.length === 0 ? (
|
|
668
|
-
|
|
667
|
+
r.value.length === 0 ? (l(), i("tr", rt, [
|
|
668
|
+
h("td", {
|
|
669
669
|
colspan: a.columns.length + 1,
|
|
670
670
|
style: { "text-align": "center", padding: "1rem" }
|
|
671
671
|
}, " No data found ", 8, at)
|
|
@@ -673,65 +673,65 @@ const Ue = /* @__PURE__ */ pe(Xe), Ke = { key: 0 }, He = { key: 0 }, Ge = ["inne
|
|
|
673
673
|
])) : E("", !0)
|
|
674
674
|
], 2));
|
|
675
675
|
}
|
|
676
|
-
}), Bt = /* @__PURE__ */
|
|
676
|
+
}), Bt = /* @__PURE__ */ C({
|
|
677
677
|
__name: "Stepper",
|
|
678
678
|
props: {
|
|
679
679
|
value: {}
|
|
680
680
|
},
|
|
681
681
|
emits: ["update:value"],
|
|
682
682
|
setup(e, { expose: t, emit: r }) {
|
|
683
|
-
const
|
|
684
|
-
a.value =
|
|
683
|
+
const o = e, a = B(o.value), n = r, c = (p) => {
|
|
684
|
+
a.value = p, n("update:value", p);
|
|
685
685
|
};
|
|
686
686
|
return we("stepper", {
|
|
687
687
|
value: a,
|
|
688
|
-
updateValue:
|
|
689
|
-
}),
|
|
690
|
-
() =>
|
|
691
|
-
(
|
|
692
|
-
a.value =
|
|
688
|
+
updateValue: c
|
|
689
|
+
}), X(
|
|
690
|
+
() => o.value,
|
|
691
|
+
(p) => {
|
|
692
|
+
a.value = p;
|
|
693
693
|
}
|
|
694
694
|
), t({
|
|
695
|
-
updateValue:
|
|
696
|
-
}), (
|
|
695
|
+
updateValue: c
|
|
696
|
+
}), (p, _) => z(p.$slots, "default", { updateValue: c });
|
|
697
697
|
}
|
|
698
|
-
}), Ct = /* @__PURE__ */
|
|
698
|
+
}), Ct = /* @__PURE__ */ C({
|
|
699
699
|
__name: "Step",
|
|
700
700
|
props: {
|
|
701
701
|
value: {}
|
|
702
702
|
},
|
|
703
703
|
setup(e) {
|
|
704
|
-
const t = e, r = ne("stepper"),
|
|
705
|
-
return
|
|
704
|
+
const t = e, r = ne("stepper"), o = B("");
|
|
705
|
+
return X(
|
|
706
706
|
() => r?.value.value,
|
|
707
707
|
(a) => {
|
|
708
|
-
a && t.value && (
|
|
708
|
+
a && t.value && (o.value = Number(a) >= Number(t.value) ? "step-primary" : "");
|
|
709
709
|
}
|
|
710
710
|
), H(() => {
|
|
711
|
-
r && (
|
|
712
|
-
}), (a, n) => (
|
|
713
|
-
class:
|
|
711
|
+
r && (o.value = r.value.value === t.value ? "step-primary" : "", Number(r.value.value) >= Number(t.value) && (o.value = "step-primary"));
|
|
712
|
+
}), (a, n) => (l(), i("li", {
|
|
713
|
+
class: M(["step", o.value])
|
|
714
714
|
}, [
|
|
715
|
-
|
|
715
|
+
z(a.$slots, "default")
|
|
716
716
|
], 2));
|
|
717
717
|
}
|
|
718
718
|
}), st = {}, ot = { class: "steps" };
|
|
719
719
|
function ut(e, t) {
|
|
720
|
-
return
|
|
721
|
-
|
|
720
|
+
return l(), i("ul", ot, [
|
|
721
|
+
z(e.$slots, "default")
|
|
722
722
|
]);
|
|
723
723
|
}
|
|
724
|
-
const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @__PURE__ */
|
|
724
|
+
const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @__PURE__ */ C({
|
|
725
725
|
__name: "StepPanels",
|
|
726
726
|
setup(e) {
|
|
727
727
|
const t = ne("stepper");
|
|
728
|
-
return (r,
|
|
728
|
+
return (r, o) => (l(), A(Se, {
|
|
729
729
|
name: "fade",
|
|
730
730
|
mode: "out-in"
|
|
731
731
|
}, {
|
|
732
732
|
default: fe(() => [
|
|
733
|
-
K(t)?.value ? (
|
|
734
|
-
|
|
733
|
+
K(t)?.value ? (l(), i("div", ct, [
|
|
734
|
+
z(r.$slots, "default", {
|
|
735
735
|
currentStep: K(t)?.value
|
|
736
736
|
})
|
|
737
737
|
])) : E("", !0)
|
|
@@ -739,25 +739,25 @@ const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @_
|
|
|
739
739
|
_: 3
|
|
740
740
|
}));
|
|
741
741
|
}
|
|
742
|
-
}), lt = { key: 0 }, zt = /* @__PURE__ */
|
|
742
|
+
}), lt = { key: 0 }, zt = /* @__PURE__ */ C({
|
|
743
743
|
__name: "StepPanel",
|
|
744
744
|
props: {
|
|
745
745
|
value: {}
|
|
746
746
|
},
|
|
747
747
|
setup(e, { expose: t }) {
|
|
748
|
-
const r =
|
|
749
|
-
|
|
748
|
+
const r = q(() => o?.value.value), o = ne("stepper"), a = (n) => {
|
|
749
|
+
o && o.updateValue(n.toString());
|
|
750
750
|
};
|
|
751
751
|
return t({
|
|
752
752
|
activateCallback: a
|
|
753
|
-
}), (n,
|
|
754
|
-
|
|
753
|
+
}), (n, c) => e.value === r.value ? (l(), i("div", lt, [
|
|
754
|
+
z(n.$slots, "default", { activateCallback: a })
|
|
755
755
|
])) : E("", !0);
|
|
756
756
|
}
|
|
757
757
|
}), it = {
|
|
758
758
|
key: 0,
|
|
759
759
|
method: "dialog"
|
|
760
|
-
}, Nt = /* @__PURE__ */
|
|
760
|
+
}, Nt = /* @__PURE__ */ C({
|
|
761
761
|
__name: "Modal",
|
|
762
762
|
props: {
|
|
763
763
|
closeButton: { type: Boolean, default: !0 },
|
|
@@ -767,12 +767,12 @@ const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @_
|
|
|
767
767
|
},
|
|
768
768
|
emits: ["close"],
|
|
769
769
|
setup(e, { expose: t, emit: r }) {
|
|
770
|
-
const
|
|
770
|
+
const o = B(null), a = r, n = e, c = B(V("modal-box", n.extraBoxClasses, {
|
|
771
771
|
"overflow-visible": n.overflow
|
|
772
|
-
})),
|
|
773
|
-
|
|
774
|
-
),
|
|
775
|
-
|
|
772
|
+
})), p = B(
|
|
773
|
+
V("modal")
|
|
774
|
+
), _ = B(
|
|
775
|
+
V(
|
|
776
776
|
"btn",
|
|
777
777
|
Ne.toClassName(n.closeButtonSize),
|
|
778
778
|
"btn-circle",
|
|
@@ -784,53 +784,53 @@ const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @_
|
|
|
784
784
|
);
|
|
785
785
|
return t({
|
|
786
786
|
showModal: () => {
|
|
787
|
-
|
|
787
|
+
o.value?.showModal();
|
|
788
788
|
},
|
|
789
789
|
closeModal: () => {
|
|
790
|
-
|
|
790
|
+
o.value?.close();
|
|
791
791
|
}
|
|
792
|
-
}), (
|
|
792
|
+
}), (m, x) => (l(), i("dialog", {
|
|
793
793
|
ref_key: "modal",
|
|
794
|
-
ref:
|
|
795
|
-
class:
|
|
794
|
+
ref: o,
|
|
795
|
+
class: M([p.value, m.$attrs.class]),
|
|
796
796
|
"aria-modal": "true",
|
|
797
797
|
"aria-hidden": "true",
|
|
798
798
|
role: "dialog",
|
|
799
|
-
onClose:
|
|
799
|
+
onClose: x[0] || (x[0] = (s) => a("close", s))
|
|
800
800
|
}, [
|
|
801
|
-
|
|
802
|
-
class:
|
|
801
|
+
h("div", {
|
|
802
|
+
class: M(c.value)
|
|
803
803
|
}, [
|
|
804
|
-
e.closeButton ? (
|
|
805
|
-
|
|
806
|
-
class:
|
|
804
|
+
e.closeButton ? (l(), i("form", it, [
|
|
805
|
+
h("button", {
|
|
806
|
+
class: M(_.value)
|
|
807
807
|
}, "✕", 2)
|
|
808
808
|
])) : E("", !0),
|
|
809
|
-
|
|
809
|
+
z(m.$slots, "default")
|
|
810
810
|
], 2),
|
|
811
|
-
|
|
811
|
+
x[1] || (x[1] = h("form", {
|
|
812
812
|
method: "dialog",
|
|
813
813
|
class: "modal-backdrop"
|
|
814
814
|
}, [
|
|
815
|
-
|
|
815
|
+
h("button", null, "close")
|
|
816
816
|
], -1))
|
|
817
817
|
], 34));
|
|
818
818
|
}
|
|
819
|
-
}), dt = { class: "hidden w-full max-w-sm lg:flex" }, ft = { class: "relative mx-3 w-full" }, pt = { class: "relative w-full max-w-full" }, bt = ["value"], Tt = /* @__PURE__ */
|
|
819
|
+
}), dt = { class: "hidden w-full max-w-sm lg:flex" }, ft = { class: "relative mx-3 w-full" }, pt = { class: "relative w-full max-w-full" }, bt = ["value"], Tt = /* @__PURE__ */ C({
|
|
820
820
|
__name: "SearchBar",
|
|
821
821
|
props: ["modelValue"],
|
|
822
822
|
emits: ["update:modelValue"],
|
|
823
823
|
setup(e, { emit: t }) {
|
|
824
|
-
const r = e,
|
|
825
|
-
(
|
|
824
|
+
const r = e, o = B(null), a = t, n = (c) => {
|
|
825
|
+
(c.ctrlKey || c.metaKey) && c.key.toLowerCase() === "k" && (c.preventDefault(), o.value && o.value.focus());
|
|
826
826
|
};
|
|
827
827
|
return H(() => {
|
|
828
828
|
document.addEventListener("keydown", n);
|
|
829
829
|
}), ke(() => {
|
|
830
830
|
document.removeEventListener("keydown", n);
|
|
831
|
-
}), (
|
|
832
|
-
|
|
833
|
-
|
|
831
|
+
}), (c, p) => (l(), i("div", dt, [
|
|
832
|
+
h("label", ft, [
|
|
833
|
+
p[1] || (p[1] = h("svg", {
|
|
834
834
|
class: "pointer-events-none absolute z-10 my-3.5 ms-4 text-base-content opacity-60",
|
|
835
835
|
"aria-hidden": "true",
|
|
836
836
|
width: "16",
|
|
@@ -838,33 +838,33 @@ const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @_
|
|
|
838
838
|
viewBox: "0.48 0.48 23.04 23.04",
|
|
839
839
|
fill: "currentColor"
|
|
840
840
|
}, [
|
|
841
|
-
|
|
841
|
+
h("path", {
|
|
842
842
|
fill: "none",
|
|
843
843
|
d: "M0 0h24v24H0z"
|
|
844
844
|
}),
|
|
845
|
-
|
|
845
|
+
h("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" })
|
|
846
846
|
], -1)),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
847
|
+
h("div", pt, [
|
|
848
|
+
h("form", null, [
|
|
849
|
+
h("input", {
|
|
850
850
|
ref_key: "searchInput",
|
|
851
|
-
ref:
|
|
851
|
+
ref: o,
|
|
852
852
|
type: "search",
|
|
853
853
|
placeholder: "Zoeken...",
|
|
854
854
|
value: r.modelValue,
|
|
855
|
-
onInput:
|
|
855
|
+
onInput: p[0] || (p[0] = (_) => a("update:modelValue", _.target.value)),
|
|
856
856
|
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"
|
|
857
857
|
}, null, 40, bt)
|
|
858
858
|
])
|
|
859
859
|
]),
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
860
|
+
p[2] || (p[2] = h("div", { class: "pointer-events-none absolute end-10 top-2.5 hidden gap-1 opacity-50 lg:flex rtl:flex-row-reverse" }, [
|
|
861
|
+
h("kbd", { class: "kbd kbd-sm" }, "ctrl"),
|
|
862
|
+
h("kbd", { class: "kbd kbd-sm" }, "K")
|
|
863
863
|
], -1))
|
|
864
864
|
])
|
|
865
865
|
]));
|
|
866
866
|
}
|
|
867
|
-
}), vt = ["name", "value"], Lt = /* @__PURE__ */
|
|
867
|
+
}), vt = ["name", "value"], Lt = /* @__PURE__ */ C({
|
|
868
868
|
__name: "Tabs",
|
|
869
869
|
props: {
|
|
870
870
|
box: { type: Boolean, default: !1 },
|
|
@@ -877,46 +877,46 @@ const $t = /* @__PURE__ */ ae(st, [["render", ut]]), ct = { key: 0 }, Mt = /* @_
|
|
|
877
877
|
activeTab: { default: 0 }
|
|
878
878
|
},
|
|
879
879
|
setup(e, { expose: t }) {
|
|
880
|
-
const r = Math.random().toString(36).substring(2, 15),
|
|
880
|
+
const r = Math.random().toString(36).substring(2, 15), o = e, a = q(() => 100 / o.items.length), n = q(() => [
|
|
881
881
|
"tabs",
|
|
882
|
-
|
|
883
|
-
`${Re.toClassName(
|
|
882
|
+
o.placement === "top" ? "tabs-top" : "tabs-bottom",
|
|
883
|
+
`${Re.toClassName(o.size)}`,
|
|
884
884
|
{
|
|
885
|
-
"tabs-box":
|
|
886
|
-
"tabs-border":
|
|
887
|
-
"tabs-lift":
|
|
885
|
+
"tabs-box": o.box,
|
|
886
|
+
"tabs-border": o.border,
|
|
887
|
+
"tabs-lift": o.lift
|
|
888
888
|
}
|
|
889
|
-
]),
|
|
890
|
-
|
|
889
|
+
]), c = B(o.activeTab ?? 0), p = (_) => {
|
|
890
|
+
c.value = _;
|
|
891
891
|
};
|
|
892
|
-
return
|
|
893
|
-
|
|
892
|
+
return X(() => o.activeTab, (_) => {
|
|
893
|
+
c.value = _;
|
|
894
894
|
}), t({
|
|
895
|
-
activeIndex:
|
|
896
|
-
setActiveTab:
|
|
897
|
-
}), (
|
|
895
|
+
activeIndex: c,
|
|
896
|
+
setActiveTab: p
|
|
897
|
+
}), (_, T) => (l(), i("div", {
|
|
898
898
|
role: "tablist",
|
|
899
|
-
class:
|
|
899
|
+
class: M(n.value)
|
|
900
900
|
}, [
|
|
901
|
-
(
|
|
902
|
-
|
|
901
|
+
(l(!0), i(R, null, P(o.items, (L, m) => (l(), i(R, { key: m }, [
|
|
902
|
+
h("label", {
|
|
903
903
|
class: "tab",
|
|
904
|
-
style: Be(
|
|
904
|
+
style: Be(o.fullWidth ? { width: a.value + "%" } : {})
|
|
905
905
|
}, [
|
|
906
|
-
Ce(
|
|
906
|
+
Ce(h("input", {
|
|
907
907
|
type: "radio",
|
|
908
908
|
name: K(r),
|
|
909
|
-
value:
|
|
910
|
-
"onUpdate:modelValue":
|
|
909
|
+
value: m,
|
|
910
|
+
"onUpdate:modelValue": T[0] || (T[0] = (x) => c.value = x)
|
|
911
911
|
}, null, 8, vt), [
|
|
912
|
-
[$e,
|
|
912
|
+
[$e, c.value]
|
|
913
913
|
]),
|
|
914
|
-
te(" " +
|
|
914
|
+
te(" " + I(L.label), 1)
|
|
915
915
|
], 4),
|
|
916
|
-
|
|
917
|
-
class:
|
|
916
|
+
h("div", {
|
|
917
|
+
class: M(["tab-content p-6", L.disabled ? "tab-disabled" : ""])
|
|
918
918
|
}, [
|
|
919
|
-
|
|
919
|
+
z(_.$slots, L.slot)
|
|
920
920
|
], 2)
|
|
921
921
|
], 64))), 128))
|
|
922
922
|
], 2));
|
|
@@ -1032,5 +1032,5 @@ export {
|
|
|
1032
1032
|
Re as TabsSizeUtils,
|
|
1033
1033
|
ht as TextColorUtils,
|
|
1034
1034
|
Rt as dendelionSafeList,
|
|
1035
|
-
|
|
1035
|
+
U as getValue
|
|
1036
1036
|
};
|