toku-ui 3.1.0 → 4.0.0
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/components/TThemeProvider/TThemeProvider.d.ts +56 -62
- package/dist/components/TThemeProvider/TThemeProvider.d.ts.map +1 -1
- package/dist/components/TThemeProvider/TThemeProvider.stories.d.ts +44 -0
- package/dist/components/TThemeProvider/TThemeProvider.stories.d.ts.map +1 -0
- package/dist/index.es.js +426 -379
- package/dist/index.es.js.map +1 -1
- package/dist/stories/DesignTokens.stories.d.ts +16 -0
- package/dist/stories/DesignTokens.stories.d.ts.map +1 -0
- package/dist/theme/utils.d.ts +70 -56
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/tokens.css +220 -0
- package/package.json +13 -6
package/dist/index.es.js
CHANGED
|
@@ -332,12 +332,12 @@ function Ve(e) {
|
|
|
332
332
|
function He() {}
|
|
333
333
|
//#endregion
|
|
334
334
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
|
|
335
|
-
function
|
|
335
|
+
function j(e) {
|
|
336
336
|
return Pe(e);
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
339
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
|
|
340
|
-
function
|
|
340
|
+
function Ue(e) {
|
|
341
341
|
if (typeof e != "object" || !e) return !1;
|
|
342
342
|
if (Object.getPrototypeOf(e) === null) return !0;
|
|
343
343
|
if (Object.prototype.toString.call(e) !== "[object Object]") {
|
|
@@ -350,7 +350,7 @@ function We(e) {
|
|
|
350
350
|
}
|
|
351
351
|
//#endregion
|
|
352
352
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/object/clone.mjs
|
|
353
|
-
function
|
|
353
|
+
function We(e) {
|
|
354
354
|
if (se(e)) return e;
|
|
355
355
|
if (Array.isArray(e) || Pe(e) || e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
|
|
356
356
|
let t = Object.getPrototypeOf(e);
|
|
@@ -373,17 +373,17 @@ function Ge(e) {
|
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
375
375
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
|
|
376
|
-
function
|
|
376
|
+
function Ge(e, ...t) {
|
|
377
377
|
let n = t.slice(0, -1), r = t[t.length - 1], i = e;
|
|
378
378
|
for (let e = 0; e < n.length; e++) {
|
|
379
379
|
let t = n[e];
|
|
380
|
-
i =
|
|
380
|
+
i = Ke(i, t, r, /* @__PURE__ */ new Map());
|
|
381
381
|
}
|
|
382
382
|
return i;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Ke(e, t, n, r) {
|
|
385
385
|
if (se(e) && (e = Object(e)), typeof t != "object" || !t) return e;
|
|
386
|
-
if (r.has(t)) return
|
|
386
|
+
if (r.has(t)) return We(r.get(t));
|
|
387
387
|
if (r.set(t, e), Array.isArray(t)) {
|
|
388
388
|
t = t.slice();
|
|
389
389
|
for (let e = 0; e < t.length; e++) t[e] = t[e] ?? void 0;
|
|
@@ -406,73 +406,73 @@ function qe(e, t, n, r) {
|
|
|
406
406
|
c = e;
|
|
407
407
|
} else c = [];
|
|
408
408
|
let l = n(c, s, o, e, t, r);
|
|
409
|
-
l === void 0 ? Array.isArray(s) || Be(c) && Be(s) && (
|
|
409
|
+
l === void 0 ? Array.isArray(s) || Be(c) && Be(s) && (Ue(c) || Ue(s) || j(c) || j(s)) ? e[o] = Ke(c, s, n, r) : c == null && Ue(s) ? e[o] = Ke({}, s, n, r) : c == null && j(s) ? e[o] = Re(s) : (c === void 0 || s !== void 0) && (e[o] = s) : e[o] = l;
|
|
410
410
|
}
|
|
411
411
|
return e;
|
|
412
412
|
}
|
|
413
413
|
//#endregion
|
|
414
414
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/merge.mjs
|
|
415
|
-
function
|
|
416
|
-
return
|
|
415
|
+
function M(e, ...t) {
|
|
416
|
+
return Ge(e, ...t, He);
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
419
419
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
420
|
-
function
|
|
420
|
+
function qe(e) {
|
|
421
421
|
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
422
422
|
}
|
|
423
423
|
//#endregion
|
|
424
424
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/words.mjs
|
|
425
|
-
var
|
|
426
|
-
function
|
|
427
|
-
return Array.from(e.match(
|
|
425
|
+
var Je = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
426
|
+
function Ye(e) {
|
|
427
|
+
return Array.from(e.match(Je) ?? []);
|
|
428
428
|
}
|
|
429
429
|
//#endregion
|
|
430
430
|
//#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/string/camelCase.mjs
|
|
431
|
-
function
|
|
432
|
-
let t =
|
|
431
|
+
function Xe(e) {
|
|
432
|
+
let t = Ye(e);
|
|
433
433
|
if (t.length === 0) return "";
|
|
434
434
|
let [n, ...r] = t;
|
|
435
|
-
return `${n.toLowerCase()}${r.map((e) =>
|
|
435
|
+
return `${n.toLowerCase()}${r.map((e) => qe(e)).join("")}`;
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
438
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
439
|
-
function
|
|
440
|
-
return
|
|
439
|
+
function N() {
|
|
440
|
+
return N = Object.assign ? Object.assign.bind() : function(e) {
|
|
441
441
|
for (var t = 1; t < arguments.length; t++) {
|
|
442
442
|
var n = arguments[t];
|
|
443
443
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
444
444
|
}
|
|
445
445
|
return e;
|
|
446
|
-
},
|
|
446
|
+
}, N.apply(null, arguments);
|
|
447
447
|
}
|
|
448
448
|
//#endregion
|
|
449
449
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
450
|
-
function
|
|
450
|
+
function Ze(e) {
|
|
451
451
|
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
452
452
|
return e;
|
|
453
453
|
}
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
456
|
-
function
|
|
457
|
-
return
|
|
456
|
+
function P(e, t) {
|
|
457
|
+
return P = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
458
458
|
return e.__proto__ = t, e;
|
|
459
|
-
},
|
|
459
|
+
}, P(e, t);
|
|
460
460
|
}
|
|
461
461
|
//#endregion
|
|
462
462
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
463
|
-
function
|
|
464
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
463
|
+
function Qe(e, t) {
|
|
464
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, P(e, t);
|
|
465
465
|
}
|
|
466
466
|
//#endregion
|
|
467
467
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
468
|
-
function
|
|
469
|
-
return
|
|
468
|
+
function $e(e) {
|
|
469
|
+
return $e = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
470
470
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
471
|
-
},
|
|
471
|
+
}, $e(e);
|
|
472
472
|
}
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
|
|
475
|
-
function
|
|
475
|
+
function et(e) {
|
|
476
476
|
try {
|
|
477
477
|
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
478
478
|
} catch {
|
|
@@ -481,48 +481,48 @@ function tt(e) {
|
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
483
483
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
|
|
484
|
-
function
|
|
484
|
+
function tt() {
|
|
485
485
|
try {
|
|
486
486
|
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
487
487
|
} catch {}
|
|
488
|
-
return (
|
|
488
|
+
return (tt = function() {
|
|
489
489
|
return !!e;
|
|
490
490
|
})();
|
|
491
491
|
}
|
|
492
492
|
//#endregion
|
|
493
493
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/construct.js
|
|
494
|
-
function
|
|
495
|
-
if (
|
|
494
|
+
function nt(e, t, n) {
|
|
495
|
+
if (tt()) return Reflect.construct.apply(null, arguments);
|
|
496
496
|
var r = [null];
|
|
497
497
|
r.push.apply(r, t);
|
|
498
498
|
var i = new (e.bind.apply(e, r))();
|
|
499
|
-
return n &&
|
|
499
|
+
return n && P(i, n.prototype), i;
|
|
500
500
|
}
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
|
|
503
|
-
function
|
|
503
|
+
function rt(e) {
|
|
504
504
|
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
505
|
-
return
|
|
506
|
-
if (e === null || !
|
|
505
|
+
return rt = function(e) {
|
|
506
|
+
if (e === null || !et(e)) return e;
|
|
507
507
|
if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
|
|
508
508
|
if (t !== void 0) {
|
|
509
509
|
if (t.has(e)) return t.get(e);
|
|
510
510
|
t.set(e, n);
|
|
511
511
|
}
|
|
512
512
|
function n() {
|
|
513
|
-
return
|
|
513
|
+
return nt(e, arguments, $e(this).constructor);
|
|
514
514
|
}
|
|
515
515
|
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
516
516
|
value: n,
|
|
517
517
|
enumerable: !1,
|
|
518
518
|
writable: !0,
|
|
519
519
|
configurable: !0
|
|
520
|
-
} }),
|
|
521
|
-
},
|
|
520
|
+
} }), P(n, e);
|
|
521
|
+
}, rt(e);
|
|
522
522
|
}
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js
|
|
525
|
-
var
|
|
525
|
+
var it = {
|
|
526
526
|
1: "Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",
|
|
527
527
|
2: "Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",
|
|
528
528
|
3: "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
|
|
@@ -602,40 +602,40 @@ var at = {
|
|
|
602
602
|
77: "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
|
|
603
603
|
78: "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
|
|
604
604
|
};
|
|
605
|
-
function
|
|
605
|
+
function at() {
|
|
606
606
|
var e = [...arguments], t = e[0], n = [], r;
|
|
607
607
|
for (r = 1; r < e.length; r += 1) n.push(e[r]);
|
|
608
608
|
return n.forEach(function(e) {
|
|
609
609
|
t = t.replace(/%[a-z]/, e);
|
|
610
610
|
}), t;
|
|
611
611
|
}
|
|
612
|
-
var
|
|
613
|
-
|
|
612
|
+
var F = /* @__PURE__ */ function(e) {
|
|
613
|
+
Qe(t, e);
|
|
614
614
|
function t(t) {
|
|
615
615
|
var n;
|
|
616
616
|
if (process.env.NODE_ENV === "production") n = e.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + t + " for more information.") || this;
|
|
617
617
|
else {
|
|
618
618
|
var r = [...arguments].slice(1);
|
|
619
|
-
n = e.call(this,
|
|
619
|
+
n = e.call(this, at.apply(void 0, [it[t]].concat(r))) || this;
|
|
620
620
|
}
|
|
621
|
-
return
|
|
621
|
+
return Ze(n);
|
|
622
622
|
}
|
|
623
623
|
return t;
|
|
624
|
-
}(/* @__PURE__ */
|
|
625
|
-
function
|
|
624
|
+
}(/* @__PURE__ */ rt(Error));
|
|
625
|
+
function ot(e) {
|
|
626
626
|
return Math.round(e * 255);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
return
|
|
628
|
+
function st(e, t, n) {
|
|
629
|
+
return ot(e) + "," + ot(t) + "," + ot(n);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
if (r === void 0 && (r =
|
|
631
|
+
function I(e, t, n, r) {
|
|
632
|
+
if (r === void 0 && (r = st), t === 0) return r(n, n, n);
|
|
633
633
|
var i = (e % 360 + 360) % 360 / 60, a = (1 - Math.abs(2 * n - 1)) * t, o = a * (1 - Math.abs(i % 2 - 1)), s = 0, c = 0, l = 0;
|
|
634
634
|
i >= 0 && i < 1 ? (s = a, c = o) : i >= 1 && i < 2 ? (s = o, c = a) : i >= 2 && i < 3 ? (c = a, l = o) : i >= 3 && i < 4 ? (c = o, l = a) : i >= 4 && i < 5 ? (s = o, l = a) : i >= 5 && i < 6 && (s = a, l = o);
|
|
635
635
|
var u = n - a / 2, d = s + u, f = c + u, p = l + u;
|
|
636
636
|
return r(d, f, p);
|
|
637
637
|
}
|
|
638
|
-
var
|
|
638
|
+
var ct = {
|
|
639
639
|
aliceblue: "f0f8ff",
|
|
640
640
|
antiquewhite: "faebd7",
|
|
641
641
|
aqua: "00ffff",
|
|
@@ -785,21 +785,21 @@ var lt = {
|
|
|
785
785
|
yellow: "ff0",
|
|
786
786
|
yellowgreen: "9acd32"
|
|
787
787
|
};
|
|
788
|
-
function
|
|
788
|
+
function lt(e) {
|
|
789
789
|
if (typeof e != "string") return e;
|
|
790
790
|
var t = e.toLowerCase();
|
|
791
|
-
return
|
|
791
|
+
return ct[t] ? "#" + ct[t] : e;
|
|
792
792
|
}
|
|
793
|
-
var
|
|
794
|
-
function
|
|
795
|
-
if (typeof e != "string") throw new
|
|
796
|
-
var t =
|
|
797
|
-
if (t.match(
|
|
793
|
+
var ut = /^#[a-fA-F0-9]{6}$/, dt = /^#[a-fA-F0-9]{8}$/, ft = /^#[a-fA-F0-9]{3}$/, pt = /^#[a-fA-F0-9]{4}$/, mt = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i, ht = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, gt = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i, _t = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
794
|
+
function L(e) {
|
|
795
|
+
if (typeof e != "string") throw new F(3);
|
|
796
|
+
var t = lt(e);
|
|
797
|
+
if (t.match(ut)) return {
|
|
798
798
|
red: parseInt("" + t[1] + t[2], 16),
|
|
799
799
|
green: parseInt("" + t[3] + t[4], 16),
|
|
800
800
|
blue: parseInt("" + t[5] + t[6], 16)
|
|
801
801
|
};
|
|
802
|
-
if (t.match(
|
|
802
|
+
if (t.match(dt)) {
|
|
803
803
|
var n = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
|
|
804
804
|
return {
|
|
805
805
|
red: parseInt("" + t[1] + t[2], 16),
|
|
@@ -808,12 +808,12 @@ function I(e) {
|
|
|
808
808
|
alpha: n
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
|
-
if (t.match(
|
|
811
|
+
if (t.match(ft)) return {
|
|
812
812
|
red: parseInt("" + t[1] + t[1], 16),
|
|
813
813
|
green: parseInt("" + t[2] + t[2], 16),
|
|
814
814
|
blue: parseInt("" + t[3] + t[3], 16)
|
|
815
815
|
};
|
|
816
|
-
if (t.match(
|
|
816
|
+
if (t.match(pt)) {
|
|
817
817
|
var r = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
|
|
818
818
|
return {
|
|
819
819
|
red: parseInt("" + t[1] + t[1], 16),
|
|
@@ -822,33 +822,33 @@ function I(e) {
|
|
|
822
822
|
alpha: r
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
|
-
var i =
|
|
825
|
+
var i = mt.exec(t);
|
|
826
826
|
if (i) return {
|
|
827
827
|
red: parseInt("" + i[1], 10),
|
|
828
828
|
green: parseInt("" + i[2], 10),
|
|
829
829
|
blue: parseInt("" + i[3], 10)
|
|
830
830
|
};
|
|
831
|
-
var a =
|
|
831
|
+
var a = ht.exec(t.substring(0, 50));
|
|
832
832
|
if (a) return {
|
|
833
833
|
red: parseInt("" + a[1], 10),
|
|
834
834
|
green: parseInt("" + a[2], 10),
|
|
835
835
|
blue: parseInt("" + a[3], 10),
|
|
836
836
|
alpha: parseFloat("" + a[4]) > 1 ? parseFloat("" + a[4]) / 100 : parseFloat("" + a[4])
|
|
837
837
|
};
|
|
838
|
-
var o =
|
|
838
|
+
var o = gt.exec(t);
|
|
839
839
|
if (o) {
|
|
840
|
-
var s = "rgb(" +
|
|
841
|
-
if (!c) throw new
|
|
840
|
+
var s = "rgb(" + I(parseInt("" + o[1], 10), parseInt("" + o[2], 10) / 100, parseInt("" + o[3], 10) / 100) + ")", c = mt.exec(s);
|
|
841
|
+
if (!c) throw new F(4, t, s);
|
|
842
842
|
return {
|
|
843
843
|
red: parseInt("" + c[1], 10),
|
|
844
844
|
green: parseInt("" + c[2], 10),
|
|
845
845
|
blue: parseInt("" + c[3], 10)
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
var l =
|
|
848
|
+
var l = _t.exec(t.substring(0, 50));
|
|
849
849
|
if (l) {
|
|
850
|
-
var u = "rgb(" +
|
|
851
|
-
if (!d) throw new
|
|
850
|
+
var u = "rgb(" + I(parseInt("" + l[1], 10), parseInt("" + l[2], 10) / 100, parseInt("" + l[3], 10) / 100) + ")", d = mt.exec(u);
|
|
851
|
+
if (!d) throw new F(4, t, u);
|
|
852
852
|
return {
|
|
853
853
|
red: parseInt("" + d[1], 10),
|
|
854
854
|
green: parseInt("" + d[2], 10),
|
|
@@ -856,9 +856,9 @@ function I(e) {
|
|
|
856
856
|
alpha: parseFloat("" + l[4]) > 1 ? parseFloat("" + l[4]) / 100 : parseFloat("" + l[4])
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
throw new
|
|
859
|
+
throw new F(5);
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function vt(e) {
|
|
862
862
|
var t = e.red / 255, n = e.green / 255, r = e.blue / 255, i = Math.max(t, n, r), a = Math.min(t, n, r), o = (i + a) / 2;
|
|
863
863
|
if (i === a) return e.alpha === void 0 ? {
|
|
864
864
|
hue: 0,
|
|
@@ -893,161 +893,200 @@ function yt(e) {
|
|
|
893
893
|
alpha: e.alpha
|
|
894
894
|
};
|
|
895
895
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
896
|
+
function R(e) {
|
|
897
|
+
return vt(L(e));
|
|
898
898
|
}
|
|
899
|
-
var
|
|
899
|
+
var yt = function(e) {
|
|
900
900
|
return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
|
|
901
901
|
};
|
|
902
|
-
function
|
|
902
|
+
function z(e) {
|
|
903
903
|
var t = e.toString(16);
|
|
904
904
|
return t.length === 1 ? "0" + t : t;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
907
|
-
return
|
|
906
|
+
function bt(e) {
|
|
907
|
+
return z(Math.round(e * 255));
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
return
|
|
909
|
+
function xt(e, t, n) {
|
|
910
|
+
return yt("#" + bt(e) + bt(t) + bt(n));
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return
|
|
912
|
+
function B(e, t, n) {
|
|
913
|
+
return I(e, t, n, xt);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
917
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
918
|
-
throw new
|
|
915
|
+
function St(e, t, n) {
|
|
916
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return B(e, t, n);
|
|
917
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return B(e.hue, e.saturation, e.lightness);
|
|
918
|
+
throw new F(1);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
922
|
-
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
923
|
-
throw new
|
|
920
|
+
function Ct(e, t, n, r) {
|
|
921
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? B(e, t, n) : "rgba(" + I(e, t, n) + "," + r + ")";
|
|
922
|
+
if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? B(e.hue, e.saturation, e.lightness) : "rgba(" + I(e.hue, e.saturation, e.lightness) + "," + e.alpha + ")";
|
|
923
|
+
throw new F(2);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return
|
|
927
|
-
if (typeof e == "object" && t === void 0 && n === void 0) return
|
|
928
|
-
throw new
|
|
925
|
+
function wt(e, t, n) {
|
|
926
|
+
if (typeof e == "number" && typeof t == "number" && typeof n == "number") return yt("#" + z(e) + z(t) + z(n));
|
|
927
|
+
if (typeof e == "object" && t === void 0 && n === void 0) return yt("#" + z(e.red) + z(e.green) + z(e.blue));
|
|
928
|
+
throw new F(6);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function V(e, t, n, r) {
|
|
931
931
|
if (typeof e == "string" && typeof t == "number") {
|
|
932
|
-
var i =
|
|
932
|
+
var i = L(e);
|
|
933
933
|
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + t + ")";
|
|
934
|
-
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ?
|
|
935
|
-
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ?
|
|
936
|
-
throw new
|
|
934
|
+
} else if (typeof e == "number" && typeof t == "number" && typeof n == "number" && typeof r == "number") return r >= 1 ? wt(e, t, n) : "rgba(" + e + "," + t + "," + n + "," + r + ")";
|
|
935
|
+
else if (typeof e == "object" && t === void 0 && n === void 0 && r === void 0) return e.alpha >= 1 ? wt(e.red, e.green, e.blue) : "rgba(" + e.red + "," + e.green + "," + e.blue + "," + e.alpha + ")";
|
|
936
|
+
throw new F(7);
|
|
937
937
|
}
|
|
938
|
-
var
|
|
938
|
+
var Tt = function(e) {
|
|
939
939
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
940
|
-
},
|
|
940
|
+
}, Et = function(e) {
|
|
941
941
|
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
942
|
-
},
|
|
942
|
+
}, Dt = function(e) {
|
|
943
943
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || e.alpha === void 0);
|
|
944
|
-
},
|
|
944
|
+
}, Ot = function(e) {
|
|
945
945
|
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
946
946
|
};
|
|
947
|
-
function
|
|
948
|
-
if (typeof e != "object") throw new
|
|
949
|
-
if (
|
|
950
|
-
if (
|
|
951
|
-
if (kt(e)) return wt(e);
|
|
947
|
+
function H(e) {
|
|
948
|
+
if (typeof e != "object") throw new F(8);
|
|
949
|
+
if (Et(e)) return V(e);
|
|
950
|
+
if (Tt(e)) return wt(e);
|
|
952
951
|
if (Ot(e)) return Ct(e);
|
|
953
|
-
|
|
952
|
+
if (Dt(e)) return St(e);
|
|
953
|
+
throw new F(8);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function kt(e, t, n) {
|
|
956
956
|
return function() {
|
|
957
957
|
var r = n.concat(Array.prototype.slice.call(arguments));
|
|
958
|
-
return r.length >= t ? e.apply(this, r) :
|
|
958
|
+
return r.length >= t ? e.apply(this, r) : kt(e, t, r);
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
return
|
|
961
|
+
function U(e) {
|
|
962
|
+
return kt(e, e.length, []);
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function At(e, t) {
|
|
965
965
|
if (t === "transparent") return t;
|
|
966
|
-
var n =
|
|
967
|
-
return
|
|
966
|
+
var n = R(t);
|
|
967
|
+
return H(N({}, n, { hue: n.hue + parseFloat(e) }));
|
|
968
968
|
}
|
|
969
|
-
|
|
970
|
-
function
|
|
969
|
+
U(At);
|
|
970
|
+
function W(e, t, n) {
|
|
971
971
|
return Math.max(e, Math.min(t, n));
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function jt(e, t) {
|
|
974
974
|
if (t === "transparent") return t;
|
|
975
|
-
var n =
|
|
976
|
-
return
|
|
975
|
+
var n = R(t);
|
|
976
|
+
return H(N({}, n, { lightness: W(0, 1, n.lightness - parseFloat(e)) }));
|
|
977
977
|
}
|
|
978
|
-
var
|
|
979
|
-
function
|
|
978
|
+
var G = U(jt);
|
|
979
|
+
function Mt(e, t) {
|
|
980
980
|
if (t === "transparent") return t;
|
|
981
|
-
var n =
|
|
982
|
-
return
|
|
981
|
+
var n = R(t);
|
|
982
|
+
return H(N({}, n, { saturation: W(0, 1, n.saturation - parseFloat(e)) }));
|
|
983
983
|
}
|
|
984
|
-
|
|
985
|
-
function
|
|
984
|
+
U(Mt);
|
|
985
|
+
function Nt(e, t) {
|
|
986
986
|
if (t === "transparent") return t;
|
|
987
|
-
var n =
|
|
988
|
-
return
|
|
987
|
+
var n = R(t);
|
|
988
|
+
return H(N({}, n, { lightness: W(0, 1, n.lightness + parseFloat(e)) }));
|
|
989
989
|
}
|
|
990
|
-
var
|
|
991
|
-
function
|
|
990
|
+
var K = U(Nt);
|
|
991
|
+
function Pt(e, t, n) {
|
|
992
992
|
if (t === "transparent") return n;
|
|
993
993
|
if (n === "transparent") return t;
|
|
994
994
|
if (e === 0) return n;
|
|
995
|
-
var r =
|
|
996
|
-
return
|
|
995
|
+
var r = L(t), i = N({}, r, { alpha: typeof r.alpha == "number" ? r.alpha : 1 }), a = L(n), o = N({}, a, { alpha: typeof a.alpha == "number" ? a.alpha : 1 }), s = i.alpha - o.alpha, c = parseFloat(e) * 2 - 1, l = ((c * s === -1 ? c : c + s) / (1 + c * s) + 1) / 2, u = 1 - l;
|
|
996
|
+
return V({
|
|
997
997
|
red: Math.floor(i.red * l + o.red * u),
|
|
998
998
|
green: Math.floor(i.green * l + o.green * u),
|
|
999
999
|
blue: Math.floor(i.blue * l + o.blue * u),
|
|
1000
1000
|
alpha: i.alpha * parseFloat(e) + o.alpha * (1 - parseFloat(e))
|
|
1001
1001
|
});
|
|
1002
1002
|
}
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1003
|
+
var Ft = U(Pt);
|
|
1004
|
+
function It(e, t) {
|
|
1005
1005
|
if (t === "transparent") return t;
|
|
1006
|
-
var n =
|
|
1007
|
-
return
|
|
1006
|
+
var n = L(t);
|
|
1007
|
+
return V(N({}, n, { alpha: W(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 + parseFloat(e) * 100) / 100) }));
|
|
1008
1008
|
}
|
|
1009
|
-
|
|
1010
|
-
function
|
|
1009
|
+
U(It);
|
|
1010
|
+
function Lt(e, t) {
|
|
1011
1011
|
if (t === "transparent") return t;
|
|
1012
|
-
var n =
|
|
1013
|
-
return
|
|
1012
|
+
var n = R(t);
|
|
1013
|
+
return H(N({}, n, { saturation: W(0, 1, n.saturation + parseFloat(e)) }));
|
|
1014
|
+
}
|
|
1015
|
+
U(Lt);
|
|
1016
|
+
function Rt(e, t) {
|
|
1017
|
+
return t === "transparent" ? t : H(N({}, R(t), { hue: parseFloat(e) }));
|
|
1018
|
+
}
|
|
1019
|
+
U(Rt);
|
|
1020
|
+
function zt(e, t) {
|
|
1021
|
+
return t === "transparent" ? t : H(N({}, R(t), { lightness: parseFloat(e) }));
|
|
1014
1022
|
}
|
|
1015
|
-
|
|
1023
|
+
U(zt);
|
|
1016
1024
|
function Bt(e, t) {
|
|
1017
|
-
return t === "transparent" ? t :
|
|
1025
|
+
return t === "transparent" ? t : H(N({}, R(t), { saturation: parseFloat(e) }));
|
|
1018
1026
|
}
|
|
1019
|
-
|
|
1027
|
+
U(Bt);
|
|
1020
1028
|
function Vt(e, t) {
|
|
1021
|
-
return t === "transparent" ? t :
|
|
1029
|
+
return t === "transparent" ? t : Ft(parseFloat(e), "rgb(0, 0, 0)", t);
|
|
1022
1030
|
}
|
|
1023
|
-
|
|
1031
|
+
U(Vt);
|
|
1024
1032
|
function Ht(e, t) {
|
|
1025
|
-
return t === "transparent" ? t :
|
|
1033
|
+
return t === "transparent" ? t : Ft(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1026
1034
|
}
|
|
1027
|
-
|
|
1035
|
+
U(Ht);
|
|
1028
1036
|
function Ut(e, t) {
|
|
1029
|
-
return t === "transparent" ? t : Lt(parseFloat(e), "rgb(0, 0, 0)", t);
|
|
1030
|
-
}
|
|
1031
|
-
H(Ut);
|
|
1032
|
-
function Wt(e, t) {
|
|
1033
|
-
return t === "transparent" ? t : Lt(parseFloat(e), "rgb(255, 255, 255)", t);
|
|
1034
|
-
}
|
|
1035
|
-
H(Wt);
|
|
1036
|
-
function Gt(e, t) {
|
|
1037
1037
|
if (t === "transparent") return t;
|
|
1038
|
-
var n =
|
|
1039
|
-
return
|
|
1038
|
+
var n = L(t);
|
|
1039
|
+
return V(N({}, n, { alpha: W(0, 1, ((typeof n.alpha == "number" ? n.alpha : 1) * 100 - parseFloat(e) * 100).toFixed(2) / 100) }));
|
|
1040
1040
|
}
|
|
1041
|
-
|
|
1041
|
+
var Wt = U(Ut);
|
|
1042
1042
|
//#endregion
|
|
1043
1043
|
//#region src/theme/utils.ts
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1044
|
+
function Gt(e) {
|
|
1045
|
+
return {
|
|
1046
|
+
1: K(.35, e),
|
|
1047
|
+
2: K(.3, e),
|
|
1048
|
+
3: K(.25, e),
|
|
1049
|
+
4: K(.2, e),
|
|
1050
|
+
5: K(.15, e),
|
|
1051
|
+
6: K(.12, e),
|
|
1052
|
+
7: K(.08, e),
|
|
1053
|
+
8: K(.04, e),
|
|
1054
|
+
9: e,
|
|
1055
|
+
10: K(.1, e),
|
|
1056
|
+
11: G(.1, e),
|
|
1057
|
+
12: G(.15, e)
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
var Kt = [
|
|
1061
|
+
.03,
|
|
1062
|
+
.05,
|
|
1063
|
+
.1,
|
|
1064
|
+
.15,
|
|
1065
|
+
.2,
|
|
1066
|
+
.3,
|
|
1067
|
+
.4,
|
|
1068
|
+
.5,
|
|
1069
|
+
.6,
|
|
1070
|
+
.7,
|
|
1071
|
+
.8,
|
|
1072
|
+
.9
|
|
1073
|
+
];
|
|
1074
|
+
function qt(e = {}) {
|
|
1075
|
+
let t = M({}, E, e), n = e.colors?.brand?.base ?? e.colors?.primary?.main, r;
|
|
1076
|
+
if (n) {
|
|
1077
|
+
let e = Gt(n);
|
|
1078
|
+
t.colors.primary.main = n, t.colors.primary.ultraDark = e[12], t.colors.primary.dark = n, t.colors.primary.toku = e[10], t.colors.primary.light1 = e[5], t.colors.primary.light2 = e[4], t.colors.primary.light3 = e[3], t.colors.primary.light4 = e[2], t.colors.primary.light5 = e[1], r = {};
|
|
1079
|
+
for (let [t, n] of Object.entries(e)) r[`--color-brand-${t}`] = n;
|
|
1080
|
+
for (let e = 1; e <= 12; e++) r[`--color-brand-a-${e}`] = Wt(1 - Kt[e - 1], n);
|
|
1081
|
+
}
|
|
1082
|
+
return Object.assign(t, { cssVars: r });
|
|
1083
|
+
}
|
|
1084
|
+
//#endregion
|
|
1085
|
+
//#region src/composables/theme.ts
|
|
1086
|
+
var Jt = Symbol("theme"), q = () => {
|
|
1087
|
+
let e = l(Jt, void 0);
|
|
1049
1088
|
return n(() => e?.value ?? E);
|
|
1050
|
-
},
|
|
1089
|
+
}, Yt = /* @__PURE__ */ ((e, t) => {
|
|
1051
1090
|
let n = e.__vccOpts || e;
|
|
1052
1091
|
for (let [e, r] of t) n[e] = r;
|
|
1053
1092
|
return n;
|
|
@@ -1061,11 +1100,11 @@ var Kt = (e) => {
|
|
|
1061
1100
|
v2d9fac57: x(n).colors.primary.main,
|
|
1062
1101
|
v4320e4fd: x(n).colors.primary.light5
|
|
1063
1102
|
}));
|
|
1064
|
-
let t = e, n =
|
|
1103
|
+
let t = e, n = q();
|
|
1065
1104
|
return (e, n) => (_(), i("div", { class: p(["t-chip", [`t-chip--${t.variant}`]]) }, [b(e.$slots, "default", {}, void 0, !0)], 2));
|
|
1066
1105
|
}
|
|
1067
|
-
}), [["__scopeId", "data-v-519905d4"]]),
|
|
1068
|
-
let t =
|
|
1106
|
+
}), [["__scopeId", "data-v-519905d4"]]), Xt = (e) => Xe(e), Zt = (e) => {
|
|
1107
|
+
let t = q(), r = n(() => Xt(e.value)), i = n(() => r.value === "primary" ? t.value.colors.primary.ultraDark : G(.15, t.value.colors[r.value])), a = n(() => r.value === "primary" ? t.value.colors.primary.main : t.value.colors[r.value]), o = n(() => r.value === "primary" ? t.value.colors.primary.light1 : K(.15, t.value.colors[r.value])), s = n(() => r.value === "primary" ? t.value.colors.primary.light2 : K(.2, t.value.colors[r.value])), c = n(() => r.value === "primary" ? t.value.colors.primary.light3 : K(.25, t.value.colors[r.value]));
|
|
1069
1108
|
return n(() => T({
|
|
1070
1109
|
"&, *": {
|
|
1071
1110
|
margin: 0,
|
|
@@ -1159,12 +1198,12 @@ var Kt = (e) => {
|
|
|
1159
1198
|
"&--tertiary:disabled &__spinner": { color: t.value.colors.gray.medium1 },
|
|
1160
1199
|
"&--secondary &__spinner, &--tertiary &__spinner": { color: a.value }
|
|
1161
1200
|
}));
|
|
1162
|
-
},
|
|
1201
|
+
}, Qt = {
|
|
1163
1202
|
variant: "primary",
|
|
1164
1203
|
size: "medium",
|
|
1165
1204
|
type: "button",
|
|
1166
1205
|
color: "primary"
|
|
1167
|
-
},
|
|
1206
|
+
}, J = /* @__PURE__ */ s({
|
|
1168
1207
|
name: "TButton",
|
|
1169
1208
|
props: {
|
|
1170
1209
|
variant: String,
|
|
@@ -1179,7 +1218,7 @@ var Kt = (e) => {
|
|
|
1179
1218
|
},
|
|
1180
1219
|
emits: ["click"],
|
|
1181
1220
|
setup(e, { attrs: t, slots: r, emit: i }) {
|
|
1182
|
-
let a = n(() =>
|
|
1221
|
+
let a = n(() => M({}, Qt, e, t)), s = Zt(n(() => a.value.color)), c = q(), l = n(() => [
|
|
1183
1222
|
s.value,
|
|
1184
1223
|
`${s.value}--${a.value.variant}`,
|
|
1185
1224
|
`${s.value}--${a.value.size}`,
|
|
@@ -1205,8 +1244,8 @@ var Kt = (e) => {
|
|
|
1205
1244
|
}, null)
|
|
1206
1245
|
]);
|
|
1207
1246
|
}
|
|
1208
|
-
}),
|
|
1209
|
-
let e =
|
|
1247
|
+
}), $t = () => {
|
|
1248
|
+
let e = q(), t = e.value.colors.gray.light1, r = (e, t) => {
|
|
1210
1249
|
switch (t) {
|
|
1211
1250
|
case "large": return encodeURIComponent(`<svg width="10" height="9.5" viewBox="0 0 10 9.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1212
1251
|
<path d="M0.833344 3.79167L3.75001 6.70834L9.16668 1.29167" stroke="${e}" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -1302,10 +1341,10 @@ var Kt = (e) => {
|
|
|
1302
1341
|
}
|
|
1303
1342
|
}
|
|
1304
1343
|
}));
|
|
1305
|
-
},
|
|
1344
|
+
}, en = () => `checkbox-${Math.random().toString(36).substring(2, 9)}-${Date.now()}`, tn = {
|
|
1306
1345
|
size: "large",
|
|
1307
1346
|
value: !1
|
|
1308
|
-
},
|
|
1347
|
+
}, nn = /* @__PURE__ */ s({
|
|
1309
1348
|
name: "TCheckbox",
|
|
1310
1349
|
props: {
|
|
1311
1350
|
labelPosition: String,
|
|
@@ -1321,7 +1360,7 @@ var Kt = (e) => {
|
|
|
1321
1360
|
"update:modelValue"
|
|
1322
1361
|
],
|
|
1323
1362
|
setup(e, { attrs: t, slots: r, emit: i }) {
|
|
1324
|
-
let a =
|
|
1363
|
+
let a = en(), s = n(() => M({}, tn, e, t, { id: e.id ?? t.id ?? a })), c = $t(), l = n(() => [c.value, `${c.value}--${s.value.size}`]), u = n(() => [
|
|
1325
1364
|
c.value,
|
|
1326
1365
|
`${c.value}--${s.value.size}`,
|
|
1327
1366
|
{ [`${c.value}--disabled`]: s.value.disabled }
|
|
@@ -1351,8 +1390,8 @@ var Kt = (e) => {
|
|
|
1351
1390
|
}, [r.default()])
|
|
1352
1391
|
]);
|
|
1353
1392
|
}
|
|
1354
|
-
}),
|
|
1355
|
-
let t =
|
|
1393
|
+
}), rn = (e) => {
|
|
1394
|
+
let t = q();
|
|
1356
1395
|
return n(() => T({
|
|
1357
1396
|
"&, *": {
|
|
1358
1397
|
margin: 0,
|
|
@@ -1414,7 +1453,7 @@ var Kt = (e) => {
|
|
|
1414
1453
|
marginBlock: "0.5rem"
|
|
1415
1454
|
}
|
|
1416
1455
|
}));
|
|
1417
|
-
},
|
|
1456
|
+
}, an = () => n(() => T({
|
|
1418
1457
|
position: "fixed",
|
|
1419
1458
|
display: "none",
|
|
1420
1459
|
padding: "0.625rem",
|
|
@@ -1443,21 +1482,21 @@ var Kt = (e) => {
|
|
|
1443
1482
|
borderTopRightRadius: "0.5rem",
|
|
1444
1483
|
borderBottomLeftRadius: "0"
|
|
1445
1484
|
}
|
|
1446
|
-
})),
|
|
1485
|
+
})), on = (e) => {
|
|
1447
1486
|
let t = [];
|
|
1448
1487
|
return e?.forEach((e) => {
|
|
1449
|
-
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
1488
|
+
e.type?.name === "TDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...on(e.children));
|
|
1450
1489
|
}), t;
|
|
1451
1490
|
};
|
|
1452
1491
|
//#endregion
|
|
1453
1492
|
//#region src/components/TDropdown/TDropdown.tsx
|
|
1454
|
-
function
|
|
1493
|
+
function sn(e) {
|
|
1455
1494
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
|
|
1456
1495
|
}
|
|
1457
|
-
var
|
|
1496
|
+
var cn = {
|
|
1458
1497
|
size: "small",
|
|
1459
1498
|
position: "center"
|
|
1460
|
-
},
|
|
1499
|
+
}, ln = /* @__PURE__ */ s({
|
|
1461
1500
|
name: "TDropdown",
|
|
1462
1501
|
props: {
|
|
1463
1502
|
open: Boolean,
|
|
@@ -1468,7 +1507,7 @@ var sn = {
|
|
|
1468
1507
|
},
|
|
1469
1508
|
emits: ["cancel"],
|
|
1470
1509
|
setup(t, { slots: r, attrs: i, emit: a }) {
|
|
1471
|
-
let s = n(() =>
|
|
1510
|
+
let s = n(() => M({}, cn, t, i)), c = y(null), l = y(null), u = y(null), d = y({
|
|
1472
1511
|
top: 0,
|
|
1473
1512
|
left: 0
|
|
1474
1513
|
}), f = () => {
|
|
@@ -1504,7 +1543,7 @@ var sn = {
|
|
|
1504
1543
|
top: r,
|
|
1505
1544
|
left: i
|
|
1506
1545
|
};
|
|
1507
|
-
}, p =
|
|
1546
|
+
}, p = an(), m = n(() => [
|
|
1508
1547
|
p.value,
|
|
1509
1548
|
`${p.value}--${s.value.size}`,
|
|
1510
1549
|
`${p.value}--${s.value.position}`,
|
|
@@ -1513,7 +1552,7 @@ var sn = {
|
|
|
1513
1552
|
top: `${d.value.top}px`,
|
|
1514
1553
|
left: `${d.value.left}px`,
|
|
1515
1554
|
width: s.value.fullWidth ? `${l.value?.clientWidth}px` : void 0
|
|
1516
|
-
})), v =
|
|
1555
|
+
})), v = rn(n(() => u.value?.clientHeight ?? 0)), b = n(() => [
|
|
1517
1556
|
v.value,
|
|
1518
1557
|
`${v.value}--${s.value.size}`,
|
|
1519
1558
|
`${v.value}--${s.value.position}`,
|
|
@@ -1545,7 +1584,7 @@ var sn = {
|
|
|
1545
1584
|
}), g(() => {
|
|
1546
1585
|
s.value.attachToBody && (window.removeEventListener("scroll", f), window.removeEventListener("resize", f)), document.removeEventListener("click", x), document.removeEventListener("keydown", S);
|
|
1547
1586
|
});
|
|
1548
|
-
let T = n(() =>
|
|
1587
|
+
let T = n(() => on(r.default?.() || [])), E = () => o("div", {
|
|
1549
1588
|
ref: u,
|
|
1550
1589
|
class: s.value.attachToBody ? m.value : `${v.value}__menu`,
|
|
1551
1590
|
style: s.value.attachToBody ? _.value : void 0,
|
|
@@ -1557,11 +1596,11 @@ var sn = {
|
|
|
1557
1596
|
return o("div", {
|
|
1558
1597
|
ref: c,
|
|
1559
1598
|
class: b.value
|
|
1560
|
-
}, [o("div", { ref: l }, [r.trigger?.()]), s.value.open && (s.value.attachToBody ? o(e, { to: "body" },
|
|
1599
|
+
}, [o("div", { ref: l }, [r.trigger?.()]), s.value.open && (s.value.attachToBody ? o(e, { to: "body" }, sn(t = E()) ? t : { default: () => [t] }) : E())]);
|
|
1561
1600
|
};
|
|
1562
1601
|
}
|
|
1563
|
-
}),
|
|
1564
|
-
let e =
|
|
1602
|
+
}), un = () => {
|
|
1603
|
+
let e = q();
|
|
1565
1604
|
return n(() => T({
|
|
1566
1605
|
"&, *": {
|
|
1567
1606
|
margin: 0,
|
|
@@ -1584,12 +1623,12 @@ var sn = {
|
|
|
1584
1623
|
cursor: "not-allowed"
|
|
1585
1624
|
}
|
|
1586
1625
|
}));
|
|
1587
|
-
},
|
|
1626
|
+
}, dn = /* @__PURE__ */ s({
|
|
1588
1627
|
name: "TDropdownItem",
|
|
1589
1628
|
emits: ["click"],
|
|
1590
1629
|
props: { disabled: Boolean },
|
|
1591
1630
|
setup(e, { slots: t, emit: r, attrs: i }) {
|
|
1592
|
-
let a = n(() =>
|
|
1631
|
+
let a = n(() => M({}, e, i)), s = un(), c = n(() => [s.value, { [`${s.value}--disabled`]: a.value.disabled }]), l = () => {
|
|
1593
1632
|
a.value.disabled || r("click");
|
|
1594
1633
|
}, u = (e) => {
|
|
1595
1634
|
e.key === "Enter" && !a.value.disabled && (r("click"), e.preventDefault());
|
|
@@ -1603,8 +1642,8 @@ var sn = {
|
|
|
1603
1642
|
"aria-disabled": a.value.disabled
|
|
1604
1643
|
}, [t.default?.()]);
|
|
1605
1644
|
}
|
|
1606
|
-
}),
|
|
1607
|
-
let e =
|
|
1645
|
+
}), fn = () => {
|
|
1646
|
+
let e = q();
|
|
1608
1647
|
return n(() => T({
|
|
1609
1648
|
"&, *": {
|
|
1610
1649
|
margin: 0,
|
|
@@ -1679,7 +1718,7 @@ var sn = {
|
|
|
1679
1718
|
transform: "translateY(50%)"
|
|
1680
1719
|
}
|
|
1681
1720
|
}));
|
|
1682
|
-
},
|
|
1721
|
+
}, pn = { type: "text" }, mn = /* @__PURE__ */ s({
|
|
1683
1722
|
name: "TTextInput",
|
|
1684
1723
|
emits: [
|
|
1685
1724
|
"input",
|
|
@@ -1715,7 +1754,7 @@ var sn = {
|
|
|
1715
1754
|
step: [String, Number]
|
|
1716
1755
|
},
|
|
1717
1756
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
1718
|
-
let s = n(() =>
|
|
1757
|
+
let s = n(() => M({}, pn, e, t)), c = fn(), l = q(), u = n({
|
|
1719
1758
|
get: () => s.value.modelValue === void 0 ? s.value.value : s.value.modelValue,
|
|
1720
1759
|
set: (e) => {
|
|
1721
1760
|
r("update:modelValue", e), r("input", e), r("change", e);
|
|
@@ -1779,7 +1818,7 @@ var sn = {
|
|
|
1779
1818
|
i.helperText?.() || s.value.helperText && o("p", { class: `${c.value}__helper-text` }, [s.value.helperText])
|
|
1780
1819
|
]);
|
|
1781
1820
|
}
|
|
1782
|
-
}),
|
|
1821
|
+
}), hn = (e) => e.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, ""), gn = /* @__PURE__ */ s({
|
|
1783
1822
|
name: "TCombobox",
|
|
1784
1823
|
emits: [
|
|
1785
1824
|
"input",
|
|
@@ -1827,7 +1866,7 @@ var sn = {
|
|
|
1827
1866
|
}, S = (e) => {
|
|
1828
1867
|
e.key === "Escape" && (f(), m(), p());
|
|
1829
1868
|
}, w = n(() => i.value === "" ? e.options : e.options.filter((e) => {
|
|
1830
|
-
let t =
|
|
1869
|
+
let t = hn(e.label), n = hn(i.value);
|
|
1831
1870
|
return t.includes(n);
|
|
1832
1871
|
}));
|
|
1833
1872
|
h(() => {
|
|
@@ -1835,7 +1874,7 @@ var sn = {
|
|
|
1835
1874
|
}), g(() => {
|
|
1836
1875
|
document.removeEventListener("click", b), c.value?.removeEventListener("keydown", S);
|
|
1837
1876
|
});
|
|
1838
|
-
let T = () => o(
|
|
1877
|
+
let T = () => o(mn, {
|
|
1839
1878
|
ref: l,
|
|
1840
1879
|
modelValue: i.value,
|
|
1841
1880
|
label: e.label,
|
|
@@ -1852,19 +1891,19 @@ var sn = {
|
|
|
1852
1891
|
role: "combobox",
|
|
1853
1892
|
"aria-controls": "menu",
|
|
1854
1893
|
"aria-expanded": s.value
|
|
1855
|
-
}, [o(
|
|
1894
|
+
}, [o(ln, {
|
|
1856
1895
|
open: s.value,
|
|
1857
1896
|
"full-width": !0
|
|
1858
1897
|
}, {
|
|
1859
1898
|
trigger: () => o(T, null, null),
|
|
1860
|
-
default: () => w.value.map((e) => o(
|
|
1899
|
+
default: () => w.value.map((e) => o(dn, { onClick: () => x(e) }, { default: () => [e.label] }))
|
|
1861
1900
|
})]);
|
|
1862
1901
|
}
|
|
1863
|
-
}),
|
|
1902
|
+
}), _n = {
|
|
1864
1903
|
color: "#000",
|
|
1865
1904
|
size: "medium",
|
|
1866
1905
|
variant: "outline"
|
|
1867
|
-
},
|
|
1906
|
+
}, Y = /* @__PURE__ */ s({
|
|
1868
1907
|
name: "TIcon",
|
|
1869
1908
|
props: {
|
|
1870
1909
|
icon: {
|
|
@@ -1876,7 +1915,7 @@ var sn = {
|
|
|
1876
1915
|
variant: String
|
|
1877
1916
|
},
|
|
1878
1917
|
setup(e, { attrs: t }) {
|
|
1879
|
-
let r = n(() =>
|
|
1918
|
+
let r = n(() => M({}, _n, e, t)), i = q(), a = n(() => O(i.value.colors, r.value.color) || r.value.color), s = n(() => `${i.value.iconSet}:${r.value.icon}${r.value.variant === "solid" ? "-solid" : ""}`), c = {
|
|
1880
1919
|
miniature: "6px",
|
|
1881
1920
|
"extra-small": "10px",
|
|
1882
1921
|
small: "16px",
|
|
@@ -1892,8 +1931,8 @@ var sn = {
|
|
|
1892
1931
|
width: l.value
|
|
1893
1932
|
}, t), null);
|
|
1894
1933
|
}
|
|
1895
|
-
}),
|
|
1896
|
-
let e =
|
|
1934
|
+
}), vn = () => {
|
|
1935
|
+
let e = q();
|
|
1897
1936
|
return n(() => T({
|
|
1898
1937
|
"&, & > *": {
|
|
1899
1938
|
margin: 0,
|
|
@@ -1965,7 +2004,7 @@ var sn = {
|
|
|
1965
2004
|
zIndex: 45
|
|
1966
2005
|
}
|
|
1967
2006
|
}));
|
|
1968
|
-
},
|
|
2007
|
+
}, yn = { size: "medium" }, bn = /* @__PURE__ */ s({
|
|
1969
2008
|
name: "TModal",
|
|
1970
2009
|
props: {
|
|
1971
2010
|
open: Boolean,
|
|
@@ -1976,7 +2015,7 @@ var sn = {
|
|
|
1976
2015
|
},
|
|
1977
2016
|
emits: ["close", "cancel"],
|
|
1978
2017
|
setup(e, { slots: t, attrs: r, emit: i, expose: a }) {
|
|
1979
|
-
let s = n(() =>
|
|
2018
|
+
let s = n(() => M({}, yn, e, r)), c = y(s.value.open), l = vn(), u = n(() => [
|
|
1980
2019
|
l.value,
|
|
1981
2020
|
`${l.value}--${s.value.size}`,
|
|
1982
2021
|
{
|
|
@@ -2029,7 +2068,7 @@ var sn = {
|
|
|
2029
2068
|
class: `${l.value}__close-button`,
|
|
2030
2069
|
onClick: _,
|
|
2031
2070
|
"aria-label": "Close"
|
|
2032
|
-
}, [o(
|
|
2071
|
+
}, [o(Y, { icon: "x-mark" }, null)])]),
|
|
2033
2072
|
(t.body || t.default) && o("div", {
|
|
2034
2073
|
id: "modal-body",
|
|
2035
2074
|
class: `${l.value}__body`
|
|
@@ -2038,8 +2077,8 @@ var sn = {
|
|
|
2038
2077
|
]);
|
|
2039
2078
|
return s.value.nonBlocking ? () => o("div", null, [s.value.nonBlocking && c.value && o("div", { class: `${l.value}__backdrop` }, null), o(x, null, null)]) : () => o(x, null, null);
|
|
2040
2079
|
}
|
|
2041
|
-
}),
|
|
2042
|
-
let t =
|
|
2080
|
+
}), xn = (e) => {
|
|
2081
|
+
let t = q();
|
|
2043
2082
|
return n(() => T({
|
|
2044
2083
|
margin: 0,
|
|
2045
2084
|
padding: 0,
|
|
@@ -2113,7 +2152,7 @@ var sn = {
|
|
|
2113
2152
|
"&--normal": { fontStyle: "normal" },
|
|
2114
2153
|
"&--italic": { fontStyle: "italic" }
|
|
2115
2154
|
}));
|
|
2116
|
-
},
|
|
2155
|
+
}, Sn = {
|
|
2117
2156
|
h1: "h1",
|
|
2118
2157
|
h2: "h2",
|
|
2119
2158
|
h3: "h3",
|
|
@@ -2129,13 +2168,13 @@ var sn = {
|
|
|
2129
2168
|
b4: "p",
|
|
2130
2169
|
b5: "p",
|
|
2131
2170
|
b6: "p"
|
|
2132
|
-
},
|
|
2171
|
+
}, Cn = [
|
|
2133
2172
|
"http:",
|
|
2134
2173
|
"https:",
|
|
2135
2174
|
"mailto:",
|
|
2136
2175
|
"tel:",
|
|
2137
2176
|
"ftp:"
|
|
2138
|
-
],
|
|
2177
|
+
], wn = (e) => Cn.some((t) => e.trim().toLowerCase().startsWith(t)), Tn = (e) => {
|
|
2139
2178
|
let t = [
|
|
2140
2179
|
{
|
|
2141
2180
|
regex: /\*\*([\s\S]+?)\*\*/g,
|
|
@@ -2159,64 +2198,64 @@ var sn = {
|
|
|
2159
2198
|
url: a ? t[2]?.trim() : void 0
|
|
2160
2199
|
});
|
|
2161
2200
|
return n;
|
|
2162
|
-
},
|
|
2201
|
+
}, En = (e) => {
|
|
2163
2202
|
let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end), n = [], r = 0;
|
|
2164
2203
|
for (let e of t) e.start >= r && (n.push(e), r = e.end);
|
|
2165
2204
|
return n;
|
|
2166
|
-
},
|
|
2205
|
+
}, X = (e) => {
|
|
2167
2206
|
if (!e) return [e];
|
|
2168
|
-
let t =
|
|
2207
|
+
let t = Tn(e);
|
|
2169
2208
|
if (t.length === 0) return [e];
|
|
2170
|
-
let n =
|
|
2209
|
+
let n = En(t), r = [], i = 0;
|
|
2171
2210
|
for (let t of n) {
|
|
2172
2211
|
t.start > i && r.push(e.substring(i, t.start));
|
|
2173
|
-
let n =
|
|
2174
|
-
t.tag === "a" ? t.url &&
|
|
2212
|
+
let n = X(t.content);
|
|
2213
|
+
t.tag === "a" ? t.url && wn(t.url) ? r.push(c("a", {
|
|
2175
2214
|
href: t.url,
|
|
2176
2215
|
target: "_blank",
|
|
2177
2216
|
rel: "noopener noreferrer"
|
|
2178
2217
|
}, n)) : r.push(...n) : r.push(c(t.tag, n)), i = t.end;
|
|
2179
2218
|
}
|
|
2180
2219
|
return i < e.length && r.push(e.substring(i)), r.length > 0 ? r : [e];
|
|
2181
|
-
},
|
|
2182
|
-
if (e.type === t) return
|
|
2220
|
+
}, Z = (e) => typeof e == "object" && !!e && "type" in e && e.type !== void 0, Q = (e) => {
|
|
2221
|
+
if (e.type === t) return X(typeof e.children == "string" ? e.children : "");
|
|
2183
2222
|
if (!e.children) return e;
|
|
2184
2223
|
let n;
|
|
2185
2224
|
if (Array.isArray(e.children)) n = e.children.flatMap((e) => {
|
|
2186
|
-
if (typeof e == "string") return
|
|
2187
|
-
if (
|
|
2188
|
-
let t =
|
|
2225
|
+
if (typeof e == "string") return X(e);
|
|
2226
|
+
if (Z(e)) {
|
|
2227
|
+
let t = Q(e);
|
|
2189
2228
|
return Array.isArray(t) ? t : [t];
|
|
2190
2229
|
}
|
|
2191
2230
|
return [];
|
|
2192
2231
|
});
|
|
2193
|
-
else if (typeof e.children == "string") n =
|
|
2194
|
-
else if (
|
|
2195
|
-
let t =
|
|
2232
|
+
else if (typeof e.children == "string") n = X(e.children);
|
|
2233
|
+
else if (Z(e.children)) {
|
|
2234
|
+
let t = Q(e.children);
|
|
2196
2235
|
n = Array.isArray(t) ? t : [t];
|
|
2197
2236
|
} else return e;
|
|
2198
2237
|
return c(e.type, { ...e.props }, n);
|
|
2199
|
-
},
|
|
2200
|
-
if (typeof e == "string") return
|
|
2238
|
+
}, Dn = (e) => {
|
|
2239
|
+
if (typeof e == "string") return X(e);
|
|
2201
2240
|
if (Array.isArray(e)) return e.flatMap((e) => {
|
|
2202
|
-
if (typeof e == "string") return
|
|
2203
|
-
if (
|
|
2204
|
-
let t =
|
|
2241
|
+
if (typeof e == "string") return X(e);
|
|
2242
|
+
if (Z(e)) {
|
|
2243
|
+
let t = Q(e);
|
|
2205
2244
|
return Array.isArray(t) ? t : [t];
|
|
2206
2245
|
}
|
|
2207
2246
|
return [e];
|
|
2208
2247
|
});
|
|
2209
|
-
if (
|
|
2210
|
-
let t =
|
|
2248
|
+
if (Z(e)) {
|
|
2249
|
+
let t = Q(e);
|
|
2211
2250
|
return Array.isArray(t) ? t : [t];
|
|
2212
2251
|
}
|
|
2213
2252
|
return [e];
|
|
2214
|
-
},
|
|
2253
|
+
}, On = {
|
|
2215
2254
|
fontStyle: "normal",
|
|
2216
2255
|
fontWeight: "regular",
|
|
2217
2256
|
variant: "b0",
|
|
2218
2257
|
color: "#373737"
|
|
2219
|
-
},
|
|
2258
|
+
}, $ = /* @__PURE__ */ s({
|
|
2220
2259
|
name: "TTypography",
|
|
2221
2260
|
props: {
|
|
2222
2261
|
fontStyle: String,
|
|
@@ -2226,21 +2265,21 @@ var sn = {
|
|
|
2226
2265
|
color: String
|
|
2227
2266
|
},
|
|
2228
2267
|
setup(e, { attrs: t, slots: r }) {
|
|
2229
|
-
let i = n(() =>
|
|
2268
|
+
let i = n(() => M({}, On, e, t)), a = q(), o = xn(n(() => O(a.value.colors, i.value.color) || a.value.typography.color).value), s = n(() => [
|
|
2230
2269
|
o.value,
|
|
2231
2270
|
`${o.value}--${i.value.variant}`,
|
|
2232
2271
|
`${o.value}--${i.value.fontWeight}`,
|
|
2233
2272
|
`${o.value}--${i.value.fontStyle}`
|
|
2234
|
-
]), l = n(() => i.value.as ||
|
|
2273
|
+
]), l = n(() => i.value.as || Sn[i.value.variant]);
|
|
2235
2274
|
return () => {
|
|
2236
2275
|
let e = r.default?.();
|
|
2237
2276
|
if (!e) return c(l.value, { class: s.value });
|
|
2238
2277
|
if (!a.value.parseMarkdown) return c(l.value, { class: s.value }, e);
|
|
2239
|
-
let t =
|
|
2278
|
+
let t = Dn(e);
|
|
2240
2279
|
return c(l.value, { class: s.value }, t);
|
|
2241
2280
|
};
|
|
2242
2281
|
}
|
|
2243
|
-
}),
|
|
2282
|
+
}), kn = () => n(() => T({
|
|
2244
2283
|
"& > [class$=\"__body\"]": { paddingBlock: 0 },
|
|
2245
2284
|
"&__body": {
|
|
2246
2285
|
display: "flex",
|
|
@@ -2253,16 +2292,16 @@ var sn = {
|
|
|
2253
2292
|
width: "3.5rem",
|
|
2254
2293
|
height: "auto"
|
|
2255
2294
|
}
|
|
2256
|
-
})),
|
|
2295
|
+
})), An = {
|
|
2257
2296
|
cancelText: "Cancel",
|
|
2258
2297
|
confirmText: "OK"
|
|
2259
|
-
},
|
|
2298
|
+
}, jn = /* @__PURE__ */ s({
|
|
2260
2299
|
name: "TDialog",
|
|
2261
2300
|
components: {
|
|
2262
|
-
TTypography:
|
|
2263
|
-
TModal:
|
|
2264
|
-
TButton:
|
|
2265
|
-
TIcon:
|
|
2301
|
+
TTypography: $,
|
|
2302
|
+
TModal: bn,
|
|
2303
|
+
TButton: J,
|
|
2304
|
+
TIcon: Y
|
|
2266
2305
|
},
|
|
2267
2306
|
props: {
|
|
2268
2307
|
title: {
|
|
@@ -2285,42 +2324,42 @@ var sn = {
|
|
|
2285
2324
|
"close"
|
|
2286
2325
|
],
|
|
2287
2326
|
setup(e, { emit: t }) {
|
|
2288
|
-
let r = n(() =>
|
|
2289
|
-
if (r.value.color) return r.value.color === "primary" ? "primary.main" :
|
|
2327
|
+
let r = n(() => M({}, An, e)), i = kn(), a = n(() => {
|
|
2328
|
+
if (r.value.color) return r.value.color === "primary" ? "primary.main" : Xt(r.value.color);
|
|
2290
2329
|
});
|
|
2291
|
-
return () => c(
|
|
2330
|
+
return () => c(bn, {
|
|
2292
2331
|
onClose: () => r.value.cancellable && t("close"),
|
|
2293
2332
|
onCancel: () => r.value.cancellable && t("cancel"),
|
|
2294
2333
|
onConfirm: () => t("confirm"),
|
|
2295
2334
|
class: i.value,
|
|
2296
2335
|
open: !0
|
|
2297
2336
|
}, {
|
|
2298
|
-
header: () => c(
|
|
2337
|
+
header: () => c($, {
|
|
2299
2338
|
variant: "s2",
|
|
2300
2339
|
fontWeight: "semibold"
|
|
2301
2340
|
}, () => r.value.title),
|
|
2302
|
-
default: () => c("div", { class: `${i.value}__body` }, [r.value.icon ? c(
|
|
2341
|
+
default: () => c("div", { class: `${i.value}__body` }, [r.value.icon ? c(Y, {
|
|
2303
2342
|
class: `${i.value}__body-icon`,
|
|
2304
2343
|
variant: "solid",
|
|
2305
2344
|
color: a.value,
|
|
2306
2345
|
icon: r.value.icon
|
|
2307
|
-
}) : void 0, c(
|
|
2346
|
+
}) : void 0, c($, {
|
|
2308
2347
|
class: `${i.value}__body-text`,
|
|
2309
2348
|
variant: "b1",
|
|
2310
2349
|
innerHTML: r.value.message
|
|
2311
2350
|
})]),
|
|
2312
|
-
footer: () => [r.value.cancellable ? c(
|
|
2351
|
+
footer: () => [r.value.cancellable ? c(J, {
|
|
2313
2352
|
onClick: () => t("cancel"),
|
|
2314
2353
|
color: r.value.color,
|
|
2315
2354
|
variant: "secondary"
|
|
2316
|
-
}, () => r.value.cancelText) : void 0, c(
|
|
2355
|
+
}, () => r.value.cancelText) : void 0, c(J, {
|
|
2317
2356
|
onClick: () => t("confirm"),
|
|
2318
2357
|
color: r.value.color
|
|
2319
2358
|
}, () => r.value.confirmText)]
|
|
2320
2359
|
});
|
|
2321
2360
|
}
|
|
2322
|
-
}),
|
|
2323
|
-
let t =
|
|
2361
|
+
}), Mn = (e) => {
|
|
2362
|
+
let t = q(), r = n(() => Xt(e.value)), i = n(() => r.value === "primary" ? t.value.colors.primary.ultraDark : G(.15, t.value.colors[r.value])), a = n(() => r.value === "primary" ? t.value.colors.primary.main : t.value.colors[r.value]), o = n(() => r.value === "primary" ? t.value.colors.primary.light1 : K(.15, t.value.colors[r.value])), s = n(() => r.value === "primary" ? t.value.colors.primary.light2 : K(.2, t.value.colors[r.value])), c = n(() => r.value === "primary" ? t.value.colors.primary.light3 : K(.25, t.value.colors[r.value]));
|
|
2324
2363
|
return {
|
|
2325
2364
|
baseClass: n(() => T({
|
|
2326
2365
|
"&, *": {
|
|
@@ -2403,13 +2442,13 @@ var sn = {
|
|
|
2403
2442
|
"&--small": { height: "1rem" }
|
|
2404
2443
|
}))
|
|
2405
2444
|
};
|
|
2406
|
-
},
|
|
2445
|
+
}, Nn = {
|
|
2407
2446
|
variant: "primary",
|
|
2408
2447
|
size: "medium",
|
|
2409
2448
|
icon: "academic-cap",
|
|
2410
2449
|
type: "button",
|
|
2411
2450
|
color: "primary"
|
|
2412
|
-
},
|
|
2451
|
+
}, Pn = /* @__PURE__ */ s({
|
|
2413
2452
|
name: "TIconButton",
|
|
2414
2453
|
props: {
|
|
2415
2454
|
variant: String,
|
|
@@ -2423,7 +2462,7 @@ var sn = {
|
|
|
2423
2462
|
},
|
|
2424
2463
|
emits: ["click"],
|
|
2425
2464
|
setup(e, { attrs: t, emit: r }) {
|
|
2426
|
-
let i = n(() =>
|
|
2465
|
+
let i = n(() => M({}, Nn, e, t)), { baseClass: a, iconClass: s } = Mn(n(() => i.value.color)), c = q(), l = n(() => [
|
|
2427
2466
|
a.value,
|
|
2428
2467
|
`${a.value}--${i.value.variant}`,
|
|
2429
2468
|
`${a.value}--${i.value.size}`,
|
|
@@ -2449,8 +2488,8 @@ var sn = {
|
|
|
2449
2488
|
class: u.value
|
|
2450
2489
|
}, null)]);
|
|
2451
2490
|
}
|
|
2452
|
-
}),
|
|
2453
|
-
let e =
|
|
2491
|
+
}), Fn = () => {
|
|
2492
|
+
let e = q();
|
|
2454
2493
|
return n(() => T({
|
|
2455
2494
|
margin: 0,
|
|
2456
2495
|
padding: 0,
|
|
@@ -2479,10 +2518,10 @@ var sn = {
|
|
|
2479
2518
|
fontSize: "0.875rem"
|
|
2480
2519
|
}
|
|
2481
2520
|
}));
|
|
2482
|
-
},
|
|
2521
|
+
}, In = {
|
|
2483
2522
|
variant: "primary",
|
|
2484
2523
|
size: "medium"
|
|
2485
|
-
},
|
|
2524
|
+
}, Ln = /* @__PURE__ */ s({
|
|
2486
2525
|
name: "TButton",
|
|
2487
2526
|
props: {
|
|
2488
2527
|
variant: String,
|
|
@@ -2492,7 +2531,7 @@ var sn = {
|
|
|
2492
2531
|
rightIcon: String
|
|
2493
2532
|
},
|
|
2494
2533
|
setup(e, { attrs: t, slots: r }) {
|
|
2495
|
-
let i = n(() =>
|
|
2534
|
+
let i = n(() => M({}, In, e, t)), a = Fn(), s = q(), c = n(() => [
|
|
2496
2535
|
a.value,
|
|
2497
2536
|
`${a.value}--${i.value.variant}`,
|
|
2498
2537
|
`${a.value}--${i.value.size}`
|
|
@@ -2506,8 +2545,8 @@ var sn = {
|
|
|
2506
2545
|
i.value.rightIcon ? o(w, { icon: `${s.value.iconSet}:${i.value.rightIcon}` }, null) : null
|
|
2507
2546
|
]);
|
|
2508
2547
|
}
|
|
2509
|
-
}),
|
|
2510
|
-
let t = n(() => e.color), r =
|
|
2548
|
+
}), Rn = (e) => {
|
|
2549
|
+
let t = n(() => e.color), r = q();
|
|
2511
2550
|
return n(() => T({
|
|
2512
2551
|
margin: 0,
|
|
2513
2552
|
padding: 0,
|
|
@@ -2532,20 +2571,20 @@ var sn = {
|
|
|
2532
2571
|
"100%": { transform: "rotate(360deg)" }
|
|
2533
2572
|
}
|
|
2534
2573
|
}));
|
|
2535
|
-
},
|
|
2574
|
+
}, zn = {
|
|
2536
2575
|
size: "auto",
|
|
2537
2576
|
color: "#5C0087"
|
|
2538
|
-
},
|
|
2577
|
+
}, Bn = /* @__PURE__ */ s({
|
|
2539
2578
|
name: "TSpinner",
|
|
2540
2579
|
props: {
|
|
2541
2580
|
size: String,
|
|
2542
2581
|
color: String
|
|
2543
2582
|
},
|
|
2544
2583
|
setup(e, { attrs: t }) {
|
|
2545
|
-
let r = n(() =>
|
|
2584
|
+
let r = n(() => M({}, zn, e, t)), i = q(), a = Rn({ color: n(() => O(i.value.colors, r.value.color) || r.value.color).value }), s = n(() => [a.value, `${a.value}--${r.value.size}`]);
|
|
2546
2585
|
return () => o("div", { class: s.value }, null);
|
|
2547
2586
|
}
|
|
2548
|
-
}),
|
|
2587
|
+
}), Vn = () => n(() => T({
|
|
2549
2588
|
bottom: 0,
|
|
2550
2589
|
left: 0,
|
|
2551
2590
|
position: "absolute",
|
|
@@ -2562,7 +2601,7 @@ var sn = {
|
|
|
2562
2601
|
position: "fixed",
|
|
2563
2602
|
zIndex: 999
|
|
2564
2603
|
}
|
|
2565
|
-
})),
|
|
2604
|
+
})), Hn = { size: "auto" }, Un = /* @__PURE__ */ s({
|
|
2566
2605
|
name: "TLoading",
|
|
2567
2606
|
props: {
|
|
2568
2607
|
active: Boolean,
|
|
@@ -2570,14 +2609,14 @@ var sn = {
|
|
|
2570
2609
|
size: String
|
|
2571
2610
|
},
|
|
2572
2611
|
setup(e, { attrs: t }) {
|
|
2573
|
-
let r = n(() =>
|
|
2612
|
+
let r = n(() => M({}, Hn, e, t)), i = Vn(), a = n(() => [i.value, {
|
|
2574
2613
|
[`${i.value}--active`]: r.value.active,
|
|
2575
2614
|
[`${i.value}--full-page`]: r.value.fullPage
|
|
2576
2615
|
}]);
|
|
2577
|
-
return () => o("div", { class: a.value }, [o(
|
|
2616
|
+
return () => o("div", { class: a.value }, [o(Bn, { size: r.value.size }, null)]);
|
|
2578
2617
|
}
|
|
2579
|
-
}),
|
|
2580
|
-
let e =
|
|
2618
|
+
}), Wn = () => {
|
|
2619
|
+
let e = q();
|
|
2581
2620
|
return n(() => T({
|
|
2582
2621
|
"&, *": {
|
|
2583
2622
|
margin: 0,
|
|
@@ -2625,7 +2664,7 @@ var sn = {
|
|
|
2625
2664
|
"&--disabled &__radio::after": { background: e.value.colors.gray.medium2 },
|
|
2626
2665
|
"&--disabled &__label": { color: e.value.colors.gray.medium2 }
|
|
2627
2666
|
}));
|
|
2628
|
-
},
|
|
2667
|
+
}, Gn = { labelPosition: "right" }, Kn = /* @__PURE__ */ s({
|
|
2629
2668
|
name: "TRadio",
|
|
2630
2669
|
props: {
|
|
2631
2670
|
id: String,
|
|
@@ -2663,11 +2702,11 @@ var sn = {
|
|
|
2663
2702
|
"update:modelValue"
|
|
2664
2703
|
],
|
|
2665
2704
|
setup(e, { emit: t, attrs: r }) {
|
|
2666
|
-
let i = n(() =>
|
|
2705
|
+
let i = n(() => M({}, Gn, e, r)), a = y(i.value.modelValue === i.value.value);
|
|
2667
2706
|
C(() => [i.value.modelValue, i.value.value], () => {
|
|
2668
2707
|
a.value = i.value.modelValue === i.value.value;
|
|
2669
2708
|
});
|
|
2670
|
-
let s =
|
|
2709
|
+
let s = Wn(), c = n(() => [
|
|
2671
2710
|
s.value,
|
|
2672
2711
|
`${s.value}--label-${i.value.labelPosition}`,
|
|
2673
2712
|
{
|
|
@@ -2693,15 +2732,15 @@ var sn = {
|
|
|
2693
2732
|
for: i.value.id
|
|
2694
2733
|
}, [i.value.label])]);
|
|
2695
2734
|
}
|
|
2696
|
-
}),
|
|
2735
|
+
}), qn = {
|
|
2697
2736
|
railTopInset: 3,
|
|
2698
2737
|
railBottomInset: 8,
|
|
2699
2738
|
minThumbHeight: 6,
|
|
2700
2739
|
thumbHeightFactor: .65
|
|
2701
2740
|
};
|
|
2702
|
-
function
|
|
2741
|
+
function Jn(e, t = {}) {
|
|
2703
2742
|
let { railTopInset: r, railBottomInset: i, minThumbHeight: a, thumbHeightFactor: o, onDragStart: s, onDragEnd: c } = {
|
|
2704
|
-
...
|
|
2743
|
+
...qn,
|
|
2705
2744
|
...t
|
|
2706
2745
|
}, l = y(0), u = y(0), d = y(!1), f = y(0), p = y(0), m = n(() => l.value > 0);
|
|
2707
2746
|
function h() {
|
|
@@ -2743,8 +2782,8 @@ function Kn(e, t = {}) {
|
|
|
2743
2782
|
}
|
|
2744
2783
|
//#endregion
|
|
2745
2784
|
//#region src/components/TSelect/TSelect.styles.tsx
|
|
2746
|
-
var
|
|
2747
|
-
let e =
|
|
2785
|
+
var Yn = () => {
|
|
2786
|
+
let e = q();
|
|
2748
2787
|
return n(() => T({
|
|
2749
2788
|
"&, *": {
|
|
2750
2789
|
margin: 0,
|
|
@@ -2873,30 +2912,30 @@ var qn = () => {
|
|
|
2873
2912
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
2874
2913
|
"&--full-width": { width: "100%" }
|
|
2875
2914
|
}));
|
|
2876
|
-
},
|
|
2877
|
-
e.type === "option" ? t.push(e) : Array.isArray(e.children) &&
|
|
2878
|
-
}), t),
|
|
2915
|
+
}, Xn = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((e) => Xn(e)).join("").trim() : e && typeof e == "object" && "children" in e ? Xn(e.children) : "", Zn = (e, t = []) => (e?.forEach((e) => {
|
|
2916
|
+
e.type === "option" ? t.push(e) : Array.isArray(e.children) && Zn(e.children, t);
|
|
2917
|
+
}), t), Qn = (e) => Zn(e).map((e) => ({
|
|
2879
2918
|
value: e.props?.value,
|
|
2880
2919
|
disabled: !!e.props?.disabled,
|
|
2881
|
-
label:
|
|
2882
|
-
})), $ = (e, t) => {
|
|
2920
|
+
label: Xn(e.children)
|
|
2921
|
+
})), $n = (e, t) => {
|
|
2883
2922
|
if (e === t) return !0;
|
|
2884
2923
|
if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
|
|
2885
2924
|
let n = Object.getPrototypeOf(e);
|
|
2886
2925
|
if (n !== Object.prototype || Object.getPrototypeOf(t) !== n) return !1;
|
|
2887
2926
|
let r = Object.keys(e), i = Object.keys(t);
|
|
2888
2927
|
return r.length === i.length ? r.every((n) => e[n] === t[n]) : !1;
|
|
2889
|
-
},
|
|
2890
|
-
let n = e.findIndex((e) => $(e.value, t) && !e.disabled);
|
|
2928
|
+
}, er = (e, t) => {
|
|
2929
|
+
let n = e.findIndex((e) => $n(e.value, t) && !e.disabled);
|
|
2891
2930
|
if (n >= 0) return n;
|
|
2892
2931
|
let r = e.findIndex((e) => !e.disabled);
|
|
2893
2932
|
return r >= 0 ? r : -1;
|
|
2894
|
-
},
|
|
2933
|
+
}, tr = (e) => {
|
|
2895
2934
|
if (typeof e.leftIcon == "string") return e.leftIcon;
|
|
2896
2935
|
let t = e["left-icon"];
|
|
2897
2936
|
return typeof t == "string" ? t : "";
|
|
2898
|
-
},
|
|
2899
|
-
let e =
|
|
2937
|
+
}, nr = (e, t) => e ? e.includes(":") ? e : `${t}:${e}` : "", rr = () => {
|
|
2938
|
+
let e = q();
|
|
2900
2939
|
return n(() => T({
|
|
2901
2940
|
"&, *": { boxSizing: "border-box" },
|
|
2902
2941
|
listStyle: "none",
|
|
@@ -2927,7 +2966,7 @@ var qn = () => {
|
|
|
2927
2966
|
pointerEvents: "none"
|
|
2928
2967
|
}
|
|
2929
2968
|
}));
|
|
2930
|
-
},
|
|
2969
|
+
}, ir = /* @__PURE__ */ s({
|
|
2931
2970
|
name: "TSelectOption",
|
|
2932
2971
|
emits: ["select", "hover"],
|
|
2933
2972
|
props: {
|
|
@@ -2938,7 +2977,7 @@ var qn = () => {
|
|
|
2938
2977
|
withSeparator: Boolean
|
|
2939
2978
|
},
|
|
2940
2979
|
setup(e, { slots: t, emit: r }) {
|
|
2941
|
-
let i =
|
|
2980
|
+
let i = rr(), a = n(() => [i.value, {
|
|
2942
2981
|
[`${i.value}--selected`]: e.selected,
|
|
2943
2982
|
[`${i.value}--highlighted`]: e.highlighted,
|
|
2944
2983
|
[`${i.value}--disabled`]: e.disabled,
|
|
@@ -2956,16 +2995,16 @@ var qn = () => {
|
|
|
2956
2995
|
onMouseenter: s
|
|
2957
2996
|
}, [t.default?.() || e.label]);
|
|
2958
2997
|
}
|
|
2959
|
-
}),
|
|
2960
|
-
function
|
|
2998
|
+
}), ar = 36;
|
|
2999
|
+
function or(e, t, n) {
|
|
2961
3000
|
let r = y(!1), i = y(-1), a = y(null), o = y(null), s = y(null), c = y(!1), l = y(!1), u = () => {
|
|
2962
|
-
n.value || !e.value.length || (r.value = !0, i.value =
|
|
3001
|
+
n.value || !e.value.length || (r.value = !0, i.value = er(e.value, t.value));
|
|
2963
3002
|
}, d = () => {
|
|
2964
3003
|
r.value = !1, i.value = -1, c.value = !1, l.value = !1;
|
|
2965
3004
|
}, f = (e) => {
|
|
2966
3005
|
let t = s.value;
|
|
2967
3006
|
t && t.scrollBy({
|
|
2968
|
-
top: e *
|
|
3007
|
+
top: e * ar,
|
|
2969
3008
|
behavior: "smooth"
|
|
2970
3009
|
});
|
|
2971
3010
|
}, p = (e) => {
|
|
@@ -3020,7 +3059,7 @@ function rr(e, t, n) {
|
|
|
3020
3059
|
}
|
|
3021
3060
|
//#endregion
|
|
3022
3061
|
//#region src/components/TSelect/TSelect.tsx
|
|
3023
|
-
var
|
|
3062
|
+
var sr = /* @__PURE__ */ s({
|
|
3024
3063
|
name: "TSelect",
|
|
3025
3064
|
emits: [
|
|
3026
3065
|
"input",
|
|
@@ -3064,7 +3103,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3064
3103
|
id: String
|
|
3065
3104
|
},
|
|
3066
3105
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
3067
|
-
let s = n(() =>
|
|
3106
|
+
let s = n(() => M({}, e, t)), c = q(), l = y(null), u = Yn(), f = n(() => [
|
|
3068
3107
|
u.value,
|
|
3069
3108
|
`${u.value}__container`,
|
|
3070
3109
|
{
|
|
@@ -3080,7 +3119,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3080
3119
|
set: (e) => {
|
|
3081
3120
|
l.value = e, r("update:modelValue", e), r("input", e), r("change", e);
|
|
3082
3121
|
}
|
|
3083
|
-
}), m = n(() =>
|
|
3122
|
+
}), m = n(() => Qn(i.default?.() ?? [])), h = n(() => m.value.find((e) => $n(e.value, p.value))), g = n(() => !!h.value), _ = n(() => h.value ? h.value.label : s.value.placeholder ? s.value.placeholder : ""), v = n(() => tr(s.value)), b = n(() => nr(v.value, c.value.iconSet)), x = or(m, p, n(() => !!s.value.disabled)), S = Jn(x.menuRef, {
|
|
3084
3123
|
onDragStart: () => {
|
|
3085
3124
|
x.isInteractingWithMenu.value = !0;
|
|
3086
3125
|
},
|
|
@@ -3137,10 +3176,10 @@ var ir = /* @__PURE__ */ s({
|
|
|
3137
3176
|
role: "listbox",
|
|
3138
3177
|
ref: x.menuRef,
|
|
3139
3178
|
onScroll: S.update
|
|
3140
|
-
}, [m.value.map((e, t) => o(
|
|
3179
|
+
}, [m.value.map((e, t) => o(ir, {
|
|
3141
3180
|
key: `${String(e.value)}-${t}`,
|
|
3142
3181
|
label: e.label,
|
|
3143
|
-
selected: $(e.value, p.value),
|
|
3182
|
+
selected: $n(e.value, p.value),
|
|
3144
3183
|
highlighted: t === x.highlightedIndex.value,
|
|
3145
3184
|
disabled: e.disabled,
|
|
3146
3185
|
withSeparator: t < m.value.length - 1,
|
|
@@ -3160,8 +3199,8 @@ var ir = /* @__PURE__ */ s({
|
|
|
3160
3199
|
i.helperText?.() || s.value.helperText && o("p", { class: `${u.value}__helper-text` }, [s.value.helperText])
|
|
3161
3200
|
]);
|
|
3162
3201
|
}
|
|
3163
|
-
}),
|
|
3164
|
-
let e =
|
|
3202
|
+
}), cr = () => {
|
|
3203
|
+
let e = q();
|
|
3165
3204
|
return n(() => T({
|
|
3166
3205
|
"&, *": {
|
|
3167
3206
|
margin: 0,
|
|
@@ -3243,12 +3282,12 @@ var ir = /* @__PURE__ */ s({
|
|
|
3243
3282
|
"&--error &__select:not(:disabled), &--error &__select:focus": { borderColor: e.value.colors.error },
|
|
3244
3283
|
"&--error + &__helper-text": { color: e.value.colors.error }
|
|
3245
3284
|
}));
|
|
3246
|
-
},
|
|
3285
|
+
}, lr = (e) => {
|
|
3247
3286
|
let t = [];
|
|
3248
3287
|
return e?.forEach((e) => {
|
|
3249
|
-
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...
|
|
3288
|
+
e.type?.name === "TSelectDropdownItem" ? t.push(e) : Array.isArray(e.children) && t.push(...lr(e.children));
|
|
3250
3289
|
}), t;
|
|
3251
|
-
},
|
|
3290
|
+
}, ur = /* @__PURE__ */ s({
|
|
3252
3291
|
name: "TSelectDropdown",
|
|
3253
3292
|
props: {
|
|
3254
3293
|
open: Boolean,
|
|
@@ -3262,7 +3301,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3262
3301
|
},
|
|
3263
3302
|
emits: ["cancel", "click"],
|
|
3264
3303
|
setup(e, { slots: t, attrs: r, emit: i }) {
|
|
3265
|
-
let a = n(() =>
|
|
3304
|
+
let a = n(() => M({}, e, r)), s = cr(), c = n(() => [
|
|
3266
3305
|
s.value,
|
|
3267
3306
|
`${s.value}__menu_container`,
|
|
3268
3307
|
{
|
|
@@ -3283,7 +3322,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3283
3322
|
}), g(() => {
|
|
3284
3323
|
document.removeEventListener("click", d), u.value?.removeEventListener("keydown", f);
|
|
3285
3324
|
});
|
|
3286
|
-
let p = n(() =>
|
|
3325
|
+
let p = n(() => lr(t.default?.() || [])), m = () => {
|
|
3287
3326
|
i("click");
|
|
3288
3327
|
};
|
|
3289
3328
|
return () => o("div", { class: l.value }, [
|
|
@@ -3306,8 +3345,8 @@ var ir = /* @__PURE__ */ s({
|
|
|
3306
3345
|
t.helperText?.() || a.value.helperText && o("p", { class: `${s.value}__helper-text` }, [a.value.helperText])
|
|
3307
3346
|
]);
|
|
3308
3347
|
}
|
|
3309
|
-
}),
|
|
3310
|
-
let e =
|
|
3348
|
+
}), dr = () => {
|
|
3349
|
+
let e = q();
|
|
3311
3350
|
return n(() => T({
|
|
3312
3351
|
"&, *": {
|
|
3313
3352
|
margin: 0,
|
|
@@ -3335,12 +3374,12 @@ var ir = /* @__PURE__ */ s({
|
|
|
3335
3374
|
float: "right"
|
|
3336
3375
|
}
|
|
3337
3376
|
}));
|
|
3338
|
-
},
|
|
3377
|
+
}, fr = /* @__PURE__ */ s({
|
|
3339
3378
|
name: "TSelectDropdownItem",
|
|
3340
3379
|
emits: ["click"],
|
|
3341
3380
|
props: { label: String },
|
|
3342
3381
|
setup(e, { slots: t, emit: r, attrs: i }) {
|
|
3343
|
-
let a = n(() =>
|
|
3382
|
+
let a = n(() => M({}, e, i)), s = dr(), c = () => {
|
|
3344
3383
|
r("click");
|
|
3345
3384
|
}, l = (e) => {
|
|
3346
3385
|
e.key === "Enter" && !a.value.disabled && (r("click"), e.preventDefault());
|
|
@@ -3353,8 +3392,8 @@ var ir = /* @__PURE__ */ s({
|
|
|
3353
3392
|
tabindex: 0
|
|
3354
3393
|
}, [t.default?.(), t.label?.() || a.value.label && o("label", { class: `${s.value}__label` }, [a.value.label])]);
|
|
3355
3394
|
}
|
|
3356
|
-
}),
|
|
3357
|
-
let e =
|
|
3395
|
+
}), pr = () => {
|
|
3396
|
+
let e = q();
|
|
3358
3397
|
return n(() => T({
|
|
3359
3398
|
"&, *": {
|
|
3360
3399
|
margin: 0,
|
|
@@ -3398,7 +3437,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3398
3437
|
"&--disabled &__switch": { background: e.value.colors.gray.light3 },
|
|
3399
3438
|
"&--label-left &__switch": { order: 1 }
|
|
3400
3439
|
}));
|
|
3401
|
-
},
|
|
3440
|
+
}, mr = { labelPosition: "right" }, hr = /* @__PURE__ */ s({
|
|
3402
3441
|
name: "TSwitch",
|
|
3403
3442
|
props: {
|
|
3404
3443
|
label: String,
|
|
@@ -3414,7 +3453,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3414
3453
|
"update:modelValue"
|
|
3415
3454
|
],
|
|
3416
3455
|
setup(e, { attrs: t, emit: r }) {
|
|
3417
|
-
let i = n(() =>
|
|
3456
|
+
let i = n(() => M({}, mr, e, t)), a = y(i.value.modelValue || i.value.value);
|
|
3418
3457
|
C([() => i.value.modelValue, () => i.value.value], () => {
|
|
3419
3458
|
a.value = i.value.modelValue || i.value.value;
|
|
3420
3459
|
});
|
|
@@ -3425,7 +3464,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3425
3464
|
}, l = (e) => {
|
|
3426
3465
|
let { key: t } = e;
|
|
3427
3466
|
i.value.disabled || t !== "Enter" && t !== " " || s();
|
|
3428
|
-
}, u =
|
|
3467
|
+
}, u = pr(), d = n(() => [
|
|
3429
3468
|
u.value,
|
|
3430
3469
|
`${u.value}--label-${i.value.labelPosition}`,
|
|
3431
3470
|
{
|
|
@@ -3447,8 +3486,8 @@ var ir = /* @__PURE__ */ s({
|
|
|
3447
3486
|
id: i.value.id
|
|
3448
3487
|
}, [i.value.label])]);
|
|
3449
3488
|
}
|
|
3450
|
-
}),
|
|
3451
|
-
let e =
|
|
3489
|
+
}), gr = () => {
|
|
3490
|
+
let e = q();
|
|
3452
3491
|
return n(() => T({
|
|
3453
3492
|
"&, *": {
|
|
3454
3493
|
margin: 0,
|
|
@@ -3494,7 +3533,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3494
3533
|
}
|
|
3495
3534
|
}
|
|
3496
3535
|
}));
|
|
3497
|
-
},
|
|
3536
|
+
}, _r = /* @__PURE__ */ s({
|
|
3498
3537
|
name: "TTabBar",
|
|
3499
3538
|
emits: [
|
|
3500
3539
|
"input",
|
|
@@ -3507,7 +3546,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3507
3546
|
modelValue: String
|
|
3508
3547
|
},
|
|
3509
3548
|
setup(e, { attrs: t, emit: r }) {
|
|
3510
|
-
let i = n(() =>
|
|
3549
|
+
let i = n(() => M({}, e, t)), a = gr(), s = y(i.value.modelValue === void 0 ? i.value.value : i.value.modelValue);
|
|
3511
3550
|
C([() => i.value.modelValue, () => i.value.value], () => {
|
|
3512
3551
|
s.value = i.value.modelValue === void 0 ? i.value.value : i.value.modelValue;
|
|
3513
3552
|
});
|
|
@@ -3529,8 +3568,8 @@ var ir = /* @__PURE__ */ s({
|
|
|
3529
3568
|
onClick: () => c(e)
|
|
3530
3569
|
}, [e])]))])]);
|
|
3531
3570
|
}
|
|
3532
|
-
}),
|
|
3533
|
-
let e =
|
|
3571
|
+
}), vr = () => {
|
|
3572
|
+
let e = q();
|
|
3534
3573
|
return n(() => T({
|
|
3535
3574
|
paddingBottom: "0.625rem",
|
|
3536
3575
|
color: e.value.colors.gray.main,
|
|
@@ -3553,7 +3592,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3553
3592
|
color: e.value.colors.primary.dark
|
|
3554
3593
|
}
|
|
3555
3594
|
}));
|
|
3556
|
-
},
|
|
3595
|
+
}, yr = /* @__PURE__ */ s({
|
|
3557
3596
|
name: "TTab",
|
|
3558
3597
|
props: {
|
|
3559
3598
|
id: {
|
|
@@ -3576,7 +3615,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3576
3615
|
}
|
|
3577
3616
|
},
|
|
3578
3617
|
setup(e, { slots: t }) {
|
|
3579
|
-
let r =
|
|
3618
|
+
let r = vr(), i = l("tabSelection");
|
|
3580
3619
|
if (!i) throw Error("tabSelection provider missing.");
|
|
3581
3620
|
let { selectTab: a } = i, s = () => {
|
|
3582
3621
|
a(e.id);
|
|
@@ -3592,15 +3631,15 @@ var ir = /* @__PURE__ */ s({
|
|
|
3592
3631
|
tabindex: 0
|
|
3593
3632
|
}, [t.default?.()]);
|
|
3594
3633
|
}
|
|
3595
|
-
}),
|
|
3596
|
-
let e =
|
|
3634
|
+
}), br = () => {
|
|
3635
|
+
let e = q();
|
|
3597
3636
|
return n(() => T({
|
|
3598
3637
|
width: "100%",
|
|
3599
3638
|
borderBottom: `0.125rem solid ${e.value.colors.gray.medium2}`,
|
|
3600
3639
|
display: "flex",
|
|
3601
3640
|
gap: "2.5rem"
|
|
3602
3641
|
}));
|
|
3603
|
-
},
|
|
3642
|
+
}, xr = /* @__PURE__ */ s({
|
|
3604
3643
|
name: "TTabBarExtended",
|
|
3605
3644
|
emits: ["select"],
|
|
3606
3645
|
props: {
|
|
@@ -3617,7 +3656,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3617
3656
|
] }
|
|
3618
3657
|
},
|
|
3619
3658
|
setup(e, { emit: t }) {
|
|
3620
|
-
let r =
|
|
3659
|
+
let r = br(), i = vr(), s = n(() => e.tabs.map((e, t) => ({
|
|
3621
3660
|
id: `${t}`,
|
|
3622
3661
|
label: e.label,
|
|
3623
3662
|
value: e.value
|
|
@@ -3641,7 +3680,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3641
3680
|
e.preventDefault(), e.key === "Enter" && _();
|
|
3642
3681
|
}, C = (e) => {
|
|
3643
3682
|
f(e), b();
|
|
3644
|
-
}, w = () => o(
|
|
3683
|
+
}, w = () => o(ln, {
|
|
3645
3684
|
open: d.value,
|
|
3646
3685
|
position: "center",
|
|
3647
3686
|
onCancel: _
|
|
@@ -3653,7 +3692,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3653
3692
|
tabindex: 0,
|
|
3654
3693
|
role: "button"
|
|
3655
3694
|
}, [a(". . .")]),
|
|
3656
|
-
default: () => s.value.map((e) => o(
|
|
3695
|
+
default: () => s.value.map((e) => o(dn, {
|
|
3657
3696
|
disabled: u.value.id === e.id,
|
|
3658
3697
|
onClick: () => C(e.id)
|
|
3659
3698
|
}, { default: () => [e.label] }))
|
|
@@ -3661,15 +3700,15 @@ var ir = /* @__PURE__ */ s({
|
|
|
3661
3700
|
return () => o("nav", {
|
|
3662
3701
|
role: "navigation",
|
|
3663
3702
|
class: [r.value]
|
|
3664
|
-
}, [h.value.map((e) => o(
|
|
3703
|
+
}, [h.value.map((e) => o(yr, {
|
|
3665
3704
|
key: `${e.label}-${e.id}`,
|
|
3666
3705
|
id: e.id,
|
|
3667
3706
|
selected: u.value.id === e.id,
|
|
3668
3707
|
value: e.value
|
|
3669
3708
|
}, { default: () => [e.label] })), g.value ? o(w, null, null) : null]);
|
|
3670
3709
|
}
|
|
3671
|
-
}),
|
|
3672
|
-
let e =
|
|
3710
|
+
}), Sr = () => {
|
|
3711
|
+
let e = q();
|
|
3673
3712
|
return n(() => T({
|
|
3674
3713
|
"&, *": {
|
|
3675
3714
|
margin: 0,
|
|
@@ -3729,37 +3768,37 @@ var ir = /* @__PURE__ */ s({
|
|
|
3729
3768
|
"&--default > &__status-indicator": { background: e.value.colors.gray.medium1 },
|
|
3730
3769
|
"&--success": {
|
|
3731
3770
|
color: e.value.colors.success,
|
|
3732
|
-
background:
|
|
3771
|
+
background: V(e.value.colors.success, .1)
|
|
3733
3772
|
},
|
|
3734
3773
|
"&--success > &__text": { color: e.value.colors.success },
|
|
3735
3774
|
"&--success > &__status-indicator": { background: e.value.colors.success },
|
|
3736
|
-
"&--in-process": { background:
|
|
3775
|
+
"&--in-process": { background: V(e.value.colors.inProcess, .1) },
|
|
3737
3776
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
3738
3777
|
"&--in-process > &__status-indicator": { background: e.value.colors.inProcessDark },
|
|
3739
|
-
"&--pending": { background:
|
|
3778
|
+
"&--pending": { background: V(e.value.colors.info, .1) },
|
|
3740
3779
|
"&--pending > &__text": { color: e.value.colors.info },
|
|
3741
3780
|
"&--pending > &__status-indicator": { background: e.value.colors.info },
|
|
3742
|
-
"&--toku": { background:
|
|
3781
|
+
"&--toku": { background: V(e.value.colors.primary.light4, 1) },
|
|
3743
3782
|
"&--toku > &__text": { color: e.value.colors.primary.main },
|
|
3744
3783
|
"&--toku > &__status-indicator": { background: e.value.colors.primary.main },
|
|
3745
3784
|
"&--error": {
|
|
3746
3785
|
color: e.value.colors.error,
|
|
3747
|
-
background:
|
|
3786
|
+
background: V(e.value.colors.error, .1)
|
|
3748
3787
|
},
|
|
3749
3788
|
"&--error > &__text": { color: e.value.colors.error },
|
|
3750
3789
|
"&--error > &__status-indicator": { background: e.value.colors.error }
|
|
3751
3790
|
}));
|
|
3752
|
-
},
|
|
3791
|
+
}, Cr = {
|
|
3753
3792
|
size: "medium",
|
|
3754
3793
|
variant: "default"
|
|
3755
|
-
},
|
|
3794
|
+
}, wr = /* @__PURE__ */ s({
|
|
3756
3795
|
name: "TTag",
|
|
3757
3796
|
props: {
|
|
3758
3797
|
size: String,
|
|
3759
3798
|
variant: String
|
|
3760
3799
|
},
|
|
3761
3800
|
setup(e, { slots: t }) {
|
|
3762
|
-
let r = n(() =>
|
|
3801
|
+
let r = n(() => M({}, Cr, e)), i = Sr(), a = n(() => [
|
|
3763
3802
|
i.value,
|
|
3764
3803
|
`${i.value}--${r.value.variant}`,
|
|
3765
3804
|
`${i.value}--${r.value.size}`
|
|
@@ -3772,8 +3811,8 @@ var ir = /* @__PURE__ */ s({
|
|
|
3772
3811
|
class: `${i.value}__text ${i.value}__text--${r.value.size}`
|
|
3773
3812
|
}, [t.default?.()])]);
|
|
3774
3813
|
}
|
|
3775
|
-
}),
|
|
3776
|
-
let e =
|
|
3814
|
+
}), Tr = () => {
|
|
3815
|
+
let e = q();
|
|
3777
3816
|
return n(() => T({
|
|
3778
3817
|
"&, *": {
|
|
3779
3818
|
margin: 0,
|
|
@@ -3832,7 +3871,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3832
3871
|
"&--error &__helper-text": { color: e.value.colors.error },
|
|
3833
3872
|
"&--full-width": { width: "100%" }
|
|
3834
3873
|
}));
|
|
3835
|
-
},
|
|
3874
|
+
}, Er = 1, Dr = /* @__PURE__ */ s({
|
|
3836
3875
|
name: "TTextArea",
|
|
3837
3876
|
emits: [
|
|
3838
3877
|
"input",
|
|
@@ -3859,7 +3898,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3859
3898
|
}
|
|
3860
3899
|
},
|
|
3861
3900
|
setup(e, { attrs: t, emit: r, slots: i, expose: a }) {
|
|
3862
|
-
let s = n(() =>
|
|
3901
|
+
let s = n(() => M({}, e, t)), c = Tr(), l = n({
|
|
3863
3902
|
get: () => s.value.modelValue === void 0 ? s.value.value : s.value.modelValue,
|
|
3864
3903
|
set: (e) => {
|
|
3865
3904
|
r("update:modelValue", e), r("input", e), r("change", e);
|
|
@@ -3902,7 +3941,7 @@ var ir = /* @__PURE__ */ s({
|
|
|
3902
3941
|
id: s.value.id,
|
|
3903
3942
|
class: [`${c.value}__textarea`, { [`${c.value}__textarea--auto-resize`]: s.value.autoResize }],
|
|
3904
3943
|
style: s.value.autoResize ? { height: "auto" } : void 0,
|
|
3905
|
-
rows: s.value.autoResize ?
|
|
3944
|
+
rows: s.value.autoResize ? Er : void 0,
|
|
3906
3945
|
placeholder: s.value.placeholder,
|
|
3907
3946
|
value: l.value,
|
|
3908
3947
|
onInput: p,
|
|
@@ -3915,20 +3954,28 @@ var ir = /* @__PURE__ */ s({
|
|
|
3915
3954
|
i.helperText?.() || s.value.helperText && o("p", { class: `${c.value}__helper-text` }, [s.value.helperText])
|
|
3916
3955
|
]);
|
|
3917
3956
|
}
|
|
3918
|
-
}),
|
|
3957
|
+
}), Or = /* @__PURE__ */ s({
|
|
3919
3958
|
name: "TThemeProvider",
|
|
3920
3959
|
inheritAttrs: !1,
|
|
3921
3960
|
props: { theme: {
|
|
3922
3961
|
type: Object,
|
|
3923
|
-
default: () => {}
|
|
3962
|
+
default: () => ({})
|
|
3924
3963
|
} },
|
|
3925
3964
|
setup(e, { slots: t, attrs: r }) {
|
|
3926
|
-
|
|
3965
|
+
let i = n(() => qt(e.theme ?? {}));
|
|
3966
|
+
return v(Jt, i), () => {
|
|
3967
|
+
let { cssVars: e } = i.value;
|
|
3968
|
+
return c("div", {
|
|
3969
|
+
...r,
|
|
3970
|
+
class: ["toku-theme", r.class],
|
|
3971
|
+
style: e ? [r.style, e] : r.style
|
|
3972
|
+
}, t.default?.());
|
|
3973
|
+
};
|
|
3927
3974
|
}
|
|
3928
3975
|
});
|
|
3929
3976
|
//#endregion
|
|
3930
3977
|
//#region src/composables/click.ts
|
|
3931
|
-
function
|
|
3978
|
+
function kr(e, t) {
|
|
3932
3979
|
let n = (n) => {
|
|
3933
3980
|
let r = e();
|
|
3934
3981
|
r && !r.contains(n.target) && t();
|
|
@@ -3941,7 +3988,7 @@ function Er(e, t) {
|
|
|
3941
3988
|
}
|
|
3942
3989
|
//#endregion
|
|
3943
3990
|
//#region src/composables/tooltip.ts
|
|
3944
|
-
var
|
|
3991
|
+
var Ar = (e) => {
|
|
3945
3992
|
let t = y(!1), r = null, i = () => {
|
|
3946
3993
|
t.value = !0, r && clearTimeout(r);
|
|
3947
3994
|
}, a = () => t.value = !1, o = {
|
|
@@ -3953,13 +4000,13 @@ var Dr = (e) => {
|
|
|
3953
4000
|
},
|
|
3954
4001
|
click: { onClick: () => t.value ? a() : i() }
|
|
3955
4002
|
}, s = n(() => o[e.value ?? "hover"]), c = y(null);
|
|
3956
|
-
return
|
|
4003
|
+
return kr(() => c.value, a), {
|
|
3957
4004
|
isVisible: t,
|
|
3958
4005
|
triggerHandler: s,
|
|
3959
4006
|
wrapperRef: c
|
|
3960
4007
|
};
|
|
3961
|
-
},
|
|
3962
|
-
let e =
|
|
4008
|
+
}, jr = () => {
|
|
4009
|
+
let e = q();
|
|
3963
4010
|
return n(() => T({
|
|
3964
4011
|
position: "relative",
|
|
3965
4012
|
width: "fit-content",
|
|
@@ -4050,11 +4097,11 @@ var Dr = (e) => {
|
|
|
4050
4097
|
"&--medium &__tooltip": { maxWidth: "30ch" },
|
|
4051
4098
|
"&--large &__tooltip": { maxWidth: "35ch" }
|
|
4052
4099
|
}));
|
|
4053
|
-
},
|
|
4100
|
+
}, Mr = {
|
|
4054
4101
|
position: "right",
|
|
4055
4102
|
size: "medium",
|
|
4056
4103
|
trigger: "hover"
|
|
4057
|
-
},
|
|
4104
|
+
}, Nr = /* @__PURE__ */ s({
|
|
4058
4105
|
name: "TTooltip",
|
|
4059
4106
|
props: {
|
|
4060
4107
|
label: String,
|
|
@@ -4064,7 +4111,7 @@ var Dr = (e) => {
|
|
|
4064
4111
|
trigger: String
|
|
4065
4112
|
},
|
|
4066
4113
|
setup(e, { slots: t, attrs: r }) {
|
|
4067
|
-
let i = n(() =>
|
|
4114
|
+
let i = n(() => M({}, Mr, e, r)), { isVisible: a, wrapperRef: s, triggerHandler: c } = Ar(n(() => i.value.trigger)), l = jr(), u = n(() => [
|
|
4068
4115
|
l.value,
|
|
4069
4116
|
`${l.value}--${i.value.position}`,
|
|
4070
4117
|
`${l.value}--${i.value.trigger}`,
|
|
@@ -4082,8 +4129,8 @@ var Dr = (e) => {
|
|
|
4082
4129
|
class: `${l.value}__tooltip`
|
|
4083
4130
|
}, [t.label?.() || i.value.label])]);
|
|
4084
4131
|
}
|
|
4085
|
-
}),
|
|
4086
|
-
let e =
|
|
4132
|
+
}), Pr = () => {
|
|
4133
|
+
let e = q();
|
|
4087
4134
|
return n(() => T({
|
|
4088
4135
|
"&, *": {
|
|
4089
4136
|
margin: 0,
|
|
@@ -4109,31 +4156,31 @@ var Dr = (e) => {
|
|
|
4109
4156
|
"&--success": {
|
|
4110
4157
|
borderColor: e.value.colors.success,
|
|
4111
4158
|
color: e.value.colors.success,
|
|
4112
|
-
background:
|
|
4159
|
+
background: V(e.value.colors.success, .2)
|
|
4113
4160
|
},
|
|
4114
4161
|
"&--success > &__text": { color: e.value.colors.success },
|
|
4115
4162
|
"&--in-process": {
|
|
4116
4163
|
borderColor: e.value.colors.inProcess,
|
|
4117
4164
|
color: e.value.colors.inProcess,
|
|
4118
|
-
background:
|
|
4165
|
+
background: V(e.value.colors.inProcess, .2)
|
|
4119
4166
|
},
|
|
4120
4167
|
"&--in-process > &__text": { color: e.value.colors.inProcessDark },
|
|
4121
4168
|
"&--warning": {
|
|
4122
4169
|
borderColor: e.value.colors.warning,
|
|
4123
4170
|
color: e.value.colors.warning,
|
|
4124
|
-
background:
|
|
4171
|
+
background: V(e.value.colors.warning, .2)
|
|
4125
4172
|
},
|
|
4126
4173
|
"&--warning > &__text": { color: e.value.colors.warning },
|
|
4127
4174
|
"&--error": {
|
|
4128
4175
|
borderColor: e.value.colors.error,
|
|
4129
4176
|
color: e.value.colors.error,
|
|
4130
|
-
background:
|
|
4177
|
+
background: V(e.value.colors.error, .2)
|
|
4131
4178
|
},
|
|
4132
4179
|
"&--error > &__text": { color: e.value.colors.error },
|
|
4133
4180
|
"&--info": {
|
|
4134
4181
|
borderColor: e.value.colors.info,
|
|
4135
4182
|
color: e.value.colors.info,
|
|
4136
|
-
background:
|
|
4183
|
+
background: V(e.value.colors.info, .2)
|
|
4137
4184
|
},
|
|
4138
4185
|
"&--info > &__text": { color: e.value.colors.info },
|
|
4139
4186
|
"&__icon": {
|
|
@@ -4157,7 +4204,7 @@ var Dr = (e) => {
|
|
|
4157
4204
|
}
|
|
4158
4205
|
}
|
|
4159
4206
|
}));
|
|
4160
|
-
},
|
|
4207
|
+
}, Fr = { variant: "default" }, Ir = /* @__PURE__ */ s({
|
|
4161
4208
|
name: "TWarning",
|
|
4162
4209
|
props: {
|
|
4163
4210
|
fullWidth: Boolean,
|
|
@@ -4165,7 +4212,7 @@ var Dr = (e) => {
|
|
|
4165
4212
|
variant: String
|
|
4166
4213
|
},
|
|
4167
4214
|
setup(e, { slots: t }) {
|
|
4168
|
-
let r = n(() =>
|
|
4215
|
+
let r = n(() => M({}, Fr, e)), i = Pr(), a = n(() => [
|
|
4169
4216
|
i.value,
|
|
4170
4217
|
`${i.value}--${r.value.variant}`,
|
|
4171
4218
|
{ [`${i.value}--full-width`]: r.value.fullWidth }
|
|
@@ -4181,23 +4228,23 @@ var Dr = (e) => {
|
|
|
4181
4228
|
class: a.value,
|
|
4182
4229
|
role: "alert"
|
|
4183
4230
|
}, [
|
|
4184
|
-
r.value.icon && o(
|
|
4231
|
+
r.value.icon && o(Y, {
|
|
4185
4232
|
icon: r.value.icon,
|
|
4186
4233
|
class: `${i.value}__icon`,
|
|
4187
4234
|
color: c.value
|
|
4188
4235
|
}, null),
|
|
4189
4236
|
" ",
|
|
4190
|
-
t.content?.() ? t.content?.() : o(
|
|
4237
|
+
t.content?.() ? t.content?.() : o($, {
|
|
4191
4238
|
variant: "b3",
|
|
4192
4239
|
class: `${i.value}__text`
|
|
4193
4240
|
}, { default: () => [t.default?.()] })
|
|
4194
4241
|
]);
|
|
4195
4242
|
}
|
|
4196
|
-
}),
|
|
4243
|
+
}), Lr = () => ({ open: ({ onCancel: e, onConfirm: t, ...n }) => {
|
|
4197
4244
|
let i = document.createElement("div");
|
|
4198
4245
|
document.body.appendChild(i);
|
|
4199
4246
|
let a = r({ render() {
|
|
4200
|
-
return c(
|
|
4247
|
+
return c(jn, {
|
|
4201
4248
|
...n,
|
|
4202
4249
|
onConfirm: () => {
|
|
4203
4250
|
t?.(), a.unmount(), i.remove();
|
|
@@ -4213,6 +4260,6 @@ var Dr = (e) => {
|
|
|
4213
4260
|
a.mount(i);
|
|
4214
4261
|
} });
|
|
4215
4262
|
//#endregion
|
|
4216
|
-
export {
|
|
4263
|
+
export { J as TButton, nn as TCheckbox, Yt as TChip, gn as TCombobox, jn as TDialog, ln as TDropdown, dn as TDropdownItem, Y as TIcon, Pn as TIconButton, Ln as TLink, Un as TLoading, bn as TModal, Kn as TRadio, sr as TSelect, ur as TSelectDropdown, fr as TSelectDropdownItem, Bn as TSpinner, hr as TSwitch, _r as TTabBar, xr as TTabBarExtended, wr as TTag, Dr as TTextArea, mn as TTextInput, Or as TThemeProvider, Nr as TTooltip, $ as TTypography, Ir as TWarning, E as baseTheme, qt as createTheme, Jt as injectionKey, Lr as useDialog, Jn as useScrollbarThumb, q as useTheme };
|
|
4217
4264
|
|
|
4218
4265
|
//# sourceMappingURL=index.es.js.map
|